Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Travian[X, Z] - Noob Central

Status
Not open for further replies.
Junior Spellweaver
Joined
Jan 7, 2012
Messages
147
Reaction score
100
FAQ's and Help for n00bs

Ok, so basically the Travian section is generally noobs asking for help, usually stuff that has been written 10's of times on the forum, so to help the noobs and give them PROPER answers I thought it would be a good idea to make a central area for the most common problems and how to fix them.


Important!

This is for TravianX, TravianZ, (Maybe TrafianT4 (I think that is mainy based on TravianX)), NOT Dboor, Tatar etc.
You have to realise these versions have BUGS and limitations!!
Do not read this if you expect me to tell you how to fix battle or automation bugs.
Travian[X, Z] is the best!!
If you say these are "poop" then I wait for you to release something better.

Most important bugs:
1) Battle, sometimes troops vanish, double or do some crazy stuff, this is complicated stuff.
2) Troop starvation, this does not exist.
3) Alliance chat doesn't work.
4) Some minor issues, e.g. Alliance and Market




Downloads:

TravianX:
TravianZ:




Problem: How do I populate oases?
Fix: Create a file in the root folder, the one with GameEngine and Templates in, call it "populateOasis.php" or something:

PHP:
<?php
include("GameEngine/Account.php");

$connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
$selectdata = mysql_select_db(SQL_DB, $connection);

if($session->access == ADMIN)
{
	$database->populateOasis();
	$database->populateOasisUnitsLow();
	$database->populateOasisUnitsHigh();
	echo "<p>Oases populated</p>";
}
else
{
	die("You are not admin");
}

mysql_close();
?>


======================================================


Problem: I want to edit the news boxes on the side.
Fix: There is the option to display or hide the news boxes, if you want to show more, or hide a news box:
In "GameEngine/config.php" you will find (lines 131-138):

PHP:
//////////////////////////////////
// ****  NEWSBOX SETTINGS  **** //
//////////////////////////////////
//true = enabled
//false = disabled
define("NEWSBOX1", true);
define("NEWSBOX2", true);
define("NEWSBOX3", false);

You can hide them by choosing false.

To edit the content of the newsboxes: "Templates/News/newsbox[1,2,3].tpl"


======================================================


Problem: I want to give players [x] gold when they sign up, how?
Fix: 1) Go to PHPMyAdmin
2) Go to users table
3) Go to Structure
4) Find "gold" and click change (next to the pencil)
5) Find default, change the drop down box to "As Defined:" (I think it is by default)
6) Change the textbox to the amount of gold everyone starts with
7) Click Save
8) All done, Every player that registers will start with this amount of gold.


======================================================


Problem: I want to chang the speed of my server, troops and warehouse capacity, how?
Fix: Look around "GameEngine/config.php", you can change all the settings here.


======================================================


Problem: How do I edit the initial message sent by Support?
Fix: You can edit this message in "Admin/welcome.tpl":

PHP:
Hello %USER%,

Thank you for registering on our server.
Since the %START% at %TIME% Romans, Gauls and Teutons attack each other on this game world. Right now, %PLAYERS% players in %ALLI% Alliances are fighting for supremacy. 

TravianX Team

You can edit this (and add HTML I think) as you wish.


======================================================


Problem: I have the server setup to email players with activation code, how di I edit the email?
Fix: This is a little more involved, You can edit the class Mailer in "GameEngine/Mailer.php":

