What's wrong ? " Useful competitors

while True:
enemy = hero.findNearestEnemy()
if enemy:
if enemy.type != “peon”:
if not hero.isReady(“cleave”):
hero.attack(enemy)
else:
hero.cleave(enemy)
item = hero.findNearestItem()

if item:
    # Gather the item only if the type is NOT equal to "poison".
    if item.type != "poison":
        pos = item.pos
        x=pos.x
        y=pos.y
        hero.moveXY(x, y)
    pass

1 Like

Press Submit
few time
So map will probably have better generated enemy setup

Or add attack range limiter
hero.distanceTo()
<= 25 for "thrower"
You will attack only enemy
that near to you
So more time for items collection

3 Likes

took me 4 submits before it worked for me, so take his advice

2 Likes

Finally it works. Thank you!

1 Like