[Unsolved] Clash of Clones

I am really stuck on this and i can’t figure out how to get through. I will appreciate it if you help me.

// You'll need good strategy to win this one!
// Your clone will have the same equipment you have!
// But, they're not very skilled at using special powers.
while(true) {
    var enemy = hero.findNearestEnemy();
    hero.attack(enemy);
}
while(true) {
var flag = hero.findFlag();
var enemy = hero.findNearestEnemy();
var item = hero.findNearestItem();
if (enemy) {
hero.moveXY(enemy.pos.x, enemy.pos.y);    
}
else if (flag) {
hero.pickUpFlag(flag);
}
}

even if i dont do java, i think i can still help. what’s ur equipment

try this ok?
it might work

attack archers first

you dont have to use flags, just target the archers first then retreat beacuse the archers do most damage.
Clone cant use special attacks, so use bash, cleave, chain-lightning, or drain-life.
If you have ring of death, use it to immedity kill ur clone.

It worked for me so it might for u

epic coder u helped me solve this level

YO no solutions dude

before when i was stuck

oh ok sorry im new to dicourse

lets take a screenshot
it might be equipment issue

WAIT oof! i was testing what the flag will do and i flagged my self. OOF!
at least i earned a badge

Guys plz dont ban me

This is my armor.

Tip: dont use a godly sword, use a trash one and focus on secondary attacks.

ok i willl take a scrreen shot

this is what is used

did u buy gems?
Note: you should get a better sense stone and maybe the enchanted lenses so u can see infinite distance.

You wanna know how to get level 66 sense stones cuz mine is level 66?

how did you get boss star 3 so quickly?
did you go directly to the link to it?

ok we need to help, not chat

I am on mountain thanks to u because u helped me past :desert: desert