Aris Hunter
User
- Joined
- Apr 27, 2008
- Messages
- 15
- Reaction score
- 0
Witam
Mam problem z transfem.
Uzywam tego skryptu:
Do Talkaction.xml dodaje:
Kod:
<talkaction words="!transform" script="transform.lua"/>
A do folderu data/talkaction/scripts/tranform.lua
Kod:
-- Transformation System by Piotrek1447
local configuration =
{
playerVocation = {1, 2, 5, 6},
playerNewVocation = 9,
playerNewLookType = 12,
playerLevel = 10,
manaCost = 100,
soulCost = 2,
timeActive = 10
}
local VOCATION_STORAGE = 10000
local outfit = {lookType = configuration.playerNewLookType, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0}
function onSay(cid, words, param)
if(isInArray(configuration.playerVocation, getPlayerVocation(cid)) == TRUE) then
if(getPlayerLevel(cid) >= configuration.playerLevel) then
if(getPlayerMana(cid) >= configuration.manaCost) then
if(getPlayerSoul(cid) >= configuration.soulCost) then
setPlayerStorageValue(cid, VOCATION_STORAGE, getPlayerVocation(cid))
doPlayerSetVocation(cid, configuration.playerNewVocation)
doPlayerAddMana(cid, - configuration.manaCost)
doPlayerAddSoul(cid, - configuration.soulCost)
doSetCreatureOutfit(cid, outfit, configuration.timeActive * 1000)
addEvent(transformBack, configuration.timeActive * 1000, cid)
else
doPlayerSendCancel(cid, "Sorry, you don\'t have required soul points.")
end
else
doPlayerSendCancel(cid, "Sorry, you don\'t have required mana points.")
end
else
doPlayerSendCancel(cid, "Sorry, you don\'t have required level.")
end
else
doPlayerSendCancel(cid, "Sorry, you don\'t have required vocation.")
end
end
function transformBack(cid)
doPlayerSetVocation(cid, getPlayerStorageValue(cid, VOCATION_STORAGE))
setPlayerStorageValue(cid, VOCATION_STORAGE, 0)
end
Wszystko ladnie,pieknie tylko jak trans zniknie to nie da sie spowrotem zamienic bo numer voc sie zmienia na zawsze.(zwykly kina voc=4 a super kina voc=8 i te 8 zostaje)Jak zrobic zeby voc wracalo tak jak bylo przed transfem ?? Pomozcie plz.
Mam problem z transfem.
Uzywam tego skryptu:
Do Talkaction.xml dodaje:
Kod:
<talkaction words="!transform" script="transform.lua"/>
A do folderu data/talkaction/scripts/tranform.lua
Kod:
-- Transformation System by Piotrek1447
local configuration =
{
playerVocation = {1, 2, 5, 6},
playerNewVocation = 9,
playerNewLookType = 12,
playerLevel = 10,
manaCost = 100,
soulCost = 2,
timeActive = 10
}
local VOCATION_STORAGE = 10000
local outfit = {lookType = configuration.playerNewLookType, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0}
function onSay(cid, words, param)
if(isInArray(configuration.playerVocation, getPlayerVocation(cid)) == TRUE) then
if(getPlayerLevel(cid) >= configuration.playerLevel) then
if(getPlayerMana(cid) >= configuration.manaCost) then
if(getPlayerSoul(cid) >= configuration.soulCost) then
setPlayerStorageValue(cid, VOCATION_STORAGE, getPlayerVocation(cid))
doPlayerSetVocation(cid, configuration.playerNewVocation)
doPlayerAddMana(cid, - configuration.manaCost)
doPlayerAddSoul(cid, - configuration.soulCost)
doSetCreatureOutfit(cid, outfit, configuration.timeActive * 1000)
addEvent(transformBack, configuration.timeActive * 1000, cid)
else
doPlayerSendCancel(cid, "Sorry, you don\'t have required soul points.")
end
else
doPlayerSendCancel(cid, "Sorry, you don\'t have required mana points.")
end
else
doPlayerSendCancel(cid, "Sorry, you don\'t have required level.")
end
else
doPlayerSendCancel(cid, "Sorry, you don\'t have required vocation.")
end
end
function transformBack(cid)
doPlayerSetVocation(cid, getPlayerStorageValue(cid, VOCATION_STORAGE))
setPlayerStorageValue(cid, VOCATION_STORAGE, 0)
end
Wszystko ladnie,pieknie tylko jak trans zniknie to nie da sie spowrotem zamienic bo numer voc sie zmienia na zawsze.(zwykly kina voc=4 a super kina voc=8 i te 8 zostaje)Jak zrobic zeby voc wracalo tak jak bylo przed transfem ?? Pomozcie plz.