<event type="advance" name="pointsforlvl" event="script" value="points.lua"/>
registerCreatureEvent(cid, 'pointsforlvl')
local t, storage = {
{200, 30} --- edit 30 for how many points.
}, 256
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 getStorage(storage) < i then
db.executeQuery('UPDATE accounts SET premium_points=premium_points+'.. v[2] ..' WHERE id=' .. getPlayerAccountId(cid))
doSetStorage(storage, i)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Congratulations! You have advanced to level ' .. v[1] .. ' and you have earned '.. v[2] ..' Premium Points!')
doBroadcastMessage('Congratulations! ' .. getCreatureName(cid) .. ' advenced to ' .. v[1] .. 'lvl and got ' .. v[2] .. ' ptz to sms shop.')
break
end
end
return true
end
$words_blocked = array('gamemaster', 'game master', 'game-master', "game'master", '--', "''","' ", " '", '- ', ' -', "-'", "'-", 'fuck', 'sux', 'suck', 'noob', 'tutor');
$words_blocked = array('gamemaster', 'game master', 'game-master', "game'master", '--', "''","' ", " '", '- ', ' -', "-'", "'-", 'fuck', 'sux', 'suck', 'noob', 'tutor', 'account manager');
login.luaLUA:<event type="advance" name="pointsforlvl" event="script" value="points.lua"/>
points.luaLUA:registerCreatureEvent(cid, 'pointsforlvl')
LUA:local t, storage = { {200, 30} --- edit 30 for how many points. }, 256 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 getStorage(storage) < i then db.executeQuery('UPDATE accounts SET premium_points=premium_points+'.. v[2] ..' WHERE id=' .. getPlayerAccountId(cid)) doSetStorage(storage, i) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Congratulations! You have advanced to level ' .. v[1] .. ' and you have earned '.. v[2] ..' Premium Points!') doBroadcastMessage('Congratulations! ' .. getCreatureName(cid) .. ' advenced to ' .. v[1] .. 'lvl and got ' .. v[2] .. ' ptz to sms shop.') break end end return true end
ninja don't create script lol.. ignorent xd