Help: Woodland Cleaver

Pm me if you are interested in helping me!!

We can help you directly here.

Post your code here so we can help you

In what format though? That’s what I’m confused about is the format that you want…

In your reply, click this button:
Screenshot 2021-01-26 at 4.56.32 PM
You should get this:
Screenshot 2021-01-26 at 4.56.38 PM
Where it says type or paste code here, you should copy and paste your code there.

Read this to help you

# Use your new "cleave" skill as often as you can.
hero.moveXY(23, 23);
while True:
    enemy=hero.findNearestEnemy()
    if enemy:
        hero.isReady("cleave")
        hero.cleave(enemy)
if enemy:
    hero.findNearestEnemy()
    hero.attack(enemy)

Did I do that right? :face_with_raised_eyebrow: :face_with_raised_eyebrow:

Your code is right what is your gear. Maybe you need more health.

Umm I don’t know to be honest. How do I get more health?

You buy better/more gear.

Check if your hero is ready to cleave, then cleave. Otherwise (else statement) attack an enemy. Then you can delete this:

Don’t I have that though @abc?

Put a if before this and a : after that

also get rid of this

What you have is not checking if your hero is ready to cleave. You should check it with:

if hero.isReady("cleave"):
    hero.cleave(enemy)

Then use an else statement after and attack.

I tried what both of you are saying and neither of your suggestions worked. Granted, I tried them before asking for help but doing something that i’ve already tried just because you’re telling me to doesn’t make ANY sense. You’re not professionals, and neither am I.

try doing this

elif enemy:
   hero.attack(enemy)

It says it has to be paired with an if or something?

In the while true loop, you should have an if statement checking if there is an enemy. Within that if statement there should be another if statement checking if your hero can cleave.

if enemy:
    if hero.isReady("cleave"):
        #cleave
    else:
        #attack