function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerSetVocation(cid, getPlayerVocation(cid) + 4) --Change +4 to your vocations
return true
end
<?xml version="1.0" encoding="UTF-8"?>
<vocations>
...
<vocation id="9" name="SecondVocation" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
...
<vocations>
function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerSetVocation(cid, getPlayerVocation(cid) + 9, 10, 11, 12) --Change +4 to your vocations
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerVocation(cid) < 9 then
doPlayerSetVocation(cid, getPlayerVocation(cid) + 4)
end
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerPremiumDays(cid) > 0 then
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, CONST_ME_FIREWORK_RED)
doPlayerSetPromotionLevel(cid, 2)
doPlayerSave(cid)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Congratulations! You have been promoted to '.. getPlayerVocationName(cid)..'!!')
else
doPlayerSendCancel(cid,"You need a premuim account to use this")
end
local pos = getThingPos(cid)
for i = 1, 15 do
doSendDistanceShoot({x = pos.x + math.random(-4, 4), y = pos.y + math.random(-4, 4), z = pos.z}, pos, CONST_ANI_SMALLHOLY)
end
return true
end