Hi,
I tried searching the internet but do not know if researched correctly and unfortunately not found.
So, today I need a chest or trunk that gives the player an item in exchange for premium points. But if he buys again the points he can click in the chest and get the same item again. Equal de shop system.
I have in mind i've seen this system in Otland but I couldn't find it.
I'm using the TFS 0.3.7 R2 by MartyX.
Im using that lib (048-ppoints.lua):
Thanks brah's.
I tried searching the internet but do not know if researched correctly and unfortunately not found.
So, today I need a chest or trunk that gives the player an item in exchange for premium points. But if he buys again the points he can click in the chest and get the same item again. Equal de shop system.
I have in mind i've seen this system in Otland but I couldn't find it.
I'm using the TFS 0.3.7 R2 by MartyX.
Im using that lib (048-ppoints.lua):
function getAccountPoints(cid)
local res = db.getResult('select `premium_points` from accounts where name = \''..getPlayerAccount(cid)..'\'')
if(res:getID() == -1) then
return false
end
local ret = res:getDataInt("premium_points")
res:free()
return tonumber(ret)
end
function doAccountAddPoints(cid, count)
return db.executeQuery("UPDATE `accounts` SET `premium_points` = '".. getAccountPoints(cid) + count .."' WHERE `name` ='"..getPlayerAccount(cid).."'")
end
function doAccountRemovePoints(cid, count)
return db.executeQuery("UPDATE `accounts` SET `premium_points` = '".. getAccountPoints(cid) - count .."' WHERE `name` ='"..getPlayerAccount(cid).."'")
end
Thanks brah's.