mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-06 21:04:20 +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.
181 lines
5.1 KiB
Smarty
181 lines
5.1 KiB
Smarty
<?php
|
|
$artefact = $database->getArtefactDetails($_GET['show']);
|
|
if(empty($artefact)){
|
|
header("location: build.php?gid=27");
|
|
exit;
|
|
}
|
|
|
|
if($artefact['size'] == 1 && $artefact['type'] != 11){
|
|
$reqlvl = 10;
|
|
$effect = VILLAGE;
|
|
}else{
|
|
$reqlvl = $artefact['type'] != 11 ? 20 : 10;
|
|
$effect = ACCOUNT;
|
|
}
|
|
|
|
$activationTime = 86400 / (SPEED == 2 ? 1.5 : (SPEED == 3 ? 2 : SPEED));
|
|
$time = time();
|
|
$nextEffect = "-";
|
|
|
|
if($artefact['owner'] == 3) $active = "-";
|
|
elseif(!$artefact['active'] && $artefact['conquered'] < $time - $activationTime) $active = "<b>Can't be activated</b>";
|
|
elseif (!$artefact['active']) $active = date("Y-m-d H:i:s", $artefact['conquered'] + $activationTime);
|
|
else
|
|
{
|
|
$active = "<b>".ACTIVE."</b>";
|
|
$nextEffect = date("Y-m-d H:i:s", $artefact['lastupdate'] + (86400 / (SPEED == 2 ? 1.5 : (SPEED == 3 ? 2 : SPEED))));
|
|
}
|
|
|
|
//// Added by brainiac - thank you
|
|
if ($artefact['type'] == 8)
|
|
{
|
|
$kind = $artefact['kind'];
|
|
$effecty = $artefact['effect2'];
|
|
}else{
|
|
$kind = $artefact['type'];
|
|
$effecty = $artefact['effect'];
|
|
}
|
|
|
|
$artefactBadEffect = $artefact['type'] == 8 && $artefact['bad_effect'] == 1;
|
|
switch($kind){
|
|
case 1:
|
|
$betterorbadder = $artefactBadEffect ? BUILDING_WEAKER : BUILDING_STRONGER;
|
|
break;
|
|
case 2:
|
|
$betterorbadder = $artefactBadEffect ? TROOPS_SLOWEST : TROOPS_FASTER;
|
|
break;
|
|
case 3:
|
|
$betterorbadder = $artefactBadEffect ? SPIES_DECRESE : SPIES_INCREASE;
|
|
break;
|
|
case 4:
|
|
$betterorbadder = $artefactBadEffect ? CONSUME_HIGH : CONSUME_LESS;
|
|
break;
|
|
case 5:
|
|
$betterorbadder = $artefactBadEffect ? TROOPS_MAKE_SLOWEST : TROOPS_MAKE_FASTER;
|
|
break;
|
|
case 6:
|
|
$betterorbadder = $artefactBadEffect ? YOU_CONSTRUCT : YOU_CONSTRUCT;
|
|
break;
|
|
case 7:
|
|
$betterorbadder = $artefactBadEffect ? CRANNY_DECRESE : CRANNY_INCREASED;
|
|
break;
|
|
case 8:
|
|
$betterorbadder = $artefactBadEffect ? SPIES_INCREASE : SPIES_DECRESE;
|
|
break;
|
|
}
|
|
$bonus = isset($betterorbadder) ? $betterorbadder." (<b>".str_replace(["(", ")"], "" , $effecty)."</b>)" : (($kind == 11 && $artefact['active']) ? "<b>".WW_BUILDING_PLAN."</b>" : "<b>Not yet active</b>");
|
|
|
|
?>
|
|
|
|
<div class="artefact image-<?php echo str_replace(['type', '.gif'], '', $artefact['img']); ?>">
|
|
<table id="art_details" cellpadding="1" cellspacing="1">
|
|
<thead>
|
|
<tr>
|
|
<th colspan="2"><?php echo $artefact['name'];?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="2" class="desc">
|
|
|
|
<span class="detail"><?php echo $artefact['desc'];?></span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th><?php echo OWNER; ?></th>
|
|
<td>
|
|
<a href="spieler.php?uid=<?php echo $artefact['owner'];?>"><?php echo $database->getUserField($artefact['owner'], "username", 0);?></a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th><?php echo VILLAGE; ?></th>
|
|
<td>
|
|
<?php if($database->checkVilExist($artefact['vref'])){?>
|
|
<a href="karte.php?d=<?php echo $artefact['vref'];?>&c=<?php echo $generator->getMapCheck($artefact['vref']);?>"><?php echo $database->getVillageField($artefact['vref'], "name");?> </a>
|
|
<?php }else{?>
|
|
<span>[?]</span>
|
|
<?php }?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th><?php echo ALLIANCE; ?></th>
|
|
<td>
|
|
<?php if(($alliance = $database->getUserField($artefact['owner'], "alliance", 0)) > 0){ ?>
|
|
<a href="allianz.php?aid=<?php echo $alliance;?>"><?php echo $database->getAllianceName($alliance); ?></a>
|
|
<?php }else{?>
|
|
<span>-</span>
|
|
<?php }?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th><?php echo AREA_EFFECT; ?></th>
|
|
<td><?php echo $effect; ?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th><?php echo BONUS; ?></th>
|
|
<td><?php echo $bonus; ?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th><?php echo REQUIRED_LEVEL; ?></th>
|
|
<td><?php echo TREASURY; ?> <?php echo LEVEL; ?> <b><?php echo $reqlvl; ?></b></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th><?php echo TIME_CONQUER; ?></th>
|
|
<td><?php echo ($artefact['owner'] != 3) ? date("Y-m-d H:i:s",$artefact['conquered']) : "-";?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th><?php echo TIME_ACTIVATION; ?></th>
|
|
<td><?php echo $active;?></td>
|
|
</tr>
|
|
|
|
<?php if($artefact['type'] == 8){?>
|
|
<tr>
|
|
<th><?php echo NEXT_EFFECT; ?></th>
|
|
<td><?php echo $nextEffect;?></td>
|
|
</tr>
|
|
<?php }?>
|
|
|
|
</tbody></table>
|
|
<table class="art_details" cellpadding="1" cellspacing="1">
|
|
<thead>
|
|
<tr>
|
|
<th colspan="3"><?php echo FORMER_OWNER; ?></th>
|
|
</tr>
|
|
<tr>
|
|
<td><?php echo PLAYER; ?></td>
|
|
<td><?php echo VILLAGE; ?></td>
|
|
<td><?php echo CONQUERED; ?></td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$owners = $database->getArtifactsChronology($_GET['show']);
|
|
if(!empty($owners)){
|
|
foreach($owners as $owner){
|
|
?>
|
|
<tr>
|
|
<td><span class="none"><a href="spieler.php?uid=<?php echo $owner['uid'];?>"><?php echo $database->getUserField($owner['uid'], "username", 0);?></a></span></td>
|
|
<td>
|
|
<?php if($database->checkVilExist($owner['vref'])){?>
|
|
<span class="none"><a href="karte.php?d=<?php echo $owner['vref'];?>&c=<?php echo $generator->getMapCheck($owner['vref']);?>"><?php echo $database->getVillageField($owner['vref'], "name");?></a></span>
|
|
<?php }else{?>
|
|
<span class="none">[?]</span>
|
|
<?php }?>
|
|
</td>
|
|
<td><span class="none"><?php echo date("Y-m-d H:i:s", $owner['conqueredtime']);?></span></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
}else{
|
|
?>
|
|
<tr>
|
|
<td colspan="3"><span class="none"><?php echo NO_PREVIOUS_OWNERS; ?></span></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
</tbody></table></div> |