Add global boss fighting

This commit is contained in:
Andrew Tomaka 2015-04-06 17:30:55 -04:00
parent 95f70d89b8
commit 16c8a4b826

25
bot.js
View file

@ -1,18 +1,25 @@
function startClickers() {
delayClick('#randomBossPortal a', 10);
delayClick('#popup span button:contains("Summon Boss")', 1);
delayClick('#popup span button:contains("CONTINUE")', 1);
}
var globalBossTracker;
function delayClick(selector, seconds) {
var waiting = setInterval(
var timer = setInterval(
function() {
if ($(selector).length > 0) {
if($(selector).length > 0) {
$(selector).get(0).click();
}
},
seconds * 1000
)
);
return timer;
}
startClickers();
delayClick('#popup span button:contains("Summon Boss")', 3);
delayClick('#popup span button:contains("CONTINUE")', 3);
delayClick('#randomBossPortal a', 10);
delayClick('span[name="timeRemaining"]:contains("JOIN") a', 20);
setInterval(function() {
if($('img[name="globalBossImg"]').is(':visible')) {
$('img[name="globalBossImg"]').get(0).click();
}
}, 1000);