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

Znote acc

ConAn Edujawa

Member
Joined
Feb 23, 2015
Messages
457
Reaction score
17
Hello guys i have problem with znote if player get lvl 250 don't get point and when player donate from paypall don't get point :S how i can fix it :S 0.4
 
LUA:
local t, storage = {
{300, 10}
}, 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.query('UPDATE znote_accounts SET points=points+'.. v[2] ..' WHERE 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
open login.lua and rigster
LUA:
registerCreatureEvent(cid,'points')
after
LUA:
registerCreatureEvent(cid, "ReportBug")
open creaturescripts.xml and put this
LUA:
<event type="advance" name="points" event="script" value="points.lua"/>[/end]

edited this from[/I]
[URL]https://otland.net/threads/points-onadvance-level-auto-broadcast.151288/[/URL]
[QUOTE="Blorin Mage, post: 1457182, member: 150864"]{300, 10}--300 is level to recive points\10 is amount of points will be recived
[code=lua]local t, storage = {
{300, 10}
}, 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 accounts SET premium_points=premium_points+'.. v[2] ..' WHERE 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
open login.lua and rigster
LUA:
registerCreatureEvent(cid,'points')
after
LUA:
registerCreatureEvent(cid, "ReportBug")
open creaturescripts.xml and put this
LUA:
<event type="advance" name="points" event="script" value="points.lua"/>
[/I][/QUOTE]
For points to be added automatically by paypal you should watch znotes tutorial here he goes through how to add ipn so that your paypal script will be automatic
 
Back
Top