mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-14 23:31:02 +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:
@@ -15,23 +15,6 @@
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
$artefact = count($database->getOwnUniqueArtefactInfo2($session->uid,5,3,0));
|
||||
$artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,5,1,1));
|
||||
$artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,5,2,0));
|
||||
if($artefact > 0){
|
||||
$artefact_bonus = 2;
|
||||
$artefact_bonus2 = 1;
|
||||
}else if($artefact1 > 0){
|
||||
$artefact_bonus = 2;
|
||||
$artefact_bonus2 = 1;
|
||||
}else if($artefact2 > 0){
|
||||
$artefact_bonus = 4;
|
||||
$artefact_bonus2 = 3;
|
||||
}else{
|
||||
$artefact_bonus = 1;
|
||||
$artefact_bonus2 = 1;
|
||||
}
|
||||
|
||||
//check if there is unit needed in the village
|
||||
|
||||
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."units WHERE `vref` = ".(int) $village->wid."");
|
||||
@@ -63,7 +46,7 @@ if($session->tribe == 1) {
|
||||
<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"".CROP."\" />".$u1['crop']."|
|
||||
<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"".CROP_COM."\" />6|
|
||||
<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"".DURATION."\" />";
|
||||
$output.=$generator->getTimeFormat(round($u1['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3);
|
||||
$output .= $generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5,$u1['time'] / SPEED)*3);
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$total_required = (int)($u1['wood'] + $u1['clay'] + $u1['iron'] + $u1['crop']);
|
||||
@@ -102,7 +85,7 @@ if($session->tribe == 1) {
|
||||
<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"".CROP."\" />".$u2['crop']."|
|
||||
<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"".CROP_COM."\" />6|
|
||||
<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"".DURATION."\" />";
|
||||
$output.=$generator->getTimeFormat(round($u2['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3);
|
||||
$output.=$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u2['time'] / SPEED) * 3);
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$total_required = (int)($u2['wood'] + $u2['clay'] + $u2['iron'] + $u2['crop']);
|
||||
@@ -142,7 +125,7 @@ if($session->tribe == 1) {
|
||||
<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"".CROP_COM."\" />6|
|
||||
<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"".DURATION."\" />";
|
||||
|
||||
$output.= $generator->getTimeFormat(round($u3['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3);
|
||||
$output.= $generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u3['time'] / SPEED) * 3);
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$total_required = (int)($u3['wood'] + $u3['clay'] + $u3['iron'] + $u3['crop']);
|
||||
@@ -180,7 +163,7 @@ if($session->tribe == 1) {
|
||||
<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"".CROP."\" />".$u5['crop']."|
|
||||
<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"".CROP_COM."\" />6|
|
||||
<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"".DURATION."\" />".
|
||||
$generator->getTimeFormat(round($u5['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3);
|
||||
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u5['time'] / SPEED) * 3);
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$total_required = (int)($u5['wood'] + $u5['clay'] + $u5['iron'] + $u5['crop']);
|
||||
@@ -219,7 +202,7 @@ if($session->tribe == 1) {
|
||||
<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"".CROP."\" />".$u6['crop']."|
|
||||
<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"".CROP_COM."\" />6|
|
||||
<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"".DURATION."\" />".
|
||||
$generator->getTimeFormat(round($u6['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3);
|
||||
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u6['time'] / SPEED) * 3);
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$total_required = (int)($u6['wood'] + $u6['clay'] + $u6['iron'] + $u6['crop']);
|
||||
@@ -261,7 +244,7 @@ $output.="<tr>
|
||||
<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"".CROP."\" />".$u11['crop']."|
|
||||
<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"".CROP_COM."\" />6|
|
||||
<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"".DURATION."\" />".
|
||||
$generator->getTimeFormat(round($u11['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3);
|
||||
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u11['time'] / SPEED) * 3);
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$total_required = (int)($u11['wood'] + $u11['clay'] + $u11['iron'] + $u11['crop']);
|
||||
@@ -300,7 +283,7 @@ $output.="<tr>
|
||||
<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"".CROP."\" />".$u12['crop']."|
|
||||
<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"".CROP_COM."\" />6|
|
||||
<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"".DURATION."\" />".
|
||||
$generator->getTimeFormat(round($u12['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3);
|
||||
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u12['time'] / SPEED) * 3);
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$total_required = (int)($u12['wood'] + $u12['clay'] + $u12['iron'] + $u12['crop']);
|
||||
@@ -341,7 +324,7 @@ $output.="<tr>
|
||||
<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"".CROP_COM."\" />6|
|
||||
<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"".DURATION."\" />";
|
||||
|
||||
$generator->getTimeFormat(round($u13['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3);
|
||||
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u13['time'] / SPEED) * 3);
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$total_required = (int)($u13['wood'] + $u13['clay'] + $u13['iron'] + $u13['crop']);
|
||||
@@ -380,7 +363,7 @@ $output.="<tr>
|
||||
<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"".CROP."\" />".$u15['crop']."|
|
||||
<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"".CROP_COM."\" />6|
|
||||
<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"".DURATION."\" />".
|
||||
$generator->getTimeFormat(round($u15['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3);
|
||||
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u15['time'] / SPEED) * 3);
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$total_required = (int)($u15['wood'] + $u15['clay'] + $u15['iron'] + $u15['crop']);
|
||||
@@ -420,7 +403,7 @@ $output.="<tr>
|
||||
<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"".CROP."\" />".$u16['crop']."|
|
||||
<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"".CROP_COM."\" />6|
|
||||
<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"".DURATION."\" />".
|
||||
$generator->getTimeFormat(round($u16['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3);
|
||||
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u16['time'] / SPEED) * 3);
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$total_required = (int)($u16['wood'] + $u16['clay'] + $u16['iron'] + $u16['crop']);
|
||||
@@ -462,7 +445,7 @@ $output.="<tr>
|
||||
<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"".CROP."\" />".$u21['crop']."|
|
||||
<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"".CROP_COM."\" />6|
|
||||
<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"".DURATION."\" />".
|
||||
$generator->getTimeFormat(round($u21['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3);
|
||||
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u21['time'] / SPEED) * 3);
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$total_required = (int)($u21['wood'] + $u21['clay'] + $u21['iron'] + $u21['crop']);
|
||||
@@ -501,7 +484,7 @@ $output.="<tr>
|
||||
<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"".CROP."\" />".$u22['crop']."|
|
||||
<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"".CROP_COM."\" />6|
|
||||
<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"".DURATION."\" />".
|
||||
$generator->getTimeFormat(round($u22['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3);
|
||||
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u22['time'] / SPEED) * 3);
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$total_required = (int)($u22['wood'] + $u22['clay'] + $u22['iron'] + $u22['crop']);
|
||||
@@ -541,7 +524,7 @@ $output.="<tr>
|
||||
<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"".CROP."\" />".$u24['crop']."|
|
||||
<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"".CROP_COM."\" />6|
|
||||
<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"".DURATION."\" />".
|
||||
$generator->getTimeFormat(round($u24['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3);
|
||||
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u24['time'] / SPEED) * 3);
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$total_required = (int)($u24['wood'] + $u24['clay'] + $u24['iron'] + $u24['crop']);
|
||||
@@ -580,7 +563,7 @@ $output.="<tr>
|
||||
<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"".CROP."\" />".$u25['crop']."|
|
||||
<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"".CROP_COM."\" />6|
|
||||
<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"".DURATION."\" />".
|
||||
$generator->getTimeFormat(round($u25['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3);
|
||||
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u25['time'] / SPEED) * 3);
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$total_required = (int)($u25['wood'] + $u25['clay'] + $u25['iron'] + $u25['crop']);
|
||||
@@ -620,7 +603,7 @@ $output.="<tr>
|
||||
<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"".CROP."\" />".$u26['crop']."|
|
||||
<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"".CROP_COM."\" />6|
|
||||
<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"".DURATION."\" />".
|
||||
$generator->getTimeFormat(round($u26['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3);
|
||||
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u26['time'] / SPEED) * 3);
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$total_required = (int)($u26['wood'] + $u26['clay'] + $u26['iron'] + $u26['crop']);
|
||||
|
||||
Reference in New Issue
Block a user