trugul-bot/bot.js

26 lines
607 B
JavaScript
Raw Normal View History

2015-04-06 17:30:55 -04:00
var globalBossTracker;
2015-04-06 17:01:14 -04:00
function delayClick(selector, seconds) {
2015-04-06 17:30:55 -04:00
var timer = setInterval(
2015-04-06 17:01:14 -04:00
function() {
2015-04-06 17:30:55 -04:00
if($(selector).length > 0) {
2015-04-06 17:01:14 -04:00
$(selector).get(0).click();
}
},
seconds * 1000
2015-04-06 17:30:55 -04:00
);
return timer;
2015-04-06 17:01:14 -04:00
}
2015-04-06 17:30:55 -04:00
delayClick('#popup span button:contains("Summon Boss")', 3);
delayClick('#popup span button:contains("CONTINUE")', 3);
2015-04-07 11:07:33 -04:00
delayClick('#randomBossPortal a', 20);
delayClick('span[name="timeRemaining"]:contains("JOIN") a', 80);
2015-04-06 17:30:55 -04:00
setInterval(function() {
if($('img[name="globalBossImg"]').is(':visible')) {
$('img[name="globalBossImg"]').get(0).click();
}
}, 1000);