Fix for botPurchasing bug

This commit is contained in:
Andrew Tomaka 2015-04-15 19:18:23 -04:00
parent 933fbed183
commit 611f5250d4

View file

@ -61,7 +61,6 @@ function mainLoop() {
} }
break; break;
case 'WHOOPS!': case 'WHOOPS!':
botPurchasing = false;
case 'BATTLE REPORT': case 'BATTLE REPORT':
case 'Battle Report': case 'Battle Report':
case 'ACTIVITY PASSED!': case 'ACTIVITY PASSED!':
@ -105,7 +104,7 @@ function mainLoop() {
} }
//BUY SCIENTISTS //BUY SCIENTISTS
if(haveBossCoins() && haveCheapLabor() && botPurchasing === false && haveMaxRBMinion()) { if(haveBossCoins(1) && haveCheapLabor() && botPurchasing === false && haveMaxRBMinion()) {
botPurchasing = true; botPurchasing = true;
clickSelector('button[name="hiremax_scientists"]'); clickSelector('button[name="hiremax_scientists"]');
} }
@ -128,7 +127,7 @@ function mainLoop() {
botPurchasing = true; botPurchasing = true;
clickSelector('button[name="buymax-' + mostEfficientWorker() + '"]'); clickSelector('button[name="buymax-' + mostEfficientWorker() + '"]');
} }
if(botBuyWorkers === true && haveCheapLabor() === true && botPurchasing === false && haveBossCoins()) { if(botBuyWorkers === true && haveCheapLabor() === true && botPurchasing === false && haveBossCoins(9)) {
botPurchasing = true; botPurchasing = true;
clickSelector('button[name="buymax-capturedminion"]'); clickSelector('button[name="buymax-capturedminion"]');
} }
@ -295,8 +294,8 @@ function trillions(number) {
return number * 1000000000000; return number * 1000000000000;
} }
function haveBossCoins() { function haveBossCoins(value) {
if($('#bc_display').text() != 0) { if(convertToNumber($('#bc_display').text()) >= value) {
return true; return true;
} else { } else {
return false; return false;