Coding Help Needed


#1
# 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)

#2

I need help for passing through backwoods forest


#3

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


#4

I succeeded thanks…


#5

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

`