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 P-Alpha 2.03 (All bases support)

Status
Not open for further replies.
akakori
Joined
Apr 3, 2008
Messages
368
Reaction score
98
dont bother abt the undefined index 3... > <.. its something i cant fix yet..

---------- Post added at 11:21 PM ---------- Previous post was at 11:03 PM ----------

oh yea oh yea.. i manage to fix that.. =D will be up in the next version.. i just fixed the map.. where u click to view the town.. =) ta ta ta..

---------- Post added at 11:47 PM ---------- Previous post was at 11:21 PM ----------

oh ya.. check ur fdata and vdata.. see if there is a village for ur account.. if there is.. den it will work.. if it doesnt.. means smth wrong with it

install.php didnt do a good job creating the accounts.. = =" please erm.. create the account via the register..
 
Elite Diviner
Joined
Aug 15, 2008
Messages
489
Reaction score
43
Nice job.
Hope to see Travian P-Servers soon in the future.

I just downloaded the v3.2.2 through the MediaFire link ( ), and downloaded the Intall.rar and s1.rar. I extracted s1 rar to the s1 folder, and Install.rar to the install folder. I runned the Install.php, and followed the steps till it told me to delete the Install.php (or rename) or delete the install folder, so I deleted the Install folder and went back to the travian/s1, and tried to login, but it keeps telling me (The password is wrong.)

I removed the Travian folder and installed the Travian again, but it seemed not to help.

Just wondering if this Travian Clone is already ready for loggin into the game, or isn't it possible yet?

If you can't help with this, I'll just then wait till the Clone is ready and has most of the stuff done already.

I would like to try out this Travian Clone with my friends, and probably help with finding possible bugs from it.

EDIT: I found out that when registering it doesn't create a new Village for the player to vdata table, which made me unable to Login to the account.
 
Last edited:
Newbie Spellweaver
Joined
Jan 18, 2010
Messages
8
Reaction score
0
create account manually.

---------- Post added at 09:56 PM ---------- Previous post was at 09:52 PM ----------

Offtop if someone wants to look on WW(it is only 94lvl) login in
speed.travian.ru
account: Penetrator
password: Ak47m4awp
 
Last edited:
Newbie Spellweaver
Joined
Jan 18, 2010
Messages
8
Reaction score
0
no it is not your computer..
edit database like on a picture
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Jan 10, 2010
Messages
16
Reaction score
0
ok just so i no, cos my friend can get it to work.

EDIT

Still dont work after i done all of what Fantik.
 
Last edited:
akakori
Joined
Apr 3, 2008
Messages
368
Reaction score
98
Nice job.
Hope to see Travian P-Servers soon in the future.

I just downloaded the v3.2.2 through the MediaFire link ( ), and downloaded the Intall.rar and s1.rar. I extracted s1 rar to the s1 folder, and Install.rar to the install folder. I runned the Install.php, and followed the steps till it told me to delete the Install.php (or rename) or delete the install folder, so I deleted the Install folder and went back to the travian/s1, and tried to login, but it keeps telling me (The password is wrong.)

I removed the Travian folder and installed the Travian again, but it seemed not to help.

Just wondering if this Travian Clone is already ready for loggin into the game, or isn't it possible yet?

If you can't help with this, I'll just then wait till the Clone is ready and has most of the stuff done already.

I would like to try out this Travian Clone with my friends, and probably help with finding possible bugs from it.

EDIT: I found out that when registering it doesn't create a new Village for the player to vdata table, which made me unable to Login to the account.


Note.... 3.2.2 has the latest installation script... do not at any chance use the old one lol... yes.. its almost like a new release each time.. cause as everything is not finalize its hard for me to make a backward compatible version.. so rule of thumb is...

Get the latest version and ignore the old ones.. =)

---------- Post added at 09:12 AM ---------- Previous post was at 09:10 AM ----------

ah just great lol.. i wanted to take a look at all the building's source codes.. beh.. nvm... the password's changed.. xD

Installation of the server unfortunately only supports mysqli for now.. i will make it support mysql soon.. on the next release.. i am currently working on the village view of the karte.php

might be fixing notes and archive system.. if i know how it works.. > >

I will fix the ajax codes for the extended map system soon too..

Other stuff i am working on concurrently would be.. buildings.. =d though i am not a big fan of it > <... its such a hassle..
 
Last edited:
akakori
Joined
Apr 3, 2008
Messages
368
Reaction score
98
3.2.2 is the latest.. unless u are recieving server files from me directly.. lol.. den maybe its 3.3 =)
 
