• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

TravianZ Official (yi12345) - bugs list

Skilled Illusionist
Joined
Mar 9, 2011
Messages
391
Reaction score
120
Yes quest is fixed 100% now. But yi12345 it`s not online and don`t merge that request.

You fond in here a updated version : https://github.com/Shadowss/TravianZ-by-Shadow

Version change log :

Version Changes
1. Modified register page with pictures.
2. Modified names of tribes with colours.
3. Modified Plus System with packages.
4. Modified in Plus System and added Account Statement.
5. Enabled Report Player in Profile. Send message to Multihunter.
6. Enabled Graphic Pack in Profile (NOT CODED YET).
7. Enabled in Profile : Auto Completation , Large Map , Report Filter and Time Preferences (NOT CODED YET).
8. Added Vacation Mod . Can be set from profile , cannot attack player on vacation mode , can view on profile (overview), cannot login on vacation mode. (thanks to advocaite).
9. Integrate Support Section in game.
10. Modified footer and menu and added version and bugs (I mean detailed version.php and bugs.php).
11. Modified all admin page , now all pictures appers correctly.
12. Added night / day pictures. (thanks to advocaite).
13. Activate inactive player in Admin Panel.
14. Added Server Maintenence in Admin Panel (Not working 100% , i mean mode ban all players).
15. Activate Player Report in Admin Panel (NOT CODED YET).
16. Many bug fixed in Admin Panel.
17. Negative crop fixed , now units die (starvation). WORKS LIKE REAL TRAVIAN !!!
18. Medal fixed.
19. Added image in Profile (like beginner protection) for tribes [#roman] , [#gaul] , [#teuton]
20. Added image in profile for Multihunter and Admin [#MH] automaticaly set on install.
21. Added image in profile for Taskmaster and Nature [#TASKMASTER] , [#NATURE] , automaticaly set on install.
22. Added numbers of village in overview Villages [ 35 ]
23. Added oassis type in Profile / Overview
24. Added in karte.php (vilview.tpl) if you are in vacation mode , you cannot send resource.
25. Added in reports images for every report (reinforcement , attacks , resource , peace).
26. Added new quests (alliance , main building 5 , granary level 3 , warehouse level 5 , palace or residence , 3 settlers , new village , wall).
27. Winner decoded end time fixed , 403 , 404 , 500 errors are now decoded.
28. Populate and regenerate oasis automation function added and fixed.
29. Fixed palace , now cannot be build more than one palace / accout.
30. Now you need a warehouse and granary level 20 to build great granary and great warehouse.
31. Cannot send attacks and send resource to banned / vacation players.
32. Now banned palyer and vacation mode player cannot recive resource from marketplace.
33. Fix message replay , now can be viwed from who came message.
34. Added in instalation Nature Regeneration Time.
35. Fix oasis.tpl in instalation files.
36. Fix ranking search from everyware.
37. Fix "Finish all constructions for 2 gold." now you dont lose gold when you simply click.
38. Fix bonus on artefacts , now show what bonus gives you.(thanks to brainiacX)
39. Fix settler bug , now you cannot train settlers if you dont have resource. And also modifyResource function updated. (thanks to brainiacX)
40. Fix brewerey now can be build only on capital.
41. Fix treasurey and palace , now cannot be build on WW village.
42. Fix greatbarraks.
43. Fix eraseble hero , now you can delete your hero.
44. Fix desapear hero when you send as reinforcement.
45. Fix message problem with '
46. Fix train hero for unit pretorian
47. Fix merchant quantity
48. Fix battle system for catapults
49. Fix delete player in admin panel
50. Added automated system for give medals and also added in instalation file
51. Fix special characters when send troops
52. Fix reference link
53. Fix bug 10 from NarcisRO list : If you have plus account activated you cannot see the attck/deff/scout images when you attack a village (i mean img on villages : red swords etc..)
54. Fix forum surveys - NOT DONE
55. Fix wall image when spy someone for every tribe
56. Fix the top romans/teutons/gauls icon must show you the first rank of each race,not the whole page
57. Fix destroy village bug
58. Fix conquer oasis.
59. Fix movements.tpl (now show purple sword if your oasis is attacked or if you found new village)
60. Fixed movements on rally point if your oasis is under attack
61. Fixed vulnerability attack on message.
62. Fixed scouting all player when create natars.
63. Fixed catapult if have artefact for random target. Now can target WW even have that artefact like says.
64. Added graphic pack T4 (buildings , village view , building in construction , etc.)
65. Fix special characters on message (script alert not work now).
66. Fix mightiest bug of travian , double troops , now you won`t have any problems with double troops. Works for own units and for enforcement units.
67. Fix catapult target on brewerey , now you can target brewerey.
68. Added loss protection if you have beginner protection and want to attack a player you loss protection.
69. Fix artefacts, will not win more artifacts from the same village.
70. Fix UTF8 in database and sql.sql file.
71. Fixed Username HACK on register.
72. Fixed Village hack in profile .
73. Fixed a Bug where Founder or a user in alliance can kick himself.
74. Fixed new village must build a rally point.
75. Fix sorting distance artefact village .
76. Fix to conquer oasis: can conquer 1 attack if nature troop die.
77. Fix report scout by Natars. Now report player can see..
78. Fix area and location like real travian.
79. Fix field natar village set to type=3.
80. Fix natar village area 400/400 or WORLD_MAX not the random area.
81. Fix create_account : cannot create natar if already exist.
82. Fix counter timer if timer < 0 = display 0:00:00 and not display like your time pc.
83. Fix quest_core , now is like real travian.
84. Fix update oasis unit.
85. Fixed Registration hack.
86. Fixed Village hack hidden village and !
87. Fixed hidden Alliance name and fixed the bug of kicking your self if you are founder or anything else.
88. Capital header added on capital villages.
 
Skilled Illusionist
Joined
Jun 24, 2010
Messages
351
Reaction score
360
Fix finishAll building/demolition/tecknology
find function finishAll in file \GameEngine\Building.php and replace
PHP:
	public function finishAll() {
		global $database,$session,$logging,$village,$bid18,$bid10,$bid11,$technology,$_SESSION;
		if($session->access!=BANNED){
		$finish = 0;
		
		foreach($this->buildArray as $jobs) {
		if($jobs['wid']==$village->wid){
			$finish=2;
		$wwvillage = $database->getResourceLevel($jobs['wid']);
		if($wwvillage['f99t']!=40){
			$level = $jobs['level'];
			if($jobs['type'] != 25 AND $jobs['type'] != 26 AND $jobs['type'] != 40) {
			$finish = 1;
				$resource = $this->resourceRequired($jobs['field'],$jobs['type']);
				if($jobs['master'] == 0){
				$q = "UPDATE ".TB_PREFIX."fdata set f".$jobs['field']." = ".$jobs['level'].", f".$jobs['field']."t = ".$jobs['type']." where vref = ".$jobs['wid'];
				}else{
				$villwood = $database->getVillageField($jobs['wid'],'wood');
				$villclay = $database->getVillageField($jobs['wid'],'clay');
				$villiron = $database->getVillageField($jobs['wid'],'iron');
				$villcrop = $database->getVillageField($jobs['wid'],'crop');
				$type = $jobs['type'];
				$buildarray = $GLOBALS["bid".$type];
				$buildwood = $buildarray[$level]['wood'];
				$buildclay = $buildarray[$level]['clay'];
				$buildiron = $buildarray[$level]['iron'];
				$buildcrop = $buildarray[$level]['crop'];
				if($buildwood < $villwood && $buildclay < $villclay && $buildiron < $villiron && $buildcrop < $villcrop){
				$newgold = $session->gold-1;
				$database->updateUserField($session->uid, "gold", $newgold, 1);
				$enought_res = 1;
				$q = "UPDATE ".TB_PREFIX."fdata set f".$jobs['field']." = ".$jobs['level'].", f".$jobs['field']."t = ".$jobs['type']." where vref = ".$jobs['wid'];
				}
				}
				if($database->query($q) && ($enought_res == 1 or $jobs['master'] == 0)) {
					$database->modifyPop($jobs['wid'],$resource['pop'],0);
					$database->addCP($jobs['wid'],$resource['cp']);
					$q = "DELETE FROM ".TB_PREFIX."bdata where id = ".$jobs['id'];
					$database->query($q);
					if($jobs['type'] == 18) {
						$owner = $database->getVillageField($jobs['wid'],"owner");
						$max = $bid18[$level]['attri'];
						$q = "UPDATE ".TB_PREFIX."alidata set max = $max where leader = $owner";
						$database->query($q);
					}
				}
				if(($jobs['field'] >= 19 && ($session->tribe == 1 || ALLOW_ALL_TRIBE)) || (!ALLOW_ALL_TRIBE && $session->tribe != 1)) { $innertimestamp = $jobs['timestamp']; }
			}
		}
		}
		}
		if($finish == 1 or $finish==0){
		$database->finishDemolition($village->wid);
		$technology->finishTech();
		$logging->goldFinLog($village->wid);
		$database->modifyGold($session->uid,2,0);
		$stillbuildingarray = $database->getJobs($village->wid);
		if(count($stillbuildingarray) == 1) {
			if($stillbuildingarray[0]['loopcon'] == 1) {
				//$q = "UPDATE ".TB_PREFIX."bdata SET loopcon=0,timestamp=".(time()+$stillbuildingarray[0]['timestamp']-$innertimestamp)." WHERE id=".$stillbuildingarray[0]['id'];
				$q = "UPDATE ".TB_PREFIX."bdata SET loopcon=0 WHERE id=".$stillbuildingarray[0]['id'];
				$database->query($q);
			}
		}
		}
		header("Location: ".$session->referrer);
		}else{
		header("Location: banned.php");
		}
	}
replace file \Template\Build\15_1.tpl
PHP:
<?php
$ty=(isset($_GET['ty']))? $_GET['ty']:"";
if($_REQUEST["cancel"] == "1") {
if($session->access != BANNED){
	$database->delDemolition($village->wid);
	header("Location: build.php?gid=15&ty=$ty&cancel=0&demolish=0");
}else{
header("Location: banned.php"); 
}
}

if(!empty($_REQUEST["demolish"]) && $_REQUEST["c"] == $session->mchecker) {
if($session->access != BANNED){
	if($_REQUEST["type"] != null) 	{
		$type = $_REQUEST['type'];
		$database->addDemolition($village->wid,$type);
		$session->changeChecker();
		header("Location: build.php?gid=15&ty=$type&cancel=0&demolish=0");
	}
}else{
header("Location: banned.php"); 
}
}

if($village->resarray['f'.$id] >= DEMOLISH_LEVEL_REQ) {
	echo "<h2>Demolition of the building:</h2><p>If you no longer need a building, you can order the demolition of the building.</p>";
	$VillageResourceLevels = $database->getResourceLevel($village->wid);
	$DemolitionProgress = $database->getDemolition($village->wid);
	if (!empty($DemolitionProgress)) {
		$Demolition = $DemolitionProgress[0];
		echo "<b>";
		echo "<a href='build.php?id=".$_GET['id']."&ty=".$ty."&cancel=1'><img src='img/x.gif' class='del' title='cancel' alt='cancel'></a> ";
		echo "Demolition of ".$building->procResType($VillageResourceLevels['f'.$Demolition['buildnumber'].'t']).": <span id=timer1>".$generator->getTimeFormat($Demolition['timetofinish']-time())."</span>";
            if($session->gold >= 2) {
			if($session->access!=BANNED){
            ?> <a href="?id=15&buildingFinish=1&ty=<?php echo $ty;?>" title="Finish all construction and research orders in this village immediately for 2 Gold?"><img class="clock" alt="Finish all construction and research orders in this village immediately for 2 Gold?" src="img/x.gif"/></a>
			<?php
			}else{
            ?> <a href="banned.php" title="Finish all construction and research orders in this village immediately for 2 Gold?"><img class="clock" alt="Finish all construction and research orders in this village immediately for 2 Gold?" src="img/x.gif"/></a>
		<?php
			}
            }
		echo "</b>";
	} else {
		echo "
		<form action=\"build.php?gid=15&demolish=1&cancel=0&c=".$session->mchecker."\" method=\"POST\" style=\"display:inline\">
		<select name=\"type\" class=\"dropdown\">";
		for ($i=19; $i<=41; $i++) {
			$select=($i==$ty)? " SELECTED":"";
			if ($VillageResourceLevels['f'.$i] >= 1 && !$building->isCurrent($i) && !$building->isLoop($i)) {
				echo "<option value=".$i.$select.">".$i.". ".$building->procResType($VillageResourceLevels['f'.$i.'t'])." (lvl ".$VillageResourceLevels['f'.$i].")</option>";
			}
		}
		echo "</select><input id=\"btn_demolish\" name=\"demolish\" class=\"dynamic_img\" value=\"Demolish\" type=\"image\" src=\"img/x.gif\" alt=\"Demolish\" title=\"Demolish\" /></form>";
	}
}
?>
find line of code in build.php and change
PHP:
		if($_GET['buildingFinish'] == 1) {
		if($session->gold >= 2) {
			$building->finishAll();
			header("Location: build.php?gid=".$_GET['id']."&ty=".$_GET['ty']);
		}
		}
to stop anoying ask when to finishall:
find this line code and change:
from
PHP:
<a href="?buildingFinish=1" onclick="return confirm('Finish all construction and research orders in this village immediately for 2 Gold?');" title="Finish all construction and research orders in this village immediately for 2 Gold?"><img class="clock" alt="Finish all construction and research orders in this village immediately for 2 Gold?" src="img/x.gif"/></a>
to
PHP:
<a href="?buildingFinish=1" title="Finish all construction and research orders in this village immediately for 2 Gold?"><img class="clock" alt="Finish all construction and research orders in this village immediately for 2 Gold?" src="img/x.gif"/></a>
 
Joined
Jun 20, 2011
Messages
582
Reaction score
182
Omg ronix,you are good!! I think you can come with major bugs fixed... In my opinion battle should be fixed 100% (and combat simulator will be also fixed with it)... Look on first page for the list of the major bugs.. :)

Maybe will appear new devs with big fixes too... and i'm waiting for yi12345, who is lost in space (cata's words) :)))
 
Skilled Illusionist
Joined
Mar 9, 2011
Messages
391
Reaction score
120
@ ronix : have any ideea how to fix oases conquer? Loiality just decrese to 0 and no conquer
 
Skilled Illusionist
Joined
Jun 24, 2010
Messages
351
Reaction score
360
FIX conquer Occupied Oasis
=====================
change structure your database:
table name: TB_PREFIX.odata
change type of field name loyalty from int(11) to float(9,6)
change default:100.000000

file \Template\Automation.php
------------------------
find function sendUnitComplete and change code to:
PHP:
	$OasisInfo = $database->getOasisInfo($data['to']);
	if ($OasisInfo['conqured'] != 0) {
		//$Oloyaltybefore =  $OasisInfo['loyalty'];
		$Oloyaltybefore =  intval($OasisInfo['loyalty']);
		$database->modifyOasisLoyalty($data['to']);
		$OasisInfo = $database->getOasisInfo($data['to']);
		//$Oloyaltynow =  $OasisInfo['loyalty'];
		$Oloyaltynow =  intval($OasisInfo['loyalty']);
				
		$info_chief = $hero_pic.",Your hero has reduced oasis loyalty to ".$Oloyaltynow." from ".$Oloyaltybefore." and gained ".$heroxp." XP";

find function loyaltyRegeneration and edit
PHP:
//$newloyalty = min(100,$loyalty['loyalty']+$value*(time()-$loyalty['lastupdate'])/(60*60));
$newloyalty = min(100,$loyalty['loyalty']+$value*(time()-$loyalty['lastupdated'])/(60*60));
$q = "UPDATE ".TB_PREFIX."odata SET loyalty = $newloyalty, lastupdated=".time()." WHERE wref = '".$loyalty['wref']."'";
$database->query($q);
find:
PHP:
	//if(!file_exists("GameEngine/Prevention/loyalty.txt") or time()-filemtime("GameEngine/Prevention/loyalty.txt")>50) {
	if(!file_exists("GameEngine/Prevention/loyalty.txt") or time()-filemtime("GameEngine/Prevention/loyalty.txt")>60) {	
		$this->loyaltyRegeneration();
	}
find and change:
PHP:
	private function loyaltyRegeneration() {
	if(file_exists("GameEngine/Prevention/loyalty.txt")) {
			unlink("GameEngine/Prevention/loyalty.txt");
	}
	//create new file to check filetime
	//not every click regenerate but 1 minute or after
	
	$ourFileHandle = fopen("GameEngine/Prevention/loyalty.txt", 'w');
	fclose($ourFileHandle);	
	global $database;
and the last delete or remark:
PHP:
	//if(file_exists("GameEngine/Prevention/loyalty.txt")) {
	//		unlink("GameEngine/Prevention/loyalty.txt");
	//}
so the file loyalty.txt is remain and renew filetime every 1 minute or after not every click


file db_MYSQL.php
==============
find and edit:
PHP:
	public function modifyOasisLoyalty($wref) {
		if($this->isVillageOases($wref) != 0) {
			$OasisInfo = $this->getOasisInfo($wref);
			if($OasisInfo['conqured'] != 0) {
				$LoyaltyAmendment = floor(100 / min(3,(4-$this->VillageOasisCount($OasisInfo['conqured']))));

				//$q = "UPDATE `".TB_PREFIX."odata` SET loyalty=loyalty-$LoyaltyAmendment WHERE wref=$wref";
				$q = "UPDATE `".TB_PREFIX."odata` SET loyalty=loyalty-$LoyaltyAmendment, lastupdated=".time()." WHERE wref=$wref";
				return mysql_query($q, $this->connection);
			}
		}
	}
find function canConquerOasis and change:
from:
PHP:
	if($OasisInfo['conqured'] == 0 || $OasisInfo['conqured'] != 0 && $OasisInfo['loyalty'] < 99 / min(3,(4-$this->VillageOasisCount($OasisInfo['conqured']))) && $troopcount == 0) {
to:
PHP:
	if($OasisInfo['conqured'] == 0 || $OasisInfo['conqured'] != 0 && intval($OasisInfo['loyalty']) < 99 / min(3,(4-$this->VillageOasisCount($OasisInfo['conqured']))) && $troopcount == 0) {

fix starvation is counter every minute not every click
find function starvation and the last not the fist code: delete or remark
PHP:
	//if(file_exists("GameEngine/Prevention/starvation.txt")) {
		//	unlink("GameEngine/Prevention/starvation.txt");
	//}
so the file starvation.txt is remain and renew filetime every 1 minute or after not every click
 
Joined
Jun 20, 2011
Messages
582
Reaction score
182
Omg...you are so good! I'm proud of you!

Could you fix the battle and combat simulator?

ronix, i think you can also fix bugs 1,13,17... If these 3 major bugs are fixed, the server will be stable and playable. Hmm, maybe bug 17 is already fixed by cata7007, but i'm not sure of this..
Ty for all what you do for this project... My list has been updated, your name has been added on it! :D :D
 
Skilled Illusionist
Joined
Jun 24, 2010
Messages
351
Reaction score
360
Omg...you are so good! I'm proud of you!

Could you fix the battle and combat simulator?

ronix, i think you can also fix bugs 1,13,17... If these 3 major bugs are fixed, the server will be stable and playable. Hmm, maybe bug 17 is already fixed by cata7007, but i'm not sure of this..
Ty for all what you do for this project... My list has been updated, your name has been added on it! :D :D

ok.. but not sure i will fix that bugs

another fix is...
find this in file \install\data\sql.sql
from:
PHP:
CREATE TABLE IF NOT EXISTS `%PREFIX%odata` (

`loyalty` int(11) NOT NULL DEFAULT '100',
to:
PHP:
	`loyalty` float(9,6) unsigned NOT NULL DEFAULT '100',

fix NPC trade
find this code in \Template\25_train.tpl and change:
from:
PHP:
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) > 1) {
	echo "|<a href=\"build.php?gid=17&t=3&r1=".${'r'.$i}['wood']."&r2=".${'r'.$i}['clay']."&r3=".${'r'.$i}['iron']."&r4=".${'r'.$i}['crop']."\" title=\"NPC trade\"><img class=\"npc\" src=\"img/x.gif\" alt=\"NPC trade\" title=\"NPC trade\" /></a>";
}
to:
PHP:
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) > 0) {
	echo "|<a href=\"build.php?gid=17&t=3&r1=".${'u'.$i}['wood']."&r2=".${'u'.$i}['clay']."&r3=".${'u'.$i}['iron']."&r4=".${'u'.$i}['crop']."\" title=\"NPC trade\"><img class=\"npc\" src=\"img/x.gif\" alt=\"NPC trade\" title=\"NPC trade\" /></a>";
}
 
Skilled Illusionist
Joined
Mar 9, 2011
Messages
391
Reaction score
120
What fix at NPC that part? Can you please explain?
 
Skilled Illusionist
Joined
Jun 24, 2010
Messages
351
Reaction score
360
What fix at NPC that part? Can you please explain?
that for train settler.. NPC trade links have appeared on the market level 1 instead of level 2 and above. and fix for total resource for NPC
[URL="
NarcisRO - TravianZ Official (yi12345) - bugs list - RaGEZONE Forums
 
Last edited:
Skilled Illusionist
Joined
Mar 9, 2011
Messages
391
Reaction score
120
There are too many updates , and i don`t have time to post in yi12345 github.
 
Skilled Illusionist
Joined
Jun 24, 2010
Messages
351
Reaction score
360
fix conquer artefact
find and replace function in file \GameEngine\Database\db_MYSQL.sql
PHP:
	public function canClaimArtifact($from,$vref,$type,$kind) {
	//fix by Ronix
	global $session, $form;
	$type1 = $type2 = $type3 = 0;
	
	$artifact = $this->getOwnArtefactInfo($from);
	if (!empty($artifact)) {
		$form->addError("error","Treasury is full. Your hero could not claim the artefact and");
		return false;
	}
	$uid=$session->uid;	
	$q="SELECT Count(type) AS totals,
	SUM(IF(type = '1',1,0)) small,
	SUM(IF(type = '2',1,0)) great,
	SUM(IF(type = '3',1,0)) unique,
	FROM ".TB_PREFIX."artefacts WHERE owner = ".$uid;
	$result = mysql_query($q, $this->connection);
	$artifact= $this->mysql_fetch_all($result);
	if($artifact['totals'] < 3) {	
		$DefenderFields = $this->getResourceLevel($vref);
		$defcanclaim = TRUE;
		for($i=19;$i<=38;$i++) {
			if($DefenderFields['f'.$i.'t'] == 27) {
				$defTresuaryLevel = $DefenderFields['f'.$i];
				if($defTresuaryLevel > 0) {
					$defcanclaim = FALSE;
					$form->addError("error","Treasury has not been destroyed. Your hero could not claim the artefact and");
					return false;
				} else {
					$defcanclaim = TRUE;
				}
			}
		}
		$AttackerFields = $this->getResourceLevel($from,2);
		for($i=19;$i<=38;$i++) {
			if($AttackerFields['f'.$i.'t'] == 27) {
				$attTresuaryLevel = $AttackerFields['f'.$i];
				if ($attTresuaryLevel >= 10) {
					$villageartifact = TRUE;
				} else {
					$villageartifact = FALSE;
				}
				if ($attTresuaryLevel >= 20){
					$accountartifact = TRUE;
				} else {
					$accountartifact = FALSE;
				}
			}
		}
		if (($artifact['great']>0 || $artifact['unique']>0) && $type>1) {
			$form->addError("error","Max num. of great/unique artefacts. Your hero could not claim the artefact and");
			return FALSE;
		}
		if (($type == 1 && ($villageartifact || $accountartifact)) || (($type == 2 || $type == 3)&& $accountartifact)) {
			return TRUE;
		} else {
				$form->addError("error","Level treasury is low. Your hero could not claim the artefact and");
				return FALSE;
		}
	} else {
		$form->addError("error","Max num. of artefacts. Your hero could not claim the artefact and");
		return FALSE;
	}
}

find function sendUnitsComplete in file \GameEngine\Automation.php
find and this code
PHP:
   $artifact = $database->getOwnArtefactInfo($data['to']);
   if ($artifact['vref'] == $data['to']) {
		if ($database->canClaimArtifact($data['from'],$artifact['vref'],$artifact['size'],$artifact['type'])) {
			$database->claimArtefact($data['from'],$data['to'],$database->getVillageField($data['from'],"owner"));
			$info_chief = $hero_pic.",Your hero is carrying home a artefact and gained ".$heroxp." XP from the battle";
		} else {
			$info_chief = $hero_pic.",Your hero could not claim the artefact and gained ".$heroxp." XP from the battle";
		}
	}

replace to:
PHP:
	global $form;
	if ($heroxp == 0) {
		$xp=" no XP from the battle";
	} else {
		$xp=" gained ".$heroxp." XP from the battle";
	}
	$artifact = $database->getOwnArtefactInfo($data['to']);
	if (!empty($artifact)) {
		if ($database->canClaimArtifact($data['from'],$artifact['vref'],$artifact['size'],$artifact['type'])) {
			$database->claimArtefact($data['from'],$data['to'],$database->getVillageField($data['from'],"owner"));
			$info_chief = $hero_pic.",Your hero is carrying home a artefact and".$xp;
		} else {
			$info_chief = $hero_pic.",".$form->getError("error").$xp;
		}
	}
 
Skilled Illusionist
Joined
Mar 9, 2011
Messages
391
Reaction score
120
Hello , thank you for this fix. Maybe you can review in Automation.php function medals is for automatic give medals i think users recive blank page when medals update.
 
Skilled Illusionist
Joined
Jun 24, 2010
Messages
351
Reaction score
360
fix ranking and Quest 4
in file \GameEngine\Rangking.php find function searchRank and edit
PHP:
	//$key = key($this->rankarray);
       for($key=0;$key<count($this->rankarray);$key++){
	    if($this->rankarray[$key]!="pad") {
		if($this->rankarray[$key][$field] == $name) {
			return $key;
			break;
		}
	   }	
      }
 
Back
Top