Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Forest miners help!


well there is always some kind of delay before the second enemy spawns so my hero call a clear environnment then he spawns and kill a peasants…

function kill(target) {
if(target) {

while (true) {
hero.moveXY(64, 54);
var enemy1 = hero.findNearestEnemy();
hero.moveXY(16, 14);
var enemy2 = hero.findNearestEnemy();



I’m not too familiar with the language you’re using but you have a function, kill(target), with an if statement. You shouldn’t need another one in your code. Try just moving, defining enemy, and then calling your function. Also, I don’t believe you need to break down enemy1 & 2. Try just using “enemy”.in both. That’s the way it worked for me in Python anyways.


i changed both and still, didnt change anything the result is the same, there is a bug with synchronisation


its cool i found an alternative pattern ^.^