mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-08 05:36:10 +00:00
Merge branch 'master' of https://github.com/Shadowss/TravianZ
This commit is contained in:
+41
-41
@@ -287,47 +287,47 @@ class Battle {
|
||||
$cdp *= $defenderhero['db'];
|
||||
}
|
||||
}
|
||||
$DefendersAll = $database->getEnforceVillage($DefenderWref,0);
|
||||
if(!empty($DefendersAll) && $DefenderWref>0){
|
||||
foreach($DefendersAll as $defenders) {
|
||||
for ($i=1;$i<=50;$i++) {$def_ab[$i]=0;}
|
||||
$fromvillage = $defenders['from'];
|
||||
$enforcetribe = $database->getUserField($database->getVillageField($fromvillage,"owner"),"tribe",0);
|
||||
$ud=($enforcetribe-1)*10;
|
||||
if($defenders['from']>0) { //don't check nature tribe
|
||||
$armory = $database->getABTech($defenders['from']); // Armory level every village enforcement
|
||||
$def_ab[$ud+1] = $armory['a1'];
|
||||
$def_ab[$ud+2] = $armory['a2'];
|
||||
$def_ab[$ud+3] = $armory['a3'];
|
||||
$def_ab[$ud+4] = $armory['a4'];
|
||||
$def_ab[$ud+5] = $armory['a5'];
|
||||
$def_ab[$ud+6] = $armory['a6'];
|
||||
$def_ab[$ud+7] = $armory['a7'];
|
||||
$def_ab[$ud+8] = $armory['a8'];
|
||||
}
|
||||
if ($type==1) {
|
||||
$datadefScout=$this->getDataDefScout($Defender,$def_ab,$defender_artefact,$AttackerWref,$AttackerID);
|
||||
$dp+=$datadefScout['dp'];
|
||||
$cdp+=$datadefScout['cdp'];
|
||||
$involve=$datadefScout['involve'];
|
||||
if ($datadefScout['detect']==1) $detected = 1;
|
||||
}else{
|
||||
$datadef=$this->getDataDef($Defenders,$def_ab);
|
||||
$dp+=$datadef['dp'];
|
||||
$cdp+=$datadef['cdp'];
|
||||
$involve=$datadef['involve'];
|
||||
}
|
||||
$reinfowner = $database->getVillageField($fromvillage,"owner");
|
||||
$defhero = $this->getBattleHero($reinfowner);
|
||||
//calculate def hero from enforcement
|
||||
if($defenders['hero'] != 0){
|
||||
$cdp += $defhero['dc'];
|
||||
$dp += $defhero['di'];
|
||||
$dp *= $defhero['db'];
|
||||
$cdp *= $defhero['db'];
|
||||
}
|
||||
}
|
||||
}
|
||||
$DefendersAll = $database->getEnforceVillage($DefenderWref,0);
|
||||
if(!empty($DefendersAll) && $DefenderWref>0){
|
||||
foreach($DefendersAll as $defenders) {
|
||||
for ($i=1;$i<=50;$i++) {$def_ab[$i]=0;}
|
||||
$fromvillage = $defenders['from'];
|
||||
$enforcetribe = $database->getUserField($database->getVillageField($fromvillage,"owner"),"tribe",0);
|
||||
$ud=($enforcetribe-1)*10;
|
||||
if($defenders['from']>0) { //don't check nature tribe
|
||||
$armory = $database->getABTech($defenders['from']); // Armory level every village enforcement
|
||||
$def_ab[$ud+1] = $armory['a1'];
|
||||
$def_ab[$ud+2] = $armory['a2'];
|
||||
$def_ab[$ud+3] = $armory['a3'];
|
||||
$def_ab[$ud+4] = $armory['a4'];
|
||||
$def_ab[$ud+5] = $armory['a5'];
|
||||
$def_ab[$ud+6] = $armory['a6'];
|
||||
$def_ab[$ud+7] = $armory['a7'];
|
||||
$def_ab[$ud+8] = $armory['a8'];
|
||||
}
|
||||
if ($type==1) {
|
||||
$datadefScout=$this->getDataDefScout($defenders,$def_ab,$defender_artefact,$AttackerWref,$AttackerID);
|
||||
$dp+=$datadefScout['dp'];
|
||||
$cdp+=$datadefScout['cdp'];
|
||||
$involve=$datadefScout['involve'];
|
||||
if ($datadefScout['detect']==1) $detected = 1;
|
||||
}else{
|
||||
$datadef=$this->getDataDef($defenders,$def_ab);
|
||||
$dp+=$datadef['dp'];
|
||||
$cdp+=$datadef['cdp'];
|
||||
$involve=$datadef['involve'];
|
||||
}
|
||||
$reinfowner = $database->getVillageField($fromvillage,"owner");
|
||||
$defhero = $this->getBattleHero($reinfowner);
|
||||
//calculate def hero from enforcement
|
||||
if($defenders['hero'] != 0){
|
||||
//$cdp += $defhero['dc'];
|
||||
//$dp += $defhero['di'];
|
||||
$dp *= $defhero['db'];
|
||||
$cdp *= $defhero['db'];
|
||||
}
|
||||
}
|
||||
}
|
||||
// Calculate the total number of points Attacker
|
||||
$start = ($att_tribe-1)*10+1;
|
||||
$end = ($att_tribe*10);
|
||||
|
||||
@@ -482,6 +482,33 @@ define("FOUNDNEWVILLAGE","Founding New village");
|
||||
define("UNDERATTACK","The village is under attack");
|
||||
define("OASISATTACK","The Oasis is under attack");
|
||||
define("OASISATTACKS","Oasis Att.");
|
||||
define("RETURNFROM","Return from");
|
||||
define("REINFORCEMENTFOR","Reinforcement to");
|
||||
define("ATTACK_ON","Attack to");
|
||||
define("RAID_ON","Raid to");
|
||||
define("SCOUTING","Scouting");
|
||||
define("PRISONERS","Prisioners");
|
||||
define("PRISONERSIN","Prisioners in");
|
||||
define("PRISONERSFROM","Prisioners from");
|
||||
define("TROOPS","Troops");
|
||||
define("TROOPSFROM","Troops");
|
||||
define("BOUNTY","Bounty");
|
||||
define("ARRIVAL","Arrival");
|
||||
define("INCOMING_TROOPS","Incoming Troops");
|
||||
define("TROOPS_ON_THEIR_WAY","Troops on their way");
|
||||
define("OWN_TROOPS","Own troops");
|
||||
define("ON","on");
|
||||
define("AT","at");
|
||||
define("UPKEEP","Upkeep");
|
||||
define("SEND_BACK","Send back");
|
||||
define("TROOPS_IN_THE_VILLAGE","Troops in the village");
|
||||
define("TROOPS_IN_OTHER_VILLAGE","Troops in other village");
|
||||
define("TROOPS_IN_OASIS","Troops in oasis");
|
||||
define("KILL","Kill");
|
||||
define("FROM","From");
|
||||
define("SEND_TROOPS","Send troops");
|
||||
define("TASKMASTER","Taskmaster");
|
||||
define("VILLAGE_OF_THE_ELDERS_TROOPS","village of the elders troops");
|
||||
|
||||
//SEND TROOP
|
||||
define("REINFORCE","Reinforcement");
|
||||
@@ -574,6 +601,8 @@ define("ARMOURY","Armoury");
|
||||
define("TOURNAMENTSQUARE","Tournament Square");
|
||||
define("MAINBUILDING","Main Building");
|
||||
define("RALLYPOINT","Rally Point");
|
||||
define("OVERVIEW","Resumen");
|
||||
define("RALLYPOINT_DESC","Your village's troops meet here. From here you can send them out to conquer, raid or reinforce other villages.");
|
||||
define("MARKETPLACE","Marketplace");
|
||||
define("EMBASSY","Embassy");
|
||||
define("BARRACKS","Barracks");
|
||||
|
||||
+39
-3
@@ -6,7 +6,7 @@
|
||||
// Made by: Dzoki & Dixie (TravianX) //
|
||||
// - TravianX = Travian Clone Project - //
|
||||
// DO NOT REMOVE COPYRIGHT NOTICE! //
|
||||
// Adding tasks and constructions by: Armando //
|
||||
// Adding tasks, constructions and artefact by: Armando //
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// SPANISH //
|
||||
@@ -432,12 +432,44 @@ define("HOURS","horas");
|
||||
|
||||
//ATTACKS ETC.
|
||||
define("TROOP_MOVEMENTS","movimientos de tropa:");
|
||||
define("ARRIVING_REINF_TROOPS","Llegando refuerzos");
|
||||
define("ARRIVING_REINF_TROOPS","Refuerzos llegando ");
|
||||
define("ARRIVING_REINF_TROOPS_SHORT","Refuer.");
|
||||
define("OWN_ATTACKING_TROOPS","Tropas atacando");
|
||||
define("ATTACK","Ataque");
|
||||
define("OWN_REINFORCING_TROOPS","Refuerzos despachados");
|
||||
define("OWN_REINFORCING_TROOPS","Reforzando");
|
||||
define("TROOPS_DORF","Tropas:");
|
||||
define("NEWVILLAGE","Nueva Aldea.");
|
||||
define("FOUNDNEWVILLAGE","Fundando Nueva Aldea");
|
||||
define("UNDERATTACK","Tropas atacantes llegando");
|
||||
define("OASISATTACK","Tropas atacantes llegando");
|
||||
define("OASISATTACKS","Oasis Att.");
|
||||
define("RETURNFROM","Regreso de");
|
||||
define("REINFORCEMENTFOR","Refuerzo para");
|
||||
define("ATTACK_ON","Ataque contra");
|
||||
define("RAID_ON","Asalto contra");
|
||||
define("SCOUTING","Espiando a");
|
||||
define("PRISONERS","Prisioneros");
|
||||
define("PRISONERSIN","Prisioneros en");
|
||||
define("PRISONERSFROM","Prisioneros de");
|
||||
define("TROOPS","Tropas");
|
||||
define("TROOPSFROM","Tropas de");
|
||||
define("BOUNTY","Botín");
|
||||
define("ARRIVAL","Llegada");
|
||||
define("INCOMING_TROOPS","Tropas llegando");
|
||||
define("TROOPS_ON_THEIR_WAY","Tropas saliendo");
|
||||
define("OWN_TROOPS","Tropas propias");
|
||||
define("ON","el");
|
||||
define("AT","a las");
|
||||
define("UPKEEP","Consumo");
|
||||
define("SEND_BACK","Retirar");
|
||||
define("TROOPS_IN_THE_VILLAGE","Tropas en esta aldea");
|
||||
define("TROOPS_IN_OTHER_VILLAGE","Tropas en otras aldeas");
|
||||
define("TROOPS_IN_OASIS","Tropas en oasis");
|
||||
define("KILL","Matar");
|
||||
define("FROM","aldea");
|
||||
define("SEND_TROOPS","Enviar tropas");
|
||||
define("TASKMASTER","Amo de las Misiones");
|
||||
define("VILLAGE_OF_THE_ELDERS_TROOPS","Tropas de la Aldea de los Sabios Ancianos");
|
||||
|
||||
|
||||
//LOGIN.php
|
||||
@@ -449,6 +481,8 @@ define("PW_GENERATE","Pedir nueva contraseña");
|
||||
define("EMAIL_NOT_VERIFIED","Correo no verificado!");
|
||||
define("EMAIL_FOLLOW","Sigue este vínculo para activar este enlace.");
|
||||
define("VERIFY_EMAIL","Verificar Correo.");
|
||||
define("SERVER_STARTS_IN","Servidor comenzará en: ");
|
||||
define("START_NOW","EMPIEZA AHORA");
|
||||
|
||||
|
||||
//404.php
|
||||
@@ -489,6 +523,8 @@ define("ARMOURY","Armería");
|
||||
define("TOURNAMENTSQUARE","Plaza de torneos");
|
||||
define("MAINBUILDING","Edificio Principal");
|
||||
define("RALLYPOINT","Plaza de Reuniones");
|
||||
define("OVERVIEW","Resumen");
|
||||
define("RALLYPOINT_DESC","Aqui se reúnen las tropas de tu aldea. Desde aquí, pueden ser enviadas para atacar, conquistar, asaltar, fundar otras aldeas o como refuerzos. <br \/> <br \/> Si hay menos unidades atacantes que el nivel de la plaza de reuniones entonces puedo ver el tipo de unidad. ");
|
||||
define("MARKETPLACE","Mercado");
|
||||
define("EMBASSY","Embajada");
|
||||
define("BARRACKS","Cuartel");
|
||||
|
||||
+42
-3
@@ -6,7 +6,7 @@
|
||||
// Made by: Dzoki & Dixie (TravianX) //
|
||||
// - TravianX = Travian Clone Project - //
|
||||
// DO NOT REMOVE COPYRIGHT NOTICE! //
|
||||
// Adding tasks and constructions by: Armando //
|
||||
// Adding tasks, constructions and artefact by: Armando //
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Русский //
|
||||
@@ -206,6 +206,7 @@ define("Q13_RESP","Very good, your village grows and thrives!");
|
||||
define("Q14","Task 14: Instructions");
|
||||
define("Q14_DESC","In the ingame instructions you can find short information texts about different buildings and types of units.<br \/><br \/>Click on 'instructions' at the left to find out how much lumber is required for the barracks.");
|
||||
define("Q14_ORDER","Order:<\/p>Enter how much lumber barracks cost");
|
||||
define("Q14_BUTN","complete task");
|
||||
define("Q14_RESP","Exactly! Barracks cost 210 lumber.");
|
||||
|
||||
define("Q15","Task 15: Main Building");
|
||||
@@ -225,7 +226,8 @@ define("Q17_BUTN1","Military");
|
||||
|
||||
define("Q18","Task 18: Military");
|
||||
define("Q18_DESC","A brave decision. To be able to send troops you need a rally point.<br \/><br \/>The rally point must be built on a specific building site. The ");
|
||||
define("Q18_DESC1"," is located on the right side of the main building, slightly below it. The building site itself is curved.");
|
||||
define("Q18_DESC1"," building site.");
|
||||
define("Q18_DESC2"," is located on the right side of the main building, slightly below it. The building site itself is curved.");
|
||||
define("Q18_ORDER","Order:<\/p>Construct a rally point.");
|
||||
define("Q18_RESP","Your rally point has been erected! A good move towards world domination!");
|
||||
|
||||
@@ -238,7 +240,8 @@ define("Q20","Task 20: Train.");
|
||||
define("Q20_DESC","Now that you have barracks you can start training troops. Train two ");
|
||||
define("Q20_ORDER","Please train 2 ");
|
||||
define("Q20_RESP","The foundation for your glorious army has been laid.<br \/><br \/>Before sending your army off to plunder you should check with the.");
|
||||
define("Q20_RESP1","to see how many troops you need to successfully fight one rat without losses.");
|
||||
define("Q20_RESP1","Combat Simulator");
|
||||
define("Q20_RESP2","to see how many troops you need to successfully fight one rat without losses.");
|
||||
|
||||
define("Q21","Task 18: Economy");
|
||||
define("Q21_DESC","Trade & Economy was your choice. Golden times await you for sure!");
|
||||
@@ -463,6 +466,38 @@ define("OWN_ATTACKING_TROOPS","Собственные атакующие вой
|
||||
define("ATTACK","Атака");
|
||||
define("OWN_REINFORCING_TROOPS","Собственные прибивающие войска");
|
||||
define("TROOPS_DORF","Войска:");
|
||||
define("NEWVILLAGE","New vill.");
|
||||
define("FOUNDNEWVILLAGE","Founding New village");
|
||||
define("UNDERATTACK","The village is under attack");
|
||||
define("OASISATTACK","The Oasis is under attack");
|
||||
define("OASISATTACKS","Oasis Att.");
|
||||
define("RETURNFROM","Return from");
|
||||
define("REINFORCEMENTFOR","Reinforcement to");
|
||||
define("ATTACK_ON","Attack to");
|
||||
define("RAID_ON","Raid to");
|
||||
define("SCOUTING","Scouting");
|
||||
define("PRISONERS","Prisioners");
|
||||
define("PRISONERSIN","Prisioners in");
|
||||
define("PRISONERSFROM","Prisioners from");
|
||||
define("TROOPS","Troops");
|
||||
define("TROOPSFROM","Troops");
|
||||
define("BOUNTY","Bounty");
|
||||
define("ARRIVAL","Arrival");
|
||||
define("INCOMING_TROOPS","Incoming Troops");
|
||||
define("TROOPS_ON_THEIR_WAY","Troops on their way");
|
||||
define("OWN_TROOPS","Own troops");
|
||||
define("ON","on");
|
||||
define("AT","at");
|
||||
define("UPKEEP","Upkeep");
|
||||
define("SEND_BACK","Send back");
|
||||
define("TROOPS_IN_THE_VILLAGE","Troops in the village");
|
||||
define("TROOPS_IN_OTHER_VILLAGE","Troops in other village");
|
||||
define("TROOPS_IN_OASIS","Troops in oasis");
|
||||
define("KILL","Kill");
|
||||
define("FROM","From");
|
||||
define("SEND_TROOPS","Send troops");
|
||||
define("TASKMASTER","Taskmaster");
|
||||
define("VILLAGE_OF_THE_ELDERS_TROOPS","village of the elders troops");
|
||||
|
||||
|
||||
//LOGIN.php
|
||||
@@ -474,6 +509,8 @@ define("PW_GENERATE","Создать новый пароль.");
|
||||
define("EMAIL_NOT_VERIFIED","Email nне принят!");
|
||||
define("EMAIL_FOLLOW","Проследуйте по следующей ссылке чтобы активировать аккаунт.");
|
||||
define("VERIFY_EMAIL","Email подтвержден.");
|
||||
define("SERVER_STARTS_IN","Server will start in: ");
|
||||
define("START_NOW","START NOW");
|
||||
|
||||
|
||||
//404.php
|
||||
@@ -514,6 +551,8 @@ define("ARMOURY","Armoury");
|
||||
define("TOURNAMENTSQUARE","Tournament Square");
|
||||
define("MAINBUILDING","Main Building");
|
||||
define("RALLYPOINT","Rally Point");
|
||||
define("OVERVIEW","Resumen");
|
||||
define("RALLYPOINT_DESC","Your village's troops meet here. From here you can send them out to conquer, raid or reinforce other villages.");
|
||||
define("MARKETPLACE","Marketplace");
|
||||
define("EMBASSY","Embassy");
|
||||
define("BARRACKS","Barracks");
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Made by: Dzoki & Dixie (TravianX) //
|
||||
// - TravianX = Travian Clone Project - //
|
||||
// DO NOT REMOVE COPYRIGHT NOTICE! //
|
||||
// Adding tasks and constructions by: Armando //
|
||||
// Adding tasks, constructions and artefact by: Armando //
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// ENGLISH //
|
||||
@@ -209,6 +209,7 @@ define("Q13_RESP","Very good, your village grows and thrives!");
|
||||
define("Q14","Task 14: Instructions");
|
||||
define("Q14_DESC","In the ingame instructions you can find short information texts about different buildings and types of units.<br \/><br \/>Click on 'instructions' at the left to find out how much lumber is required for the barracks.");
|
||||
define("Q14_ORDER","Order:<\/p>Enter how much lumber barracks cost");
|
||||
define("Q14_BUTN","complete task");
|
||||
define("Q14_RESP","Exactly! Barracks cost 210 lumber.");
|
||||
|
||||
define("Q15","Task 15: Main Building");
|
||||
@@ -228,7 +229,8 @@ define("Q17_BUTN1","Military");
|
||||
|
||||
define("Q18","Task 18: Military");
|
||||
define("Q18_DESC","A brave decision. To be able to send troops you need a rally point.<br \/><br \/>The rally point must be built on a specific building site. The ");
|
||||
define("Q18_DESC1"," is located on the right side of the main building, slightly below it. The building site itself is curved.");
|
||||
define("Q18_DESC1"," building site.");
|
||||
define("Q18_DESC2"," is located on the right side of the main building, slightly below it. The building site itself is curved.");
|
||||
define("Q18_ORDER","Order:<\/p>Construct a rally point.");
|
||||
define("Q18_RESP","Your rally point has been erected! A good move towards world domination!");
|
||||
|
||||
@@ -241,7 +243,8 @@ define("Q20","Task 20: Train.");
|
||||
define("Q20_DESC","Now that you have barracks you can start training troops. Train two ");
|
||||
define("Q20_ORDER","Please train 2 ");
|
||||
define("Q20_RESP","The foundation for your glorious army has been laid.<br \/><br \/>Before sending your army off to plunder you should check with the.");
|
||||
define("Q20_RESP1","to see how many troops you need to successfully fight one rat without losses.");
|
||||
define("Q20_RESP1","Combat Simulator");
|
||||
define("Q20_RESP2","to see how many troops you need to successfully fight one rat without losses.");
|
||||
|
||||
define("Q21","Task 18: Economy");
|
||||
define("Q21_DESC","Trade & Economy was your choice. Golden times await you for sure!");
|
||||
@@ -472,6 +475,38 @@ define("OWN_ATTACKING_TROOPS","Own attacking troops");
|
||||
define("ATTACK","攻擊");
|
||||
define("OWN_REINFORCING_TROOPS","Own reinforcing troops");
|
||||
define("TROOPS_DORF","軍隊:");
|
||||
define("NEWVILLAGE","New vill.");
|
||||
define("FOUNDNEWVILLAGE","Founding New village");
|
||||
define("UNDERATTACK","The village is under attack");
|
||||
define("OASISATTACK","The Oasis is under attack");
|
||||
define("OASISATTACKS","Oasis Att.");
|
||||
define("RETURNFROM","Return from");
|
||||
define("REINFORCEMENTFOR","Reinforcement to");
|
||||
define("ATTACK_ON","Attack to");
|
||||
define("RAID_ON","Raid to");
|
||||
define("SCOUTING","Scouting");
|
||||
define("PRISONERS","Prisioners");
|
||||
define("PRISONERSIN","Prisioners in");
|
||||
define("PRISONERSFROM","Prisioners from");
|
||||
define("TROOPS","Troops");
|
||||
define("TROOPSFROM","Troops");
|
||||
define("BOUNTY","Bounty");
|
||||
define("ARRIVAL","Arrival");
|
||||
define("INCOMING_TROOPS","Incoming Troops");
|
||||
define("TROOPS_ON_THEIR_WAY","Troops on their way");
|
||||
define("OWN_TROOPS","Own troops");
|
||||
define("ON","on");
|
||||
define("AT","at");
|
||||
define("UPKEEP","Upkeep");
|
||||
define("SEND_BACK","Send back");
|
||||
define("TROOPS_IN_THE_VILLAGE","Troops in the village");
|
||||
define("TROOPS_IN_OTHER_VILLAGE","Troops in other village");
|
||||
define("TROOPS_IN_OASIS","Troops in oasis");
|
||||
define("KILL","Kill");
|
||||
define("FROM","From");
|
||||
define("SEND_TROOPS","Send troops");
|
||||
define("TASKMASTER","Taskmaster");
|
||||
define("VILLAGE_OF_THE_ELDERS_TROOPS","village of the elders troops");
|
||||
|
||||
|
||||
//LOGIN.php
|
||||
@@ -483,6 +518,8 @@ define("PW_GENERATE","產生一組新密碼.");
|
||||
define("EMAIL_NOT_VERIFIED","電子郵件帳號不正確!");
|
||||
define("EMAIL_FOLLOW","Follow this link to activate your account.");
|
||||
define("VERIFY_EMAIL","驗證郵件.");
|
||||
define("SERVER_STARTS_IN","Server will start in: ");
|
||||
define("START_NOW","START NOW");
|
||||
|
||||
|
||||
//404.php
|
||||
@@ -523,6 +560,8 @@ define("ARMOURY","Armoury");
|
||||
define("TOURNAMENTSQUARE","Tournament Square");
|
||||
define("MAINBUILDING","Main Building");
|
||||
define("RALLYPOINT","Rally Point");
|
||||
define("OVERVIEW","Resumen");
|
||||
define("RALLYPOINT_DESC","Your village's troops meet here. From here you can send them out to conquer, raid or reinforce other villages.");
|
||||
define("MARKETPLACE","Marketplace");
|
||||
define("EMBASSY","Embassy");
|
||||
define("BARRACKS","Barracks");
|
||||
|
||||
@@ -74,8 +74,8 @@ class Units {
|
||||
}
|
||||
private function loadUnits($post) {
|
||||
global $database,$village,$session,$generator,$logging,$form;
|
||||
// Busqueda por nombre de pueblo
|
||||
// Confirmamos y buscamos las coordenadas por nombre de pueblo
|
||||
// Search by town name
|
||||
// Coordinates and look confirm name people
|
||||
if(isset($post['x']) && isset($post['y']) && $post['x'] != "" && $post['y'] != "") {
|
||||
$vid = $database->getVilWref($post['x'],$post['y']);
|
||||
unset($post['dname']);
|
||||
@@ -141,8 +141,8 @@ class Units {
|
||||
}
|
||||
}
|
||||
|
||||
// Busqueda por coordenadas de pueblo
|
||||
// Confirmamos y buscamos las coordenadas por coordenadas de pueblo
|
||||
// People search by coordinates
|
||||
// We confirm and seek coordinate coordinates Village
|
||||
if(isset($post['x']) && isset($post['y']) && $post['x'] != "" && $post['y'] != "") {
|
||||
$coor = array('x'=>$post['x'], 'y'=>$post['y']);
|
||||
$id = $generator->getBaseID($coor['x'],$coor['y']);
|
||||
@@ -191,14 +191,14 @@ class Units {
|
||||
$form->addError("error","You cant attack same village you are sending from.");
|
||||
//break;
|
||||
}
|
||||
// Procesamos el array con los errores dados en el formulario
|
||||
// We process the array with the errors given in the form
|
||||
if($form->returnErrors() > 0) {
|
||||
$_SESSION['errorarray'] = $form->getErrors();
|
||||
$_SESSION['valuearray'] = $_POST;
|
||||
header("Location: a2b.php");
|
||||
}else{
|
||||
// Debemos devolver un array con $post, que contiene todos los datos mas
|
||||
// otra variable que definira que el flag esta levantado y se va a enviar y el tipo de envio
|
||||
// We must return an array with $ post, which contains all the data more
|
||||
// another variable that will define the flag is raised and is being sent and the type of shipping
|
||||
$villageName = $database->getVillageField($id,'name');
|
||||
$speed= 300;
|
||||
$timetaken = $generator->procDistanceTime($coor,$village->coor,INCREASE_SPEED,1);
|
||||
|
||||
+179
-181
@@ -1,16 +1,16 @@
|
||||
<div id="build" class="gid16"><a href="#" onClick="return Popup(16,4);" class="build_logo">
|
||||
<img class="g16" src="img/x.gif" alt="Rally point" title="Rally point" />
|
||||
<img class="g16" src="img/x.gif" alt="Rally point" title="Rally point" />
|
||||
</a>
|
||||
<h1>Rally point <span class="level">level <?php echo $village->resarray['f'.$id]; ?></span></h1>
|
||||
<p class="build_desc">Your village's troops meet here. From here you can send them out to conquer, raid or reinforce other villages.</p>
|
||||
<h1><?php echo RALLYPOINT;?> <span class="level"><?php echo LEVEL;?> <?php echo $village->resarray['f'.$id]; ?></span></h1>
|
||||
<p class="build_desc"><?php echo RALLYPOINT_DESC;?></p>
|
||||
|
||||
<div id="textmenu">
|
||||
<a href="build.php?id=<?php echo $id; ?>">Overview</a> |
|
||||
<a href="a2b.php">Send troops</a> |
|
||||
<a href="warsim.php">Combat Simulator</a> <?php if($session->goldclub==1){ ?>|
|
||||
<a href="build.php?id=<?php echo $id; ?>&t=99">Gold Club</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<a href="build.php?id=<?php echo $id; ?>"><?php echo OVERVIEW;?></a> |
|
||||
<a href="a2b.php"><?php echo SEND_TROOPS;?></a> |
|
||||
<a href="warsim.php"><?php echo Q20_RESP1;?></a> <?php if($session->goldclub==1){ ?>|
|
||||
<a href="build.php?id=<?php echo $id; ?>&t=99">Gold Club</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php
|
||||
$units_type = $database->getMovement("34",$village->wid,1);
|
||||
$settlers = $database->getMovement("7",$village->wid,1);
|
||||
@@ -22,108 +22,106 @@ $oasis_incoming += count($database->getMovement(6,$conqured['wref'],0));
|
||||
$units_incoming = count($units_type);
|
||||
$settlers_incoming = count($settlers);
|
||||
for($i=0;$i<$units_incoming;$i++){
|
||||
if($units_type[$i]['attack_type'] == 1 && $units_type[$i]['sort_type'] == 3)
|
||||
$units_incoming -= 1;
|
||||
if($units_type[$i]['attack_type'] == 1 && $units_type[$i]['sort_type'] == 3)
|
||||
$units_incoming -= 1;
|
||||
}
|
||||
if($units_incoming > 0 or $settlers_incoming > 0 or $oasis_incoming > 0){
|
||||
?>
|
||||
<h4>Incoming troops (<?php echo $units_incoming+$settlers_incoming+$oasis_incoming; ?>)</h4>
|
||||
<?php include("16_incomming.tpl");
|
||||
}
|
||||
<h4><?php echo INCOMING_TROOPS;?> (<?php echo $units_incoming+$settlers_incoming+$oasis_incoming; ?>)</h4>
|
||||
<?php include("16_incomming.tpl");
|
||||
}
|
||||
?>
|
||||
|
||||
<h4>Troops in the village</h4>
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="role"><a href="karte.php?d=<?php echo $village->wid."&c=".$generator->getMapCheck($village->wid); ?>"><?php echo $village->vname; ?></a></td><td colspan="<?php if($village->unitarray['hero'] == 0) {echo"10";}else{echo"11";}?>">
|
||||
<a href="spieler.php?uid=<?php echo $session->uid; ?>">Own troops</a></td></tr></thead>
|
||||
<tbody class="units">
|
||||
<?php include("16_troops.tpl");
|
||||
|
||||
?>
|
||||
</tbody></table>
|
||||
|
||||
<?php
|
||||
if(count($village->enforcetome) > 0) {
|
||||
|
||||
<h4><?php echo TROOPS_IN_THE_VILLAGE;?></h4>
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="role"><a href="karte.php?d=<?php echo $village->wid."&c=".$generator->getMapCheck($village->wid); ?>"><?php echo $village->vname; ?></a></td><td colspan="<?php if($village->unitarray['hero'] == 0) {echo"10";}else{echo"11";}?>">
|
||||
<a href="spieler.php?uid=<?php echo $session->uid; ?>"><?php echo OWN_TROOPS;?></a></td></tr></thead>
|
||||
<tbody class="units">
|
||||
<?php include("16_troops.tpl");
|
||||
?>
|
||||
</tbody></table>
|
||||
<?php
|
||||
if(count($village->enforcetome) > 0) {
|
||||
foreach($village->enforcetome as $enforce) {
|
||||
$colspan = 10+$enforce['hero'];
|
||||
if($enforce['from']!=0){
|
||||
$colspan = 10+$enforce['hero'];
|
||||
if($enforce['from']!=0){
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a href=\"karte.php?d=".$enforce['from']."&c=".$generator->getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'],"name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'],"owner")."\">".$database->getUserField($database->getVillageField($enforce['from'],"owner"),"username",0)." troops</a>";
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
<a href=\"karte.php?d=".$enforce['from']."&c=".$generator->getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'],"name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
if (LANG == "es") {
|
||||
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'],"owner")."\">".TROOPSFROM." ".$database->getUserField($database->getVillageField($enforce['from'],"owner"),"username",0)." </a>";
|
||||
}else{ echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'],"owner")."\">".$database->getUserField($database->getVillageField($enforce['from'],"owner"),"username",0)." ".TROOPSFROM."</a>";
|
||||
|
||||
}
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = $database->getUserField($database->getVillageField($enforce['from'],"owner"),"tribe",0);
|
||||
$start = ($tribe-1)*10+1;
|
||||
$end = ($tribe*10);
|
||||
echo "<tr><th> </th>";
|
||||
for($i=$start;$i<=($end);$i++) {
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
if($enforce['hero']!=0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>Troops</th>";
|
||||
for($i=$start;$i<=($start+9);$i++) {
|
||||
if($enforce['hero']!=0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i=$start;$i<=($start+9);$i++) {
|
||||
if($enforce['u'.$i] == 0) {
|
||||
echo "<td class=\"none\">";
|
||||
echo "<td class=\"none\">";
|
||||
}
|
||||
else {
|
||||
else {
|
||||
echo "<td>";
|
||||
}
|
||||
echo $enforce['u'.$i]."</td>";
|
||||
}
|
||||
if($enforce['hero']!=0){
|
||||
echo "<td>".$enforce['hero']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>Upkeep</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />per hour</div><div class='sback'><a href='a2b.php?w=".$enforce['id']."'>Send back</a></div></td></tr>";
|
||||
|
||||
echo "</tbody></table>";
|
||||
}else{
|
||||
echo $enforce['u'.$i]."</td>";
|
||||
}
|
||||
if($enforce['hero']!=0){
|
||||
echo "<td>".$enforce['hero']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>".UPKEEP."</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />".PER_HR."</div><div class='sback'><a href='a2b.php?w=".$enforce['id']."'>".SEND_BACK."</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}else{
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a>Taskmaster</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a> village of the elders troops</a>";
|
||||
<a>".TASKMASTER."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a> ".VILLAGE_OF_THE_ELDERS_TROOPS."</a>";
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = 4;
|
||||
$start = ($tribe-1)*10+1;
|
||||
$end = ($tribe*10);
|
||||
echo "<tr><th> </th>";
|
||||
for($i=$start;$i<=($end);$i++) {
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
if($enforce['hero']!=0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>Troops</th>";
|
||||
for($i=$start;$i<=($start+9);$i++) {
|
||||
if($enforce['hero']!=0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i=$start;$i<=($start+9);$i++) {
|
||||
if($enforce['u'.$i] == 0) {
|
||||
echo "<td class=\"none\">";
|
||||
echo "<td class=\"none\">";
|
||||
}
|
||||
else {
|
||||
else {
|
||||
echo "<td>";
|
||||
}
|
||||
echo $enforce['u'.$i]."</td>";
|
||||
}
|
||||
if($enforce['hero']!=0){
|
||||
echo "<td>".$enforce['hero']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>Upkeep</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />per hour</div><div class='sback'><span class=none><b>Send back</b></span></div></td></tr>";
|
||||
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
}
|
||||
$enforcevill = array();
|
||||
$enforceoasis = array();
|
||||
|
||||
$allenforce=$village->enforcetoyou;
|
||||
$enforcemeoasis=$village->enforceoasis;
|
||||
|
||||
if(count($allenforce) > 0) {
|
||||
echo $enforce['u'.$i]."</td>";
|
||||
}
|
||||
if($enforce['hero']!=0){
|
||||
echo "<td>".$enforce['hero']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>".UPKEEP."</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />".PER_HR."</div><div class='sback'><span class=none><b>".SEND_BACK."</b></span></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
}
|
||||
$enforcevill = array();
|
||||
$enforceoasis = array();
|
||||
$allenforce=$village->enforcetoyou;
|
||||
$enforcemeoasis=$village->enforceoasis;
|
||||
if(count($allenforce) > 0) {
|
||||
foreach($allenforce as $enforce) {
|
||||
$conquredvid=$database->getOasisField($enforce['vref'], "conqured");
|
||||
if ($conquredvid>0) {
|
||||
@@ -132,180 +130,180 @@ if($units_incoming > 0 or $settlers_incoming > 0 or $oasis_incoming > 0){
|
||||
} else {
|
||||
array_push($enforcevill,$enforce);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(count($enforcemeoasis) > 0) {
|
||||
}
|
||||
}
|
||||
if(count($enforcemeoasis) > 0) {
|
||||
foreach($enforcemeoasis as $enforce) {
|
||||
array_push($enforceoasis,$enforce);
|
||||
}
|
||||
}
|
||||
|
||||
if (count($enforcevill)>0) {
|
||||
echo "<h4>Troops in other village</h4>";
|
||||
}
|
||||
}
|
||||
if (count($enforcevill)>0) {
|
||||
echo "<h4>".TROOPS_IN_OTHER_VILLAGE."</h4>";
|
||||
foreach($enforcevill as $enforce) {
|
||||
$colspan = 10+$enforce['hero'];
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a href=\"karte.php?d=".$enforce['vref']."&c=".$generator->getMapCheck($enforce['vref'])."\">".$database->getVillageField($enforce['vref'],"name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'],"owner")."\">".$database->getUserField($database->getVillageField($enforce['from'],"owner"),"username",0)." troops</a>";
|
||||
<a href=\"karte.php?d=".$enforce['vref']."&c=".$generator->getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'],"name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a href=\"karte.php?d=".$enforce['vref']."&c=".$generator->getMapCheck($enforce['vref'])."\">".REINFORCEMENTFOR." ".$database->getVillageField($enforce['vref'],"name")." </a>";
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = $database->getUserField($database->getVillageField($enforce['from'],"owner"),"tribe",0);
|
||||
$start = ($tribe-1)*10+1;
|
||||
$end = ($tribe*10);
|
||||
echo "<tr><th> </th>";
|
||||
for($i=$start;$i<=($end);$i++) {
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
if($enforce['hero']!=0){
|
||||
if($enforce['hero']!=0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>Troops</th>";
|
||||
for($i=$start;$i<=($start+9);$i++) {
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i=$start;$i<=($start+9);$i++) {
|
||||
if($enforce['u'.$i] == 0) {
|
||||
echo "<td class=\"none\">";
|
||||
}
|
||||
else {
|
||||
else {
|
||||
echo "<td>";
|
||||
}
|
||||
echo $enforce['u'.$i]."</td>";
|
||||
}
|
||||
if($enforce['hero']!=0){
|
||||
echo $enforce['u'.$i]."</td>";
|
||||
}
|
||||
if($enforce['hero']!=0){
|
||||
echo "<td>".$enforce['hero']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>Upkeep</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />per hour</div><div class='sback'><a href='a2b.php?r=".$enforce['id']."'>Send back</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
if(count($enforceoasis) > 0) {
|
||||
echo "<h4>Troops in oasis</h4>";
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>".UPKEEP."</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />".PER_HR."</div><div class='sback'><a href='a2b.php?r=".$enforce['id']."'>".SEND_BACK."</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
if(count($enforceoasis) > 0) {
|
||||
echo "<h4>".TROOPS_IN_OASIS."</h4>";
|
||||
foreach($enforceoasis as $enforce) {
|
||||
$colspan = 10+$enforce['hero'];
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a href=\"karte.php?d=".$enforce['vref']."&c=".$generator->getMapCheck($enforce['vref'])."\">".$database->getVillageField($enforce['conqured'],"name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'],"owner")."\">".$database->getUserField($database->getVillageField($enforce['from'],"owner"),"username",0)." troops</a> from <a href=\"karte.php?d=".$enforce['from']."&c=".$generator->getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'],"name")."</a>";
|
||||
<a href=\"karte.php?d=".$enforce['vref']."&c=".$generator->getMapCheck($enforce['vref'])."\">".$database->getVillageField($enforce['conqured'],"name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
if (LANG == "es") {
|
||||
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'],"owner")."\">".TROOPSFROM." ".$database->getUserField($database->getVillageField($enforce['from'],"owner"),"username",0)." </a> ".FROM." <a href=\"karte.php?d=".$enforce['from']."&c=".$generator->getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'],"name")."</a>";
|
||||
}else{ echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'],"owner")."\">".$database->getUserField($database->getVillageField($enforce['from'],"owner"),"username",0)." ".TROOPSFROM."</a> ".FROM." <a href=\"karte.php?d=".$enforce['from']."&c=".$generator->getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'],"name")."</a>";
|
||||
}
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = $database->getUserField($database->getVillageField($enforce['from'],"owner"),"tribe",0);
|
||||
$start = ($tribe-1)*10+1;
|
||||
$end = ($tribe*10);
|
||||
echo "<tr><th> </th>";
|
||||
for($i=$start;$i<=($end);$i++) {
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
if($enforce['hero']!=0){
|
||||
if($enforce['hero']!=0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>Troops</th>";
|
||||
for($i=$start;$i<=($start+9);$i++) {
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i=$start;$i<=($start+9);$i++) {
|
||||
if($enforce['u'.$i] == 0) {
|
||||
echo "<td class=\"none\">";
|
||||
}
|
||||
else {
|
||||
else {
|
||||
echo "<td>";
|
||||
}
|
||||
echo $enforce['u'.$i]."</td>";
|
||||
}
|
||||
if($enforce['hero']!=0){
|
||||
echo $enforce['u'.$i]."</td>";
|
||||
}
|
||||
if($enforce['hero']!=0){
|
||||
echo "<td>".$enforce['hero']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>Upkeep</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />per hour</div><div class='sback'><a href='a2b.php?r=".$enforce['id']."'>Send back</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
if(count($database->getPrisoners3($village->wid)) > 0) {
|
||||
echo "<h4>Prisoners</h4>";
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>".UPKEEP."</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />".PER_HR."</div><div class='sback'><a href='a2b.php?r=".$enforce['id']."'>".SEND_BACK."</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
if(count($database->getPrisoners3($village->wid)) > 0) {
|
||||
echo "<h4>".PRISONERS."</h4>";
|
||||
foreach($database->getPrisoners3($village->wid) as $prisoners) {
|
||||
$colspan = 10+$prisoners['t11'];
|
||||
$colspan = 10+$prisoners['t11'];
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a href=\"karte.php?d=".$prisoners['wref']."&c=".$generator->getMapCheck($prisoners['wref'])."\">".$database->getVillageField($prisoners['wref'],"name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a href=\"karte.php?d=".$prisoners['wref']."&c=".$generator->getMapCheck($prisoners['wref'])."\">prisoners in ".$database->getVillageField($prisoners['wref'],"name")."</a>";
|
||||
<a href=\"karte.php?d=".$prisoners['wref']."&c=".$generator->getMapCheck($prisoners['wref'])."\">".$database->getVillageField($prisoners['wref'],"name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a href=\"karte.php?d=".$prisoners['wref']."&c=".$generator->getMapCheck($prisoners['wref'])."\">".PRISONERSIN." ".$database->getVillageField($prisoners['wref'],"name")."</a>";
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = $database->getUserField($database->getVillageField($prisoners['from'],"owner"),"tribe",0);
|
||||
$start = ($tribe-1)*10+1;
|
||||
$end = ($tribe*10);
|
||||
echo "<tr><th> </th>";
|
||||
for($i=$start;$i<=($end);$i++) {
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
if($prisoners['t11']!=0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>Troops</th>";
|
||||
for($i=1;$i<=10;$i++) {
|
||||
if($prisoners['t11']!=0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i=1;$i<=10;$i++) {
|
||||
if($prisoners['t'.$i] == 0) {
|
||||
echo "<td class=\"none\">";
|
||||
echo "<td class=\"none\">";
|
||||
}
|
||||
else {
|
||||
else {
|
||||
echo "<td>";
|
||||
}
|
||||
echo $prisoners['t'.$i]."</td>";
|
||||
}
|
||||
if($prisoners['t11']!=0){
|
||||
echo "<td>".$prisoners['t11']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>Upkeep</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($prisoners,$tribe,0,1)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />per hour</div><div class='sback'><a href='a2b.php?delprisoners=".$prisoners['id']."'>Kill</a></div></td></tr>";
|
||||
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
if(count($database->getPrisoners($village->wid)) > 0) {
|
||||
echo "<h4>Prisoners</h4>";
|
||||
echo $prisoners['t'.$i]."</td>";
|
||||
}
|
||||
if($prisoners['t11']!=0){
|
||||
echo "<td>".$prisoners['t11']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>".UPKEEP."</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($prisoners,$tribe,0,1)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />".PER_HR."</div><div class='sback'><a href='a2b.php?delprisoners=".$prisoners['id']."'>".KILL."</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
if(count($database->getPrisoners($village->wid)) > 0) {
|
||||
echo "<h4>".PRISONERS."</h4>";
|
||||
foreach($database->getPrisoners($village->wid) as $prisoners) {
|
||||
$colspan = 10+$prisoners['t11'];
|
||||
$colspan2 = 11+$prisoners['t11'];
|
||||
$colspan = 10+$prisoners['t11'];
|
||||
$colspan2 = 11+$prisoners['t11'];
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a href=\"karte.php?d=".$prisoners['from']."&c=".$generator->getMapCheck($prisoners['from'])."\">".$database->getVillageField($prisoners['from'],"name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a href=\"karte.php?d=".$prisoners['from']."&c=".$generator->getMapCheck($prisoners['from'])."\">prisoners from ".$database->getVillageField($prisoners['from'],"name")."</a>";
|
||||
<a href=\"karte.php?d=".$prisoners['from']."&c=".$generator->getMapCheck($prisoners['from'])."\">".$database->getVillageField($prisoners['from'],"name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a href=\"karte.php?d=".$prisoners['from']."&c=".$generator->getMapCheck($prisoners['from'])."\">".PRISONERSFROM." ".$database->getVillageField($prisoners['from'],"name")."</a>";
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = $database->getUserField($database->getVillageField($prisoners['from'],"owner"),"tribe",0);
|
||||
$start = ($tribe-1)*10+1;
|
||||
$end = ($tribe*10);
|
||||
echo "<tr><th> </th>";
|
||||
for($i=$start;$i<=($end);$i++) {
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
if($prisoners['t11']!=0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>Troops</th>";
|
||||
for($i=1;$i<=10;$i++) {
|
||||
if($prisoners['t11']!=0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i=1;$i<=10;$i++) {
|
||||
if($prisoners['t'.$i] == 0) {
|
||||
echo "<td class=\"none\">";
|
||||
echo "<td class=\"none\">";
|
||||
}
|
||||
else {
|
||||
else {
|
||||
echo "<td>";
|
||||
}
|
||||
echo $prisoners['t'.$i]."</td>";
|
||||
}
|
||||
if($prisoners['t11']!=0){
|
||||
echo "<td>".$prisoners['t11']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><td colspan=\"11\"><div class='sup'><img class=\"r6\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" /></div><div class='sback'><a href='a2b.php?delprisoners=".$prisoners['id']."'>Send Back</a></div></td></tr>";
|
||||
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
echo $prisoners['t'.$i]."</td>";
|
||||
}
|
||||
if($prisoners['t11']!=0){
|
||||
echo "<td>".$prisoners['t11']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><td colspan=\"11\"><div class='sup'><img class=\"r6\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" /></div><div class='sback'><a href='a2b.php?delprisoners=".$prisoners['id']."'>".SEND_BACK."</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
$units_type = $database->getMovement("3",$village->wid,0);
|
||||
$settlers = $database->getMovement("5",$village->wid,0);
|
||||
$units_incoming = count($units_type);
|
||||
for($i=0;$i<$units_incoming;$i++){
|
||||
if($units_type[$i]['vref'] != $village->wid)
|
||||
$units_incoming -= 1;
|
||||
if($units_type[$i]['vref'] != $village->wid)
|
||||
$units_incoming -= 1;
|
||||
}
|
||||
$units_incoming += count($settlers);
|
||||
|
||||
if($units_incoming >= 1){
|
||||
echo "<h4>Troops on their way</h4>";
|
||||
include("16_walking.tpl");
|
||||
echo "<h4>".TROOPS_ON_THEIR_WAY."</h4>";
|
||||
include("16_walking.tpl");
|
||||
}
|
||||
|
||||
include("upgrade.tpl");
|
||||
|
||||
@@ -15,9 +15,11 @@ $res = mysql_fetch_array($res1);
|
||||
$timer = $y+1;
|
||||
if ($units[$y]['sort_type']==3){
|
||||
if ($units[$y]['attack_type']==3){
|
||||
$actionType = "Attack on ";
|
||||
$actionType = ATTACK_ON;
|
||||
} else if ($units[$y]['attack_type']==4){
|
||||
$actionType = "Raid on ";
|
||||
$actionType = RAID_ON;
|
||||
} else if ($units[$y]['attack_type']==2){
|
||||
$actionType = REINFORCEMENTFOR;
|
||||
}
|
||||
$reinfowner = $database->getVillageField($units[$y]['from'],"owner");
|
||||
if($units[$y]['attack_type'] != 1){
|
||||
@@ -30,7 +32,7 @@ if ($units[$y]['sort_type']==3){
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a href=\"karte.php?d=".$units[$y]['from']."&c=".$generator->getMapCheck($units[$y]['from'])."\">".$database->getVillageField($units[$y]['from'],"name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a href=\"spieler.php?uid=".$database->getVillageField($units[$y]['from'],"owner")."\">".$database->getUserField($database->getVillageField($units[$y]['from'],"owner"),"username",0)."'s troops</a>";
|
||||
echo "<a href=\"karte.php?d=".$units[$y]['to']."&c=".$generator->getMapCheck($units[$y]['to'])."\">".$actionType." ".$database->getVillageField($units[$y]['to'],"name")."</a>";
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = $database->getUserField($database->getVillageField($units[$y]['from'],"owner"),"tribe",0);
|
||||
$start = ($tribe-1)*10+1;
|
||||
@@ -42,7 +44,7 @@ if ($units[$y]['sort_type']==3){
|
||||
if($units[$y]['t11'] != 0 && $reinfowner == $session->uid) {
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>Troops</th>";
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i=1;$i<=$colspan;$i++) {
|
||||
$totalunits = $units[$y]['t1']+$units[$y]['t2']+$units[$y]['t3']+$units[$y]['t4']+$units[$y]['t5']+$units[$y]['t6']+$units[$y]['t7']+$units[$y]['t8']+$units[$y]['t9']+$units[$y]['t10']+$units[$y]['t11'];
|
||||
if($units[$y]['attack_type'] == 2){
|
||||
@@ -63,7 +65,7 @@ if ($units[$y]['sort_type']==3){
|
||||
$artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,3,1,1));
|
||||
$artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,3,2,0));
|
||||
$total_artefact = $artefact + $artefact1 + $artefact2;
|
||||
if($totalunits > $building->getTypeLevel(16) && $total_artefact == 0){
|
||||
if($total_artefact == 0){
|
||||
echo "<td class=\"none\">?</td>";
|
||||
}else{
|
||||
if($units[$y]['t'.$i] == 0) {
|
||||
@@ -78,15 +80,15 @@ if ($units[$y]['sort_type']==3){
|
||||
echo '
|
||||
<tbody class="infos">
|
||||
<tr>
|
||||
<th>Arrival</th>
|
||||
<th>'.ARRIVAL.'</th>
|
||||
<td colspan="10">
|
||||
<div class="in small"><span id=timer'.$timer.'>'.$generator->getTimeFormat($units[$y]['endtime']-time()).'</span> h</div>';
|
||||
$datetime = $generator->procMtime($units[$y]['endtime']);
|
||||
echo "<div class=\"at small\">";
|
||||
if($datetime[0] != "today") {
|
||||
echo "on ".$datetime[0]." ";
|
||||
echo "".ON." ".$datetime[0]." ";
|
||||
}
|
||||
echo "at ".$datetime[1]." hours</div>
|
||||
echo "".AT." ".$datetime[1]." ".HRS."</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -105,7 +107,7 @@ if ($units[$y]['sort_type']==3){
|
||||
for($i=$start;$i<=($end);$i++) {
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>Troops</th>";
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i=1;$i<=10;$i++) {
|
||||
echo "<td class=\"none\">?</td>";
|
||||
}
|
||||
@@ -113,15 +115,15 @@ if ($units[$y]['sort_type']==3){
|
||||
echo '
|
||||
<tbody class="infos">
|
||||
<tr>
|
||||
<th>Arrival</th>
|
||||
<th>'.ARRIVAL.'</th>
|
||||
<td colspan="10">
|
||||
<div class="in small"><span id=timer'.$timer.'>'.$generator->getTimeFormat($units[$y]['endtime']-time()).'</span> h</div>';
|
||||
$datetime = $generator->procMtime($units[$y]['endtime']);
|
||||
echo "<div class=\"at small\">";
|
||||
if($datetime[0] != "today") {
|
||||
echo "on ".$datetime[0]." ";
|
||||
echo "".ON." ".$datetime[0]." ";
|
||||
}
|
||||
echo "at ".$datetime[1]."</div>
|
||||
echo "".AT." ".$datetime[1]."</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -131,15 +133,19 @@ if ($units[$y]['sort_type']==3){
|
||||
}
|
||||
}else if ($units[$y]['sort_type']==4){
|
||||
if ($units[$y]['attack_type']==1){
|
||||
$actionType = "Return from ";
|
||||
$actionType = RETURNFROM;
|
||||
} else if ($units[$y]['attack_type']==2){
|
||||
$actionType = "Reinforcement for ";
|
||||
$actionType = RETURNFROM;
|
||||
} else if ($units[$y]['attack_type']==3){
|
||||
$actionType = "Return from ";
|
||||
$actionType = RETURNFROM;
|
||||
} else if ($units[$y]['attack_type']==4){
|
||||
$actionType = "Return from ";
|
||||
$actionType = RETURNFROM;
|
||||
}
|
||||
|
||||
$isoasis = $database->isVillageOases($units[$y]['from']);
|
||||
if ($isoasis ==0){
|
||||
$from = $database->getMInfo($units[$y]['from']);
|
||||
} else {
|
||||
$from = $database->getOMInfo($units[$y]['from']);}
|
||||
|
||||
$to = $database->getMInfo($units[$y]['vref']);
|
||||
?>
|
||||
@@ -147,7 +153,7 @@ $to = $database->getMInfo($units[$y]['vref']);
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="role"><a href="karte.php?d=<?php echo $village->wid."&c=".$generator->getMapCheck($village->wid); ?>"><?php echo $village->vname; ?></a></td>
|
||||
<td colspan="<?php if($units[$y]['t11'] != 0) {echo"11";}else{echo"10";}?>"><a href="karte.php?d=<?php echo $to['wref']."&c=".$generator->getMapCheck($to['wref']); ?>"><?php echo "Returning to ".$to['name']; ?></a></td>
|
||||
<td colspan="<?php if($units[$y]['t11'] != 0) {echo"11";}else{echo"10";}?>"><a href="karte.php?d=<?php echo $from['wref']."&c=".$generator->getMapCheck($from['wref']); ?>"><?php echo $actionType." ".$from['name']; ?></a></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="units">
|
||||
@@ -164,7 +170,7 @@ $to = $database->getMInfo($units[$y]['vref']);
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr><th>Troops</th>
|
||||
<tr><th><?php echo TROOPS;?></th>
|
||||
<?php
|
||||
for($i=1;$i<($units[$y]['t11'] != 0?12:11);$i++) {
|
||||
if($units[$y]['t'.$i] == 0) {
|
||||
@@ -180,7 +186,7 @@ $to = $database->getMInfo($units[$y]['vref']);
|
||||
<?php
|
||||
$totalres = $res['wood']+$res['clay']+$res['iron']+$res['crop'];
|
||||
if($units[$y]['attack_type']!=2 and $units[$y]['attack_type']!=1 and $totalres != ""){?>
|
||||
<tr><th>Bounty</th>
|
||||
<tr><th><?php echo BOUNTY;?></th>
|
||||
|
||||
<td colspan="<?php if($units[$y]['t11'] == 0) {echo"10";}else{echo"11";}?>">
|
||||
<?php
|
||||
@@ -193,16 +199,16 @@ $to = $database->getMInfo($units[$y]['vref']);
|
||||
|
||||
<tbody class="infos">
|
||||
<tr>
|
||||
<th>Arrival</th>
|
||||
<th><?php echo ARRIVAL;?></th>
|
||||
<td colspan="<?php if($units[$y]['t11'] == 0) {echo"10";}else{echo"11";}?>">
|
||||
<?php
|
||||
echo "<div class=\"in small\"><span id=timer".$timer.">".$generator->getTimeFormat($units[$y]['endtime']-time())."</span> h</div>";
|
||||
$datetime = $generator->procMtime($units[$y]['endtime']);
|
||||
echo "<div class=\"at small\">";
|
||||
echo "<div class=\"at\">";
|
||||
if($datetime[0] != "today") {
|
||||
echo "on ".$datetime[0]." ";
|
||||
echo "".ON." ".$datetime[0]." ";
|
||||
}
|
||||
echo "at ".$datetime[1]."</div>";
|
||||
echo "".AT." ".$datetime[1]."</div>";
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
@@ -219,11 +225,11 @@ $total_for = count($oasis);
|
||||
for($y=0;$y < $total_for;$y++){
|
||||
$timer = $y+1;
|
||||
if ($oasis[$y]['attack_type']==2){
|
||||
$actionType = "Reinforcement for ";
|
||||
$actionType = REINFORCEMENTFOR;
|
||||
} else if ($oasis[$y]['attack_type']==3){
|
||||
$actionType = "Attack on ";
|
||||
$actionType = ATTACK_ON;
|
||||
} else if ($oasis[$y]['attack_type']==4){
|
||||
$actionType = "Raid on ";
|
||||
$actionType = RAID_ON;
|
||||
}
|
||||
$reinfowner = $database->getVillageField($oasis[$y]['from'],"owner");
|
||||
if($oasis[$y]['t11'] != 0 && $reinfowner == $session->uid) {
|
||||
@@ -234,7 +240,7 @@ $timer = $y+1;
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a href=\"karte.php?d=".$oasis[$y]['from']."&c=".$generator->getMapCheck($oasis[$y]['from'])."\">".$database->getVillageField($oasis[$y]['from'],"name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a href=\"spieler.php?uid=".$database->getVillageField($oasis[$y]['from'],"owner")."\">".$database->getUserField($database->getVillageField($oasis[$y]['from'],"owner"),"username",0)."'s troops</a>";
|
||||
echo "<a href=\"spieler.php?uid=".$database->getVillageField($oasis[$y]['from'],"owner")."\">".$database->getUserField($database->getVillageField($oasis[$y]['from'],"owner"),"username",0)."'s troopslll</a>";
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = $database->getUserField($database->getVillageField($oasis[$y]['from'],"owner"),"tribe",0);
|
||||
$start = ($tribe-1)*10+1;
|
||||
@@ -246,7 +252,7 @@ $timer = $y+1;
|
||||
if($oasis[$y]['t11'] != 0 && $reinfowner == $session->uid) {
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>Troops</th>";
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i=1;$i<=$colspan;$i++) {
|
||||
$totalunits = $oasis[$y]['t1']+$oasis[$y]['t2']+$oasis[$y]['t3']+$oasis[$y]['t4']+$oasis[$y]['t5']+$oasis[$y]['t6']+$oasis[$y]['t7']+$oasis[$y]['t8']+$oasis[$y]['t9']+$oasis[$y]['t10']+$oasis[$y]['t11'];
|
||||
if($oasis[$y]['attack_type'] == 2){
|
||||
@@ -282,15 +288,15 @@ $timer = $y+1;
|
||||
echo '
|
||||
<tbody class="infos">
|
||||
<tr>
|
||||
<th>Arrival</th>
|
||||
<th>'.ARRIVAL.'</th>
|
||||
<td colspan="'.$colspan.'">
|
||||
<div class="in small"><span id=timer'.$timer.'>'.$generator->getTimeFormat($oasis[$y]['endtime']-time()).'</span> h</div>';
|
||||
$datetime = $generator->procMtime($oasis[$y]['endtime']);
|
||||
echo "<div class=\"at small\">";
|
||||
echo "<div class=\"at\">";
|
||||
if($datetime[0] != "today") {
|
||||
echo "on ".$datetime[0]." ";
|
||||
echo "".ON." ".$datetime[0]." ";
|
||||
}
|
||||
echo "at ".$datetime[1]." hours</div>
|
||||
echo "".AT." ".$datetime[1]." ".HRS."</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -309,7 +315,7 @@ $to = $database->getMInfo($settlers[$x]['to']);
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="role"><a href="karte.php?d=<?php echo $village->wid."&c=".$generator->getMapCheck($village->wid); ?>"><?php echo $village->vname; ?></a></td>
|
||||
<td colspan="10"><a href="karte.php?d=<?php echo $to['wref']."&c=".$generator->getMapCheck($to['wref']); ?>"><?php echo "Returning to ".$to['name']; ?></a></td>
|
||||
<td colspan="10"><a href="karte.php?d=<?php echo $from['wref']."&c=".$generator->getMapCheck($from['wref']); ?>"><?php echo $actionType." ".$from['name']; ?></a></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="units">
|
||||
@@ -323,7 +329,7 @@ $to = $database->getMInfo($settlers[$x]['to']);
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr><th>Troops</th>
|
||||
<tr><th><?php echo TROOPS;?></th>
|
||||
<?php
|
||||
for($z=1;$z<=9;$z++) {
|
||||
$settlers[$x]['t'.$z]=0;
|
||||
@@ -343,20 +349,20 @@ $to = $database->getMInfo($settlers[$x]['to']);
|
||||
|
||||
<tbody class="infos">
|
||||
<tr>
|
||||
<th>Arrival</th>
|
||||
<th><?php echo ARRIVAL;?></th>
|
||||
<td colspan="10">
|
||||
<?php
|
||||
echo "<div class=\"in small\"><span id=timer".$timer.">".$generator->getTimeFormat($settlers[$x]['endtime']-time())."</span> h</div>";
|
||||
$datetime = $generator->procMtime($settlers[$x]['endtime']);
|
||||
echo "<div class=\"at small\">";
|
||||
echo "<div class=\"at\">";
|
||||
if($datetime[0] != "today") {
|
||||
echo "on ".$datetime[0]." ";
|
||||
echo "".ON." ".$datetime[0]." ";
|
||||
}
|
||||
echo "at ".$datetime[1]."</div>";
|
||||
echo "".AT." ".$datetime[1]."</div>";
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
}
|
||||
|
||||
?>
|
||||
</tr><tr><th>Troops</th>
|
||||
</tr><tr><th><?php echo TROOPS;?></th>
|
||||
<?php
|
||||
for($i=$start;$i<=$end;$i++) {
|
||||
if($village->unitarray['u'.$i] == 0) {
|
||||
@@ -30,5 +30,5 @@
|
||||
|
||||
?>
|
||||
</tr></tbody>
|
||||
<tbody class="infos"><tr><th>Upkeep</th>
|
||||
<td colspan="<?php if($village->unitarray['hero'] == 0) {echo"10";}else{echo"11";}?>"><?php echo $technology->getUpkeep($village->unitarray,0); ?><img class="r4" src="img/x.gif" title="Crop" alt="Crop" />per hour</td></tr>
|
||||
<tbody class="infos"><tr><th><?php echo UPKEEP;?></th>
|
||||
<td colspan="<?php if($village->unitarray['hero'] == 0) {echo"10";}else{echo"11";}?>"><?php echo $technology->getUpkeep($village->unitarray,0); ?><img class="r4" src="img/x.gif" title="Crop" alt="Crop" /><?php echo PER_HR;?></td></tr>
|
||||
|
||||
@@ -6,16 +6,16 @@ for($y=0;$y<$total_for;$y++){
|
||||
$timer += 1;
|
||||
|
||||
if($units[$y]['attack_type'] == 2){
|
||||
$attack_type = "Reinforcing";
|
||||
$attack_type = REINFORCEMENTFOR;
|
||||
}
|
||||
if($units[$y]['attack_type'] == 1){
|
||||
$attack_type = "Scouting";
|
||||
$attack_type = SCOUTING;
|
||||
}
|
||||
if($units[$y]['attack_type'] == 3){
|
||||
$attack_type = "Attack to";
|
||||
$attack_type = ATTACK_ON;
|
||||
}
|
||||
if($units[$y]['attack_type'] == 4){
|
||||
$attack_type = "Raid to";
|
||||
$attack_type = RAID_ON;
|
||||
}
|
||||
$isoasis = $database->isVillageOases($units[$y]['to']);
|
||||
if ($isoasis ==0){
|
||||
@@ -41,7 +41,7 @@ $to = $database->getOMInfo($units[$y]['to']);}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr><th>Troops</th>
|
||||
<tr><th><?php echo TROOPS;?></th>
|
||||
<?php
|
||||
if($units[$y]['t11'] != 0) {
|
||||
$end = 12;
|
||||
@@ -61,16 +61,16 @@ $to = $database->getOMInfo($units[$y]['to']);}
|
||||
</tr></tbody>
|
||||
<tbody class="infos">
|
||||
<tr>
|
||||
<th>Arrival</th>
|
||||
<th><?php echo ARRIVAL;?></th>
|
||||
<td colspan="<?php if($units[$y]['t11'] == 0) {echo"10";}else{echo"11";}?>">
|
||||
<?php
|
||||
echo "<div class=\"in small\"><span id=timer$timer>".$generator->getTimeFormat($units[$y]['endtime']-time())."</span> h</div>";
|
||||
$datetime = $generator->procMtime($units[$y]['endtime']);
|
||||
echo "<div class=\"at small\">";
|
||||
echo "<div class=\"at\">";
|
||||
if($datetime[0] != "today") {
|
||||
echo "on ".$datetime[0]." ";
|
||||
echo "".ON." ".$datetime[0]." ";
|
||||
}
|
||||
echo "at ".$datetime[1]."</div>";
|
||||
echo "".AT." ".$datetime[1]."</div>";
|
||||
if (($units[$y]['starttime']+90)>time()){
|
||||
?>
|
||||
<div class="abort"><a href="build.php?id=<?php echo $_GET['id']."&mode=troops&cancel=1&moveid=".$units[$y]['moveid']; ?>"><img src="img/x.gif" class="del" /></a></div>
|
||||
@@ -97,7 +97,7 @@ $timer += 1;
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="role"><a href="karte.php?d=<?php echo $village->wid."&c=".$generator->getMapCheck($village->wid); ?>"><?php echo $village->vname; ?></a></td>
|
||||
<td colspan="10"><a href="karte.php?d=<?php echo $settlers[$y]['to']."&c=".$generator->getMapCheck($settlers[$y]['to']); ?>">Found new village</a></td>
|
||||
<td colspan="10"><a href="karte.php?d=<?php echo $settlers[$y]['to']."&c=".$generator->getMapCheck($settlers[$y]['to']); ?>"><?php echo FOUNDNEWVILLAGE;?></a></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="units">
|
||||
@@ -111,7 +111,7 @@ $timer += 1;
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr><th>Troops</th>
|
||||
<tr><th><?php echo TROOPS;?></th>
|
||||
<?php
|
||||
for($x=1;$x<=9;$x++) {
|
||||
$units[$y]['t'.$x]=0;
|
||||
@@ -130,16 +130,16 @@ $timer += 1;
|
||||
</tr></tbody>
|
||||
<tbody class="infos">
|
||||
<tr>
|
||||
<th>Arrival</th>
|
||||
<th><?php echo ARRIVAL;?></th>
|
||||
<td colspan="<?php if($units[$y]['t11'] == 0) {echo"10";}else{echo"11";}?>">
|
||||
<?php
|
||||
echo "<div class=\"in small\"><span id=timer$timer>".$generator->getTimeFormat($settlers[$y]['endtime']-time())."</span> h</div>";
|
||||
$datetime = $generator->procMtime($settlers[$y]['endtime']);
|
||||
echo "<div class=\"at small\">";
|
||||
if($datetime[0] != "today") {
|
||||
echo "on ".$datetime[0]." ";
|
||||
echo "".ON." ".$datetime[0]." ";
|
||||
}
|
||||
echo "at ".$datetime[1]."</div>";
|
||||
echo "".AT." ".$datetime[1]."</div>";
|
||||
if (($settlers[$y]['starttime']+90)>time()){
|
||||
?>
|
||||
<div class="abort"><a href="build.php?id=<?php echo $_GET['id']."&mode=troops&cancel=1&moveid=".$settlers[$y]['moveid']; ?>"><img src="img/x.gif" class="del" /></a></div>
|
||||
|
||||
@@ -252,7 +252,7 @@ function testSum() {
|
||||
</tbody>
|
||||
</table>
|
||||
<p id="submitButton">
|
||||
<?php if($session->userinfo['gold'] > 3) { ?><a href="javascript:document.snd.submit();">Trade resources at (step 2 of 2)</a> <span class="none">(Costs: <img src="img/x.gif" class="gold_g" alt="Gold" title="Gold" /><b>3</b>)</span><?php } else { echo"<span class='none'>Trade resources at (step 2 of 2)</span> (Costs: <img src='img/x.gif' class='gold' alt='Gold' title='Gold' /><b>3</b>)"; }?> </p>
|
||||
<?php if($session->userinfo['gold'] >= 3) { ?><a href="javascript:document.snd.submit();">Trade resources at (step 2 of 2)</a> <span class="none">(Costs: <img src="img/x.gif" class="gold_g" alt="Gold" title="Gold" /><b>3</b>)</span><?php } else { echo"<span class='none'>Trade resources at (step 2 of 2)</span> (Costs: <img src='img/x.gif' class='gold' alt='Gold' title='Gold' /><b>3</b>)"; }?> </p>
|
||||
<p id="submitText"></p>
|
||||
</form>
|
||||
<script>
|
||||
@@ -268,4 +268,4 @@ function testSum() {
|
||||
}else{
|
||||
header("Location: build.php?id=".$_GET['id']."");
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<table id="show_artefacts" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="4">Small artefacts</th>
|
||||
<th colspan="4">Big artefacts</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
@@ -295,4 +295,4 @@
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -44,6 +44,7 @@ if($bindicate == 1) {
|
||||
$master = count($database->getMasterJobsByField($village->wid,$id));
|
||||
$uprequire = $building->resourceRequired($id,$village->resarray['f'.$id.'t'],1+$loopsame+$doublebuild+$master);
|
||||
$mastertime = $uprequire['time'];
|
||||
$_SESSION['mas'][$bid]=$bid.",".$id.",".$mastertime;
|
||||
?>
|
||||
<p id="contract"><b>Costs</b> for upgrading to level <?php echo $village->resarray['f'.$id]+1+$loopsame+$doublebuild+$master; ?>:<br />
|
||||
<img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><span class="little_res"><?php echo $uprequire['wood']; ?></span> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><span class="little_res"><?php echo $uprequire['clay']; ?></span> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><span class="little_res"><?php echo $uprequire['iron']; ?></span> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><span class="little_res"><?php echo $uprequire['crop']; ?></span> | <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']);
|
||||
@@ -58,7 +59,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
||||
<?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 with master builder </a>";
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&time=$mastertime&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>";
|
||||
@@ -66,7 +67,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
||||
}
|
||||
}else{
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime\">Constructing with master builder </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime&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>";
|
||||
@@ -82,7 +83,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
||||
<?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 with master builder </a>";
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&time=$mastertime&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>";
|
||||
@@ -90,7 +91,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
||||
}
|
||||
}else{
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime\">Constructing with master builder </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime&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>";
|
||||
@@ -120,7 +121,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
||||
<?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 with master builder </a>";
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&time=$mastertime&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>";
|
||||
@@ -128,7 +129,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
||||
}
|
||||
}else{
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime\">Constructing with master builder </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime&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>";
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
$wood = round($village->awood);
|
||||
$clay = round($village->aclay);
|
||||
$iron = round($village->airon);
|
||||
$crop = round($village->acrop);
|
||||
$founder = $database->getVillage($village->wid);
|
||||
$newvillage = $database->getMInfo($_GET['id']);
|
||||
$eigen = $database->getCoor($village->wid);
|
||||
@@ -79,17 +82,12 @@ echo '</pre>';
|
||||
</table>
|
||||
<p class="btn">
|
||||
<?php
|
||||
$mode = CP;
|
||||
$total = count($database->getProfileVillages($session->uid));
|
||||
$need_cps = ${'cp'.$mode}[$total+1];
|
||||
$cps = $session->cp;
|
||||
|
||||
if($cps >= $need_cps) {
|
||||
if ($wood>749 && $clay>749 && $iron>749 && $crop>749) {
|
||||
?>
|
||||
<input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" alt="OK" src="img/x.gif" onclick="this.disabled=true;this.form.submit();"/>
|
||||
<?php
|
||||
} else {
|
||||
print "$cps/$need_cps culture points";
|
||||
echo "<span class=\"c2\"><b>Not enough resource</b></span>";
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
|
||||
+19
-8
@@ -1,12 +1,23 @@
|
||||
<?php
|
||||
##################################################################
|
||||
## Page: winner.php ##
|
||||
## Description: When the player builds Wonder of the World ##
|
||||
## to level 100 the winner details are shown. ##
|
||||
## tells the players the game is over ##
|
||||
## Authors: aggenkeech - and a little help from Eyas95 ##
|
||||
## Created: 31/03/2012 ##
|
||||
##################################################################
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Project: TravianZ ##
|
||||
## Version: 18.02.2014 ##
|
||||
## Description: When the player builds Wonder of the World ##
|
||||
## to level 100 the winner details are shown. ##
|
||||
## tells the players the game is over ##
|
||||
## Authors: aggenkeech - and a little help from Eyas95 ##
|
||||
## Page: winner.php ##
|
||||
## Fixed by: Shadow ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2013. All rights reserved. ##
|
||||
## URLs: http://travian.shadowss.ro ##
|
||||
## Source code: http://github.com/Shadowss/TravianZ-by-Shadow/ ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include("GameEngine/Village.php");
|
||||
$start = $generator->pageLoadTimeStart();
|
||||
if(isset($_GET['newdid'])) {
|
||||
|
||||
Reference in New Issue
Block a user