diff --git a/Templates/Ajax/quest_core.tpl b/Templates/Ajax/quest_core.tpl index 12834460..6b1122bb 100644 --- a/Templates/Ajax/quest_core.tpl +++ b/Templates/Ajax/quest_core.tpl @@ -41,7 +41,15 @@ if(SPEED == '1'){ $skipp_time="3600"; } $_SESSION['qst_time'] = $uArray['quest_time']; + if (isset($qact)){ + + // check that the quest we're on is not lower than the quest we're requesting + $currentQuest = $database->getUserField($_SESSION['username'],"quest",1); + if ($qact < $currentQuest) { + $qact = $currentQuest; + } + if ($check_quest==$qact) { //avoid hacking gold, resources or reward -- added by Ronix }else { @@ -418,6 +426,15 @@ if (isset($qact)){ header("Content-Type: application/json;"); if($session->access!=BANNED){ + // check that the quest we're on is not lower than the quest we're requesting + if (!isset($currentQuest)) { + $currentQuest = $database->getUserField($_SESSION['username'],"quest",1); + } + + if (empty($_SESSION['qst']) || $_SESSION['qst'] < $currentQuest) { + $_SESSION['qst'] = $currentQuest; + } + if($_SESSION['qst']== 0){ ?> diff --git a/Templates/Ajax/quest_core25.tpl b/Templates/Ajax/quest_core25.tpl index 38e65cc2..4e78a792 100644 --- a/Templates/Ajax/quest_core25.tpl +++ b/Templates/Ajax/quest_core25.tpl @@ -42,8 +42,15 @@ if(SPEED == '1'){ $skipp_time="7200"; } else if(SPEED > '5'){ $skipp_time= 3600 / SPEED; -} +} + if (isset($qact)){ + // check that the quest we're on is not lower than the quest we're requesting + $currentQuest = $database->getUserField($_SESSION['username'],"quest",1); + if ($qact < $currentQuest) { + $qact = $currentQuest; + } + 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) { case 'enter': @@ -402,6 +409,16 @@ if (isset($qact)){ header("Content-Type: application/json;"); if($session->access!=BANNED){ + + // check that the quest we're on is not lower than the quest we're requesting + if (!isset($currentQuest)) { + $currentQuest = $database->getUserField($_SESSION['username'],"quest",1); + } + + if (empty($_SESSION['qst']) || $_SESSION['qst'] < $currentQuest) { + $_SESSION['qst'] = $currentQuest; + } + if($_SESSION['qst']== 0){?> {"markup":"

\"\" !<\/h1>
”<\/i>




","number":null,"reward":false,"qgsrc":"q_luserinfo['tribe'];?>g","msrc":"","altstep":1}