Olddies
Classicot.com
hello otland i need someone help me with this problem look i have this script
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
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
EDIT:
something was wrong in the account id on znote
Last edited: