Odp: Prosba o skrypt
[LUA]function onAdvance(cid, type, oldlevel, newlevel)
local storage_global = 5101
local storage_player = 5101
local manys = 100
if not (oldlevel ~= newlevel and type == SKILL__LEVEL) then
return true
end
if not (newlevel >= 150 and getGlobalStorageValue(storage_global) <= manys and getPlayerStorageValue(cid, storage_player) == -1) then
return true
end
if getStorage(storage_global) == -1 then
setPlayerStorageValue(cid, storage_player, 0)
end
db.executeQuery('UPDATE `accounts` SET `premium_points` = `premium_points` + 3 WHERE `id` = '.. getPlayerAccountId(cid) ..';')
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You got 3 premium points for reached 150 lvl.")
doBroadcastMessage("Player "..getPlayerName(cid).." has got 3 premium points for reached 150 lvl. Was only " ..manys.. " reward for adewence 150 level" )
setGlobalStorageValue(cid, storage_global, getStorage(storage_global)+1)
setPlayerStorageValue(cid, storage_player, 1)
return true
end [/LUA]
Mam ogolnie taki skrypt wszystko mi ladnie chodzi ale chcialem zeby tylko PIERWSZE 100 KONT moglo dostac te pkt za wbica lvla, a tak to mozna sobie robic pkt w nieskonczonosc. Prosze o pomoc