Confusion On Multiplayer Treasure Grove

I used this code to win the AI Game:
During the use of this code, my character Tharin tries to walk through the fence on the edge of the battleground. Is this a bug or a problem in my code?

if hero.time < 200:
        coin = hero.findNearestItem()
        hero.moveXY(coin.pos.x, coin.pos.y)
        

It’s a problem with the move function you’re using. Try reaching coins using coin.pos.

Okay. Thank you @xython! Also, why is it that when I try to attack, my character afterwards won’t go back to coin-collecting?

You can see this post Marauder: complicated way is only slightly better to find how I cope usually with coins and enemies. As a side note - I almost never use
moveXY() and try to substitute it with move(). Even with the best moveXY boots and trying to do some tricks I cannot reach the effectiveness of advanced move boots. If you continue to have problems after reading some posts show here your code.

I found a code that works for me.

if hero.time < 500:
        coin = hero.findNearestItem()
        hero.moveXY(coin.pos.x, coin.pos.

I just want it to be faster.

You can just do

while(True)
    coin = hero.findNearestItem()
    if coin:
        hero.move(coin.pos)

Am I allowed to try this code on CoCo?

I guess so… (200000000)

It doesn’t work. Tharin doesn’t move, and it causes my code to be errored.

Copy it again (2000000000)

Buy these boots and when you advance more these: