Hello community!
This is my first post, i hope i did all the formating right
My code seems to cause an infinity loop but i cant figure out how / where.
I want to bash 4 times and then collect the chests.
What did i do wrong?
KR
// Be careful with these ogres.
// They are special trained fat-free uber ogres and very strong.
// The keyword is fat-free.
// Be careful with these ogres.
// They are special trained fat-free uber ogres and very strong.
// The keyword is fat-free.
var i = 0;
while(i <= 4) {
var enemy = hero.findNearestEnemy();
if (enemy && hero.isReady("bash")) {
hero.bash(enemy);
i += 1;
}
}
while(true) {
var item = hero.findNearestItem();
hero.moveXY(item.pos.x, item.pos.y);
}