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

Lua Receiving cash on a certain level

pwner123

New Member
Joined
Jul 1, 2009
Messages
211
Reaction score
1
Hello, I need help making a script that when you reach lvl 30, you receive 30k. Could anyone possibly make this for me please? I tried searching and was unable to find a script. Thanks!
 
Register it in login.lua and add in creaturescripts.xml

Code:
local t = {
    39001, {
    [30] = {2160, 3, "Congratulations, you have achieved level 30! You have been awarded with 3 crystal coints!", 1}
    }
}
function onAdvance(cid, skill, oldlevel, newlevel)
    if skill == SKILL__LEVEL then
        for level, v in pairs(t[2]) do
            if oldlevel < level and getPlayerLevel(cid) >= level and getPlayerStorageValue(cid, t[1]) < v[4] then
                doPlayerAddItem(cid, v[1], v[2])
                doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, v[3])
                setPlayerStorageValue(cid, t[1], v[4])
            end
        end
    end
    doPlayerSave(cid, true) 
    return true
end
 
Back
Top