• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Serial Number Get Premium Points

beenii

Well-Known Member
Joined
Jul 26, 2010
Messages
586
Solutions
1
Reaction score
58
hi people.
I would like a system where log into my database serial numbers automatically, and when the players buy "50 premium points" receive a serial number, to enter serial number on the game or site and get your points.

I'm thinking about using:

function generateSerial()
local strings = "AaBbCcDdEeFfGgHhIiJjKkLlMmOoPpQqRrSsTtUuVvWwXxYyZz"
local newSerialStr, newSerialInt = "", 0
local newSerial = ""
local query, query2, query3
repeat
for k = 1, math.random(1, 10) do
local l = math.random(1, string.len(strings))
newSerialStr = newSerialStr .. string.sub(strings, l, l)
end
newSerialInt = math.random(999999)
newSerial = newSerialStr .. "-" .. newSerialInt
query = db.getResult("select * from player_items where substring(convert(attributes using latin1) from 18) = " .. db.escapeString(newSerial))
query2 = db.getResult("select * from player_depotitems where substring(convert(attributes using latin1) from 18) = " .. db.escapeString(newSerial))
query3 = db.getResult("select * from tile_items where substring(convert(attributes using latin1) from 18) = " .. db.escapeString(newSerial))
until query:getID() == -1 and query2:getID() == -1 and query3:getID() == -1
return "!" .. newSerial
end

this function is of "Anti-Dupe - Delete all items with duplicated serial from your database."
by "Darkhaos"

with this feature, I generate the serial number with the god. on a table in my database.

I just need a function that eliminates the serial number to enter it on game or web, and pass it to another table as a number of series used.
 
Last edited:
hi people.
I would like a system where log into my database serial numbers automatically, and when the players buy "50 premium points" receive a serial number, to enter serial number on the game or site and get your points.
whats the point of this? Just extra load on your donators xD
 
prevent chargeback, because only sell serial numbers, and they sell players within the game.
have a record of each serial number sold.
etc etc :p
 
prevent chargeback, because only sell serial numbers, and they sell players within the game.
have a record of each serial number sold.
etc etc :p
you can't really prevent chargeback using this, it's the same as buying premium points... You can't actually "sell" in tibia, it HAS to be referred to as donations or, if you get big enough, cipsoft will sue you ;)
 
I know all, quiet :p
only is one is a system that I want to implement in my server. aesthetic issues
 
Back
Top