Only fight random when we want to

This commit is contained in:
Andrew Tomaka 2015-04-14 10:24:09 -04:00
parent 8624e5e421
commit cfc07a4fa8

13
bot.js
View file

@ -8,6 +8,7 @@ var botFightingRandomBoss = false;
var botFightingGlobalBoss = false;
var botBuySlimes = false;
var botFightGlobal = true;
var botFightRandom = true;
var botRaidTarget = null;
var botLastRandom = 0;
@ -95,7 +96,7 @@ function mainLoop() {
}
//RAID
if(raidRefreshing() === false && haveRaidTarget() === true) {
if(raidRefreshing() === false && haveRaidTarget() === true && botFightRandom === true) {
clickSelector('button[name="raid_button"]');
botFillIn('input[name="raid_user"]', botRaidTarget);
botRaiding = true;
@ -283,6 +284,16 @@ function botToggleGlobal() {
}
}
function botToggleRandom() {
if(botFightGlobal) {
console.log('Stopping random fighting');
botFightRandom = false;
} else {
console.log('Starting random fighting');
botFightRandom = true;
}
}
function botToggleUI() {
clickSelector('a[name="portal"]');
clickSelector('button[name="vault_hide"]');