local cfg =
{
points = 100,
effect = CONST_ME_GIFT_WRAPS
}
function onAdvance(cid, skill, oldlevel, newlevel)
if(getPlayerStorageValue(cid, 1111) ~= 1 and skill == SKILL__LEVEL and newlevel >= 200) then
setPlayerStorageValue(cid, 1111, 1)
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. cfg.points .. " WHERE `name` = '" .. getAccountByName(getCreatureName(itemEx.uid)) .. "' LIMIT 1;")
doCreatureSay(cid, "Congratulations! You have received " .. cfg.points .. " premium points!", TALKTYPE_ORANGE_1, false, nil, toPosition)
doSendMagicEffect(toPosition, cfg.effect)
end
return true
end