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!

TravianZ Official (yi12345) - bugs list

Skilled Illusionist
Joined
Mar 9, 2011
Messages
391
Reaction score
120
You don`t have any option on Profile to set what to do your owner like real travian

NarcisRO - TravianZ Official (yi12345) - bugs list - RaGEZONE Forums
 
Newbie Spellweaver
Joined
Dec 1, 2013
Messages
25
Reaction score
0
i run server and some player can bug.
1. bug in medals ( in begining one player have 50 medal )
2.bug in statistiken.php ( player type one page word in your name )
3. bug in advance plus ( when you don't have gold in begining play with buy troop or resources game give you many gold )
 
Skilled Illusionist
Joined
Jun 24, 2010
Messages
351
Reaction score
360
i run server and some player can bug.
3. bug in advance plus ( when you don't have gold in begining play with buy troop or resources game give you many gold )

==============================
fix advanceplus
file \Templates\Plus\3.tpl
==============================
find line code:
PHP:
<td class="act"><span id="buyres"><a href="#" onclick="return go_submit(2)">Buy</a></span></td>
</tr>
change to:
PHP:
<td class="act"><span id="buyres">';
if($golds['gold'] > 4) {
	echo '
		<a href="#" onclick="return go_submit(1)">Buy';
} else {
	echo '<a href="plus.php"><span class="none">too little gold';
}
echo '</span></a>';
echo '
</td>
</tr>';
find line code:
PHP:
<td class="act"><span id="buytroop"><a href="#" onclick="return go_submit(2)">Buy</a></span></td>
</tr>
change to:
PHP:
<td class="act"><span id="buytroop">';
if($golds['gold'] > 4) {
	echo '
		<a href="#" onclick="return go_submit(2)">Buy';
} else {
	echo '<a href="plus.php"><span class="none">too little gold';
}
echo '</span></a>';
echo '
</td>
</tr>



ronix

sitter account can access like owner
you Fix it ?

not now..may be later
 
Skilled Illusionist
Joined
Mar 9, 2011
Messages
391
Reaction score
120
Advanced plus system is not like original travian. Please stay away to ask that question and ask answers and solution in that topic. This topic is strictly to make a clone 1:1 of Travian.

If you want information about some advanced option of travian you may ask in Help Section.
 
Skilled Illusionist
Joined
Jun 24, 2010
Messages
351
Reaction score
360
=======================================
ADMIN PANEL
Additional Info
=======================================
download file :
unzip and save file:
1. playeradditionalinfo.tpl
2. editAdditional.tpl
to \Admin\Templates\

3. additional.php
save to \GameEngine\Admin\Mods\

=======================================
ADMIN PANEL
fix player rank
file \Admin\Templates\playerinfo.tpl
=======================================
find line code:
PHP:
<td>????<?php /* echo $ranking->searchRank($user['id'], "rank");*/ ?></td>
change to:
PHP:
<td><?php $ranking->procRankArray();echo $ranking->getUserRank($user['id']); ?></td>
======================================
ADMIN PANEL
fix Description player info
======================================
file \Admin\admin.php
---------------------
find line code:
PHP:
session_start();
change to:
PHP:
include_once("../GameEngine/Session.php");
find line code:
PHP:
<body>
change to:
PHP:
<body>
	<script type="text/javascript">
				init_local();
				function getMouseCoords(e) {
					var coords = {};
					if (!e) var e = window.event;
					if (e.pageX || e.pageY) 	{
						coords.x = e.pageX;
						coords.y = e.pageY;
					}
					else if (e.clientX || e.clientY) 	{
						coords.x = e.clientX + document.body.scrollLeft
							+ document.documentElement.scrollLeft;
						coords.y = e.clientY + document.body.scrollTop
							+ document.documentElement.scrollTop;
					}
					return coords;
				}

				function med_mouseMoveHandler(e, desc_string){
					var coords = getMouseCoords(e);
					med_showDescription(coords, desc_string);
				}

				function med_closeDescription(){
					var layer = document.getElementById("medal_mouseover");
					layer.className = "hide";
				}

				function init_local(){
					med_init();
				}

				function med_init(){
					layer = document.createElement("div");
					layer.id = "medal_mouseover";
					layer.className = "hide";
					document.body.appendChild(layer);
				}

				function med_showDescription(coords, desc_string){
					var layer = document.getElementById("medal_mouseover");
					layer.style.top = (coords.y + 25)+ "px";
					layer.style.left = (coords.x - 20) + "px";
					layer.className = "";
					layer.innerHTML = desc_string;
				}
			   </script>
-------------------------------------------
file \GameEngine\Session.php
-------------------------------------------
find and change code to:
PHP:
if(file_exists('GameEngine/config.php') || file_exists('../../GameEngine/config.php') || file_exists('../../config.php') || file_exists('../GameEngine/config.php')) {
}else{
header("Location: install/");
}
---------------------------------------
file \Admin\Templates\player.tpl
---------------------------------------
find line code:
PHP:
	$user = $database->getUserArray($id,1);
change to:
PHP:
	$displayarray = $database->getUserArray($id,1);
	$user=$displayarray;
	$profiel="".$user['desc1']."".md5('skJkev3')."".$user['desc2']."";
	$separator="../";
	require("../Templates/Profile/medal.php");
	$profiel=explode("".md5('skJkev3')."", $profiel);
--------------------------------------
file \Admin\Templates\playerinfo.tpl
--------------------------------------
find every line code:
PHP:
elseif($quest ==37) {$questname = "Finish"; }

<center><?php echo nl2br($user['desc1']); ?></center>

<center><?php echo nl2br($user['desc2']); ?></center>
change to:
PHP:
elseif($quest >=37) {$questname = "Finish"; }

<center><?php echo nl2br($profiel[0]); ?></center>

<center><?php echo nl2br($profiel[1]); ?></center>
---------------------------------
file \Templates\Profile\medal.php
---------------------------------
find line code:
PHP:
	if($session->gpack == null || GP_ENABLE == false) {
	$gpack= GP_LOCATE;
	} else {
	$gpack= $session->gpack;
	}
change to:
PHP:
	$separator=isset($separator)? $separator:"";
	if($session->gpack == null || GP_ENABLE == false) {
	$gpack= $separator.GP_LOCATE;
	} else {
	$gpack= $separator.$session->gpack;
	}

--------------------------------------
file \img\admin\admin.css
--------------------------------------
add line code:
PHP:
#medal_mouseover {
    background-color: #F5F5F5;
    border: 1px solid #BBBBBB;
    padding: 2px 5px;
    position: absolute;
    width: 250px;
    z-index: 999;
}
#medal_mouseover table {
    background: none repeat scroll 0 0 transparent;
}
#medal_mouseover table th, #medal_mouseover table td {
    background: none repeat scroll 0 0 transparent;
}
#medal_mouseover table th {
    padding-right: 10px;
    width: 50px;
}
.hide {
    display: none;
}
 
Last edited:
Newbie Spellweaver
Joined
Dec 1, 2013
Messages
25
Reaction score
0
=======================================

---------------------
find line code:
PHP:
session_start();
change to:
PHP:
include_once("../GameEngine/Session.php");

when i cange this code and i want to go admin panel don't go.
and go to this adress ( Admin/install/ )
 
Skilled Illusionist
Joined
Jun 24, 2010
Messages
351
Reaction score
360
====================
fix cannot find config.php
file \GameEngine\Session.php
========================
find and change to:
PHP:
if(file_exists('GameEngine/config.php') || file_exists('../../GameEngine/config.php') || file_exists('../../config.php') || file_exists('../GameEngine/config.php')) {
}else{
header("Location: install/");
}
 
Newbie Spellweaver
Joined
Dec 1, 2013
Messages
25
Reaction score
0
====================
fix cannot find config.php
file \GameEngine\Session.php
========================
find and change to:
PHP:
if(file_exists('GameEngine/config.php') || file_exists('../../GameEngine/config.php') || file_exists('../../config.php') || file_exists('../GameEngine/config.php')) {
}else{
header("Location: install/");
}

i change and all page was white.
and again i put
PHP:
  session_start();
and alli is well
 
Skilled Illusionist
Joined
Mar 9, 2011
Messages
391
Reaction score
120
@ronix : great work , now works rank , medal and description , culture points , all.

Can you look on map and server maintenance ?
 
Skilled Illusionist
Joined
Jun 24, 2010
Messages
351
Reaction score
360
===========
ADMIN PANEL
===========
fix error call Session.php
file \Admin\admin.php
--------------------------
PHP:
session_start();
include("../GameEngine/Database.php");
include("../GameEngine/Admin/database.php");
include("../GameEngine/config.php");
include("../GameEngine/Data/buidata.php");
// TODO: Should we including Session.php here instead?
include_once ("../GameEngine/Lang/" . LANG . ".php");
change to:
PHP:
session_start();
include_once("../GameEngine/Database.php");
include_once("../GameEngine/Admin/database.php");
include_once("../GameEngine/Data/buidata.php");
include_once ("../GameEngine/Lang/" . LANG . ".php");
----------------------------------
file \Templates\Profile\medal.php
----------------------------------
find and replace:
PHP:
	//gp link
	$separator=isset($separator)? $separator:"";
	$gpack_load=isset($user['gpack'])? $user['gpack']:$database->getUserField($_SESSION['username'], 'gpack', 1);
	if($gpack_load== null || GP_ENABLE == false) {
	$gpack= $separator.GP_LOCATE;
	} else {
	$gpack= $separator.$gpack_load;
	}
-------------------
Fix village info
file \Admin\Templates\village.tpl
----------------------------------
find line code:
PHP:
$exp = $village['exp'.$e.''];
if($exp['wref'] == 0)
change to:
PHP:
$exp = $village['exp'.$e.''];
if($exp == 0)
delete/remark line code: (already call by Session.php in admin.php
PHP:
/*class Generator
	{
		public function getMapCheck($wref)
		{
			return substr(md5($wref),5,2);
		}
	};
	$generator = new Generator;
	*/
find and replace:
PHP:
<td><a href=\"?delOas&oid=\" onClick=\"return del('oas',".$varray[$i]['wref'].")\"><img src=\"../img/admin/del.gif\"></a></td>
---------------
fix rank in delete player
file \Admin\Templates\deletion.tpl
-----------------------------------
find line code:
PHP:
<td>???.</td>
change to:
PHP:
<td><?php $ranking->procRankArray();echo $ranking->getUserRank($user['id']); ?></td>
----------------------------
fix map
-----------------------------
download this zip file:
unzip and save file:
map.tpl to folder \Admin\Templates\

unzip and save file:
map.css
map_0.gif
map_1.gif
map_2.gif
map_3.gif
map_5.gif
map_piece.jpg
to folder \img\admin\

it's look like :
NarcisRO - TravianZ Official (yi12345) - bugs list - RaGEZONE Forums
 
Last edited:
Skilled Illusionist
Joined
Mar 9, 2011
Messages
391
Reaction score
120
@ronix : great job , can you take a look on server maintenence it`s not working ....
 
