Help: Woodland Cleaver

Pm me if you are interested in helping me!!

1 Like

We can help you directly here.

2 Likes

Post your code here so we can help you

3 Likes

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

1 Like

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.

1 Like

Read this to help you

3 Likes
# 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)

1 Like

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

2 Likes

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

1 Like

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

1 Like

You buy better/more gear.

1 Like

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

1 Like

Don’t I have that though @abc?

1 Like

Put a if before this and a : after that

1 Like

also get rid of this

1 Like

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.

1 Like

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.

1 Like

try doing this

elif enemy:
   hero.attack(enemy)
1 Like

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

1 Like

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
1 Like