I’m doing dust when I submit when he retreats he freezes and it says that there is a infinite loop
# Use a while to loop until you have counted 10 attacks.
attacks = 0
while attacks < 10:
# Attack the nearest enemy!
enemy = hero.findNearestEnemy()
hero.attack(enemy)
# Incrementing means to increase by 1.
# Increment the `attacks` variable.
attacks += 1
# When you're done, retreat to the ambush point.
hero.say("I should retreat!")
hero.moveXY(79, 33)