local configuration =
{
playerVocation = {1,},
playerNewVocation = 16,
playerNewLookType = 30,
playerLevel = 30,
manaCost = 0,
soulCost = 0,
timeActive = 1000000
}
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)
doPlayeraddhealth(cid,5000) - Fusion
doPlayerAddSoul(cid, - configuration.soulCost)
doAddmagicefect(pos,24) - Fire efect
doSetCreatureOutfit(cid, outfit, configuration.timeActive *
1000)
addEvent(transformBack, configuration.timeActive * 1000, cid)
else
doPlayerSendCancel(cid, "Dostosuj sie do wymagan.")
end
else
doPlayerSendCancel(cid, "Dostosuj sie do wymagan.")
end
else
doPlayerSendCancel(cid, "Dostosuj sie do wymaga.")
end
else
doPlayerSendCancel(cid, "Dostosuj sie do wymagan.")
end
end
function transformBack(cid)
doPlayerSetVocation(cid, getPlayerStorageValue(cid, VOCATION_STORAGE))
setPlayerStorageValue(cid, VOCATION_STORAGE, 0)
end