[SOLVED] Help Me Clash of Clones

Hey can somebody help me with clash of clones because I keep dying, here is my code HELP ME PLEASE I have been stuck on this level for a week now.

hero.moveXY(54, 85)
hero.moveXY(79, 89)
while True:
    flag=hero.findFlag()
    enemy=hero.findNearestEnemy()
    if flag: 
        hero.pickUpFlag(flag)
    elif enemy:
        hero.bash(enemy)
        hero.attack(enemy)
    if hero.isReady("cleave"):
        hero.cleave(enemy)
    if hero.isReady("chain-lightning"):
        hero.cast("chain-lightning", enemy)

elif enemy part you never said if hero.isReady(“bash”) so it waits until its ready
if hero.isReady chainlightning part you never found an enemy so what am i supposed to cast it on?
same with the cleave one
hope this helps

  • cheddarcheese

I need help too, But not that one, umm… am I aloud to ask for help in this one?

What happens if bash is not ready to be used? And there will always be an enemy until late in the level. So you will not cast chain lightning or cleave. Do you want to use those or not?

Andrei

oh… Hi everyone, srry about yesterday, the teacher kept on calling my name, and had me answer questions for the rest of the day

@Whats_up_People I recommand you create a separate topic where to put your code and we will help you there.

Andrei

ok, i will, thanx (20000)

1 Like

pm me i might be able to help @Whats_up_People

You need to indent this so it is fully inside the elif statement. Also, have you checked if you’re hero is ready to bash yet?
Lydia

1 Like

ansedra and you have just said what i already said minutes ago

Sorry, I did not see your message until I finished to write mine.

Andrei

Okay I tried that but it did not work.

I recommend you try attacking the archers first (use flags or the Boots of Leaping to get there). It helped me win that level. Cleave them whenever you can and keep attacking. Don’t use a good sword because your clone will have the advantage of dealing more damage (it has your same armor and weapons).

2 Likes

Can you post your newest code?
Lydia

And can you send a screenshot of your equipment, @Zoe_Witte?

hero.moveXY(54, 85)
hero.moveXY(79, 89)
while True:
    flag=hero.findFlag()
    enemy=hero.findNearestEnemy()
    if flag: 
        hero.pickUpFlag(flag)
    elif enemy:
        if hero.isReady("bash"):
            hero.bash(enemy)
            hero.attack(enemy)
        if hero.isReady("cleave"):
            hero.cleave(enemy)
        if hero.isReady("chain-lightning"):
            hero.cast("chain-lightning", enemy)

In what order do you want to execute the attacks? And what do you do if bash, chain lightning, and cleave are not ready?

Andrei

1 Like

You should put this in an else statement.
Lydia

1 Like

Oh okay I will try that

2 Likes

That time I was a little closer to beating it but I died when the ogres started attacking me.

1 Like