Here is a file I edited (I fixed the bug that doesn't include the server address, the wrong variable was used)

PHP:
<?php
#################################################################################
##              -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =-                 ##
## --------------------------------------------------------------------------- ##
##  Filename       Mailer.php                                                  ##
##  Developed by:  Dixie                                                       ##
##  License:       TravianX Project                                            ##
##  Copyright:     TravianX (c) 2010-2011. All rights reserved.                ##
##  Improved:      aggenkeech                                                  ##
#################################################################################

class Mailer
{
	function sendActivate($email, $username, $pass, $act)
	{
		$time = date('h:i:s', time());
		$date = date('d-m-Y', time());
		$subject = "Welcome to ".SERVER_NAME;
		$message = "Hello ".$username."

Thank you for your registration at ".$time." on ".$date."

<table>
	<tr>
		<td>Usermame:</td>
		<td>".$username."</td>
	</tr>
	<tr>
		<td>Password:</td>
		<td>".$pass."</td>
	</tr>
	<tr>
		<td>Activation code:</td>
		<td>".$act."</td>
	</tr>
</table>


When you would like to join the game click <a target=\"_blank\" href=\"".HOMEPAGE."activate.php?code=".$act."\">activate account</a>

Greetings,
".SERVER_NAME."";
				
		$headers = "From: Mailer@".SERVER_NAME."\n";
		$headers .= 'MIME-Version: 1.0' . "\r\n";
		$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
		mail($email, $subject, $message, $headers);
	}
};
$mailer = new Mailer;
?>


======================================================


Problem: I want to automate medals, how do I do this?
Fix: This is a little more advanced too, and won't work for everyone, we will use somthing called a cronjob.

The file you want to download is I UPLOADED WRONG FILE, WILL UPLOAD SOON
This file is exactly the same as "medals.php" except it is automated, e.g. no protection (doesn't check if user is admin because it is a cronjob we can't do this) and no prevention (anyone can run this).


I reccomend 2 things:
1) Rename this file to something obscure, only you know.
2) Create a .htaccess file and add "Options -Indexes" to it, so no one can see the structure of your site.


To add a cronjob (in cPanel):

Go to cronjobs,
ON the common settings dropdown box, choose once a day, or how often you wan to give medals.
Command:

PHP:
php-q /home/user/path/to/trav/server/yourrenamedcronjobfile.php

Add an email if you wish to get a report.

and Add new cronjob.




======================================================


More coming soon.
 
Last edited:
Elite Diviner
Joined
Aug 26, 2011
Messages
495
Reaction score
109
FAQ's and Help for n00bs

Ok, so basically the Travian section is generally noobs asking for help, usually stuff that has been written 10's of times on the forum, so to help the noobs and give them PROPER answers I thought it would be a good idea to make a central area for the most common problems and how to fix them.


Important!

This is for TravianX, TravianZ, (Maybe TrafianT4 (I think that is mainy based on TravianX)), NOT Dboor, Tatar etc.
You have to realise these versions have BUGS and limitations!!
Do not read this if you expect me to tell you how to fix battle or automation bugs.
Travian[X, Z] is the best!!
If you say these are "poop" then I wait for you to release something better.

Most important bugs:
1) Battle, sometimes troops vanish, double or do some crazy stuff, this is complicated stuff.
2) Troop starvation, this does not exist.
3) Alliance chat doesn't work.
4) Some minor issues, e.g. Alliance and Market




Downloads:

TravianX:
TravianZ:




Problem: How do I populate oases?
Fix: Create a file in the root folder, the one with GameEngine and Templates in, call it "populateOasis.php" or something:

PHP:
<?php
include("GameEngine/Account.php");

$connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
$selectdata = mysql_select_db(SQL_DB, $connection);

if($session->access == ADMIN)
{
	$database->populateOasis();
	$database->populateOasisUnitsLow();
	$database->populateOasisUnitsHigh();
	echo "<p>Oases populated</p>";
}
else
{
	die("You are not admin");
}

mysql_close();
?>


======================================================


Problem: I want to edit the news boxes on the side.
Fix: There is the option to display or hide the news boxes, if you want to show more, or hide a news box:
In "GameEngine/config.php" you will find (lines 131-138):

PHP:
//////////////////////////////////
// ****  NEWSBOX SETTINGS  **** //
//////////////////////////////////
//true = enabled
//false = disabled
define("NEWSBOX1", true);
define("NEWSBOX2", true);
define("NEWSBOX3", false);

You can hide them by choosing false.

To edit the content of the newsboxes: "Templates/News/newsbox[1,2,3].tpl"


======================================================


Problem: I want to give players [x] gold when they sign up, how?
Fix: 1) Go to PHPMyAdmin
2) Go to users table
3) Go to Structure
4) Find "gold" and click change (next to the pencil)
5) Find default, change the drop down box to "As Defined:" (I think it is by default)
6) Change the textbox to the amount of gold everyone starts with
7) Click Save
8) All done, Every player that registers will start with this amount of gold.


======================================================


Problem: I want to chang the speed of my server, troops and warehouse capacity, how?
Fix: Look around "GameEngine/config.php", you can change all the settings here.


======================================================


Problem: How do I edit the initial message sent by Support?
Fix: You can edit this message in "Admin/welcome.tpl":

