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

Gesior's Acc. Maker for 0.3.3/0.3.2 [Bugs Fixxed](including multi-system in)

Fablow

Intermediate OT User
Content Editor
Joined
May 7, 2008
Messages
1,565
Solutions
6
Reaction score
145
Location
Canada
GitHub
Fablow77
Gesior's Account Maker 0.3.3 and 0.3.2.

This is only for account names.

FEATURES:
*Account manager:
-create account (account name, e-mail, verification image, show server rules from file)
-create character (accept names like RL tibia character names, diffrent outfit for male/female, COPY character from database and change name, id, sex, account..., you select character to copy in "admin panel" like.. vocation: Sorcerer, char to copy: Sorcerer Sample, work with unlimited number of vocations, work with new vocations like... ID 94, vocation name: Ninja)
-change password (like on tibia.com)
-change e-mail (like on tibia.com, user must wait before e-mail change, time configurable in "admin panel")
-register account (generate rec-key)
-change character "comment" and set character account information "visible" or "hidden" (like on tibia.com)
-change account public information (location, rl name)
*Spells:
-load spells from OTS spells file (in "admin panel", save informations from file in database)
-set spell hidden/visible(admin) on "spells list" in library, also hide all/visible all
-show list of spells with informations, user can sort from 0 or from highest value (name, sentence, mana, soul, level, maglvl)
-user can select spells only for one vocation (and sort them)
*Monsters:
-load monsters from OTS monsters files (in "admin panel", save informations from files in database)
-set monsters hidden/visible(admin) on "monsters list" in "library", also hide all/visible all
-show list of monsters with informations about every monster (hp, mana, summonable, race) and link to page about every monster
-on page about monster user see also monster "voices" and "immunities"
*Character search:
-show informations about searched player: name, vocation, level, magic level (show yes/no configurable in admin panel), guild, comment, residence (town), last login
-(if player is NOT HIDDEN)show information about his account: account status (pacc/facc), location, rl name, date when account has been created (like tibia.com)
-show list of player deaths (like tibia.com)
-(if player is NOT HIDDEN)show list of other characters from account and "online"/"offline" near every char
*Who is online:
-show list of players online
-user can sort list by name, level or vocation
*Highscores:
-show highscores of players (level, magic level and all skills)
-100 players/page, links to next and previous page
*Last Kills/Last Deaths:
-show list of 25 (number configurable in "admin panel") last deaths from database
-rl tibia "death list" format(in table..):
*Houses List:
-show list of houses on OTS and informations about: size, rent, city and "owner"
*Guild System:
-change "guild nick" (this showed in game when you look at someone)
-create guild
-show guilds list (like tibia.com)
-change rank of players with lower rank in guild
For "owner" of guild:
-change guild description
-change guild MOTD
-delete guild
-pass leadership to other mamber of guild
-upload new guild image (size limit in "admin panel")
-add rank
-change rank level (member[1], vice-leader[2], leader[3])
-change rank name
-all what players with lower ranks can
For leaders:
-kick player with lower rank from guild
-all what players with lower ranks can
For vice-leaders:
-invite new player to guild
-cancel invitation
-change rank of players with lower rank
*News System:
-show news icon, post date, text and author
-admin can give rights to write news to every player on server (tutor? gm?)
-add, edit, delete news
-you can use HTML in news!
-javascript scripts to add news
*Admin panel:
-add,edit,delete news, set limit of news
-edit site configuration (default layout and many options: show yes/no)
-set limits of characters per account, lines and chars in guild description and many other
-reload monsters and spells from OTS files
-reload list of vocations from OTS file and set what vocations will be available in "create character" and name of character to copy when player try to create character with selected vocation
-edit maaany other options of acc. maker configuration
*Lost Account Interface:
-player can request e-mail (send only 1 e-mail to one account every XX minutes- config) with link to activate new password
-player can set new e-mail and new password if has recovery key
*Gallery:
-flash animated gallery of pictures
- you add pictures to .../gallery/images/ and to list in pictureslist.xml
*Database manager:
-edit groups, accounts and players
-accounts and groups lists
-find players with same IP or IP RANGE (to find players who change IP)
-open: yourdomain.com/databasemanager/

What is new in this version:
* fixed many small bugs
* work with TFS 0.3 beta/beta2
* config in config.php file, more options configurable
* generate new recovery key
* work with new vocations (vocation ID + promotion level)
* show ban/delete on page
* show online/offline, level, vocation in highscores
* new script for Houses list
* use 'name', not 'account id'
* new characters can't use npc/monster names

