Abstract purchase requirement to global variable
This commit is contained in:
parent
d2c0b25476
commit
e238c25762
1 changed files with 5 additions and 2 deletions
7
bot.js
7
bot.js
|
@ -1,3 +1,6 @@
|
||||||
|
var BOT_WORKER_MONEY = 1;
|
||||||
|
var BOT_SLIME_MONEY = 10;
|
||||||
|
|
||||||
var botLoop;
|
var botLoop;
|
||||||
var botGlobalBossTimer;
|
var botGlobalBossTimer;
|
||||||
var botPaused = true;
|
var botPaused = true;
|
||||||
|
@ -114,13 +117,13 @@ function mainLoop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
//BUY SLIMES
|
//BUY SLIMES
|
||||||
if(botBuySlimes === true && haveTrillions(10) && botPurchasing === false) {
|
if(botBuySlimes === true && haveTrillions(BOT_SLIME_MONEY) && botPurchasing === false) {
|
||||||
botPurchasing = true;
|
botPurchasing = true;
|
||||||
clickSelector('button[name="buymax-knight"]');
|
clickSelector('button[name="buymax-knight"]');
|
||||||
}
|
}
|
||||||
|
|
||||||
//BUY WORKERS
|
//BUY WORKERS
|
||||||
if(botBuyWorkers === true && haveTrillions(10) && haveCheapLabor() === true && botPurchasing === false) {
|
if(botBuyWorkers === true && haveTrillions(BOT_WORKER_MONEY) && haveCheapLabor() === true && botPurchasing === false) {
|
||||||
botPurchasing = true;
|
botPurchasing = true;
|
||||||
clickSelector('button[name="buymax-' + mostEfficientWorker() + '"]');
|
clickSelector('button[name="buymax-' + mostEfficientWorker() + '"]');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue