Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

[SOLVED] Lurkers help please


#1

need help i put in the right code and then my hero would not move


#2

We really can’t be of much assistance unless we see your code. Obviously, something isn’t right. What equipment are you using? We need information in order to assist you.


#3
# findEnemies returns a list of all your enemies.
# Only attack shamans. Don't attack yaks!

enemies = hero.findEnemies()
enemyIndex = 0

# Wrap this section in a while loop to iterate all enemies.
# While the enemyIndex is less than the length of enemies

enemy = enemies[enemyIndex]
if enemy.type == 'shaman':
    while enemy.health > 0:
        hero.attack(enemy)
# Remember to increment enemyIndex


#4


#5

You have to put it in a while loop


#6

Put this in a while loop and be sure to increment for every loop.


#9

okay thanks ( :slight_smile:

never mind it did not work :weary::weary::persevere::persevere::thinking::face_with_raised_eyebrow:

never mind worked :grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning::grinning:


#11

Please just click the like button instead of saying short messages. It prevents spam and keeps the forum clean. Thanks