function onAdvance(cid, skill, oldLevel, newLevel)
if newLevel >= 180 and getCreatureStorage(cid, 234) == -1 then
doCreatureSetStorage(cid, 234, 1)
db.executeQuery('UPDATE accounts SET premium_points=premium_points+30 WHERE id=' .. getPlayerAccountId(cid))
doBroadastMessage(getCreatureName(cid) .. ' has reached level 180 and is therefore rewarded with 30 premium points, Congratulations!')
end
if newLevel >= 200 and getCreatureStorage(cid, 234) == -1 then
doCreatureSetStorage(cid, 234, 1)
db.executeQuery('UPDATE accounts SET premium_points=premium_points+30 WHERE id=' .. getPlayerAccountId(cid))
doBroadastMessage(getCreatureName(cid) .. ' has reached level 200 and is therefore rewarded with 30 premium points, Congratulations!')
end
if newLevel >= 220 and getCreatureStorage(cid, 234) == -1 then
doCreatureSetStorage(cid, 234, 1)
db.executeQuery('UPDATE accounts SET premium_points=premium_points+30 WHERE id=' .. getPlayerAccountId(cid))
doBroadastMessage(getCreatureName(cid) .. ' has reached level 220 and is therefore rewarded with 30 premium points, Congratulations!')
end
if newLevel >= 260 and getCreatureStorage(cid, 234) == -1 then
doCreatureSetStorage(cid, 234, 1)
db.executeQuery('UPDATE accounts SET premium_points=premium_points+30 WHERE id=' .. getPlayerAccountId(cid))
doBroadastMessage(getCreatureName(cid) .. ' has reached level 260 and is therefore rewarded with 30 premium points, Congratulations!')
end
if newLevel >= 280 and getCreatureStorage(cid, 234) == -1 then
doCreatureSetStorage(cid, 234, 1)
db.executeQuery('UPDATE accounts SET premium_points=premium_points+30 WHERE id=' .. getPlayerAccountId(cid))
doBroadastMessage(getCreatureName(cid) .. ' has reached level 280 and is therefore rewarded with 30 premium points, Congratulations!')
end
if newLevel >= 300 and getCreatureStorage(cid, 234) == -1 then
doCreatureSetStorage(cid, 234, 1)
db.executeQuery('UPDATE accounts SET premium_points=premium_points+30 WHERE id=' .. getPlayerAccountId(cid))
doBroadastMessage(getCreatureName(cid) .. ' has reached level 300 and is therefore rewarded with 30 premium points, Congratulations!')
end
return true
end