From 6eb1174db89748cf522e937de123a7c4a6642191 Mon Sep 17 00:00:00 2001 From: Beck Date: Thu, 4 Jun 2026 21:08:59 -0700 Subject: [PATCH] amulet dialogue logic --- .../FatherUrhneyQuestDialogueFile.kt | 63 ++++++++++++------- 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/Server/src/main/content/region/misthalin/lumbridge/quest/therestlessghost/FatherUrhneyQuestDialogueFile.kt b/Server/src/main/content/region/misthalin/lumbridge/quest/therestlessghost/FatherUrhneyQuestDialogueFile.kt index fc9cd596b..be92515a4 100644 --- a/Server/src/main/content/region/misthalin/lumbridge/quest/therestlessghost/FatherUrhneyQuestDialogueFile.kt +++ b/Server/src/main/content/region/misthalin/lumbridge/quest/therestlessghost/FatherUrhneyQuestDialogueFile.kt @@ -20,7 +20,8 @@ import org.rs09.consts.Items class FatherUrhneyQuestDialogueFile : DialogueLabeller() { override fun addConversation() { - + //mid quest asking for amulet + npc(FacialExpression.ANGRY, "I suppose I'd better talk to you then. What problems", "has he got himself into this time?"); player("He's got a ghost haunting his graveyard."); @@ -69,34 +70,54 @@ class FatherUrhneyQuestDialogueFile : DialogueLabeller() { class FatherUrhneyQuestAmuletDialogueFile : DialogueLabeller() { override fun addConversation() { + + //mid or after finishing quest and needing another one or doing the drop trick + npc("Father Urhney sighs.") exec { player, npc -> if (anyInEquipment(player, Items.GHOSTSPEAK_AMULET_552) || anyInInventory(player, Items.GHOSTSPEAK_AMULET_552)) { - npc("What are you talking about? I can see you've got it", "with you!") - } - - if (inBank(player, Items.GHOSTSPEAK_AMULET_552)) { - npc(FacialExpression.ANGRY, "You come here wasting my time... Has it even", "occurred to you to look in your bank? Now GO", "AWAY!") - } - - npc(FacialExpression.ANGRY, "How careless can you get? Those things aren't easy to", "come by you know! It's a good job I've got a spare.") - - if (freeSlots(player) >= 1) { - if (addItem(player, Items.GHOSTSPEAK_AMULET_552, 1)) { - item(Item(Items.GHOSTSPEAK_AMULET_552), "Father Urhney hands you an amulet.") - - player.achievementDiaryManager.finishTask(player, DiaryType.LUMBRIDGE, 1, 12) - - npc(FacialExpression.ANGRY, "Be more careful this time.") - player("Ok, I'll try to be."); - } + loadLabel(player, "amulet_equip_resp") + } else if (inBank(player, Items.GHOSTSPEAK_AMULET_552)) { + loadLabel(player, "amulet_in_bank_resp") } else { - sendMessage(player, "You don't have enough inventory space to accept this amulet.") + loadLabel(player, "give_amulet") } } - goto("nowhere") + label("amulet_equip_resp") { + npc("What are you talking about? I can see you've got it", "with you!") + goto("nowhere") + } + + label("amulet_in_bank_resp") { + npc(FacialExpression.ANGRY, "You come here wasting my time... Has it even", "occurred to you to look in your bank? Now GO", "AWAY!") + goto("nowhere") + } + + label("give_amulet") { + npc(FacialExpression.ANGRY, "How careless can you get? Those things aren't easy to", "come by you know! It's a good job I've got a spare.") + + exec { player, npc -> + if (freeSlots(player) >= 1) { + if (addItem(player, Items.GHOSTSPEAK_AMULET_552, 1)) { + item(Item(Items.GHOSTSPEAK_AMULET_552), "Father Urhney hands you an amulet.") + + player.achievementDiaryManager.finishTask(player, DiaryType.LUMBRIDGE, 1, 12) + loadLabel(player, "give_amulet_response") + } + } else { + sendMessage(player, "You don't have enough inventory space to accept this amulet.") + loadLabel(player, "nowhere") + } + } + } + + label("give_amulet_resp") { + npc(FacialExpression.ANGRY, "Be more careful this time.") + player("Ok, I'll try to be.") + goto("nowhere") + } //because end() breaks shit label("nowhere") {}