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!

Resetting Game Server for TravianZ (Shadow Version)

Skilled Illusionist
Joined
Jun 24, 2010
Messages
351
Reaction score
360
Using this if your Travian game server is finish.. No need to reinstall.

1) open file \Admin\admin.php
find this line code:
PHP:
<a href="?p=config">Server Settings</a>
then add this line:
PHP:
<a href="?p=resetServer">Server Resetting</a>

2) Copy and save this code to \Admin\Templates\resetServer.tpl
PHP:
<?php
#################################################################################
##              -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =-                 ##
## --------------------------------------------------------------------------- ##
##  Filename       resetServer.tpl                                             ##
##  Developed by:  Ronix                                                       ##
##  License:       TravianZ Project                                            ##
##  Copyright:     TravianZ (c) 2012-2014. All rights reserved.                ##
##                                                                             ##
#################################################################################
?>
<form action="" method="post">
<table id="member">
	<thead>
		<tr>
			<th colspan="2">Server Resetting</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td colspan="2" id="txtreset">
				<br>
				This server will be reset to create new game server.<br>Click button Reset to proceed..<br> 
			</td>
		</tr>
	</tbody>
	<thead>
		<tr id="hideobj">
			<td style="border-right:none; text-align:left"><input name="back" type="button" src="img/x.gif" value="<< back" alt="back" onclick="go_url('../Admin/admin.php')" /></td>
			<td style="border-left:none; text-align:right"><input name="reset" type="button" src="img/x.gif" value="Reset" alt="Reset" onclick="go_proceed()" /></td>
		</tr>
	</thead>	
</table>
</form>
<script type="text/javascript">
	function go_proceed() {
		document.getElementById("txtreset").innerHTML = '<br><center>Please wait..while the server was reset</center><br> ';
		document.getElementById("hideobj").innerHTML = '';
		location="Templates/resetServer.php";
	}
</script>

3) Copy and save this code to \Admin\Templates\resetServer.php
PHP:
<?php
#################################################################################
##              -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =-                 ##
## --------------------------------------------------------------------------- ##
##  Filename       resetServer.php                                             ##
##  Developed by:  Ronix                                                       ##
##  License:       TravianZ Project                                            ##
##  Copyright:     TravianZ (c) 2012-2014. All rights reserved.                ##
##                                                                             ##
#################################################################################

include_once("../../GameEngine/config.php");
include_once("../../GameEngine/Database.php");

mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
mysql_select_db(SQL_DB);

if (!isset($_SESSION)) {
 session_start();
}
if($_SESSION['access'] != ADMIN) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
set_time_limit(0);
mysql_query("TRUNCATE TABLE ".TB_PREFIX."a2b");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."abdata");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."activate");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."active");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."admin_log");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."alidata");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."ali_invite");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."ali_log");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."ali_permission");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."allimedal");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."artefacts");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."attacks");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."banlist");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."bdata");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."build_log");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."chat");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."config");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."deleting");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."demolition");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."diplomacy");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."enforcement");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."farmlist");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."fdata");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."forum_cat");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."forum_edit");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."forum_post");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."forum_survey");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."forum_topic");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."general");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."gold_fin_log");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."hero");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."illegal_log");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."links");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."login_log");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."market");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."market_log");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."mdata");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."medal");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."movement");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."ndata");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."online");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."password");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."prisoners");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."raidlist");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."research");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."route");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."send");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."tdata");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."tech_log");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."training");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."units");
$time=time();
mysql_query("TRUNCATE TABLE ".TB_PREFIX."odata");

$database->populateOasisdata();
$database->populateOasis();
$database->populateOasisUnits2();
$uid=$database->getVillageID(5);

