From 4d73416952f8f83e6a0c76e26d191e9ef99e5ef1 Mon Sep 17 00:00:00 2001 From: Charlie Unfricht Date: Wed, 17 Aug 2022 03:49:34 -0400 Subject: [PATCH] Add NPC handling for quest 3322 --- scripts/npc/2111013.js | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/scripts/npc/2111013.js b/scripts/npc/2111013.js index 23936ae7f2..08011c8a18 100644 --- a/scripts/npc/2111013.js +++ b/scripts/npc/2111013.js @@ -17,6 +17,9 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ +// NPC - Picture frame +// Location: Magatia - Home of the Missing Alchemist +// Used to handle quest 3322 - Phyllia's Pendant var status; @@ -39,22 +42,24 @@ function action(mode, type, selection) { status--; } + if (!cm.isQuestStarted(3322) || cm.haveItem(4031697, 1)) { + cm.dispose(); + return; + } + if (status == 0) { - if (cm.isQuestStarted(3311)) { - var progress = cm.getQuestProgressInt(3311); - - if (progress == 4) { - progress = 7; - } else { - progress = 5; - } - - cm.setQuestProgress(3311, progress); - - cm.sendOk("This is a mug picture of Dr. De Lang. It seems he is adorning a locket with the emblem of the Alcadno academy, he is a retainer of the Alcadno society.", 2); + cm.sendOk("The hook behind the frame was unhooked, revealing a secret space within the frame. There inside, a silver pendant was found. After carefully removing the pendant, the frame was closed and placed back onto the table."); + } + else if (status == 1) { + if (cm.canHold(4031697, 1)) { + cm.gainItem(4031697); } - + else { + cm.sendNext("Your inventory is full, please make sure you have an ETC slot available."); + } + } + else { cm.dispose(); } } -} +} \ No newline at end of file