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

Can't log in to my own server! [invalid password]

Danny_

Evora Project Dev
Joined
Mar 19, 2008
Messages
283
Reaction score
4
Location
Bermuda Triangle
I'm using TFS 0.4 3777.

Also using gesior acc 0.3.4

I can log in with the account on my webpage but when I try to log in to the game it says invalid password, as the account name is correct but the password is not, I've checked it and tried it multiple times but it does not work.

Can anyone tell me what's happening and how to solve it?

i tried to search for it but found nothing

rep ++

Sincerly
 
I knew a comment like this would come, I write the right passworrd, my friends have been trying to connect to altough it says wrong password, it works on the website but not on the client.
Anyone know a reason?
 
well go to run or cmd depends on ur Os then write
Ipconfig
take the IPv4 Address
put it in the multi ip changer and ohh u r in
if the proplem stays then check config if it have sha1 change to plain incase u r using gesior aac if modern then be sure it's sha1 then go to ur database and check ur passwords if it's coded
Rep? :D
 
Your website is probably creating accounts with plain encryptation, do not change server's encrypt to plain, change website's encript to sha1.

Go to site's config file and look for "md5", change to "sha1"
If there's no md5 try "encryptionType"...

edit

also, try this in MySQL Database (Credits to Kavvson)

SQL:
UPDATE `accounts` SET password=SHA1(password) WHERE `id` = (max) >= 1;

Change (password) to like (123) and warn everyone that the password as changed to 123, and they should change it etc... (max) = last account id... And remove the (), should be like
SQL:
UPDATE `accounts` SET password=SHA1(123) WHERE `id` = 100 > 1;
 
Last edited:
Dankoo I tried all your methods, on first method I couldn't find "encryptionType" it simpely does not exist in my config.

Second method says just "Affected rows: 0 (Query took 0.0010 sec)" when I execute it!
 
Try:
SQL:
UPDATE `accounts` SET password=SHA1(123) WHERE `id` > 0;

Or
SQL:
UPDATE `accounts` SET password=SHA1(123) WHERE `id` = 1;

