attacks = 0
while attacks <= 10:
# Attack the nearest enemy!
enemy = hero.findNearestEnemy()
if enemy:
hero.scattershot(enemy)
# Incrementing means to increase by 1.
# Increment the `attacks` variable.
attacks += 1
# When you're done, retreat to the ambush point.
hero.moveXY(79, 33)
No error, shows as this
for some reason
My hero retreats before he has defeated 10 ogres
Armor
link
are you sure you are able to defeat 1 ogre in 1 shot? else, you should just do a while loop that runs if the enemies health is >0.
That just made the situation worse
can u let me see what happened?
how much health do u have? then show me the code
I have 1356, that should be more than enough to finish the level
attacks = 0
while attacks <= 10:
# Attack the nearest enemy!
enemy = hero.findNearestEnemy()
if enemy:
while enemy.health > 0:
hero.scattershot(enemy)
# Incrementing means to increase by 1.
# Increment the `attacks` variable.
attacks += 1
# When you're done, retreat to the ambush point.
hero.moveXY(79, 33)
y do u use ranger, some levels are just anoying for rangers or wizards
Because I like using ranger?
sometime warriors are just easy for levels like this.
Yea but, each level can be completed with every class
yah
(I am doing the following stuff so this way itt will be 20 char)
did ur hero attempt to move?
nope
it stays there till he dies
after he attacks, he just stays there and does nothing?
he continues to attack, pausing now and then
scattershot might have cooldown
Scattershot doesn’t have a cooldown
oh, (20 char) I thought it did