Naxtie
mapper, designer
Looking for something like this.. The thing is, that this script seems to work but It just says "You are now ." and when you look at yourself it says "12:01 You see yourself. You are . You are Leader of the blablabla.
Anyone knows what's wrong?
And yes.. I added the vocations into vocations.xml.
Or something like this... both scripts has the same problems.
Thanks in advance,
Naxtie
Anyone knows what's wrong?
And yes.. I added the vocations into vocations.xml.
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local a = getPlayerPromotionLevel(cid)
if a == 0 then
doPlayerSendCancel(cid, 'You need to be promoted in order to use this item.')
elseif a == 2 then
doPlayerSendCancel(cid, 'Your\'re already promoted!')
else
doPlayerSetPromotionLevel(cid, 2)
doCreatureSay(cid, 'You are now ' .. getVocationInfo(getPlayerVocation(cid)).description .. '!', TALKTYPE_ORANGE_1)
doRemoveItem(item.uid)
end
return true
end
Or something like this... both scripts has the same problems.
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerVocation(cid) == 5 then
doPlayerSetVocation(cid, 9)
doCreatureSay(cid, "You are now a Epic Dark Wizard!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
elseif getPlayerVocation(cid) == 6 then
doPlayerSetVocation(cid, 10)
doCreatureSay(cid, "You are now a Epic Divine Prophet!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
elseif getPlayerVocation(cid) == 7 then
doPlayerSetVocation(cid, 11)
doCreatureSay(cid, "You are now a Epic Royal Assassin!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
elseif getPlayerVocation(cid) == 8 then
doPlayerSetVocation(cid, 12)
doCreatureSay(cid, "You are now a Epic Furious Warrior!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,"You need to be promoted in order to use this item.")
end
end
Thanks in advance,
Naxtie
Last edited: