Savern Shepard Help


#1

Use while loops to pick out the ogre

while True:
enemies = hero.findEnemies()
enemyIndex = 0

# Wrap this logic in a while loop to attack all enemies.
# Find the array's length with:  len(enemies)

while enemyIndex < len(enemies):
enemy = enemies[enemyIndex]
# “!=” means "not equal to."
if enemy.type != “sand-yak”:
# While the enemy’s health is greater than 0, attack it!
while enemy.health > 0:
hero.attack(enemy)
pass
enemyIndex += 1

# Between waves, move back to the center.

hero.moveXY(40, 33)

My Hero Juststands there please help me.


#2

Custom Solution

Use while loops to pick out the ogre

while True:
enemies = hero.findByType(“scout”)
enemyIndex = 0
if enemy:
hero.say(“Enemy” + enemyIndex)
pass
enemy = enemies[enemyIndex]
if enemy:
ready = hero.isReady(“cleave”)
if ready:
hero.cleave(enemy)
hero.attack(enemies[enemyIndex])

enemyIndex += 1

#3

I can’t read your Code. Pleas Read the FAQ to learn how to make your Code look nice! For now I will do it!


#4

The gray box is imporant. so you need to

Xzanos.say( "use ``` in ``` your code do you see this gray box around me. 
     this sows that you are doing it right")

Do you see the difference? Also the

letters= ("letters")

Xzanos.say(letters "will change fonts")

These where some things you could do with the

Xzanos. say ("cool is it not?!!!")