Download Fileseek and search for "md5" in your website folder... (if you don't find anything, try "encrypt" or something like this)

Fileseek is used to search for something even inside files, it's essencial for a OTServer admin
 
here is my config.php

PHP:
<?PHP
$config['site']['worlds'] = array(0 => 'Hysteria');
$config['site']['quests'] = array('Annihilator' => 5000,'Demon Helmet' => 2645,'Pits of Inferno' => 5550); // list of quests, 'questname' => storage-id,
// ACCOUNT config
$config['site']['one_email'] = 0; // one e-mail can be used only to create one account 0 / 1
$config['site']['verify_code'] = 1; // show verify code to block stupid scripts, set 0 if you have problems with image
$config['site']['email_days_to_change'] = 2; // how many days user need to change e-mail to account - block hackers
$config['site']['newaccount_premdays'] = 0; // how many days receive new account
// USE ONLY IF YOU CONFIGURED E-MAIL AND IT WORK
$config['site']['create_account_verify_mail'] = 0; // when create account player must use right e-mail, he will receive random password to account like on RL tibia, 1 = yes, 0 = no
$config['site']['generate_new_reckey'] = 0; // let player generate new recovery key, he will receive e-mail with new rec key (not display on page, hacker can't generate rec key)
$config['site']['generate_new_reckey_price'] = 5; // you can get some Premium Points for new rec key
$config['site']['send_mail_when_change_password'] = 0; // send e-mail with new password when change password to account, set 0 if someone abuse to send spam
$config['site']['send_mail_when_generate_reckey'] = 0; // send e-mail with rec key (key is displayed on page anyway when generate), set 0 if someone abuse to send spam
$config['site']['send_register_email'] = 0; // send e-mail when register account

// CHARACTER config, format: ID_of_vocation => 'Name of Character to copy', load vocation name from $vocation_name[0] (below)
$config['site']['newchar_vocations'][0] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
$config['site']['newchar_vocations'][1] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
// sample, if rook only:             $config['site']['newchar_vocations'][0] = array(0 => 'Rook Sample');
$config['site']['newchar_towns'][0] = array(1);
$config['site']['newchar_towns'][1] = array(1);
// sample, if all players should spawn in one city (city with ID 4):          $config['site']['newchar_towns'] = array(4);

// list of vocations on ots (world 0)
$vocation_name[0][0] = array(0 => 'None', 1 => 'Sorcerer', 2 => 'Druid', 3 => 'Paladin', 4 => 'Knight'); // id => 'name' , $vocation_name[0] - promotion level 0, $vocation_name[0] - for world ID 0
$vocation_name[0][1] = array(1 => 'Master Sorcerer', 2 => 'Elder Druid', 3 => 'Royal Paladin', 4 => 'Elite Knight'); // id => 'name' , $vocation_name[1] - promotion level 1, $vocation_name[0] - for world ID 0
// list of vocations on ots (world 1)
$vocation_name[1][0] = array(0 => 'None', 1 => 'Sorcerer', 2 => 'Druid', 3 => 'Paladin', 4 => 'Knight'); // id => 'name' , $vocation_name[0] - promotion level 0, $vocation_name[1] - for world ID 1
$vocation_name[1][1] = array(1 => 'Master Sorcerer', 2 => 'Elder Druid', 3 => 'Royal Paladin', 4 => 'Elite Knight'); // id => 'name' , $vocation_name[1] - promotion level 1, $vocation_name[1] - for world ID 1

// list of towns on ots
$towns_list[0] = array(0 => 'Thais', 1 => 'Carlin', 2 => 'Venore', 3 => 'Ab dendriel', 4 => 'Ankrahmun', 5 => 'Edron', 6 => 'Port hope', 7 => 'Darashia',8 => 'Yalahar'); // list of towns, id => 'name', $towns_list[0] - for world id 0
$towns_list[1] = array(0 => 'Venore', 1 => 'lol', 2 => 'lol', 3 => 'lol', 4 => 'lol', 5 => 'Venore', 6 => 'Venore', 7 => 'Venore',8 => 'Venore'); // list of towns, id => 'name', $towns_list[0] - for world id 1

// list of monsters on ots - names blocked, you can generate list of your monsters in acc. maker admin panel ( Reload Monsters )
$config['site']['monsters'] = array("amazon","valkyrie","carrion worm","rotworm","rotworm queen","cockroach","kongra","merlkin","sibang","crystal spider","giant spider","poison spider","scorpion","spider","tarantula","achad","axeitus headbanger","bloodpaw","bovinus","colerian the barbarian","cursed gladiator","frostfur","orcus the cruel","rocky","the hairy one","avalanche","drasilla","grimgor guteater","kreebosh the exile","slim","spirit of earth","spirit of fire","spirit of water","the dark dancer","the hag","darakan the executioner","deathbringer","fallen mooh'tah master ghar","gnorre chyllson","norgle glacierbeard","svoren the mad","the masked marauder","the obliverator","the pit lord","webster","barbarian bloodwalker","barbarian brutetamer","barbarian headsplitter","barbarian skullhunter","bear","panda","polar bear","braindeath","beholder","elder beholder","gazer","chicken","dire penguin","flamingo","parrot","penguin","seagull","terror bird","bazir","infernatil","thul","munster","son of verminor","xenia","zoralurk","big boss trolliver","foreman kneebiter","mad technomancer","man in the cave","lord of the elements","the count","the plasmother","dracola","the abomination","the handmaiden","mr. punish","the countess sorrow","the imperor","massacre","apocalypse","brutus bloodbeard","deadeye devious","demodras","dharalion","fernfang","ferumbras","general murius","ghazbaran","grorlam","lethal lissy","morgaroth","necropharus","orshabaal","ron the ripper","the evil eye","the horned fox","the old widow","tiquandas revenge","apprentice sheng","dog","hellhound","war wolf","winter wolf","wolf","chakoya toolshaper","chakoya tribewarden","chakoya windcaller","blood crab","crab","frost giant","frost giantess","ice golem","yeti","acolyte of the cult","adept of the cult","enlightened of the cult","novice of the cult","ungreez","dark torturer","demon","destroyer","diabolic imp","fire devil","fury","hand of cursed fate","juggernaut","nightmare","plaguesmith","blue djinn","efreet","green djinn","marid","frost dragon","wyrm","sea serpent","dragon lord","dragon","hydra","dragon hatchling","dragon lord hatchling","frost dragon hatchling","dwarf geomancer","dwarf guard","dwarf soldier","dwarf","dworc fleshhunter","dworc venomsniper","dworc voodoomaster","elephant","mammoth","elf arcanist","elf scout","elf","charged energy elemental","energy elemental","massive energy elemental","overcharged energy elemental","energy overlord","cat","lion","tiger","azure frog","coral frog","crimson frog","green frog","orchid frog","toad","jagged earth elemental","muddy earth elemental","earth elemental","massive earth elemental","earth overlord","gargoyle","stone golem","ghost","phantasm","phantasm","pirate ghost","spectre","cyclops smith","cyclops drone","behemoth","cyclops","slick water elemental","roaring water elemental","ice overlord","water elemental","massive water elemental","ancient scarab","butterfly","bug","centipede","exp bug","larva","scarab","wasp","lizard sentinel","lizard snakecharmer","lizard templar","minotaur archer","minotaur guard","minotaur mage","minotaur","squirrel","goblin demon","badger","bat","deer","the halloween hare","hyaena","pig","rabbit","silver rabbit","skunk","wisp","dark monk","monk","tha exp carrier","necromancer","priestess","orc berserker","orc leader","orc rider","orc shaman","orc spearman","orc warlord","orc warrior","orc","goblin leader","goblin scavenger","goblin","goblin assassin","assasin","bandit","black knight","hero","hunter","nomad","smuggler","stalker","poacher","wild warrior","ashmunrah","dipthrah","mahrdis","morguthis","omruc","rahemos","thalas","vashresamun","pirate buccaneer","pirate corsair","pirate cutthroat","pirate marauder","carniphila","spit nettle","fire overlord","massive fire elemental","blistering fire elemental","blazing fire elemental","fire elemental","hellfire fighter","quara constrictor scout","quara hydromancer scout","quara mantassin scout","quara pincher scout","quara predator scout","quara constrictor","quara hydromancer","quara mantassin","quara pincher","quara predator","cave rat","rat","cobra","crocodile","serpent spawn","snake","wyvern","black sheep","sheep","mimic","betrayed wraith","bonebeast","demon skeleton","lost soul","pirate skeleton","skeleton","skeleton warrior","undead dragon","defiler","slime2","slime","bog raider","ice witch","warlock","witch","bones","fluffy","grynch clan goblin","hacker","minishabaal","primitive","tibia bug","undead minion","annihilon","hellgorak","latrivan","madareth","zugurosh","ushuriel","golgordan","thornback tortoise","tortoise","eye of the seven","deathslicer","flamethrower","magicthrower","plaguethrower","poisonthrower","shredderthrower","troll champion","frost troll","island troll","swamp troll","troll","banshee","blightwalker","crypt shambler","ghoul","lich","mummy","vampire","grim reaper","trainer","forest dragon","knight","paladin","druid","sorcerer","guard","mercenary","thief","toxiros","pyramo","lazarus","zathroth","goshnar","durin","demora","orc champion","lumenia","dracula","alezzo","prince almirith","elf warlord","random noob","magebomb");
// list of NPCs on ots - names blocked
$config['site']['npc'] = array('alice', 'oarkhal', 'equer', 'parkhal', 'leoric', 'sarkhal', 'pallo', 'riona', 'her miona', 'varkhal', 'eura', 'blitz', 'markhal', 'wengo', 'larkhal');
$config['site']['max_players_per_account'] = 35; // max. number of characters on account


// GUILDS config
$config['site']['guild_need_level'] = 8; // minimum level to create guild
$config['site']['guild_need_pacc'] = 0; // guild need pacc 0 / 1
$config['site']['guild_image_size_kb'] = 50; // maximum size of image in KB
$config['site']['guild_description_chars_limit'] = 1000; // limit of guild description
$config['site']['guild_description_lines_limit'] = 6; // limit of lines, if description has more lines it will be showed as long text, without 'enters'
$config['site']['guild_motd_chars_limit'] = 150; // limit of MOTD (show in game?)


// E-MAIL config
$config['site']['send_emails'] = 0; // is acc. maker configured to send e-mails?
$config['site']['mail_address'] = "[email protected]"; // e-mail address
$config['site']['smtp_enabled'] = "yes"; // send by smtp or mail function (set 0 if use mail function)
$config['site']['smtp_host'] = "smtp.poczta.onet.pl"; // address
$config['site']['smtp_port'] = 25; // port
$config['site']['smtp_auth'] = "yes"; // need authorization? (set 0 if not need auth)
$config['site']['smtp_user'] = "[email protected]"; // login
$config['site']['smtp_pass'] = "secretpassword"; // password



// ACC MAKER OPTIONS config
$config['site']['access_news'] = 2; // access level needed to edit news
$config['site']['access_admin_panel'] = 3; // access level needed to open admin panel
$config['site']['news_big_limit'] = 3; // limit of news on latest news page
$config['site']['news_ticks_limit'] = 5; // limit of ticker news on latest news page
$config['site']['forum_link'] = ""; // link to server forum, leave empty if server doesn't have forum
$config['site']['show_creationdate'] = 1; // show date of character creation 1 = yes, 0 = no (when use Search Player)
$config['site']['last_deaths_limit'] = 40; // max. number of death on last death page
$config['site']['players_group_id_block'] = 4; // don't show in statistics players with group ID higher (or equal) then (show tutors, senior tutors and normal players)
$config['site']['support_group_id'] = 2; // on game masters list show players with group id 2 or higher
$config['site']['shop_system'] = 1; // show server shop page? 1 = yes, 0 = no, use only if you installed LUA scripts of shop
$config['site']['download_page'] = 1; // show download page? 1 = yes, 0 = no
$config['site']['serverinfo_page'] = 1; // show server info page? 1 = yes, 0 = no
$config['site']['verify_code_shop'] = 0; // show verify code when player try to check premium code
$config['site']['gallery_page'] = 1; // show gallery page? 1 = yes, 0 = no
$config['site']['email_lai_sec_interval'] = 180; // time in seconds between e-mails to one account from lost account interface, block spam
$config['site']['show_marriage_info'] = 0; // show marriage, 1 = yes, 0 = no
$config['site']['show_skills_info'] = 0;
$config['site']['show_vip_status'] = 1;// show vip status, 1 = yes, 0 = no
$config['site']['show_vip_storage'] = 0;// the storage of vip
$config['site']['screenoftheday'] = 1;// show screenshot of the dat
// layout, available layouts: rasta,tibiacom,darkritual
$config['site']['layout'] = "darkritual"; // layout name
?>
 
here is my config.php

PHP:
<?PHP
$config['site']['worlds'] = array(0 => 'Hysteria');
$config['site']['quests'] = array('Annihilator' => 5000,'Demon Helmet' => 2645,'Pits of Inferno' => 5550); // list of quests, 'questname' => storage-id,
// ACCOUNT config
$config['site']['one_email'] = 0; // one e-mail can be used only to create one account 0 / 1
$config['site']['verify_code'] = 1; // show verify code to block stupid scripts, set 0 if you have problems with image
$config['site']['email_days_to_change'] = 2; // how many days user need to change e-mail to account - block hackers
$config['site']['newaccount_premdays'] = 0; // how many days receive new account
// USE ONLY IF YOU CONFIGURED E-MAIL AND IT WORK
$config['site']['create_account_verify_mail'] = 0; // when create account player must use right e-mail, he will receive random password to account like on RL tibia, 1 = yes, 0 = no
$config['site']['generate_new_reckey'] = 0; // let player generate new recovery key, he will receive e-mail with new rec key (not display on page, hacker can't generate rec key)
$config['site']['generate_new_reckey_price'] = 5; // you can get some Premium Points for new rec key
$config['site']['send_mail_when_change_password'] = 0; // send e-mail with new password when change password to account, set 0 if someone abuse to send spam
$config['site']['send_mail_when_generate_reckey'] = 0; // send e-mail with rec key (key is displayed on page anyway when generate), set 0 if someone abuse to send spam
$config['site']['send_register_email'] = 0; // send e-mail when register account

// CHARACTER config, format: ID_of_vocation => 'Name of Character to copy', load vocation name from $vocation_name[0] (below)
$config['site']['newchar_vocations'][0] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
$config['site']['newchar_vocations'][1] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
// sample, if rook only:             $config['site']['newchar_vocations'][0] = array(0 => 'Rook Sample');
$config['site']['newchar_towns'][0] = array(1);
$config['site']['newchar_towns'][1] = array(1);
// sample, if all players should spawn in one city (city with ID 4):          $config['site']['newchar_towns'] = array(4);

// list of vocations on ots (world 0)
$vocation_name[0][0] = array(0 => 'None', 1 => 'Sorcerer', 2 => 'Druid', 3 => 'Paladin', 4 => 'Knight'); // id => 'name' , $vocation_name[0] - promotion level 0, $vocation_name[0] - for world ID 0
$vocation_name[0][1] = array(1 => 'Master Sorcerer', 2 => 'Elder Druid', 3 => 'Royal Paladin', 4 => 'Elite Knight'); // id => 'name' , $vocation_name[1] - promotion level 1, $vocation_name[0] - for world ID 0
// list of vocations on ots (world 1)
$vocation_name[1][0] = array(0 => 'None', 1 => 'Sorcerer', 2 => 'Druid', 3 => 'Paladin', 4 => 'Knight'); // id => 'name' , $vocation_name[0] - promotion level 0, $vocation_name[1] - for world ID 1
$vocation_name[1][1] = array(1 => 'Master Sorcerer', 2 => 'Elder Druid', 3 => 'Royal Paladin', 4 => 'Elite Knight'); // id => 'name' , $vocation_name[1] - promotion level 1, $vocation_name[1] - for world ID 1

// list of towns on ots
$towns_list[0] = array(0 => 'Thais', 1 => 'Carlin', 2 => 'Venore', 3 => 'Ab dendriel', 4 => 'Ankrahmun', 5 => 'Edron', 6 => 'Port hope', 7 => 'Darashia',8 => 'Yalahar'); // list of towns, id => 'name', $towns_list[0] - for world id 0
$towns_list[1] = array(0 => 'Venore', 1 => 'lol', 2 => 'lol', 3 => 'lol', 4 => 'lol', 5 => 'Venore', 6 => 'Venore', 7 => 'Venore',8 => 'Venore'); // list of towns, id => 'name', $towns_list[0] - for world id 1

// list of monsters on ots - names blocked, you can generate list of your monsters in acc. maker admin panel ( Reload Monsters )
$config['site']['monsters'] = array("amazon","valkyrie","carrion worm","rotworm","rotworm queen","cockroach","kongra","merlkin","sibang","crystal spider","giant spider","poison spider","scorpion","spider","tarantula","achad","axeitus headbanger","bloodpaw","bovinus","colerian the barbarian","cursed gladiator","frostfur","orcus the cruel","rocky","the hairy one","avalanche","drasilla","grimgor guteater","kreebosh the exile","slim","spirit of earth","spirit of fire","spirit of water","the dark dancer","the hag","darakan the executioner","deathbringer","fallen mooh'tah master ghar","gnorre chyllson","norgle glacierbeard","svoren the mad","the masked marauder","the obliverator","the pit lord","webster","barbarian bloodwalker","barbarian brutetamer","barbarian headsplitter","barbarian skullhunter","bear","panda","polar bear","braindeath","beholder","elder beholder","gazer","chicken","dire penguin","flamingo","parrot","penguin","seagull","terror bird","bazir","infernatil","thul","munster","son of verminor","xenia","zoralurk","big boss trolliver","foreman kneebiter","mad technomancer","man in the cave","lord of the elements","the count","the plasmother","dracola","the abomination","the handmaiden","mr. punish","the countess sorrow","the imperor","massacre","apocalypse","brutus bloodbeard","deadeye devious","demodras","dharalion","fernfang","ferumbras","general murius","ghazbaran","grorlam","lethal lissy","morgaroth","necropharus","orshabaal","ron the ripper","the evil eye","the horned fox","the old widow","tiquandas revenge","apprentice sheng","dog","hellhound","war wolf","winter wolf","wolf","chakoya toolshaper","chakoya tribewarden","chakoya windcaller","blood crab","crab","frost giant","frost giantess","ice golem","yeti","acolyte of the cult","adept of the cult","enlightened of the cult","novice of the cult","ungreez","dark torturer","demon","destroyer","diabolic imp","fire devil","fury","hand of cursed fate","juggernaut","nightmare","plaguesmith","blue djinn","efreet","green djinn","marid","frost dragon","wyrm","sea serpent","dragon lord","dragon","hydra","dragon hatchling","dragon lord hatchling","frost dragon hatchling","dwarf geomancer","dwarf guard","dwarf soldier","dwarf","dworc fleshhunter","dworc venomsniper","dworc voodoomaster","elephant","mammoth","elf arcanist","elf scout","elf","charged energy elemental","energy elemental","massive energy elemental","overcharged energy elemental","energy overlord","cat","lion","tiger","azure frog","coral frog","crimson frog","green frog","orchid frog","toad","jagged earth elemental","muddy earth elemental","earth elemental","massive earth elemental","earth overlord","gargoyle","stone golem","ghost","phantasm","phantasm","pirate ghost","spectre","cyclops smith","cyclops drone","behemoth","cyclops","slick water elemental","roaring water elemental","ice overlord","water elemental","massive water elemental","ancient scarab","butterfly","bug","centipede","exp bug","larva","scarab","wasp","lizard sentinel","lizard snakecharmer","lizard templar","minotaur archer","minotaur guard","minotaur mage","minotaur","squirrel","goblin demon","badger","bat","deer","the halloween hare","hyaena","pig","rabbit","silver rabbit","skunk","wisp","dark monk","monk","tha exp carrier","necromancer","priestess","orc berserker","orc leader","orc rider","orc shaman","orc spearman","orc warlord","orc warrior","orc","goblin leader","goblin scavenger","goblin","goblin assassin","assasin","bandit","black knight","hero","hunter","nomad","smuggler","stalker","poacher","wild warrior","ashmunrah","dipthrah","mahrdis","morguthis","omruc","rahemos","thalas","vashresamun","pirate buccaneer","pirate corsair","pirate cutthroat","pirate marauder","carniphila","spit nettle","fire overlord","massive fire elemental","blistering fire elemental","blazing fire elemental","fire elemental","hellfire fighter","quara constrictor scout","quara hydromancer scout","quara mantassin scout","quara pincher scout","quara predator scout","quara constrictor","quara hydromancer","quara mantassin","quara pincher","quara predator","cave rat","rat","cobra","crocodile","serpent spawn","snake","wyvern","black sheep","sheep","mimic","betrayed wraith","bonebeast","demon skeleton","lost soul","pirate skeleton","skeleton","skeleton warrior","undead dragon","defiler","slime2","slime","bog raider","ice witch","warlock","witch","bones","fluffy","grynch clan goblin","hacker","minishabaal","primitive","tibia bug","undead minion","annihilon","hellgorak","latrivan","madareth","zugurosh","ushuriel","golgordan","thornback tortoise","tortoise","eye of the seven","deathslicer","flamethrower","magicthrower","plaguethrower","poisonthrower","shredderthrower","troll champion","frost troll","island troll","swamp troll","troll","banshee","blightwalker","crypt shambler","ghoul","lich","mummy","vampire","grim reaper","trainer","forest dragon","knight","paladin","druid","sorcerer","guard","mercenary","thief","toxiros","pyramo","lazarus","zathroth","goshnar","durin","demora","orc champion","lumenia","dracula","alezzo","prince almirith","elf warlord","random noob","magebomb");
// list of NPCs on ots - names blocked
$config['site']['npc'] = array('alice', 'oarkhal', 'equer', 'parkhal', 'leoric', 'sarkhal', 'pallo', 'riona', 'her miona', 'varkhal', 'eura', 'blitz', 'markhal', 'wengo', 'larkhal');
$config['site']['max_players_per_account'] = 35; // max. number of characters on account


// GUILDS config
$config['site']['guild_need_level'] = 8; // minimum level to create guild
$config['site']['guild_need_pacc'] = 0; // guild need pacc 0 / 1
$config['site']['guild_image_size_kb'] = 50; // maximum size of image in KB
$config['site']['guild_description_chars_limit'] = 1000; // limit of guild description
$config['site']['guild_description_lines_limit'] = 6; // limit of lines, if description has more lines it will be showed as long text, without 'enters'
$config['site']['guild_motd_chars_limit'] = 150; // limit of MOTD (show in game?)


// E-MAIL config
$config['site']['send_emails'] = 0; // is acc. maker configured to send e-mails?
$config['site']['mail_address'] = "[email protected]"; // e-mail address
$config['site']['smtp_enabled'] = "yes"; // send by smtp or mail function (set 0 if use mail function)
$config['site']['smtp_host'] = "smtp.poczta.onet.pl"; // address
$config['site']['smtp_port'] = 25; // port
$config['site']['smtp_auth'] = "yes"; // need authorization? (set 0 if not need auth)
$config['site']['smtp_user'] = "[email protected]"; // login
$config['site']['smtp_pass'] = "secretpassword"; // password



// ACC MAKER OPTIONS config
$config['site']['access_news'] = 2; // access level needed to edit news
$config['site']['access_admin_panel'] = 3; // access level needed to open admin panel
$config['site']['news_big_limit'] = 3; // limit of news on latest news page
$config['site']['news_ticks_limit'] = 5; // limit of ticker news on latest news page
$config['site']['forum_link'] = ""; // link to server forum, leave empty if server doesn't have forum
$config['site']['show_creationdate'] = 1; // show date of character creation 1 = yes, 0 = no (when use Search Player)
$config['site']['last_deaths_limit'] = 40; // max. number of death on last death page
$config['site']['players_group_id_block'] = 4; // don't show in statistics players with group ID higher (or equal) then (show tutors, senior tutors and normal players)
$config['site']['support_group_id'] = 2; // on game masters list show players with group id 2 or higher
$config['site']['shop_system'] = 1; // show server shop page? 1 = yes, 0 = no, use only if you installed LUA scripts of shop
$config['site']['download_page'] = 1; // show download page? 1 = yes, 0 = no
$config['site']['serverinfo_page'] = 1; // show server info page? 1 = yes, 0 = no
$config['site']['verify_code_shop'] = 0; // show verify code when player try to check premium code
$config['site']['gallery_page'] = 1; // show gallery page? 1 = yes, 0 = no
$config['site']['email_lai_sec_interval'] = 180; // time in seconds between e-mails to one account from lost account interface, block spam
$config['site']['show_marriage_info'] = 0; // show marriage, 1 = yes, 0 = no
$config['site']['show_skills_info'] = 0;
$config['site']['show_vip_status'] = 1;// show vip status, 1 = yes, 0 = no
$config['site']['show_vip_storage'] = 0;// the storage of vip
$config['site']['screenoftheday'] = 1;// show screenshot of the dat
// layout, available layouts: rasta,tibiacom,darkritual
$config['site']['layout'] = "darkritual"; // layout name
?>

config.lua not config.php lol
 
I do not have any config.lua
It's just the one up there and this one

PHP:
<?PHP
// ###################### CONFIG ########################
//load page config file
$config['site'] = parse_ini_file('config/config.ini');
include('config/config.php');
//check install
if($config['site']['install'] != "no")
{
	header("Location: install.php");
	exit;
}
//load server config
$config['server'] = parse_ini_file($config['site']['server_path'].'config.lua');
if(isset($config['server']['mysqlHost']))
{
	//new (0.2.6+) ots config.lua file
	$mysqlhost = $config['server']['mysqlHost'];
	$mysqluser = $config['server']['mysqlUser'];
	$mysqlpass = $config['server']['mysqlPass'];
	$mysqldatabase = $config['server']['mysqlDatabase'];
}
elseif(isset($config['server']['sqlHost']))
{
	//old (0.2.4) ots config.lua file
	$mysqlhost = $config['server']['sqlHost'];
	$mysqluser = $config['server']['sqlUser'];
	$mysqlpass = $config['server']['sqlPass'];
	$mysqldatabase = $config['server']['sqlDatabase'];
}
$sqlitefile = $config['server']['sqliteDatabase'];
$passwordency = '';
if(strtolower($config['server']['usesha1Passwords']) == 'yes' || strtolower($config['server']['passwordType']) == 'sha1')
	$passwordency = 'sha1';
if(strtolower($config['server']['passwordType']) == 'sha1')
	$passwordency = 'sha1';
// loads #####POT mainfile#####
include('pot/OTS.php');
// PDO and POT connects to database
$ots = POT::getInstance();
if(strtolower($config['server']['sqlType']) == "mysql")
{
	//connect to MySQL database
	try
	{
		$ots->connect(POT::DB_MYSQL, array('host' => $mysqlhost, 'user' => $mysqluser, 'password' => $mysqlpass, 'database' => $mysqldatabase) );
	}
	catch(PDOException $error)
	{
	    echo 'Database error - can\'t connect to MySQL database. Possible reasons:<br>1. MySQL server is not running on host.<br>2. MySQL user, password, database or host isn\'t configured in: <b>'.$config['site']['server_path'].'config.lua</b> .<br>3. MySQL user, password, database or host is wrong.';
		exit;
	}
}
elseif(strtolower($config['server']['sqlType']) == "sqlite")
{
	//connect to SQLite database
	$link_to_sqlitedatabase = $config['site']['server_path'].$sqlitefile;
	try
	{
		$ots->connect(POT::DB_SQLITE, array('database' => $link_to_sqlitedatabase));
	}
	catch(PDOException $error)
	{
	    echo 'Database error - can\'t open SQLite database. Possible reasons:<br><b>'.$link_to_sqlitedatabase.'</b> - file isn\'t valid SQLite database.<br><b>'.$link_to_sqlitedatabase.'</b> - doesn\'t exist.<br><font color="red">Wrong PHP configuration. Default PHP does not work with SQLite databases!</font>';
		exit;
	}
}
else
{
	echo 'Database error. Unknown database type in <b>'.$config['site']['server_path'].'config.lua</b> . Must be equal to: "<b>mysql</b>" or "<b>sqlite</b>". Now is: "<b>'.strtolower($config['server']['sqlType']).'"</b>';
	exit;
}

$SQL = POT::getInstance()->getDBHandle();
$layout_name = "layouts/".$layout_name = $config['site']['layout'];;
$layout_ini = parse_ini_file($layout_name.'/layout_config.ini');
foreach($layout_ini as $key => $value)
	$config['site'][$key] = $value;
//###################### FUNCTIONS ######################
function isPremium($premdays, $lastday)
{
	return ($premdays - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $lastday))) - date("z", $lastday)) > 0);
}
//save config in ini file
function saveconfig_ini($config)
{
	$file = fopen("config/config.ini", "w");
	foreach($config as $param => $data)
	{
$file_data .= $param.' = "'.str_replace('"', '', $data).'"
';
	}
	rewind($file);
	fwrite($file, $file_data);
	fclose($file);
}
//return password to db
function password_ency($password)
{
	$ency = $GLOBALS['passwordency'];
	if($ency == 'sha1')
		return sha1($password);
	elseif($ency == 'sha1')
		return md5($password);
	elseif($ency == 'sha1')
		return $password;
}
//delete player with name
function delete_player($name) {
	$SQL = $GLOBALS['SQL'];
	$player = new OTS_Player();
	$player->find($name);
	if($player->isLoaded()) {
		try { $SQL->query("DELETE FROM player_skills WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {}
		try { $SQL->query("DELETE FROM guild_invites WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {}
		try { $SQL->query("DELETE FROM player_items WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {}
		try { $SQL->query("DELETE FROM player_depotitems WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {}
		try { $SQL->query("DELETE FROM player_spells WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {}
		try { $SQL->query("DELETE FROM player_storage WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {}
		try { $SQL->query("DELETE FROM player_viplist WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {}
		try { $SQL->query("DELETE FROM player_deaths WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {}
		try { $SQL->query("DELETE FROM player_deaths WHERE killed_by = '".$player->getId()."';"); } catch(PDOException $error) {}
		$rank = $player->getRank();
		if(!empty($rank)) {
			$guild = $rank->getGuild();
			if($guild->getOwner()->getId() == $player->getId()) {
				$rank_list = $guild->getGuildRanksList();
				if(count($rank_list) > 0) {
					$rank_list->orderBy('level');
					foreach($rank_list as $rank_in_guild) {
						$players_with_rank = $rank_in_guild->getPlayersList();
						$players_with_rank->orderBy('name');
						$players_with_rank_number = count($players_with_rank);
						if($players_with_rank_number > 0) {
							foreach($players_with_rank as $player_in_guild) {
								$player_in_guild->setRank();
								$player_in_guild->save();
							}
						}
						$rank_in_guild->delete();
					}
					$guild->delete();
				}
			}
		}
		$player->delete();
		return TRUE;
	}
}

//delete guild with id
function delete_guild($id) {
	$guild = new OTS_Guild();
	$guild->load($id);
	if($guild->isLoaded()) {
		$rank_list = $guild->getGuildRanksList();
		if(count($rank_list) > 0) {
			$rank_list->orderBy('level');
			foreach($rank_list as $rank_in_guild) {
				$players_with_rank = $rank_in_guild->getPlayersList();
				if(count($players_with_rank) > 0) {
					foreach($players_with_rank as $player_in_guild) {
						$player_in_guild->setRank();
						$player_in_guild->save();
					}
				}
				$rank_in_guild->delete();
			}
		}
		$guild->delete();
		return TRUE;
	}
	else
		return FALSE;
}

//is it valid nick?
function check_name($name)//sprawdza name
{
  $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM- [ ] '");
  if ($temp != strlen($name)) {
	return false;
  }
  else
  {
	$ok = "/[a-zA-Z ']{1,25}/";
	return (preg_match($ok, $name))? true: false;
  }
}

//is it valid nick?
function check_account_name($name)//sprawdza name
{
  $temp = strspn("$name", "QWERTYUIOPASDFGHJKLZXCVBNM0123456789");
  if ($temp != strlen($name))
	return false;
  if(strlen($name) > 32)
	return false;
  else
  {
	$ok = "/[A-Z0-9]/";
	return (preg_match($ok, $name))? true: false;
  }
}

//is it valid nick for new char?
function check_name_new_char($name)//sprawdza name
{
	$name_to_check = strtolower($name);
	//first word can't be:
	//names blocked:
	$names_blocked = array('gm','cm', 'god', 'tutor');
	$first_words_blocked = array('gm ','cm ', 'god ','tutor ', "'", '-');
	//name can't contain:
	$words_blocked = array('gamemaster', 'game master', 'game-master', "game'master", '--', "''","' ", " '", '- ', ' -', "-'", "'-", 'fuck', 'sux', 'suck', 'noob', 'tutor');
	foreach($first_words_blocked as $word)
		if($word == substr($name_to_check, 0, strlen($word)))
			return false;
	if(substr($name_to_check, -1) == "'" || substr($name_to_check, -1) == "-")
		return false;
	if(substr($name_to_check, 1, 1) == ' ')
		return false;
	if(substr($name_to_check, -2, 1) == " ")
		return false;
	foreach($names_blocked as $word)
		if($word == $name_to_check)
			return false;
	foreach($GLOBALS['config']['site']['monsters'] as $word)
		if($word == $name_to_check)
			return false;
	foreach($GLOBALS['config']['site']['npc'] as $word)
		if($word == $name_to_check)
			return false;
	for($i = 0; $i < strlen($name_to_check); $i++)
		if($name_to_check[$i-1] == ' ' && $name_to_check[$i+1] == ' ')
			return false;
	foreach($words_blocked as $word)
		if (!(strpos($name_to_check, $word) === false))
			return false;
	for($i = 0; $i < strlen($name_to_check); $i++)
		if($name_to_check[$i] == $name_to_check[($i+1)] && $name_to_check[$i] == $name_to_check[($i+2)])
			return false;
	for($i = 0; $i < strlen($name_to_check); $i++)
		if($name_to_check[$i-1] == ' ' && $name_to_check[$i+1] == ' ')
			return false;
	$temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM- '");
	if ($temp != strlen($name))
		return false;
	else
	{
		$ok = "/[a-zA-Z ']{1,25}/";
		return (preg_match($ok, $name))? true: false;
	}
}

//is rank name valid?
function check_rank_name($name)//sprawdza name
{
  $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789-[ ] ");
  if ($temp != strlen($name)) {
	return false;
  }
  else
  {
	$ok = "/[a-zA-Z ]{1,60}/";
	return (preg_match($ok, $name))? true: false;
  }
}
//is guild name valid?
function check_guild_name($name)
{
  $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789- ");
  if ($temp != strlen($name)) {
	return false;
  }
  else
  {
	$ok = "/[a-zA-Z ]{1,60}/";
	return (preg_match($ok, $name))? true: false;
  }
}
//is it valid password?
function check_password($pass)//sprawdza haslo
{
  $temp = strspn("$pass", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890");
  if ($temp != strlen($pass)) {
  return false;
  }
  else
  {
  $ok = "/[a-zA-Z0-9]{1,40}/";
  return (preg_match($ok, $pass))? true: false;
  }
}
//is it valid e-mail?
function check_mail($email)//sprawdza mail
{
  $ok = "/[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}/";
  return (preg_match($ok, $email))? true: false;
}

//################### DISPLAY FUNCTIONS #####################
//return shorter text (news ticker)
function short_text($text, $chars_limit) 
{
  if (strlen($text) > $chars_limit) 
    return substr($text, 0, strrpos(substr($text, 0, $chars_limit), " ")).'...';
  else return $text;
}
//return text to news msg
function news_place() {
if($GLOBALS['subtopic'] == "latestnews") {
//add tickers to site - without it tickers will not be showed
//$news .= $GLOBALS['news_content'];
/*
//featured article
$layout_name = $GLOBALS['layout_name'];
$news .= '  <div id="featuredarticle" class="Box">
    <div class="Corner-tl" style="background-image:url('.$layout_name.'/images/content/corner-tl.gif);"></div>
    <div class="Corner-tr" style="background-image:url('.$layout_name.'/images/content/corner-tr.gif);"></div>
    <div class="Border_1" style="background-image:url('.$layout_name.'/images/content/border-1.gif);"></div>
    <div class="BorderTitleText" style="background-image:url('.$layout_name.'/images/content/title-background-green.gif);"></div>
    <img class="Title" src="'.$layout_name.'/images/strings/headline-featuredarticle.gif" alt="Contentbox headline" />
    <div class="Border_2">
      <div class="Border_3">
        <div class="BoxContent" style="background-image:url('.$layout_name.'/images/content/scroll.gif);">
<div id=\'TeaserThumbnail\'><img src="'.$layout_name.'/images/news/features.jpg" width=150 height=100 border=0 alt="" /></div><div id=\'TeaserText\'><div style="position: relative; top: -2px; margin-bottom: 2px;" >
<b>Tutaj wpisz tytul</b></div>
tutaj wpisz tresc newsa<br>
zdjecie laduje sie w <i>tibiacom/images/news/features.jpg</i><br>
skad sie laduje mozesz zmienic linijke ponad komentarzem
</div>        </div>
      </div>
    </div>
    <div class="Border_1" style="background-image:url('.$layout_name.'/images/content/border-1.gif);"></div>
    <div class="CornerWrapper-b"><div class="Corner-bl" style="background-image:url('.$layout_name.'/images/content/corner-bl.gif);"></div></div>
    <div class="CornerWrapper-b"><div class="Corner-br" style="background-image:url('.$layout_name.'/images/content/corner-br.gif);"></div></div>
  </div>';
 */
}
return $news;
}
//set monster of week
function logo_monster() {
	return str_replace(" ", "", trim(mb_strtolower($GLOBALS['layout_ini']['logo_monster'])));
}
$statustimeout = 1;
foreach(explode("*", str_replace(" ", "", $config['server']['statusTimeout'])) as $status_var)
	if($status_var > 0)
		$statustimeout = $statustimeout * $status_var;
$statustimeout = $statustimeout / 1000;
$config['status'] = parse_ini_file('config/serverstatus');
if($config['status']['serverStatus_lastCheck']+$statustimeout < time())
{
	$config['status']['serverStatus_checkInterval'] = $statustimeout+3;
	$config['status']['serverStatus_lastCheck'] = time();
	$info = chr(6).chr(0).chr(255).chr(255).'info';
	$sock = @fsockopen("127.0.0.1", $config['server']['statusPort'], $errno, $errstr, 1);
	if ($sock)
	{
		fwrite($sock, $info); 
		$data=''; 
		while (!feof($sock))
			$data .= fgets($sock, 1024);
		fclose($sock);
		preg_match('/players online="(\d+)" max="(\d+)"/', $data, $matches);
		$config['status']['serverStatus_online'] = 1;
		$config['status']['serverStatus_players'] = $matches[1];
		$config['status']['serverStatus_playersMax'] = $matches[2];
		preg_match('/uptime="(\d+)"/', $data, $matches);
		$h = floor($matches[1] / 3600);
		$m = floor(($matches[1] - $h*3600) / 60);
		$config['status']['serverStatus_uptime'] = $h.'h '.$m.'m';
		preg_match('/monsters total="(\d+)"/', $data, $matches);
		$config['status']['serverStatus_monsters'] = $matches[1];
	}
	else
	{
		$config['status']['serverStatus_online'] = 0;
		$config['status']['serverStatus_players'] = 0;
		$config['status']['serverStatus_playersMax'] = 0;
	}
	$file = fopen("config/serverstatus", "w");
	foreach($config['status'] as $param => $data)
	{
$file_data .= $param.' = "'.str_replace('"', '', $data).'"
';
	}
	rewind($file);
	fwrite($file, $file_data);
	fclose($file);
}

//PAGE VIEWS COUNTER :)
$views_counter = "usercounter.dat";
// checking if the file exists
if (file_exists($views_counter)) {
    // het bestand bestaat, waarde + 1
    $actie = fopen($views_counter, "r+"); 
    $page_views = fgets($actie, 9); 
    $page_views++; 
    rewind($actie); 
    fputs($actie, $page_views, 9); 
    fclose($actie); 
}
else
{ 
    // the file doesn't exist, creating a new one with value 1
    $actie = fopen($views_counter, "w"); 
    $page_views = 1; 
    fputs($actie, $page_views, 9); 
    fclose($actie); 
} 
function makeOrder($arr, $order, $default) {
    // Function by Colandus!
    $type = 'asc';
    if(isset($_GET['order'])) {
        $v = explode('_', strrev($_GET['order']), 2);
        if(count($v) == 2)
            if($orderBy = $arr[strrev($v[1])])
                $default = $orderBy;
                $type = (strrev($v[0]) == 'asc' ? 'desc' : 'asc');
    }
    
    return 'ORDER BY ' . $default . ' ' . $type;
}

function getOrder($arr, $order, $this) {
    // Function by Colandus!
    $type = 'asc';
    if($orderBy = $arr[$this])
        if(isset($_GET[$order])) {
            $v = explode('_', strrev($_GET[$order]), 2);
            if(strrev($v[1]) == $this)
                $type = (strrev($v[0]) == 'asc' ? 'desc' : 'asc');
        }
    
    return $this . '_' . $type;
}  

?>
 
I do not have any config.lua
It's just the one up there and this one

PHP:
<?PHP
// ###################### CONFIG ########################
//load page config file
$config['site'] = parse_ini_file('config/config.ini');
include('config/config.php');
//check install
if($config['site']['install'] != "no")
{
	header("Location: install.php");
	exit;
}
//load server config
$config['server'] = parse_ini_file($config['site']['server_path'].'config.lua');
if(isset($config['server']['mysqlHost']))
{
	//new (0.2.6+) ots config.lua file
	$mysqlhost = $config['server']['mysqlHost'];
	$mysqluser = $config['server']['mysqlUser'];
	$mysqlpass = $config['server']['mysqlPass'];
	$mysqldatabase = $config['server']['mysqlDatabase'];
}
elseif(isset($config['server']['sqlHost']))
{
	//old (0.2.4) ots config.lua file
	$mysqlhost = $config['server']['sqlHost'];
	$mysqluser = $config['server']['sqlUser'];
	$mysqlpass = $config['server']['sqlPass'];
	$mysqldatabase = $config['server']['sqlDatabase'];
}
$sqlitefile = $config['server']['sqliteDatabase'];
$passwordency = '';
if(strtolower($config['server']['usesha1Passwords']) == 'yes' || strtolower($config['server']['passwordType']) == 'sha1')
	$passwordency = 'sha1';
if(strtolower($config['server']['passwordType']) == 'sha1')
	$passwordency = 'sha1';
// loads #####POT mainfile#####
include('pot/OTS.php');
// PDO and POT connects to database
$ots = POT::getInstance();
if(strtolower($config['server']['sqlType']) == "mysql")
{
	//connect to MySQL database
	try
	{
		$ots->connect(POT::DB_MYSQL, array('host' => $mysqlhost, 'user' => $mysqluser, 'password' => $mysqlpass, 'database' => $mysqldatabase) );
	}
	catch(PDOException $error)
	{
	    echo 'Database error - can\'t connect to MySQL database. Possible reasons:<br>1. MySQL server is not running on host.<br>2. MySQL user, password, database or host isn\'t configured in: <b>'.$config['site']['server_path'].'config.lua</b> .<br>3. MySQL user, password, database or host is wrong.';
		exit;
	}
}
elseif(strtolower($config['server']['sqlType']) == "sqlite")
{
	//connect to SQLite database
	$link_to_sqlitedatabase = $config['site']['server_path'].$sqlitefile;
	try
	{
		$ots->connect(POT::DB_SQLITE, array('database' => $link_to_sqlitedatabase));
	}
	catch(PDOException $error)
	{
	    echo 'Database error - can\'t open SQLite database. Possible reasons:<br><b>'.$link_to_sqlitedatabase.'</b> - file isn\'t valid SQLite database.<br><b>'.$link_to_sqlitedatabase.'</b> - doesn\'t exist.<br><font color="red">Wrong PHP configuration. Default PHP does not work with SQLite databases!</font>';
		exit;
	}
}
else
{
	echo 'Database error. Unknown database type in <b>'.$config['site']['server_path'].'config.lua</b> . Must be equal to: "<b>mysql</b>" or "<b>sqlite</b>". Now is: "<b>'.strtolower($config['server']['sqlType']).'"</b>';
	exit;
}

$SQL = POT::getInstance()->getDBHandle();
$layout_name = "layouts/".$layout_name = $config['site']['layout'];;
$layout_ini = parse_ini_file($layout_name.'/layout_config.ini');
foreach($layout_ini as $key => $value)
	$config['site'][$key] = $value;
//###################### FUNCTIONS ######################
function isPremium($premdays, $lastday)
{
	return ($premdays - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $lastday))) - date("z", $lastday)) > 0);
}
//save config in ini file
function saveconfig_ini($config)
{
	$file = fopen("config/config.ini", "w");
	foreach($config as $param => $data)
	{
$file_data .= $param.' = "'.str_replace('"', '', $data).'"
';
	}
	rewind($file);
	fwrite($file, $file_data);
	fclose($file);
}
//return password to db
function password_ency($password)
{
	$ency = $GLOBALS['passwordency'];
	if($ency == 'sha1')
		return sha1($password);
	elseif($ency == 'sha1')
		return md5($password);
	elseif($ency == 'sha1')
		return $password;
}
//delete player with name
function delete_player($name) {
	$SQL = $GLOBALS['SQL'];
	$player = new OTS_Player();
	$player->find($name);
	if($player->isLoaded()) {
		try { $SQL->query("DELETE FROM player_skills WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {}
		try { $SQL->query("DELETE FROM guild_invites WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {}
		try { $SQL->query("DELETE FROM player_items WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {}
		try { $SQL->query("DELETE FROM player_depotitems WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {}
		try { $SQL->query("DELETE FROM player_spells WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {}
		try { $SQL->query("DELETE FROM player_storage WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {}
		try { $SQL->query("DELETE FROM player_viplist WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {}
		try { $SQL->query("DELETE FROM player_deaths WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {}
		try { $SQL->query("DELETE FROM player_deaths WHERE killed_by = '".$player->getId()."';"); } catch(PDOException $error) {}
		$rank = $player->getRank();
		if(!empty($rank)) {
			$guild = $rank->getGuild();
			if($guild->getOwner()->getId() == $player->getId()) {
				$rank_list = $guild->getGuildRanksList();
				if(count($rank_list) > 0) {
					$rank_list->orderBy('level');
					foreach($rank_list as $rank_in_guild) {
						$players_with_rank = $rank_in_guild->getPlayersList();
						$players_with_rank->orderBy('name');
						$players_with_rank_number = count($players_with_rank);
						if($players_with_rank_number > 0) {
							foreach($players_with_rank as $player_in_guild) {
								$player_in_guild->setRank();
								$player_in_guild->save();
							}
						}
						$rank_in_guild->delete();
					}
					$guild->delete();
				}
			}
		}
		$player->delete();
		return TRUE;
	}
}

//delete guild with id
function delete_guild($id) {
	$guild = new OTS_Guild();
	$guild->load($id);
	if($guild->isLoaded()) {
		$rank_list = $guild->getGuildRanksList();
		if(count($rank_list) > 0) {
			$rank_list->orderBy('level');
			foreach($rank_list as $rank_in_guild) {
				$players_with_rank = $rank_in_guild->getPlayersList();
				if(count($players_with_rank) > 0) {
					foreach($players_with_rank as $player_in_guild) {
						$player_in_guild->setRank();
						$player_in_guild->save();
					}
				}
				$rank_in_guild->delete();
			}
		}
		$guild->delete();
		return TRUE;
	}
	else
		return FALSE;
}

//is it valid nick?
function check_name($name)//sprawdza name
{
  $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM- [ ] '");
  if ($temp != strlen($name)) {
	return false;
  }
  else
  {
	$ok = "/[a-zA-Z ']{1,25}/";
	return (preg_match($ok, $name))? true: false;
  }
}

//is it valid nick?
function check_account_name($name)//sprawdza name
{
  $temp = strspn("$name", "QWERTYUIOPASDFGHJKLZXCVBNM0123456789");
  if ($temp != strlen($name))
	return false;
  if(strlen($name) > 32)
	return false;
  else
  {
	$ok = "/[A-Z0-9]/";
	return (preg_match($ok, $name))? true: false;
  }
}

//is it valid nick for new char?
function check_name_new_char($name)//sprawdza name
{
	$name_to_check = strtolower($name);
	//first word can't be:
	//names blocked:
	$names_blocked = array('gm','cm', 'god', 'tutor');
	$first_words_blocked = array('gm ','cm ', 'god ','tutor ', "'", '-');
	//name can't contain:
	$words_blocked = array('gamemaster', 'game master', 'game-master', "game'master", '--', "''","' ", " '", '- ', ' -', "-'", "'-", 'fuck', 'sux', 'suck', 'noob', 'tutor');
	foreach($first_words_blocked as $word)
		if($word == substr($name_to_check, 0, strlen($word)))
			return false;
	if(substr($name_to_check, -1) == "'" || substr($name_to_check, -1) == "-")
		return false;
	if(substr($name_to_check, 1, 1) == ' ')
		return false;
	if(substr($name_to_check, -2, 1) == " ")
		return false;
	foreach($names_blocked as $word)
		if($word == $name_to_check)
			return false;
	foreach($GLOBALS['config']['site']['monsters'] as $word)
		if($word == $name_to_check)
			return false;
	foreach($GLOBALS['config']['site']['npc'] as $word)
		if($word == $name_to_check)
			return false;
	for($i = 0; $i < strlen($name_to_check); $i++)
		if($name_to_check[$i-1] == ' ' && $name_to_check[$i+1] == ' ')
			return false;
	foreach($words_blocked as $word)
		if (!(strpos($name_to_check, $word) === false))
			return false;
	for($i = 0; $i < strlen($name_to_check); $i++)
		if($name_to_check[$i] == $name_to_check[($i+1)] && $name_to_check[$i] == $name_to_check[($i+2)])
			return false;
	for($i = 0; $i < strlen($name_to_check); $i++)
		if($name_to_check[$i-1] == ' ' && $name_to_check[$i+1] == ' ')
			return false;
	$temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM- '");
	if ($temp != strlen($name))
		return false;
	else
	{
		$ok = "/[a-zA-Z ']{1,25}/";
		return (preg_match($ok, $name))? true: false;
	}
}

//is rank name valid?
function check_rank_name($name)//sprawdza name
{
  $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789-[ ] ");
  if ($temp != strlen($name)) {
	return false;
  }
  else
  {
	$ok = "/[a-zA-Z ]{1,60}/";
	return (preg_match($ok, $name))? true: false;
  }
}
//is guild name valid?
function check_guild_name($name)
{
  $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789- ");
  if ($temp != strlen($name)) {
	return false;
  }
  else
  {
	$ok = "/[a-zA-Z ]{1,60}/";
	return (preg_match($ok, $name))? true: false;
  }
}
//is it valid password?
function check_password($pass)//sprawdza haslo
{
  $temp = strspn("$pass", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890");
  if ($temp != strlen($pass)) {
  return false;
  }
  else
  {
  $ok = "/[a-zA-Z0-9]{1,40}/";
  return (preg_match($ok, $pass))? true: false;
  }
}
//is it valid e-mail?
function check_mail($email)//sprawdza mail
{
  $ok = "/[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}/";
  return (preg_match($ok, $email))? true: false;
}

//################### DISPLAY FUNCTIONS #####################
//return shorter text (news ticker)
function short_text($text, $chars_limit) 
{
  if (strlen($text) > $chars_limit) 
    return substr($text, 0, strrpos(substr($text, 0, $chars_limit), " ")).'...';
  else return $text;
}
//return text to news msg
function news_place() {
if($GLOBALS['subtopic'] == "latestnews") {
//add tickers to site - without it tickers will not be showed
//$news .= $GLOBALS['news_content'];
/*
//featured article
$layout_name = $GLOBALS['layout_name'];
$news .= '  <div id="featuredarticle" class="Box">
    <div class="Corner-tl" style="background-image:url('.$layout_name.'/images/content/corner-tl.gif);"></div>
    <div class="Corner-tr" style="background-image:url('.$layout_name.'/images/content/corner-tr.gif);"></div>
    <div class="Border_1" style="background-image:url('.$layout_name.'/images/content/border-1.gif);"></div>
    <div class="BorderTitleText" style="background-image:url('.$layout_name.'/images/content/title-background-green.gif);"></div>
    <img class="Title" src="'.$layout_name.'/images/strings/headline-featuredarticle.gif" alt="Contentbox headline" />
    <div class="Border_2">
      <div class="Border_3">
        <div class="BoxContent" style="background-image:url('.$layout_name.'/images/content/scroll.gif);">
<div id=\'TeaserThumbnail\'><img src="'.$layout_name.'/images/news/features.jpg" width=150 height=100 border=0 alt="" /></div><div id=\'TeaserText\'><div style="position: relative; top: -2px; margin-bottom: 2px;" >
<b>Tutaj wpisz tytul</b></div>
tutaj wpisz tresc newsa<br>
zdjecie laduje sie w <i>tibiacom/images/news/features.jpg</i><br>
skad sie laduje mozesz zmienic linijke ponad komentarzem
</div>        </div>
      </div>
    </div>
    <div class="Border_1" style="background-image:url('.$layout_name.'/images/content/border-1.gif);"></div>
    <div class="CornerWrapper-b"><div class="Corner-bl" style="background-image:url('.$layout_name.'/images/content/corner-bl.gif);"></div></div>
    <div class="CornerWrapper-b"><div class="Corner-br" style="background-image:url('.$layout_name.'/images/content/corner-br.gif);"></div></div>
  </div>';
 */
}
return $news;
}
//set monster of week
function logo_monster() {
	return str_replace(" ", "", trim(mb_strtolower($GLOBALS['layout_ini']['logo_monster'])));
}
$statustimeout = 1;
foreach(explode("*", str_replace(" ", "", $config['server']['statusTimeout'])) as $status_var)
	if($status_var > 0)
		$statustimeout = $statustimeout * $status_var;
$statustimeout = $statustimeout / 1000;
$config['status'] = parse_ini_file('config/serverstatus');
if($config['status']['serverStatus_lastCheck']+$statustimeout < time())
{
	$config['status']['serverStatus_checkInterval'] = $statustimeout+3;
	$config['status']['serverStatus_lastCheck'] = time();
	$info = chr(6).chr(0).chr(255).chr(255).'info';
	$sock = @fsockopen("127.0.0.1", $config['server']['statusPort'], $errno, $errstr, 1);
	if ($sock)
	{
		fwrite($sock, $info); 
		$data=''; 
		while (!feof($sock))
			$data .= fgets($sock, 1024);
		fclose($sock);
		preg_match('/players online="(\d+)" max="(\d+)"/', $data, $matches);
		$config['status']['serverStatus_online'] = 1;
		$config['status']['serverStatus_players'] = $matches[1];
		$config['status']['serverStatus_playersMax'] = $matches[2];
		preg_match('/uptime="(\d+)"/', $data, $matches);
		$h = floor($matches[1] / 3600);
		$m = floor(($matches[1] - $h*3600) / 60);
		$config['status']['serverStatus_uptime'] = $h.'h '.$m.'m';
		preg_match('/monsters total="(\d+)"/', $data, $matches);
		$config['status']['serverStatus_monsters'] = $matches[1];
	}
	else
	{
		$config['status']['serverStatus_online'] = 0;
		$config['status']['serverStatus_players'] = 0;
		$config['status']['serverStatus_playersMax'] = 0;
	}
	$file = fopen("config/serverstatus", "w");
	foreach($config['status'] as $param => $data)
	{
$file_data .= $param.' = "'.str_replace('"', '', $data).'"
';
	}
	rewind($file);
	fwrite($file, $file_data);
	fclose($file);
}

//PAGE VIEWS COUNTER :)
$views_counter = "usercounter.dat";
// checking if the file exists
if (file_exists($views_counter)) {
    // het bestand bestaat, waarde + 1
    $actie = fopen($views_counter, "r+"); 
    $page_views = fgets($actie, 9); 
    $page_views++; 
    rewind($actie); 
    fputs($actie, $page_views, 9); 
    fclose($actie); 
}
else
{ 
    // the file doesn't exist, creating a new one with value 1
    $actie = fopen($views_counter, "w"); 
    $page_views = 1; 
    fputs($actie, $page_views, 9); 
    fclose($actie); 
} 
function makeOrder($arr, $order, $default) {
    // Function by Colandus!
    $type = 'asc';
    if(isset($_GET['order'])) {
        $v = explode('_', strrev($_GET['order']), 2);
        if(count($v) == 2)
            if($orderBy = $arr[strrev($v[1])])
                $default = $orderBy;
                $type = (strrev($v[0]) == 'asc' ? 'desc' : 'asc');
    }
    
    return 'ORDER BY ' . $default . ' ' . $type;
}

function getOrder($arr, $order, $this) {
    // Function by Colandus!
    $type = 'asc';
    if($orderBy = $arr[$this])
        if(isset($_GET[$order])) {
            $v = explode('_', strrev($_GET[$order]), 2);
            if(strrev($v[1]) == $this)
                $type = (strrev($v[0]) == 'asc' ? 'desc' : 'asc');
        }
    
    return $this . '_' . $type;
}  

?>

in the server folder ....
 
PHP:
-- The Forgotten Server Config
 
-- Account manager
accountManager = false
namelockManager = true
newPlayerChooseVoc = true
newPlayerSpawnPosX = 32242
newPlayerSpawnPosY = 32776
newPlayerSpawnPosZ = 7
newPlayerTownId = 1
newPlayerLevel = 8
newPlayerMagicLevel = 0
generateAccountNumber = false
generateAccountSalt = false
 
-- Unjustified kills.
useFragHandler = true
redSkullLength = 30 * 24 * 60 * 60
blackSkullLength = 45 * 24 * 60 * 60
dailyFragsToRedSkull = 3
weeklyFragsToRedSkull = 5
monthlyFragsToRedSkull = 10
dailyFragsToBlackSkull = dailyFragsToRedSkull
weeklyFragsToBlackSkull = weeklyFragsToRedSkull
monthlyFragsToBlackSkull = monthlyFragsToRedSkull
dailyFragsToBanishment = dailyFragsToRedSkull
weeklyFragsToBanishment = weeklyFragsToRedSkull
monthlyFragsToBanishment = monthlyFragsToRedSkull
blackSkulledDeathHealth = 40
blackSkulledDeathMana = 0
useBlackSkull = true
advancedFragList = false
 
-- Banishments
notationsToBan = 3
warningsToFinalBan = 4
warningsToDeletion = 5
banLength = 7 * 24 * 60 * 60
killsBanLength = 7 * 24 * 60 * 60
finalBanLength = 30 * 24 * 60 * 60
ipBanishmentLength = 1 * 24 * 60 * 60
broadcastBanishments = true
maxViolationCommentSize = 200
violationNameReportActionType = 2
autoBanishUnknownBytes = false
 
-- Battle
worldType = "open"
protectionLevel = 50
pvpTileIgnoreLevelAndVocationProtection = true
pzLocked = 60 * 1000
huntingDuration = 60 * 1000
criticalHitChance = 7
criticalHitMultiplier = 1
displayCriticalHitNotify = true
removeWeaponAmmunition = true
removeWeaponCharges = true
removeRuneCharges = true
whiteSkullTime = 15 * 60 * 1000
noDamageToSameLookfeet = false
showHealingDamage = true
showHealingDamageForMonsters = true
fieldOwnershipDuration = 5 * 1000
stopAttackingAtExit = false
loginProtectionPeriod = 10 * 1000
deathLostPercent = 10
stairhopDelay = 2 * 1000
pushCreatureDelay = 2 * 1000
deathContainerId = 1987
gainExperienceColor = 215
addManaSpentInPvPZone = true
squareColor = 0
allowFightback = true
fistBaseAttack = 7
 
-- Connection config
worldId = 0
ip =
bindOnlyGlobalAddress = false
loginPort = 7171
gamePort = 7172
loginTries = 10
retryTimeout = 5 * 1000
loginTimeout = 60 * 1000
maxPlayers = 1000
motd = "Welcome to 
displayOnOrOffAtCharlist = false
onePlayerOnlinePerAccount = true
allowClones = false
serverName = "
loginMessage = "Welcome to 
statusTimeout = 5 * 60 * 1000
replaceKickOnLogin = true
forceSlowConnectionsToDisconnect = false
loginOnlyWithLoginServer = false
premiumPlayerSkipWaitList = false
 
-- Database
sqlType = "mysql"
sqlHost = "localhost"
sqlPort = 3306
sqlUser = "
sqlPass = 
sqlDatabase = ""
sqlFile = "mysql.sql"
sqlKeepAlive = 0
mysqlReadTimeout = 10
mysqlWriteTimeout = 10
encryptionType = "sha1"
 
-- Deathlist
deathListEnabled = true
deathListRequiredTime = 1 * 60 * 1000
deathAssistCount = 19
maxDeathRecords = 5
 
-- Guilds
ingameGuildManagement = false
levelToFormGuild = 8
premiumDaysToFormGuild = 0
guildNameMinLength = 4
guildNameMaxLength = 20
 
-- Highscores
highscoreDisplayPlayers = 15
updateHighscoresAfterMinutes = 60
 
-- Houses
buyableAndSellableHouses = true
houseNeedPremium = true
bedsRequirePremium = true
levelToBuyHouse = 1
housesPerAccount = 0
houseRentAsPrice = false
housePriceAsRent = false
housePriceEachSquare = 1000
houseRentPeriod = "never"
houseCleanOld = 0
guildHalls = true
 
-- Item usage
timeBetweenActions = 200
timeBetweenExActions = 1000
hotkeyAimbotEnabled = true
 
-- Map
mapName = "forgotten.otbm"
mapAuthor = "Komic"
randomizeTiles = true
storeTrash = true
cleanProtectedZones = true
mailboxDisabledTowns = ""
 
-- Process
defaultPriority = "high"
niceLevel = 5
coresUsed = "-1"
 
-- Startup
startupDatabaseOptimization = true
updatePremiumStateAtStartup = true
confirmOutdatedVersion = false
 
-- Spells
formulaLevel = 5.0
formulaMagic = 1.0
bufferMutedOnSpellFailure = false
spellNameInsteadOfWords = false
emoteSpells = false
 
-- Outfits
allowChangeOutfit = true
allowChangeColors = true
allowChangeAddons = true
disableOutfitsForPrivilegedPlayers = false
addonsOnlyPremium = true
 
-- Miscellaneous
dataDirectory = "data/"
logsDirectory = "data/logs/"
bankSystem = true
displaySkillLevelOnAdvance = false
promptExceptionTracerErrorBox = true
maximumDoorLevel = 500
maxMessageBuffer = 4
 
-- VIP list
separateVipListPerCharacter = false
vipListDefaultLimit = 20
vipListDefaultPremiumLimit = 100
 
-- Saving-related
saveGlobalStorage = true
useHouseDataStorage = false
storePlayerDirection = false
 
-- Loot
checkCorpseOwner = true
monsterLootMessage = 3
monsterLootMessageType = 25
 
-- Ghost mode
ghostModeInvisibleEffect = false
ghostModeSpellEffects = true
 
-- Limits
idleWarningTime = 14 * 60 * 1000
idleKickTime = 15 * 60 * 1000
reportsExpirationAfterReads = 1
playerQueryDeepness = 2
tileLimit = 0
protectionTileLimit = 0
houseTileLimit = 0
 
-- Premium-related
freePremium = true
premiumForPromotion = true
 
-- Blessings
blessings = true
blessingOnlyPremium = true
blessingReductionBase = 30
blessingReductionDecrement = 5
eachBlessReduction = 8
 
-- Rates
experienceStages = true
rateExperience = 100
rateExperienceFromPlayers = 0
rateSkill = 50
rateMagic = 25
rateLoot = 3
rateSpawn = 2
 
-- Monster rates
rateMonsterHealth = 1.0
rateMonsterMana = 1.0
rateMonsterAttack = 1.0
rateMonsterDefense = 1.0
 
-- Experience from players
minLevelThresholdForKilledPlayer = 0.9
maxLevelThresholdForKilledPlayer = 1.1
 
-- Stamina
rateStaminaLoss = 1
rateStaminaGain = 3
rateStaminaThresholdGain = 12
staminaRatingLimitTop = 40 * 60
staminaRatingLimitBottom = 14 * 60
staminaLootLimit = 14 * 60
rateStaminaAboveNormal = 1.5
rateStaminaUnderNormal = 0.5
staminaThresholdOnlyPremium = true
 
-- Party
experienceShareRadiusX = 30
experienceShareRadiusY = 30
experienceShareRadiusZ = 1
experienceShareLevelDifference = 2 / 3
extraPartyExperienceLimit = 20
extraPartyExperiencePercent = 5
experienceShareActivity = 2 * 60 * 1000
 
-- Global save
globalSaveEnabled = true
globalSaveHour = 8
globalSaveMinute = 0
shutdownAtGlobalSave = true
cleanMapAtGlobalSave = false
 
-- Spawns
deSpawnRange = 2
deSpawnRadius = 50
 
-- Summons
maxPlayerSummons = 2
teleportAllSummons = false
teleportPlayerSummons = false
 
-- Status
statusPort = 7171
ownerName = "Dan The Man"
ownerEmail = "[email protected]"
url = "http://hysteria.zapto.org/"
location = "Europe"
displayGamemastersWithOnlineCommand = false
 
-- Logs
displayPlayersLogging = true
prefixChannelLogs = ""
runFile = ""
outputLog = ""
truncateLogOnStartup = false
 
-- Manager
managerPort = 7171
managerLogs = true
managerPassword = ""
managerLocalhostOnly = true
managerConnectionsLimit = 1
 
-- Admin
adminPort = 7171
adminLogs = true
adminPassword = ""
adminLocalhostOnly = true
adminConnectionsLimit = 1
adminRequireLogin = true
adminEncryption = ""
adminEncryptionData = ""
url = ""
 
Code:
-- The Forgotten Server Config
 
-- Account manager
accountManager = false
namelockManager = true
newPlayerChooseVoc = true
newPlayerSpawnPosX = 32242
newPlayerSpawnPosY = 32776
newPlayerSpawnPosZ = 7
newPlayerTownId = 1
newPlayerLevel = 8
newPlayerMagicLevel = 0
generateAccountNumber = false
generateAccountSalt = false
 
-- Unjustified kills.
useFragHandler = true
redSkullLength = 30 * 24 * 60 * 60
blackSkullLength = 45 * 24 * 60 * 60
dailyFragsToRedSkull = 3
weeklyFragsToRedSkull = 5
monthlyFragsToRedSkull = 10
dailyFragsToBlackSkull = dailyFragsToRedSkull
weeklyFragsToBlackSkull = weeklyFragsToRedSkull
monthlyFragsToBlackSkull = monthlyFragsToRedSkull
dailyFragsToBanishment = dailyFragsToRedSkull
weeklyFragsToBanishment = weeklyFragsToRedSkull
monthlyFragsToBanishment = monthlyFragsToRedSkull
blackSkulledDeathHealth = 40
blackSkulledDeathMana = 0
useBlackSkull = true
advancedFragList = false
 
-- Banishments
notationsToBan = 3
warningsToFinalBan = 4
warningsToDeletion = 5
banLength = 7 * 24 * 60 * 60
killsBanLength = 7 * 24 * 60 * 60
finalBanLength = 30 * 24 * 60 * 60
ipBanishmentLength = 1 * 24 * 60 * 60
broadcastBanishments = true
maxViolationCommentSize = 200
violationNameReportActionType = 2
autoBanishUnknownBytes = false
 
-- Battle
worldType = "open"
protectionLevel = 50
pvpTileIgnoreLevelAndVocationProtection = true
pzLocked = 60 * 1000
huntingDuration = 60 * 1000
criticalHitChance = 7
criticalHitMultiplier = 1
displayCriticalHitNotify = true
removeWeaponAmmunition = true
removeWeaponCharges = true
removeRuneCharges = true
whiteSkullTime = 15 * 60 * 1000
noDamageToSameLookfeet = false
showHealingDamage = true
showHealingDamageForMonsters = true
fieldOwnershipDuration = 5 * 1000
stopAttackingAtExit = false
loginProtectionPeriod = 10 * 1000
deathLostPercent = 10
stairhopDelay = 2 * 1000
pushCreatureDelay = 2 * 1000
deathContainerId = 1987
gainExperienceColor = 215
addManaSpentInPvPZone = true
squareColor = 0
allowFightback = true
fistBaseAttack = 7
 
-- Connection config
worldId = 0
ip =
bindOnlyGlobalAddress = false
loginPort = 7171
gamePort = 7172
loginTries = 10
retryTimeout = 5 * 1000
loginTimeout = 60 * 1000
maxPlayers = 1000
motd = "Welcome to 
displayOnOrOffAtCharlist = false
onePlayerOnlinePerAccount = true
allowClones = false
serverName = "
loginMessage = "Welcome to 
statusTimeout = 5 * 60 * 1000
replaceKickOnLogin = true
forceSlowConnectionsToDisconnect = false
loginOnlyWithLoginServer = false
premiumPlayerSkipWaitList = false
 
-- Database
sqlType = "mysql"
sqlHost = "localhost"
sqlPort = 3306
sqlUser = "
sqlPass = 
sqlDatabase = ""
sqlFile = "mysql.sql"
sqlKeepAlive = 0
mysqlReadTimeout = 10
mysqlWriteTimeout = 10
encryptionType = "plain"
 
-- Deathlist
deathListEnabled = true
deathListRequiredTime = 1 * 60 * 1000
deathAssistCount = 19
maxDeathRecords = 5
 
-- Guilds
ingameGuildManagement = false
levelToFormGuild = 8
premiumDaysToFormGuild = 0
guildNameMinLength = 4
guildNameMaxLength = 20
 
-- Highscores
highscoreDisplayPlayers = 15
updateHighscoresAfterMinutes = 60
 
-- Houses
buyableAndSellableHouses = true
houseNeedPremium = true
bedsRequirePremium = true
levelToBuyHouse = 1
housesPerAccount = 0
houseRentAsPrice = false
housePriceAsRent = false
housePriceEachSquare = 1000
houseRentPeriod = "never"
houseCleanOld = 0
guildHalls = true
 
-- Item usage
timeBetweenActions = 200
timeBetweenExActions = 1000
hotkeyAimbotEnabled = true
 
-- Map
mapName = "forgotten.otbm"
mapAuthor = "Komic"
randomizeTiles = true
storeTrash = true
cleanProtectedZones = true
mailboxDisabledTowns = ""
 
-- Process
defaultPriority = "high"
niceLevel = 5
coresUsed = "-1"
 
-- Startup
startupDatabaseOptimization = true
updatePremiumStateAtStartup = true
confirmOutdatedVersion = false
 
-- Spells
formulaLevel = 5.0
formulaMagic = 1.0
bufferMutedOnSpellFailure = false
spellNameInsteadOfWords = false
emoteSpells = false
 
-- Outfits
allowChangeOutfit = true
allowChangeColors = true
allowChangeAddons = true
disableOutfitsForPrivilegedPlayers = false
addonsOnlyPremium = true
 
-- Miscellaneous
dataDirectory = "data/"
logsDirectory = "data/logs/"
bankSystem = true
displaySkillLevelOnAdvance = false
promptExceptionTracerErrorBox = true
maximumDoorLevel = 500
maxMessageBuffer = 4
 
-- VIP list
separateVipListPerCharacter = false
vipListDefaultLimit = 20
vipListDefaultPremiumLimit = 100
 
-- Saving-related
saveGlobalStorage = true
useHouseDataStorage = false
storePlayerDirection = false
 
-- Loot
checkCorpseOwner = true
monsterLootMessage = 3
monsterLootMessageType = 25
 
-- Ghost mode
ghostModeInvisibleEffect = false
ghostModeSpellEffects = true
 
-- Limits
idleWarningTime = 14 * 60 * 1000
idleKickTime = 15 * 60 * 1000
reportsExpirationAfterReads = 1
playerQueryDeepness = 2
tileLimit = 0
protectionTileLimit = 0
houseTileLimit = 0
 
-- Premium-related
freePremium = true
premiumForPromotion = true
 
-- Blessings
blessings = true
blessingOnlyPremium = true
blessingReductionBase = 30
blessingReductionDecrement = 5
eachBlessReduction = 8
 
-- Rates
experienceStages = true
rateExperience = 100
rateExperienceFromPlayers = 0
rateSkill = 50
rateMagic = 25
rateLoot = 3
rateSpawn = 2
 
-- Monster rates
rateMonsterHealth = 1.0
rateMonsterMana = 1.0
rateMonsterAttack = 1.0
rateMonsterDefense = 1.0
 
-- Experience from players
minLevelThresholdForKilledPlayer = 0.9
maxLevelThresholdForKilledPlayer = 1.1
 
-- Stamina
rateStaminaLoss = 1
rateStaminaGain = 3
rateStaminaThresholdGain = 12
staminaRatingLimitTop = 40 * 60
staminaRatingLimitBottom = 14 * 60
staminaLootLimit = 14 * 60
rateStaminaAboveNormal = 1.5
rateStaminaUnderNormal = 0.5
staminaThresholdOnlyPremium = true
 
-- Party
experienceShareRadiusX = 30
experienceShareRadiusY = 30
experienceShareRadiusZ = 1
experienceShareLevelDifference = 2 / 3
extraPartyExperienceLimit = 20
extraPartyExperiencePercent = 5
experienceShareActivity = 2 * 60 * 1000
 
-- Global save
globalSaveEnabled = true
globalSaveHour = 8
globalSaveMinute = 0
shutdownAtGlobalSave = true
cleanMapAtGlobalSave = false
 
-- Spawns
deSpawnRange = 2
deSpawnRadius = 50
 
-- Summons
maxPlayerSummons = 2
teleportAllSummons = false
teleportPlayerSummons = false
 
-- Status
statusPort = 7171
ownerName = "Dan The Man"
ownerEmail = "[email protected]"
url = "http://hysteria.zapto.org/"
location = "Europe"
displayGamemastersWithOnlineCommand = false
 
-- Logs
displayPlayersLogging = true
prefixChannelLogs = ""
runFile = ""
outputLog = ""
truncateLogOnStartup = false
 
-- Manager
managerPort = 7171
managerLogs = true
managerPassword = ""
managerLocalhostOnly = true
managerConnectionsLimit = 1
 
-- Admin
adminPort = 7171
adminLogs = true
adminPassword = ""
adminLocalhostOnly = true
adminConnectionsLimit = 1
adminRequireLogin = true
adminEncryption = ""
adminEncryptionData = ""
url = ""

make a new account and test.
 
Back
Top