mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-05 20:34:21 +00:00
General fixes
+Added an image in: Natars/Artifacts spawn message, WW villages spawn message and WW building plans spawn message +Fixed a wrong time calculation when removing a building from the construction queue, if there was present a master builder order
This commit is contained in:
+17
-22
@@ -3176,7 +3176,7 @@ class Automation {
|
||||
|
||||
private function spawnWWVillages(){
|
||||
global $database, $autoprefix;
|
||||
|
||||
|
||||
if(file_exists($autoprefix."GameEngine/Prevention/spawnWWVillages.txt")) {
|
||||
unlink($autoprefix."GameEngine/Prevention/spawnWWVillages.txt");
|
||||
}
|
||||
@@ -3217,7 +3217,7 @@ class Automation {
|
||||
$this->recountPop($wid);
|
||||
}
|
||||
|
||||
//Write the system message
|
||||
//Write the system message
|
||||
$database->displaySystemMessage(WWVILLAGEMSG);
|
||||
|
||||
if(file_exists("GameEngine/Prevention/spawnWWVillages.txt")) {
|
||||
@@ -4064,10 +4064,11 @@ class Automation {
|
||||
|
||||
private function MasterBuilder() {
|
||||
global $database;
|
||||
|
||||
$q = "SELECT id, wid, type, level, field, timestamp FROM ".TB_PREFIX."bdata WHERE master = 1";
|
||||
$array = $database->query_return($q);
|
||||
|
||||
foreach($array as $master) {
|
||||
foreach($array as $master) {
|
||||
$owner = $database->getVillageField($master['wid'], 'owner');
|
||||
$tribe = $database->getUserField($owner, 'tribe', 0);
|
||||
$villwood = $database->getVillageField($master['wid'], 'wood');
|
||||
@@ -4085,21 +4086,17 @@ class Automation {
|
||||
|
||||
if($tribe == 1){
|
||||
if($master['field'] < 19){
|
||||
$dorf1Buildings = $database->getDorf1Building($master['wid']);
|
||||
$bdata = count($dorf1Buildings);
|
||||
$bdata = $database->getDorf1Building($master['wid']);
|
||||
$bdataTotal = count($bdata);
|
||||
$bbdata = count($database->getDorf2Building($master['wid']));
|
||||
$bdata1 = $dorf1Buildings;
|
||||
}else{
|
||||
$dorf2Buildings = $database->getDorf2Building($master['wid']);
|
||||
$bdata = count($database->getDorf2Building($master['wid']));
|
||||
$bdata = $database->getDorf2Building($master['wid']);
|
||||
$bdataTotal = count($bdata);
|
||||
$bbdata = count($database->getDorf1Building($master['wid']));
|
||||
$bdata1 = $database->getDorf2Building($master['wid']);
|
||||
}
|
||||
|
||||
}else{
|
||||
$dorf1Buildings = $database->getDorf1Building($master['wid']);
|
||||
$bdata = $bbdata = count($dorf1Buildings) + count($database->getDorf2Building($master['wid']));
|
||||
$bdata1 = $dorf1Buildings;
|
||||
$bdata = array_merge($database->getDorf1Building($master['wid']), $database->getDorf2Building($master['wid']));
|
||||
$bdataTotal = $bbdata = count($bdata);
|
||||
}
|
||||
|
||||
if($database->getUserField($owner, 'plus', 0) > time() || $ww > 0){
|
||||
@@ -4108,19 +4105,17 @@ class Automation {
|
||||
}
|
||||
else $inbuild = 1;
|
||||
|
||||
$usergold = $database->getUserField($owner,'gold',0);
|
||||
$usergold = $database->getUserField($owner, 'gold', 0);
|
||||
|
||||
if($bdata < $inbuild && $buildwood < $villwood && $buildclay < $villclay && $buildiron < $villiron && $buildcrop < $villcrop && $usergold > 0){
|
||||
$time = $master['timestamp']+time();
|
||||
if($bdataTotal < $inbuild && $buildwood <= $villwood && $buildclay <= $villclay && $buildiron <= $villiron && $buildcrop <= $villcrop && $usergold > 0){
|
||||
$time = $master['timestamp'] + time();
|
||||
|
||||
if(!empty($bdata1)){
|
||||
foreach($bdata1 as $master1) {
|
||||
$time += ($master1['timestamp'] - time());
|
||||
}
|
||||
if(!empty($bdata)){
|
||||
foreach($bdata as $masterLoop) $time += ($masterLoop['timestamp'] - time());
|
||||
}
|
||||
|
||||
if($bdata == 0) $database->updateBuildingWithMaster($master['id'], $time, 0);
|
||||
else $database->updateBuildingWithMaster($master['id'], $time, 1);
|
||||
if($bdataTotal == 0) $database->updateBuildingWithMaster($master['id'], $time, 0);
|
||||
else $database->updateBuildingWithMaster($master['id'], $time, 1);
|
||||
|
||||
$database->updateUserField($owner, 'gold', --$usergold, 1);
|
||||
$database->modifyResource($master['wid'], $buildwood, $buildclay, $buildiron, $buildcrop, 0);
|
||||
|
||||
+44
-47
@@ -186,17 +186,18 @@ class Building {
|
||||
$this->canProcess($village->resarray['f'.$get['a'].'t'],$get['a']);
|
||||
$this->upgradeBuilding($get['a']);
|
||||
}
|
||||
}elseif(isset($get['master']) && isset($get['id']) && isset($get['time']) && $session->gold >= 1 && $session->goldclub && $village->master == 0 && (isset($get['c']) && $get['c']== $session->checker)) {
|
||||
$this->canProcess($get['master'],$get['id']);
|
||||
}elseif(isset($get['master']) && isset($get['id']) && $session->gold >= 1 && $session->goldclub && $village->master == 0 && (isset($get['c']) && $get['c']== $session->checker)) {
|
||||
$this->canProcess($get['master'], $get['id']);
|
||||
$session->changeChecker();
|
||||
$level = $database->getResourceLevel($village->wid);
|
||||
$database->addBuilding( $village->wid, $get['id'], $get['master'], 1, $get['time'], 1, $level['f' . $get['id']] + 1 + count($database->getBuildingByField($village->wid, $get['id'])));
|
||||
$time = $this->resourceRequired($get['id'], $get['master'])['time'];
|
||||
$database->addBuilding($village->wid, $get['id'], $get['master'], 1, $time, 1, $level['f'.$get['id']] + 1 + count($database->getBuildingByField($village->wid, $get['id'])));
|
||||
$this->redirect($get['id']);
|
||||
}elseif(isset($get['a']) && $get['c'] == $session->checker && isset($get['id'])) {
|
||||
if($get['id'] > 18 && ($get['id'] < 41 || $get['id'] == 99)){
|
||||
$session->changeChecker();
|
||||
$this->canProcess($get['a'],$get['id']);
|
||||
$this->constructBuilding($get['id'],$get['a']);
|
||||
$this->canProcess($get['a'], $get['id']);
|
||||
$this->constructBuilding($get['id'], $get['a']);
|
||||
}
|
||||
}
|
||||
elseif(isset($get['buildingFinish']) && $session->plus && intval($session->gold) >= 2 && $session->sit == 0) $this->finishAll();
|
||||
@@ -450,7 +451,7 @@ class Building {
|
||||
$time = time() + round($dataarray[$village->resarray['f'.$id]-1]['time'] / 4);
|
||||
$loop = 0;
|
||||
if($this->inner == 1 || $this->basic == 1) {
|
||||
if(($session->plus or $village->resarray['f'.$id.'t']==40)&& $this->plus == 0) {
|
||||
if(($session->plus || $village->resarray['f'.$id.'t']==40)&& $this->plus == 0) {
|
||||
$loop = 1;
|
||||
}
|
||||
}
|
||||
@@ -780,9 +781,9 @@ class Building {
|
||||
foreach ($this->buildArray as $jobs) {
|
||||
if ($jobs['wid']==$village->wid) {
|
||||
$wwvillage = $database->getResourceLevel($jobs['wid']);
|
||||
if ($wwvillage['f99t']!=40) {
|
||||
if ($wwvillage['f99t'] != 40) {
|
||||
$level = $jobs['level'];
|
||||
if ($jobs['type'] != 25 AND $jobs['type'] != 26 AND $jobs['type'] != 40) {
|
||||
if ($jobs['type'] != 25 && $jobs['type'] != 26 && $jobs['type'] != 40) {
|
||||
$resource = $this->resourceRequired($jobs['field'],$jobs['type']);
|
||||
// master builder involved
|
||||
if ($jobs['master'] != 0) {
|
||||
@@ -830,7 +831,7 @@ class Building {
|
||||
$q = "UPDATE ".TB_PREFIX."fdata set f".$jobs['field']." = ".$jobs['level'].", f".$jobs['field']."t = ".$jobs['type']." where vref = ".$jobs['wid'];
|
||||
}
|
||||
|
||||
if (!isset($exclude_master) && $database->query($q) && ($enought_res == 1 or $jobs['master'] == 0)) {
|
||||
if (!isset($exclude_master) && $database->query($q) && ($enought_res == 1 || $jobs['master'] == 0)) {
|
||||
$database->modifyPop($jobs['wid'],$resource['pop'],0);
|
||||
$database->addCP($jobs['wid'],$resource['cp']);
|
||||
$deletIDs[] = (int) $jobs['id'];
|
||||
@@ -887,56 +888,52 @@ class Building {
|
||||
}
|
||||
}
|
||||
|
||||
public function resourceRequired($id,$tid,$plus=1) {
|
||||
public function resourceRequired($id, $tid, $plus = 1) {
|
||||
$name = "bid".$tid;
|
||||
global $$name,$village,$bid15;
|
||||
global $$name, $village, $bid15;
|
||||
|
||||
$dataarray = $$name;
|
||||
$wood = $dataarray[$village->resarray['f'.$id]+$plus]['wood'];
|
||||
$clay = $dataarray[$village->resarray['f'.$id]+$plus]['clay'];
|
||||
$iron = $dataarray[$village->resarray['f'.$id]+$plus]['iron'];
|
||||
$crop = $dataarray[$village->resarray['f'.$id]+$plus]['crop'];
|
||||
$pop = $dataarray[$village->resarray['f'.$id]+$plus]['pop'];
|
||||
if ($tid == 15) {
|
||||
if($this->getTypeLevel(15) == 0) {
|
||||
$time = round($dataarray[$village->resarray['f'.$id]+$plus]['time']/ SPEED *5);
|
||||
}
|
||||
else {
|
||||
$time = round($dataarray[$village->resarray['f'.$id]+$plus]['time'] / SPEED);
|
||||
$wood = $dataarray[$village->resarray['f'.$id] + $plus]['wood'];
|
||||
$clay = $dataarray[$village->resarray['f'.$id] + $plus]['clay'];
|
||||
$iron = $dataarray[$village->resarray['f'.$id] + $plus]['iron'];
|
||||
$crop = $dataarray[$village->resarray['f'.$id] + $plus]['crop'];
|
||||
$pop = $dataarray[$village->resarray['f'.$id] + $plus]['pop'];
|
||||
|
||||
if($tid == 15){
|
||||
if($this->getTypeLevel(15) == 0) $time = round($dataarray[$village->resarray['f'.$id] + $plus]['time'] / SPEED * 5);
|
||||
else $time = round($dataarray[$village->resarray['f'.$id] + $plus]['time'] / SPEED);
|
||||
}else{
|
||||
if($this->getTypeLevel(15) > 0) {
|
||||
$time = round($dataarray[$village->resarray['f'.$id] + $plus]['time'] * ($bid15[$this->getTypeLevel(15)]['attri'] /100) / SPEED);
|
||||
}
|
||||
else $time = round($dataarray[$village->resarray['f'.$id] + $plus]['time'] * 5 / SPEED);
|
||||
}
|
||||
else {
|
||||
if($this->getTypeLevel(15) != 0) {
|
||||
$time = round($dataarray[$village->resarray['f'.$id]+$plus]['time'] * ($bid15[$this->getTypeLevel(15)]['attri']/100) / SPEED);
|
||||
}
|
||||
else {
|
||||
$time = round($dataarray[$village->resarray['f'.$id]+$plus]['time']*5 / SPEED);
|
||||
}
|
||||
}
|
||||
$cp = $dataarray[$village->resarray['f'.$id]+$plus]['cp'];
|
||||
return array("wood"=>$wood,"clay"=>$clay,"iron"=>$iron,"crop"=>$crop,"pop"=>$pop,"time"=>$time,"cp"=>$cp);
|
||||
|
||||
$cp = $dataarray[$village->resarray['f'.$id] + $plus]['cp'];
|
||||
return ["wood" => $wood, "clay" => $clay, "iron" => $iron, "crop" => $crop, "pop" => $pop, "time" => $time,"cp" => $cp];
|
||||
}
|
||||
|
||||
public function getTypeField($type) {
|
||||
global $village;
|
||||
for($i=19;$i<=40;$i++) {
|
||||
if($village->resarray['f'.$i.'t'] == $type) {
|
||||
return $i;
|
||||
}
|
||||
|
||||
for($i = 19; $i <= 40; $i++) {
|
||||
if($village->resarray['f'.$i.'t'] == $type) return $i;
|
||||
}
|
||||
}
|
||||
|
||||
public function calculateAvaliable($id,$tid,$plus=1) {
|
||||
global $village,$generator;
|
||||
$uprequire = $this->resourceRequired($id,$tid,$plus);
|
||||
$rwood = $uprequire['wood']-$village->awood;
|
||||
$rclay = $uprequire['clay']-$village->aclay;
|
||||
$rcrop = $uprequire['crop']-$village->acrop;
|
||||
$riron = $uprequire['iron']-$village->airon;
|
||||
public function calculateAvaliable($id, $tid, $plus = 1) {
|
||||
global $village, $generator;
|
||||
|
||||
$uprequire = $this->resourceRequired($id, $tid, $plus);
|
||||
$rwood = $uprequire['wood'] - $village->awood;
|
||||
$rclay = $uprequire['clay'] - $village->aclay;
|
||||
$rcrop = $uprequire['crop'] - $village->acrop;
|
||||
$riron = $uprequire['iron'] - $village->airon;
|
||||
$rwtime = $rwood / $village->getProd("wood") * 3600;
|
||||
$rcltime = $rclay / $village->getProd("clay")* 3600;
|
||||
$rctime = $rcrop / $village->getProd("crop")* 3600;
|
||||
$ritime = $riron / $village->getProd("iron")* 3600;
|
||||
$reqtime = max($rwtime,$rctime,$rcltime,$ritime);
|
||||
$rcltime = $rclay / $village->getProd("clay") * 3600;
|
||||
$rctime = $rcrop / $village->getProd("crop") * 3600;
|
||||
$ritime = $riron / $village->getProd("iron") * 3600;
|
||||
$reqtime = max($rwtime, $rctime, $rcltime, $ritime);
|
||||
$reqtime += time();
|
||||
return $generator->procMtime($reqtime);
|
||||
}
|
||||
|
||||
+71
-81
@@ -4380,14 +4380,14 @@ References: User ID/Message ID, Mode
|
||||
|
||||
$x = "UPDATE " . TB_PREFIX . "fdata SET f" . $field . "t=" . $type . " WHERE vref=" . $wid;
|
||||
mysqli_query($this->dblink,$x);
|
||||
$q = "INSERT into " . TB_PREFIX . "bdata values (0,$wid,$field,$type,$loop,$time,$master,$level)";
|
||||
$q = "INSERT into " . TB_PREFIX . "bdata values (0, $wid, $field, $type, $loop, $time, $master, $level)";
|
||||
return mysqli_query($this->dblink,$q);
|
||||
}
|
||||
|
||||
function removeBuilding($d) {
|
||||
list($d) = $this->escape_input((int) $d);
|
||||
|
||||
global $building, $village;
|
||||
|
||||
$jobLoopconID = -1;
|
||||
$SameBuildCount = 0;
|
||||
$jobs = $building->buildArray;
|
||||
@@ -4395,7 +4395,7 @@ References: User ID/Message ID, Mode
|
||||
if($jobs[$i]['id'] == $d) {
|
||||
$jobDeleted = $i;
|
||||
}
|
||||
if($jobs[$i]['loopcon'] == 1) {
|
||||
if($jobs[$i]['loopcon'] == 1 && $jobs[$i]['master'] == 0) {
|
||||
$jobLoopconID = $i;
|
||||
}
|
||||
if($jobs[$i]['master'] == 1) {
|
||||
@@ -4433,77 +4433,73 @@ References: User ID/Message ID, Mode
|
||||
if(count($jobs) > 3 && ($jobs[1]['field'] == $jobs[2]['field'] && $jobs[2]['field'] == $jobs[3]['field'])) {
|
||||
$SameBuildCount = 7;
|
||||
}
|
||||
if(isset($jobMaster) && isset($level) && $level-1 <= 0){
|
||||
if(isset($jobMaster) && isset($level) && $level - 1 <= 0){
|
||||
$SameBuildCount = 0;
|
||||
}
|
||||
|
||||
if($SameBuildCount > 0) {
|
||||
if($SameBuildCount > 3){
|
||||
if($SameBuildCount == 4 or $SameBuildCount == 5){
|
||||
if($jobDeleted == 0){
|
||||
$uprequire = $building->resourceRequired($jobs[1]['field'],$jobs[1]['type'],1);
|
||||
$time = $uprequire['time'];
|
||||
$timestamp = $time+time();
|
||||
$q = "UPDATE " . TB_PREFIX . "bdata SET loopcon=0,level=level-1,timestamp=".$timestamp." WHERE id=".(int) $jobs[1]['id'];
|
||||
mysqli_query($this->dblink,$q);
|
||||
}
|
||||
}else if($SameBuildCount == 6){
|
||||
if($jobDeleted == 0){
|
||||
$uprequire = $building->resourceRequired($jobs[2]['field'],$jobs[2]['type'],1);
|
||||
$time = $uprequire['time'];
|
||||
$timestamp = $time+time();
|
||||
$q = "UPDATE " . TB_PREFIX . "bdata SET loopcon=0,level=level-1,timestamp=".$timestamp." WHERE id=".(int) $jobs[2]['id'];
|
||||
mysqli_query($this->dblink,$q);
|
||||
}
|
||||
}else if($SameBuildCount == 7){
|
||||
if($jobDeleted == 1){
|
||||
$uprequire = $building->resourceRequired($jobs[2]['field'],$jobs[2]['type'],1);
|
||||
$time = $uprequire['time'];
|
||||
$timestamp = $time+time();
|
||||
$q = "UPDATE " . TB_PREFIX . "bdata SET loopcon=0,level=level-1,timestamp=".$timestamp." WHERE id=".(int) $jobs[2]['id'];
|
||||
mysqli_query($this->dblink,$q);
|
||||
}
|
||||
}
|
||||
if($SameBuildCount < 8){
|
||||
$uprequire1 = $building->resourceRequired($jobs[$jobMaster]['field'],$jobs[$jobMaster]['type'],2);
|
||||
$time1 = $uprequire1['time'];
|
||||
$timestamp1 = $time1;
|
||||
$q1 = "UPDATE " . TB_PREFIX . "bdata SET level=level-1,timestamp=".$timestamp1." WHERE id=".(int) $jobs[$jobMaster]['id'];
|
||||
mysqli_query($this->dblink,$q1);
|
||||
}else{
|
||||
$uprequire1 = $building->resourceRequired($jobs[$jobMaster]['field'],$jobs[$jobMaster]['type'],1);
|
||||
$time1 = $uprequire1['time'];
|
||||
$timestamp1 = $time1;
|
||||
$q1 = "UPDATE " . TB_PREFIX . "bdata SET level=level-1,timestamp=".$timestamp1." WHERE id=".(int) $jobs[$jobMaster]['id'];
|
||||
mysqli_query($this->dblink,$q1);
|
||||
}
|
||||
}else if($d == $jobs[floor($SameBuildCount / 3)]['id'] || $d == $jobs[floor($SameBuildCount / 2) + 1]['id']) {
|
||||
$q = "UPDATE " . TB_PREFIX . "bdata SET loopcon=0,level=level-1,timestamp=" . (int) $jobs[floor($SameBuildCount / 3)]['timestamp'] . " WHERE master = 0 AND id > ".$d." and (ID=" . (int) $jobs[floor($SameBuildCount / 3)]['id'] . " OR ID=" . (int) $jobs[floor($SameBuildCount / 2) + 1]['id'] . ")";
|
||||
mysqli_query($this->dblink,$q);
|
||||
}
|
||||
} else {
|
||||
if($jobs[$jobDeleted]['field'] >= 19) {
|
||||
$x = "SELECT f" . $jobs[$jobDeleted]['field'] . " FROM " . TB_PREFIX . "fdata WHERE vref=" . (int) $jobs[$jobDeleted]['wid'];
|
||||
$result = mysqli_query($this->dblink,$x);
|
||||
$fieldlevel = mysqli_fetch_row($result);
|
||||
if($fieldlevel[0] == 0) {
|
||||
if ($village->natar==1 && $jobs[$jobDeleted]['field']==99) { //fix by ronix
|
||||
}else{
|
||||
$x = "UPDATE " . TB_PREFIX . "fdata SET f" . $jobs[$jobDeleted]['field'] . "t=0 WHERE vref=" . (int) $jobs[$jobDeleted]['wid'];
|
||||
mysqli_query($this->dblink,$x);
|
||||
if ($SameBuildCount > 0) {
|
||||
if ($SameBuildCount > 3) {
|
||||
if ($SameBuildCount == 4 || $SameBuildCount == 5) {
|
||||
if ($jobDeleted == 0) {
|
||||
$uprequire = $building->resourceRequired($jobs[1]['field'], $jobs[1]['type'], 1);
|
||||
$time = $uprequire['time'];
|
||||
$timestamp = $time + time();
|
||||
$q = "UPDATE " . TB_PREFIX . "bdata SET loopcon=0,level=level-1,timestamp=" . $timestamp . " WHERE id=" . (int) $jobs[1]['id'];
|
||||
mysqli_query($this->dblink, $q);
|
||||
}
|
||||
} else if ($SameBuildCount == 6) {
|
||||
if ($jobDeleted == 0) {
|
||||
$uprequire = $building->resourceRequired($jobs[2]['field'], $jobs[2]['type'], 1);
|
||||
$time = $uprequire['time'];
|
||||
$timestamp = $time + time();
|
||||
$q = "UPDATE " . TB_PREFIX . "bdata SET loopcon=0,level=level-1,timestamp=" . $timestamp . " WHERE id=" . (int) $jobs[2]['id'];
|
||||
mysqli_query($this->dblink, $q);
|
||||
}
|
||||
} else if ($SameBuildCount == 7) {
|
||||
if ($jobDeleted == 1) {
|
||||
$uprequire = $building->resourceRequired($jobs[2]['field'], $jobs[2]['type'], 1);
|
||||
$time = $uprequire['time'];
|
||||
$timestamp = $time + time();
|
||||
$q = "UPDATE " . TB_PREFIX . "bdata SET loopcon=0,level=level-1,timestamp=" . $timestamp . " WHERE id=" . (int) $jobs[2]['id'];
|
||||
mysqli_query($this->dblink, $q);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(($jobLoopconID >= 0) && ($jobs[$jobDeleted]['loopcon'] != 1)) {
|
||||
if(($jobs[$jobLoopconID]['field'] <= 18 && $jobs[$jobDeleted]['field'] <= 18) || ($jobs[$jobLoopconID]['field'] >= 19 && $jobs[$jobDeleted]['field'] >= 19) || sizeof($jobs) < 3) {
|
||||
$uprequire = $building->resourceRequired($jobs[$jobLoopconID]['field'], $jobs[$jobLoopconID]['type']);
|
||||
$x = "UPDATE " . TB_PREFIX . "bdata SET loopcon=0,timestamp=" . (time() + (int) $uprequire['time']) . " WHERE wid=" . (int) $jobs[$jobDeleted]['wid'] . " AND loopcon=1 AND master=0";
|
||||
mysqli_query($this->dblink,$x);
|
||||
}
|
||||
}
|
||||
}
|
||||
$q = "DELETE FROM " . TB_PREFIX . "bdata where id = $d";
|
||||
return mysqli_query($this->dblink,$q);
|
||||
if ($SameBuildCount < 8) {
|
||||
$uprequire = $building->resourceRequired($jobs[$jobMaster]['field'], $jobs[$jobMaster]['type'], 2);
|
||||
$q1 = "UPDATE " . TB_PREFIX . "bdata SET level=level-1,timestamp=" . $uprequire['time'] . " WHERE id=" . (int) $jobs[$jobMaster]['id'];
|
||||
mysqli_query($this->dblink, $q1);
|
||||
} else {
|
||||
$uprequire = $building->resourceRequired($jobs[$jobMaster]['field'], $jobs[$jobMaster]['type'], 1);
|
||||
$q1 = "UPDATE " . TB_PREFIX . "bdata SET level=level-1,timestamp=" . $uprequire['time'] . " WHERE id=" . (int) $jobs[$jobMaster]['id'];
|
||||
mysqli_query($this->dblink, $q1);
|
||||
}
|
||||
} else if ($d == $jobs[floor($SameBuildCount / 3)]['id'] || $d == $jobs[floor($SameBuildCount / 2) + 1]['id']) {
|
||||
$q = "UPDATE " . TB_PREFIX . "bdata SET loopcon=0,level=level-1,timestamp=" . (int) $jobs[floor($SameBuildCount / 3)]['timestamp'] . " WHERE master = 0 AND id > " . $d . " and (ID=" . (int) $jobs[floor($SameBuildCount / 3)]['id'] . " OR ID=" . (int) $jobs[floor($SameBuildCount / 2) + 1]['id'] . ")";
|
||||
mysqli_query($this->dblink, $q);
|
||||
}
|
||||
} else {
|
||||
if ($jobs[$jobDeleted]['field'] >= 19) {
|
||||
$x = "SELECT f" . $jobs[$jobDeleted]['field'] . " FROM " . TB_PREFIX . "fdata WHERE vref=" . (int) $jobs[$jobDeleted]['wid'];
|
||||
$result = mysqli_query($this->dblink, $x);
|
||||
$fieldlevel = mysqli_fetch_row($result);
|
||||
if ($fieldlevel[0] == 0) {
|
||||
if ($village->natar == 1 && $jobs[$jobDeleted]['field'] == 99) { // fix by ronix
|
||||
} else {
|
||||
$x = "UPDATE " . TB_PREFIX . "fdata SET f" . $jobs[$jobDeleted]['field'] . "t=0 WHERE vref=" . (int) $jobs[$jobDeleted]['wid'];
|
||||
mysqli_query($this->dblink, $x);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (($jobLoopconID >= 0) && ($jobs[$jobDeleted]['loopcon'] != 1)) {
|
||||
if (($jobs[$jobLoopconID]['field'] <= 18 && $jobs[$jobDeleted]['field'] <= 18) || ($jobs[$jobLoopconID]['field'] >= 19 && $jobs[$jobDeleted]['field'] >= 19) || sizeof($jobs) < 4) {
|
||||
$uprequire = $building->resourceRequired($jobs[$jobLoopconID]['field'], $jobs[$jobLoopconID]['type']);
|
||||
$x = "UPDATE " . TB_PREFIX . "bdata SET loopcon = 0,timestamp=" . (time() + (int) $uprequire['time']) . " WHERE wid=" . (int) $jobs[$jobDeleted]['wid'] . " AND loopcon = 1 AND master = 0";
|
||||
mysqli_query($this->dblink, $x);
|
||||
}
|
||||
}
|
||||
}
|
||||
$q = "DELETE FROM " . TB_PREFIX . "bdata where id = $d";
|
||||
return mysqli_query($this->dblink, $q);
|
||||
}
|
||||
|
||||
function addDemolition($wid, $field) {
|
||||
@@ -5037,9 +5033,7 @@ References: User ID/Message ID, Mode
|
||||
// return all master jobs
|
||||
$data = [];
|
||||
foreach ($bdata as $row) {
|
||||
if ($row['master'] == 1) {
|
||||
$data[] = $row;
|
||||
}
|
||||
if ($row['master'] == 1) $data[] = $row;
|
||||
}
|
||||
|
||||
return $data;
|
||||
@@ -5139,9 +5133,7 @@ References: User ID/Message ID, Mode
|
||||
// return all non-master jobs for field type under 19
|
||||
$data = [];
|
||||
foreach ($bdata as $row) {
|
||||
if ($row['master'] == 0 && $row['field'] < 19) {
|
||||
$data[] = $row;
|
||||
}
|
||||
if ($row['master'] == 0 && $row['field'] < 19) $data[] = $row;
|
||||
}
|
||||
|
||||
return $data;
|
||||
@@ -5154,18 +5146,16 @@ References: User ID/Message ID, Mode
|
||||
// return all non-master jobs for field type above 18
|
||||
$data = [];
|
||||
foreach ($bdata as $row) {
|
||||
if ($row['master'] == 0 && $row['field'] > 18) {
|
||||
$data[] = $row;
|
||||
}
|
||||
if ($row['master'] == 0 && $row['field'] > 18) $data[] = $row;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
function updateBuildingWithMaster($id, $time,$loop) {
|
||||
list($id, $time,$loop) = $this->escape_input((int) $id, (int) $time,(int) $loop);
|
||||
function updateBuildingWithMaster($id, $time, $loop) {
|
||||
list($id, $time, $loop) = $this->escape_input((int) $id, (int) $time, (int) $loop);
|
||||
|
||||
$q = "UPDATE " . TB_PREFIX . "bdata SET master = 0, timestamp = ".$time.",loopcon = ".$loop." WHERE id = ".$id."";
|
||||
$q = "UPDATE " . TB_PREFIX . "bdata SET master = 0, timestamp = ".$time.", loopcon = ".$loop." WHERE id = ".$id."";
|
||||
return mysqli_query($this->dblink,$q);
|
||||
}
|
||||
|
||||
|
||||
+15
-14
@@ -919,16 +919,16 @@ define("TRAINING","Training");
|
||||
define("FINISHED","Finished");
|
||||
define("UNIT_FINISHED","The next unit will be finished in");
|
||||
define("AVAILABLE","Available");
|
||||
define("TRAINING_COMMENCE_BARRACKS","Training can commence when barracks are completed.");
|
||||
define("TRAINING_COMMENCE_BARRACKS","Training can commence when barracks is completed.");
|
||||
define("BARRACKS_DESC","All foot soldiers are trained in the barracks. The higher the level of the barracks, the faster the troops are trained.");
|
||||
|
||||
define("STABLE","Stable");
|
||||
define("AVAILABLE_ACADEMY","No units available. Research at academy");
|
||||
define("TRAINING_COMMENCE_STABLE","Training can commence when stable are completed.");
|
||||
define("TRAINING_COMMENCE_STABLE","Training can commence when stable is completed.");
|
||||
define("STABLE_DESC","Cavalry can be trained in the stable. The higher its level the faster the troops are trained.");
|
||||
|
||||
define("WORKSHOP","Workshop");
|
||||
define("TRAINING_COMMENCE_WORKSHOP","Training can commence when workshop are completed.");
|
||||
define("TRAINING_COMMENCE_WORKSHOP","Training can commence when workshop is completed.");
|
||||
define("WORKSHOP_DESC","Siege engines like catapults and rams can be built in the workshop. The higher its level the faster the units are produced.");
|
||||
|
||||
define("ACADEMY","Academy");
|
||||
@@ -987,6 +987,7 @@ define("SECURITY_CHANGE_CAPITAL","Are you sure, that you want to change your cap
|
||||
define("PALACE_DESC","The king or queen of the empire lives in the palace. Only one palace can exist in your realm at a time. You need a palace in order to proclaim a village to be your capital.");
|
||||
|
||||
define("TREASURY","Treasury");
|
||||
define("TREASURY_COMMENCE","Artifacts can be viewed when treasury is completed.");
|
||||
define("ARTIFACTS_AREA","Artefacts in your area");
|
||||
define("NO_ARTIFACTS_AREA","There are no artefacts in your area.");
|
||||
define("OWN_ARTIFACTS","Own artefacts");
|
||||
@@ -1028,11 +1029,11 @@ define("MERCHANT_LEVEL","Merchant load at level");
|
||||
define("TRADEOFFICE_DESC","In the trade office the merchants' carts get improved and equipped with powerful horses. The higher its level the more your merchants are able to carry.");
|
||||
|
||||
define("GREATBARRACKS","Great Barracks");
|
||||
define("TRAINING_COMMENCE_GREATBARRACKS","Training can commence when great barracks are completed.");
|
||||
define("TRAINING_COMMENCE_GREATBARRACKS","Training can commence when great barracks is completed.");
|
||||
define("GREATBARRACKS_DESC","Foot soldiers are trained in the great barracks. The higher the level of the barracks, the faster the troops are trained.");
|
||||
|
||||
define("GREATSTABLE","Great Stable");
|
||||
define("TRAINING_COMMENCE_GREATSTABLE","Training can commence when great stables are completed.");
|
||||
define("TRAINING_COMMENCE_GREATSTABLE","Training can commence when great stable is completed.");
|
||||
define("GREATSTABLE_DESC","Cavalry can be trained in the great stable. The higher its level the faster the troops are trained.");
|
||||
|
||||
define("CITYWALL","City Wall");
|
||||
@@ -1063,7 +1064,7 @@ define("TRAPS","Traps");
|
||||
define("TRAP","Trap");
|
||||
define("CURRENT_HAVE","Your currently have");
|
||||
define("WHICH_OCCUPIED","of which are occupied.");
|
||||
define("TRAINING_COMMENCE_TRAPPER","Training can commence when trapper are completed.");
|
||||
define("TRAINING_COMMENCE_TRAPPER","Training can commence when trapper is completed.");
|
||||
define("TRAPPER_DESC","The trapper protects your village with well hidden traps. This means that unwary enemies can be imprisoned and won't be able to harm your village anymore.");
|
||||
|
||||
define("HEROSMANSION","Hero's Mansion");
|
||||
@@ -1186,11 +1187,12 @@ define("FOOL_SMALL","Artefact of the slight fool");
|
||||
define("FOOL_SMALLVILLAGE","Pendant of Mischief");
|
||||
define("FOOL_UNIQUE","Artefact of the unique fool");
|
||||
define("FOOL_UNIQUEVILLAGE","Forbidden Manuscript");
|
||||
define("ARTEFACT","NATARS ARTIFACTS
|
||||
define("WWVILLAGE","WW village");
|
||||
define("ARTEFACT","<h1><b>Natars Artifacts</b></h1>
|
||||
|
||||
Whispering rumors echo through the villages, sharing legends told only by the best storytellers. It refers to NATARS, the most feared warrior of the TRAVIAN world. Their killing is the dream of any hero, the purpose of any fighter. No one knows how NATARS got to get such power, and their warriors so cruel. Determined to discover the source of the NATARS power, the fighters send a group of elite spies to spy them. I do not go through many hours and come back with fear in their eyes and balancing fantastic theories: it seems that the natural power comes from the mysterious objects they call artifacts that they stole from our ancestors. Try to steal the artefacts of her, and you can control their power.
|
||||
|
||||
PHOTO MUST BE INSERTED HERE
|
||||
<img src=\"img/x.gif\" class=\"ArtifactsAnnouncement\">
|
||||
|
||||
The time has come for claiming artifacts. Collaborate with your alliance and bring your worriors to get these wanted objects. However, NATARS will not give up without war to the artefacts ... nor your enemies. If you are successful in retrieving artifacts and you will be able to reject enemies, you will be able to collect the rewards. Your buildings will become incredibly strong and mightest, and the troops will be much faster and will consume less food. Capture the artifacts, bring glory over your empire and become new legends for your followers.
|
||||
|
||||
@@ -1211,7 +1213,7 @@ The construction plans are conquerable immediately when they appear to the serve
|
||||
There will be a countdown in game, showing the exact time of the release, 5 days prior to the launch. ");
|
||||
|
||||
//WW Village Release Message
|
||||
define("WWVILLAGEMSG","Wonder of World Village
|
||||
define("WWVILLAGEMSG","<h1><b>Wonder of the World Villages</b></h1>
|
||||
|
||||
Countless days have passed since the first battles upon the walls of the cursed villages of the Dread Natars, many armies of both the free ones and the Natarian empire struggled and died before the walls of the many strongholds from which the Natars had once ruled all creation. Now with the dust settled and a relative calm having settled in, armies began to count their losses and collect their dead, the stench of combat still lingering in the night air, a smell of a slaughter unforgettable in its extent and brutality yet soon to be dwarfed by yet others. The largest armies of the free ones and the Dread Natars were marshalling for yet another renewed assault upon the coveted former strongholds of the Natarian Empire.
|
||||
Soon scouts arrived telling of a most awesome sight and a chilling reminder, a dread army of an unfathomable size had been spotted marshalling at the end of the world, the Natarian capital, a force so great and unstoppable that the dust from their march would choke off all light, a force so brutal and ruthless that it would crush all hope. The free people knew that they had to race now, race against time and the endless hordes of the Natarian Empire to raise a Wonder of the World to restore the world to peace and vanquish the Natarian threat.
|
||||
@@ -1219,7 +1221,7 @@ But to raise such a great Wonder would be no easy task, one would need construct
|
||||
Tens of thousands of scouts roamed across all existence searching in vain for these mystical plans, looking in all places but the dreaded Natarian Capital, yet could not find them. Today however, they return bearing good news, they return baring the locations of the plans, hidden by the armies of the Natars inside secret strongholds constructed to be hidden from the eyes of man.
|
||||
Now begins the final stretch, when the greatest armies of the Free people and the Natars will clash across the world for the fate of all that lies under heaven. This is the war that will echo across the eons, this is your war, and here you shall etch your name across history, here you shall become legend.
|
||||
|
||||
PHOTO MUST BE INSERTED HERE
|
||||
<img src=\"img/x.gif\" class=\"WWVillagesAnnouncement\" title=\"".WWVILLAGE."\" alt=\"".WWVILLAGE."\">
|
||||
|
||||
To conquer one, the following things must happen:
|
||||
|
||||
@@ -1235,13 +1237,13 @@ To build a WW, you must own a plan yourself (you = the WW village owner) from lv
|
||||
|
||||
The construction plans are conquerable immediately when they appear to the server.
|
||||
|
||||
There will be a countdown in game, showing the exact time of the release, 5 days prior to the launch. ");
|
||||
There will be a countdown in game, showing the exact time of the release, ".(5 / SPEED)." days prior to the launch. ");
|
||||
|
||||
//Building Plans
|
||||
define("PLAN","Ancient Construction Plan");
|
||||
define("PLANVILLAGE","WW Buildingplan");
|
||||
define("PLAN_DESC","With this ancient construction plan you will able to build World Wonder to level 50. to build further, your alliance must hold at least two plans.");
|
||||
define("PLAN_INFO","World Wonder Construction Plans
|
||||
define("PLAN_INFO","<h1><b>World Wonder Construction Plans</b></h1>
|
||||
|
||||
|
||||
Many moons ago the tribes of Travian were surprised by the unforeseen return of the Natars. This tribe from immemorial times surpassing all in wisdom, might and glory was about to trouble the free ones again. Thus they put all their efforts in preparing a last war against the Natars and vanquishing them forever. Many thought about the so-called 'Wonders of the World', a construction of many legends, as the only solution. It was told that it would render anyone invincible once completed. Ultimately making the constructors the rulers and conquerors of all known Travian.
|
||||
@@ -1254,7 +1256,7 @@ Today, however, this last secret will be revealed. Deprivations and endeavors of
|
||||
|
||||
In the end, we will see whether the free tribes of Travian can once again outwit the Natars and vanquish them once and for all. Do not be so foolish as to assume that the Natars will leave without a fight, though!
|
||||
|
||||
|
||||
<img src=\"img/x.gif\" class=\"WWBuildingPlansAnnouncement\" title=\"".PLAN."\" alt=\"".PLAN."\">
|
||||
|
||||
To steal a set of Construction Plans from the Natars, the following things must happen:
|
||||
- You must Attack the village (NOT Raid!)
|
||||
@@ -1269,7 +1271,6 @@ NOTE: If the above criteria is not met during the attack, the next attack on tha
|
||||
To build a Treasure Chamber (Treasury), you will need a Main Building level 10 and the village MUST NOT be contain a World Wonder.
|
||||
|
||||
To build a World Wonder, you must own the Construction Plans yourself (you = the World Wonder Village Owner) from level 0 to 50, and then from level 51 to 100 you will need an additional set of Construction Plans in your Alliance! Two sets of Construction Plans in the World Wonder Village Account will not work!");
|
||||
define("WWVILLAGE","WW village");
|
||||
|
||||
//Admin setting - Admin/Templates/config.tpl & editServerSet.tpl
|
||||
define("EDIT_BACK","Back");
|
||||
|
||||
+12
-8
@@ -8,14 +8,18 @@
|
||||
|
||||
<p class="build_desc"><?php echo TREASURY_DESC; ?></p>
|
||||
<?php
|
||||
include("27_menu.tpl");
|
||||
if(isset($_GET['show']) && !empty($_GET['show']) && $_GET['show'] > 0) include("27_show.tpl");
|
||||
else
|
||||
{
|
||||
if(!isset($_GET['t'])) include("27_1.tpl");
|
||||
elseif(isset($_GET['t']) && $_GET['t'] == 2) include("27_2.tpl");
|
||||
elseif(isset($_GET['t']) && $_GET['t'] == 3) include("27_3.tpl");
|
||||
}
|
||||
|
||||
if($building->getTypeLevel(27) > 0){
|
||||
include("27_menu.tpl");
|
||||
if(isset($_GET['show']) && !empty($_GET['show']) && $_GET['show'] > 0) include("27_show.tpl");
|
||||
else
|
||||
{
|
||||
if(!isset($_GET['t'])) include("27_1.tpl");
|
||||
elseif(isset($_GET['t']) && $_GET['t'] == 2) include("27_2.tpl");
|
||||
elseif(isset($_GET['t']) && $_GET['t'] == 3) include("27_3.tpl");
|
||||
}
|
||||
}
|
||||
else echo '<b>'.TREASURY_COMMENCE.'</b><br>';
|
||||
include("upgrade.tpl");
|
||||
?>
|
||||
</div>
|
||||
@@ -4,8 +4,7 @@ unset($_GET['bid']);
|
||||
$bindicator = $building->canBuild($id,$bid);
|
||||
$loopsame = ($building->isCurrent($id) || $building->isLoop($id))?1:0;
|
||||
$doublebuild = ($building->isCurrent($id) && $building->isLoop($id))?1:0;
|
||||
$uprequire = $building->resourceRequired($id,$bid);
|
||||
$mastertime = $uprequire['time'];
|
||||
$uprequire = $building->resourceRequired($id, $bid);
|
||||
?>
|
||||
<td class="res">
|
||||
<img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $uprequire['wood']; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $uprequire['clay']; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $uprequire['iron']; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $uprequire['crop']; ?> | <img class="r5" src="img/x.gif" alt="Crop consumption" title="Crop consumption" /><?php echo $uprequire['pop']; ?> | <img class="clock" src="img/x.gif" alt="duration" title="duration" /><?php echo $generator->getTimeFormat($uprequire['time']);
|
||||
@@ -23,7 +22,7 @@ $mastertime = $uprequire['time'];
|
||||
?> </br>
|
||||
<?php
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">Constructing with master builder </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&c=$session->checker\">Constructing with 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>";
|
||||
@@ -37,7 +36,7 @@ $mastertime = $uprequire['time'];
|
||||
?> </br>
|
||||
<?php
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">Constructing with master builder </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&c=$session->checker\">Constructing with 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>";
|
||||
@@ -61,7 +60,7 @@ $mastertime = $uprequire['time'];
|
||||
?> </br>
|
||||
<?php
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">Constructing with master builder </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&c=$session->checker\">Constructing with 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>";
|
||||
|
||||
+11
-13
@@ -9,18 +9,16 @@ if($bindicate == 1) {
|
||||
} else if($bindicate == 11) {
|
||||
echo "<p><span class=\"none\">".BUILDING_BEING_DEMOLISHED."</span></p>";
|
||||
} else {
|
||||
$loopsame = ($building->isCurrent($id) || $building->isLoop($id))?1:0;
|
||||
$doublebuild = ($building->isCurrent($id) && $building->isLoop($id))?1:0;
|
||||
$loopsame = ($building->isCurrent($id) || $building->isLoop($id)) ? 1 : 0;
|
||||
$doublebuild = ($building->isCurrent($id) && $building->isLoop($id)) ? 1 : 0;
|
||||
$master = count($database->getMasterJobsByField($village->wid,$id));
|
||||
|
||||
// master and loopsame would have duplicated level display,
|
||||
// so we need to decrease loopsame if master is the only job left
|
||||
if ($master == 1 && $loopsame == 1) {
|
||||
$loopsame = 0;
|
||||
}
|
||||
if ($master == 1 && $loopsame == 1) $loopsame = 0;
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$uprequire = $building->resourceRequired($id,$village->resarray['f'.$id.'t'],1+$loopsame+$doublebuild+$master);
|
||||
$mastertime = $uprequire['time'];
|
||||
$uprequire = $building->resourceRequired($id,$village->resarray['f'.$id.'t'],1 + $loopsame + $doublebuild + $master);
|
||||
?>
|
||||
<?php
|
||||
$total_required = (int)($uprequire['wood'] + $uprequire['clay'] + $uprequire['iron'] + $uprequire['crop']);
|
||||
@@ -38,7 +36,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $villa
|
||||
<?php
|
||||
if($id <= 18) {
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">".CONSTRUCTING_MASTER_BUILDER." </a>";
|
||||
echo "<a class=\"build\" href=\"dorf1.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_MASTER_BUILDER."</span>";
|
||||
@@ -46,7 +44,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $villa
|
||||
}
|
||||
}else{
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">".CONSTRUCTING_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_MASTER_BUILDER."</span>";
|
||||
@@ -62,7 +60,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $villa
|
||||
<?php
|
||||
if($id <= 18) {
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">".CONSTRUCTING_MASTER_BUILDER." </a>";
|
||||
echo "<a class=\"build\" href=\"dorf1.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_MASTER_BUILDER."</span>";
|
||||
@@ -70,7 +68,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $villa
|
||||
}
|
||||
}else{
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">".CONSTRUCTING_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_MASTER_BUILDER."</span>";
|
||||
@@ -100,7 +98,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $villa
|
||||
<?php
|
||||
if($id <= 18) {
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">".CONSTRUCTING_MASTER_BUILDER." </a>";
|
||||
echo "<a class=\"build\" href=\"dorf1.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_MASTER_BUILDER."</span>";
|
||||
@@ -108,7 +106,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $villa
|
||||
}
|
||||
}else{
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">".CONSTRUCTING_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_MASTER_BUILDER."</span>";
|
||||
|
||||
@@ -20,7 +20,6 @@ if ( $building->allowWwUpgrade() ) {
|
||||
$doublebuild = ( $building->isCurrent( $id ) && $building->isLoop( $id ) ) ? 1 : 0;
|
||||
$master = count( $database->getMasterJobsByField( $village->wid, $id ) );
|
||||
$uprequire = $building->resourceRequired( $id, $village->resarray[ 'f' . $id . 't' ], 1 + $loopsame + $doublebuild + $master );
|
||||
$mastertime = $uprequire['time'];
|
||||
?>
|
||||
<p id="contract">
|
||||
<b><?php echo COSTS_UPGRADING_LEVEL; ?> <?php echo $village->resarray[ 'f' . $id ] + 1 + $loopsame + $doublebuild + $master; ?>
|
||||
@@ -50,7 +49,7 @@ if ( $building->allowWwUpgrade() ) {
|
||||
<?php
|
||||
if ( $id <= 18 ) {
|
||||
if ( $session->gold >= 1 && $village->master == 0 ) {
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&time=$mastertime\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id\">" . 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_MASTER_BUILDER . "</span>";
|
||||
@@ -58,7 +57,7 @@ if ( $building->allowWwUpgrade() ) {
|
||||
}
|
||||
} else {
|
||||
if ( $session->gold >= 1 && $village->master == 0 ) {
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id\">" . 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_MASTER_BUILDER . "</span>";
|
||||
@@ -73,7 +72,7 @@ if ( $building->allowWwUpgrade() ) {
|
||||
<?php
|
||||
if ( $id <= 18 ) {
|
||||
if ( $session->gold >= 1 && $village->master == 0 ) {
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&time=$mastertime\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id\">" . 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_MASTER_BUILDER . "</span>";
|
||||
@@ -81,7 +80,7 @@ if ( $building->allowWwUpgrade() ) {
|
||||
}
|
||||
} else {
|
||||
if ( $session->gold >= 1 && $village->master == 0 ) {
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id\">" . 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_MASTER_BUILDER . "</span>";
|
||||
@@ -107,7 +106,7 @@ if ( $building->allowWwUpgrade() ) {
|
||||
<?php
|
||||
if ( $id <= 18 ) {
|
||||
if ( $session->gold >= 1 && $village->master == 0 ) {
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&time=$mastertime\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id\">" . 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_MASTER_BUILDER . "</span>";
|
||||
@@ -115,7 +114,7 @@ if ( $building->allowWwUpgrade() ) {
|
||||
}
|
||||
} else {
|
||||
if ( $session->gold >= 1 && $village->master == 0 ) {
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id\">" . 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_MASTER_BUILDER . "</span>";
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
#################################################################################
|
||||
|
||||
|
||||
$txt="";
|
||||
$txt="<h1><b>Wonder of the World Villages</b></h1>\n\nCountless days have passed since the first battles upon the walls of the cursed villages of the Dread Natars, many armies of both the free ones and the Natarian empire struggled and died before the walls of the many strongholds from which the Natars had once ruled all creation. Now with the dust settled and a relative calm having settled in, armies began to count their losses and collect their dead, the stench of combat still lingering in the night air, a smell of a slaughter unforgettable in its extent and brutality yet soon to be dwarfed by yet others. The largest armies of the free ones and the Dread Natars were marshalling for yet another renewed assault upon the coveted former strongholds of the Natarian Empire.\nSoon scouts arrived telling of a most awesome sight and a chilling reminder, a dread army of an unfathomable size had been spotted marshalling at the end of the world, the Natarian capital, a force so great and unstoppable that the dust from their march would choke off all light, a force so brutal and ruthless that it would crush all hope. The free people knew that they had to race now, race against time and the endless hordes of the Natarian Empire to raise a Wonder of the World to restore the world to peace and vanquish the Natarian threat.\nBut to raise such a great Wonder would be no easy task, one would need construction plans created in the distant past, plans of such an arcane nature that even the very wisest of sages knew not their contents or locations.\nTens of thousands of scouts roamed across all existence searching in vain for these mystical plans, looking in all places but the dreaded Natarian Capital, yet could not find them. Today however, they return bearing good news, they return baring the locations of the plans, hidden by the armies of the Natars inside secret strongholds constructed to be hidden from the eyes of man.\nNow begins the final stretch, when the greatest armies of the Free people and the Natars will clash across the world for the fate of all that lies under heaven. This is the war that will echo across the eons, this is your war, and here you shall etch your name across history, here you shall become legend.\n\n<img src=\"img/x.gif\" class=\"WWVillagesAnnouncement\" title=\"WW village\" alt=\"WW village\">\n\nTo conquer one, the following things must happen:\n\n1. You must attack the village (NO Raid!)\n2. WIN the Attack\n3. Destroy the RESIDENCE\n4. You must decrease the loyalty to 0 with : SENATORS , CHIEF , CHIEFTAIN\n5. You must have enough culture points to conquer the village\n\nIf not, the next attack on that village, winning with a SENATORS , CHIEF , CHIEFTAIN and empty slots in RESIDENCE/PALACE will take the village.\n\nTo build a WW, you must own a plan yourself (you = the WW village owner) from lvl 0 to 50, from 51 to 100 you need an additional plan in your alliance! Two plans in the WW village account would not work!\n\nThe construction plans are conquerable immediately when they appear to the server. \n\nThere will be a countdown in game, showing the exact time of the release, 5 days prior to the launch. ";
|
||||
|
||||
//bbcode = html code
|
||||
$txt = preg_replace("/\[b\]/is",'<b>', $txt);
|
||||
@@ -23,4 +23,4 @@ $txt = preg_replace("/\[\/u\]/is",'</u>', $txt);
|
||||
//nl2br = enter
|
||||
echo nl2br($txt);
|
||||
|
||||
?>
|
||||
?>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
@@ -6964,6 +6964,30 @@ img.online4 {
|
||||
img.online5 {
|
||||
background-position: -60px 0;
|
||||
}
|
||||
img.WWVillagesAnnouncement {
|
||||
background-image: url("../../img/artefact/WWVillagesAnnouncement.gif");
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 196px;
|
||||
height: 324px;
|
||||
}
|
||||
img.ArtifactsAnnouncement {
|
||||
background-image: url("../../img/artefact/ArtifactsAnnouncement.gif");
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 378px;
|
||||
height: 157px;
|
||||
}
|
||||
img.WWBuildingPlansAnnouncement{
|
||||
background-image: url("../../img/artefact/type-1.gif");
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 551px;
|
||||
height: 168px;
|
||||
}
|
||||
h1 img.point {
|
||||
background-image: url("../../img/u/point.gif");
|
||||
height: 16px;
|
||||
|
||||
Reference in New Issue
Block a user