From 18c423dd5e77714ce4244271bf77ccf044f05061 Mon Sep 17 00:00:00 2001 From: TPLinux Date: Thu, 29 Jun 2017 06:03:17 +0000 Subject: [PATCH 01/33] Fixing finish all with tow gold from dorf(1,2) --- GameEngine/Building.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameEngine/Building.php b/GameEngine/Building.php index 98242098..f78ab981 100755 --- a/GameEngine/Building.php +++ b/GameEngine/Building.php @@ -97,7 +97,7 @@ class Building { } } if(isset($get['buildingFinish']) && $session->plus) { - if($session->gold >= 2 && $session->sit == 0) { + if(intval($session->gold) >= 2 && $session->sit == 0) { // edit by TPLinux $this->finishAll(); } } From 57928f4c3ce10b012e39adfa0f2ec0e065caa984 Mon Sep 17 00:00:00 2001 From: TPLinux Date: Thu, 29 Jun 2017 08:19:46 +0000 Subject: [PATCH 02/33] Fix reload crush bug --- Templates/Building.tpl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Templates/Building.tpl b/Templates/Building.tpl index e85be398..73c98f1c 100644 --- a/Templates/Building.tpl +++ b/Templates/Building.tpl @@ -8,11 +8,12 @@ ## Copyright: TravianX (c) 2010-2011. All rights reserved. ## ## ## ################################################################################# +$building->loadBuilding(); ?> - +NewBuilding){ ?> - - +
+
gold >= 2) { @@ -57,3 +58,4 @@
+ From 83c26c024bf74c9ecaabf13810078e9cf3828c5e Mon Sep 17 00:00:00 2001 From: TPLinux Date: Thu, 29 Jun 2017 08:22:28 +0000 Subject: [PATCH 03/33] Fix reload crush bug --- GameEngine/Building.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/GameEngine/Building.php b/GameEngine/Building.php index f78ab981..16ce3ae0 100755 --- a/GameEngine/Building.php +++ b/GameEngine/Building.php @@ -7,7 +7,7 @@ ## Version: 22.06.2015 ## ## Filename Building.php ## ## Developed by: Mr.php , Advocaite , brainiacX , yi12345 , Shadow , ronix ## -## Fixed by: Shadow - STARVATION , HERO FIXED COMPL. ## +## Fixed by: Shadow - STARVATION , HERO FIXED COMPL., TPLinux ## ## Fixed by: InCube - double troops ## ## License: TravianZ Project ## ## Copyright: TravianZ (c) 2010-2015. All rights reserved. ## @@ -97,7 +97,7 @@ class Building { } } if(isset($get['buildingFinish']) && $session->plus) { - if(intval($session->gold) >= 2 && $session->sit == 0) { // edit by TPLinux + if(intval($session->gold) >= 2 && $session->sit == 0) { $this->finishAll(); } } @@ -278,7 +278,7 @@ class Building { return $build; } - private function loadBuilding() { + public function loadBuilding() { global $database,$village,$session; $this->buildArray = $database->getJobs($village->wid); $this->allocated = count($this->buildArray); @@ -301,8 +301,11 @@ class Building { } } } + // echo var_dump($this->buildArray); $this->NewBuilding = true; - } + }else{ + $this->NewBuilding = false; + } } private function removeBuilding($d) { From 9e2534c06a539d83ced8e60a6ba9dcad5ebbdc0d Mon Sep 17 00:00:00 2001 From: TPLinux Date: Thu, 29 Jun 2017 08:26:00 +0000 Subject: [PATCH 04/33] Fix reload crush bug --- unx.js | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/unx.js b/unx.js index f6fa7496..9d957a29 100644 --- a/unx.js +++ b/unx.js @@ -58,14 +58,37 @@ for(i=1;;i++){pb=document.getElementById("timer"+i);if(pb!=null){bb[i]=new Objec else{break;} } executeCounter();} -function executeCounter(){for(var i in ab){wb=db()-cb;xb=rb(ab[i].counter_time+wb);ab[i].node.innerHTML=xb;} -for(i in bb){wb=db()-cb;yb=bb[i].counter_time-wb; -if(eb==0&&yb<1){eb=1;if(auto_reload==1){setTimeout("document.location.reload()",1000);} -else if(auto_reload==0){setTimeout("mreload()",1000);} -} -else{} -xb=rb(yb);bb[i].node.innerHTML=xb;} -if(eb==0){window.setTimeout("executeCounter()",1000);} +function executeCounter(){ + for(var i in ab){ + wb = db() - cb; + xb = rb(ab[i].counter_time + wb); + ab[i].node.innerHTML = xb; + } + for(i in bb){ + wb = db() - cb; + yb = bb[i].counter_time - wb; + // console.log('yb: ' + yb); + if(eb == 0 && yb < 0){ + bb[i] = null; + eb = 1; + setTimeout(function(){window.location.href = ''},1000); + } + // eb = 1; + // if(auto_reload == 1){ + // setTimeout("document.location.reload()",1000); + // } + // else if(auto_reload==0){ + // setTimeout("mreload()",1000); + // } + //} + else{ + xb=rb(yb); + bb[i].node.innerHTML = xb; + } + if(eb == 0 && yb >= 0){ + setTimeout("executeCounter()",1000); + } + } } function mb(zb){pb=document.getElementById(zb);if(pb!=null){fb[zb]=new Object();var $b=pb.innerHTML.match(/(\d+)\/(\d+)/);element=$b[0].split("/");_b=parseInt(element[0]);ac=parseInt(element[1]);bc=pb.title;if(bc!=0){cc=nb();timer[zb]=new Object();timer[zb].start=cc;timer[zb].production=bc;timer[zb].start_res=_b;timer[zb].max_res=ac;timer[zb].ms=3600000/bc;dc=100;if(timer[zb].ms Date: Thu, 29 Jun 2017 08:32:11 +0000 Subject: [PATCH 05/33] return it to default , no bugs for me now --- unx.js | 39 ++++++++------------------------------- 1 file changed, 8 insertions(+), 31 deletions(-) diff --git a/unx.js b/unx.js index 9d957a29..f6fa7496 100644 --- a/unx.js +++ b/unx.js @@ -58,37 +58,14 @@ for(i=1;;i++){pb=document.getElementById("timer"+i);if(pb!=null){bb[i]=new Objec else{break;} } executeCounter();} -function executeCounter(){ - for(var i in ab){ - wb = db() - cb; - xb = rb(ab[i].counter_time + wb); - ab[i].node.innerHTML = xb; - } - for(i in bb){ - wb = db() - cb; - yb = bb[i].counter_time - wb; - // console.log('yb: ' + yb); - if(eb == 0 && yb < 0){ - bb[i] = null; - eb = 1; - setTimeout(function(){window.location.href = ''},1000); - } - // eb = 1; - // if(auto_reload == 1){ - // setTimeout("document.location.reload()",1000); - // } - // else if(auto_reload==0){ - // setTimeout("mreload()",1000); - // } - //} - else{ - xb=rb(yb); - bb[i].node.innerHTML = xb; - } - if(eb == 0 && yb >= 0){ - setTimeout("executeCounter()",1000); - } - } +function executeCounter(){for(var i in ab){wb=db()-cb;xb=rb(ab[i].counter_time+wb);ab[i].node.innerHTML=xb;} +for(i in bb){wb=db()-cb;yb=bb[i].counter_time-wb; +if(eb==0&&yb<1){eb=1;if(auto_reload==1){setTimeout("document.location.reload()",1000);} +else if(auto_reload==0){setTimeout("mreload()",1000);} +} +else{} +xb=rb(yb);bb[i].node.innerHTML=xb;} +if(eb==0){window.setTimeout("executeCounter()",1000);} } function mb(zb){pb=document.getElementById(zb);if(pb!=null){fb[zb]=new Object();var $b=pb.innerHTML.match(/(\d+)\/(\d+)/);element=$b[0].split("/");_b=parseInt(element[0]);ac=parseInt(element[1]);bc=pb.title;if(bc!=0){cc=nb();timer[zb]=new Object();timer[zb].start=cc;timer[zb].production=bc;timer[zb].start_res=_b;timer[zb].max_res=ac;timer[zb].ms=3600000/bc;dc=100;if(timer[zb].ms Date: Thu, 29 Jun 2017 08:42:35 +0000 Subject: [PATCH 06/33] Fix reload crush bug --- unx.js | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/unx.js b/unx.js index f6fa7496..a84157eb 100644 --- a/unx.js +++ b/unx.js @@ -58,15 +58,39 @@ for(i=1;;i++){pb=document.getElementById("timer"+i);if(pb!=null){bb[i]=new Objec else{break;} } executeCounter();} -function executeCounter(){for(var i in ab){wb=db()-cb;xb=rb(ab[i].counter_time+wb);ab[i].node.innerHTML=xb;} -for(i in bb){wb=db()-cb;yb=bb[i].counter_time-wb; -if(eb==0&&yb<1){eb=1;if(auto_reload==1){setTimeout("document.location.reload()",1000);} -else if(auto_reload==0){setTimeout("mreload()",1000);} -} -else{} -xb=rb(yb);bb[i].node.innerHTML=xb;} -if(eb==0){window.setTimeout("executeCounter()",1000);} +function executeCounter(){ + for(var i in ab){ + wb = db() - cb; + xb = rb(ab[i].counter_time + wb); + ab[i].node.innerHTML = xb; + } + for(i in bb){ + wb = db() - cb; + yb = bb[i].counter_time - wb; + // console.log('yb: ' + yb); + if(eb == 0 && yb <= 0){ + bb[i] = null; + eb = 1; + setTimeout(function(){window.location.href = ''},1000); + } + // eb = 1; + // if(auto_reload == 1){ + // setTimeout("document.location.reload()",1000); + // } + // else if(auto_reload==0){ + // setTimeout("mreload()",1000); + // } + //} + else{ + xb=rb(yb); + bb[i].node.innerHTML = xb; + } + if(eb == 0 && yb >= 0){ + setTimeout("executeCounter()",1000); + } + } } + function mb(zb){pb=document.getElementById(zb);if(pb!=null){fb[zb]=new Object();var $b=pb.innerHTML.match(/(\d+)\/(\d+)/);element=$b[0].split("/");_b=parseInt(element[0]);ac=parseInt(element[1]);bc=pb.title;if(bc!=0){cc=nb();timer[zb]=new Object();timer[zb].start=cc;timer[zb].production=bc;timer[zb].start_res=_b;timer[zb].max_res=ac;timer[zb].ms=3600000/bc;dc=100;if(timer[zb].ms Date: Thu, 29 Jun 2017 08:47:18 +0000 Subject: [PATCH 07/33] Update README --- README | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README b/README index b1a8b6e8..1f7eaf50 100644 --- a/README +++ b/README @@ -138,3 +138,9 @@ TienTN changes: I found out that unx.js handle a static map size(400x400). So I fixed this with a m_c.world_max variable from mapview.tpl and changed the unx.js accordingly. 7. Fix the constructor global variable missing in Session.php + + +TPLinux Changes: +1. Solve FinishAll with two gold issue/bug +2. Solve Reload crush issue after building construction finished + From 444037f7ff6606fbf9896787ce2a6b59b4b531cb Mon Sep 17 00:00:00 2001 From: TPLinux Date: Thu, 29 Jun 2017 15:53:53 +0000 Subject: [PATCH 08/33] Fix in_array bug in show more buldings in WWV --- Templates/Build/avaliable.tpl | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Templates/Build/avaliable.tpl b/Templates/Build/avaliable.tpl index 28873714..b1511277 100644 --- a/Templates/Build/avaliable.tpl +++ b/Templates/Build/avaliable.tpl @@ -171,14 +171,16 @@ $query = mysql_query("SELECT * FROM ".TB_PREFIX."vdata WHERE owner = ".$user."") while($villaggi_array = mysql_fetch_array($query)){ //loop structure village - $query1 = mysql_query("SELECT * FROM ".TB_PREFIX."fdata WHERE vref = ".$villaggi_array['wref'].""); - $strutture= mysql_fetch_array($query1); - + $query1 = mysql_query("SELECT * FROM ".TB_PREFIX."fdata WHERE vref = ".$villaggi_array['wref'].""); + $strutture= mysql_fetch_array($query1); + if($strutture == false) + $strutture = []; //search Castle in array structure village -$test = in_array(26,$strutture); +$test = in_array(26,$strutture); + if ($test){ - break; - } + break; +} } @@ -297,7 +299,10 @@ while($villaggi_array = mysql_fetch_array($query)){ $strutture= mysql_fetch_array($query1); //search Castle in array structure village -$test = in_array(26,$strutture); + if($strutture !== false) + $test = in_array(26,$strutture); + else + $test = in_array(26,[]); if ($test){ break; } @@ -466,4 +471,4 @@ function show_build_list(list) { - \ No newline at end of file + From 3961ea2a0c0c111f284fff88429af893d5868f39 Mon Sep 17 00:00:00 2001 From: TPLinux Date: Thu, 29 Jun 2017 16:30:40 +0000 Subject: [PATCH 09/33] Fi winner redirection --- GameEngine/Automation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index 792486f8..abb3585c 100755 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -35,7 +35,7 @@ class Automation { $isThere = mysql_num_rows($q); if($isThere > 0) { - header('Location: /winner.php'); + header('Location: winner.php'); }else{ ## there is no winner } From 0423b65a7f1ca283f420776d6b53462d7c8fb00a Mon Sep 17 00:00:00 2001 From: TPLinux Date: Thu, 29 Jun 2017 16:32:23 +0000 Subject: [PATCH 10/33] Fix winner WW image path --- winner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winner.php b/winner.php index 3de7948f..9b6f0749 100644 --- a/winner.php +++ b/winner.php @@ -193,7 +193,7 @@ $q = "
- +

Dear Players,

From 7c82f25745bc8cfcdfc6d804a940679af864346f Mon Sep 17 00:00:00 2001 From: TPLinux Date: Thu, 29 Jun 2017 16:33:53 +0000 Subject: [PATCH 11/33] Update README --- README | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README b/README index 1f7eaf50..4833bd7c 100644 --- a/README +++ b/README @@ -141,6 +141,8 @@ TienTN changes: TPLinux Changes: -1. Solve FinishAll with two gold issue/bug -2. Solve Reload crush issue after building construction finished - +1. Fix FinishAll with two gold issue/bug +2. Fix Reload crush issue after building construction finished +3. Fix in_array bug in show more buldings in WWV +4. Fix winner redirection +5. Fix winner WW image path From 5f0af8bf1fe52be3c842e03ce4c71ab96627747b Mon Sep 17 00:00:00 2001 From: TPLinux Date: Fri, 30 Jun 2017 00:41:13 +0000 Subject: [PATCH 12/33] Convert 'isWinner();

Account transactions

-uid."'") or die(mysql_error()); @@ -89,7 +89,7 @@ $golds1 = mysql_fetch_array($MyGold);   Account Balance (old) -
+
 
 
 
@@ -105,14 +105,14 @@ $golds1 = mysql_fetch_array($MyGold);   Account Balance (new)
 
 
-
+

Please verify the information.
It will let us know if the data is incorrect.

Please mail your username, package, order time and email used to our billing address.

-   Account Balance (old) -
+
 
 
 
@@ -153,13 +153,13 @@ $golds1 = mysql_fetch_array($MyGold);   Account Balance (new)
 
 
-
+

Please verify the information.
It will let us know if the data is incorrect.

Please mail your username, package, order time and email used to our billing address.

-   Account Balance (old) -
+
 
 
 
@@ -200,13 +200,13 @@ $golds1 = mysql_fetch_array($MyGold);   Account Balance (new)
 
 
-
+

Please verify the information.
It will let us know if the data is incorrect.

Please mail your username, package, order time and email used to our billing address.

-   Account Balance (old) -
+
 
 
 
@@ -247,13 +247,13 @@ $golds1 = mysql_fetch_array($MyGold);   Account Balance (new)
 
 
-
+

Please verify the information.
It will let us know if the data is incorrect.

Please mail your username, package, order time and email used to our billing address.

-   Account Balance (old) -
+
 
 
 
@@ -294,13 +294,13 @@ $golds1 = mysql_fetch_array($MyGold);   Account Balance (new)
 
 
-
+

Please verify the information.
It will let us know if the data is incorrect.

Please mail your username, package, order time and email used to our billing address.

-  Current account balance
     
Account inquiry
-
+

Please verify the information.
It will let us know if the data is incorrect.

Please mail your username, package, order time and email used to our billing address.

- - +
From 12f12631ccddabf027e83b3aa9d0e0f1c0153762 Mon Sep 17 00:00:00 2001 From: TPLinux Date: Fri, 30 Jun 2017 00:42:03 +0000 Subject: [PATCH 13/33] Update README --- README | 1 + 1 file changed, 1 insertion(+) diff --git a/README b/README index 4833bd7c..979f70a2 100644 --- a/README +++ b/README @@ -146,3 +146,4 @@ TPLinux Changes: 3. Fix in_array bug in show more buldings in WWV 4. Fix winner redirection 5. Fix winner WW image path +6. Convert ' Date: Fri, 30 Jun 2017 00:58:08 +0000 Subject: [PATCH 14/33] Fixing ( Building shape not upgraded after Construct finish ) --- Templates/Building.tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Templates/Building.tpl b/Templates/Building.tpl index 73c98f1c..2f0ca18e 100644 --- a/Templates/Building.tpl +++ b/Templates/Building.tpl @@ -58,4 +58,6 @@ $building->loadBuilding(); - + From 53095348e2ccac03db84d9e5322c3bd997fb7a85 Mon Sep 17 00:00:00 2001 From: TPLinux Date: Fri, 30 Jun 2017 00:58:37 +0000 Subject: [PATCH 15/33] Update README --- README | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README b/README index 979f70a2..ec6e5e72 100644 --- a/README +++ b/README @@ -147,3 +147,6 @@ TPLinux Changes: 4. Fix winner redirection 5. Fix winner WW image path 6. Convert ' Date: Fri, 30 Jun 2017 01:34:36 +0000 Subject: [PATCH 16/33] Change multihunter msg color to orange Multi hunter id is 5 ... so i added class to it of id == 5 so .. you have to choice ... first : keep multihunter id is 5 second: if multihunter id changed in db ... you can change the condition in line 62 : replace 5 with MH id --- Templates/Message/inbox.tpl | 157 +++++++++++++++++++----------------- 1 file changed, 82 insertions(+), 75 deletions(-) diff --git a/Templates/Message/inbox.tpl b/Templates/Message/inbox.tpl index 9d2380e6..3386e502 100644 --- a/Templates/Message/inbox.tpl +++ b/Templates/Message/inbox.tpl @@ -1,16 +1,16 @@ -
-

Messages

- -
- - - - - - + + inbox1) >= $i) { + if($message->inbox1[$i-1]['owner'] <= 1) { + echo ""; + }elseif($message->inbox1[$i-1]['owner'] == 5){ + echo ""; + } + else { + echo ""; + } + echo " + + "; + } + else { + echo " + "; + } + } + $name++; + } + if(count($message->inbox1) == 0) { + echo ""; + } + ?> +
SubjectSenderSent
- +

