mpre updates

This commit is contained in:
yi12345
2013-05-28 00:10:20 +03:00
parent e8df6da972
commit 64f44d470f
4 changed files with 40 additions and 28 deletions
+11 -11
View File
@@ -154,13 +154,13 @@ class Automation {
$this->pruneResource();
$this->pruneOResource();
$this->checkWWAttacks();
if(!file_exists("GameEngine/Prevention/culturepoints.txt") or time()-filemtime("GameEngine/Prevention/culturepoints.txt")>10) {
if(!file_exists("GameEngine/Prevention/culturepoints.txt") or time()-filemtime("GameEngine/Prevention/culturepoints.txt")>50) {
$this->culturePoints();
}
if(!file_exists("GameEngine/Prevention/updatehero.txt") or time()-filemtime("GameEngine/Prevention/updatehero.txt")>50) {
$this->updateHero();
}
if(!file_exists("GameEngine/Prevention/cleardeleting.txt") or time()-filemtime("GameEngine/Prevention/cleardeleting.txt")>10) {
if(!file_exists("GameEngine/Prevention/cleardeleting.txt") or time()-filemtime("GameEngine/Prevention/cleardeleting.txt")>50) {
$this->clearDeleting();
}
if (! file_exists("GameEngine/Prevention/build.txt") or time() - filemtime("GameEngine/Prevention/build.txt") > 10)
@@ -175,34 +175,34 @@ class Automation {
$this->updateStore();
$this->delTradeRoute();
$this->TradeRoute();
if(!file_exists("GameEngine/Prevention/market.txt") or time()-filemtime("GameEngine/Prevention/market.txt")>10) {
if(!file_exists("GameEngine/Prevention/market.txt") or time()-filemtime("GameEngine/Prevention/market.txt")>50) {
$this->marketComplete();
}
if(!file_exists("GameEngine/Prevention/research.txt") or time()-filemtime("GameEngine/Prevention/research.txt")>10) {
if(!file_exists("GameEngine/Prevention/research.txt") or time()-filemtime("GameEngine/Prevention/research.txt")>50) {
$this->researchComplete();
}
if(!file_exists("GameEngine/Prevention/training.txt") or time()-filemtime("GameEngine/Prevention/training.txt")>10) {
if(!file_exists("GameEngine/Prevention/training.txt") or time()-filemtime("GameEngine/Prevention/training.txt")>50) {
$this->trainingComplete();
}
if(!file_exists("GameEngine/Prevention/starvation.txt") or time()-filemtime("GameEngine/Prevention/starvation.txt")>10) {
if(!file_exists("GameEngine/Prevention/starvation.txt") or time()-filemtime("GameEngine/Prevention/starvation.txt")>50) {
$this->starvation();
}
if(!file_exists("GameEngine/Prevention/celebration.txt") or time()-filemtime("GameEngine/Prevention/celebration.txt")>10) {
if(!file_exists("GameEngine/Prevention/celebration.txt") or time()-filemtime("GameEngine/Prevention/celebration.txt")>50) {
$this->celebrationComplete();
}
if(!file_exists("GameEngine/Prevention/sendunits.txt") or time()-filemtime("GameEngine/Prevention/sendunits.txt")>10) {
if(!file_exists("GameEngine/Prevention/sendunits.txt") or time()-filemtime("GameEngine/Prevention/sendunits.txt")>50) {
$this->sendunitsComplete();
}
if(!file_exists("GameEngine/Prevention/loyalty.txt") or time()-filemtime("GameEngine/Prevention/loyalty.txt")>50) {
$this->loyaltyRegeneration();
}
if(!file_exists("GameEngine/Prevention/sendreinfunits.txt") or time()-filemtime("GameEngine/Prevention/sendreinfunits.txt")>10) {
if(!file_exists("GameEngine/Prevention/sendreinfunits.txt") or time()-filemtime("GameEngine/Prevention/sendreinfunits.txt")>50) {
$this->sendreinfunitsComplete();
}
if(!file_exists("GameEngine/Prevention/returnunits.txt") or time()-filemtime("GameEngine/Prevention/returnunits.txt")>51) {
if(!file_exists("GameEngine/Prevention/returnunits.txt") or time()-filemtime("GameEngine/Prevention/returnunits.txt")>50) {
$this->returnunitsComplete();
}
if(!file_exists("GameEngine/Prevention/settlers.txt") or time()-filemtime("GameEngine/Prevention/settlers.txt")>10) {
if(!file_exists("GameEngine/Prevention/settlers.txt") or time()-filemtime("GameEngine/Prevention/settlers.txt")>50) {
$this->sendSettlersComplete();
}
$this->updateGeneralAttack();
+3 -3
View File
@@ -5,10 +5,10 @@
//ROMAN UNITS
//STOPPED ON LEVEL 20! -> http://travian.kirilloid.ru/hero.php#unit=1
//STOPPED ON LEVEL 50! -> http://travian.kirilloid.ru/hero.php#unit=1
$h1_full = array(array('wood' => 240, 'clay' => 200, 'iron' => 300, 'crop' => 60, 'time' => 3200), array('wood' => 640, 'clay' => 550, 'iron' => 780, 'crop' => 210, 'time' => 6400), array('wood' => 1100, 'clay' => 910, 'iron' => 1300, 'crop' => 360, 'time' => 9600), array('wood' => 1500, 'clay' => 1300, 'iron' => 1900, 'crop' => 510, 'time' => 12800), array('wood' => 2000, 'clay' => 1700, 'iron' => 2500, 'crop' => 670, 'time' => 16000), array('wood' => 2500, 'clay' => 2200, 'iron' => 3100, 'crop' => 850, 'time' =>
19200), array('wood' => 3100, 'clay' => 2600, 'iron' => 3800, 'crop' => 1000, 'time' => 22400), array('wood' => 3600, 'clay' => 3100, 'iron' => 4400, 'crop' => 1200, 'time' => 25580), array('wood' => 4200, 'clay' => 3600, 'iron' => 5100, 'crop' => 1400, 'time' => 28800), array('wood' => 4800, 'clay' => 4100, 'iron' => 5900, 'crop' => 1600, 'time' => 32000), array('wood' => 5400, 'clay' => 4600, 'iron' => 6600, 'crop' => 1800, 'time' => 35200), array('wood' => 6000, 'clay' => 5100, 'iron' => 7400, 'crop' => 2000, 'time' => 38400), array('wood' => 5400, 'clay' => 4600, 'iron' => 6600, 'crop' => 1800, 'time' => 35200), array('wood' => 6000, 'clay' => 5100, 'iron' => 7400, 'crop' => 2000, 'time' => 38400), array('wood' => 6700, 'clay' => 5700, 'iron' => 8100, 'crop' => 2200, 'time' => 41600), array('wood' => 7300, 'clay' => 6200, 'iron' => 8900, 'crop' => 2400, 'time' => 44800), array('wood' => 8000, 'clay' => 6800, 'iron' => 9700, 'crop' => 2700, 'time' => 48000), array('wood' => 8600, 'clay' => 7400, 'iron' => 10500, 'crop' => 2900, 'time' => 51200), array('wood' => 9300, 'clay' => 7900, 'iron' => 11500, 'crop' => 3100, 'time' => 54400), array('wood' => 10000, 'clay' => 8500, 'iron' => 12000, 'crop' => 3300, 'time' => 57600), array('wood' => 10500, 'clay' => 9100, 'iron' => 13000, 'crop' => 3600, 'time' => 60800), array('wood' => 11500, 'clay' => 9700, 'iron' => 14000, 'crop' => 3800, 'time' => 64000), array('wood' => 12000, 'clay' => 10500, 'iron' => 15000, 'crop' => 4000, 'time' => 67200));
19200), array('wood' => 3100, 'clay' => 2600, 'iron' => 3800, 'crop' => 1000, 'time' => 22400), array('wood' => 3600, 'clay' => 3100, 'iron' => 4400, 'crop' => 1200, 'time' => 25580), array('wood' => 4200, 'clay' => 3600, 'iron' => 5100, 'crop' => 1400, 'time' => 28800), array('wood' => 4800, 'clay' => 4100, 'iron' => 5900, 'crop' => 1600, 'time' => 32000), array('wood' => 5400, 'clay' => 4600, 'iron' => 6600, 'crop' => 1800, 'time' => 35200), array('wood' => 6000, 'clay' => 5100, 'iron' => 7400, 'crop' => 2000, 'time' => 38400), array('wood' => 5400, 'clay' => 4600, 'iron' => 6600, 'crop' => 1800, 'time' => 35200), array('wood' => 6000, 'clay' => 5100, 'iron' => 7400, 'crop' => 2000, 'time' => 38400), array('wood' => 6700, 'clay' => 5700, 'iron' => 8100, 'crop' => 2200, 'time' => 41600), array('wood' => 7300, 'clay' => 6200, 'iron' => 8900, 'crop' => 2400, 'time' => 44800), array('wood' => 8000, 'clay' => 6800, 'iron' => 9700, 'crop' => 2700, 'time' => 48000), array('wood' => 8600, 'clay' => 7400, 'iron' => 10500, 'crop' => 2900, 'time' => 51200), array('wood' => 9300, 'clay' => 7900, 'iron' => 11500, 'crop' => 3100, 'time' => 54400), array('wood' => 10000, 'clay' => 8500, 'iron' => 12000, 'crop' => 3300, 'time' => 57600), array('wood' => 10500, 'clay' => 9100, 'iron' => 13000, 'crop' => 3600, 'time' => 60800), array('wood' => 11500, 'clay' => 9700, 'iron' => 14000, 'crop' => 3800, 'time' => 64000), array('wood' => 12000, 'clay' => 10500, 'iron' => 15000, 'crop' => 4000, 'time' => 67200), array('wood' => 13000, 'clay' => 11000, 'iron' => 15500, 'crop' => 4300, 'time' => 70400), array('wood' => 13500, 'clay' => 11500, 'iron' => 16500, 'crop' => 4500, 'time' => 73600), array('wood' => 14500, 'clay' => 12000, 'iron' => 17500, 'crop' => 4800, 'time' => 76800), array('wood' => 15000, 'clay' => 13000, 'iron' => 18500, 'crop' => 5000, 'time' => 80000), array('wood' => 16000, 'clay' => 13500, 'iron' => 19500, 'crop' => 5300, 'time' => 83200), array('wood' => 16500, 'clay' => 14000, 'iron' => 20500, 'crop' => 5500, 'time' => 86400), array('wood' => 17500, 'clay' => 15000, 'iron' => 21500, 'crop' => 5800, 'time' => 89600), array('wood' => 18000, 'clay' => 15500, 'iron' => 22000, 'crop' => 6100, 'time' => 92800), array('wood' => 19000, 'clay' => 16000, 'iron' => 23000, 'crop' => 6300, 'time' => 96000), array('wood' => 19500, 'clay' => 17000, 'iron' => 24000, 'crop' => 6600, 'time' => 99200), array('wood' => 20500, 'clay' => 17500, 'iron' => 25000, 'crop' => 6800, 'time' => 102400), array('wood' => 21500, 'clay' => 18000, 'iron' => 26000, 'crop' => 7100, 'time' => 105600), array('wood' => 22000, 'clay' => 19000, 'iron' => 27000, 'crop' => 7400, 'time' => 108800), array('wood' => 23000, 'clay' => 19500, 'iron' => 28000, 'crop' => 7700, 'time' => 112000), array('wood' => 24000, 'clay' => 20500, 'iron' => 29000, 'crop' => 7900, 'time' => 115200), array('wood' => 24500, 'clay' => 21000, 'iron' => 30000, 'crop' => 8200, 'time' => 118400), array('wood' => 25500, 'clay' => 21500, 'iron' => 31000, 'crop' => 8500, 'time' => 121600), array('wood' => 26500, 'clay' => 22500, 'iron' => 32000, 'crop' => 8800, 'time' => 124800), array('wood' => 27000, 'clay' => 23000, 'iron' => 33000, 'crop' => 9100, 'time' => 128000), array('wood' => 28000, 'clay' => 24000, 'iron' => 34000, 'crop' => 9300, 'time' => 131200), array('wood' => 29000, 'clay' => 24500, 'iron' => 35500, 'crop' => 9600, 'time' => 134400), array('wood' => 29500, 'clay' => 25500, 'iron' => 36500, 'crop' => 9900, 'time' => 137600), array('wood' => 30500, 'clay' => 26000, 'iron' => 37500, 'crop' => 10000, 'time' => 140800), array('wood' => 31500, 'clay' => 27000, 'iron' => 38500, 'crop' => 10500, 'time' => 144000), array('wood' => 32500, 'clay' => 27500, 'iron' => 39500, 'crop' => 11000, 'time' => 147200), array('wood' => 34000, 'clay' => 28500, 'iron' => 40500, 'crop' => 11000, 'time' => 150400), array('wood' => 34000, 'clay' => 29000, 'iron' => 41500, 'crop' => 11500, 'time' => 153600), array('wood' => 35000, 'clay' => 30000, 'iron' => 43000, 'crop' => 11500, 'time' => 156800), array('wood' => 36000, 'clay' => 30500, 'iron' => 44000, 'crop' => 12000, 'time' => 160000), array('wood' => 37000, 'clay' => 31500, 'iron' => 45000, 'crop' => 12500, 'time' => 163200));
//GAUL UNITS
$h21_full = array(array('wood' => 200, 'clay' => 260, 'iron' => 110, 'clay' => 60, 'time' => 2080), array('wood' => 550, 'clay' => 690, 'iron' => 330, 'clay' => 210, 'time' => 4160), array('wood' => 910, 'clay' => 1100, 'iron' => 550, 'clay' => 360, 'time' => 6240), array('wood' => 1300, 'clay' => 1600, 'iron' => 790, 'clay' => 510, 'time' => 8320), array('wood' => 1700, 'clay' => 2200, 'iron' => 1000, 'clay' => 670, 'time' => 10400), array('wood' => 2200, 'clay' => 2700, 'iron' => 1300, 'clay' =>
850, 'time' => 12480), array('wood' => 2600, 'clay' => 3300, 'iron' => 1600, 'clay' => 1000, 'time' => 14560), array('wood' => 3100, 'clay' => 3900, 'iron' => 1900, 'clay' => 1200, 'time' => 16640), array('wood' => 3600, 'clay' => 4500, 'iron' => 2200, 'clay' => 1400, 'time' => 18720), array('wood' => 4100, 'clay' => 5200, 'iron' => 2500, 'clay' => 1600, 'time' => 20800), array('wood' => 4600, 'clay' => 5800, 'iron' => 2800, 'clay' => 1800, 'time' => 22880), array('wood' => 5100, 'clay' => 6500,
+4
View File
@@ -83,6 +83,10 @@ foreach($posts as $po) {
$owner = $database->getUserArray($po['owner'],1);
$allianceinfo = $database->getAlliance($owner['alliance']);
$input = $po['post'];
$alliance = $po['alliance0'];
$player = $po['player0'];
$coor = $po['coor0'];
$report = $po['report0'];
include("GameEngine/BBCode.php");
$bbcode_post = stripslashes(nl2br($bbcoded));
+22 -14
View File
@@ -39,13 +39,17 @@
} else {
foreach($artefact1 as $artefact){
$coor2 = $database->getCoor($artefact['vref']);
if($artefact['size'] == 1) {
$reqlvl = 10;
$effect = "village";
} elseif($artefact['size'] == 2 or 3) {
$reqlvl = 20;
$effect = "account";
}
if($artefact['size'] == 1 && $artefact['type'] != 11){
$reqlvl = 10;
$effect = "village";
}else{
if($artefact['type'] != 11){
$reqlvl = 20;
}else{
$reqlvl = 10;
}
$effect = "account";
}
echo '<tr><td class="icon"><img class="artefact_icon_' . $artefact['type'] . '" src="img/x.gif"></td>';
echo '<td class="nam">
<a href="build.php?id=' . $id . '&show='.$artefact['id'].'">' . $artefact['name'] . '</a> <span class="bon">' . $artefact['effect'] . '</span>
@@ -123,13 +127,17 @@
echo '<td class="nam">';
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span>';
echo '<div class="info">';
if($row['size'] == 1) {
$reqlvl = 10;
$effect = "village";
} elseif($row['size'] == 2 or $row['size'] == 3) {
$reqlvl = 20;
$effect = "account";
}
if($row['size'] == 1 && $row['type'] != 11){
$reqlvl = 10;
$effect = "village";
}else{
if($row['type'] != 11){
$reqlvl = 20;
}else{
$reqlvl = 10;
}
$effect = "account";
}
echo '<div class="info">Treasury <b>' . $reqlvl . '</b>, Effect <b>' . $effect . '</b>';
echo '</div></td><td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
echo '<td class="dist">'.getDistance($coor['x'], $coor['y'], $coor2['x'], $coor2['y']).'</td>';