• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

help script item give promotion but need level 20+

i'm not familiar with othire 0.2, so this is just a pure guess
Lua:
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
 
Back
Top