Skilled Illusionist
Joined
Jun 24, 2010
Messages
351
Reaction score
360
server maintenance has been completed, but I need to test first because it is related to the peace system and sql database.
I will post if it has perfect

============================
fix sitter limit 2 account
fix error msg in account
file \GameEngine\Profile.php
replace function updateAccount
============================
PHP:
	private function updateAccount($post) {
		global $database,$session,$form;
		//fix by ronix
		if($post['pw2'] != "" || $post['pw3']!="") {
			if($post['pw2'] == $post['pw3']) {
				if($database->login($session->username,$post['pw1'])) {
					if ($_POST['uid'] != $session->uid){
						die("Hacking Attempr");
					}else{
						$database->updateUserField($post['uid'],"password",md5($post['pw2']),1);
					}
				}else{
					$form->addError("pw",LOGIN_PW_ERROR);
				}
			}else{
				$form->addError("pw",PASS_MISMATCH);
			}
		}	
		if ($post['email_alt']!="") {
			if($post['email_alt'] == $session->userinfo['email']) {
				$database->updateUserField($post['uid'],"email",$post['email_new'],1);
			}else{
				$form->addError("email",EMAIL_ERROR);
			}
		}	
		if ($post['del']=="1" && $post['del_pw']=="") {
			$form->addError("del",PW_EMPTY);
		}elseif ($post['del_pw']!="") {
			if($post['del'] && md5($post['del_pw']) == $session->userinfo['password']) {
				$database->setDeleting($post['uid'],0);
			}else{
				$form->addError("del",PASS_MISMATCH);
			}
		}	
		if($post['v1'] != "") {
			$sitid = $database->getUserField($post['v1'],"id",1);
			if($sitid == $session->userinfo['sit1'] || $sitid == $session->userinfo['sit2']) {
				$form->addError("sit",SIT_ERROR);
			}elseif($sitid != $session->uid){
				//check player limit 2 sit
				if (count($database->getSitee($sitid))>1) {
					$form->addError("sit",SIT_LIMIT);
				}elseif($session->userinfo['sit1'] == 0) {
					$database->updateUserField($post['uid'],"sit1",$sitid,1);
				}else if($session->userinfo['sit2'] == 0) {
					$database->updateUserField($post['uid'],"sit2",$sitid,1);
				}
			}elseif($sitid == $session->uid){
				$form->addError("sit",SIT_SELF);
			}
		}
		$_SESSION['errorarray'] = $form->getErrors();
		$_SESSION['valuearray'] = $post;
		header("Location: spieler.php?s=3");
	}
