Marauder help [PYTHON]

i need help

# Destroy mechs and collect gold from them.

while True:
    item = hero.findNearestItem()
    # While a coin exists:
    while item:
        # Move to the coin.
        hero.moveXY(item.pos.x, item.pos.y)
        # Reassign the coin variable to the nearest item.
        
    enemy = hero.findNearestEnemy()
    if enemy:
        # While enemy's health is greater than 0.
        while enemy.health > 0:
            # Attack enemy.
            hero.attack(enemy)
        pass

Hey @ramiruvuri! When you’re asking for level help, could you please specify what level you’re on (in both your post and the topic name), and explain what the problem is along with a screenshot of it? Thank you!

sorry i already finished the level

1 Like

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