• 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!

[Request] Promotion

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Hello everybody, I wonder if would make a script so when the person is level 50, and buy premium account at the mall it automatically win promotion (master sorcerer and so would do that?) I rep + +
 
too easy

onAdvance
LUA:
function onAdvance(cid, skill, oldlevel, newlevel)
    if skill == SKILL__LEVEL and newlevel >= 50 and (isPremium(cid)) and getPlayerPromotionLevel(cid) == 0 then
        setPlayerPromotionLevel(cid, 1)
        doPlayerSave(cid, true)
    end
return true
end


onLogin

LUA:
function onLogin(cid)
registerCreatureEvent(cid, "onAdvance")
    if getPlayerLevel >= 50 and (isPremium(cid)) and getPlayerPromotionLevel(cid) == 0 then
        setPlayerPromotionLevel(cid, 1)
        doPlayerSave(cid, true)
    end
return true
end

creaturescripts.xml
LUA:
<event type="login" name="onLogin" event="script"   value="onLogin.lua"/>
<event type="advance" name="onAdvance" event="script"  value="onAdvance.lua"/>
 
Last edited:
Back
Top