Coding Help Needed

# Don't insult this tribe of peaceful ogres.

while True:
    item = hero.findNearestItem()
    if item:
        # If item.type IS NOT EQUAL TO "gem"
        if item.type != "gem":
            # Then follow your pet wolf.
            hero.moveXY(pet.pos.x, pet.pos.y)
        # Else:
        else:
            hero.moveXY(77, 36)
            # Move to the gem's position.
            hero.moveXY(item.pos.x, item.pos.y)

I need help for passing through backwoods forest

It looks like you have an extra moveXY command after the else statement/conditional (the first one). Try removing it.

I succeeded thanks…

:+1:
Great! And thank you for posting your code properly!

`