----------------------------
file \GameEngine\Lang\en.php
----------------------------
add this:
PHP:
define("SIT_LIMIT","This player has sitter for 2 account");
define("SIT_SELF","Can not sitter for your own account");
-----------------------------------
file \Templates\Profile\account.tpl
-----------------------------------
replace with this:
PHP:
<?php //fix by ronix
//default
$email_alt="";
$email_new="";
if($form->getError("email") != "") {
	$email_alt=$form->getValue("email_alt");
	$email_new=$form->getValue("email_new");
}
$sit=($form->getError("sit") != "")? $form->getValue("v1"):"";

?>
<h1>Player profile</h1>

<?php include("menu.tpl"); ?>
<form action="spieler.php" method="POST">
<input type="hidden" name="ft" value="p3">
<input type="hidden" name="uid" value="<?php echo $session->uid; ?>" />
<table cellpadding="1" cellspacing="1" id="change_pass" class="account">
<thead><tr>
<th colspan="2">Change password</th>
</tr></thead><tbody>
<tr>
<th>Old password</th>
<td><input class="text" type="password" name="pw1" maxlength="30" /></td>
</tr>

<tr>
<th>New password</th>
<td><input class="text" type="password" name="pw2" maxlength="30" /></td>
</tr>
<tr>
<th>Retype New password</th>
<td><input class="text" type="password" name="pw3" maxlength="30" /></td>
</tr></tbody></table>
<?php
if($form->getError("pw") != "") {
echo "<span class=\"error\">".$form->getError('pw')."</span>";
}
?>
<table cellpadding="1" cellspacing="1" id="change_mail" class="account"><thead><tr>
<th colspan="2">Change email</th>

