Me need help on bank raid

# Wait for ogres, defeat them and collect gold.

while True:
    enemies = hero.findEnemies()
    # enemyIndex is used to iterate the enemies array.
    enemyIndex = 0
    # While enemyIndex is less than len(enemies)
    while enemyIndex < len(enemies):
        # Attack the enemy at enemyIndex
        enemy = enemies[enemyIndex]
        # Increase enemyIndex by one.
        enemyIndex += 1
    coins = hero.findItems()
    # coinIndex is used to iterate the coins array.
    coinIndex = 0
    while coinIndex < len(coins):
        # Get a coin from the coins array using coinIndex
        coin = coins[coinsIndex]
        # Collect that coin.
        hero.moveXY(item.pos.x, item.pos.y)
        # Increase coinIndex by one.
        coinIndex += 1

1 Like

dis me code

1 Like

how about you add an if-statement:

if enemy:

and for the coin:

if coin:
    hero.moveXY(item.pos.x, item.pos.y)

PS. Welcome back!


That should work. But it also depends on the gear as well. So, could we see your gear please?

nope doesnt work sadly oof

ima take a quick screenshot

it told me to use the cleaver

have you ever tried using cleave?


I would also implement bashing and shielding(optional) to increase your survivability rate.

nah not the shield i dont wanna use it

i just made new code and it doesnt work

Instead of using len use this:

if coin and not enemy:
    hero.movexy(coin.pos.x, coin.pos.y)

Because you can focus on attacking, and still pick up coins
Ring of speed also helps a LOT

you forgot to capitalize the x and y in the moveXY

Yeah. Sorry about that

i dont wanna buy rng of speed for one

1 Like

even more new code and still doesnt work

1 Like

i think i found the problem but now I

have a new one

1 Like

and it is only killing the first round of orges

1 Like

ogres i mean

(i hate the 20 char rule)

1 Like