Hey guys,
I also need some help in this level. I don’t know why I always failing in one seconds by said “your hero must survive. (1/2)”. Who is the other? what s going on???
This is what I have.
//Commented out to stop infinite loop.
// Use your new skill to choose what to do: this.now()
loop {
// If it's the first 10 seconds, fight.
var enemy = this.findNearestEnemy();
var item = this.findNearestItem();
if (this.now() < 10) {
if(this.isReady("cleave")){
this.cleave(enemy);
}
else {
this.attack(enemy);
}
if(this.now() > 12){
this.say("I know! Geez relax. ");
}
}
else if(this.now() < 35){
if(item) {
var pos = item.pos;
var x = pos.x;
var y = pos.y;
this.moveXY(x, y);
}
}
if (this.now() > 30){
if(enemy){
if(this.isReady("cleave")){
this.cleave(enemy);
}
else {
this.attack(enemy);
}
}
}
}