mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-27 21:57:16 +00:00
update
This commit is contained in:
@@ -548,7 +548,7 @@ class MYSQL_DB {
|
|||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
//+25% lumber and +25% crop per hour
|
//+25% lumber and +25% crop per hour
|
||||||
$q = "UPDATE " . TB_PREFIX . "units SET u35 = u35 + '".rand(0,5)."', u36 = u36 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."', u38 = u38 + '".rand(0,5)."', u40 = u40 + '".rand(0,$max2)."' WHERE vref = '" . $wid . "' AND (u36 <= ".$max." OR u37 <= ".$max." OR u38 <= ".$max." OR u40 <= ".$max.")";
|
$q = "UPDATE " . TB_PREFIX . "units SET u35 = u35 + '".rand(0,5)."', u36 = u36 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."', u38 = u38 + '".rand(0,5)."', u40 = u40 + '".rand(0,$max2)."' WHERE vref = '" . $wid . "' AND (u36 <= ".$max." OR u37 <= ".$max." OR u38 <= ".$max.")";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
@@ -559,7 +559,7 @@ class MYSQL_DB {
|
|||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
//+25% clay and +25% crop per hour
|
//+25% clay and +25% crop per hour
|
||||||
$q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."', u38 = u38 + '".rand(0,5)."', u40 = u40 + '".rand(0,$max2)."' WHERE vref = '" . $wid . "' AND (u36 <= ".$max." OR u37 <= ".$max." OR u38 <= ".$max." OR u40 <= ".$max.")";
|
$q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."', u38 = u38 + '".rand(0,5)."', u40 = u40 + '".rand(0,$max2)."' WHERE vref = '" . $wid . "' AND (u36 <= ".$max." OR u37 <= ".$max." OR u38 <= ".$max.")";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
@@ -570,7 +570,7 @@ class MYSQL_DB {
|
|||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
//+25% iron and +25% crop
|
//+25% iron and +25% crop
|
||||||
$q = "UPDATE " . TB_PREFIX . "units SET u31 = u31 + '".rand(0,5)."', u32 = u32 + '".rand(0,5)."', u34 = u34 + '".rand(0,5)."', u40 = u40 + '".rand(0,$max2)."' WHERE vref = '" . $wid . "' AND (u31 <= ".$max." OR u32 <= ".$max." OR u34 <= ".$max." OR u40 <= ".$max.")";
|
$q = "UPDATE " . TB_PREFIX . "units SET u31 = u31 + '".rand(0,5)."', u32 = u32 + '".rand(0,5)."', u34 = u34 + '".rand(0,5)."', u40 = u40 + '".rand(0,$max2)."' WHERE vref = '" . $wid . "' AND (u31 <= ".$max." OR u32 <= ".$max." OR u34 <= ".$max.")";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
@@ -581,7 +581,7 @@ class MYSQL_DB {
|
|||||||
break;
|
break;
|
||||||
case 12:
|
case 12:
|
||||||
//+50% crop per hour
|
//+50% crop per hour
|
||||||
$q = "UPDATE " . TB_PREFIX . "units SET u33 = u33 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."', u38 = u38 + '".rand(0,5)."', u39 = u39 + '".rand(0,5)."', u40 = u40 + '".rand(0,$max2)."' WHERE vref = '" . $wid . "' AND (u33 <= ".$max." OR u37 <= ".$max." OR u38 <= ".$max." OR u39 <= ".$max." OR u40 <= ".$max.")";
|
$q = "UPDATE " . TB_PREFIX . "units SET u33 = u33 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."', u38 = u38 + '".rand(0,5)."', u39 = u39 + '".rand(0,5)."', u40 = u40 + '".rand(0,$max2)."' WHERE vref = '" . $wid . "' AND (u33 <= ".$max." OR u37 <= ".$max." OR u38 <= ".$max." OR u39 <= ".$max.")";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -551,7 +551,7 @@ class MYSQLi_DB {
|
|||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
//+25% lumber and +25% crop per hour
|
//+25% lumber and +25% crop per hour
|
||||||
$q = "UPDATE " . TB_PREFIX . "units SET u35 = u35 + '".rand(0,5)."', u36 = u36 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."', u38 = u38 + '".rand(0,5)."', u40 = u40 + '".rand(0,$max2)."' WHERE vref = '" . $wid . "' AND (u36 <= ".$max." OR u37 <= ".$max." OR u38 <= ".$max." OR u40 <= ".$max.")";
|
$q = "UPDATE " . TB_PREFIX . "units SET u35 = u35 + '".rand(0,5)."', u36 = u36 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."', u38 = u38 + '".rand(0,5)."', u40 = u40 + '".rand(0,$max2)."' WHERE vref = '" . $wid . "' AND (u36 <= ".$max." OR u37 <= ".$max." OR u38 <= ".$max.")";
|
||||||
$result = mysqli_query($this->connection, $q);
|
$result = mysqli_query($this->connection, $q);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
@@ -562,7 +562,7 @@ class MYSQLi_DB {
|
|||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
//+25% clay and +25% crop per hour
|
//+25% clay and +25% crop per hour
|
||||||
$q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."', u38 = u38 + '".rand(0,5)."', u40 = u40 + '".rand(0,$max2)."' WHERE vref = '" . $wid . "' AND (u36 <= ".$max." OR u37 <= ".$max." OR u38 <= ".$max." OR u40 <= ".$max.")";
|
$q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."', u38 = u38 + '".rand(0,5)."', u40 = u40 + '".rand(0,$max2)."' WHERE vref = '" . $wid . "' AND (u36 <= ".$max." OR u37 <= ".$max." OR u38 <= ".$max.")";
|
||||||
$result = mysqli_query($this->connection, $q);
|
$result = mysqli_query($this->connection, $q);
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
@@ -573,7 +573,7 @@ class MYSQLi_DB {
|
|||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
//+25% iron and +25% crop
|
//+25% iron and +25% crop
|
||||||
$q = "UPDATE " . TB_PREFIX . "units SET u31 = u31 + '".rand(0,5)."', u32 = u32 + '".rand(0,5)."', u34 = u34 + '".rand(0,5)."', u40 = u40 + '".rand(0,$max2)."' WHERE vref = '" . $wid . "' AND (u31 <= ".$max." OR u32 <= ".$max." OR u34 <= ".$max." OR u40 <= ".$max.")";
|
$q = "UPDATE " . TB_PREFIX . "units SET u31 = u31 + '".rand(0,5)."', u32 = u32 + '".rand(0,5)."', u34 = u34 + '".rand(0,5)."', u40 = u40 + '".rand(0,$max2)."' WHERE vref = '" . $wid . "' AND (u31 <= ".$max." OR u32 <= ".$max." OR u34 <= ".$max.")";
|
||||||
$result = mysqli_query($this->connection, $q);
|
$result = mysqli_query($this->connection, $q);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
@@ -584,7 +584,7 @@ class MYSQLi_DB {
|
|||||||
break;
|
break;
|
||||||
case 12:
|
case 12:
|
||||||
//+50% crop per hour
|
//+50% crop per hour
|
||||||
$q = "UPDATE " . TB_PREFIX . "units SET u33 = u33 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."', u38 = u38 + '".rand(0,5)."', u39 = u39 + '".rand(0,5)."', u40 = u40 + '".rand(0,$max2)."' WHERE vref = '" . $wid . "' AND (u33 <= ".$max." OR u37 <= ".$max." OR u38 <= ".$max." OR u39 <= ".$max." OR u40 <= ".$max.")";
|
$q = "UPDATE " . TB_PREFIX . "units SET u33 = u33 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."', u38 = u38 + '".rand(0,5)."', u39 = u39 + '".rand(0,5)."', u40 = u40 + '".rand(0,$max2)."' WHERE vref = '" . $wid . "' AND (u33 <= ".$max." OR u37 <= ".$max." OR u38 <= ".$max." OR u39 <= ".$max.")";
|
||||||
$result = mysqli_query($this->connection, $q);
|
$result = mysqli_query($this->connection, $q);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
|||||||
echo "<span class=\"none\">Upgrade Granary.</span>";
|
echo "<span class=\"none\">Upgrade Granary.</span>";
|
||||||
}
|
}
|
||||||
else if($bindicate == 7) {
|
else if($bindicate == 7) {
|
||||||
if($village->allcrop > 0){
|
if($village->allcrop - $village->pop - $automation->getUpkeep($village->unitall, 0) > 0){
|
||||||
$neededtime = $building->calculateAvaliable($id,$village->resarray['f'.$id.'t'],1+$loopsame+$doublebuild+$master);
|
$neededtime = $building->calculateAvaliable($id,$village->resarray['f'.$id.'t'],1+$loopsame+$doublebuild+$master);
|
||||||
echo "<span class=\"none\">Enough resources ".$neededtime[0]." at ".$neededtime[1]."</span>";
|
echo "<span class=\"none\">Enough resources ".$neededtime[0]." at ".$neededtime[1]."</span>";
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -30,7 +30,11 @@ $totalproduction = $village->allcrop; // all crops + bakery + grain mill
|
|||||||
<td><img src="img/x.gif" class="r3" alt="<?php echo IRON; ?>" title="<?php echo IRON; ?>" /></td>
|
<td><img src="img/x.gif" class="r3" alt="<?php echo IRON; ?>" title="<?php echo IRON; ?>" /></td>
|
||||||
<td id="l2" title="<?php echo $iron; ?>"><?php echo round($village->airon)."/".$village->maxstore; ?></td>
|
<td id="l2" title="<?php echo $iron; ?>"><?php echo round($village->airon)."/".$village->maxstore; ?></td>
|
||||||
<td><img src="img/x.gif" class="r4" alt="<?php echo CROP; ?>" title="<?php echo CROP; ?>" /></td>
|
<td><img src="img/x.gif" class="r4" alt="<?php echo CROP; ?>" title="<?php echo CROP; ?>" /></td>
|
||||||
|
<?php if($village->acrop > 0){ ?>
|
||||||
<td id="l1" title="<?php echo $crop; ?>"><?php echo round($village->acrop)."/".$village->maxcrop; ?></td>
|
<td id="l1" title="<?php echo $crop; ?>"><?php echo round($village->acrop)."/".$village->maxcrop; ?></td>
|
||||||
|
<?php }else{ ?>
|
||||||
|
<td title="<?php echo $crop; ?>"><?php echo "0/".$village->maxcrop; ?></td>
|
||||||
|
<?php } ?>
|
||||||
<td><img src="img/x.gif" class="r5" alt="<?php echo CROP_COM; ?>" title="<?php echo CROP_COM; ?>" /></td>
|
<td><img src="img/x.gif" class="r5" alt="<?php echo CROP_COM; ?>" title="<?php echo CROP_COM; ?>" /></td>
|
||||||
<td><?php echo ($village->pop+$technology->getUpkeep($village->unitall,0))."/".$totalproduction.""; ?></td>
|
<td><?php echo ($village->pop+$technology->getUpkeep($village->unitall,0))."/".$totalproduction.""; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user