diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index caac47af..24ead1d6 100755 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -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 = []; diff --git a/GameEngine/Village.php b/GameEngine/Village.php index 2e687fca..ba83de5b 100755 --- a/GameEngine/Village.php +++ b/GameEngine/Village.php @@ -317,5 +317,5 @@ class Village { }; $village = new Village; $building = new Building; -include_once("Automation.php"); +//include_once("Automation.php"); ?> diff --git a/dorf1.php b/dorf1.php index 05a029a7..67703329 100644 --- a/dorf1.php +++ b/dorf1.php @@ -38,7 +38,7 @@ else $building->procBuild($_GET); - + diff --git a/login.php b/login.php index 31fede91..5800a093 100644 --- a/login.php +++ b/login.php @@ -48,7 +48,7 @@ $_SESSION[ 'csrf' ] = $key; - + diff --git a/unx.js b/unx.js index 1f0967c0..b332ba08 100644 --- a/unx.js +++ b/unx.js @@ -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;}