Bugs Fixxed:
Installing*
Config-Functions.php-
config.lua - new set-up**
creating character*
creating an account*
includes PAYPAL donations. (follow Artii's tutorial/post.)

Installing Set-UP:
Go to config.lua (in the htdocs) and set up your database and your server name.
Then set the directory: C:/xampp/htdocs/ or where ever you installed xampp (then htdocs).
Then install, and no problems.

Updates!
Added Multi-World System
Edited the PHP Codes IN:
Search Characters
Who Is Online?
Account Management

Soon to edit more advanced:
shop system
guilds
highscores
houses
support list

Im just happy to release this.


ATTENTION: Use the sql file i provide, if you use that, you do NOT need to install,but if you use yours, make sure it's the 0.3.2 or 0.3.3 ones, if you don't it WILL NOT install properly.


Download!
 

Attachments

Last edited by a moderator:
File Info

Report generated: 9.4.2009 at 14.18.10 (GMT 1)
Filename: Gesioracc0.3.3.rar
File size: 3706 KB
MD5 Hash: 46C3CD9141DA38B46D514AB118D59336
SHA1 Hash: E0751BF5C1DEE2201C0EEE511850D4317B69B9D6
Packer detected: Not a valid PE file
Self-Extract Archive: Nothing found
Binder Detector: Nothing found
Detection rate: 0 on 24

Detections

a-squared - Nothing found!
Avira AntiVir - Nothing found!
Avast - Nothing found!
AVG - Nothing found!
BitDefender - Nothing found!
ClamAV - Nothing found!
Comodo - Nothing found!
Dr.Web - Nothing found!
Ewido - Nothing found!
F-PROT 6 - Nothing found!
G DATA - Nothing found!
IkarusT3 - Nothing found!
Kaspersky - Nothing found!
McAfee - Nothing found!
MHR (Malware Hash Registry) - Nothing found!
NOD32 v3 - Nothing found!
Norman - Nothing found!
Panda - Nothing found!
Quick Heal - Nothing found!
Solo Antivirus - Nothing found!
Sophos - Nothing found!
TrendMicro - Nothing found!
VBA32 - Nothing found!
Virus Buster - Nothing found!

Scan report generated by
NoVirusThanks.org


Thanks for posting:)
 
Good job, but nothing special. Multiworld is already released, paypal too.

Well, it's good for those with little\no knowledge of php. It's the whole package, just as easy as the original one, but everything works. So I think he deserves some credit for his work.
 
Account Names:
You can use letter(s) and number(s).

Multi-World:
Like real tibia

Choose your world:
Adlora
Silvera
Premia

Etc..
 
@Aardappel

Admin Control Panel

log in the admin acc. then edit, or edit in

config.php
 
getting this errors;/


Warning: Error parsing C:/Documents and Settings/Administrator/Mijn documenten/cryingdamson3console/cryingdamson3-console/config.lua on line 139 in C:\Documents and Settings\Administrator\Mijn documenten\xampp\htdocs\install.php on line 177

here my install.php:

Code:
<?PHP
$config['site'] = parse_ini_file('config/config.ini');
session_start();
//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);
}

function check_password($pass)
{
  $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;
  }
}

function password_ency($password)
{
	$ency = $GLOBALS['passwordency'];
	if($ency == 'sha1')
		return sha1($password);
	elseif($ency == 'md5')
		return md5($password);
	elseif($ency == '')
		return $password;
}