</tr></thead>
<tbody><tr>
<td class="note" colspan="2">Please enter your old and your new e-mail addresses. You will then receive a code snippet at both e-mail addresses which you have to enter here.</td></tr>
<tr>
<th>Old email</th>
<td><input class="text" type="text" name="email_alt" value="<?php echo $email_alt;?>" /></td>
</tr>
<tr>

<th>New email</th>
<td><input class="text" type="text" name="email_new" value="<?php echo $email_new;?>" /></td>
</tr></tbody></table>
<?php
if($form->getError("email") != "") {
echo "<span class=\"error\">".$form->getError('email')."</span>";
}
?>
<table cellpadding="1" cellspacing="1" id="sitter" class="account"><thead>
<tr>
<th colspan="2">Account sitters</th>
</tr></thead>
<tbody><tr>
<td class="note" colspan="2">A sitter can log into your account by using your name and his/her password. You can have up to two sitters.</td>
</tr>
<?php
$count = 0;
if($session->userinfo['sit1'] != 0) $count +=1; if($session->userinfo['sit2'] !=0) $count += 1;
if($count < 2) {
    ?>
<tr>
    <th>Name of the sitter</th>
    <td><input class="text" type="text" name="v1" maxlength="15" value="<?php echo $sit;?>"><span class="count">(<?php echo $count; ?>/2)</span></td>
</tr>
<?php
}
?><tr><td colspan="2" class="sitter">
<?php 
if($form->getError("sit") != "") {
echo "<span class=\"error\">".$form->getError("sit")."</span><br>";
}
if($count == 0) { echo "<span class=\"none\">You have no sitters.</span></td>"; }
if($session->userinfo['sit1'] != 0) {
        echo "<div>";
    echo "<a href=\"spieler.php?s=3&e=3&id=".$session->userinfo['sit1']."&a=".$session->checker."&type=1\"><img class=\"del\" src=\"img/x.gif\" title=\"Remove sitters\" alt=\"Remove sitters\" /></a>";
    echo "<a href=\"spieler.php?uid=".$session->userinfo['sit1']."\">".$database->getUserField($session->userinfo['sit1'],"username",0)."</a>";
    echo "</div>";
}
if($session->userinfo['sit2'] != 0) {
echo "<div>";
echo "<a href=\"spieler.php?s=3&e=3&id=".$session->userinfo['sit2']."&a=".$session->checker."&type=2\"><img class=\"del\" src=\"img/x.gif\" title=\"Remove sitters\" alt=\"Remove sitters\" /></a>";
echo "<a href=\"spieler.php?uid=".$session->userinfo['sit2']."\">".$database->getUserField($session->userinfo['sit2'],"username",0)."</a>";
    echo "</div>";
}
?></tr>
<tr><td class="note" colspan="2">You have been entered as sitter on the following accounts. You can cancel this by clicking the red X.</td></tr><tr><td colspan="2" class="sitter">
<?php
$sitee = $database->getSitee($session->uid);
if(count($sitee) == 0) {
echo "<span class=\"none\">You have no sitters.</span>";
}
else {
foreach($sitee as $sit) {
echo "<div>";
echo "<a href=\"spieler.php?s=3&e=2&id=".$sit['id']."&a=".$session->checker."\"><img class=\"del\" src=\"img/x.gif\" title=\"Remove sitters\" alt=\"Remove sitters\" /></a>";
echo "<a href=\"spieler.php?uid=".$sit['id']."\">".$database->getUserField($sit['id'],"username",0)."</a>";
    echo "</div>";
}
}
?>
</td></tr></table>
<?php
if($form->getError("email") != "") {
echo "<span class=\"error\">".$form->getError('email')."</span>";
}
?>
<table cellpadding="1" cellspacing="1" id="del_acc" class="account"><thead>
<tr>
<th colspan="2">Delete account</th>
</tr>
</thead><tbody>
<tr>
        <td class="note" colspan="2">You can delete your account here. After starting the cancellation it will take three days to complete the cancellation of your account. You can cancel this process within the first 24 hours.</td>
