Bug On Thornbush Farm with firefox and JavaScript


#1

Looping doesn’t work with firefox: dead enemys are recognized and the placed firebombs kill the villagers then. In chrome the 2nd last ogre isn’t recognized. Probablz loop out of sync.

  • Since I’m stuck I tried firefox again and the bug is gone still got the 2nd last ogre problem tough. The ogre should be recognized its close enough.

This is the code I use:

loop {

this.moveXY(43, 48);
var enemy = this.findNearestEnemy();
if (enemy) {
    this.buildXY('fire-trap', 43, 51);
}
this.moveXY(28, 34);
enemy = this.findNearestEnemy();
if (enemy) {
    this.buildXY('fire-trap', 25, 34);
}
this.moveXY(43, 22);
if (enemy) {
    this.buildXY('fire-trap', 44, 20);
}

}

I tried changing the coordinates several times to no avail.


#2

You might be missing a findNearestEnemy in the last block?


#3

Oh damn you are right XD