if($_REQUEST['page'] == '' && !isset($_REQUEST['step'])) {
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=0" />
	<noframes><body>Frames don\'t work. Install Firefox :P</body></noframes>
</frameset>
</html>';
}
if($_REQUEST['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&server_conf=yes" target="step">3. Add tables and columns to DB</a><br>
<a href="install.php?page=step&step=4&server_conf=yes" target="step">4. Add samples to DB</a><br>
<a href="install.php?page=step&step=5&server_conf=yes" target="step">5. Set Admin Account</a><br>
<b>FOR ADMINS:</b><br>
<a href="index.php?subtopic=adminpanel&action=install_monsters" target="step">6. Load Monsters from OTS</a><br>
<a href="index.php?subtopic=adminpanel&action=install_spells" target="step">7. Load Spells from OTS</a><br>';

}
if($_REQUEST['page'] == 'step') {
if($config['site']['install'] != "no") {
if($_REQUEST['server_conf'] == 'yes' || ($_REQUEST['step'] > 2 && $_REQUEST['step'] < 6)) {
//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']['useMD5Passwords']) == 'yes' || strtolower($config['server']['passwordType']) == 'md5') {
	$passwordency = 'md5';
}
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.';
		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();
}
$step = $_REQUEST['step'];
if(empty($step)) {
$step = $config['site']['install'];
}
if($step == 'start') {
echo '<h1>STEP '.$step.'</h1>Informations<br>';
echo 'Welcome to Gesior Account Maker installer. <b>First do steps 1-5 one by one, later (when you will be logged on admin account) press on links to steps 6-11 to load configuration from OTS.</b>';
}
if($step == '1') {
if(isset($_REQUEST['server_path'])) {
	echo '<h1>STEP '.$step.'</h1>Check server configuration<br>';
	$config['site']['server_path'] = $_REQUEST['server_path'];
	$config['site']['server_path'] = trim($config['site']['server_path'])."\\";
	$config['site']['server_path'] = str_replace("\\\\", "/", $config['site']['server_path']);
	$config['site']['server_path'] = str_replace("\\", "/", $config['site']['server_path']);
	$config['site']['server_path'] = str_replace("//", "/", $config['site']['server_path']);
	saveconfig_ini($config['site']);
	if(file_exists($config['site']['server_path'].'config.lua')) {
		$config['server'] = parse_ini_file($config['site']['server_path'].'config.lua');
		if(isset($config['server']['sqlType'])) {
			$config['site']['install'] = 2;
			saveconfig_ini($config['site']);
			echo 'File <b>config.lua</b> loaded from <font color="red"><i>'.$config['site']['server_path'].'config.lua</i></font> and 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>'.$config['site']['server_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 'Can\'t load file <b>config.lua</b> from <font color="red"><i>'.$config['site']['server_path'].'config.lua</i></font> File doesn\'t exist in selected directory. <a href="install.php?page=step&step=1">Go to STEP 1 - select other directory.</a>';
	}
}
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="'.$config['site']['server_path'].'" /><input type="hidden" name="page" value="step" /><input type="hidden" name="step" value="1" /><input type="submit" value="Set server path" />
</form>';
}
}
if($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&server_conf=yes">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.';
//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']['useMD5Passwords']) == 'yes' || strtolower($config['server']['passwordType']) == 'md5') {
	$passwordency = 'md5';
}
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.';
		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();
$config['site']['install'] = 3;
saveconfig_ini($config['site']);
}
if($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>';
		$config['server'] = parse_ini_file($config['site']['server_path'].'config.lua');
		if($config['server']['sqlType'] == "sqlite") {
			//if sqlite
			try { $SQL->query('ALTER TABLE accounts ADD "key" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
			try { $SQL->query('ALTER TABLE accounts ADD "page_lastday" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
			try { $SQL->query('ALTER TABLE accounts ADD "email_new" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
			try { $SQL->query('ALTER TABLE accounts ADD "email_new_time" INTEGER(15) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
			try { $SQL->query('ALTER TABLE accounts ADD "created" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
			try { $SQL->query('ALTER TABLE accounts ADD "rlname" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
			try { $SQL->query('ALTER TABLE accounts ADD "location" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
			try { $SQL->query('ALTER TABLE accounts ADD "page_access" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
			try { $SQL->query('ALTER TABLE accounts ADD "email_code" VARCHAR(255) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
			try { $SQL->query('ALTER TABLE accounts ADD "next_email" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
			try { $SQL->query('ALTER TABLE accounts ADD "premium_points" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
			echo "Added columns to table <b>accounts</b>.<br/>";
			try { $SQL->query('ALTER TABLE guilds ADD "description" TEXT NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
			try { $SQL->query('ALTER TABLE guilds ADD "logo_gfx_name" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
			echo "Added columns to table <b>guilds</b>.<br/>";
			try { $SQL->query('ALTER TABLE players ADD "online" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
			try { $SQL->query('ALTER TABLE players ADD "created" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
			try { $SQL->query('ALTER TABLE players ADD "nick_verify" VARCHAR(5) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
			try { $SQL->query('ALTER TABLE players ADD "hide_char" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
			try { $SQL->query('ALTER TABLE players ADD "comment" TEXT NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
			echo "Added columns to table <b>players</b>.<br/>";
			try { $SQL->query('CREATE TABLE "z_news_big" (
						"hide_news" INTEGER NOT NULL DEFAULT 0,
						"date" INTEGER NOT NULL,
						"author" VARCHAR(255) NOT NULL,
						"author_id" INTEGER NOT NULL,
						"image_id" INTEGER NOT NULL DEFAULT 0,
						"topic" VARCHAR(255) NOT NULL,
						"text" TEXT NOT NULL);'); } catch(PDOException $error) {}
			echo "Added table <b>z_news_big</b> (news).<br/>";
			try { $SQL->query('CREATE TABLE "z_news_tickers" (
						"date" INTEGER NOT NULL,
						"author" INTEGER NOT NULL,
						"image_id" INTEGER NOT NULL DEFAULT 0,
						"text" TEXT NOT NULL,
						"hide_ticker" INTEGER NOT NULL DEFAULT 0);'); } catch(PDOException $error) {}
			echo "Added table <b>z_news_tickers</b> (tickers).<br/>";
			try { $SQL->query('CREATE TABLE "z_spells" (
						"name" VARCHAR(255) NOT NULL,
						"spell" VARCHAR(255) NOT NULL,
						"spell_type" VARCHAR(255) NOT NULL,
						"mana" INTEGER NOT NULL DEFAULT 0,
						"lvl" INTEGER NOT NULL DEFAULT 0,
						"mlvl" INTEGER NOT NULL DEFAULT 0,
						"soul" INTEGER NOT NULL DEFAULT 0,
						"pacc" VARCHAR(255) NOT NULL,
						"vocations" VARCHAR(255) NOT NULL,
						"conj_count" INTEGER NOT NULL DEFAULT 0,
						"hide_spell" INTEGER NOT NULL DEFAULT 0);'); } catch(PDOException $error) {}
			echo "Added table <b>z_spells</b> (spells list).<br/>";
			try { $SQL->query('CREATE TABLE "z_monsters" (
			  "hide_creature" INTEGER NOT NULL DEFAULT 0,
			  "name" VARCHAR(255) NOT NULL,
			  "mana" INTEGER NOT NULL,
			  "exp" INTEGER NOT NULL,
			  "health" INTEGER NOT NULL,
			  "speed_lvl" INTEGER NOT NULL DEFAULT 1,
			  "use_haste" INTEGER NOT NULL,
			  "voices" text NOT NULL,
			  "immunities" VARCHAR(255) NOT NULL,
			  "summonable" INTEGER NOT NULL,
			  "convinceable" INTEGER NOT NULL,
			  "race" VARCHAR(255) NOT NULL,
			  "gfx_name" VARCHAR(255) NOT NULL)'); } catch(PDOException $error) {}
			echo 'Added table <b>z_monsters</b> (monsters list).<br/>';
		}
		elseif($config['server']['sqlType'] == "mysql")
		{
			//if mysql
			try { $SQL->query("ALTER TABLE `accounts` ADD `key` VARCHAR( 20 ) NOT NULL DEFAULT '0';"); } catch(PDOException $error) {}
			try { $SQL->query("ALTER TABLE `accounts` ADD `page_lastday` INT( 11 ) NOT NULL;"); } catch(PDOException $error) {}
			try { $SQL->query("ALTER TABLE `accounts` ADD `email_new` VARCHAR( 255 ) NOT NULL;"); } catch(PDOException $error) {}
			try { $SQL->query("ALTER TABLE `accounts` ADD `email_new_time` INT( 15 ) NOT NULL;"); } catch(PDOException $error) {}
			try { $SQL->query("ALTER TABLE `accounts` ADD `created` INT( 11 ) NOT NULL DEFAULT '0';"); } catch(PDOException $error) {}
			try { $SQL->query("ALTER TABLE `accounts` ADD `rlname` VARCHAR( 255 ) NOT NULL DEFAULT '';"); } catch(PDOException $error) {}
			try { $SQL->query("ALTER TABLE `accounts` ADD `location` VARCHAR( 255 ) NOT NULL DEFAULT '';"); } catch(PDOException $error) {}
			try { $SQL->query("ALTER TABLE `accounts` ADD `page_access` INT( 11 ) NOT NULL DEFAULT '0';"); } catch(PDOException $error) {}
			try { $SQL->query("ALTER TABLE `accounts` ADD `email_code` VARCHAR( 255 ) NOT NULL DEFAULT '0';"); } catch(PDOException $error) {}
			try { $SQL->query("ALTER TABLE `accounts` ADD `next_email` INT( 11 ) NOT NULL DEFAULT '0';"); } catch(PDOException $error) {}
			try { $SQL->query("ALTER TABLE `accounts` ADD `premium_points` INT( 11 ) NOT NULL DEFAULT '0';"); } catch(PDOException $error) {}
			echo "Added columns to table <b>accounts</b><br/>";
			try { $SQL->query('ALTER TABLE `guilds` ADD `description` TEXT NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
			try { $SQL->query('ALTER TABLE `guilds` ADD `logo_gfx_name` VARCHAR( 255 ) NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
			echo "Added columns to table <b>guilds</b>.<br/>";
			try { $SQL->query("ALTER TABLE `players` ADD `online` INT( 11 ) NOT NULL DEFAULT '0';"); } catch(PDOException $error) {}
			try { $SQL->query("ALTER TABLE `players` ADD `created` INT( 11 ) NOT NULL DEFAULT '0';"); } catch(PDOException $error) {}
			try { $SQL->query("ALTER TABLE `players` ADD `nick_verify` INT( 5 ) NOT NULL DEFAULT '0';"); } catch(PDOException $error) {}
			try { $SQL->query("ALTER TABLE `players` ADD `hide_char` INT( 11 ) NOT NULL DEFAULT '0';"); } catch(PDOException $error) {}
			try { $SQL->query("ALTER TABLE `players` ADD `comment` TEXT NOT NULL;"); } catch(PDOException $error) {}
			echo "Added columns to table <b>players</b><br/>";
			try { $SQL->query("CREATE TABLE `z_news_big` (
						`hide_news` tinyint(1) NOT NULL DEFAULT '0',
						`date` int(11) NOT NULL DEFAULT '0',
						`author` varchar(255) NOT NULL,
						`author_id` int(11) NOT NULL,
						`image_id` int(3) NOT NULL DEFAULT '0',
						`topic` varchar(255) NOT NULL,
						`text` text NOT NULL
						) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); } catch(PDOException $error) {}
			echo "Added table <b>z_news_big</b> (news).<br/>";
			try { $SQL->query("CREATE TABLE `z_news_tickers` (
						`date` int(11) NOT NULL default '1',
						`author` int(11) NOT NULL,
						`image_id` int(3) NOT NULL default '0',
						`text` text NOT NULL,
						`hide_ticker` tinyint(1) NOT NULL
						) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
			echo "Added table <b>z_news_tickers</b> (tickers).<br/>"; } catch(PDOException $error) {}
			try { $SQL->query('CREATE TABLE `z_spells` (
						`name` VARCHAR(255) NOT NULL,
						`spell` VARCHAR(255) NOT NULL,
						`spell_type` VARCHAR(255) NOT NULL,
						`mana` INTEGER NOT NULL DEFAULT 0,
						`lvl` INTEGER NOT NULL DEFAULT 0,
						`mlvl` INTEGER NOT NULL DEFAULT 0,
						`soul` INTEGER NOT NULL DEFAULT 0,
						`pacc` VARCHAR(255) NOT NULL,
						`vocations` VARCHAR(255) NOT NULL,
						`conj_count` INTEGER NOT NULL DEFAULT 0,
						`hide_spell` INTEGER NOT NULL DEFAULT 0);'); } catch(PDOException $error) {}
			echo 'Added table <b>z_spells</b> (spells list).<br/>';
			try { $SQL->query('CREATE TABLE `z_monsters` (
			  `hide_creature` tinyint(1) NOT NULL default \'0\',
			  `name` varchar(255) NOT NULL,
			  `mana` int(11) NOT NULL,
			  `exp` int(11) NOT NULL,
			  `health` int(11) NOT NULL,
			  `speed_lvl` int(11) NOT NULL default \'1\',
			  `use_haste` tinyint(1) NOT NULL,
			  `voices` text NOT NULL,
			  `immunities` varchar(255) NOT NULL,
			  `summonable` tinyint(1) NOT NULL,
			  `convinceable` tinyint(1) NOT NULL,
			  `race` varchar(255) NOT NULL,
			  `gfx_name` varchar(255) NOT NULL
			) ENGINE=MyISAM DEFAULT CHARSET=latin1;'); } catch(PDOException $error) {}
			echo 'Added table <b>z_monsters</b> (monsters list).<br/>';
		}
		$config['site']['install'] = 4;
		saveconfig_ini($config['site']);
	echo 'All tables and columns added to database.<br>Go to <a href="install.php?page=step&step=4&server_conf=yes">STEP 4 - Add samples</a>';
}
if($step == '4') {
echo '<h1>STEP '.$step.'</h1>Add samples to DB:<br>';
$check_news_ticker = $SQL->query('SELECT * FROM z_news_tickers WHERE image_id = 1 AND author = 1 AND hide_ticker = 0 LIMIT 1 OFFSET 0')->fetch();
if(!isset($check_news_ticker['author'])) {
$SQL->query('INSERT INTO z_news_tickers (date, author, image_id, text, hide_ticker) VALUES ('.time().', 1, 1, "Hello! Gesior account manager 0.32beta2 installed. Report bugs to [email protected]", 0)');
echo "Added first news ticker.<br/>";
} else {
echo "News ticker sample is already in database. New sample is not needed.<br/>";
}
$check_news = $SQL->query('SELECT * FROM z_news_big WHERE author = "Gesior" LIMIT 1 OFFSET 0')->fetch();
if(!isset($check_news['author'])) {
$SQL->query('INSERT INTO z_news_big (hide_news, date, author, author_id, image_id, topic, text) VALUES (0, '.time().', "Gesior", 1, 0, "New account manager!", "Gesior account manager 0.32beta2 installed. All options should work fine. Report bugs in acc. maker thread");');
echo "Added first news.<br/>";
} else {
echo "News sample is already in database. New sample is not needed.<br/>";
}
$check_voc_0 = $SQL->query('SELECT * FROM players WHERE name = "Rook Sample" LIMIT 1 OFFSET 0')->fetch();
if(!isset($check_voc_0['name'])) {
$SQL->query('INSERT INTO players (name, group_id, account_id, sex, vocation, experience, level, maglevel, health, healthmax, mana, manamax, manaspent, soul, direction, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, posx, posy, posz, cap, lastlogin, lastip, save, conditions, redskulltime, redskull, guildnick, rank_id, town_id, loss_experience, loss_mana, loss_skills, lastlogout, blessings, premend, online, comment, created, hide_char, nick_verify) VALUES ("Rook Sample", 1, 1, 1, 0, 0, 1, 0, 185, 185, 35, 35, 0, 100,"", 44, 44, 44, 44, 128, 0, 0, 0, 0, 420, "", "", 1,"","","","","","1","","","","","","","","",'.time().',1,1)');
echo "Added 'Rook Sample' character.<br/>";
} else {
echo "Character 'Rook Sample' already in database.<br/>";
}
$check_voc_1 = $SQL->query('SELECT * FROM players WHERE name = "Sorcerer Sample" LIMIT 1 OFFSET 0')->fetch();
if(!isset($check_voc_1['name'])) {
$SQL->query('INSERT INTO players (name, group_id, account_id, sex, vocation, experience, level, maglevel, health, healthmax, mana, manamax, manaspent, soul, direction, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, posx, posy, posz, cap, lastlogin, lastip, save, conditions, redskulltime, redskull, guildnick, rank_id, town_id, loss_experience, loss_mana, loss_skills, lastlogout, blessings, premend, online, comment, created, hide_char, nick_verify) VALUES ("Sorcerer Sample", 1, 1, 1, 1, 0, 1, 0, 185, 185, 35, 35, 0, 100,"", 44, 44, 44, 44, 128, 0, 0, 0, 0, 420, "", "", 1,"","","","","","1","","","","","","","","",'.time().',1,1)');
echo "Added 'Sorcerer Sample' character.<br/>";
} else {
echo "Character 'Sorcerer Sample' already in database.<br/>";
}
$check_voc_2 = $SQL->query('SELECT * FROM players WHERE name = "Druid Sample" LIMIT 1 OFFSET 0')->fetch();
if(!isset($check_voc_2['name'])) {
$SQL->query('INSERT INTO players (name, group_id, account_id, sex, vocation, experience, level, maglevel, health, healthmax, mana, manamax, manaspent, soul, direction, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, posx, posy, posz, cap, lastlogin, lastip, save, conditions, redskulltime, redskull, guildnick, rank_id, town_id, loss_experience, loss_mana, loss_skills, lastlogout, blessings, premend, online, comment, created, hide_char, nick_verify) VALUES ("Druid Sample", 1, 1, 1, 2, 0, 1, 0, 185, 185, 35, 35, 0, 100,"", 44, 44, 44, 44, 128, 0, 0, 0, 0, 420, "", "", 1,"","","","","","1","","","","","","","","",'.time().',1,1)');
echo "Added 'Druid Sample' character.<br/>";
} else {
echo "Character 'Druid Sample' already in database.<br/>";
}
$check_voc_3 = $SQL->query('SELECT * FROM players WHERE name = "Paladin Sample" LIMIT 1 OFFSET 0')->fetch();
if(!isset($check_voc_3['name'])) {
$SQL->query('INSERT INTO players (name, group_id, account_id, sex, vocation, experience, level, maglevel, health, healthmax, mana, manamax, manaspent, soul, direction, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, posx, posy, posz, cap, lastlogin, lastip, save, conditions, redskulltime, redskull, guildnick, rank_id, town_id, loss_experience, loss_mana, loss_skills, lastlogout, blessings, premend, online, comment, created, hide_char, nick_verify) VALUES ("Paladin Sample", 1, 1, 1, 3, 0, 1, 0, 185, 185, 35, 35, 0, 100,"", 44, 44, 44, 44, 128, 0, 0, 0, 0, 420, "", "", 1,"","","","","","1","","","","","","","","",'.time().',1,1)');
echo "Added 'Paladin Sample' character.<br/>";
} else {
echo "Character 'Paladin Sample' already in database.<br/>";
}
$check_voc_4 = $SQL->query('SELECT * FROM players WHERE name = "Knight Sample" LIMIT 1 OFFSET 0')->fetch();
if(!isset($check_voc_4['name'])) {
$SQL->query('INSERT INTO players (name, group_id, account_id, sex, vocation, experience, level, maglevel, health, healthmax, mana, manamax, manaspent, soul, direction, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, posx, posy, posz, cap, lastlogin, lastip, save, conditions, redskulltime, redskull, guildnick, rank_id, town_id, loss_experience, loss_mana, loss_skills, lastlogout, blessings, premend, online, comment, created, hide_char, nick_verify) VALUES ("Knight Sample", 1, 1, 1, 4, 0, 1, 0, 185, 185, 35, 35, 0, 100,"", 44, 44, 44, 44, 128, 0, 0, 0, 0, 420, "", "", 1,"","","","","","1","","","","","","","","",'.time().',1,1)');
echo "Added 'Knight Sample' character.<br/>";
} else {
echo "Character 'Knight Sample' already in database.<br/>";
$config['site']['install'] = 5;
saveconfig_ini($config['site']);
echo 'All samples added to database. Now you can go to <a href="install.php?page=step&step=5&server_conf=yes">STEP 5 - Set Admin Account</a><br/>';
}
}
if($step == '5') {
echo '<h1>STEP '.$step.'</h1>Set Admin Account<br>';
$config['server'] = parse_ini_file($config['site']['server_path'].'config.lua');
if(empty($_REQUEST['saveaccpassword'])) {
	echo 'Admin account number 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 number 1 doesn\'t exist installator will create it and set your password.';
	} else {
	$newpass = $_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&server_conf=yes">GO BACK</a> and write other password.';
	else
	{
		$newpass_to_db = password_ency($newpass);
		//ustawienie/stworzenie konta admina
		$account = new OTS_Account();
		$account->load(1);
		if($account->isLoaded())
		{
			//set password
			$account->setPassword($newpass_to_db);
			$account->save();
			$account->setCustomField("page_access", 3);
		}
		else
		{
			//create account
			$number = $account->create(1,1,1);
			$account->setPassword($newpass_to_db);
			$account->unblock();
			$account->save();
			$account->setCustomField("page_access", 3);
		}
		$_SESSION['account'] = 1;
		$_SESSION['password'] = $newpass;
		$logged = TRUE;
		$account->setCustomField("page_lastday", time());
		echo '<h1>Admin account number: 1<br>Admin account password: '.$_POST['newpass'].'</h1><br/><h3>It\'s end of first part of installation. Installation is blocked. From now don\'t modify file config.ini!<br>Press links to STEPs 6-9 in menu.</h3>'; 
		$config['site']['install'] = 'no';
		saveconfig_ini($config['site']);
	}
	}
}
}
else
{
echo "Account maker is already installed! To reinstall open file 'config.ini' in directory 'config' and change:<br/><b>install = \"no\"</b><br/>to:</br><b>install = \"start\"</b><br/>and enter this site again.";
}
}
?>


here my config:
Code:
-- The Forgotten Server Config

	-- Account manager
	accountManager = "no"
	namelockManager = "yes"
	newPlayerChooseVoc = "no"
	newPlayerSpawnPosX = 95
	newPlayerSpawnPosY = 117
	newPlayerSpawnPosZ = 7
	newPlayerTownId = 1
	newPlayerLevel = 1
	newPlayerMagicLevel = 0
	generateAccountNumber = "no"

	-- Banishments
	notationsToBan = 3
	warningsToFinalBan = 4
	warningsToDeletion = 5
	banLength = 7 * 24 * 60 * 60
	finalBanLength = 30 * 24 * 60 * 60
	ipBanishmentLength = 1 * 24 * 60 * 60
	broadcastBanishments = "yes"
	killsToBan = 5
	maxViolationCommentSize = 200
	autoBanishUnknownBytes = "no"

	-- Battle
	-- NOTE: loginProtectionPeriod is the famous Tibia anti-magebomb system.
	-- deathLostPercent set to nil enables manual mode.
	worldType = "pvp"
	hotkeyAimbotEnabled = "yes"
	protectionLevel = 50
	pvpTileIgnoreLevelAndVocationProtection = "yes"
	killsToRedSkull = 3
	pzLocked = 60 * 1000
	criticalHitChance = 7
	criticalHitMultiplier = 1
	displayCriticalHitNotify = "no"
	removeWeaponAmmunition = "no"
	removeWeaponCharges = "yes"
	removeRuneCharges = "yes"
	timeToDecreaseFrags = 24 * 60 * 60 * 1000
	whiteSkullTime = 15 * 60 * 1000
	noDamageToSameLookfeet = "no"
	experienceByKillingPlayers = "no"
	showHealingDamage = "no"
	fieldOwnershipDuration = 5 * 1000
	stopAttackingAtExit = "no"
	oldConditionAccuracy = "no"
	loginProtectionPeriod = 10 * 1000
	deathLostPercent = 10
	stairhopDelay = 2 * 1000

	-- Connection config
	worldId = 0
	ip = "127.0.0.1"
	loginPort = 7171
	gamePort = 7171
	adminPort = 7171
	statusPort = 7171
	loginTries = 10
	retryTimeout = 5 * 1000
	loginTimeout = 60 * 1000
	maxPlayers = "1000"
	motd = "Welcome to Eurapo Online!"
	displayOnOrOffAtCharlist = "no"
	onePlayerOnlinePerAccount = "yes"
	allowClones = 0
	serverName = "Forgotten"
	loginMessage = "Welcome to Eurapo Online!"
	adminLogsEnabled = "no"
	statusTimeout = 5 * 60 * 1000
	replaceKickOnLogin = "yes"
	forceSlowConnectionsToDisconnect = "no"
	loginOnlyWithLoginServer = "no"

	-- Database
	-- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database.
	-- To disable sqlKeepAlive such as mysqlReadTimeout use 0 value.
	sqlType = "mysql"
	sqlHost = "localhost"
	sqlPort = 3306
	sqlUser = "-"
	sqlPass = "-"
	sqlDatabase = "-"
	sqlFile = "forgottenserver.s3db"
	sqlKeepAlive = 0
	mysqlReadTimeout = 10
	passwordType = "plain"

	-- Deathlist
	deathListEnabled = "yes"
	maxDeathRecords = 5

	-- Guilds
	ingameGuildManagement = "yes"
	levelToFormGuild = 8
	guildNameMinLength = 4
	guildNameMaxLength = 20

	-- Highscores
	highscoreDisplayPlayers = 15
	updateHighscoresAfterMinutes = 60

	-- Houses
	buyableAndSellableHouses = "yes"
	houseNeedPremium = "yes"
	bedsRequirePremium = "yes"
	levelToBuyHouse = 50
	housesPerAccount = 0
	houseRentAsPrice = "no"
	housePriceAsRent = "no"
	housePriceEachSquare = 1000
	houseRentPeriod = "never"

	-- Item usage
	timeBetweenActions = 200
	timeBetweenExActions = 1000

	-- Map
	-- NOTE: storeTrash costs more memory, but will perform alot faster cleaning.
	-- useHouseDataStorage usage may be found at README.
	mapName = "dovuxonline"
	mapAuthor = "Komic"
	randomizeTiles = "yes"
	useHouseDataStorage = "no"
	storeTrash = "yes"
	cleanProtectedZones = "yes"

	-- Startup
	-- NOTE: defaultPriority works only on Windows
	defaultPriority = "high"
	optimizeDatabaseAtStartup = "yes"
	removePremiumOnInit = "yes"
	abortOnSocketFailure = "yes"

	-- Miscellaneous
	-- NOTE: promptExceptionTracerErrorBox works only with precompiled support feature,
	-- called "exception tracer" (__EXCEPTION_TRACER__ flag).
	maxMessageBuffer = 4
	kickIdlePlayerAfterMinutes = 15
	allowChangeOutfit = "yes"
	allowChangeColors = "yes"
	allowChangeAddons = "yes"
	disableOutfitsForPrivilegedPlayers = "no"
	bankSystem = "yes"
	saveGlobalStorage = "yes"
	displaySkillLevelOnAdvance = "no"
	spellNameInsteadOfWords = "no"
	emoteSpells = "no"
	expireReportsAfterReads = 1
	promptExceptionTracerErrorBox = "yes"
	storePlayerDirection = "no"
	playerQueryDeepness = 2

	-- Premium-related
	freePremium = "no"
	premiumForPromotion = "yes"

	-- Blessings
	blessingsOnlyPremium = "yes"
	blessingReductionBase = 30
	blessingReductionDecreament = 5

	-- Rates
	-- NOTE: experienceStages configuration is located in data/XML/stages.xml.
	experienceStages = "yes"
	rateExperience = 5.0
	rateSkill = 3.0
	rateMagic = 3.0
	rateLoot = 2
	rateSpawn = 1

	-- Stamina
	-- NOTE: Stamina is stored in miliseconds, so seconds are multiplied by 1000.
	-- rateStaminaHits multiplies every hit done a creature, which are later
	-- multiplied by player attack speed.
	-- rateStaminaGain is multiplying every second of logged out time, eg:
	-- 60 * 1000 / 3 = 20 seconds, what gives 1 stamina minute for 3 being logged off.
	-- rateStaminaThresholdGain is dividing in case the normal gain (that is
	-- multiplied by rateStaminaGain, btw.) passed above threshold, eg:
	-- 60 * 1000 / 3 = 20 / 4 = 5 seconds (3 * 4 = 12 minutes for 1 stamina minute).
	-- staminaRatingLimit* is in minutes.
	rateStaminaLoss = 1
	rateStaminaGain = 1000 / 3
	rateStaminaThresholdGain = 4
	staminaRatingLimitTop = 41 * 60
	staminaRatingLimitBottom = 14 * 60
	rateStaminaAboveNormal = 1.5
	rateStaminaUnderNormal = 0.5
	staminaThresholdOnlyPremium = "yes"

	-- Party
	-- NOTE: experienceShareLevelDifference is float number.
	-- experienceShareLevelDifference is highestLevel * value
	experienceShareRadiusX = 30
	experienceShareRadiusY = 30
	experienceShareRadiusZ = 1
	experienceShareLevelDifference = 2 / 3
	extraPartyExperienceLimit = 20
	extraPartyExperiencePercent = 5

	-- Global save
	-- NOTE: globalSaveHour means like 03:00, not that it will save every 3 hours,
	-- if you want such a system please check out data/globalevents/globalevents.xml.
	globalSaveEnabled = "no"
	globalSaveHour = 8
	shutdownAtGlobalSave = "yes"
	cleanMapAtGlobalSave = "no"

	-- Spawns
	deSpawnRange = 2
	deSpawnRadius = 50

	-- Summons
	maxPlayerSummons = 2
	teleportAllSummons = "no"
	teleportPlayerSummons = "no"

	-- Status
	ownerName = "-"
	ownerEmail = "-"
	url = "-"
	location = "-"
	displayGamemastersWithOnlineCommand = "no"

	-- Logs
	-- NOTE: This kind of logging does not work in GUI version.
	-- For such, please compile the software with __GUI_LOGS__ flag.
	displayPlayersLogging = "yes"
	runeFile = ""
	outLogName = ""
	errorLogName = ""
	truncateLogsOnStartup = "no"
 
Last edited by a moderator:
Installing Set-UP:
Go to config.lua (in the htdocs) and set up your database and your server name.
Then set the directory: C:/xampp/htdocs/ or where ever you installed xampp (then htdocs).
Then install, and no problems.

Epic fail. LOL
 
ok it works but when i click on my acc i go to otland homepage;/

and i want use my own config.lua
 
Last edited by a moderator:
Back
Top