• 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!

Solved Znote acc reward level premium points

Olddies

Classicot.com
Joined
Nov 21, 2009
Messages
1,289
Solutions
12
Reaction score
422
Location
Dominican Republic 🇩🇴
hello otland i need someone help me with this problem look i have this script
Code:
local t, storage = {
{41, 10},
{42, 20},
{43, 30}
}, 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 getCreatureStorage(cid, storage) < i then
db.executeQuery('UPDATE znote_accounts SET points=points+' .. v[2] .. ' WHERE account_id=' .. getPlayerAccountId(cid))
doCreatureSetStorage(cid, storage, i)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Congratulations! You have advanced to level ' .. v[1] .. ' and you have recived '.. v[2] ..' Premium Points!')
doBroadcastMessage('Congratulations! ' .. getCreatureName(cid) .. ' Advenced To LeveL ' .. v[1] .. ' And Got ' .. v[2] .. ' Premium Points.')
end
end
return true
end
its seems to work good, no errors in console it shows the messages when level up but the points do not add, im using znote 1.5 with (OTX 2 = TFS 0.3.7+)



EDIT:
something was wrong in the account id on znote
 
Last edited:
Back
Top