From 535b6c3e8e398be2ad8d9ac7ad0ad79065a09ec3 Mon Sep 17 00:00:00 2001 From: P0nk Date: Mon, 29 Aug 2022 21:58:58 +0200 Subject: [PATCH] Make Deet and Roi killable after talking to magic pentagram --- scripts/npc/2111026.js | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/scripts/npc/2111026.js b/scripts/npc/2111026.js index 2a9297dda3..76ce5ef8ea 100644 --- a/scripts/npc/2111026.js +++ b/scripts/npc/2111026.js @@ -24,7 +24,34 @@ Incomplete Magic Square */ +var status; + function start() { - cm.sendNext("This chalkboard has some hard-founded studies annotated on it..."); - cm.dispose(); + status = -1; + action(1, 0, 0); +} + +function action(mode, type, selection) { + if (mode == -1) { + cm.dispose(); + } else { + if (mode == 0 && status == 0) { + cm.dispose(); + return; + } + if (mode == 1) { + status++; + } else { + status--; + } + + if (status == 0) { + cm.sendAcceptDecline("This Magic Pentagram is incomplete. Would you like to finish off the drawing of the Magic Pentagram?"); + return; + } else if (status == 1) { + cm.weakenAreaBoss(8090000, "The Magic Pentagram has been completed. The spell to eliminate Deet and Roi has been summoned."); + } + + cm.dispose(); + } } \ No newline at end of file