function onUse(cid, item, frompos, item2, topos)
ppos = getPlayerPosition(cid)
if getPlayerVocation(cid) == 5 then
doPlayerSetVocation(cid,9)
doSendMagicEffect(ppos,5)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You are now an epic sorcerer!")
doRemoveItem(item.uid,1)
elseif getPlayerVocation(cid) == 9 then
doPlayerSendCancel(cid,"You already have this vocation")
if getPlayerVocation(cid) == 6 then
doPlayerSetVocation(cid,10)
doSendMagicEffect(ppos,5)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You are now an epic druid!")
doRemoveItem(item.uid,1)
elseif getPlayerVocation(cid) == 10 then
doPlayerSendCancel(cid,"You already have this vocation")
if getPlayerVocation(cid) == 7 then
doPlayerSetVocation(cid,11)
doSendMagicEffect(ppos,5)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You are now an epic paladin!")
doRemoveItem(item.uid,1)
elseif getPlayerVocation(cid) == 11 then
doPlayerSendCancel(cid,"You already have this vocation")
if getPlayerVocation(cid) == 8 then
doPlayerSetVocation(cid,12)
doSendMagicEffect(ppos,5)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You are now an epic knight!")
doRemoveItem(item.uid,1)
elseif getPlayerVocation(cid) == 12 then
doPlayerSendCancel(cid,"You already have this vocation")
end
return true
end
end
end
end