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

free premium points

oOIOo

HetZera.Net
Joined
Mar 30, 2010
Messages
221
Reaction score
1
hello,

i search alot but didn't find any solution for that ....

i need help with that script.
all what i need is storage for whole account not for characters

so for example:

i have 2 characters on 1 account

1 character name: oOIOo1
2 character name: oOIOo2

when i reach x level with character oOIOo1 i get my points
after that if i reached x level with character oOIOo2 i dont get any points as i got it before with character oOIOo1

sorry for bad english hope you understand me

that's the script i use

Code:
local t, storage = {
    {100, 10},
    {200, 20},
    {250, 30},
    {300, 70},
    {400, 100}
}, 259

function onAdvance(cid, skill, oldLevel, newLevel)
    if skill ~= SKILL__LEVEL then
        return true
    end
    for i = 1, #t do
        local v = t[i]
        if newLevel >= v[1] and getCreatureStorage(cid, storage) < i then
            db.executeQuery('UPDATE accounts SET premium_points=premium_points+'.. v[2] ..' WHERE id=' .. getPlayerAccountId(cid))
            doCreatureSetStorage(cid, storage, i)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'Congratulations! You have advanced to level ' .. v[1] .. ' and you have earned '.. v[2] ..' Premium Points!')
        end
    end
    return true
end
 
Back
Top