</tr><tr>
<?php
$timestamp = $database->isDeleting($session->uid);
if($timestamp) {
echo "<td colspan=\"2\" class=\"count\">";
echo "<a href=\"spieler.php?s=3&id=".$session->uid."&a=1&e=4\"><img
                class=\"del\" src=\"img/x.gif\" alt=\"Cancel process\"
                title=\"Cancel process\" /> </a>";
                $time=$generator->getTimeFormat(($timestamp-time()));
        echo "The account will be deleted in <span
                id=\"timer1\">".$time."</span> .</td>";
}
else {
?>
<th>Delete account?</th>
        <td class="del_selection">
            <label><input class="radio" type="radio" name="del" value="1" /> Yes</label>
            <label><input class="radio" type="radio" name="del" value="0" checked /> No</label>
        </td>
    </tr>
    <tr>
        <th>Confirm with password:</th>
        <td><input class="text" type="password" name="del_pw" maxlength="30" /></td>
        <?php
        }
?>
</tr></tbody>
</table>
<?php
if($form->getError("del") != "") {
echo "<span class=\"error\">".$form->getError("del")."</span>";
}
?>
<p class="btn"><input type="image" value="" name="s1" id="btn_save" class="dynamic_img" src="img/x.gif" alt="save" /></p>
</form>
 
Skilled Illusionist
Joined
Mar 9, 2011
Messages
391
Reaction score
120
Can you check please medal system. It not works if it`s set on 7 days. Works only if it set 1 day.
 
Back
Top