I need that an item xxx when him click gives you of the second promotion.
Helmp my pleased.
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) > 20 then
doPlayerSendTextMessage(cid,22,"You Are New promotion.")
doRemoveItem(item.uid, 1)
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 then
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
end
if getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 then
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
end
if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
end
if getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 then
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
end
else
doPlayerSendCancel(cid,"Need Level 20 For user promotion.")
doRemoveItem(item.uid, 1)
end
else
doPlayerSendCancel(cid,"You are promotion..")
end
return TRUE
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerVocation(cid) == 1 then
doPlayerSetVocation(cid, 5)
doCreatureSay(cid, "You are now a Master Sorcerer!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
elseif getPlayerVocation(cid) == 2 then
doPlayerSetVocation(cid, 6)
doCreatureSay(cid, "You are now a Elder Druid!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
elseif getPlayerVocation(cid) == 3 then
doPlayerSetVocation(cid, 7)
doCreatureSay(cid, "You are now a Royal Paladin!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
elseif getPlayerVocation(cid) == 4 then
doPlayerSetVocation(cid, 8)
doCreatureSay(cid, "You are now a Elite Knight!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,"You need to be promoted in order to use this item.")
end
end
LUA:-- Nevermind --