akakori
Joined
Apr 3, 2008
Messages
368
Reaction score
98
simple.. its just a few file change... =d basically.. 4..

install/process.php
Code:
<?php
if(file_exists("include/constant.php")) {
	include("include/database.php");
}
class Process {
			
	function Process() {
		if(isset($_POST['subconst'])) {
				$this->constForm();
		}
		else if(isset($_POST['substruc'])) {
				$this->createStruc();
		}
		else if(isset($_POST['subwdata'])) {
				$this->createWdata();
		}
		else if(isset($_POST['subacc'])) {
				$this->createAcc();
		}
		else{
          header("Location: install.php");
       }
	}
	/*
	$dbuser="username";
$dbpass="password";
$dbname="mydata";  //the name of the database
$chandle = mysql_connect("localhost", $dbuser, $dbpass) 
    or die("Connection Failure to Database");
echo "Connected to database server<br>";
mysql_select_db($dbname, $chandle) or die ($dbname . " Database not found." . $dbuser);
echo "Database " .  $database . " is selected";
mysql_close($chandle);

*/
	function constForm() {
		$myFile = "include/constant.php";
		$fh = fopen($myFile, 'w') or die("can't open file");
		$text = file_get_contents("data/constant_format.tpl");
		$text = preg_replace("'%SERVERNAME%'",$_POST['servername'],$text);
		$text = preg_replace("'%SPEED%'",$_POST['speed'],$text);
		$text = preg_replace("'%UTOUT%'",$_POST['timeout'],$text);
		$text = preg_replace("'%MAX%'",$_POST['wmax'],$text);
		$text = preg_replace("'%EMAILAUTH%'",$_POST['aemail'],$text);
		$text = preg_replace("'%GP%'",$_POST['gpack'],$text);
		$text = preg_replace("'%SSERVER%'",$_POST['sserver'],$text);
		$text = preg_replace("'%SUSER%'",$_POST['suser'],$text);
		$text = preg_replace("'%SPASS%'",$_POST['spass'],$text);
		$text = preg_replace("'%SDB%'",$_POST['sdb'],$text);
		$text = preg_replace("'%PREFIX%'",$_POST['prefix'],$text);
		$text = preg_replace("'%CONNECTT%'", $_POST['connectt'], $text);
		fwrite($fh, $text);
		if(file_exists("include/constant.php")) {
		header("Location: install.php?s=2");
		}
		else {
			header("Location: install.php?s=1&c=1");
		}
		fclose($fh);
	}
	
	function createStruc() {
		global $database;
		$str = file_get_contents("data/structure.sql");
		$str = preg_replace("'%PREFIX%'",TB_PREFIX,$str);
		if($database->connection->multi_query($str)) {
			header("Location: install.php?s=3");
		}
		else {
			header("Location: install.php?s=2&c=1");
		}
	}
	
	function createWdata() {
		header("Location: include/wdata.php");
	}
	
	function createAcc() {
		global $database;
		$time = time();
		$q = "INSERT INTO ".TB_PREFIX."USERS VALUES (0, '".$_POST['user']."', '".md5($_POST['pass'])."', ".ADMIN.", '".$_POST['email']."', $time, 1, 0, 0, '', 0)";
		if($database->query($q)) {
			if(CONNECT_TYPE) {
		$uid = $database->connection->insert_id;
			}
			else {
				$uid = mysql_insert_id($database->connection);
			}
		$wq2 = "UPDATE ".TB_PREFIX."WDATA set occupied = 1 where id = 320801";
		$database->query($wq2);
		$vname = $_POST['user']."\'s village";
		$q2 = "INSERT into ".TB_PREFIX."VDATA values (320801, $uid, '$vname', 1, 2, 0, 750, 750, 750, 800, 750, 800, $time)";
		$database->query($q2);
		$q3 = "INSERT into ".TB_PREFIX."FDATA (vref, f26,f26t) values(320801, 1,15)";
		$database->query($q3);
		header("Location: install.php?s=5");
		
		}
	}
};

$process = new Process;
?>

install/include/database.php
Code:
<?php
include("constant.php");

class MYSQLi_DB {
	
	var $connection;
	
	function MYSQLi_DB() {
		$this->connection = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB) or die(mysqli_error());
	}
		function query($query) {
		return $this->connection->query($query);
		}
		
};

class MYSQL_DB {
	
	var $connection;
	
