iDramatiik
http://realia.no-ip.info/ RLMap 10.41 Free Points
I was just wondering as I've come across almost every post on otland about this and found nothing to help me so here goes my question
I would like to give free points to my players that reach X amount of level's as has been already created as a creaturescript. Here's the odd part. None of them work for me
What I Use
Znote AAC
0.4DEV 8.6 Server
I added all creaturescripts properly / login.lua code/ creaturescripts.xml code. I have changed the parts where you "UPDATE 'znote_accounts SET points=points+' etc...
When I level up a new character it doesnt display the advancement and notification of receiving points like it should, nor does it add the points to the characters account. I am really stumped here... and yes my shop system fully works for real donations etc.
Thanks in advance for any help!
That is the points.lua script that I am using.
I would like to give free points to my players that reach X amount of level's as has been already created as a creaturescript. Here's the odd part. None of them work for me
What I Use
Znote AAC
0.4DEV 8.6 Server
I added all creaturescripts properly / login.lua code/ creaturescripts.xml code. I have changed the parts where you "UPDATE 'znote_accounts SET points=points+' etc...
When I level up a new character it doesnt display the advancement and notification of receiving points like it should, nor does it add the points to the characters account. I am really stumped here... and yes my shop system fully works for real donations etc.
Thanks in advance for any help!
Code:
local t, storage = {
{150, 10},
{200, 20},
{275, 30}
}, 256
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.query('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
That is the points.lua script that I am using.
Last edited by a moderator: