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

Solved Guild Wars (On site)

For What??

- - - Updated - - -

Can u change??

Lua:
<?php
	// Available options: TFS_02, TFS_03
	// TFS 0.2 = TFS_02
	// TFS 0.3 = TFS_03 (If ur using 0.3.6, set $config['salt'] to false)!
	// TFS 0.4 = TFS_03
	$config['TFSVersion'] = 'TFS_02';
	
	$config['site_title'] = 'Evolera OT';
	$config['site_title_context'] = '';
	
	// ------------------------ \\
	// MYSQL CONNECTION DETAILS \\
	// ------------------------ \\
	
	// phpmyadmin username for OT server: (DONT USE "root" if ur hosting to public.).
	$config['sqlUser'] = 'username';
	
	// phpmyadmin password for OT server:
	$config['sqlPassword'] = 'stefan123';
	
	// The database name to connect to. (This is usually same as username).
	$config['sqlDatabase'] = 'otland';
	
	// Hostname is usually localhost or 127.0.0.1.
	$config['sqlHost'] = 'localhost';
	
	// ------------------- \\
	// CUSTOM SERVER STUFF \\
	// ------------------- \\
	
	// Vocation ids and names.
	$config['vocations'] = array(
		0 => 'No vocation',
		1 => 'Sorcerer',
		2 => 'Druid',
		3 => 'Paladin',
		4 => 'Knight',
		5 => 'Master Sorcerer',
		6 => 'Elder Druid',
		7 => 'Royal Paladin',
		8 => 'Elite Knight',
	);
	
	// Town ids and names: (In RME map editor, open map, click CTRL + T to view towns, their names and their IDs. 
	// townID => 'townName'
	$config['towns'] = array(
		1 => 'Town 1',
		2 => 'Town 2',
		3 => 'Town 3',
	);
	
	// Leave on black square in map and player should get teleported to their selected town.
	// If chars get buggy set this position to a beginner location to force players there.
	$config['default_pos'] = array(
		'x' => 1000,
		'y' => 1000,
		'z' => 7,
	);
	
	$config['war_status'] = array(
		0 => 'Pending..',
		1 => 'Accepted',
		2 => 'Rejected',
		3 => 'Cancelled',
		4 => '???',
		5 => 'Ended',
	);
	
	/* -- SUB PAGES -- 
		Some custom layouts/templates have custom pages, they can use
		this sub page functionality for that.
	*/
	$config['allowSubPages'] = true;
	
	// ---------------- \\
	// Create Character \\
	// ---------------- \\
	
	// Max characters on each account:
	$config['max_characters'] = 7;
	
	// Available character vocation users can create.
	$config['available_vocations'] = array(1, 2, 3, 4);
	
	// Available towns (specify town ids, etc: (0, 1, 2); to display 3 town options (town id 0, 1 and 2).
	$config['available_towns'] = array(1);
	
	$config['level'] = 8;
	$config['health'] = 185;
	$config['mana'] = 35;
	$config['cap'] = 435;
	$config['soul'] = 5;
	
	$config['maleOutfitId'] = 128;
	$config['femaleOutfitId'] = 138;
	// $config['']
	
	// No vocation info (if user select vocation id 0, we force thees configurations on him
	$config['nvlevel'] = 1;
	$config['nvHealth'] = 150;
	$config['nvMana'] = 0;
	$config['nvCap'] = 400;
	$config['nvSoul'] = 0;
	
	$config['nvForceTown'] = 0; // Force a town to no vocation even though he selected something else? 0 = no, 1 = yes.
	$config['nvTown'] = 0; // Town id to force no vocations to get to, if nvForceTown is 1.
	
	// Minimum allowed character name letters. Etc 4 letters: "Kåre".
	$config['minL'] = 4;
	// Maximum allowed character name letters. Etc 20 letters: "Bobkåreolesofiesberg"
	$config['maxL'] = 20;
	
	// Maximum allowed character name words. Etc 2 words = "Bob Kåre", 3 words: "Bob Arne Kåre" as max char name words.
	$config['maxW'] = 2;
	
	// -------------- \\
	// WEBSITE STUFF  \\
	// -------------- \\
	$config['validate_IP'] = true; // Only allow legal IP addresses to register and create character.
	$config['salt'] = true; // Some noob 0.3.6 servers don't support salt.
	
	// Restricted names
	$config['invalidNameTags'] = array("god", "gm", "cm", "gamemaster", "hoster", "admin", "admim", "adm", "owner", "staff");
	
	// Level requirement to create guild? (Just set it to 1 to allow all levels).
	$config['create_guild_level'] = 100;
	
	// Change Gender can be purchased in shop, or perhaps you want to allow everyone to change gender for free?
	$config['free_sex_change'] = false;
	
	// Do you need to have premium account to create a guild?
	$config['guild_require_premium'] = false;
	
	$config['guildwar_enabled'] = true;
	
	// Use htaccess rewrite? (basically this makes website.com/username work instead of website.com/characterprofile.php?name=username
	// Linux users needs to enable mod_rewrite php extention to make it work properly, so set it to false if your lost and using Linux.
	$config['htwrite'] = true;
	
	// What client version and server port are you using on this OT?
	// Used for the Downloads page.
	$config['client'] = 960; // 954 = tibia 9.54
	
	 // Download link to client. Recommended:
	 // Select download link from remere map editor website!
	 // See list of clients: http://remeresmapeditor.com/marklar.php?clients
	$config['client_download'] = 'http://remeresmapeditor.com/rmedl.php?file=tibia'. $config['client'] .'.exe';
	
	$config['port'] = 7171; // Port number to connect to your OT.
	
	// How often do you want highscores to update?
	$config['cache_lifespan'] = 60 * 15; // 15 minutes.
	
	// WARNING! Account names written here will have admin access to web page!
	$config['page_admin_access'] = array(
		'',
		'',
	);
	
	// Guilds and guild war pages will do lots of queries on bigger databases.
	// So its recommended to require login to view them, but you can disable this
	// If you don't have any problems with load.
	$config['require_login'] = array(
		'guilds' => false,
		'guildwars' => false,
	);
	
	// IMPORTANT! Write a character name(that exist) that will represent website bans!
	// Or remember to create character "God Website" character exist.
	// If you don't do this, bann from admin panel won't work properly.
	$config['website_char'] = 'God Website';
	
	// date format
	$config['date'] = "d F Y (H:i)";
	
	// --------------- \\
	// ADVANCED STUFF  \\
	// --------------- \\
	
	// Don't touch this unless you know what you are doing. (modifying this(key value) also requires modifications in OT files /XML/commands.xml).
	$config['ingame_positions'] = array(
		1 => 'Player',
		2 => 'Tutor',
		3 => 'Gamemaster',
		4 => 'Community Manager',
		5 => 'God',
	);
	
	// Enable OS advanced feautures? false = no, true = yes
	$config['os_enabled'] = false;
	
	// What kind of computer are you hosting this website on?
	// Available options: LINUX or WINDOWS
	$config['os'] = 'WINDOWS';
	
	// Measure how much players are lagging in-game. (Not completed). 
	$config['ping'] = false;
	
	// BAN STUFF - Don't touch this unless you know what you are doing.
	// You can order the lines the way you want, from top to bot, in which order you
	// wish for them to be displayed in admin panel. Just make sure key[#] represent your describtion.
	$config['ban_type'] = array(
		4 => 'NOTATION_ACCOUNT',
		2 => 'NAMELOCK_PLAYER',
		3 => 'BAN_ACCOUNT',
		5 => 'DELETE_ACCOUNT',
		1 => 'BAN_IPADDRESS',
	);
	
	// BAN STUFF - Don't touch this unless you know what you are doing.
	// You can order the lines the way you want, from top to bot, in which order you
	// wish for them to be displayed in admin panel. Just make sure key[#] represent your describtion.
	$config['ban_action'] = array(
		0 => 'Notation',
		1 => 'Name Report',
		2 => 'Banishment',
		3 => 'Name Report + Banishment',
		4 => 'Banishment + Final Warning',
		5 => 'NR + Ban + FW',
		6 => 'Statement Report',
	);
	
	// Ban reasons, for changes beside default values to work with client,
	// you also need to edit sources (tools.cpp line 1096)
	$config['ban_reason'] = array(
		0 => 'Offensive Name',
		1 => 'Invalid Name Format',
		2 => 'Unsuitable Name',
		3 => 'Name Inciting Rule Violation',
		4 => 'Offensive Statement',
		5 => 'Spamming',
		6 => 'Illegal Advertising',
		7 => 'Off-Topic Public Statement',
		8 => 'Non-English Public Statement',
		9 => 'Inciting Rule Violation',
		10 => 'Bug Abuse',
		11 => 'Game Weakness Abuse',
		12 => 'Using Unofficial Software to Play',
		13 => 'Hacking',
		14 => 'Multi-Clienting',
		15 => 'Account Trading or Sharing',
		16 => 'Threatening Gamemaster',
		17 => 'Pretending to Have Influence on Rule Enforcement',
		18 => 'False Report to Gamemaster',
		19 => 'Destructive Behaviour',
		20 => 'Excessive Unjustified Player Killing',
		21 => 'Spoiling Auction',
	);
	
	// BAN STUFF
	// Ban time duration selection in admin panel
	// seconds => describtion
	$config['ban_time'] = array(
		3600 => '1 hour',
		21600 => '6 hours',
		43200 => '12 hours',
		86400 => '1 day',
		259200 => '3 days',
		604800 => '1 week',
		1209600 => '2 weeks',
		2592000 => '1 month',
	);
	
	
		// --------------- \\
		// SECURITY STUFF  \\
		// --------------- \\
	$config['use_token'] = false;
	
	/*	Store visitor data
		Store visitor data in the database, logging every IP visitng site, 
		and how many times they have visited the site. And sometimes what
		they do on the site.
		
		This helps to prevent POST SPAM (like register 1000 accounts in a few seconds)
		and other things which can stress and slow down the server.
		
		The only downside is that database can get pretty fed up with much IP data
		if table never gets flushed once in a while. So I highly recommend you
		to configure flush_ip_logs if IPs are logged.
	*/
	
	$config['log_ip'] = true;
	
	// Flush IP logs each configured seconds, 60 * 15 = 15 minutes.
	// Set to false to entirely disable ip log flush. 
	// It is important to flush for optimal performance.
	$config['flush_ip_logs'] = 59 * 27;
	
	/*	IP SECURTY REQUIRE: $config['log_ip'] = true;
		Configure how tight this security shall be.
		Etc: You can max click on anything/refresh page
		[max activity] 15 times, within time period 10
		seconds. During time_period, you can also only
		register 1 account and 1 character.
	*/
	$config['ip_security'] = array(
		'time_period' => 100, // In seconds
		'max_activity' => 100, // page clicks/visits
		'max_post' => 100, // register, create, highscore, character search such actions
		'max_account' => 1, // register
		'max_character' => 5, // create char
	);
	
	//////////////
	/// PAYPAL ///
	//////////////

	// Write your paypal address here, and what currency you want to recieve money in.
	$config['paypal'] = array(
		'enabled' => true,
		'email' => 'Change_Paypal_mail_in_config.php', // Example: [email protected]
		'currency' => 'EUR',
		'points_per_currency' => 10, // 1 currency = ? points? [ONLY used to calculate bonuses]
		'success' => "http://".$_SERVER['HTTP_HOST']."/success.php",
		'failed' => "http://".$_SERVER['HTTP_HOST']."/failed.php",
		'ipn' => "http://".$_SERVER['HTTP_HOST']."/ipn.php",
	);

	// Configure the "buy now" buttons prices, first write price, then how many points you get.
	// Giving some bonus points for higher donations will tempt users to donate more.
	$config['paypal_prices'] = array(
	//	price => points,
		5 => 45, // -10% bonus
		10 => 100, // 0% bonus
		15 => 165, // +10% bonus
		20 => 240, // +20% bonus
		25 => 325, // +30% bonus
		30 => 420, // +40% bonus
	);
	
	//////////////////
	/// PAYGOL SMS ///
	//////////////////
	// !!! Paygol takes 60%~ of the money, and send aprox 40% to your paypal.
	// You can configure paygol to send each month, then they will send money to you 1 month after recieving 50+ eur.
	$config['paygol'] = array(
		'enabled' => true,
		'serviceID' => 40339,// Service ID from paygol.com
		'currency' => 'EUR',
		'price' => 5,
		'points' => 25, // Remember to write same details in paygol.com!
		'name' => '25 points',
		'returnURL' => "http://".$_SERVER['HTTP_HOST']."/success.php",
		'cancelURL' => "http://".$_SERVER['HTTP_HOST']."/failed.php",
		'ipnURL' => "http://".$_SERVER['HTTP_HOST']."/paygol_ipn.php",
	);
	
	////////////
	/// SHOP ///
	////////////
	// If useDB is set to true, player can shop in-game as well using Znote LUA shop system plugin.
	$config['shop'] = array(
		'enabled' => true,
		'useDB' => false, // Fetch offers from database, or the below config array
		'showImage' => true,
		'imageServer' => 'items.znote.eu',
	);

	// If useDB is false, this array list will be used for shop offers.
	$config['shop_offers'] = array(
		// offer 1
		1 => array(
			'type' => 1, // 1 = item id offers, 2 = premium days [itemid ignored], 3 = sex change[itemid & count ignored], 4+ = custom.
			'itemid' => 2159, // item to get in-game
			'count' => 20, //if type is 2, this represents premium days
			'describtion' => "VIP Coint", // Describtion shown on website
			'points' => 30, // How many points this offer costs
		),
		
		// offer 2
		2 => array(
			'type' => 1,
			'itemid' => 2159,
			'count' => 50,
			'describtion' => "VIP Coint",
			'points' => 60,
		),
		
		// offer 3
		3 => array(
			'type' => 1,
			'itemid' => 2159, // Item to display on page
			'count' => 100,
			'describtion' => "VIP Coint",
			'points' => 80,
		),
		
		// offer 4
		4 => array(
			'type' => 1,
			'itemid' => 2159,
			'count' => 120,
			'describtion' => "Vip Coint",
			'points' => 100,
		),
		5 => array(
			'type' => 1,
			'itemid' => 2159,
			'count' => 200,
			'describtion' => "Vip Coint",
			'points' => 200,
		),
	);
?>
 
Lua:
<?php
	// Available options: TFS_02, TFS_03
	// TFS 0.2 = TFS_02
	// TFS 0.3 = TFS_03 (If ur using 0.3.6, set $config['salt'] to false)!
	// TFS 0.4 = TFS_03
	$config['TFSVersion'] = 'TFS_03';
 
	$config['site_title'] = 'Evolera OT';
	$config['site_title_context'] = '';
 
	// ------------------------ \\
	// MYSQL CONNECTION DETAILS \\
	// ------------------------ \\
 
	// phpmyadmin username for OT server: (DONT USE "root" if ur hosting to public.).
	$config['sqlUser'] = 'username';
 
	// phpmyadmin password for OT server:
	$config['sqlPassword'] = 'stefan123';
 
	// The database name to connect to. (This is usually same as username).
	$config['sqlDatabase'] = 'otland';
 
	// Hostname is usually localhost or 127.0.0.1.
	$config['sqlHost'] = 'localhost';
 
	// ------------------- \\
	// CUSTOM SERVER STUFF \\
	// ------------------- \\
 
	// Vocation ids and names.
	$config['vocations'] = array(
		0 => 'No vocation',
		1 => 'Sorcerer',
		2 => 'Druid',
		3 => 'Paladin',
		4 => 'Knight',
		5 => 'Master Sorcerer',
		6 => 'Elder Druid',
		7 => 'Royal Paladin',
		8 => 'Elite Knight',
	);
 
	// Town ids and names: (In RME map editor, open map, click CTRL + T to view towns, their names and their IDs. 
	// townID => 'townName'
	$config['towns'] = array(
		1 => 'Town 1',
		2 => 'Town 2',
		3 => 'Town 3',
	);
 
	// Leave on black square in map and player should get teleported to their selected town.
	// If chars get buggy set this position to a beginner location to force players there.
	$config['default_pos'] = array(
		'x' => 1000,
		'y' => 1000,
		'z' => 7,
	);
 
	$config['war_status'] = array(
		0 => 'Pending..',
		1 => 'Accepted',
		2 => 'Rejected',
		3 => 'Cancelled',
		4 => '???',
		5 => 'Ended',
	);
 
	/* -- SUB PAGES -- 
		Some custom layouts/templates have custom pages, they can use
		this sub page functionality for that.
	*/
	$config['allowSubPages'] = true;
 
	// ---------------- \\
	// Create Character \\
	// ---------------- \\
 
	// Max characters on each account:
	$config['max_characters'] = 7;
 
	// Available character vocation users can create.
	$config['available_vocations'] = array(1, 2, 3, 4);
 
	// Available towns (specify town ids, etc: (0, 1, 2); to display 3 town options (town id 0, 1 and 2).
	$config['available_towns'] = array(1);
 
	$config['level'] = 8;
	$config['health'] = 185;
	$config['mana'] = 35;
	$config['cap'] = 435;
	$config['soul'] = 5;
 
	$config['maleOutfitId'] = 128;
	$config['femaleOutfitId'] = 138;
	// $config['']
 
	// No vocation info (if user select vocation id 0, we force thees configurations on him
	$config['nvlevel'] = 1;
	$config['nvHealth'] = 150;
	$config['nvMana'] = 0;
	$config['nvCap'] = 400;
	$config['nvSoul'] = 0;
 
	$config['nvForceTown'] = 0; // Force a town to no vocation even though he selected something else? 0 = no, 1 = yes.
	$config['nvTown'] = 0; // Town id to force no vocations to get to, if nvForceTown is 1.
 
	// Minimum allowed character name letters. Etc 4 letters: "Kåre".
	$config['minL'] = 4;
	// Maximum allowed character name letters. Etc 20 letters: "Bobkåreolesofiesberg"
	$config['maxL'] = 20;
 
	// Maximum allowed character name words. Etc 2 words = "Bob Kåre", 3 words: "Bob Arne Kåre" as max char name words.
	$config['maxW'] = 2;
 
	// -------------- \\
	// WEBSITE STUFF  \\
	// -------------- \\
	$config['validate_IP'] = true; // Only allow legal IP addresses to register and create character.
	$config['salt'] = true; // Some noob 0.3.6 servers don't support salt.
 
	// Restricted names
	$config['invalidNameTags'] = array("god", "gm", "cm", "gamemaster", "hoster", "admin", "admim", "adm", "owner", "staff");
 
	// Level requirement to create guild? (Just set it to 1 to allow all levels).
	$config['create_guild_level'] = 100;
 
	// Change Gender can be purchased in shop, or perhaps you want to allow everyone to change gender for free?
	$config['free_sex_change'] = false;
 
	// Do you need to have premium account to create a guild?
	$config['guild_require_premium'] = false;
 
	$config['guildwar_enabled'] = true;
 
	// Use htaccess rewrite? (basically this makes website.com/username work instead of website.com/characterprofile.php?name=username
	// Linux users needs to enable mod_rewrite php extention to make it work properly, so set it to false if your lost and using Linux.
	$config['htwrite'] = true;
 
	// What client version and server port are you using on this OT?
	// Used for the Downloads page.
	$config['client'] = 960; // 954 = tibia 9.54
 
	 // Download link to client. Recommended:
	 // Select download link from remere map editor website!
	 // See list of clients: [url=http://remeresmapeditor.com/marklar.php?clients]Download - Remere's Map Editor (RME) - An Open Source Map Editor for Open Tibia[/url]
	$config['client_download'] = 'http://remeresmapeditor.com/rmedl.php?file=tibia'. $config['client'] .'.exe';
 
	$config['port'] = 7171; // Port number to connect to your OT.
 
	// How often do you want highscores to update?
	$config['cache_lifespan'] = 60 * 15; // 15 minutes.
 
	// WARNING! Account names written here will have admin access to web page!
	$config['page_admin_access'] = array(
		'',
		'',
	);
 
	// Guilds and guild war pages will do lots of queries on bigger databases.
	// So its recommended to require login to view them, but you can disable this
	// If you don't have any problems with load.
	$config['require_login'] = array(
		'guilds' => false,
		'guildwars' => false,
	);
 
	// IMPORTANT! Write a character name(that exist) that will represent website bans!
	// Or remember to create character "God Website" character exist.
	// If you don't do this, bann from admin panel won't work properly.
	$config['website_char'] = 'God Website';
 
	// date format
	$config['date'] = "d F Y (H:i)";
 
	// --------------- \\
	// ADVANCED STUFF  \\
	// --------------- \\
 
	// Don't touch this unless you know what you are doing. (modifying this(key value) also requires modifications in OT files /XML/commands.xml).
	$config['ingame_positions'] = array(
		1 => 'Player',
		2 => 'Tutor',
		3 => 'Gamemaster',
		4 => 'Community Manager',
		5 => 'God',
	);
 
	// Enable OS advanced feautures? false = no, true = yes
	$config['os_enabled'] = false;
 
	// What kind of computer are you hosting this website on?
	// Available options: LINUX or WINDOWS
	$config['os'] = 'WINDOWS';
 
	// Measure how much players are lagging in-game. (Not completed). 
	$config['ping'] = false;
 
	// BAN STUFF - Don't touch this unless you know what you are doing.
	// You can order the lines the way you want, from top to bot, in which order you
	// wish for them to be displayed in admin panel. Just make sure key[#] represent your describtion.
	$config['ban_type'] = array(
		4 => 'NOTATION_ACCOUNT',
		2 => 'NAMELOCK_PLAYER',
		3 => 'BAN_ACCOUNT',
		5 => 'DELETE_ACCOUNT',
		1 => 'BAN_IPADDRESS',
	);
 
	// BAN STUFF - Don't touch this unless you know what you are doing.
	// You can order the lines the way you want, from top to bot, in which order you
	// wish for them to be displayed in admin panel. Just make sure key[#] represent your describtion.
	$config['ban_action'] = array(
		0 => 'Notation',
		1 => 'Name Report',
		2 => 'Banishment',
		3 => 'Name Report + Banishment',
		4 => 'Banishment + Final Warning',
		5 => 'NR + Ban + FW',
		6 => 'Statement Report',
	);
 
	// Ban reasons, for changes beside default values to work with client,
	// you also need to edit sources (tools.cpp line 1096)
	$config['ban_reason'] = array(
		0 => 'Offensive Name',
		1 => 'Invalid Name Format',
		2 => 'Unsuitable Name',
		3 => 'Name Inciting Rule Violation',
		4 => 'Offensive Statement',
		5 => 'Spamming',
		6 => 'Illegal Advertising',
		7 => 'Off-Topic Public Statement',
		8 => 'Non-English Public Statement',
		9 => 'Inciting Rule Violation',
		10 => 'Bug Abuse',
		11 => 'Game Weakness Abuse',
		12 => 'Using Unofficial Software to Play',
		13 => 'Hacking',
		14 => 'Multi-Clienting',
		15 => 'Account Trading or Sharing',
		16 => 'Threatening Gamemaster',
		17 => 'Pretending to Have Influence on Rule Enforcement',
		18 => 'False Report to Gamemaster',
		19 => 'Destructive Behaviour',
		20 => 'Excessive Unjustified Player Killing',
		21 => 'Spoiling Auction',
	);
 
	// BAN STUFF
	// Ban time duration selection in admin panel
	// seconds => describtion
	$config['ban_time'] = array(
		3600 => '1 hour',
		21600 => '6 hours',
		43200 => '12 hours',
		86400 => '1 day',
		259200 => '3 days',
		604800 => '1 week',
		1209600 => '2 weeks',
		2592000 => '1 month',
	);
 
 
		// --------------- \\
		// SECURITY STUFF  \\
		// --------------- \\
	$config['use_token'] = false;
 
	/*	Store visitor data
		Store visitor data in the database, logging every IP visitng site, 
		and how many times they have visited the site. And sometimes what
		they do on the site.
 
		This helps to prevent POST SPAM (like register 1000 accounts in a few seconds)
		and other things which can stress and slow down the server.
 
		The only downside is that database can get pretty fed up with much IP data
		if table never gets flushed once in a while. So I highly recommend you
		to configure flush_ip_logs if IPs are logged.
	*/
 
	$config['log_ip'] = true;
 
	// Flush IP logs each configured seconds, 60 * 15 = 15 minutes.
	// Set to false to entirely disable ip log flush. 
	// It is important to flush for optimal performance.
	$config['flush_ip_logs'] = 59 * 27;
 
	/*	IP SECURTY REQUIRE: $config['log_ip'] = true;
		Configure how tight this security shall be.
		Etc: You can max click on anything/refresh page
		[max activity] 15 times, within time period 10
		seconds. During time_period, you can also only
		register 1 account and 1 character.
	*/
	$config['ip_security'] = array(
		'time_period' => 100, // In seconds
		'max_activity' => 100, // page clicks/visits
		'max_post' => 100, // register, create, highscore, character search such actions
		'max_account' => 1, // register
		'max_character' => 5, // create char
	);
 
	//////////////
	/// PAYPAL ///
	//////////////
 
	// Write your paypal address here, and what currency you want to recieve money in.
	$config['paypal'] = array(
		'enabled' => true,
		'email' => 'Change_Paypal_mail_in_config.php', // Example: [email][email protected][/email]
		'currency' => 'EUR',
		'points_per_currency' => 10, // 1 currency = ? points? [ONLY used to calculate bonuses]
		'success' => "http://".$_SERVER['HTTP_HOST']."/success.php",
		'failed' => "http://".$_SERVER['HTTP_HOST']."/failed.php",
		'ipn' => "http://".$_SERVER['HTTP_HOST']."/ipn.php",
	);
 
	// Configure the "buy now" buttons prices, first write price, then how many points you get.
	// Giving some bonus points for higher donations will tempt users to donate more.
	$config['paypal_prices'] = array(
	//	price => points,
		5 => 45, // -10% bonus
		10 => 100, // 0% bonus
		15 => 165, // +10% bonus
		20 => 240, // +20% bonus
		25 => 325, // +30% bonus
		30 => 420, // +40% bonus
	);
 
	//////////////////
	/// PAYGOL SMS ///
	//////////////////
	// !!! Paygol takes 60%~ of the money, and send aprox 40% to your paypal.
	// You can configure paygol to send each month, then they will send money to you 1 month after recieving 50+ eur.
	$config['paygol'] = array(
		'enabled' => true,
		'serviceID' => 40339,// Service ID from paygol.com
		'currency' => 'EUR',
		'price' => 5,
		'points' => 25, // Remember to write same details in paygol.com!
		'name' => '25 points',
		'returnURL' => "http://".$_SERVER['HTTP_HOST']."/success.php",
		'cancelURL' => "http://".$_SERVER['HTTP_HOST']."/failed.php",
		'ipnURL' => "http://".$_SERVER['HTTP_HOST']."/paygol_ipn.php",
	);
 
	////////////
	/// SHOP ///
	////////////
	// If useDB is set to true, player can shop in-game as well using Znote LUA shop system plugin.
	$config['shop'] = array(
		'enabled' => true,
		'useDB' => false, // Fetch offers from database, or the below config array
		'showImage' => true,
		'imageServer' => 'items.znote.eu',
	);
 
	// If useDB is false, this array list will be used for shop offers.
	$config['shop_offers'] = array(
		// offer 1
		1 => array(
			'type' => 1, // 1 = item id offers, 2 = premium days [itemid ignored], 3 = sex change[itemid & count ignored], 4+ = custom.
			'itemid' => 2159, // item to get in-game
			'count' => 20, //if type is 2, this represents premium days
			'describtion' => "VIP Coint", // Describtion shown on website
			'points' => 30, // How many points this offer costs
		),
 
		// offer 2
		2 => array(
			'type' => 1,
			'itemid' => 2159,
			'count' => 50,
			'describtion' => "VIP Coint",
			'points' => 60,
		),
 
		// offer 3
		3 => array(
			'type' => 1,
			'itemid' => 2159, // Item to display on page
			'count' => 100,
			'describtion' => "VIP Coint",
			'points' => 80,
		),
 
		// offer 4
		4 => array(
			'type' => 1,
			'itemid' => 2159,
			'count' => 120,
			'describtion' => "Vip Coint",
			'points' => 100,
		),
		5 => array(
			'type' => 1,
			'itemid' => 2159,
			'count' => 200,
			'describtion' => "Vip Coint",
			'points' => 200,
		),
	);
?>


try this.
 
nop..
I think to Znote AAc is Best AAC on otland...
I heard that it will come out later that the new AAC

I like gesior 2012, (More security then ever) and also modernAAC (More advanced, it is for us pro players! ) :)

Znote AAC are good, but it will be much better in time to time
 
But look
If i Start using Gesior AAC i well need Top Guilds and Top Frags..
I don't know how to set up that?Do u know _CorneX_

- - - Updated - - -

Problem!!
https://i.imgur.com/YswKqLe.png
database_mysql.php
Lua:
<?php
if(!defined('INITIALIZED'))
	exit;

class Database_MySQL extends Database
{
	public function __construct()
	{
		$this->setDatabaseDriver(self::DB_MYSQL);
	}

	public function connect()
	{
		try
		{
			parent::__construct('mysql:host=' . $this->getDatabaseHost() . ';port=' . $this->getDatabasePort() . ';dbname=' . $this->getDatabaseName(), $this->getDatabaseUsername(), $this->getDatabasePassword());
			$this->setConnected(true);
			return true;
		}
		catch(PDOException $error)
		{
			new Error_Critic('', 'CANNOT CONNECT TO DATABASE: ' . $error->getMessage());
			return false;
		}
	}

	public function fieldName($name)
	{
		if(strspn($name, "1234567890qwertyuiopasdfghjklzxcvbnm_") != strlen($name))
			new Error_Critic('', 'Invalid field name format.');

		return '`' . $name . '`';
	}

	public function tableName($name)
	{
		if(strspn($name, "1234567890qwertyuiopasdfghjklzxcvbnm_") != strlen($name))
			new Error_Critic('', 'Invalid table name format.');

		return '`' . $name . '`';
	}
}
install.php

Lua:
<?PHP
define('INITIALIZED', true);
define('ONLY_PAGE', false);
if(!file_exists('install.txt'))
{
	echo('AAC installation is disabled. To enable it make file <b>install.php</b> in main AAC directory and put there your IP.');
	exit;
}
$installIP = trim(file_get_contents('install.txt'));
if($installIP != $_SERVER['REMOTE_ADDR'])
{
	echo('In file <b>install.txt</b> must be your IP!<br />In file is:<br /><b>' . $installIP . '</b><br />Your IP is:<br /><b>' . $_SERVER['REMOTE_ADDR'] . '</b>');
	exit;
}

$time_start = microtime(true);
session_start();

function autoLoadClass($className)
{
	if(!class_exists($className))
		if(file_exists('./classes/' . strtolower($className) . '.php'))
			include_once('./classes/' . strtolower($className) . '.php');
		else
			new Error_Critic('#E-7', 'Cannot load class <b>' . $className . '</b>, file <b>./classes/class.' . strtolower($className) . '.php</b> doesn\'t exist');
}
spl_autoload_register('autoLoadClass');

