Cant win on signal corpse (javascript)

so i played the signal corpse last week,i have type the code correctly but when i play it i cant win at all, it so hard to beat the goblin, i always died…there’s mah script (javascript)

loop {
    var green = this.findFlag("green");
    var black = this.findFlag("black");
    var enemy = this.findNearestEnemy();
    
    if (green) {
        this.pickUpFlag(green);
          this.attack(enemy);
    } else if (black) {
        this.pickUpFlag(black);
        this.cleave(enemy);     
        
    } else if (enemy && this.distanceTo(enemy) < 10) {
        this.attack(enemy);
        
    }
    else
    this.shield();
    
}

and really, i cant beat dis level!! i always die and die…i play for 1 weeks but no wins…
when the all goblin is dead and 1 big goblin left, i always out of time when i almost win :frowning:
can you gimme the strategy how to win dis level?? or the script is wrong? but no errors…

while(true) {
var green = hero.findFlag(“green”);
var black = hero.findFlag(“black”);
var neardest = hero.findNearestEnemy();

if (green) {
    hero.pickUpFlag(green);
} else if (black && hero.isReady("cleave")){
    hero.pickUpFlag(black);
    hero.cleave(neardest);
    // Cleave!
}else if (neardest && hero.distanceTo(neardest) < 10){
    hero.attack(neardest);
        }

}

Hi Andres_Felipe_Valenc,

Welcome to the forum!

Are you having trouble with your code, and if so can you tell us the problem?

If you’re just trying to help Kevin_Raka_Noverian then his post is really old, so he won’t need help on the level any more.

Cheers,

Jenny

1 Like