$passw=md5('123456');
mysql_query("TRUNCATE TABLE ".TB_PREFIX."users");
mysql_query("INSERT INTO ".TB_PREFIX."users (id, username, password, email, tribe, access, gold, gender, birthday, location, desc1, desc2, plus, b1, b2, b3, b4, sit1, sit2, alliance, sessid, act, timestamp, ap, apall, dp, dpall, protect, quest, gpack, cp, lastupdate, RR, Rc, ok) VALUES
(5, 'Multihunter', '".$passw."', 'multihunter@travianx.mail', 0, 9, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0),
(1, 'Support', '', 'support@travianx.mail', 0, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0),
(2, 'Nature', '', 'support@travianx.mail', 4, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0),
(4, 'Taskmaster', '', 'support@travianx.mail', 0, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0)");

mysql_query("INSERT INTO ".TB_PREFIX."units (vref) VALUES ($uid)");
mysql_query("INSERT INTO ".TB_PREFIX."tdata (vref) VALUES ($uid)");

mysql_query("INSERT INTO ".TB_PREFIX."fdata (vref, f1t, f2t, f3t, f4t, f5t, f6t, f7t, f8t, f9t, f10t, f11t, f12t, f13t, f14t, f15t, f16t, f17t, f18t, f26, f26t, wwname) VALUES ($uid, '1', '4', '1', '3', '2',  '2', '3', '4', '4', '3', '3', '4', '4', '1', '4', '2', '1', '2', '1', '15', 'World Wonder')");

mysql_query("DELETE FROM ".TB_PREFIX."vdata WHERE owner<>5");
mysql_query("UPDATE ".TB_PREFIX."wdata SET occupied=0 WHERE id<>$uid");
mysql_query("TRUNCATE TABLE ".TB_PREFIX."ww_attacks");

header("Location: ../admin.php?p=resetdone");
?>

4) Copy and save this code to \Admin\Templates\resetdone.php
PHP:
<?php
#################################################################################
##              -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =-                 ##
## --------------------------------------------------------------------------- ##
##  Filename       resetdone.tpl                                               ##
##  Developed by:  Ronix                                                       ##
##  License:       TravianZ Project                                            ##
##  Copyright:     TravianZ (c) 2012-2014. All rights reserved.                ##
##                                                                             ##
#################################################################################
unset($_SESSION['username'], $_SESSION['sessid']);
?>
<table id="member">
	<thead>
		<tr>
			<th>Server Resetting</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>
				<br>
				<center>Resetting Server already done.</center><br>Multihunter password is: 123456<br> 
			</td>
		</tr>
	</tbody>
</table>
 
Last edited:
Skilled Illusionist
Joined
Mar 9, 2011
Messages
391
Reaction score
120
Thank you ! Server reset but blank page maybe location of resetSever.php must be in GameEngine/Admin/Mods

ronix - Resetting Game Server for TravianZ (Shadow Version) - RaGEZONE Forums


We have a security problem , someone broke my admin panel on test server and delete all. Do you have any ideea ?
 
Last edited:
Skilled Illusionist
Joined
Jun 24, 2010
Messages
351
Reaction score
360
Thank you ! Server reset but blank page maybe location of resetSever.php must be in GameEngine/Admin/Mods

ronix - Resetting Game Server for TravianZ (Shadow Version) - RaGEZONE Forums


We have a security problem , someone broke my admin panel on test server and delete all. Do you have any ideea ?

check the error log
 

F6Q

Newbie Spellweaver
Joined
Feb 3, 2014
Messages
63
Reaction score
5
hey @cata7007 have some problem in this version quest have problem when you dont ply quest in game it will be hidden

2. in register we can user Invalid char like ☺☻♥ and we can user 1 word to register exp: we can register with this id --> user: S pw: 1234

3. some players can user hid thier village name so like alt+0160
4 . can u create users to play with myselfs like bots ? they grow up ourself

5. thanks for you working free on this version :Xx i love classic version

forget dobeling bug ;)



@ronix hello thanks a lot for rest server but have problem in map when we restart server multihunters village will be delet in map
 
Last edited:
Skilled Illusionist
Joined
Mar 9, 2011
Messages
391
Reaction score
120
@ronix

This location
PHP:
header("Location: ../admin.php?p=resetdone");
should to go here : \Admin\Templates\resetdone.php

But i receive blank page
 
Back
Top