Use item if we have 20

This commit is contained in:
Andrew Tomaka 2015-04-23 10:29:23 -04:00
parent 26e1e963c0
commit 412ba7c116

View file

@ -172,7 +172,7 @@ function activateBuffs() {
$('div[name="items_holder"]').children().each(function() {
var itemHolder = $(this);
if(itemHolder.attr('item') != 'godspear_fragment' || botSaveSpears === false) {
if(itemHolder.attr('item') != 'godspear_fragment' || botSaveSpears === false || haveMaxItems()) {
var itemButton = itemHolder.find('button:contains("Activate")');
if(itemButton.length > 0) {
itemButton.get(0).click()
@ -181,6 +181,10 @@ function activateBuffs() {
});
}
function haveMaxItems() {
return $('span[name="item_count"').text() == '20/20';
}
function setBotToPurchasing() {
botPurchasing = true;
botLastPurchase = botTimestamp();