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