PHP:
Hello %USER%,

Thank you for registering on our server.
Since the %START% at %TIME% Romans, Gauls and Teutons attack each other on this game world. Right now, %PLAYERS% players in %ALLI% Alliances are fighting for supremacy. 

TravianX Team

You can edit this (and add HTML I think) as you wish.


======================================================


Problem: I have the server setup to email players with activation code, how di I edit the email?
Fix: This is a little more involved, You can edit the class Mailer in "GameEngine/Mailer.php":

Here is a file I edited (I fixed the bug that doesn't include the server address, the wrong variable was used)

PHP:
<?php
#################################################################################
##              -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =-                 ##
## --------------------------------------------------------------------------- ##
##  Filename       Mailer.php                                                  ##
##  Developed by:  Dixie                                                       ##
##  License:       TravianX Project                                            ##
##  Copyright:     TravianX (c) 2010-2011. All rights reserved.                ##
##  Improved:      aggenkeech                                                  ##
#################################################################################

class Mailer
{
	function sendActivate($email, $username, $pass, $act)
	{
		$time = date('h:i:s', time());
		$date = date('d-m-Y', time());
		$subject = "Welcome to ".SERVER_NAME;
		$message = "Hello ".$username."

Thank you for your registration at ".$time." on ".$date."

<table>
	<tr>
		<td>Usermame:</td>
		<td>".$username."</td>
	</tr>
	<tr>
		<td>Password:</td>
		<td>".$pass."</td>
	</tr>
	<tr>
		<td>Activation code:</td>
		<td>".$act."</td>
	</tr>
</table>


When you would like to join the game click <a target=\"_blank\" href=\"".HOMEPAGE."activate.php?code=".$act."\">activate account</a>

Greetings,
".SERVER_NAME."";
				
		$headers = "From: Mailer@".SERVER_NAME."\n";
		$headers .= 'MIME-Version: 1.0' . "\r\n";
		$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
		mail($email, $subject, $message, $headers);
	}
};
$mailer = new Mailer;
?>


======================================================


Problem: I want to automate medals, how do I do this?
Fix: This is a little more advanced too, and won't work for everyone, we will use somthing called a cronjob.

The file you want to download is .
This file is exactly the same as "medals.php" except it is automated, e.g. no protection (doesn't check if user is admin because it is a cronjob we can't do this) and no prevention (anyone can run this).


I reccomend 2 things:
1) Rename this file to something obscure, only you know.
2) Create a .htaccess file and add "Options -Indexes" to it, so no one can see the structure of your site.


To add a cronjob (in cPanel):

Go to cronjobs,
ON the common settings dropdown box, choose once a day, or how often you wan to give medals.
Command:

PHP:
php-q /home/user/path/to/trav/server/yourrenamedcronjobfile.php

Add an email if you wish to get a report.

and Add new cronjob.




======================================================


More coming soon.


i fixed activation, alliance chat and market work almost 100% on my version (except trade routes for goldclub)
 
Newbie Spellweaver
Joined
May 27, 2012
Messages
39
Reaction score
1
Awesome, helped me with welcome message :)

Maybe next to come would be how to change server time displayed on header of the game? :)

I was searching but nothing viable came up, and it would mean a lot to me :)

Keep up the good work :)
 
Joined
Sep 25, 2011
Messages
710
Reaction score
318
Awesome, helped me with welcome message :)

Maybe next to come would be how to change server time displayed on header of the game? :)

I was searching but nothing viable came up, and it would mean a lot to me :)

Keep up the good work :)


Try with this method

Go to GameEngine/Config.php
add this on the top

date_default_timezone_set('Europe/London');

Choose your timezone from here >>>
 
Junior Spellweaver
Joined
Oct 3, 2008
Messages
117
Reaction score
1
how to fix map bug and attack bug and i have Coordinates do not exist
 
Newbie Spellweaver
Joined
Apr 19, 2013
Messages
6
Reaction score
0
Travian Z is have a bug, in barrack and stable when who training 1000 or 5000 soldier after time its going 4242451242 soldier...
 
Experienced Elementalist
Joined
Jul 24, 2011
Messages
268
Reaction score
58
Travian Z is have a bug, in barrack and stable when who training 1000 or 5000 soldier after time its going 4242451242 soldier...

Yes that's a known bug, but the fix is not public yet.
 
Status
Not open for further replies.
Back
Top