diff --git a/public/bot.js b/public/bot.js index 039210c..8b3b8f9 100644 --- a/public/bot.js +++ b/public/bot.js @@ -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();