local t = { --- config
tovoc = 4 --- what vocation the user will get
}
function onUse(cid,item,fromPosition,toPosition,itemEx)
local v = getThingPos(cid)
if getPlayerVocation(cid) ~= 4 then
doPlayerSetVocation(cid,t.tovoc)
doPlayerSendTextMessage(cid,20,'Your vocation has changed to '.. getPlayerVocationName(cid)..'.')
doSendMagicEffect(v,12)
else
doPlayerSendTextMessage(cid,20,'You are a '.. getPlayerVocationName(cid)..' already!')
doSendMagicEffect(v,2)
end
return true
end