Click the right button
This commit is contained in:
parent
3b9553b365
commit
e43db59f83
1 changed files with 13 additions and 2 deletions
|
@ -40,8 +40,11 @@ function mainLoop() {
|
|||
botLastRandom = botTimestamp();
|
||||
break;
|
||||
case 'Are you sure?':
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue