Make sure we don't stop attacking random boss

This commit is contained in:
Andrew Tomaka 2015-04-13 19:15:31 -04:00
parent c876c8be4b
commit dc388c4ae7

5
bot.js
View file

@ -8,6 +8,7 @@ var botFightingGlobalBoss = false;
var botBuySlimes = false; var botBuySlimes = false;
var botFightGlobal = true; var botFightGlobal = true;
var botRaidTarget = null; var botRaidTarget = null;
var botLastRandom;
function mainLoop() { function mainLoop() {
if($('#popup').is(':visible')) { if($('#popup').is(':visible')) {
@ -20,6 +21,7 @@ function mainLoop() {
break; break;
case 'SUMMON BOSS': case 'SUMMON BOSS':
clickButton('Summon Boss'); clickButton('Summon Boss');
botLastRandom = botTimestamp();
break; break;
case 'Are you sure?': case 'Are you sure?':
clickButton('Activate Item'); clickButton('Activate Item');
@ -63,6 +65,9 @@ function mainLoop() {
} else if(randomBossRefreshing() === false && botFightingRandomBoss === false) { } else if(randomBossRefreshing() === false && botFightingRandomBoss === false) {
clickSelector('#randomBossPortal a'); clickSelector('#randomBossPortal a');
botFightingRandomBoss = true; botFightingRandomBoss = true;
} else if(botTimestamp() > botLastRandom + 180) {
clickSelector('#randomBossPortal a');
botFightingRandomBoss = true;
} }
//GLOBAL BOSS //GLOBAL BOSS