_Aion_
Nothing Else
Hello, i need some script that give level for all player.
Example of script: i'm in level 20, the system will checks that if i'm in level 20, if is true, their put in level 21.
all player will give one level.
i'm making an script but have error.
Example of script: i'm in level 20, the system will checks that if i'm in level 20, if is true, their put in level 21.
all player will give one level.
i'm making an script but have error.
Code:
maximum = {
player = getPlayerGUID(cid),
lvlmax = 21,
}
local function giveLevel(cid, quant)
if getPlayerStorageValue(cid, 252526) == 0 then
else
if getPlayerLevel(cid) ~= 20 then
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..maximum.lvlmax..", `experience` = 0 WHERE `id` = "..maximum.player)
end
return true
end
end
function onThink(interval)
for i, v in pairs(getPlayersOnline()) do
giveLevel(v, maximum.lvlmax)
end
return true
end