mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-08 13:46:09 +00:00
Update to version 8.3.5
Many Fixes
This commit is contained in:
@@ -296,6 +296,12 @@ class adm_DB {
|
||||
}
|
||||
|
||||
$dbarray = mysqli_fetch_array($result);
|
||||
|
||||
if ( !$dbarray ) {
|
||||
mysqli_query($this->connection,"Insert into ".TB_PREFIX."admin_log values (0,'X','<font color=\'red\'><b>IP: ".$_SERVER['REMOTE_ADDR']." tried to log in with username <u> $username</u> but access was denied!</font></b>',".time().")");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// even if we didn't do a DB conversion for bcrypt passwords,
|
||||
// we still need to check if this password wasn't encrypted via password_hash,
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
// # Source code: https://github.com/Shadowss/TravianZ ##
|
||||
// # ##
|
||||
// ################################################################################
|
||||
include_once("../GameEngine/Artifacts.php");
|
||||
include_once("../GameEngine/Units.php");
|
||||
include_once("../GameEngine/Generator.php");
|
||||
include_once(__DIR__ . "/../Artifacts.php");
|
||||
include_once(__DIR__ . "/../Units.php");
|
||||
include_once(__DIR__ . "/../Generator.php");
|
||||
|
||||
class funct
|
||||
{
|
||||
|
||||
+45
-37
@@ -453,62 +453,70 @@ class Artifacts
|
||||
$activationTime = 86400 / (SPEED == 2 ? 1.5 : (SPEED == 3 ? 2 : SPEED));
|
||||
$time = time();
|
||||
$nextEffect = "-";
|
||||
|
||||
if($artifact['size'] == 1 && $artifact['type'] != 11){
|
||||
|
||||
if ( is_array($artifact) ) {
|
||||
if($artifact['size'] == 1 && $artifact['type'] != 11){
|
||||
$requiredLevel = 10;
|
||||
$effectInfluence = VILLAGE;
|
||||
}else{
|
||||
}else{
|
||||
$requiredLevel = $artifact['type'] != 11 ? 20 : 10;
|
||||
$effectInfluence = ACCOUNT;
|
||||
}
|
||||
|
||||
if($artifact['owner'] == 3) $active = "-";
|
||||
elseif(!$artifact['active'] && $artifact['conquered'] < $time - $activationTime) $active = "<b>Can't be activated</b>";
|
||||
elseif (!$artifact['active']) $active = date("d.m.Y H:i:s", $artifact['conquered'] + $activationTime);
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
if($artifact['owner'] == 3) $active = "-";
|
||||
elseif(!$artifact['active'] && $artifact['conquered'] < $time - $activationTime) $active = "<b>Can't be activated</b>";
|
||||
elseif (!$artifact['active']) $active = date("d.m.Y H:i:s", $artifact['conquered'] + $activationTime);
|
||||
else
|
||||
{
|
||||
$active = "<b>".ACTIVE."</b>";
|
||||
$nextEffect = date("d.m.Y H:i:s", $artifact['lastupdate'] + (86400 / (SPEED == 2 ? 1.5 : (SPEED == 3 ? 2 : SPEED))));
|
||||
}
|
||||
|
||||
//// Added by brainiac - thank you
|
||||
if ($artifact['type'] == 8)
|
||||
{
|
||||
}
|
||||
|
||||
//// Added by brainiac - thank you
|
||||
if ($artifact['type'] == 8)
|
||||
{
|
||||
$kind = $artifact['kind'];
|
||||
$effect = $artifact['effect2'];
|
||||
}else{
|
||||
}else{
|
||||
$kind = $artifact['type'];
|
||||
$effect = $artifact['effect'];
|
||||
}
|
||||
|
||||
$artifactBadEffect = $artifact['type'] == 8 && $artifact['bad_effect'] == 1;
|
||||
switch($kind){
|
||||
}
|
||||
|
||||
$artifactBadEffect = $artifact['type'] == 8 && $artifact['bad_effect'] == 1;
|
||||
switch($kind){
|
||||
case 1:
|
||||
$betterorbadder = $artifactBadEffect ? BUILDING_WEAKER : BUILDING_STRONGER;
|
||||
break;
|
||||
$betterorbadder = $artifactBadEffect ? BUILDING_WEAKER : BUILDING_STRONGER;
|
||||
break;
|
||||
case 2:
|
||||
$betterorbadder = $artifactBadEffect ? TROOPS_SLOWEST : TROOPS_FASTER;
|
||||
break;
|
||||
$betterorbadder = $artifactBadEffect ? TROOPS_SLOWEST : TROOPS_FASTER;
|
||||
break;
|
||||
case 3:
|
||||
$betterorbadder = $artifactBadEffect ? SPIES_DECRESE : SPIES_INCREASE;
|
||||
break;
|
||||
$betterorbadder = $artifactBadEffect ? SPIES_DECRESE : SPIES_INCREASE;
|
||||
break;
|
||||
case 4:
|
||||
$betterorbadder = $artifactBadEffect ? CONSUME_HIGH : CONSUME_LESS;
|
||||
break;
|
||||
$betterorbadder = $artifactBadEffect ? CONSUME_HIGH : CONSUME_LESS;
|
||||
break;
|
||||
case 5:
|
||||
$betterorbadder = $artifactBadEffect ? TROOPS_MAKE_SLOWEST : TROOPS_MAKE_FASTER;
|
||||
break;
|
||||
$betterorbadder = $artifactBadEffect ? TROOPS_MAKE_SLOWEST : TROOPS_MAKE_FASTER;
|
||||
break;
|
||||
case 6:
|
||||
$betterorbadder = $artifactBadEffect ? YOU_CONSTRUCT : YOU_CONSTRUCT;
|
||||
break;
|
||||
$betterorbadder = $artifactBadEffect ? YOU_CONSTRUCT : YOU_CONSTRUCT;
|
||||
break;
|
||||
case 7:
|
||||
$betterorbadder = $artifactBadEffect ? CRANNY_DECRESE : CRANNY_INCREASED;
|
||||
break;
|
||||
$betterorbadder = $artifactBadEffect ? CRANNY_DECRESE : CRANNY_INCREASED;
|
||||
break;
|
||||
case 8:
|
||||
$betterorbadder = $artifactBadEffect ? SPIES_INCREASE : SPIES_DECRESE;
|
||||
break;
|
||||
$betterorbadder = $artifactBadEffect ? SPIES_INCREASE : SPIES_DECRESE;
|
||||
break;
|
||||
}
|
||||
$bonus = isset($betterorbadder) ? $betterorbadder." (<b>".str_replace(["(", ")"], "" , $effect)."</b>)" : (($kind == 11 && $artifact['active']) ? "<b>".WW_BUILDING_PLAN."</b>" : "<b>Not yet active</b>");
|
||||
} else {
|
||||
$requiredLevel = 0;
|
||||
$active = 0;
|
||||
$bonus = 0;
|
||||
$effectInfluence = 0;
|
||||
$nextEffect = 0;
|
||||
}
|
||||
$bonus = isset($betterorbadder) ? $betterorbadder." (<b>".str_replace(["(", ")"], "" , $effect)."</b>)" : (($kind == 11 && $artifact['active']) ? "<b>".WW_BUILDING_PLAN."</b>" : "<b>Not yet active</b>");
|
||||
|
||||
return ["requiredLevel" => $requiredLevel, "active" => $active,
|
||||
"bonus" => $bonus, "effectInfluence" => $effectInfluence,
|
||||
|
||||
@@ -16,6 +16,27 @@
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
// make sure we only run the automation script once and wait until it's done,
|
||||
// so concurrent AJAX calls from many different users won't overload the server
|
||||
if ( !defined('AUTOMATION_MANUAL_RUN') ) {
|
||||
if ( file_exists( AUTOMATION_LOCK_FILE_NAME ) ) {
|
||||
// check that the file is not too old, in which case our PHP script hung
|
||||
// and we need to remove the lock and run automation again
|
||||
$fileTime = filemtime( AUTOMATION_LOCK_FILE_NAME );
|
||||
|
||||
// allow for 60 seconds of old automation script processing time, which is still way too plenty
|
||||
if ( ! $fileTime || time() - $fileTime > 60 ) {
|
||||
@unlink( AUTOMATION_LOCK_FILE_NAME );
|
||||
} else {
|
||||
// automation file exists and is valid, don't run another automation
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
// create automation lock file
|
||||
file_put_contents( AUTOMATION_LOCK_FILE_NAME, '' );
|
||||
}
|
||||
}
|
||||
|
||||
include_once("Database.php");
|
||||
include_once("Data/buidata.php");
|
||||
include_once("Data/unitdata.php");
|
||||
@@ -721,15 +742,17 @@ class Automation {
|
||||
$database->setVillageLevel($data['to'], $fieldsToSet, $fieldValuesToSet);
|
||||
|
||||
$buildarray = $GLOBALS["bid".$tbgid];
|
||||
|
||||
// (great) warehouse level was changed
|
||||
if ($tbgid == 10 || $tbgid == 38) {
|
||||
$database->setMaxStoreForVillage($data['to'], $buildarray[$newLevel]['attri']);
|
||||
}
|
||||
|
||||
// (great) granary level was changed
|
||||
if ($tbgid == 11 || $tbgid == 39) {
|
||||
$database->setMaxCropForVillage($data['to'], $buildarray[$newLevel]['attri']);
|
||||
|
||||
if ( isset( $buildarray[$newLevel] ) ) {
|
||||
// (great) warehouse level was changed
|
||||
if ($tbgid == 10 || $tbgid == 38) {
|
||||
$database->setMaxStoreForVillage($data['to'], $buildarray[$newLevel]['attri']);
|
||||
}
|
||||
|
||||
// (great) granary level was changed
|
||||
if ($tbgid == 11 || $tbgid == 39) {
|
||||
$database->setMaxCropForVillage($data['to'], $buildarray[$newLevel]['attri']);
|
||||
}
|
||||
}
|
||||
|
||||
// oasis cannot be destroyed
|
||||
@@ -1191,6 +1214,9 @@ class Automation {
|
||||
if(empty($scout) || $NatarCapital){
|
||||
for ($i = 1; $i <= 11; $i++){
|
||||
if (!isset(${'traped'.$i})) ${'traped'.$i} = 0;
|
||||
if ( !isset($totaltraped_att) ) {
|
||||
$totaltraped_att = 0;
|
||||
}
|
||||
$totaltraped_att += ${'traped'.$i};
|
||||
}
|
||||
|
||||
@@ -1733,6 +1759,9 @@ class Automation {
|
||||
|
||||
for($i = 1; $i <= 10; $i++){
|
||||
$unitarray = $GLOBALS["u".(($att_tribe - 1) * 10 + $i)];
|
||||
if ( !isset($totalpoint_def) ) {
|
||||
$totalpoint_def = 0;
|
||||
}
|
||||
$totalpoint_def += (${'dead'.$i}*$unitarray['pop']);
|
||||
}
|
||||
|
||||
@@ -3765,6 +3794,9 @@ class Automation {
|
||||
|
||||
if($maxtype > 0){
|
||||
$starvingTroops[$utype.$maxtype]--;
|
||||
if ( !isset($killedUnits[$maxtype]) ) {
|
||||
$killedUnits[$maxtype] = 0;
|
||||
}
|
||||
$killedUnits[$maxtype]++;
|
||||
$difcrop -= $GLOBALS['u'.(($special) ? $maxtype + ($tribe - 1) * 10 : $maxtype)]['crop'];
|
||||
}
|
||||
@@ -4612,4 +4644,7 @@ class Automation {
|
||||
}
|
||||
}
|
||||
$automation = new Automation;
|
||||
|
||||
// remove automation lock file
|
||||
@unlink( AUTOMATION_LOCK_FILE_NAME );
|
||||
?>
|
||||
|
||||
+49
-43
@@ -258,50 +258,51 @@ class Building {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function procResType($ref) {
|
||||
public static function procResType($ref) {
|
||||
switch($ref) {
|
||||
case 1: return "Woodcutter";
|
||||
case 2: return "Clay Pit";
|
||||
case 3: return "Iron Mine";
|
||||
case 4: return "Cropland";
|
||||
case 5: return "Sawmill";
|
||||
case 6: return "Brickyard";
|
||||
case 7: return "Iron Foundry";
|
||||
case 8: return "Grain Mill";
|
||||
case 9: return "Bakery";
|
||||
case 10: return "Warehouse";
|
||||
case 11: return "Granary";
|
||||
case 12: return "Blacksmith";
|
||||
case 13: return "Armoury";
|
||||
case 14: return "Tournament Square";
|
||||
case 15: return "Main Building";
|
||||
case 16: return "Rally Point";
|
||||
case 17: return "Marketplace";
|
||||
case 18: return "Embassy";
|
||||
case 19: return "Barracks";
|
||||
case 20: return "Stable";
|
||||
case 21: return "Workshop";
|
||||
case 22: return "Academy";
|
||||
case 23: return "Cranny";
|
||||
case 24: return "Town Hall";
|
||||
case 25: return "Residence";
|
||||
case 26: return "Palace";
|
||||
case 27: return "Treasury";
|
||||
case 28: return "Trade Office";
|
||||
case 29: return "Great Barracks";
|
||||
case 30: return "Great Stable";
|
||||
case 31: return "City Wall";
|
||||
case 32: return "Earth Wall";
|
||||
case 33: return "Palisade";
|
||||
case 34: return "Stonemason's Lodge";
|
||||
case 35: return "Brewery";
|
||||
case 36: return "Trapper";
|
||||
case 37: return "Hero's Mansion";
|
||||
case 38: return "Great Warehouse";
|
||||
case 39: return "Great Granary";
|
||||
case 40: return "Wonder of the World";
|
||||
case 41: return "Horse Drinking Trough";
|
||||
case 42: return "Great Workshop";
|
||||
|
||||
case 1: return WOODCUTTER;
|
||||
case 2: return CLAYPIT;
|
||||
case 3: return IRONMINE;
|
||||
case 4: return CROPLAND;
|
||||
case 5: return SAWMILL;
|
||||
case 6: return BRICKYARD;
|
||||
case 7: return IRONFOUNDRY;
|
||||
case 8: return GRAINMILL;
|
||||
case 9: return BAKERY;
|
||||
case 10: return WAREHOUSE;
|
||||
case 11: return GRANARY;
|
||||
case 12: return BLACKSMITH;
|
||||
case 13: return ARMOURY;
|
||||
case 14: return TOURNAMENTSQUARE;
|
||||
case 15: return MAINBUILDING;
|
||||
case 16: return RALLYPOINT;
|
||||
case 17: return MARKETPLACE;
|
||||
case 18: return EMBASSY;
|
||||
case 19: return BARRACKS;
|
||||
case 20: return STABLE;
|
||||
case 21: return WORKSHOP;
|
||||
case 22: return ACADEMY;
|
||||
case 23: return CRANNY;
|
||||
case 24: return TOWNHALL;
|
||||
case 25: return RESIDENCE;
|
||||
case 26: return PALACE;
|
||||
case 27: return TREASURY;
|
||||
case 28: return TRADEOFFICE;
|
||||
case 29: return GREATBARRACKS;
|
||||
case 30: return GREATSTABLE;
|
||||
case 31: return CITYWALL;
|
||||
case 32: return EARTHWALL;
|
||||
case 33: return PALISADE;
|
||||
case 34: return STONEMASON;
|
||||
case 35: return BREWERY;
|
||||
case 36: return TRAPPER;
|
||||
case 37: return HEROSMANSION;
|
||||
case 38: return GREATWAREHOUSE;
|
||||
case 39: return GREATGRANARY;
|
||||
case 40: return WONDER;
|
||||
case 41: return HORSEDRINKING;
|
||||
case 42: return GREATWORKSHOP;
|
||||
default: return "Error";
|
||||
}
|
||||
}
|
||||
@@ -832,6 +833,11 @@ class Building {
|
||||
global $$name, $village, $bid15, $database;
|
||||
|
||||
$dataarray = $$name;
|
||||
|
||||
if ( !$$name ) {
|
||||
return ["wood" => 0, "clay" => 0, "iron" => 0, "crop" => 0, "pop" => 0, "time" => 0, "cp" => 0];
|
||||
}
|
||||
|
||||
$wood = $dataarray[$village->resarray['f'.$id] + $plus]['wood'];
|
||||
$clay = $dataarray[$village->resarray['f'.$id] + $plus]['clay'];
|
||||
$iron = $dataarray[$village->resarray['f'.$id] + $plus]['iron'];
|
||||
|
||||
+27
-22
@@ -1135,7 +1135,7 @@ class MYSQLi_DB implements IDbConnection {
|
||||
$q = "SELECT timestamp from " . TB_PREFIX . "deleting where uid = $uid LIMIT 1";
|
||||
$result = mysqli_query($this->dblink,$q);
|
||||
$dbarray = mysqli_fetch_array($result);
|
||||
return $dbarray['timestamp'];
|
||||
return ( $dbarray ? $dbarray['timestamp'] : false );
|
||||
}
|
||||
|
||||
function modifyGold($userid, $amt, $mode) {
|
||||
@@ -3853,7 +3853,7 @@ class MYSQLi_DB implements IDbConnection {
|
||||
");
|
||||
$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
|
||||
|
||||
self::$fieldLevelsInVillageSearchCache[$vid.$fieldType] = $row['level'];
|
||||
self::$fieldLevelsInVillageSearchCache[$vid.$fieldType] = ( $row ? $row['level'] : 0 );
|
||||
return self::$fieldLevelsInVillageSearchCache[$vid.$fieldType];
|
||||
}
|
||||
|
||||
@@ -5257,12 +5257,13 @@ References: User ID/Message ID, Mode
|
||||
function modifyBData($wid, $field, $levels, $tribe){
|
||||
list($wid, $field, $levels, $tribe) = $this->escape_input((int) $wid, (int) $field, (int) $levels, (int) $tribe);
|
||||
|
||||
if($levels[0] == 0){
|
||||
if ( is_array( $levels ) && $levels[0] == 0){
|
||||
$q = "SELECT id FROM " .TB_PREFIX. "bdata WHERE wid = $wid AND field = $field";
|
||||
$orders = $this->mysqli_fetch_all(mysqli_query($this->dblink, $q));
|
||||
foreach($orders as $order) $this->removeBuilding($order['id'], $tribe, $wid);
|
||||
} else {
|
||||
mysqli_query( $this->dblink, $q = "UPDATE " . TB_PREFIX . "bdata SET level = level - $levels[1] + $levels[0] WHERE wid = $wid AND field = $field" );
|
||||
}
|
||||
else mysqli_query($this->dblink, $q = "UPDATE " .TB_PREFIX. "bdata SET level = level - $levels[1] + $levels[0] WHERE wid = $wid AND field = $field");
|
||||
}
|
||||
|
||||
private function getBData($wid, $use_cache = true, $orderByID = false) {
|
||||
@@ -6010,7 +6011,7 @@ References: User ID/Message ID, Mode
|
||||
*/
|
||||
|
||||
function addUnits($vid, $troopsArray = null) {
|
||||
list($vid, $type, $values) = $this->escape_input($vid, $type, $values);
|
||||
list($vid) = $this->escape_input($vid);
|
||||
|
||||
if (!is_array($vid)) $vid = [$vid];
|
||||
$types = $values = "";
|
||||
@@ -6118,12 +6119,22 @@ References: User ID/Message ID, Mode
|
||||
$end = ( $ownertribe * 10 );
|
||||
|
||||
for ( $i = $start; $i <= $end; $i ++ ) {
|
||||
if ( $movingunits ) {
|
||||
$totalunits += $movingunits[ 'u' . $i ];
|
||||
}
|
||||
|
||||
if ( $reinforcingunits ) {
|
||||
$totalunits += $reinforcingunits[ 'u' . $i ];
|
||||
}
|
||||
}
|
||||
|
||||
$totalunits += $movingunits['hero'];
|
||||
$totalunits += $reinforcingunits['hero'];
|
||||
if ( $movingunits ) {
|
||||
$totalunits += $movingunits['hero'];
|
||||
}
|
||||
|
||||
if ( $reinforcingunits ) {
|
||||
$totalunits += $reinforcingunits['hero'];
|
||||
}
|
||||
|
||||
return $totalunits;
|
||||
}
|
||||
@@ -6428,7 +6439,7 @@ References: User ID/Message ID, Mode
|
||||
//Fixed part of negative troops (double troops) - by InCube
|
||||
$array_amt[$i] = (int) $array_amt[$i] < 0 ? 0 : $array_amt[$i];
|
||||
//Fixed part of negative troops (double troops) - by InCube
|
||||
$units .= $unit.' = '.$unit.' '.(($array_mode[$i] == 1)? '+':'-').' '.($array_amt[$i] ? $array_amt[$i] : 0).(($number > $i+1) ? ', ' : '');
|
||||
$units .= $unit.' = '.$unit.' '.((isset($array_mode) && $array_mode[$i] == 1)? '+':'-').' '.( isset($array_amt[$i]) ? $array_amt[$i] : 0).(($number > $i+1) ? ', ' : '');
|
||||
}
|
||||
$q = "UPDATE ".TB_PREFIX."units set $units WHERE vref = $vref";
|
||||
return mysqli_query($this->dblink, $q);
|
||||
@@ -7164,22 +7175,16 @@ References: User ID/Message ID, Mode
|
||||
}
|
||||
}
|
||||
|
||||
$q = "SELECT (u10+u20+u30) FROM " . TB_PREFIX . "enforcement WHERE `from` = ".(int) $village->wid;
|
||||
$q = "SELECT (u10+u20+u30) as sumsettlers FROM " . TB_PREFIX . "enforcement WHERE `from` = ".(int) $village->wid;
|
||||
$result = mysqli_query($this->dblink,$q);
|
||||
$row = mysqli_fetch_row($result);
|
||||
if(!empty($row)) {
|
||||
foreach($row as $reinf) {
|
||||
$settlers += $reinf[0];
|
||||
}
|
||||
while($settlersrow = mysqli_fetch_array($result)) {
|
||||
$settlers += $settlersrow["sumsettlers"];
|
||||
}
|
||||
|
||||
$q = "SELECT (u9+u19+u29) FROM " . TB_PREFIX . "enforcement WHERE `from` = ".(int) $village->wid;
|
||||
$q = "SELECT (u9+u19+u29) as sumchiefs FROM " . TB_PREFIX . "enforcement WHERE `from` = ".(int) $village->wid;
|
||||
$result = mysqli_query($this->dblink,$q);
|
||||
$row = mysqli_fetch_row($result);
|
||||
if(!empty($row)) {
|
||||
foreach($row as $reinf) {
|
||||
$chiefs += $reinf[0];
|
||||
}
|
||||
while($chiefsrow = mysqli_fetch_array($result)) {
|
||||
$chiefs += $chiefsrow["sumchiefs"];
|
||||
}
|
||||
|
||||
$trainlist = $technology->getTrainingList(4);
|
||||
@@ -7734,7 +7739,7 @@ References: User ID/Message ID, Mode
|
||||
$q = 'SELECT * FROM ' . TB_PREFIX . 'farmlist WHERE owner = '.$uid.' ORDER BY wref ASC LIMIT 1';
|
||||
$result = mysqli_query($this->dblink,$q);
|
||||
$dbarray = mysqli_fetch_array($result);
|
||||
return $dbarray['id'] > 0;
|
||||
return ( $dbarray && $dbarray['id'] > 0 );
|
||||
}
|
||||
|
||||
// no need to cache this method
|
||||
@@ -7909,7 +7914,7 @@ References: User ID/Message ID, Mode
|
||||
$getVillage = $this->getVillage($wref);
|
||||
|
||||
//Exlude Support, Nature, Natars, TaskMaster and Multihunter
|
||||
if ($getVillage['owner'] > 5){
|
||||
if ($getVillage && $getVillage['owner'] > 5){
|
||||
$crop = $this->getCropProdstarv($wref, false);
|
||||
$unitArrays = $technology->getAllUnits($wref, false, 0, false);
|
||||
$villageUpkeep = $getVillage['pop'] + $technology->getUpkeep($unitArrays, 0, $wref);
|
||||
|
||||
@@ -109,6 +109,7 @@ define("TRAVIAN_COPYRIGHT","TravianZ 100% Open Source Travian Clone.");
|
||||
//BUILD.TPL
|
||||
define("CUR_PROD","Current production");
|
||||
define("NEXT_PROD","Production at level ");
|
||||
define("CONSTRUCT_BUILD","Construct Building");
|
||||
|
||||
//BUILDINGS
|
||||
define("B1","Woodcutter");
|
||||
@@ -143,6 +144,7 @@ define("LOYALTY","Loyalty");
|
||||
define("CALCULATED_IN","Calculated in");
|
||||
define("SEVER_TIME","Server time:");
|
||||
define("HI","HI");
|
||||
define("P_IN","in");
|
||||
|
||||
//QUEST
|
||||
define("Q_CONTINUE","Continue with the next task.");
|
||||
@@ -594,6 +596,9 @@ define("BECOME_COMUNITY","Become part of our community now!");
|
||||
define("BECOME_COMUNITY2","Become a part of one of<br>the biggest gaming<br>communities in the<br>world.");
|
||||
define("NEWS","News");
|
||||
define("SCREENSHOTS","Screenshots");
|
||||
define("FAQ","FAQ");
|
||||
define("SPIELREGELN","Rules");
|
||||
define("AGB","Terms and Conditions");
|
||||
define("LEARN1","Upgrade your fields and mines to increase your resource production. You will need resources to construct buildings and train soldiers.");
|
||||
define("LEARN2","Construct and expand the buildings in your village. Buildings improve your overall infrastructure, increase your resource production and allow you to research, train and upgrade your troops.");
|
||||
define("LEARN3","View and interact with your surroundings. You can make new friends or new enemies, make use of the nearby oases and observe as your empire grows and becomes stronger.");
|
||||
@@ -832,7 +837,7 @@ define("RALLYPOINT_COMMENCE","Troops movement will be displayed when the ".RALLY
|
||||
define("OVERVIEW","Overview");
|
||||
define("REINFORCEMENT","Reinforcement");
|
||||
define("EVASION_SETTINGS","evasion settings");
|
||||
define("SEND_TROOPS_AWAY_MAX","Send troops away a maximun of");
|
||||
define("SEND_TROOPS_AWAY_MAX","Send troops away a maximum of");
|
||||
define("TIMES","times");
|
||||
define("PER_EVASION","per evasion");
|
||||
define("RALLYPOINT_DESC","Your village's troops meet here. From here you can send them out to conquer, raid or reinforce other villages.");
|
||||
|
||||
+17
-3
@@ -348,17 +348,31 @@ class Market
|
||||
$wwvillage = $database->getResourceLevel($village->wid);
|
||||
if($wwvillage['f99t'] != 40){
|
||||
if($session->userinfo['gold'] >= 3){
|
||||
// check that we're not trying to sell more resources that we actually have
|
||||
if (
|
||||
(int) $post['m2'][0] < 0 && round($village->awood) + (int) $post['m2'][0] < 0
|
||||
||
|
||||
(int) $post['m2'][1] < 0 && round($village->aclay) + (int) $post['m2'][1] < 0
|
||||
||
|
||||
(int) $post['m2'][2] < 0 && round($village->airon) + (int) $post['m2'][2] < 0
|
||||
||
|
||||
(int) $post['m2'][3] < 0 && round($village->acrop) + (int) $post['m2'][3] < 0
|
||||
) {
|
||||
header("Location: build.php?id=".$post['id']."&t=3");
|
||||
exit;
|
||||
}
|
||||
|
||||
//Check if there are too many resources
|
||||
if(($post['m2'][0]+$post['m2'][1]+$post['m2'][2]+$post['m2'][3])<=(round($village->awood)+round($village->aclay)+round($village->airon)+round($village->acrop))){
|
||||
if ( ((int) $post['m2'][0] + (int) $post['m2'][1] + (int) $post['m2'][2] + (int) $post['m2'][3] ) <= ( round($village->awood) + round($village->aclay) + round($village->airon) + round($village->acrop) ) ) {
|
||||
$database->setVillageField(
|
||||
$village->wid,
|
||||
["wood", "clay", "iron", "crop"],
|
||||
[$post['m2'][0], $post['m2'][1], $post['m2'][2], $post['m2'][3]]
|
||||
);
|
||||
$database->modifyGold($session->uid, 3, 0);
|
||||
header("Location: build.php?id=".$post['id']."&t=3&c");;
|
||||
header("Location: build.php?id=".$post['id']."&t=3&c");
|
||||
exit;
|
||||
}else{
|
||||
} else {
|
||||
header("Location: build.php?id=".$post['id']."&t=3");
|
||||
exit;
|
||||
}
|
||||
|
||||
+15
-5
@@ -152,7 +152,7 @@ class Village {
|
||||
global $technology, $database, $session;
|
||||
|
||||
// clear cache, since we're updating village data
|
||||
call_user_func(get_class($database).'::clearVillageCache');
|
||||
call_user_func(get_class($database).'::clearVillageCache');
|
||||
$upkeep = $technology->getUpkeep($this->unitall, 0, $this->wid);
|
||||
$this->production['wood'] = $this->getWoodProd();
|
||||
$this->production['clay'] = $this->getClayProd();
|
||||
@@ -169,9 +169,6 @@ class Village {
|
||||
$niron = min(($this->production['iron'] / 3600) * $timepast, $this->maxstore);
|
||||
$ncrop = min(($this->production['crop'] / 3600) * $timepast, $this->maxcrop);
|
||||
|
||||
// clear cache, since we're updating village data
|
||||
call_user_func(get_class($database).'::clearVillageCache');
|
||||
|
||||
$database->modifyResource($this->wid, $nwood, $nclay, $niron, $ncrop, 1);
|
||||
$database->updateVillage($this->wid);
|
||||
$this->LoadTown(true);
|
||||
@@ -320,5 +317,18 @@ class Village {
|
||||
};
|
||||
$village = new Village;
|
||||
$building = new Building;
|
||||
//include_once("Automation.php");
|
||||
|
||||
// if automation is not currently running, run it for this user,
|
||||
// so if they are waiting for some automation to take place
|
||||
// (units, resources, buildings...), the script will calculate that
|
||||
// before showing the page
|
||||
// ... this is a quick fix for automation being called async by AJAX
|
||||
// and users seeing old values on their page even though new values
|
||||
// already exist after the initial AJAX call
|
||||
if ( !file_exists( AUTOMATION_LOCK_FILE_NAME ) ) {
|
||||
define( 'AUTOMATION_MANUAL_RUN', true );
|
||||
// this file is auto-removed by the Automation.php script
|
||||
file_put_contents( AUTOMATION_LOCK_FILE_NAME, '' );
|
||||
include_once("Automation.php");
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[](https://www.codetriage.com/shadowss/travianz)
|
||||
[](https://github.com/Shadowss/TravianZ)
|
||||
[](https://github.com/Shadowss/TravianZ)
|
||||
[](https://github.com/Shadowss/TravianZ)
|
||||
[](https://github.com/Shadowss/TravianZ)
|
||||
[](https://github.com/Shadowss/TravianZ)
|
||||
@@ -17,7 +17,7 @@
|
||||
[](https://twitter.com/cata7007)
|
||||
======
|
||||
|
||||
TravianZ Version **v.8.3.4**
|
||||
TravianZ Version **v.8.3.5**
|
||||
======
|
||||
**Note:** this game is still in a pre-release state, although at this point it is very playable, tested and found to be fairly stable
|
||||
|
||||
|
||||
@@ -1225,10 +1225,11 @@ if ($residence<10 && $palace<10){?>
|
||||
|
||||
<?php } elseif($_SESSION['qst']== 34){
|
||||
|
||||
// Checking 3 settlers trained or no
|
||||
// check whether 3 settlers were trained, or whether the user already has a second village founded
|
||||
$units = $village->unitall;
|
||||
$unarray2=array("","u10", "u20","u30");
|
||||
if ($units[$unarray2[$session->userinfo['tribe']]]<3){ $cp = CP;?>
|
||||
$vil = $database->getProfileVillages($session->uid);
|
||||
if ( $units[$unarray2[$session->userinfo['tribe']]] < 3 && count( $vil ) == 1 ){ $cp = CP;?>
|
||||
|
||||
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 26: 3 settlers.<\/h1><br \/><i>”To found a new village, you will need settlers. You can train them in the palace or residence.”<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Train 3 settlers.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"new_village\"><\/div>\n\t\t","number":"-34","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":99}
|
||||
<?php $_SESSION['qstnew']='0'; }else{ $_SESSION['qstnew']='1'; ?>
|
||||
|
||||
@@ -860,7 +860,7 @@ if ($cropL<1){?>
|
||||
<?php } elseif($_SESSION['qst']== 3){
|
||||
|
||||
//Check the village name is changed or is default name
|
||||
$vName=str_replace(''', "'", $village->vname);
|
||||
$vName=rtrim(str_replace(''', "'", $village->vname));
|
||||
if ($vName==$session->userinfo['username']."'s village"){?>
|
||||
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/><?php echo Q3; ?><\/h1><br \/><i>”<?php echo Q3_DESC; ?>”<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><?php echo Q3_ORDER; ?><\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"village_name\"><\/div>\n\t\t","number":"-3","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":99}
|
||||
<?php $_SESSION['qstnew']='0'; }else{ $_SESSION['qstnew']='1'; ?>
|
||||
|
||||
@@ -19,7 +19,7 @@ foreach($topics as $top) {
|
||||
$ans = preg_replace('/\[\/message\]/', '', $ans);
|
||||
}
|
||||
?>
|
||||
<form method="post" name="post" action="allianz.php?s=2&fid2=<?php echo $_GET['fid2']; ?>&tid=<?php echo $_GET['idt']; ?>">
|
||||
<form method="post" name="post" action="allianz.php?s=2&tid=<?php echo $_GET['idt']; ?>">
|
||||
<input type="hidden" name="s" value="2">
|
||||
<input type="hidden" name="tid" value="<?php echo $_GET['idt']; ?>">
|
||||
<input type="hidden" name="editans" value="1">
|
||||
|
||||
@@ -138,7 +138,7 @@ if(isset($_POST['newpost']) && isset($_POST['text']) && !empty($_POST['text']) &
|
||||
if(isset($_POST['editans']) && isset($_POST['text']) && !empty($_POST['text'])
|
||||
&& isset($_POST['tid']) && !empty($_POST['tid']) &&
|
||||
Alliance::canAct(['aid' => $aid, 'alliance' => ($topic = reset($database->ShowTopic($_POST['tid'])))['alliance'],
|
||||
'forum_perm' => $opt['opt5'], 'admin' => $_GET['admin'], 'owner' => $topic['owner'],
|
||||
'forum_perm' => $opt['opt5'], 'admin' => ( !empty( $_GET['admin'] ) ? $_GET['admin'] : '' ), 'owner' => $topic['owner'],
|
||||
'forum_owner' => reset($database->ForumCatEdit($topic['cat']))['owner']], 1))
|
||||
{
|
||||
$text = $_POST['text'];
|
||||
|
||||
@@ -14,7 +14,7 @@ else
|
||||
<?php include("Templates/goldClub/farmlist.tpl"); ?>
|
||||
</div>
|
||||
<br />
|
||||
<?php if($hideevasion == 0){ ?>
|
||||
<?php if( !isset( $hideevasion ) || $hideevasion == 0){ ?>
|
||||
<table id="raidList" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -20,7 +20,7 @@ for ($a = 1; $a <= 4; $a++) {
|
||||
}
|
||||
}
|
||||
$allres = (int) $_POST['r1'] + (int) $_POST['r2'] + (int) $_POST['r3'] + (int) $_POST['r4'];
|
||||
if($_POST['x'] != "" && $_POST['y'] != "" && is_numeric($_POST['x']) && is_numeric($_POST['y'])){
|
||||
if(isset( $_POST['x'] ) && isset( $_POST['y'] ) && $_POST['x'] != "" && $_POST['y'] != "" && is_numeric($_POST['x']) && is_numeric($_POST['y'])){
|
||||
$getwref = $database->getVilWref($_POST['x'],$_POST['y']);
|
||||
$checkexist = $database->checkVilExist($getwref);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
echo "<p class=\"error2\">".NOT_ENOUGH_MERCHANTS."</p>";
|
||||
}
|
||||
|
||||
echo "<br /><p>Merchants: ".$market->merchantAvail()."/".$market->merchant."</p>";
|
||||
echo "<br /><p>".MERCHANT.": " .$market->merchantAvail()."/".$market->merchant."</p>";
|
||||
?>
|
||||
<input type="image" tabindex="8" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" <?php //if(!$market->merchantAvail()) { echo "DISABLED"; }?>/></p>
|
||||
</form>
|
||||
|
||||
@@ -13,7 +13,7 @@ $routeaccess = 1;
|
||||
if(isset($_GET['create']) && $session->gold > 1){
|
||||
$routeaccess = 1;
|
||||
include("17_create.tpl");
|
||||
}else if($_POST['action'] == 'editRoute' && isset($_POST['routeid']) && !empty($_POST['routeid']) && $database->getTradeRouteUid($_POST['routeid']) == $session->uid){
|
||||
}else if(isset($_POST['action']) && $_POST['action'] == 'editRoute' && isset($_POST['routeid']) && !empty($_POST['routeid']) && $database->getTradeRouteUid($_POST['routeid']) == $session->uid){
|
||||
include("17_edit.tpl");
|
||||
}else{
|
||||
?>
|
||||
@@ -52,7 +52,13 @@ echo "".TRADE_ROUTE_TO." <a href=karte.php?d=".$route['wid']."&c=".$generator->g
|
||||
<th>
|
||||
</th>
|
||||
<th colspan="4">
|
||||
<?php $routeid=$routeid == 0? $routeid=0:$routeid; ?>
|
||||
<?php
|
||||
if ( isset( $routeid ) ) {
|
||||
$routeid = $routeid == 0? $routeid=0:$routeid;
|
||||
} else {
|
||||
$routeid = 0;
|
||||
}
|
||||
?>
|
||||
<button type="submit" name="action" value="extendRoute" id="btn_id" class="trav_buttons"><b><?php echo EXTEND;?>*</b></button>
|
||||
| <button type="submit" name="action" value="editRoute" id="btn_id" class="trav_buttons"><b><?php echo EDIT;?></b></button>
|
||||
| <button type="submit" name="action" value="delRoute" id="btn_id" class="trav_buttons"><b><?php echo DELETE;?></b></button>
|
||||
|
||||
+10
-10
@@ -72,49 +72,49 @@ echo "<td colspan=\"2\"><div class=\"none\" align=\"center\">".RESEARCH_AVAILABL
|
||||
echo "<p class=\"switch\"><a id=\"researchFutureLink\" href=\"#\" onclick=\"return $('researchFuture').toggle();\">".SHOW_MORE."</a></p>
|
||||
<table id=\"researchFuture\" class=\"build_details hide\" cellspacing=\"1\" cellpadding=\"1\">
|
||||
<thead><tr><td colspan=\"2\">".PREREQUISITES."</td></tr><tbody>";
|
||||
if(!$technology->meetRRequirement(22) && !$technology->getTech(22)) {
|
||||
echo"<tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u22\" title=\"".U22."\" alt=\"Swordsman\" src=\"img/x.gif\"/>
|
||||
<a onclick=\"return Popup(22, 1);\" href=\"#\">Swordsman</a></div></td><td class=\"cond\"><a href=\"#\" onclick=\"return Popup(22, 4);\">".ACADEMY."</a>
|
||||
if(!$technology->meetRRequirement(22) && !$technology->getTech(22)) {
|
||||
echo"<tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u22\" title=\"".U22."\" alt=\"".U22."\" src=\"img/x.gif\"/>
|
||||
<a onclick=\"return Popup(22, 1);\" href=\"#\">".U22."</a></div></td><td class=\"cond\"><a href=\"#\" onclick=\"return Popup(22, 4);\">".ACADEMY."</a>
|
||||
<span title=\"+2\"> ".LEVEL." 3</span><br /><a href=\"#\" onclick=\"return Popup(12, 4);\">".BLACKSMITH." </a><span title=\"+1\"> ".LEVEL." 1</span></td></tr>";
|
||||
}
|
||||
if(!$technology->meetRRequirement(23) && !$technology->getTech(23)) {
|
||||
echo"<tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u23\" title=\"".U23."\" alt=\"Pathfinder\" src=\"img/x.gif\"/>
|
||||
<a onclick=\"return Popup(23, 1);\" href=\"#\">Pathfinder</a></div></td><td class=\"cond\"><a href=\"#\" onclick=\"return Popup(22, 4);\">".ACADEMY."</a>
|
||||
<a onclick=\"return Popup(23, 1);\" href=\"#\">".U23."</a></div></td><td class=\"cond\"><a href=\"#\" onclick=\"return Popup(22, 4);\">".ACADEMY."</a>
|
||||
<span title=\"+2\"> ".LEVEL." 5</span><br /><a href=\"#\" onclick=\"return Popup(20, 4);\">".STABLE." </a><span title=\"+1\"> ".LEVEL." 1</span> </td></tr>";
|
||||
}
|
||||
if(!$technology->meetRRequirement(24) && !$technology->getTech(24)) {
|
||||
echo "<tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u24\" title=\"".U24."\" alt=\"Theutates Thunder\" src=\"img/x.gif\"/>
|
||||
<a onclick=\"return Popup(24, 1);\" href=\"#\">Theutates Thunder</a></div></td><td class=\"cond\">
|
||||
<a onclick=\"return Popup(24, 1);\" href=\"#\">".U24."</a></div></td><td class=\"cond\">
|
||||
<a href=\"#\" onclick=\"return Popup(22, 4);\">".ACADEMY."</a><span title=\"+2\"> ".LEVEL." 5</span><br /><a href=\"#\" onclick=\"return Popup(20, 4);\">".STABLE."</a>
|
||||
<span title=\"+3\"> ".LEVEL." 3</span> </td></tr>";
|
||||
}
|
||||
if(!$technology->meetRRequirement(25) && !$technology->getTech(25)) {
|
||||
echo "<tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u25\" title=\"".U25."\" alt=\"Druidrider\" src=\"img/x.gif\"/>
|
||||
<a onclick=\"return Popup(25, 1);\" href=\"#\">Druidrider</a></div></td><td class=\"cond\">
|
||||
<a onclick=\"return Popup(25, 1);\" href=\"#\">".U25."</a></div></td><td class=\"cond\">
|
||||
<a href=\"#\" onclick=\"return Popup(22, 4);\">".ACADEMY."</a><span title=\"+2\"> ".LEVEL." 5</span><br /><a href=\"#\" onclick=\"return Popup(20, 4);\">".STABLE."</a>
|
||||
<span title=\"+5\"> ".LEVEL." 5</span> </td></tr>";
|
||||
}
|
||||
if(!$technology->meetRRequirement(26) && !$technology->getTech(26)) {
|
||||
echo "<tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u26\" title=\"".U26."\" alt=\"Haeduan\" src=\"img/x.gif\"/>
|
||||
<a onclick=\"return Popup(26, 1);\" href=\"#\">Haeduan</a></div></td><td class=\"cond\">
|
||||
<a onclick=\"return Popup(26, 1);\" href=\"#\">".U26."</a></div></td><td class=\"cond\">
|
||||
<a href=\"#\" onclick=\"return Popup(22, 4);\">".ACADEMY."</a><span title=\"+12\"> ".LEVEL." 15</span><br /><a href=\"#\" onclick=\"return Popup(20, 4);\">
|
||||
".STABLE."</a><span title=\"+10\"> ".LEVEL." 10</span> </td></tr>";
|
||||
}
|
||||
if(!$technology->meetRRequirement(27) && !$technology->getTech(27)) {
|
||||
echo "
|
||||
<tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u27\" title=\"".U27."\" alt=\"Ram\" src=\"img/x.gif\"/>
|
||||
<a onclick=\"return Popup(27, 1);\" href=\"#\">Ram</a></div></td><td class=\"cond\"><a href=\"#\" onclick=\"return Popup(22, 4);\">".ACADEMY."</a>
|
||||
<a onclick=\"return Popup(27, 1);\" href=\"#\">".U27."</a></div></td><td class=\"cond\"><a href=\"#\" onclick=\"return Popup(22, 4);\">".ACADEMY."</a>
|
||||
<span title=\"+7\"> ".LEVEL." 10</span><br /><a href=\"#\" onclick=\"return Popup(21, 4);\">".WORKSHOP."</a><span title=\"+1\"> ".LEVEL." 1</span></td></tr>";
|
||||
}
|
||||
if(!$technology->meetRRequirement(28) && !$technology->getTech(28)) {
|
||||
echo "<tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u28\" title=\"".U28."\" alt=\"Trebuchet\" src=\"img/x.gif\"/>
|
||||
<a onclick=\"return Popup(28, 1);\" href=\"#\">Trebuchet</a></div></td><td class=\"cond\"><a href=\"#\" onclick=\"return Popup(21, 4);\">".WORKSHOP."</a>
|
||||
<a onclick=\"return Popup(28, 1);\" href=\"#\">".U28."</a></div></td><td class=\"cond\"><a href=\"#\" onclick=\"return Popup(21, 4);\">".WORKSHOP."</a>
|
||||
<span title=\"+10\"> ".LEVEL." 10</span><br /><a href=\"#\" onclick=\"return Popup(22, 4);\">".ACADEMY."</a><span title=\"+12\"> ".LEVEL." 15</span> </td>
|
||||
</tr>";
|
||||
}
|
||||
if(!$technology->meetRRequirement(29) && !$technology->getTech(29)) {
|
||||
echo " <tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u29\" title=\"".U29."\" alt=\"Chieftain\" src=\"img/x.gif\"/>
|
||||
<a onclick=\"return Popup(29, 1);\" href=\"#\">Chieftain</a></div></td><td class=\"cond\">
|
||||
<a onclick=\"return Popup(29, 1);\" href=\"#\">".U29."</a></div></td><td class=\"cond\">
|
||||
<a href=\"#\" onclick=\"return Popup(14, 4);\">".RALLYPOINT."</a><span title=\"+9\"> ".LEVEL." 10</span><br /><a href=\"#\" onclick=\"return Popup(22, 4);\">
|
||||
".ACADEMY."</a><span title=\"+17\"> ".LEVEL." 20</span></td></tr>";
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$artifactsSum = $database->getArtifactsSumByKind($session->uid, $village->wid, 6);
|
||||
$GreatGranaryWarehouseBuildable = $artifactsSum['small'] > 0 || $artifactsSum['large'] > 0;
|
||||
$GreatGranaryWarehouseBuildable = $artifactsSum['small'] > 0 || $artifactsSum['great'] > 0;
|
||||
|
||||
$mainbuilding = $building->getTypeLevel(15);
|
||||
$cranny = $building->getTypeLevel(23);
|
||||
@@ -274,16 +274,16 @@ if($stable == 0 && (($blacksmith <= 2 && $blacksmith != 0) || ($academy >= 2 &&
|
||||
if($treasury == 0 && $mainbuilding <= 9 && $mainbuilding >= 5 && $village->natar == 0) {
|
||||
include("soon/treasury.tpl");
|
||||
}
|
||||
if($brickyard == 0 && $claypit <= 9 && $claypit >= 5 && $mainbuilding >= 2 && $mainbuilding <= 4) {
|
||||
if($brickyard == 0 && ( ($claypit <= 9 && $claypit >= 5) || $claypit == 10 ) && $mainbuilding >= 2) {
|
||||
include("soon/brickyard.tpl");
|
||||
}
|
||||
if($sawmill == 0 && $woodcutter <= 9 && $woodcutter >= 5 && $mainbuilding >= 2 && $mainbuilding <= 4) {
|
||||
if($sawmill == 0 && ( ( $woodcutter <= 9 && $woodcutter >= 5 ) || $woodcutter == 10 ) && $mainbuilding >= 2) {
|
||||
include("soon/sawmill.tpl");
|
||||
}
|
||||
if($ironfoundry == 0 && $ironmine <= 9 && $ironmine >= 5 && $mainbuilding >= 2 && $mainbuilding <= 4) {
|
||||
if($ironfoundry == 0 && ( ( $ironmine <= 9 && $ironmine >= 5 ) || $ironmine == 10 ) && $mainbuilding >= 2) {
|
||||
include("soon/ironfoundry.tpl");
|
||||
}
|
||||
if($workshop == 0 && $academy <= 9 && $academy >= 5 && $mainbuilding >= 2 && $mainbuilding <= 4) {
|
||||
if($workshop == 0 && $academy <= 9 && $academy >= 5 && $mainbuilding >= 2) {
|
||||
include("soon/workshop.tpl");
|
||||
}
|
||||
if($tournamentsquare == 0 && $rallypoint <= 14 && $rallypoint >= 7) {
|
||||
@@ -327,7 +327,7 @@ if($palace == 0 && ($embassy == 0 || $mainbuilding <= 2) && $village->natar == 0
|
||||
if($blacksmith == 0 && ($academy == 0 || $mainbuilding == 1)) {
|
||||
include_once("soon/blacksmith.tpl");
|
||||
}
|
||||
if($stonemason == 0 && ($palace == 0 || $mainbuilding <= 2) && $residence == 0) {
|
||||
if($stonemasonslodge == 0 && ($palace == 0 || $mainbuilding <= 2) && $residence == 0) {
|
||||
include_once("soon/stonemason.tpl");
|
||||
}
|
||||
if($stable == 0 && ($blacksmith == 0 || $academy <= 2)) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<h2>Academy</h2>
|
||||
<h2><?php echo ACADEMY ?></h2>
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">In the academy new unit types can be researched. By increasing its level you can order the research of better units.</td>
|
||||
<td class="desc"><?php echo ACADEMY_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(22,4);">
|
||||
<img class="building g22" src="img/x.gif" alt="Academy" title="Academy" /></a>
|
||||
<img class="building g22" src="img/x.gif" alt="<?php echo ACADEMY ?>" title="<?php echo ACADEMY ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -13,4 +13,4 @@
|
||||
include("availupgrade.tpl");
|
||||
?>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<h2>Armoury</h2>
|
||||
<h2><?php echo ARMOURY ?></h2>
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">In the armoury's melting furnaces your warriors' armour is enhanced. By increasing its level you can order the fabrication of even better armour.</td>
|
||||
<td class="desc"><?php echo ARMOURY_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(13,4);">
|
||||
<img class="building g13" src="img/x.gif" alt="Armoury" title="Armoury" /></a>
|
||||
<img class="building g13" src="img/x.gif" alt="<?php echo ARMOURY ?>" title="<?php echo ARMOURY ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -13,4 +13,4 @@
|
||||
include("availupgrade.tpl");
|
||||
?>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -20,15 +20,15 @@ $uprequire = $building->resourceRequired($id, $bid);
|
||||
<td class="link">
|
||||
<?php
|
||||
if($bindicator == 2) {
|
||||
echo "<span class=\"none\">The workers are already at work.</span>";
|
||||
echo "<span class=\"none\">" . WORKERS_ALREADY_WORK_WAITING . "</span>";
|
||||
if($session->goldclub == 1){
|
||||
?> </br>
|
||||
<?php
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&c=$session->checker\">Constructing with master builder </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&c=$session->checker\">" . CONSTRUCTING_MASTER_BUILDER . "</a>";
|
||||
echo '<font color="#B3B3B3">(costs: <img src="'.GP_LOCATE.'img/a/gold_g.gif" alt="Gold" title="Gold"/>1)</font>';
|
||||
}else{
|
||||
echo "<span class=\"none\">Constructing with master builder</span>";
|
||||
echo "<span class=\"none\">" . CONSTRUCTING_MASTER_BUILDER . "</span>";
|
||||
echo '<font color="#B3B3B3">(costs: <img src="'.GP_LOCATE.'img/a/gold_g.gif" alt="Gold" title="Gold"/>1)</font>';
|
||||
}
|
||||
}
|
||||
@@ -39,10 +39,10 @@ $uprequire = $building->resourceRequired($id, $bid);
|
||||
?> </br>
|
||||
<?php
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&c=$session->checker\">Constructing with master builder </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&c=$session->checker\">" . CONSTRUCTING_MASTER_BUILDER . "</a>";
|
||||
echo '<font color="#B3B3B3">(costs: <img src="'.GP_LOCATE.'img/a/gold_g.gif" alt="Gold" title="Gold"/>1)</font>';
|
||||
}else{
|
||||
echo "<span class=\"none\">Constructing with master builder</span>";
|
||||
echo "<span class=\"none\">" . CONSTRUCTING_MASTER_BUILDER . "</span>";
|
||||
echo '<font color="#B3B3B3">(costs: <img src="'.GP_LOCATE.'img/a/gold_g.gif" alt="Gold" title="Gold"/>1)</font>';
|
||||
}
|
||||
}
|
||||
@@ -58,24 +58,24 @@ $uprequire = $building->resourceRequired($id, $bid);
|
||||
}
|
||||
else if($bindicator == 7) {
|
||||
$neededtime = $building->calculateAvaliable($id,$bid);
|
||||
echo "<span class=\"none\">Enough resources ".$neededtime[0]." at ".$neededtime[1]."</span>";
|
||||
echo "<span class=\"none\">" .ENOUGH_RESOURCES . " " .$neededtime[0]." at ".$neededtime[1]."</span>";
|
||||
if($session->goldclub == 1){
|
||||
?> </br>
|
||||
<?php
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&c=$session->checker\">Constructing with master builder </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&c=$session->checker\">" . CONSTRUCTING_MASTER_BUILDER . "</a>";
|
||||
echo '<font color="#B3B3B3">(costs: <img src="'.GP_LOCATE.'img/a/gold_g.gif" alt="Gold" title="Gold"/>1)</font>';
|
||||
}else{
|
||||
echo "<span class=\"none\">Constructing with master builder</span>";
|
||||
echo "<span class=\"none\">" . CONSTRUCTING_MASTER_BUILDER . "</span>";
|
||||
echo '<font color="#B3B3B3">(costs: <img src="'.GP_LOCATE.'img/a/gold_g.gif" alt="Gold" title="Gold"/>1)</font>';
|
||||
}
|
||||
}
|
||||
}
|
||||
else if($bindicator == 8) {
|
||||
if($session->access!=BANNED){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?a=$bid&id=$id&c=".$session->checker."\">Construct building.</a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?a=$bid&id=$id&c=".$session->checker."\">". CONSTRUCT_BUILD."</a>";
|
||||
}else{
|
||||
echo "<a class=\"build\" href=\"banned.php\">Construct building.</a>";
|
||||
echo "<a class=\"build\" href=\"banned.php\">". CONSTRUCT_BUILD."</a>";
|
||||
}
|
||||
}
|
||||
else if($bindicator == 9) {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<h2>Barracks</h2>
|
||||
<h2><?php echo BARRACKS ?></h2>
|
||||
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">In the barracks infantry can be trained. The higher its level the faster the troops are trained.</td>
|
||||
<td class="desc"><?php echo BARRACKS_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(19,4);">
|
||||
<img class="building g19" src="img/x.gif" alt="Barracks" title="Barracks" /></a>
|
||||
<img class="building g19" src="img/x.gif" alt="<?php echo BARRACKS ?>" title="<?php echo BARRACKS ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -14,4 +14,4 @@
|
||||
include("availupgrade.tpl");
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
<h2>Blacksmith</h2>
|
||||
<h2><?php echo BLACKSMITH ?></h2>
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">In the blacksmith's melting furnaces your warriors' weapons are enhanced. By increasing its level you can order the fabrication of even better weapons.
|
||||
|
||||
</td>
|
||||
<td class="desc"><?php echo BLACKSMITH_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(12,4);">
|
||||
<img class="building g12" src="img/x.gif" alt="Blacksmith" title="Blacksmith" /></a>
|
||||
<img class="building g12" src="img/x.gif" alt="<?php echo BLACKSMITH ?>" title="<?php echo BLACKSMITH ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -15,4 +13,4 @@
|
||||
include("availupgrade.tpl");
|
||||
?>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<h2>City Wall</h2>
|
||||
<h2><?php echo CITYWALL ?></h2>
|
||||
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">By building a City Wall you can protect your village against the barbarian hordes of your enemies. The higher the wall's level, the higher the bonus given to your forces' defence.</td>
|
||||
<td class="desc"><?php echo CITYWALL_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
</td>
|
||||
</tr>
|
||||
@@ -12,4 +12,4 @@
|
||||
include("availupgrade.tpl");
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<h2>Cranny</h2>
|
||||
<h2><?php echo CRANNY ?></h2>
|
||||
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">The cranny is used to hide some of your resources when the village is attacked. These resources cannot be stolen.</td>
|
||||
<td class="desc"><?php echo CRANNY_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(26,4);">
|
||||
<img class="building g23" src="img/x.gif" alt="Cranny" title="Cranny" /></a>
|
||||
<img class="building g23" src="img/x.gif" alt="<?php echo CRANNY ?>" title="<?php echo CRANNY ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -14,4 +14,4 @@
|
||||
include("availupgrade.tpl");
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<h2>Embassy</h2>
|
||||
<h2><?php echo EMBASSY ?></h2>
|
||||
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">The embassy is a place for diplomats. The higher its level the more options the king gains.</td>
|
||||
<td class="desc"><?php echo EMBASSY_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(18,4);">
|
||||
<img class="building g18" src="img/x.gif" alt="Embassy" title="Embassy" /></a>
|
||||
<img class="building g18" src="img/x.gif" alt="<?php echo EMBASSY ?>" title="<?php echo EMBASSY ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -14,4 +14,4 @@
|
||||
include("availupgrade.tpl");
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
|
||||
<h2>Granary</h2>
|
||||
<h2><?php echo GRANARY ?></h2>
|
||||
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">In the granary the crop produced in your farms is stored. By increasing its level you increase the granary’s capacity.</td>
|
||||
<td class="desc"><?php echo GRANARY_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(11,4);">
|
||||
<img class="building g11" src="img/x.gif" alt="Granary" title="Granary" /></a>
|
||||
<img class="building g11" src="img/x.gif" alt="<?php echo GRANARY ?>" title="<?php echo GRANARY ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -15,4 +15,4 @@
|
||||
include("availupgrade.tpl");
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<h2>Hero's Mansion</h2>
|
||||
<h2><?php echo HEROSMANSION ?></h2>
|
||||
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">In the Hero's Mansion you can train a hero and starting with building level 10 occupy oases in your surrounding area.</td>
|
||||
<td class="desc"><?php echo HEROSMANSION_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(37,4);">
|
||||
<img class="building g37" src="img/x.gif" alt="Hero's Mansion" title="Hero's Mansion" /></a>
|
||||
<img class="building g37" src="img/x.gif" alt="<?php echo HEROSMANSION ?>" title="<?php echo HEROSMANSION ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -14,4 +14,4 @@
|
||||
include("availupgrade.tpl");
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<h2>Marketplace</h2>
|
||||
<h2><?php echo MARKETPLACE ?></h2>
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">At the marketplace you can trade resources with other players. The higher its level, the more resources can be transported at the same time.</td>
|
||||
<td class="desc"><?php echo MARKETPLACE_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(17,4);">
|
||||
<img class="building g17" src="img/x.gif" alt="Marketplace" title="Marketplace" /></a>
|
||||
<img class="building g17" src="img/x.gif" alt="<?php echo MARKETPLACE ?>" title="<?php echo MARKETPLACE ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -13,4 +13,4 @@
|
||||
include("availupgrade.tpl");
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<h2>Palisade</h2>
|
||||
<h2><?php echo PALISADE ?></h2>
|
||||
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">By building a Palisade you can protect your village against the barbarian hordes of your enemies. A higher level Palisade will give your troops a higher defence bonus.</td>
|
||||
<td class="desc"><?php echo PALISADE_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
</td>
|
||||
</tr>
|
||||
@@ -12,4 +12,4 @@
|
||||
include("availupgrade.tpl");
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<h2>Rally point</h2>
|
||||
<h2><?php echo RALLYPOINT ?></h2>
|
||||
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">Your village's troops meet here. From here you can send them out to conquer, raid or reinforce other villages.</td>
|
||||
<td class="desc"><?php echo RALLYPOINT_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(16,4);">
|
||||
<img class="g16" src="img/x.gif" alt="Rally point" title="Rally point" /></a>
|
||||
<img class="g16" src="img/x.gif" alt="<?php echo RALLYPOINT ?>" title="<?php echo RALLYPOINT ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -14,4 +14,4 @@
|
||||
include("availupgrade.tpl");
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<h2>Residence</h2>
|
||||
<h2><?php echo RESIDENCE ?></h2>
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">The residence is a small palace, where the king or queen lives when (s)he visits the village. The residence protects the village against enemies who want to conquer it.</td>
|
||||
<td class="desc"><?php echo RESIDENCE_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(25,4);">
|
||||
<img class="building g25" src="img/x.gif" alt="Residence" title="Residence" /></a>
|
||||
<img class="building g25" src="img/x.gif" alt="<?php echo RESIDENCE ?>" title="<?php echo RESIDENCE ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -13,4 +13,4 @@
|
||||
include("availupgrade.tpl");
|
||||
?>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<h2>Stable</h2>
|
||||
<h2><?php echo STABLE ?></h2>
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">In the stable cavalry is trained. The higher its level the faster the troops are trained.</td>
|
||||
<td class="desc"><?php echo STABLE_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(20,4);">
|
||||
<img class="building g20" src="img/x.gif" alt="Stable" title="Stable" /></a>
|
||||
<img class="building g20" src="img/x.gif" alt="<?php echo STABLE ?>" title="<?php echo STABLE ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -13,4 +13,4 @@
|
||||
include("availupgrade.tpl");
|
||||
?>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<h2>Trapper</h2>
|
||||
<h2><?php echo TRAPPER ?></h2>
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">The Trapper protects your village with well hidden traps. Enemies can be imprisoned and won't be able to harm your village anymore. </td>
|
||||
<td class="desc"><?php echo TRAPPER_DESC ?> </td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(36,4);">
|
||||
<img class="building g36" src="img/x.gif" alt="Trapper" title="Trapper" /></a>
|
||||
<img class="building g36" src="img/x.gif" alt="<?php echo TRAPPER ?>" title="<?php echo TRAPPER ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -13,4 +13,4 @@
|
||||
include("availupgrade.tpl");
|
||||
?>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<h2>Warehouse</h2>
|
||||
<h2><?php echo WAREHOUSE ?></h2>
|
||||
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">In your warehouse the resources lumber, clay and iron are stored. By increasing its level you increase your warehouse's capacity.</td>
|
||||
<td class="desc"><?php echo WAREHOUSE_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(10,4);">
|
||||
<img class="building g10" src="img/x.gif" alt="Warehouse" title="Warehouse" /></a>
|
||||
<img class="building g10" src="img/x.gif" alt="<?php echo WAREHOUSE ?>" title="<?php echo WAREHOUSE ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -14,4 +14,4 @@
|
||||
include("availupgrade.tpl");
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<h2>Academy</h2>
|
||||
<h2><?php echo ACADEMY ?></h2>
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">In the academy new unit types can be researched. By increasing its level you can order the research of better units.</td>
|
||||
<td class="desc"><?php echo ACADEMY_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(22,4);">
|
||||
<img class="building g22" src="img/x.gif" alt="Academy" title="Academy" /></a>
|
||||
<img class="building g22" src="img/x.gif" alt="<?php echo ACADEMY ?>" title="<?php echo ACADEMY ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="requ">Prerequisites</td>
|
||||
<td class="requ"><?php echo PREREQUISITES ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" onClick="return Popup(19,4);">Barracks</a> <span title="+3">Level 3</span>, <a href="#" onClick="return Popup(15,4);">Main Building</a> <span title="+2">Level 3</span>
|
||||
<a href="#" onClick="return Popup(19,4);"><?php echo BARRACKS ?></a> <span title="+3"><?php echo LEVEL ?> 3</span>, <a href="#" onClick="return Popup(15,4);"><?php echo MAINBUILDING ?></a> <span title="+2"><?php echo LEVEL ?> 3</span>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<h2>Armoury</h2>
|
||||
<h2><?php echo ARMOURY ?></h2>
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">In the armoury's melting furnaces your warriors' armour is enhanced. By increasing its level you can order the fabrication of even better armour.</td>
|
||||
<td class="desc"><?php echo ARMOURY_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(13,4);">
|
||||
<img class="building g13" src="img/x.gif" alt="Armoury" title="Armoury" /></a>
|
||||
<img class="building g13" src="img/x.gif" alt="<?php echo ARMOURY ?>" title="<?php echo ARMOURY ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="requ">Prerequisites</td>
|
||||
<td class="requ"><?php echo PREREQUISITES ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" onClick="return Popup(15,4);">Main Building</a> <span title="+2">Level 3</span>, <a href="#" onClick="return Popup(22,4);">Academy</a> <span title="+1">Level 1</span>
|
||||
<a href="#" onClick="return Popup(15,4);"><?php echo MAINBUILDING ?></a> <span title="+2"><?php echo LEVEL ?> 3</span>, <a href="#" onClick="return Popup(22,4);"><?php echo ACADEMY ?></a> <span title="+1"><?php echo LEVEL ?> 1</span>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<h2>Barracks</h2>
|
||||
<h2><?php echo BARRACKS ?></h2>
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">In the barracks infantry can be trained. The higher its level the faster the troops are trained.</td>
|
||||
<td class="desc"><?php echo BARRACKS_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(19,4);">
|
||||
<img class="building g19" src="img/x.gif" alt="Barracks" title="Barracks" /></a>
|
||||
<img class="building g19" src="img/x.gif" alt="<?php echo BARRACKS ?>" title="<?php echo BARRACKS ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="requ">Prerequisites</td>
|
||||
<td class="requ"><?php echo PREREQUISITES ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" onClick="return Popup(14,4);">Rally Point</a> <span title="+1">Level 1</span>, <a href="#" onClick="return Popup(23,4);">Main Building</a> <span title="+2">Level 3</span>
|
||||
<a href="#" onClick="return Popup(14,4);"><?php echo RALLYPOINT ?></a> <span title="+1"><?php echo LEVEL ?> 1</span>, <a href="#" onClick="return Popup(23,4);"><?php echo MAINBUILDING ?></a> <span title="+2"><?php echo LEVEL ?> 3</span>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
<h2>Blacksmith</h2>
|
||||
<h2><?php echo BLACKSMITH ?></h2>
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">In the blacksmith's melting furnaces your warriors' weapons are enhanced. By increasing its level you can order the fabrication of even better weapons.
|
||||
|
||||
</td>
|
||||
<td class="desc"><?php echo BLACKSMITH_DESC ?> </td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(12,4);">
|
||||
<img class="building g12" src="img/x.gif" alt="Blacksmith" title="Blacksmith" /></a>
|
||||
<img class="building g12" src="img/x.gif" alt="<?php echo BLACKSMITH ?>" title="<?php echo BLACKSMITH ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="requ">Prerequisites</td>
|
||||
<td class="requ"><?php echo PREREQUISITES ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" onClick="return Popup(15,4);">Main Building</a> <span title="+2">Level 3</span>, <a href="#" onClick="return Popup(22,4);">Academy</a> <span title="+3">Level 3</span>
|
||||
<a href="#" onClick="return Popup(15,4);"><?php echo MAINBUILDING ?></a> <span title="+2"><?php echo LEVEL ?> 3</span>, <a href="#" onClick="return Popup(22,4);"><?php echo ACADEMY ?></a> <span title="+3"><?php echo LEVEL ?> 3</span>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,18 +1,23 @@
|
||||
<h2>Hero's Mansion</h2>
|
||||
<h2><?php echo HEROSMANSION ?></h2>
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">In the Hero's Mansion you can train a hero and starting with building level 10 occupy oases in your surrounding area.</td>
|
||||
<td class="desc"><?php echo HEROSMANSION_DESC; ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(22,4);">
|
||||
<img class="building g37" src="img/x.gif" alt="Hero's Mansion" title="Hero's Mansion" /></a>
|
||||
<img class="building g37" src="img/x.gif" alt="<?php echo HEROSMANSION; ?>" title="<?php echo HEROSMANSION; ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="requ">Prerequisites</td>
|
||||
<td class="requ"><?php echo PREREQUISITES; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" onClick="return Popup(23,4);">Main Building</a> <span title="+2">Level 3</span>, <a href="#" onClick="return Popup(14,4);">Rally Point</a> <span title="+1">Level 1</span>
|
||||
<a href="#" onClick="return Popup(23,4);"><?php echo MAINBUILDING; ?></a>
|
||||
<span title="+2">
|
||||
<?php echo LEVEL; ?> 3
|
||||
</span>,
|
||||
<a href="#" onClick="return Popup(14,4);"><?php echo RALLYPOINT; ?></a>
|
||||
<span title="+1"><?php echo LEVEL; ?> 1</span>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<h2>Residence</h2>
|
||||
<h2><?php echo RESIDENCE ?></h2>
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">The residence is a small palace, where the king or queen lives when (s)he visits the village. The residence protects the village against enemies who want to conquer it.</td>
|
||||
<td class="desc"><?php echo RESIDENCE_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(25,4);">
|
||||
<img class="building g25" src="img/x.gif" alt="Residence" title="Residence" /></a>
|
||||
<img class="building g25" src="img/x.gif" alt="<?php echo RESIDENCE ?>" title="<?php echo RESIDENCE ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="requ">Prerequisites</td>
|
||||
<td class="requ"><?php echo PREREQUISITES ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" onClick="return Popup(15,4);">Main Building</a> <span title="+4">Level 5</span>, <a href="#" onClick="return Popup(26,4);"><strike>Palace</strike></a>
|
||||
<a href="#" onClick="return Popup(15,4);"><?php echo MAINBUILDING ?></a> <span title="+4"><?php echo LEVEL ?> 5</span>, <a href="#" onClick="return Popup(26,4);"><strike><?php echo PALACE ?></strike></a>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<h2>Stable</h2>
|
||||
<h2><?php echo STABLE ?></h2>
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">In the stable cavalry is trained. The higher its level the faster the troops are trained.</td>
|
||||
<td class="desc"><?php echo STABLE_DESC ?></td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(20,4);">
|
||||
<img class="building g20" src="img/x.gif" alt="Stable" title="Stable" /></a>
|
||||
<img class="building g20" src="img/x.gif" alt="<?php echo STABLE ?>" title="<?php echo STABLE ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="requ">Prerequisites</td>
|
||||
<td class="requ"><?php echo PREREQUISITES ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" onClick="return Popup(12,4);">Blacksmith</a> <span title="+3">Level 3</span>, <a href="#" onClick="return Popup(22,4);">Academy</a> <span title="+5">Level 5</span>
|
||||
<a href="#" onClick="return Popup(12,4);"><?php echo BLACKSMITH ?></a> <span title="+3"><?php echo LEVEL ?> 3</span>, <a href="#" onClick="return Popup(22,4);"><?php echo ACADEMY ?></a> <span title="+5"><?php echo LEVEL ?> 5</span>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<h2>Trapper</h2>
|
||||
<h2><?php echo TRAPPER ?></h2>
|
||||
<table class="new_building" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="desc">The Trapper protects your village with well hidden traps. Enemies can be imprisoned and won't be able to harm your village anymore. </td>
|
||||
<td class="desc"><?php echo TRAPPER_DESC ?> </td>
|
||||
<td rowspan="3" class="bimg">
|
||||
<a href="#" onClick="return Popup(36,4);">
|
||||
<img class="building g36" src="img/x.gif" alt="Trapper" title="Trapper" /></a>
|
||||
<img class="building g36" src="img/x.gif" alt="<?php echo TRAPPER ?>" title="<?php echo TRAPPER ?>" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="requ">Prerequisites</td>
|
||||
<td class="requ"><?php echo PREREQUISITES ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" onClick="return Popup(16,4);">Rally Point</a> <span title="+1">Level 1</span>
|
||||
<a href="#" onClick="return Popup(16,4);"><?php echo RALLYPOINT ?></a> <span title="+1"><?php echo LEVEL ?> 1</span>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
if(isset($_GET['z'])) {
|
||||
$currentcoor = $database->getCoor($_GET['z']);++$requse2;
|
||||
$currentcoor = $database->getCoor($_GET['z']);
|
||||
$y = $currentcoor['y'];
|
||||
$x = $currentcoor['x'];
|
||||
$bigmid = $_GET['z'];
|
||||
|
||||
@@ -14,7 +14,7 @@ echo !$oasis['conqured']? UNOCCUOASIS : OCCUOASIS; echo " (".$basearray['x']."|"
|
||||
$otext = !$oasis['conqured']? UNOCCUOASIS : OCCUOASIS;
|
||||
} ?></h1>
|
||||
<?php if($basearray['occupied'] && $basearray['capital']) { echo "<div id=\"dmain\">(capital)</div>"; }
|
||||
if($uinfo['owner'] == 3 && $uinfo['name'] == PLANVILLAGE){
|
||||
if($uinfo && $uinfo['owner'] == 3 && $uinfo['name'] == PLANVILLAGE){
|
||||
?>
|
||||
<img src="img/x.gif" id="detailed_map" class="f99" alt="<?php echo PLANVILLAGE;?>" />
|
||||
<?php }else{ ?>
|
||||
@@ -154,7 +154,8 @@ if($oasis['owner'] == 2){
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if($session->uid == $database->getVillage($_GET['d'])['owner']){
|
||||
$vilData = $database->getVillage($_GET['d']);
|
||||
if( $vilData && $session->uid == $vilData['owner'] ){
|
||||
$limit = "ntype > 3 AND ntype < 8";
|
||||
}
|
||||
else $limit = "ntype < 8 OR ntype > 17";
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<h5><img src="../img/en/t2/newsbox3.gif" alt="newsbox 2"></h5>
|
||||
<div class="news">
|
||||
<div style="text-align: center"><b>TravianZ by Shadow</b></div><br />
|
||||
<b>Version: <font color="Red">v8.3.4</font></b><br />
|
||||
<div style="text-align: center"><b>TravianZ</b></div><br />
|
||||
<b>Version: <font color="Red">v8.3.5</font></b><br />
|
||||
<b>Major Changes:</b> Over 120 bugs fixed, artifacts fully fixed, catapults and rams fully fixed, automated Natars/Artifacts/WW villages/WW building plans, new battle formula (more precise than the old one), automatic artifacts activation, rewritten a lot of code. See more in readme file!<br />
|
||||
<b>Minor Changes:</b> New forum system, Travian-like trapper formula, fixed master builder, double research queue in blacksmith and armoury with plus<br />
|
||||
<b>Script Price:</b> FREE!<br /><br />
|
||||
<div style="text-align: center"><u><b>Released by: Shadow</b></u></div><br />
|
||||
<div style="text-align: center"><u><b>Released by: TravianZ Team</b></u></div><br />
|
||||
<div style="text-align: center"><b>Visit: <a href="http://forum.ragezone.com/f583/travianz-version-modified-shadow-many-967580/">RageZone.com</a></b></div><br />
|
||||
<div style="text-align: center"><b><u>Download from <a href="https://github.com/Shadowss/TravianZ/archive/master.zip">Github</a></u></b></div><br />
|
||||
</div>
|
||||
|
||||
@@ -120,7 +120,7 @@ $name = $session->uid;
|
||||
<input type="hidden" name="cmd" value="_xclick">
|
||||
|
||||
<!-- Specify details about the item that buyers will purchase. -->
|
||||
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package A Gold Pack'; ?>">
|
||||
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package A Gold Pack (' . $session->username . ')'; ?>">
|
||||
<input type="hidden" name="amount" value="<?php echo (defined('PLUS_PACKAGE_A_PRICE') ? str_replace(",", ".", PLUS_PACKAGE_A_PRICE) : '1,99'); ?>">
|
||||
<input type="hidden" name="currency_code" value="<?php echo (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?>">
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ $free = $session->uid;
|
||||
<input type="hidden" name="cmd" value="_xclick">
|
||||
|
||||
<!-- Specify details about the item that buyers will purchase. -->
|
||||
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package C Gold Pack'; ?>">
|
||||
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package C Gold Pack (' . $session->username . ')'; ?>">
|
||||
<input type="hidden" name="amount" value="<?php echo (defined('PLUS_PACKAGE_C_PRICE') ? str_replace(",", ".", PLUS_PACKAGE_C_PRICE) : '9,99'); ?>">
|
||||
<input type="hidden" name="currency_code" value="<?php echo (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?>">
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ $free = $session->uid;
|
||||
<input type="hidden" name="cmd" value="_xclick">
|
||||
|
||||
<!-- Specify details about the item that buyers will purchase. -->
|
||||
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package D Gold Pack'; ?>">
|
||||
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package D Gold Pack (' . $session->username . ')'; ?>">
|
||||
<input type="hidden" name="amount" value="<?php echo (defined('PLUS_PACKAGE_D_PRICE') ? str_replace(",", ".", PLUS_PACKAGE_D_PRICE) : '19,99'); ?>">
|
||||
<input type="hidden" name="currency_code" value="<?php echo (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?>">
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ $free = $session->uid;
|
||||
<input type="hidden" name="cmd" value="_xclick">
|
||||
|
||||
<!-- Specify details about the item that buyers will purchase. -->
|
||||
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package E Gold Pack'; ?>">
|
||||
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package E Gold Pack (' . $session->username . ')'; ?>">
|
||||
<input type="hidden" name="amount" value="<?php echo (defined('PLUS_PACKAGE_E_PRICE') ? str_replace(",", ".", PLUS_PACKAGE_E_PRICE) : '49,99'); ?>">
|
||||
<input type="hidden" name="currency_code" value="<?php echo (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?>">
|
||||
|
||||
|
||||
@@ -1,11 +1,21 @@
|
||||
<table id="coords" cellpadding="1" cellspacing="1">
|
||||
<?php
|
||||
if ( !empty( $form ) && $form->valuearray ) {
|
||||
if ( !empty( $form->valuearray['disabled'] ) ) {
|
||||
$disabled = $form->valuearray['disabled'];
|
||||
}
|
||||
|
||||
if ( !empty( $form->valuearray['disabledr'] ) ) {
|
||||
$disabledr = $form->valuearray['disabledr'];
|
||||
}
|
||||
}
|
||||
?><table id="coords" cellpadding="1" cellspacing="1">
|
||||
<input type="hidden" name="disabledr" value="<?php echo (isset($disabledr) ? $disabledr : ''); ?>">
|
||||
<input type="hidden" name="disabled" value="<?php echo (isset($disabled) ? $disabled : ''); ?>">
|
||||
<tbody><tr>
|
||||
<td class="sel">
|
||||
|
||||
<label>
|
||||
<input class="radio" name="c" <?php if (!isset($checked) || !$checked) {?> checked=checked <?php }?>value="2" type="radio" <?php echo (isset($disabledr) ? $disabledr : ''); ?>>
|
||||
<input class="radio" name="c" <?php if ( ( !isset($disabledr) || !$disabledr ) && ( !isset($checked) || !$checked ) ) {?> checked=checked <?php }?>value="2" type="radio" <?php echo (isset($disabledr) ? $disabledr : ''); ?>>
|
||||
Reinforcement
|
||||
</label>
|
||||
</td>
|
||||
@@ -29,7 +39,12 @@
|
||||
<tr>
|
||||
<td class="sel">
|
||||
<label>
|
||||
<input class="radio" name="c" <?php echo (isset($checked) ? $checked : ''); ?> value="4" type="radio">
|
||||
<input class="radio" name="c" <?php
|
||||
if ( ( isset($disabledr) && $disabledr ) && ( isset($disabled) && $disabled ) ) {
|
||||
$checked = ' checked="checked"';
|
||||
}
|
||||
echo ( ( isset($checked) ? $checked : '' ) );
|
||||
?> value="4" type="radio">
|
||||
Raid
|
||||
</label>
|
||||
</td>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
include('menu.tpl');
|
||||
?>
|
||||
<table id="ressources" cellpadding="1" cellspacing="1">
|
||||
<thead><tr><th colspan="6">Resources</th></tr>
|
||||
<thead><tr><th colspan="6"><?php echo RESOURCES ?></th></tr>
|
||||
<tr>
|
||||
<td>Village</td><td><img class="r1" src="img/x.gif" title="" alt=""></td><td><img class="r2" src="img/x.gif" title="" alt=""></td><td><img class="r3" src="img/x.gif" title="" alt=""></td><td><img class="r4" src="img/x.gif" title="" alt=""></td><td>Merchants</td>
|
||||
<td>Village</td><td><img class="r1" src="img/x.gif" title="" alt=""></td><td><img class="r2" src="img/x.gif" title="" alt=""></td><td><img class="r3" src="img/x.gif" title="" alt=""></td><td><img class="r4" src="img/x.gif" title="" alt=""></td><td><?php echo MERCHANT ?></td>
|
||||
</tr></thead><tbody>
|
||||
<?php
|
||||
$varray = $database->getProfileVillages($session->uid);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="footer-menu">
|
||||
<center><br />
|
||||
<div class="copyright">© 2010 - <?php echo date('Y') . ' ' . (defined('SERVER_NAME') ? SERVER_NAME : 'TravianZ');?> All rights reserved</div>
|
||||
<div class="copyright">Server running on: <a href="version.php"><b><font color="Red">v.8.3.4</font></b></a>
|
||||
<div class="copyright">Server running on: <a href="version.php"><b><font color="Red">v.8.3.5</font></b></a>
|
||||
</div>
|
||||
</div>
|
||||
</div></center>
|
||||
|
||||
@@ -166,7 +166,6 @@ while($row2 = mysqli_fetch_array($getnotice)){
|
||||
<button type="button" class="trav_buttons" onclick="window.location.href = '?gid=16&t=99&action=addraid';">Add Raid</button>
|
||||
<button type="submit" class="trav_buttons" value="Start Raid">Start Raid</button>
|
||||
</div><br />
|
||||
</form>
|
||||
<?php } ?>
|
||||
<div class="options">
|
||||
<a class="arrow" href="build.php?gid=16&t=99&action=addList">Create a new list</a>
|
||||
@@ -174,6 +173,10 @@ while($row2 = mysqli_fetch_array($getnotice)){
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
if($create == 1){
|
||||
$hideevasion = 1;
|
||||
include("Templates/goldClub/farmlist_add.tpl");
|
||||
|
||||
+18
-16
@@ -20,15 +20,17 @@ $start_timer = $generator->pageLoadTimeStart();
|
||||
exit;
|
||||
}
|
||||
|
||||
if($_POST['type'] == 15) {
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?s=1&x=" . preg_replace("/[^a-zA-Z0-9_-]/","",$_POST['x']) . '&y=' . preg_replace("/[^a-zA-Z0-9_-]/","",$_POST['y']));
|
||||
exit;
|
||||
} elseif($_POST['type'] == 9) {
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?s=2&x=" . preg_replace("/[^a-zA-Z0-9_-]/","",$_POST['x']) . '&y=' . preg_replace("/[^a-zA-Z0-9_-]/","",$_POST['y']));
|
||||
exit;
|
||||
} elseif($_POST['type'] == 'both') {
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?s=3&x=" . preg_replace("/[^a-zA-Z0-9_-]/","",$_POST['x']) . '&y=' . preg_replace("/[^a-zA-Z0-9_-]/","",$_POST['y']));
|
||||
exit;
|
||||
if ( !empty( $_POST['type'] ) ) {
|
||||
if ( $_POST['type'] == 15 ) {
|
||||
header( "Location: " . $_SERVER['PHP_SELF'] . "?s=1&x=" . preg_replace( "/[^a-zA-Z0-9_-]/", "", $_POST['x'] ) . '&y=' . preg_replace( "/[^a-zA-Z0-9_-]/", "", $_POST['y'] ) );
|
||||
exit;
|
||||
} elseif ( $_POST['type'] == 9 ) {
|
||||
header( "Location: " . $_SERVER['PHP_SELF'] . "?s=2&x=" . preg_replace( "/[^a-zA-Z0-9_-]/", "", $_POST['x'] ) . '&y=' . preg_replace( "/[^a-zA-Z0-9_-]/", "", $_POST['y'] ) );
|
||||
exit;
|
||||
} elseif ( $_POST['type'] == 'both' ) {
|
||||
header( "Location: " . $_SERVER['PHP_SELF'] . "?s=3&x=" . preg_replace( "/[^a-zA-Z0-9_-]/", "", $_POST['x'] ) . '&y=' . preg_replace( "/[^a-zA-Z0-9_-]/", "", $_POST['y'] ) );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -93,7 +95,7 @@ $start_timer = $generator->pageLoadTimeStart();
|
||||
<div id="mid">
|
||||
<?php
|
||||
include ("Templates/menu.tpl");
|
||||
if(is_numeric($_GET['x']) && is_numeric($_GET['y'])) {
|
||||
if( !empty( $_GET['x'] ) && !empty( $_GET['y'] ) && is_numeric($_GET['x']) && is_numeric($_GET['y']) ) {
|
||||
$coor2['x'] = preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['x']);
|
||||
$coor2['y'] = preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['y']);
|
||||
} else {
|
||||
@@ -114,9 +116,9 @@ if(is_numeric($_GET['x']) && is_numeric($_GET['y'])) {
|
||||
<tr>
|
||||
<td width="100">Cropper Type:</td>
|
||||
<td width="250">
|
||||
<input type="radio" class="radio" name="type" value="15" <?php if($_GET['s'] == 1) echo 'checked="checked"'; ?> /> 15 crop
|
||||
<input type="radio" class="radio" name="type" value="9" <?php if($_GET['s'] == 2) echo 'checked="checked"'; ?> /> 9 crop
|
||||
<input type="radio" class="radio" name="type" value="both" <?php if($_GET['s'] == 3) echo 'checked="checked"'; ?> /> both<br />
|
||||
<input type="radio" class="radio" name="type" value="15" <?php if ( !empty( $_GET['s'] ) && $_GET['s'] == 1 ) echo 'checked="checked"'; ?> /> 15 crop
|
||||
<input type="radio" class="radio" name="type" value="9" <?php if ( !empty( $_GET['s'] ) && $_GET['s'] == 2 ) echo 'checked="checked"'; ?> /> 9 crop
|
||||
<input type="radio" class="radio" name="type" value="both" <?php if ( !empty( $_GET['s'] ) && $_GET['s'] == 3 ) echo 'checked="checked"'; ?> /> both<br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -145,10 +147,10 @@ if(is_numeric($_GET['x']) && is_numeric($_GET['y'])) {
|
||||
|
||||
|
||||
<?php
|
||||
$fieldType = ($_GET['s'] == 1) ? "fieldtype = 6" : (($_GET['s'] == 2) ? "fieldtype = 1" : "fieldtype = 1 OR fieldtype = 6");
|
||||
$fieldType = ( !empty( $_GET['s'] ) && $_GET['s'] == 1) ? "fieldtype = 6" : ( ( !empty( $_GET['s'] ) && $_GET['s'] == 2 ) ? "fieldtype = 1" : "fieldtype = 1 OR fieldtype = 6");
|
||||
$type = mysqli_query($database->dblink,"SELECT id, x, y, occupied, fieldtype FROM ".TB_PREFIX."wdata WHERE $fieldType");
|
||||
|
||||
if(is_numeric($_GET['x']) && is_numeric($_GET['y'])) {
|
||||
if ( !empty( $_GET['x'] ) && is_numeric($_GET['x']) && !empty( $_GET['y'] ) && is_numeric($_GET['y'])) {
|
||||
$coor['x'] = $_GET['x'];
|
||||
$coor['y'] = $_GET['y'];
|
||||
} else {
|
||||
@@ -156,7 +158,7 @@ if(is_numeric($_GET['x']) && is_numeric($_GET['y'])) {
|
||||
$coor = $database->getCoor($wref);
|
||||
}
|
||||
|
||||
if($_GET['s'] >= 1 && $_GET['s'] <= 3) {
|
||||
if ( !empty( $_GET['s'] ) && $_GET['s'] >= 1 && $_GET['s'] <= 3 ) {
|
||||
?>
|
||||
|
||||
<table id="member">
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
// (0) = disabled
|
||||
define("ERROR_REPORT","%ERRORREPORT%");
|
||||
%ERROR%
|
||||
define('AUTOMATION_LOCK_FILE_NAME', 'automation.lck');
|
||||
|
||||
//////////////////////////////////
|
||||
// ***** SERVER SETTINGS *****//
|
||||
@@ -117,9 +118,9 @@ define("SHOW_NATARS",%SHOW_NATARS%);
|
||||
define("NATARS_UNITS",%NATARS_UNITS%);
|
||||
|
||||
// ***** Natars Spawn Time
|
||||
define("NATARS_SPAWN_TIME",%NATARS_SPAWN_TIME%);
|
||||
define("NATARS_WW_SPAWN_TIME",%NATARS_WW_SPAWN_TIME%);
|
||||
define("NATARS_WW_BUILDING_PLAN_SPAWN_TIME",%NATARS_WW_BUILDING_PLAN_SPAWN_TIME%);
|
||||
define("NATARS_SPAWN_TIME", round( %NATARS_SPAWN_TIME% / SPEED ));
|
||||
define("NATARS_WW_SPAWN_TIME", round( %NATARS_WW_SPAWN_TIME% / SPEED ));
|
||||
define("NATARS_WW_BUILDING_PLAN_SPAWN_TIME", round( %NATARS_WW_BUILDING_PLAN_SPAWN_TIME% / SPEED ));
|
||||
|
||||
// ***** Nature troops regeneration time
|
||||
define("NATURE_REGTIME",%NATURE_REGTIME%);
|
||||
|
||||
@@ -48,8 +48,9 @@ echo "<div class=\"headline\"><span class=\"f10 c5\">Error creating constant.php
|
||||
<option value="7,Australia/Melbourne" <?php if ($tz==7) echo "selected";?>>Australia</option>
|
||||
<option value="8,Europe/Bucharest" <?php if ($tz==8) echo "selected";?>>Europe (Bucharest)</option>
|
||||
<option value="9,Europe/London" <?php if ($tz==9) echo "selected";?>>Europe (London)</option>
|
||||
<option value="10,Indian/Maldives" <?php if ($tz==10) echo "selected";?>>Indian</option>
|
||||
<option value="11,Pacific/Fiji" <?php if ($tz==11) echo "selected";?>>Pacific</option>
|
||||
<option value="10,Europe/Bratislava" <?php if ($tz==10) echo "selected";?>>Europe (Bratislava)</option>
|
||||
<option value="11,Indian/Maldives" <?php if ($tz==11) echo "selected";?>>Indian</option>
|
||||
<option value="12,Pacific/Fiji" <?php if ($tz==12) echo "selected";?>>Pacific</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -81,12 +81,14 @@ else
|
||||
<h5><img class="img_u04" src="img/x.gif" alt="login" /></h5>
|
||||
<p><?php echo COOKIES; ?></p>
|
||||
<?php
|
||||
$stime = strtotime(START_DATE) - strtotime(date('d.m.y')) + strtotime(START_TIME);
|
||||
if($stime > time()){
|
||||
$stime = strtotime( date( 'm/d/Y H:i', strtotime(START_DATE . ' ' . START_TIME ) ) );
|
||||
|
||||
// check whether the server has started or is yet to start
|
||||
if ( $stime > $time ){
|
||||
?>
|
||||
<br/><div style="text-align: center"><big>Server will start in: </big></div>
|
||||
<script language="JavaScript">
|
||||
TargetDate = "<?php echo START_DATE; ?> <?php echo START_TIME; ?>";
|
||||
TargetDate = "<?php echo date( 'm/d/Y H:i', strtotime(START_DATE . ' ' . START_TIME ) ); ?>";
|
||||
CountActive = true;
|
||||
CountStepper = -1;
|
||||
LeadingZero = true;
|
||||
|
||||
@@ -4,10 +4,13 @@ var xhttp = new XMLHttpRequest();
|
||||
var timer=new Object();var ab=new Object();var bb=new Object();var cb=db();var eb=0;var auto_reload=1;var fb=new Object();var is_opera=window.opera!==undefined;var is_ie=document.all!==undefined&&window.opera===undefined;var is_ie6p=document.compatMode!==undefined&&document.all!==undefined&&window.opera===undefined;var is_ie7=document.documentElement!==undefined&&document.documentElement.style.maxHeight!==undefined;var is_ie6=is_ie6p&&!is_ie7;var is_ff2p=window.Iterator!==undefined;var is_ff3p=document.getElementsByClassName!==undefined;var is_ff2=is_ff2p&&!is_ff3p
|
||||
|
||||
automation();
|
||||
function automation() {
|
||||
this.xhttp.open("GET", "GameEngine/Automation.php", true);
|
||||
this.xhttp.send();
|
||||
//setTimeout(function(){ automation(); }, 1000);
|
||||
function automation( callback ) {
|
||||
if ( typeof callback == 'function' ) {
|
||||
xhttp.addEventListener("load", callback);
|
||||
}
|
||||
xhttp.open("GET", "GameEngine/Automation.php", true);
|
||||
xhttp.send();
|
||||
setTimeout(function(){ automation(); }, 30000);
|
||||
}
|
||||
function gb(){return hb('height');}
|
||||
function ib(){return hb('width');}
|
||||
@@ -29,7 +32,16 @@ t+=vb;
|
||||
} else {
|
||||
t='0:00:00';
|
||||
if (!window.reloading) {
|
||||
document.location.reload();
|
||||
// reload after automation is ran
|
||||
automation( function() {
|
||||
document.location.reload();
|
||||
} );
|
||||
|
||||
// backup timer in case automation XHR fails
|
||||
setTimeout(function() {
|
||||
document.location.reload();
|
||||
}, 15000);
|
||||
|
||||
window.reloading = true;
|
||||
}
|
||||
}
|
||||
@@ -95,7 +107,17 @@ function executeCounter(){
|
||||
bb[i] = null;
|
||||
eb = 1;
|
||||
if (!window.reloading) {
|
||||
setTimeout(function(){window.location.href = window.location.href;},1000);
|
||||
setTimeout(function() {
|
||||
// reload after automation is ran
|
||||
automation( function() {
|
||||
window.location.href = window.location.href;
|
||||
} );
|
||||
|
||||
// backup timer in case automation XHR fails
|
||||
setTimeout(function() {
|
||||
window.location.href = window.location.href;
|
||||
}, 15000);
|
||||
},1000);
|
||||
window.reloading = true;
|
||||
}
|
||||
}
|
||||
@@ -276,15 +298,6 @@ jd.send(ld);}
|
||||
function md(nd){var od='';var pd=true;for(var qd in nd){od+=(pd?'':'&')+qd+'='+window.encodeURI(nd[qd]);if(pd){pd=false;}
|
||||
}
|
||||
return od;}
|
||||
function mreload(){param='reload=auto';url=window.location.href;if(url.indexOf(param)==-1){if(url.indexOf('?')==-1){url+='?'+param;}
|
||||
else
|
||||
{url+='&'+param;}
|
||||
}
|
||||
if (!window.reloading) {
|
||||
document.location.href=url;
|
||||
window.reloading = true;
|
||||
}
|
||||
}
|
||||
var rd={'index':0,'dir':0,'size':null,'fields':[],'cindex':0,'usealternate':false};
|
||||
var m_c=rd;
|
||||
var sd;
|
||||
|
||||
+1
-1
@@ -220,7 +220,7 @@ if(isset($_GET['newdid'])) {
|
||||
<br />
|
||||
Best Regards,<br />
|
||||
<?php echo SERVER_NAME; ?> Team<br /><br /><br /><br />
|
||||
<small><i>(By: TravianZ team v8.3.4)</i></small></p>
|
||||
<small><i>(By: TravianZ team v8.3.5)</i></small></p>
|
||||
|
||||
<br /><br />
|
||||
<div style="text-align: center"><a href="dorf1.php">» Continue</a></div>
|
||||
|
||||
Reference in New Issue
Block a user