From 17ae269cc9f371710aaaac89357ec10c2fb5d4cb Mon Sep 17 00:00:00 2001 From: P0nk Date: Mon, 29 Aug 2022 22:04:07 +0200 Subject: [PATCH] Make Security Camera killable after talking to control device --- scripts/npc/2111025.js | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/scripts/npc/2111025.js b/scripts/npc/2111025.js index 42ef71d0b5..709f4dfc60 100644 --- a/scripts/npc/2111025.js +++ b/scripts/npc/2111025.js @@ -24,7 +24,34 @@ Control Device */ +var status; + function start() { - cm.sendNext("This control device seems to be monitoring something..."); - 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("You can operate the automated security system using the control unit. Would you like to deactivate the automated security system?"); + return; + } else if (status == 1) { + cm.weakenAreaBoss(7090000, "The automated security system has been deactivated. The intruder alarm will shut down."); + } + + cm.dispose(); + } } \ No newline at end of file