local config = {
minLevel = 20,
message = "You have been promoted to a ",
messageType = MESSAGE_INFO_DESCR
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) >= config.minLevel then
local voc = getPlayerVocation(cid) + 4
doPlayerSetVocation(cid, voc)
doPlayerSendTextMessage(cid, config.messageType, config.message .. getVocationInfo(voc).name)
end
return true
end