• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Help] Convert Script To Frag Point

Bloody-War

New Member
Joined
Feb 9, 2016
Messages
88
Reaction score
1
Hello Guys i wanna Convert this script to frag point script can some one help me to convert it?
thank you.

local t, storage = {
-- level -- amount points (delete this line)..
{250, 5},
{300, 10},
{400, 10},
{500, 15},
{600, 25}
}, 259
function onAdvance(cid, skill, oldLevel, newLevel)
if skill ~= SKILL__LEVEL then
return true
end
for i = 1, #t do
local v = t
if newLevel >= v[1] and getCreatureStorage(cid, storage) < i then
db.executeQuery('UPDATE accounts SET premium_points=premium_points+'.. v[2] ..' WHERE id=' .. getPlayerAccountId(cid))
doCreatureSetStorage(cid, storage, i)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'Congratulations! You have advanced to level ' .. v[1] .. ' and you have earned '.. v[2] ..' Premium Points!')
end
end
return true
end
 
Do we need fetch frags from database, or do you store it in a unique storage?
 
Back
Top