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

Advance Points...

for something easier and only done once depending on if u want it only for one level or multiple, try:

Lua:
function onAdvance(cid, skill, oldlevel, newlevel)
local config = {
effect = CONST_ME_MAGIC_BLUE,
points = 100,
level = 100,
storage = 9999
}
      if getPlayerStorageValue(cid, config.storage) ~= 1 and skill == SKILL__LEVEL and newlevel >= config.level then
      db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. config.points .. " WHERE `name` = '" .. getAccountByName(getCreatureName(itemEx.uid)) .. "' LIMIT 1;")
    doCreatureSay(cid, "You have received " .. config.points .. " premium points!", TALKTYPE_ORANGE_1, false, nil, toPosition)
    doSendMagicEffect(toPosition, config.effect)
    doRemoveItem(item.uid, 1)
    return true
    end
end
 
Back
Top