// To grab the most gold quickly, just go after gold coins.
while(true) {
var coins = hero.findItems();
var coinIndex = 0;
// Wrap this into a loop that iterates over all coins.
while(coinIndex < coins.length) {
var coin = coins[coinIndex];
if (coin.value === 3) {
hero.moveXY(coin.pos.x, coin.pos.y);
}
}
}
// To grab the most gold quickly, just go after gold coins.
while(true) {
var coins = hero.findItems();
var coinIndex = 0;
// Wrap this into a loop that iterates over all coins.
while(coinIndex < coins.length) {
var coin = coins[coinIndex];
if (coin.value == 3) {
hero.moveXY(coin.pos.x, coin.pos.y);
coinIndex += 1;
}
}
}
// To grab the most gold quickly, just go after gold coins.
while(true) {
var coins = hero.findItems();
var coinIndex = 0;
// Wrap this into a loop that iterates over all coins.
while(coinIndex < coins.length) {
var coin = coins[coinIndex];
if (coin.value == 3) {
hero.moveXY(coin.pos.x, coin.pos.y);
coinIndex ++ 1;
}
}
}
// To grab the most gold quickly, just go after gold coins.
while(true) {
var coins = hero.findItems();
var coinIndex = 0;
// Wrap this into a loop that iterates over all coins.
while(coinIndex < coins.length) {
var coin = coins[coinIndex];
if (coin.value == 3) {
hero.moveXY(coin.pos.x, coin.pos.y);
}
coinIndex ++ 1;
}
}