Messages

+ + + + + + + + - + - inbox1) >= $i) { - if($message->inbox1[$i-1]['owner'] <= 1) { - echo ""; - } - else { - echo ""; - } - echo " - - "; - } - else { - echo " - "; - } - } - $name++; - } - if(count($message->inbox1) == 0) { - echo ""; - } - ?> -
SubjectSenderSent
+ uid."'") or die(mysql_error()); $golds = mysql_fetch_array($MyGold); $date2=strtotime("NOW"); @@ -18,67 +18,74 @@ include("menu.tpl"); - + - plus) { echo ""; } ?> - - inbox1) < 10) { - echo "«»"; - } - else if (!isset($_GET['s']) && count($message->inbox1) > 10) { - echo "«»"; - } - else if(isset($_GET['s']) && count($message->inbox1) > $_GET['s']) { - if(count($message->inbox1) > ($_GET['s']+10) && $_GET['s']-10 < count($message->inbox1) && $_GET['s'] != 0) { - echo "«»"; - } - else if(count($message->inbox1) > $_GET['s']+10) { + plus) { echo ""; } ?> + + inbox1) < 10) { + echo "«»"; + } + else if (!isset($_GET['s']) && count($message->inbox1) > 10) { + echo "«»"; + } + else if(isset($_GET['s']) && count($message->inbox1) > $_GET['s']) { + if(count($message->inbox1) > ($_GET['s']+10) && $_GET['s']-10 < count($message->inbox1) && $_GET['s'] != 0) { + echo "«»"; + } + else if(count($message->inbox1) > $_GET['s']+10) { echo "«»"; - } - else { - echo "«»"; - } - } - ?>
inbox1[$i-1]['id']."\" />inbox1[$i-1]['id']."\">".$message->inbox1[$i-1]['topic']." "; - if($message->inbox1[$i-1]['viewed'] == 0) { - echo "(new)"; - } - $date = $generator->procMtime($message->inbox1[$i-1]['time']); - if($message->inbox1[$i-1]['owner'] <= 1) { - echo "".$database->getUserField($message->inbox1[$i-1]['owner'],'username',0)."".$date[0]." ".$date[1]."
inbox1[$i-1]['owner']."\">".$database->getUserField($message->inbox1[$i-1]['owner'],'username',0)."".$date[0]." ".$date[1]."
There are no messages available.
- - \ No newline at end of file + } + else { + echo "«»"; + } + } + ?>
inbox1[$i-1]['id']."\" />inbox1[$i-1]['id']."\">".$message->inbox1[$i-1]['topic']." "; + if($message->inbox1[$i-1]['viewed'] == 0) { + echo "(new)"; + } + $date = $generator->procMtime($message->inbox1[$i-1]['time']); + if($message->inbox1[$i-1]['owner'] <= 1) { + echo "".$database->getUserField($message->inbox1[$i-1]['owner'],'username',0)."".$date[0]." ".$date[1]."
inbox1[$i-1]['owner']."\">".$database->getUserField($message->inbox1[$i-1]['owner'],'username',0)."".$date[0]." ".$date[1]."
There are no messages available.
+ +
From 5a449ddfb235c961bb349ffa0243a95cb72669ef Mon Sep 17 00:00:00 2001 From: TPLinux Date: Fri, 30 Jun 2017 01:35:24 +0000 Subject: [PATCH 17/33] Update README --- README | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README b/README index ec6e5e72..18b6c273 100644 --- a/README +++ b/README @@ -148,5 +148,7 @@ TPLinux Changes: 5. Fix winner WW image path 6. Convert ' Date: Fri, 30 Jun 2017 01:49:24 +0000 Subject: [PATCH 18/33] Update unx.js --- unx.js | 40 ++++++++-------------------------------- 1 file changed, 8 insertions(+), 32 deletions(-) diff --git a/unx.js b/unx.js index a84157eb..f6fa7496 100644 --- a/unx.js +++ b/unx.js @@ -58,39 +58,15 @@ for(i=1;;i++){pb=document.getElementById("timer"+i);if(pb!=null){bb[i]=new Objec else{break;} } executeCounter();} -function executeCounter(){ - for(var i in ab){ - wb = db() - cb; - xb = rb(ab[i].counter_time + wb); - ab[i].node.innerHTML = xb; - } - for(i in bb){ - wb = db() - cb; - yb = bb[i].counter_time - wb; - // console.log('yb: ' + yb); - if(eb == 0 && yb <= 0){ - bb[i] = null; - eb = 1; - setTimeout(function(){window.location.href = ''},1000); - } - // eb = 1; - // if(auto_reload == 1){ - // setTimeout("document.location.reload()",1000); - // } - // else if(auto_reload==0){ - // setTimeout("mreload()",1000); - // } - //} - else{ - xb=rb(yb); - bb[i].node.innerHTML = xb; - } - if(eb == 0 && yb >= 0){ - setTimeout("executeCounter()",1000); - } - } +function executeCounter(){for(var i in ab){wb=db()-cb;xb=rb(ab[i].counter_time+wb);ab[i].node.innerHTML=xb;} +for(i in bb){wb=db()-cb;yb=bb[i].counter_time-wb; +if(eb==0&&yb<1){eb=1;if(auto_reload==1){setTimeout("document.location.reload()",1000);} +else if(auto_reload==0){setTimeout("mreload()",1000);} +} +else{} +xb=rb(yb);bb[i].node.innerHTML=xb;} +if(eb==0){window.setTimeout("executeCounter()",1000);} } - function mb(zb){pb=document.getElementById(zb);if(pb!=null){fb[zb]=new Object();var $b=pb.innerHTML.match(/(\d+)\/(\d+)/);element=$b[0].split("/");_b=parseInt(element[0]);ac=parseInt(element[1]);bc=pb.title;if(bc!=0){cc=nb();timer[zb]=new Object();timer[zb].start=cc;timer[zb].production=bc;timer[zb].start_res=_b;timer[zb].max_res=ac;timer[zb].ms=3600000/bc;dc=100;if(timer[zb].ms Date: Fri, 30 Jun 2017 03:15:26 +0000 Subject: [PATCH 19/33] Fixing Quest not appears if press (play no tasks) --- Templates/quest.tpl | 50 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/Templates/quest.tpl b/Templates/quest.tpl index 5b4b1f72..6bfe222e 100644 --- a/Templates/quest.tpl +++ b/Templates/quest.tpl @@ -1,4 +1,4 @@ - +$_SESSION['qtyp'] = QTYPE; +if (($_SESSION['qst'] < 38 && QTYPE == 37 && QUEST == true) || ($_SESSION['qst'] < 31 && QTYPE == 25 && QUEST == true) || ($_SESSION['qst'] >= 90 && QTYPE == 25 && QUEST == true)) {?> -
- - to the task - - to the task - -
- - \ No newline at end of file +
+ + to the task + + to the task + +
+ + From 3d182dc366b76223ca57c4dce2efc6c5dd6ee543 Mon Sep 17 00:00:00 2001 From: TPLinux Date: Fri, 30 Jun 2017 03:17:19 +0000 Subject: [PATCH 20/33] Change fetch time to server speed if > 5 --- Templates/Ajax/quest_core25.tpl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Templates/Ajax/quest_core25.tpl b/Templates/Ajax/quest_core25.tpl index c17de09b..79922d38 100644 --- a/Templates/Ajax/quest_core25.tpl +++ b/Templates/Ajax/quest_core25.tpl @@ -40,9 +40,8 @@ if(SPEED == '1'){ } else if(SPEED <= '5'){ $skipp_time="7200"; } else if(SPEED > '5'){ - $skipp_time="3600"; + $skipp_time= 3600 / SPEED; } - if (isset($qact)){ if ($qact == $_SESSION['qst']+1 && (($_SESSION['qst']>= 1 && $_SESSION['qst']<=30) || (time()-$_SESSION['qst_time']>=0 && ($_SESSION['qst'] >= 90 && $_SESSION['qst'] <=97))) || ($_SESSION['qst']== 0 && ($qact == "enter" || $qact == "skip")) || ($qact == "rank" && ($_SESSION['qst']== 4 || $_SESSION['qst']== 18)) || ($_SESSION['qst']== 7 && $qact == "coor") || ($_SESSION['qst']== 16 && $qact == "lumber") || ($_SESSION['qst']== 19 && $qact == 23) || ($_SESSION['qst']== 22 && $qact == 26) || ($_SESSION['qst']== 27 && $qact == "gold")) { //avoid hacking gold, resources or reward -- added by Ronix - Fixed by Pietro switch($qact) { From a298915d60a24137d1115e064982de22aafab951 Mon Sep 17 00:00:00 2001 From: TPLinux Date: Fri, 30 Jun 2017 03:17:58 +0000 Subject: [PATCH 21/33] Update README --- README | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README b/README index 18b6c273..0ffb1d2f 100644 --- a/README +++ b/README @@ -149,6 +149,7 @@ TPLinux Changes: 6. Convert ' 5 +10. Fixing Quest not appears if press (play no tasks) -- From 754e5de7e8e85f9f12ae3c37fb38b10d62a812ec Mon Sep 17 00:00:00 2001 From: TPLinux Date: Fri, 30 Jun 2017 03:25:51 +0000 Subject: [PATCH 22/33] this file work better than old --- unx.js | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/unx.js b/unx.js index f6fa7496..a84157eb 100644 --- a/unx.js +++ b/unx.js @@ -58,15 +58,39 @@ for(i=1;;i++){pb=document.getElementById("timer"+i);if(pb!=null){bb[i]=new Objec else{break;} } executeCounter();} -function executeCounter(){for(var i in ab){wb=db()-cb;xb=rb(ab[i].counter_time+wb);ab[i].node.innerHTML=xb;} -for(i in bb){wb=db()-cb;yb=bb[i].counter_time-wb; -if(eb==0&&yb<1){eb=1;if(auto_reload==1){setTimeout("document.location.reload()",1000);} -else if(auto_reload==0){setTimeout("mreload()",1000);} -} -else{} -xb=rb(yb);bb[i].node.innerHTML=xb;} -if(eb==0){window.setTimeout("executeCounter()",1000);} +function executeCounter(){ + for(var i in ab){ + wb = db() - cb; + xb = rb(ab[i].counter_time + wb); + ab[i].node.innerHTML = xb; + } + for(i in bb){ + wb = db() - cb; + yb = bb[i].counter_time - wb; + // console.log('yb: ' + yb); + if(eb == 0 && yb <= 0){ + bb[i] = null; + eb = 1; + setTimeout(function(){window.location.href = ''},1000); + } + // eb = 1; + // if(auto_reload == 1){ + // setTimeout("document.location.reload()",1000); + // } + // else if(auto_reload==0){ + // setTimeout("mreload()",1000); + // } + //} + else{ + xb=rb(yb); + bb[i].node.innerHTML = xb; + } + if(eb == 0 && yb >= 0){ + setTimeout("executeCounter()",1000); + } + } } + function mb(zb){pb=document.getElementById(zb);if(pb!=null){fb[zb]=new Object();var $b=pb.innerHTML.match(/(\d+)\/(\d+)/);element=$b[0].split("/");_b=parseInt(element[0]);ac=parseInt(element[1]);bc=pb.title;if(bc!=0){cc=nb();timer[zb]=new Object();timer[zb].start=cc;timer[zb].production=bc;timer[zb].start_res=_b;timer[zb].max_res=ac;timer[zb].ms=3600000/bc;dc=100;if(timer[zb].ms Date: Fri, 30 Jun 2017 03:39:17 +0000 Subject: [PATCH 23/33] Refresh with leep current url --- Templates/Building.tpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Templates/Building.tpl b/Templates/Building.tpl index 2f0ca18e..fd5e2d54 100644 --- a/Templates/Building.tpl +++ b/Templates/Building.tpl @@ -59,5 +59,6 @@ $building->loadBuilding(); From 1b3838ac5c7fd274605d0b18e714868f28d2c445 Mon Sep 17 00:00:00 2001 From: TPLinux Date: Fri, 30 Jun 2017 03:39:44 +0000 Subject: [PATCH 24/33] refresh with keep current url --- Templates/Building.tpl | 1 + 1 file changed, 1 insertion(+) diff --git a/Templates/Building.tpl b/Templates/Building.tpl index fd5e2d54..15585389 100644 --- a/Templates/Building.tpl +++ b/Templates/Building.tpl @@ -62,3 +62,4 @@ $building->loadBuilding(); $the_link = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; header('Location: '. $the_link); } ?> + From b3e059aa4abeef82361e2f4c197176ccf3640744 Mon Sep 17 00:00:00 2001 From: TPLinux Date: Fri, 30 Jun 2017 04:02:11 +0000 Subject: [PATCH 25/33] Change redirection after attack to rally point Now if you inside rally point and attack done ... the redirection replaced to Rally point not to dorf1.php --- build.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.php b/build.php index b747954f..a05ec36d 100644 --- a/build.php +++ b/build.php @@ -353,7 +353,7 @@ if(isset($_GET['id']) or isset($_GET['gid']) or $route == 1 or isset($_GET['rout } } }else{ -header("Location: dorf1.php"); +header("Location: ".$_SERVER['PHP_SELF']."?id=39"); } ?> From 56312dc0138e0f2715c3bdf0f68d4f1a465e621e Mon Sep 17 00:00:00 2001 From: TPLinux Date: Fri, 30 Jun 2017 04:03:43 +0000 Subject: [PATCH 26/33] Update README --- README | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README b/README index 0ffb1d2f..efca8b72 100644 --- a/README +++ b/README @@ -151,5 +151,7 @@ TPLinux Changes: 8. Change multihunter msg color to orange 9. Change fetch time to server speed if > 5 10. Fixing Quest not appears if press (play no tasks) +11. Fix the redirection from rally point when attack is finished + -- From a2a70f9d4aa6997f50451eb0dadf5a6a263d5e1c Mon Sep 17 00:00:00 2001 From: TPLinux Date: Fri, 30 Jun 2017 04:10:23 +0000 Subject: [PATCH 27/33] Update unx.js --- unx.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unx.js b/unx.js index a84157eb..9c63d64d 100644 --- a/unx.js +++ b/unx.js @@ -68,7 +68,7 @@ function executeCounter(){ wb = db() - cb; yb = bb[i].counter_time - wb; // console.log('yb: ' + yb); - if(eb == 0 && yb <= 0){ + if(eb == 0 && yb < 0){ bb[i] = null; eb = 1; setTimeout(function(){window.location.href = ''},1000); @@ -89,6 +89,7 @@ function executeCounter(){ setTimeout("executeCounter()",1000); } } + setTimeout("executeCounter()",1000); } function mb(zb){pb=document.getElementById(zb);if(pb!=null){fb[zb]=new Object();var $b=pb.innerHTML.match(/(\d+)\/(\d+)/);element=$b[0].split("/");_b=parseInt(element[0]);ac=parseInt(element[1]);bc=pb.title;if(bc!=0){cc=nb();timer[zb]=new Object();timer[zb].start=cc;timer[zb].production=bc;timer[zb].start_res=_b;timer[zb].max_res=ac;timer[zb].ms=3600000/bc;dc=100;if(timer[zb].ms Date: Fri, 30 Jun 2017 04:53:30 +0000 Subject: [PATCH 28/33] Remove Rally point advantage --- Templates/Plus/2.tpl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Templates/Plus/2.tpl b/Templates/Plus/2.tpl index 2953e730..90f30a97 100644 --- a/Templates/Plus/2.tpl +++ b/Templates/Plus/2.tpl @@ -22,22 +22,12 @@ include("Templates/Plus/pmenu.tpl"); Larger map - Larger map + Larger map You can enlarge the map to get a better overview. Instead of 7x7 fields you can have a map of 13x13 fields. Other alliances which are allied or have a non-aggression pact (NAP) with you are shown in special colours. - - Improved view in the rally point. - - - - Improved view in the rally point. - In your rally point you can mark incoming attacks in the colours green, yellow and red to be able to distinguish between what you think are severe and harmless attacks . Additionally the total movement time (without taking into consideration the tournament square or an artefact effect) of the troop types is shown. - - - Archive function for reports and messages From edb686953ea0ed46cf25f380d8b417f7babfa5ad Mon Sep 17 00:00:00 2001 From: TPLinux Date: Fri, 30 Jun 2017 04:54:04 +0000 Subject: [PATCH 29/33] Update README --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index efca8b72..5ef02085 100644 --- a/README +++ b/README @@ -152,6 +152,6 @@ TPLinux Changes: 9. Change fetch time to server speed if > 5 10. Fixing Quest not appears if press (play no tasks) 11. Fix the redirection from rally point when attack is finished - +12. Remove Rally point advantage -- From 305ec4b2d61b4369cc990bc52c7f642beb30e9c7 Mon Sep 17 00:00:00 2001 From: TPLinux Date: Fri, 30 Jun 2017 15:27:44 +0000 Subject: [PATCH 30/33] Fix fullscreen map in rtl layout --- unx.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/unx.js b/unx.js index 9c63d64d..a755779e 100644 --- a/unx.js +++ b/unx.js @@ -1,3 +1,4 @@ +window.dlang = 'ar'; // edit it to en if fullscreen map not working 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 function gb(){return hb('height');} function ib(){return hb('width');} @@ -133,8 +134,12 @@ function Popup(i,j,sc){ function PopupMap(i){ if(typeof sc=='undefined'){sc='s';} pb=document.getElementById("ce"); - if(pb!=null){ - var tc=''; + if(pb!=null){ + if(window.dlang== 'ar'){ + var tc=''; + }else{ + var tc=''; + } pb.innerHTML=tc;uc2(); } vc(); @@ -148,8 +153,12 @@ $$('.popup3')[0].grab(new Element('div',{'id':'drag'} );if($$('body')[0].getStyle('direction').toLowerCase()=='rtl'){$$('.popup3')[0].setStyle('direction','rtl').getParent().setStyle('direction','ltr');} } function uc2(){ - if($('drag')){return;} + if($('drag')){return;} + if(window.dlang== 'ar'){ + $$('.popup_map')[0].grab(new Element('div',{'id':'drag', "style": "width: 1000px;height: 10px;background-color: #fff0;position: absolute;cursor: move;"}),'top').makeDraggable({'handle':'drag'}); + }else{ $$('.popup_map')[0].grab(new Element('div',{'id':'drag'}),'top').makeDraggable({'handle':'drag'}); + } if($$('body')[0].getStyle('direction').toLowerCase()=='rtl'){ $$('.popup_map')[0].setStyle('direction','rtl').getParent().setStyle('direction','ltr'); } From 8f477377530c39d31aadb4efce2da8bebe37d5e5 Mon Sep 17 00:00:00 2001 From: TPLinux Date: Fri, 30 Jun 2017 15:28:37 +0000 Subject: [PATCH 31/33] Update README --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 5ef02085..1942f31d 100644 --- a/README +++ b/README @@ -153,5 +153,5 @@ TPLinux Changes: 10. Fixing Quest not appears if press (play no tasks) 11. Fix the redirection from rally point when attack is finished 12. Remove Rally point advantage - +13. Fix fullscreen map in rtl layout -- From b8d3950c69d9eb09fa7ba44fae6ede37e33c71e4 Mon Sep 17 00:00:00 2001 From: TPLinux Date: Sat, 1 Jul 2017 18:32:44 +0000 Subject: [PATCH 32/33] Fix divesion by Zero bug --- Templates/Ranking/general.tpl | 36 ++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/Templates/Ranking/general.tpl b/Templates/Ranking/general.tpl index 2bc7ce71..1631a24b 100644 --- a/Templates/Ranking/general.tpl +++ b/Templates/Ranking/general.tpl @@ -70,10 +70,18 @@ - + + 0){ + $percents = 100 * (($tribes[0]) / $users); + echo $percents = intval($percents); + echo "%"; + }else{ + echo '---'; + } + ?> + + @@ -83,9 +91,14 @@ echo $tribes[1]; ?> + if($users > 0){ + $percents = 100 * ($tribes[1] / $users); + echo $percents = intval($percents); + echo "%"; + }else{ + echo '---'; + } + ?> @@ -95,9 +108,14 @@ echo $tribes[2]; ?> 0){ + $percents = 100 * ($tribes[2] / $users); echo $percents = intval($percents); - echo "%"; ?> + echo "%"; + }else{ + echo '---'; + } + ?> From 88b1cacc7921f0d27295cc0d81b26c4457eb1d06 Mon Sep 17 00:00:00 2001 From: TPLinux Date: Sat, 1 Jul 2017 18:33:27 +0000 Subject: [PATCH 33/33] Update README --- README | 1 + 1 file changed, 1 insertion(+) diff --git a/README b/README index 1942f31d..764c2248 100644 --- a/README +++ b/README @@ -154,4 +154,5 @@ TPLinux Changes: 11. Fix the redirection from rally point when attack is finished 12. Remove Rally point advantage 13. Fix fullscreen map in rtl layout +14. Fix divesion by Zero bug in general statics --