- Joined
- Jun 19, 2009
- Messages
- 1,852
- Reaction score
- 5
Hello. I have a script taken from Roxxor, super brain, which gives you a super vocation. But here is the problem: When people use the brain, they do get super promotion, but after re-log or death, they are still normal promotion!
How do I fix that? Script:
How do I fix that? Script:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerVocation(cid) == 5 then
doPlayerSetVocation(cid, 9)
doCreatureSay(cid, "You are now a Super Sorcerer!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
elseif getPlayerVocation(cid) == 6 then
doPlayerSetVocation(cid, 10)
doCreatureSay(cid, "You are now a Super Druid!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
elseif getPlayerVocation(cid) == 7 then
doPlayerSetVocation(cid, 12)
doCreatureSay(cid, "You are now a Super Paladin!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
elseif getPlayerVocation(cid) == 8 then
doPlayerSetVocation(cid, 11)
doCreatureSay(cid, "You are now a Super Knight!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,"You need to be promoted in order to use this item.")
end
end