1
0
Fork 0

Click the right button

This commit is contained in:
Andrew Tomaka 2016-05-26 10:51:38 -04:00
parent 3b9553b365
commit e43db59f83
1 changed files with 13 additions and 2 deletions

View File

@ -40,8 +40,11 @@ function mainLoop() {
botLastRandom = botTimestamp();
break;
case 'Are you sure?':
clickButton('Drop Item');
clickButton('Activate Item');
if(checkPopupContent('drop')) {
clickButton('Drop Item');
} else {
clickButton('Activate Item');
}
break;
case 'ARE YOU SURE?':
case 'CONFIRM PURCHASE':
@ -415,6 +418,14 @@ function clickSelector(selector) {
$(selector).get(0).click();
}
function checkPopupContent(text) {
if($('#popup div[name="content"]:contains("' + text + '")').length > 0) {
return true;
} else {
return false;
}
}
function botSetTarget(username) {
botRaidTarget = username;
}