mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-16 08:11:00 +00:00
Natars automation system
+Natars will now spawn automatically, you can set how many day should
pass before the spawn of Natars (and artifacts), WW Villages and WW
building plans (Note: WW villages and WW building plans won't spawn
until the creation of the natar account)
+Added 3 timers under the left menu which indicate the spawn of
Natars/Artifacts, WW villages and WW building plans
+Added an option in the installation, to set the resource production of
oasis
+Fixed a bug that didn't permit to add multiple Units, Abtech and tech
rows with one query
+Added a new information to the Artifact of the fool, the next effect
reroll will now be displayed in his informations (in the treasury)
+Fixed a bug that dind't permit the correct timers flow in Dorf3.php
(Warehouse tab), they'll now flow correctly
+Timers and resources percentage of villages with a negative production
of crop will now be marked in red (in the Warehouse tab, Dorf3.php) and
will now be displayed in how much time the granary will be emptied
+Fixed a possible bug that prevented to add raids to farm lists
+Fixed a bug that didn't permit to create WW Villages from the
Multihunter control panel
+Reworked all timers, there will be only one timer field now (in
Session.php)
+Minor bug fixing and optimization
NOTE: To play this version of the game, you need to reinstall the server
OR you can simply add these lines of code into your "config.php" file:
// ***** Natars Spawn Time
define("NATARS_SPAWN_TIME",260);
define("NATARS_WW_SPAWN_TIME",260);
define("NATARS_WW_BUILDING_PLAN_SPAWN_TIME",260);
// ***** Oasis production
define("OASIS_WOOD_MULTIPLIER",40);
define("OASIS_CLAY_MULTIPLIER",40);
define("OASIS_IRON_MULTIPLIER",40);
define("OASIS_CROP_MULTIPLIER",40);
define("OASIS_WOOD_PRODUCTION",OASIS_WOOD_MULTIPLIER*SPEED);
define("OASIS_CLAY_PRODUCTION",OASIS_CLAY_MULTIPLIER*SPEED);
define("OASIS_IRON_PRODUCTION",OASIS_IRON_MULTIPLIER*SPEED);
define("OASIS_CROP_PRODUCTION",OASIS_CROP_MULTIPLIER*SPEED);
P.S: from the next version, the possibility to add manual WWs, WW
building plans and to create the natar account will be REMOVED.
This commit is contained in:
+270
-267
@@ -1,310 +1,313 @@
|
||||
<?php
|
||||
if (isset($_GET['refresh'])) {
|
||||
$village->unitarray = $database->getUnit($village->wid, false);
|
||||
}
|
||||
?><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="<?php echo RALLYPOINT;?>" />
|
||||
</a>
|
||||
<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>
|
||||
if(isset($_GET['refresh'])){
|
||||
$village->unitarray = $database->getUnit($village->wid, false);
|
||||
}
|
||||
?><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="<?php echo RALLYPOINT;?>" />
|
||||
</a>
|
||||
<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>
|
||||
|
||||
<?php
|
||||
include_once("16_menu.tpl");
|
||||
$units_type = $database->getMovement("34",$village->wid,1);
|
||||
$settlers = $database->getMovement("7",$village->wid,1);
|
||||
include_once ("16_menu.tpl");
|
||||
$units_type = $database->getMovement("34", $village->wid, 1);
|
||||
$settlers = $database->getMovement("7", $village->wid, 1);
|
||||
$oasis_incoming = 0;
|
||||
$array = $database->getOasis($village->wid);
|
||||
foreach($array as $conqured){
|
||||
$oasis_incoming += count($database->getMovement(6,$conqured['wref'],0));
|
||||
$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;
|
||||
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_incoming > 0 or $settlers_incoming > 0 or $oasis_incoming > 0){
|
||||
?>
|
||||
if($units_incoming > 0 || $settlers_incoming > 0 || $oasis_incoming > 0){
|
||||
?>
|
||||
<h4><?php echo INCOMING_TROOPS;?> (<?php echo $units_incoming+$settlers_incoming+$oasis_incoming; ?>)</h4>
|
||||
<?php include("16_incomming.tpl");
|
||||
}
|
||||
<?php
|
||||
|
||||
include ("16_incomming.tpl");
|
||||
}
|
||||
?>
|
||||
|
||||
<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>
|
||||
<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 echo $village->unitarray['hero'] == 0 ? 10 : 11; ?>">
|
||||
<a href="spieler.php?uid=<?php echo $session->uid; ?>"><?php echo OWN_TROOPS;?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="units">
|
||||
<?php
|
||||
if(count($village->enforcetome) > 0) {
|
||||
foreach($village->enforcetome as $enforce) {
|
||||
$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\">";
|
||||
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>";
|
||||
}
|
||||
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\">";
|
||||
}
|
||||
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_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\">
|
||||
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){
|
||||
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\">";
|
||||
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>";
|
||||
}
|
||||
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\">";
|
||||
}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_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>";
|
||||
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>";
|
||||
}
|
||||
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\">";
|
||||
}
|
||||
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_HR."</div><div class='sback'><span class=none><b>".SEND_BACK."</b></span></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
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>";
|
||||
}
|
||||
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\">";
|
||||
}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_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) {
|
||||
$enforce['conqured']=$conquredvid;
|
||||
array_push($enforceoasis,$enforce);
|
||||
} else {
|
||||
array_push($enforcevill,$enforce);
|
||||
}
|
||||
$allenforce = $village->enforcetoyou;
|
||||
$enforcemeoasis = $village->enforceoasis;
|
||||
if(count($allenforce) > 0){
|
||||
foreach($allenforce as $enforce){
|
||||
$conquredvid = $database->getOasisField($enforce['vref'], "conqured");
|
||||
if($conquredvid > 0){
|
||||
$enforce['conqured'] = $conquredvid;
|
||||
array_push($enforceoasis, $enforce);
|
||||
}else{
|
||||
array_push($enforcevill, $enforce);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(count($enforcemeoasis) > 0){
|
||||
foreach($enforcemeoasis as $enforce){
|
||||
array_push($enforceoasis, $enforce);
|
||||
}
|
||||
}
|
||||
if(count($enforcemeoasis) > 0) {
|
||||
foreach($enforcemeoasis as $enforce) {
|
||||
array_push($enforceoasis,$enforce);
|
||||
}
|
||||
}
|
||||
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['from'])."\">".$database->getVillageField($enforce['from'],"name")."</a></td>
|
||||
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['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>";
|
||||
}
|
||||
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\">";
|
||||
}
|
||||
else {
|
||||
echo "<td>";
|
||||
}
|
||||
echo $enforce['u'.$i]."</td>";
|
||||
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>";
|
||||
}
|
||||
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\">";
|
||||
}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_HR."</div><div class='sback'><a href='a2b.php?r=".$enforce['id']."'>".SEND_BACK."</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
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?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>
|
||||
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\">";
|
||||
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>";
|
||||
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>";
|
||||
}
|
||||
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\">";
|
||||
}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_HR."</div><div class='sback'><a href='a2b.php?r=".$enforce['id']."'>".SEND_BACK."</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
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>";
|
||||
}
|
||||
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\">";
|
||||
}
|
||||
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_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'];
|
||||
$colspan2 = $colspan + 1;
|
||||
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>
|
||||
if(count($database->getPrisoners3($village->wid)) > 0){
|
||||
echo "<h4>".PRISONERS."</h4>";
|
||||
foreach($database->getPrisoners3($village->wid) as $prisoners){
|
||||
$colspan = 10 + $prisoners['t11'];
|
||||
$colspan2 = $colspan + 1;
|
||||
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'])."\">".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>";
|
||||
}
|
||||
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\">";
|
||||
}
|
||||
else {
|
||||
echo "<td>";
|
||||
}
|
||||
echo $prisoners['t'.$i]."</td>";
|
||||
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>";
|
||||
}
|
||||
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\">";
|
||||
}
|
||||
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=\"$colspan2\"><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($prisoners['t11']!=0){
|
||||
echo "<td>".$prisoners['t11']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>".UPKEEP."</th><td colspan=\"$colspan2\"><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 = $colspan + 1;
|
||||
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>
|
||||
if(count($database->getPrisoners($village->wid)) > 0){
|
||||
echo "<h4>".PRISONERS."</h4>";
|
||||
foreach($database->getPrisoners($village->wid) as $prisoners){
|
||||
$colspan = 10 + $prisoners['t11'];
|
||||
$colspan2 = $colspan + 1;
|
||||
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'])."\">".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>";
|
||||
}
|
||||
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\">";
|
||||
}
|
||||
else {
|
||||
echo "<td>";
|
||||
}
|
||||
echo $prisoners['t'.$i]."</td>";
|
||||
}
|
||||
if($prisoners['t11']!=0){
|
||||
echo "<td>".$prisoners['t11']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
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>";
|
||||
}
|
||||
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\">";
|
||||
}
|
||||
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=\"$colspan2\"><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 "</tbody></table>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
$units_type = $database->getMovement("3",$village->wid,0);
|
||||
$settlers = $database->getMovement("5",$village->wid,0);
|
||||
$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;
|
||||
for($i = 0; $i < $units_incoming; $i++){
|
||||
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");
|
||||
include ("upgrade.tpl");
|
||||
?>
|
||||
</p></div>
|
||||
</p>
|
||||
</div>
|
||||
Reference in New Issue
Block a user