I need help on this level. I keep getting to the ogre witch but I cant kill her without setting the alarm off. Can anyone please help me? My code is below:
// Eliminate the Witch and don't let ogres see you.
// This function allows you to wait until an ability is ready.
function waitFor(abilityName) {
while (true) {
if (hero.isReady(abilityName)) {
break;
}
}
}
waitFor("phase-shift");
hero.phaseShift();
// Make sure that hero doesn't get stuck.
hero.moveXY(12, 62);
hero.moveXY(60, 62);
hero.moveXY(60, 56);
// Wait until "phase-shift" is ready, to use it:
waitFor("phase-shift");
hero.phaseShift();
// Move to the next mark:
hero.moveXY(71, 55);
hero.moveXY(68, 18);
hero.moveXY(44, 17);
// Wait again, then use phaseShift and move:
waitFor("phase-shift");
hero.phaseShift();
// Wait, then use "phase-shift" to defeat the Witch with one hit:
hero.moveXY(44, 5);
hero.moveXY(6, 6);
hero.moveXY(6, 39);
var enemy = hero.findNearestEnemy();
while (true) {
if (enemy) {
hero.attack(enemy);
}
}