Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Hitman Help Please![SOLVED]

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);
    }
}


If I remember correctly, you need to sneak up closer to her so your attack hits her before she sees you. Add one more phase-shift wait at the last X then get as close as you can without running into her.
What weapons do you have? You might need to get a more powerful weapon for one hit.

Thank you! I finished the level.