mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 08:34:33 +00:00
90221cf19f
+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.
115 lines
5.6 KiB
Smarty
115 lines
5.6 KiB
Smarty
<div id="build" class="gid21"><a href="#" onClick="return Popup(21,4, 'gid');" class="build_logo">
|
|
<img class="building g21" src="img/x.gif" alt="Workshop" title="<?php echo WORKSHOP; ?>" /> </a>
|
|
|
|
<h1><?php echo WORKSHOP; ?> <span class="level"><?php echo LEVEL; ?> <?php echo $village->resarray['f'.$id]; ?></span></h1>
|
|
<p class="build_desc"><?php echo WORKSHOP_DESC; ?></p>
|
|
<?php if ($building->getTypeLevel(21) > 0) { ?>
|
|
|
|
<form method="POST" name="snd" action="build.php">
|
|
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
|
<input type="hidden" name="ft" value="t1" />
|
|
<table cellpadding="1" cellspacing="1" class="build_details">
|
|
<thead>
|
|
<tr>
|
|
<td><?php echo NAME; ?></td>
|
|
<td><?php echo QUANTITY; ?></td>
|
|
<td><?php echo MAX; ?></td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$success = 0;
|
|
$start = ($session->tribe == 1)? 7 : (($session->tribe == 2)? 17 : 27);
|
|
if ($session->tribe == 1){
|
|
$start = 7;
|
|
}else if ($session->tribe == 2){
|
|
$start = 17;
|
|
}else if ($session->tribe == 3){
|
|
$start = 27;
|
|
}else if ($session->tribe == 5){
|
|
$start = 47;
|
|
}
|
|
if($session->tribe != 4){
|
|
for($i=$start;$i<=($start+1);$i++) {
|
|
if($technology->getTech($i)) {
|
|
echo "<tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u$i\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($i)."\" title=\"".$technology->getUnitName($i)."\" />
|
|
<a href=\"#\" onClick=\"return Popup($i,1);\">".$technology->getUnitName($i)."</a> <span class=\"info\">(".AVAILABLE.": ".$village->unitarray['u'.$i].")</span></div>";
|
|
echo "<div class=\"details\">
|
|
<img class=\"r1\" src=\"img/x.gif\" alt=\"Wood\" title=\"".LUMBER."\" />".${'u'.$i}['wood']."|<img class=\"r2\" src=\"img/x.gif\" alt=\"Clay\" title=\"".CLAY."\" />".${'u'.$i}['clay']."|<img class=\"r3\" src=\"img/x.gif\" alt=\"Iron\" title=\"".IRON."\" />".${'u'.$i}['iron']."|<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"".CROP."\" />".${'u'.$i}['crop']."|<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"".CROP_COM."\" />".${'u'.$i}['pop']."|<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"".DURATION."\" />";
|
|
$dur = $database->getArtifactsValueInfluence($session->uid, $village->wid, 5, round(${'u'.$i}['time'] * ($bid21[$village->resarray['f'.$id]]['attri'] / 100) / SPEED));
|
|
echo $generator->getTimeFormat($dur);
|
|
|
|
//-- If available resources combined are not enough, remove NPC button
|
|
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
|
|
|
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
|
|
echo "|<a href=\"build.php?gid=17&t=3&r1=".((${'u'.$i}['wood'])*$technology->maxUnitPlus($i))."&r2=".((${'u'.$i}['clay'])*$technology->maxUnitPlus($i))."&r3=".((${'u'.$i}['iron'])*$technology->maxUnitPlus($i))."&r4=".((${'u'.$i}['crop'])*$technology->maxUnitPlus($i))."\" title=\"NPC trade\"><img class=\"npc\" src=\"img/x.gif\" alt=\"NPC trade\" title=\"NPC trade\" /></a>";
|
|
}
|
|
echo "</div></td>
|
|
<td class=\"val\">
|
|
<input type=\"text\" class=\"text\" name=\"t$i\" value=\"0\" maxlength=\"10\">
|
|
</td>
|
|
|
|
<td class=\"max\">
|
|
<a href=\"#\" onClick=\"document.snd.t$i.value=".$technology->maxUnit($i)."; return false;\">(".$technology->maxUnit($i).")</a>
|
|
</td>
|
|
</tr>";
|
|
$success += 1;
|
|
}
|
|
}
|
|
if($success == 0) {
|
|
echo "<tr><td class=\"none\" colspan=\"3\">".AVAILABLE_ACADEMY."</td></tr>";
|
|
}
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
<p>
|
|
<input type="image" id="btn_train" class="dynamic_img" value="ok" name="s1" src="img/x.gif" alt="train" />
|
|
|
|
</p>
|
|
</form>
|
|
<?php
|
|
} else {
|
|
echo "<b>".TRAINING_COMMENCE_WORKSHOP."</b><br>\n";
|
|
}
|
|
|
|
$trainlist = $technology->getTrainingList(3);
|
|
if(count($trainlist) > 0) {
|
|
//$timer = 2*count($trainlist);
|
|
echo "
|
|
<table cellpadding=\"1\" cellspacing=\"1\" class=\"under_progress\">
|
|
<thead><tr>
|
|
<td>".TRAINING."</td>
|
|
<td>".DURATION."</td>
|
|
<td>".FINISHED."</td>
|
|
</tr></thead>
|
|
<tbody>";
|
|
$TrainCount = 0;
|
|
foreach($trainlist as $train) {
|
|
$TrainCount++;
|
|
echo "<tr><td class=\"desc\">";
|
|
echo "<img class=\"unit u".$train['unit']."\" src=\"img/x.gif\" alt=\"".$train['name']."\" title=\"".$train['name']."\" />";
|
|
echo $train['amt']." ".$train['name']."</td><td class=\"dur\">";
|
|
if ($TrainCount == 1 ) {
|
|
$NextFinished = $generator->getTimeFormat($train['timestamp2']-time());
|
|
echo "<span id=timer".++$session->timer.">".$generator->getTimeFormat($train['timestamp']-time())."</span>";
|
|
} else {
|
|
echo $generator->getTimeFormat($train['eachtime']*$train['amt']);
|
|
}
|
|
echo "</td><td class=\"fin\">";
|
|
$time = $generator->procMTime($train['timestamp']);
|
|
if($time[0] != "today") {
|
|
echo "on ".$time[0]." at ";
|
|
}
|
|
echo $time[1];
|
|
} ?>
|
|
</tr><tr class="next"><td colspan="3"><?php echo UNIT_FINISHED; ?> <span id="timer<?php echo ++$session->timer?>"><?php echo $NextFinished; ?></span></td></tr>
|
|
</tbody></table>
|
|
<?php }
|
|
include("upgrade.tpl");
|
|
?>
|
|
</p></div>
|
|
|
|
|