mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
New automation
+Separated Automation.php from the UI and users classes NOTE: This is only a test, it'll not absolutely be as it is in this commit in the final version.
This commit is contained in:
@@ -16,6 +16,26 @@
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("Database.php");
|
||||
include_once("Data/buidata.php");
|
||||
include_once("Data/unitdata.php");
|
||||
include_once("Data/hero_full.php");
|
||||
include_once("Units.php");
|
||||
include_once("Battle.php");
|
||||
include_once("Technology.php");
|
||||
include_once("Ranking.php");
|
||||
include_once("Generator.php");
|
||||
include_once("Multisort.php");
|
||||
|
||||
$autoprefix = '';
|
||||
for ($i = 0; $i < 5; $i++) {
|
||||
$autoprefix = str_repeat('../', $i);
|
||||
if (file_exists($autoprefix.'autoloader.php')) {
|
||||
// we have our path, let's leave
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
class Automation {
|
||||
|
||||
private $bountyresarray = [];
|
||||
|
||||
@@ -317,5 +317,5 @@ class Village {
|
||||
};
|
||||
$village = new Village;
|
||||
$building = new Building;
|
||||
include_once("Automation.php");
|
||||
//include_once("Automation.php");
|
||||
?>
|
||||
|
||||
@@ -38,7 +38,7 @@ else $building->procBuild($_GET);
|
||||
<meta http-equiv="imagetoolbar" content="no" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<script src="mt-full.js?0faab" type="text/javascript"></script>
|
||||
<script src="unx.js?f4b7h" type="text/javascript"></script>
|
||||
<script src="unx.js?f4b7i" type="text/javascript"></script>
|
||||
<script src="new.js?0faab" type="text/javascript"></script>
|
||||
<link href="<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7j" rel="stylesheet" type="text/css" />
|
||||
<link href="<?php echo GP_LOCATE; ?>lang/en/lang.css?e21d2" rel="stylesheet" type="text/css" />
|
||||
|
||||
@@ -48,7 +48,7 @@ $_SESSION[ 'csrf' ] = $key;
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<script src="mt-core.js?0faab" type="text/javascript"></script>
|
||||
<script src="mt-more.js?0faab" type="text/javascript"></script>
|
||||
<script src="unx.js?f4b7h" type="text/javascript"></script>
|
||||
<script src="unx.js?f4b7i" type="text/javascript"></script>
|
||||
<script src="new.js?0faab" type="text/javascript"></script>
|
||||
<link href="<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7h" rel="stylesheet" type="text/css" />
|
||||
<link href="<?php echo GP_LOCATE; ?>lang/en/lang.css?f4b7d" rel="stylesheet" type="text/css" />
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
window.dlang = 'ar'; // edit it to en if fullscreen map not working
|
||||
window.reloading = false;
|
||||
var xhttp = new XMLHttpRequest();
|
||||
var timer=new Object();var ab=new Object();var bb=new Object();var cb=db();var eb=0;var auto_reload=1;var fb=new Object();var is_opera=window.opera!==undefined;var is_ie=document.all!==undefined&&window.opera===undefined;var is_ie6p=document.compatMode!==undefined&&document.all!==undefined&&window.opera===undefined;var is_ie7=document.documentElement!==undefined&&document.documentElement.style.maxHeight!==undefined;var is_ie6=is_ie6p&&!is_ie7;var is_ff2p=window.Iterator!==undefined;var is_ff3p=document.getElementsByClassName!==undefined;var is_ff2=is_ff2p&&!is_ff3p
|
||||
|
||||
automation();
|
||||
function automation() {
|
||||
this.xhttp.open("GET", "GameEngine/Automation.php", true);
|
||||
this.xhttp.send();
|
||||
setTimeout(function(){ automation(); }, 1500);
|
||||
}
|
||||
function gb(){return hb('height');}
|
||||
function ib(){return hb('width');}
|
||||
function hb(jb){var kb=0,lb=0;if(typeof(window.innerWidth)=='number'){kb=window.innerWidth;lb=window.innerHeight;}
|
||||
|
||||
Reference in New Issue
Block a user