• 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 AAC][TFS 1.1] Referral system

Cornex

Web Developer
Staff member
Global Moderator
Joined
Jun 15, 2008
Messages
3,444
Solutions
5
Reaction score
1,166
Location
Sweden
Hello, since many have ask for a refferal system I have created one to Znote AAC.

First off, I want to say thanks to @Evan for creating the LUA part.

So, this one only support TFS 1.1, but it should not be hard to add other TFS versions since you only have to change the lua file.
I have placed the files into a zip file, you will have to figure out where they belong, should not be hard.

If you do not want to override the whole files, if you have custom things in for example users.php, just ask me and I show what I changed.

To change what level and how much points you get, do so in the LUA refferal.lua file at this lines:
Code:
local requiredLevel = 50
local bonusPoints = 60

Remember to import the .sql file inside the zip file in your database or just run :
how to run a query?
Code:
CREATE TABLE IF NOT EXISTS `__cornex_referral` (
`id` int(11) NOT NULL,
  `referral_key` varchar(150) NOT NULL,
  `belongs_to` varchar(150) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `__cornex_referral_actions` (
`id` int(11) NOT NULL,
  `ref_key` varchar(150) NOT NULL,
  `registered_by` varchar(150) DEFAULT NULL,
  `used_by_player` varchar(35) DEFAULT NULL,
  `blocked` int(1) DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

ALTER TABLE `__cornex_referral`
ADD PRIMARY KEY (`id`);

ALTER TABLE `__cornex_referral_actions`
ADD PRIMARY KEY (`id`);

ALTER TABLE `__cornex_referral`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `__cornex_referral_actions`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

kaEVS9BiJ.png
 

Attachments

Last edited:
I just want to know what is referral system
'--'

When a player sign up and enter your referral key, once a player on that new account reach a specific level you will be rewarded with a set amount of points.
Like invite a friend bonus :)
 
Tried to add it but now i can't make characters anymore... everytime i make a new character the client fails, and this error comes up when i start again. And if i try to login my character is lvl 1 and invisible!

PLEASE HELP!
 

Attachments

what happens for example if i create a fake acc, use my real acc referral, lvl up my fake acc and get the points for my real acc, is that posible? i imagine a lot of people doing that :S
 
Back
Top