Village rover - Javascript

I did what the comments said, please help me!

// This defines a function called findAndAttackEnemy
function findAndAttackEnemy() {
    var enemy = hero.findNearestEnemy();
    if (enemy) {

// This code is not part of the function.
while(true) {
    // Now you can patrol the village using findAndAttackEnemy
    hero.moveXY(35, 34);
    // Now move to the right entrance.
    hero.moveXY(60, 31);
    // Use findAndAttackEnemy

What hero and gear are you using? wizards have terrible accuracy and some heroes don’t do enough damage.

Screenshot 2023-02-06 4.26.51 PM

I’m using Hattori Hanzo.

Hm should work, maybe remove the speed ring?

1 Like

It worked! Thank you! :grin:

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.