	function MYSQL_DB() {
		$this->connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error());
		mysql_select_db(SQL_DB, $this->connection) or die(mysql_error());
	}
	function query($query) {
		return mysql_query($query, $this->connection);
	}
		
};

if(CONNECT_TYPE) {
	$database = new MYSQLi_DB;
}
else {
	$database = new MYSQL_DB;
}
?>

install/templates/config.tpl
Code:
<?php
if(isset($_GET['c']) && $_GET['c'] == 1) {
echo "<div class=\"headline\"><span class=\"f10 c5\">Error creating constant.php check cmod.</span></div><br>";
}
?>
<form action="process.php" method="post" id="dataform">
<div class="lbox">
<span class="f10 c">SERVER RELATED</span>
<table><tr>
<td><span class="f9 c6">Server name:</span></td><td width="140"><input type="text" name="servername" id="servername"></td></tr><tr>
<td><span class="f9 c6">Speed:</span></td><td><input name="speed" type="text" id="speed" value="1"></td></tr><tr>
<td><span class="f9 c6">User Timeout(min):</span></td><td><input name="timeout" type="text" id="timeout" value="10"></td></tr><tr>
<td><span class="f9 c6">World Max:</span></td><td><input name="wmax" type="text" id="wmax" value="400"></td></tr><tr>
<td><span class="f9 c6">Auth Email:</span></td><td><input name="aemail" type="text" id="aemail" value="true"></td></tr><tr>
<td><span class="f9 c6">Graphic Pack:</span></td><td><input name="gpack" type="text" id="gpack" value="false"></td></tr>
</table></div>
<div class="rbox">
<span class="f10 c">SQL RELATED</span>
<table><tr>
<td><span class="f9 c6">SERVER:</span></td><td><input name="sserver" type="text" id="sserver" value="localhost"></td></tr><tr>
<td><span class="f9 c6">USER:</span></td><td><input name="suser" type="text" id="suser" value="root"></td></tr><tr>
<td><span class="f9 c6">PASS:</span></td><td><input type="text" name="spass" id="spass"></td></tr><tr>
<td><span class="f9 c6">DB:</span></td><td><input type="text" name="sdb" id="sdb"></td></tr><tr>
<td><span class="f9 c6">PREFIX:</span></td><td><input type="text" name="prefix" id="prefix"></td></tr>
<td><span class="f9 c6">Connect Type:</span></td><td><select name="connectt">
  <option value="0" selected="selected">MYSQL</option>
  <option value="1">MYSQLi</option>
</select></td></tr>
</table>
<input type="submit" name="Submit" id="Submit" value="Submit">
</div>
<input type="hidden" name="subconst" value="1">
</form>
install/data/constant_format.tpl
Code:
<?php
//%REPLACE%include("../include/news_setting.php");

//Server Stats Defination
define("SERVER_NAME", "%SERVERNAME%");
define("SPEED", %SPEED%); //1 (Normal), 3 (3x Speed)
define("USER_TIMEOUT", %UTOUT%); //Time in Minutes
define("WORLD_MAX", %MAX%); //To put it simply. Eg 5, Max x = +/-5 y = +/-5

//Server Preference Settings
define("EMAIL_AUTH", %EMAILAUTH%); //Auth Email
define("GP_ENABLE", %GP%); //Graphic Pack Usage

//SQL Server Defination
define("SQL_SERVER", "%SSERVER%");
define("SQL_USER", "%SUSER%");
define("SQL_PASS", "%SPASS%");
define("SQL_DB", "%SDB%");
define("TB_PREFIX", "%PREFIX%");
define("CONNECT_TYPE", %CONNECTT%); // 0 = MYSQL, 1 = MYSQLi

//User Access Defination
define("BANNED", 0);
define("ADMIN", 9);
define("MODERATOR", 8);
define("PLUS", 2);
define("USER", 1);
?>
 
Last edited:
akakori
Joined
Apr 3, 2008
Messages
368
Reaction score
98
changing the above 4 files will allow installation script to run with mysql =)
 
om nom nom.
Loyal Member
Joined
Nov 30, 2007
Messages
299
Reaction score
9
Did you udpate it?

Or do I have to update them myself?
 
Joined
Jan 26, 2010
Messages
1
Reaction score
0
i got this error when register new user >> mysql
PHP:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/moneer1/public_html/tr/s1/include/database.php on line 16
 
Newbie Spellweaver
Joined
Dec 20, 2009
Messages
20
Reaction score
0
I can't login, same problem like others, it create user in db, village too, but if i want login it's only refresh please help me
 
Status
Not open for further replies.
Back
Top