1
0
Fork 0

Abstract purchase requirement to global variable

This commit is contained in:
Andrew Tomaka 2015-04-14 17:19:05 -04:00
parent d2c0b25476
commit e238c25762
1 changed files with 5 additions and 2 deletions

7
bot.js
View File

@ -1,3 +1,6 @@
var BOT_WORKER_MONEY = 1;
var BOT_SLIME_MONEY = 10;
var botLoop;
var botGlobalBossTimer;
var botPaused = true;
@ -114,13 +117,13 @@ function mainLoop() {
}
//BUY SLIMES
if(botBuySlimes === true && haveTrillions(10) && botPurchasing === false) {
if(botBuySlimes === true && haveTrillions(BOT_SLIME_MONEY) && botPurchasing === false) {
botPurchasing = true;
clickSelector('button[name="buymax-knight"]');
}
//BUY WORKERS
if(botBuyWorkers === true && haveTrillions(10) && haveCheapLabor() === true && botPurchasing === false) {
if(botBuyWorkers === true && haveTrillions(BOT_WORKER_MONEY) && haveCheapLabor() === true && botPurchasing === false) {
botPurchasing = true;
clickSelector('button[name="buymax-' + mostEfficientWorker() + '"]');
}