[SOLVED] Passing Through

Hi guys! Too bad I’m still stuck on Passing Through. When it said #Else: I looked at the Programmaticon 2 else. But it says if hero is ready cleave. Can you guys help me please?

Thank you all :heart:

You must make an if that will test if your hero is ready to cleave. Is he is ready, use cleave, and else just attack in normal way. Tell if you need more help.

@xantar, the ogres are peaceful.

One of the goals is too “Not insult the peaceful ogres.”

Wait, Ill see the level…

But I will try and tell you if it works. Thanks! :smiley:

Where is the level is on the map? (for example right,up) And what are? (Kithgard dungeon, forest…)

It’s backwoods forest. It’s up and near that silver castle.

You don’t make ANYTHING to attack them.
You just need to collect all the gems, following your wolf

But the wolf always stops and Anya keeps getting the gems. I don’t know the code for her not to get them though.

Can you give me your code? Then Ill tell you whats wrong

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:
if hero.isReady(“cleave”):
# Move to the gem’s position.

Btw formatting your code:
You click on the </> button and then write inside the signs,like this
Its much more easier to understand it then
Delete the part about killing ogres (You don’t have to attack them)

I still don’t understand; what are the signs and like this mean?

I will delete the part about killing ogres, @xantar.

When you write your code inside these signs -> ``, its much more clearer. Click the </> button to get them

Instead you should move to gem position using moveXY

Okay. I’ll try that.

And try doing that with the code.

if SwordandShield.hasPostedCorrectly():
    hero.say("Well done!")
1 Like

:+1: Thanks, @xantar! It worked.