//load acc. maker config to $config['site']
$config = array();
include('./config/config.php');
if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc())
{
    $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
    while(list($key, $val) = each($process))
	{
        foreach ($val as $k => $v)
		{
            unset($process[$key][$k]);
            if(is_array($v))
			{
                $process[$key][stripslashes($k)] = $v;
                $process[] = &$process[$key][stripslashes($k)];
            }
			else
                $process[$key][stripslashes($k)] = stripslashes($v);
        }
    }
    unset($process);
}



$page = '';
if(isset($_REQUEST['page']))
	$page = $_REQUEST['page'];
$step = 'start';
if(isset($_REQUEST['step']))
	$step = $_REQUEST['step'];
// load server path
function getServerPath()
{
	$config = array();
	include('./config/config.php');
	return $config['site']['serverPath'];
}
// save server path
function setServerPath($newPath)
{
	$file = fopen("./config/config.php", "r");
	$lines = array();
	while (!feof($file)) {
		$lines[] = fgets($file);
	}
	fclose($file);

	$newConfig = array();
	foreach ($lines as $i => $line)
	{
		if(substr($line, 0, strlen('$config[\'site\'][\'serverPath\']')) == '$config[\'site\'][\'serverPath\']')
			$newConfig[] = '$config[\'site\'][\'serverPath\'] = "' . str_replace('"', '\"' , $newPath) . '";' . PHP_EOL; // do something with each line from text file here
		else
			$newConfig[] = $line;
	}
	Website::putFileContents("./config/config.php", implode('', $newConfig));
}
if($page == '')
{
	echo '<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
		<title>Installation of account maker</title>
	</head>
	<frameset cols="230,*">
		<frame name="menu" src="install.php?page=menu" />
		<frame name="step" src="install.php?page=step&step=start" />
		<noframes><body>Frames don\'t work. Install Firefox :P</body></noframes>
	</frameset>
	</html>';
}
elseif($page == 'menu')
{
	echo '<h2>MENU</h2><br>
	<b>IF NOT INSTALLED:</b><br>
	<a href="install.php?page=step&step=start" target="step">0. Informations</a><br>
	<a href="install.php?page=step&step=1" target="step">1. Set server path</a><br>
	<a href="install.php?page=step&step=2" target="step">2. Check DataBase connection</a><br>
	<a href="install.php?page=step&step=3" target="step">3. Add tables and columns to DB</a><br>
	<a href="install.php?page=step&step=4" target="step">4. Add samples to DB</a><br>
	<a href="install.php?page=step&step=5" target="step">5. Set Admin Account</a><br>
	<b>Author:</b><br>
	Gesior<br>
	Compatible with TFS 0.3.6 and TFS 0.4 up to revision 3702</a>';
}
elseif($page == 'step')
{
	if($step >= 2 && $step <= 5)
	{
		//load server config $config['server']
		if(Website::getWebsiteConfig()->getValue('useServerConfigCache'))
		{
			// use cache to make website load faster
			if(Website::fileExists('./config/server.config.php'))
			{
				$tmp_php_config = new ConfigPHP('./config/server.config.php');
				$config['server'] = $tmp_php_config->getConfig();
			}
			else
			{
				// if file isn't cache we should load .lua file and make .php cache
				$tmp_lua_config = new ConfigLUA(Website::getWebsiteConfig()->getValue('serverPath') . 'config.lua');
				$config['server'] = $tmp_lua_config->getConfig();
				$tmp_php_config = new ConfigPHP();
				$tmp_php_config->setConfig($tmp_lua_config->getConfig());
				$tmp_php_config->saveToFile('./config/server.config.php');
			}
		}
		else
		{
			$tmp_lua_config = new ConfigLUA(Website::getWebsiteConfig()->getValue('serverPath') . 'config.lua');
			$config['server'] = $tmp_lua_config->getConfig();
		}
		if(Website::getServerConfig()->isSetKey('mysqlHost'))
		{
			define('SERVERCONFIG_SQL_TYPE', 'sqlType');
			define('SERVERCONFIG_SQL_HOST', 'mysqlHost');
			define('SERVERCONFIG_SQL_PORT', 'mysqlPort');
			define('SERVERCONFIG_SQL_USER', 'mysqlUser');
			define('SERVERCONFIG_SQL_PASS', 'mysqlPass');
			define('SERVERCONFIG_SQL_DATABASE', 'mysqlDatabase');
			define('SERVERCONFIG_SQLITE_FILE', 'sqlFile');
		}
		elseif(Website::getServerConfig()->isSetKey('sqlHost'))
		{
			define('SERVERCONFIG_SQL_TYPE', 'sqlType');
			define('SERVERCONFIG_SQL_HOST', 'sqlHost');
			define('SERVERCONFIG_SQL_PORT', 'sqlPort');
			define('SERVERCONFIG_SQL_USER', 'sqlUser');
			define('SERVERCONFIG_SQL_PASS', 'sqlPass');
			define('SERVERCONFIG_SQL_DATABASE', 'sqlDatabase');
			define('SERVERCONFIG_SQLITE_FILE', 'sqlFile');
		}
		else
			new Error_Critic('#E-3', 'There is no key <b>sqlHost</b> or <b>mysqlHost</b> in server config', array(new Error('INFO', 'use server config cache: <b>' . (Website::getWebsiteConfig()->getValue('useServerConfigCache') ? 'true' : 'false') . '</b>')));
		if(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_TYPE) == 'mysql')
		{
			Website::setDatabaseDriver(Database::DB_MYSQL);
			if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_HOST))
				Website::getDBHandle()->setDatabaseHost(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_HOST));
			else
				new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_HOST . '</b> in server config file.');
			if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_PORT))
				Website::getDBHandle()->setDatabasePort(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_PORT));
			else
				new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_PORT . '</b> in server config file.');
			if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_DATABASE))
				Website::getDBHandle()->setDatabaseName(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_DATABASE));
			else
				new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_DATABASE . '</b> in server config file.');
			if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_USER))
				Website::getDBHandle()->setDatabaseUsername(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_USER));
			else
				new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_USER . '</b> in server config file.');
			if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_PASS))
				Website::getDBHandle()->setDatabasePassword(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_PASS));
			else
				new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_PASS . '</b> in server config file.');
		}
		elseif(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_TYPE) == 'sqlite')
		{
			Website::setDatabaseDriver(Database::DB_SQLITE);
			if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQLITE_FILE))
				Website::getDBHandle()->setDatabaseFile(Website::getServerConfig()->getValue(SERVERCONFIG_SQLITE_FILE));
			else
				new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQLITE_FILE . '</b> in server config file.');
		}
		elseif(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_TYPE) == 'pgsql')
		{
			// does pgsql use 'port' parameter? I don't know
			Website::setDatabaseDriver(Database::DB_PGSQL);
			if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_HOST))
				Website::getDBHandle()->setDatabaseHost(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_HOST));
			else
				new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_HOST . '</b> in server config file.');
			if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_DATABASE))
				Website::getDBHandle()->setDatabaseName(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_DATABASE));
			else
				new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_DATABASE . '</b> in server config file.');
			if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_USER))
				Website::getDBHandle()->setDatabaseUsername(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_USER));
			else
				new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_USER . '</b> in server config file.');
			if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_PASS))
				Website::getDBHandle()->setDatabasePassword(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_PASS));
			else
				new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_PASS . '</b> in server config file.');
		}
		else
			new Error_Critic('#E-6', 'Database error. Unknown database type in <b>server config</b> . Must be equal to: "<b>mysql</b>", "<b>sqlite</b>" or "<b>pgsql</b>" . Now is: "<b>' . Website::getServerConfig()->getValue(SERVERCONFIG_SQL_TYPE) . '</b>"');
		Website::setPasswordsEncryption(Website::getServerConfig()->getValue('encryptionType'));
		$SQL = Website::getDBHandle();
	}

	if($step == 'start')
	{
		echo '<h1>STEP '.$step.'</h1>Informations<br>';
		echo 'Welcome to Gesior Account Maker installer. <b>After 5 simple steps account maker will be ready to use!</b><br />';
		// check access to write files
		$writeable = array('config/config.php', 'cache', 'cache/flags', 'cache/DONT_EDIT_usercounter.txt', 'cache/DONT_EDIT_serverstatus.txt', 'custom_scripts', 'install.txt');
		foreach($writeable as $fileToWrite)
		{
			if(is_writable($fileToWrite))
				echo '<span style="color:green">CAN WRITE TO FILE: <b>' . $fileToWrite . '</b></span><br />';
			else
				echo '<span style="color:red">CANNOT WRITE TO FILE: <b>' . $fileToWrite . '</b> - edit file access for PHP [on linux: chmod]</span><br />';
		}
	}
	elseif($step == 1)
	{
		if(isset($_REQUEST['server_path']))
		{
			echo '<h1>STEP '.$step.'</h1>Check server configuration<br>';
			$path = $_REQUEST['server_path'];
			$path = trim($path)."\\";
			$path = str_replace("\\\\", "/", $path);
			$path = str_replace("\\", "/", $path);
			$path = str_replace("//", "/", $path);
			setServerPath($path);
			$tmp_lua_config = new ConfigLUA($path . 'config.lua');
			$config['server'] = $tmp_lua_config->getConfig();
			if(isset($config['server']['sqlType']))
			{
				echo 'File <b>config.lua</b> loaded from <font color="red"><i>'.$path.'config.lua</i></font>. It looks like fine server config file. Now you can check database('.$config['server']['sqlType'].') connection: <a href="install.php?page=step&step=2">STEP 2 - check database connection</a>';
			}
			else
			{
				echo 'File <b>config.lua</b> loaded from <font color="red"><i>'.$path.'config.lua</i></font> and it\'s not valid TFS config.lua file. <a href="install.php?page=step&step=1">Go to STEP 1 - select other directory.</a> If it\'s your config.lua file from TFS contact with acc. maker author.';
			}
		}
		else
		{
			echo 'Please write you TFS directory below. Like: <i>C:\Documents and Settings\Gesior\Desktop\TFS 0.2.9\</i><form action="install.php">
			<input type="text" name="server_path" size="90" value="'.htmlspecialchars(getServerPath()).'" /><input type="hidden" name="page" value="step" /><input type="hidden" name="step" value="1" /><input type="submit" value="Set server path" />
			</form>';
		}
	}
	elseif($step == 2)
	{
		echo '<h1>STEP '.$step.'</h1>Check database connection<br>';
		echo 'If you don\'t see any errors press <a href="install.php?page=step&step=3">link to STEP 3 - Add tables and columns to DB</a>. If you see some errors it mean server has wrong configuration. Check FAQ or ask author of acc. maker.<br />';
		$SQL->connect(); // show errors if can't connect
	}
	elseif($step == 3)
	{
		echo '<h1>STEP '.$step.'</h1>Add tables and columns to DB<br>';
		echo 'Installer try to add new tables and columns to database.<br>';
		$columns = array();
		//$columns[] = array('table', 'name_of_column', 'type', 'length', 'default');
		$columns[] = array('accounts', 'key', 'VARCHAR', '20', '0');
		$columns[] = array('accounts', 'email_new', 'VARCHAR', '255', '');
		$columns[] = array('accounts', 'email_new_time', 'INT', '11', '0');
		$columns[] = array('accounts', 'rlname', 'VARCHAR', '255', '');
		$columns[] = array('accounts', 'location', 'VARCHAR', '255', '');
		$columns[] = array('accounts', 'page_access', 'INT', '11', '0');
		$columns[] = array('accounts', 'email_code', 'VARCHAR', '255', '');
		$columns[] = array('accounts', 'next_email', 'INT', '11', '0');
		$columns[] = array('accounts', 'premium_points', 'INT', '11', '0');
		$columns[] = array('accounts', 'create_date', 'INT', '11', '0');
		$columns[] = array('accounts', 'create_ip', 'INT', '11', '0');
		$columns[] = array('accounts', 'last_post', 'INT', '11', '0');
		$columns[] = array('accounts', 'flag', 'VARCHAR', '80', '');

		$columns[] = array('guilds', 'description', 'TEXT', '', '');
		$columns[] = array('guilds', 'guild_logo', 'MEDIUMBLOB', '', NULL);
		$columns[] = array('guilds', 'create_ip', 'INT', '11', '0');
		$columns[] = array('guilds', 'balance', 'BIGINT UNSIGNED', '', '0');
		$columns[] = array('killers', 'war', 'INT', '11', '0');

		$columns[] = array('players', 'deleted', 'TINYINT', '1', '0');
		$columns[] = array('players', 'description', 'VARCHAR', '255', '');
		$columns[] = array('players', 'comment', 'TEXT', '', '');
		$columns[] = array('players', 'create_ip', 'INT', '11', '0');
		$columns[] = array('players', 'create_date', 'INT', '11', '0');
		$columns[] = array('players', 'hide_char', 'INT', '11', '0');

		$tables = array();
		// mysql tables
		$tables[Database::DB_MYSQL]['z_ots_comunication'] = "CREATE TABLE `z_ots_comunication` (
							  `id` int(11) NOT NULL auto_increment,
							  `name` varchar(255) NOT NULL,
							  `type` varchar(255) NOT NULL,
							  `action` varchar(255) NOT NULL,
							  `param1` varchar(255) NOT NULL,
							  `param2` varchar(255) NOT NULL,
							  `param3` varchar(255) NOT NULL,
							  `param4` varchar(255) NOT NULL,
							  `param5` varchar(255) NOT NULL,
							  `param6` varchar(255) NOT NULL,
							  `param7` varchar(255) NOT NULL,
							  `delete_it` int(2) NOT NULL default '1',
							   PRIMARY KEY  (`id`)
							) ENGINE=InnoDB DEFAULT CHARSET=latin1;";
		$tables[Database::DB_MYSQL]['z_shop_offer'] = "CREATE TABLE `z_shop_offer` (
							  `id` int(11) NOT NULL auto_increment,
							  `points` int(11) NOT NULL default '0',
							  `itemid1` int(11) NOT NULL default '0',
							  `count1` int(11) NOT NULL default '0',
							  `itemid2` int(11) NOT NULL default '0',
							  `count2` int(11) NOT NULL default '0',
							  `offer_type` varchar(255) default NULL,
							  `offer_description` text NOT NULL,
							  `offer_name` varchar(255) NOT NULL,
							  PRIMARY KEY  (`id`)
							) ENGINE=InnoDB DEFAULT CHARSET=latin1;";
		$tables[Database::DB_MYSQL]['z_shop_history_item'] = "CREATE TABLE `z_shop_history_item` (
							  `id` int(11) NOT NULL auto_increment,
							  `to_name` varchar(255) NOT NULL default '0',
							  `to_account` int(11) NOT NULL default '0',
							  `from_nick` varchar(255) NOT NULL,
							  `from_account` int(11) NOT NULL default '0',
							  `price` int(11) NOT NULL default '0',
							  `offer_id` varchar(255) NOT NULL default '',
							  `trans_state` varchar(255) NOT NULL,
							  `trans_start` int(11) NOT NULL default '0',
							  `trans_real` int(11) NOT NULL default '0',
							  PRIMARY KEY  (`id`)
							) ENGINE=InnoDB DEFAULT CHARSET=latin1;";
		$tables[Database::DB_MYSQL]['z_forum'] = "CREATE TABLE `z_forum` (
							  `id` int(11) NOT NULL auto_increment,
							  `first_post` int(11) NOT NULL default '0',
							  `last_post` int(11) NOT NULL default '0',
							  `section` int(3) NOT NULL default '0',
							  `replies` int(20) NOT NULL default '0',
							  `views` int(20) NOT NULL default '0',
							  `author_aid` int(20) NOT NULL default '0',
							  `author_guid` int(20) NOT NULL default '0',
							  `post_text` text NOT NULL,
							  `post_topic` varchar(255) NOT NULL,
							  `post_smile` tinyint(1) NOT NULL default '0',
							  `post_date` int(20) NOT NULL default '0',
							  `last_edit_aid` int(20) NOT NULL default '0',
							  `edit_date` int(20) NOT NULL default '0',
							  `post_ip` varchar(15) NOT NULL default '0.0.0.0',
							  PRIMARY KEY  (`id`),
							  KEY `section` (`section`)
							) ENGINE=InnoDB DEFAULT CHARSET=latin1;";
		$tables[Database::DB_MYSQL]['guild_wars'] = "CREATE TABLE `guild_wars` (
							  `id` INT NOT NULL AUTO_INCREMENT,
							  `guild_id` INT NOT NULL,
							  `enemy_id` INT NOT NULL,
							  `begin` BIGINT NOT NULL DEFAULT '0',
							  `end` BIGINT NOT NULL DEFAULT '0',
							  `frags` INT UNSIGNED NOT NULL DEFAULT '0',
							  `payment` BIGINT UNSIGNED NOT NULL DEFAULT '0',
							  `guild_kills` INT UNSIGNED NOT NULL DEFAULT '0',
							  `enemy_kills` INT UNSIGNED NOT NULL DEFAULT '0',
							  `status` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
							  PRIMARY KEY (`id`),
							  KEY `status` (`status`),
							  KEY `guild_id` (`guild_id`),
							  KEY `enemy_id` (`enemy_id`)
							) ENGINE=InnoDB;";
		$tables[Database::DB_MYSQL]['guild_wars_table_references'] = "ALTER TABLE `guild_wars`
								  ADD CONSTRAINT `guild_wars_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE,
								  ADD CONSTRAINT `guild_wars_ibfk_2` FOREIGN KEY (`enemy_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;";
		$tables[Database::DB_MYSQL]['guild_kills'] = "CREATE TABLE `guild_kills` (
							  `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
							  `guild_id` INT NOT NULL,
							  `war_id` INT NOT NULL,
							  `death_id` INT NOT NULL
							) ENGINE = InnoDB;";
		$tables[Database::DB_MYSQL]['guild_kills_table_references'] = "ALTER TABLE `guild_kills`
							  ADD CONSTRAINT `guild_kills_ibfk_1` FOREIGN KEY (`war_id`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE,
							  ADD CONSTRAINT `guild_kills_ibfk_2` FOREIGN KEY (`death_id`) REFERENCES `player_deaths` (`id`) ON DELETE CASCADE,
							  ADD CONSTRAINT `guild_kills_ibfk_3` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;";
		// sqlite tables
		$tables[Database::DB_SQLITE]['z_ots_comunication'] = 'CREATE TABLE "z_ots_comunication" (
							  "id" INTEGER PRIMARY KEY AUTOINCREMENT,
							  "name" varchar(255) NOT NULL,
							  "type" varchar(255) NOT NULL,
							  "action" varchar(255) NOT NULL,
							  "param1" varchar(255) NOT NULL,
							  "param2" varchar(255) NOT NULL,
							  "param3" varchar(255) NOT NULL,
							  "param4" varchar(255) NOT NULL,
							  "param5" varchar(255) NOT NULL,
							  "param6" varchar(255) NOT NULL,
							  "param7" varchar(255) NOT NULL,
							  "delete_it" int(2) NOT NULL default 1);';
		$tables[Database::DB_SQLITE]['z_shop_offer'] = 'CREATE TABLE "z_shop_offer" (
							  "id" INTEGER PRIMARY KEY AUTOINCREMENT,
							  "points" int(11) NOT NULL default 0,
							  "itemid1" int(11) NOT NULL default 0,
							  "count1" int(11) NOT NULL default 0,
							  "itemid2" int(11) NOT NULL default 0,
							  "count2" int(11) NOT NULL default 0,
							  "offer_type" varchar(255) default NULL,
							  "offer_description" text NOT NULL,
							  "offer_name" varchar(255) NOT NULL);';
		$tables[Database::DB_SQLITE]['z_shop_history_item'] = 'CREATE TABLE "z_shop_history_item" (
							  "id" INTEGER PRIMARY KEY AUTOINCREMENT,
							  "to_name" varchar(255) NOT NULL default 0,
							  "to_account" int(11) NOT NULL default 0,
							  "from_nick" varchar(255) NOT NULL,
							  "from_account" int(11) NOT NULL default 0,
							  "price" int(11) NOT NULL default 0,
							  "offer_id" varchar(255) NOT NULL default "",
							  "trans_state" varchar(255) NOT NULL,
							  "trans_start" int(11) NOT NULL default 0,
							  "trans_real" int(11) NOT NULL default 0);';
		$tables[Database::DB_SQLITE]['z_forum'] = 'CREATE TABLE "z_forum" (
								"id" INTEGER PRIMARY KEY AUTOINCREMENT,
								"first_post" int(11) NOT NULL default 0,
								"last_post" int(11) NOT NULL default 0,
								"section" int(3) NOT NULL default 0,
								"replies" int(20) NOT NULL default 0,
								"views" int(20) NOT NULL default 0,
								"author_aid" int(20) NOT NULL default 0,
								"author_guid" int(20) NOT NULL default 0,
								"post_text" text NOT NULL,
								"post_topic" varchar(255) NOT NULL,
								"post_smile" tinyint(1) NOT NULL default 0,
								"post_date" int(20) NOT NULL default 0,
								"last_edit_aid" int(20) NOT NULL default 0,
								"edit_date" int(20) NOT NULL default 0,
								"post_ip" varchar(15) NOT NULL default "0.0.0.0");';
		foreach($columns as $column)
		{
			if($column[4] === NULL && $SQL->query('ALTER TABLE ' . $SQL->tableName($column[0]) . ' ADD ' . $SQL->fieldName($column[1]) . ' ' . $column[2] . '  NULL DEFAULT NULL') !== false)
				echo "<span style=\"color:green\">Column <b>" . $column[1] . "</b> added to table <b>" . $column[0] . "</b>.</span><br />";
			elseif($SQL->query('ALTER TABLE ' . $SQL->tableName($column[0]) . ' ADD ' . $SQL->fieldName($column[1]) . ' ' . $column[2] . '' . (($column[3] == '') ? '' : '(' . $column[3] . ')') . ' NOT NULL DEFAULT \'' . $column[4] . '\'') !== false)
				echo "<span style=\"color:green\">Column <b>" . $column[1] . "</b> added to table <b>" . $column[0] . "</b>.</span><br />";
			else
				echo "Could not add column <b>" . $column[1] . "</b> to table <b>" . $column[0] . "</b>. Already exist?<br />";
		}
		foreach($tables[$SQL->getDatabaseDriver()] as $tableName => $tableQuery)
		{
			if($SQL->query($tableQuery) !== false)
				echo "<span style=\"color:green\">Table <b>" . $tableName . "</b> created.</span><br />";
			else
				echo "Could not create table <b>" . $tableName . "</b>. Already exist?<br />";
		}
		echo 'Tables and columns added to database.<br>Go to <a href="install.php?page=step&step=4">STEP 4 - Add samples</a>';
	}
	elseif($step == 4)
	{
		echo '<h1>STEP '.$step.'</h1>Add samples to DB:<br>';

		$samplePlayers = array();
		$samplePlayers[0] = 'Rook Sample';
		$samplePlayers[1] = 'Sorcerer Sample';
		$samplePlayers[2] = 'Druid Sample';
		$samplePlayers[3] = 'Paladin Sample';
		$samplePlayers[4] = 'Knight Sample';
		$newPlayer = new Player('Account Manager', Player::LOADTYPE_NAME);
		if($newPlayer->isLoaded())
		{
			foreach($samplePlayers as $vocationID => $name)
			{
				$samplePlayer = new Player($name, Player::LOADTYPE_NAME);
				if(!$samplePlayer->isLoaded())
				{
					$samplePlayer = new Player('Account Manager', Player::LOADTYPE_NAME);
					$samplePlayer->setID(null); // save as new player, not edited
					$samplePlayer->setName($name);
					$samplePlayer->setVocation($vocationID);
					$samplePlayer->setGroupID(1);
					$samplePlayer->setLookType(128);
					$samplePlayer->save();
					echo '<span style="color:green">Added sample character: </span><span style="color:green;font-weight:bold">' . $name . '</span><br/>';
				}
				else
					echo 'Sample character: <span style="font-weight:bold">' . $name . '</span> already exist in database<br/>';
			}
		}
		else
			new Error_Critic('', 'Character <i>Account Manager</i> does not exist. Cannot install sample characters!');
	}
	elseif($step == 5)
	{
		echo '<h1>STEP '.$step.'</h1>Set Admin Account<br>';
		if(empty($_REQUEST['saveaccpassword']))
		{
			echo 'Admin account login is: <b>1</b><br/>Set new password to this account.<br>';
			echo 'New password: <form action="install.php" method=POST><input type="text" name="newpass" size="35">(Don\'t give it password to anyone!)';
			echo '<input type="hidden" name="saveaccpassword" value="yes"><input type="hidden" name="page" value="step"><input type="hidden" name="step" value="5"><input type="submit" value="SET"></form><br>If account with login 1 doesn\'t exist installator will create it and set your password.';
		}
		else
		{
			include_once('./system/load.compat.php');
			$newpass = trim($_POST['newpass']);
			if(!check_password($newpass))
				echo 'Password contains illegal characters. Please use only a-Z and 0-9. <a href="install.php?page=step&step=5">GO BACK</a> and write other password.';
			else
			{
				//create / set pass to admin account
				$account = new Account(1, Account::LOADTYPE_NAME);
				if($account->isLoaded())
				{
					$account->setPassword($newpass); // setPassword encrypt it to ots encryption
					$account->setPageAccess(3);
					$account->setFlag('unknown');
					$account->save();
				}
				else
				{
					$newAccount = new Account();
					$newAccount->setName(1);
					$newAccount->setPassword($newpass); // setPassword encrypt it to ots encryption
					$newAccount->setMail(rand(0,999999) . '@gmail.com');
					$newAccount->setPageAccess(3);
					$newAccount->setGroupID(1);
					$newAccount->setFlag('unknown');
					$newAccount->setCreateIP(Visitor::getIP());
					$newAccount->setCreateDate(time());
				}
				$_SESSION['account'] = 1;
				$_SESSION['password'] = $newpass;
				$logged = TRUE;
				echo '<h1>Admin account login: 1<br>Admin account password: '.$newpass.'</h1><br/><h3>It\'s end of installation. Installation is blocked!</h3>'; 
				if(!unlink('install.txt'))
					new Error_Critic('', 'Cannot remove file <i>install.txt</i>. You must remove it to disable installer. I recommend you to go to step <i>0</i> and check if any other file got problems with WRITE permission.');
			}
		}
	}
}
 
You need to install Gesior AAC, and then you need php files for it. That files you post now have nothing to do with it.
 
Back
Top