From 1c1c51bdc373ec7cc5d0f3ca3c9a5c87dcef5e34 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 18 May 2016 09:48:44 -0400 Subject: [PATCH] Attemp to delay purchasing --- public/bot.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/bot.js b/public/bot.js index abb26c1..b909b07 100644 --- a/public/bot.js +++ b/public/bot.js @@ -5,6 +5,7 @@ var SAFE_SOLDIER_COUNT = 200000; var botLoop; var botGlobalBossTimer; +var botPurchasingTimer; var botPaused = true; var botPurchasing = false; var botSleeping = false; @@ -98,8 +99,10 @@ function mainLoop() { if(haveSlimes(SAFE_SOLDIER_COUNT) === false && botFightRandom === true && botPurchasing === false) { setBotToPurchasing(); clickSelector('button[name="buyx-knight"]'); - botFillIn('input[name="x_amount"]', SAFE_SOLDIER_COUNT); - clickButton("Buy"); + botPurchasingTimer = setInterval(function() { + botFillIn('input[name="x_amount"]', SAFE_SOLDIER_COUNT); + clickButton("Buy"); + }, 250); } if(haveCreepers(SAFE_SOLDIER_COUNT) === false && botFightRandom === true && botPurchasing === false) {