From d14e4ac3a66479063b6b5f535a74fc86c0f3fb45 Mon Sep 17 00:00:00 2001 From: Beck Date: Wed, 3 Jun 2026 23:52:29 -0700 Subject: [PATCH] dialogue fixes --- .../dialogue/FatherAereckDefaultDialogue.kt | 154 +++++++++--------- .../FatherAereckQuestDialogueFile.kt | 33 +++- 2 files changed, 110 insertions(+), 77 deletions(-) diff --git a/Server/src/main/content/region/misthalin/lumbridge/dialogue/FatherAereckDefaultDialogue.kt b/Server/src/main/content/region/misthalin/lumbridge/dialogue/FatherAereckDefaultDialogue.kt index 11a1eb9f3..77606f0ae 100644 --- a/Server/src/main/content/region/misthalin/lumbridge/dialogue/FatherAereckDefaultDialogue.kt +++ b/Server/src/main/content/region/misthalin/lumbridge/dialogue/FatherAereckDefaultDialogue.kt @@ -31,84 +31,86 @@ class FatherAereckDefaultDialogue : InteractionListener { */ class FatherAereckDefaultDialogueFile : DialogueLabeller() { override fun addConversation() { - - //allows skipping the main dialogue while Restless Ghost quest is started - exec { player, npc -> - when (getQuestStage(player, Quests.THE_RESTLESS_GHOST)) { - 0 -> { - loadLabel(player, "main_entry_transcript") - } - 10 -> { - open(player, FatherAereckQuestDialogueFile(), npc) - loadLabel(player, "quest_stage_10") - } - 20 -> { - open(player, FatherAereckQuestDialogueFile(), npc) - loadLabel(player, "quest_stage_20") - } - 30 -> { - open(player, FatherAereckQuestDialogueFile(), npc) - loadLabel(player, "quest_stage_30") - } - 40 -> { - open(player, FatherAereckQuestDialogueFile(), npc) - loadLabel(player, "quest_stage_40") + + goto("entry_logic") + + label("entry_logic") + //allows skipping the main dialogue while Restless Ghost quest is started + exec { player, npc -> + when (getQuestStage(player, Quests.THE_RESTLESS_GHOST)) { + 0 -> { + loadLabel(player, "main_entry_transcript") + } + 10, 20, 30, 40 -> { + //passthrough for mid-quest dialogue skip + open(player, FatherAereckQuestDialogueFile(), npc) + } + else -> { + loadLabel(player, "main_entry_transcript") + } } } - } label("main_entry_transcript") { - npc("Welcome to the church of holy Saradomin") + npc("Welcome to the church of holy Saradomin.") goto("main_opts") } label("main_opts") { exec { player, npc -> if (getQuestStage(player, Quests.THE_RESTLESS_GHOST) > 0) { - options( - DialogueOption( - "change_grave", - "Can you change my gravestone now?", - expression = ChatAnim.HALF_ASKING - ), - DialogueOption( - "who_sara", - "Who's Saradomin?", - expression = ChatAnim.HALF_ASKING - ), - DialogueOption( - "nice_place", - "Nice place you've got here.", - expression = ChatAnim.FRIENDLY - ) - ) + loadLabel(player, "no_quest_main_opts") } else { - options( - DialogueOption( - "change_grave", - "Can you change my gravestone now?", - expression = ChatAnim.HALF_ASKING - ), - DialogueOption( - "who_sara", - "Who's Saradomin?", - expression = ChatAnim.HALF_ASKING - ), - DialogueOption( - "nice_place", - "Nice place you've got here.", - expression = ChatAnim.FRIENDLY - ), - DialogueOption( - "start_restless_ghost_quest", - "I'm looking for a quest.", - expression = ChatAnim.HALF_ASKING - ) - ) + loadLabel(player, "not_started_quest_main_opts") } } } + label("no_quest_main_opts") { + options( + DialogueOption( + "change_grave", + "Can you change my gravestone now?", + expression = ChatAnim.HALF_ASKING + ), + DialogueOption( + "who_sara", + "Who's Saradomin?", + expression = ChatAnim.HALF_ASKING + ), + DialogueOption( + "nice_place", + "Nice place you've got here.", + expression = ChatAnim.FRIENDLY + ) + ) + } + + label("not_started_quest_main_opts") { + options( + DialogueOption( + "change_grave", + "Can you change my gravestone now?", + expression = ChatAnim.HALF_ASKING + ), + DialogueOption( + "who_sara", + "Who's Saradomin?", + expression = ChatAnim.HALF_ASKING + ), + DialogueOption( + "nice_place", + "Nice place you've got here.", + expression = ChatAnim.FRIENDLY + ), + DialogueOption( + "start_restless_ghost_quest", + "I'm looking for a quest.", + expression = ChatAnim.HALF_ASKING + ) + ) + } + label("change_grave") { npc("Certainly. All proceeds are donated to the", "Varrockian Guards' Widows & Orphans Fund.") goto("gravestone_iface") @@ -142,7 +144,8 @@ class FatherAereckDefaultDialogueFile : DialogueLabeller() { label("that_sara") { npc("There is only one Saradomin.") player("Yeah. I, uh, thought you said something else.") - end() + + goto("nowhere") } label("not_from_this_world") { @@ -168,35 +171,38 @@ class FatherAereckDefaultDialogueFile : DialogueLabeller() { label("disguise_not_me") { npc("Well, I can see that. Still, there's something special about", "you.") player("Thanks, I think.") - end() + + goto("nowhere") } label("like_disguise") { npc("Argh! Avaunt, foul creature from another dimension!", "Avaunt! Begone in the name of Saradomin!") player("Okay, okay, I was only joking!") - end() + + goto("nowhere") } label("nice_place") { npc("It is, isn't it? It was built over two centuries ago."); - end() + + goto("nowhere") } label("gravestone_iface") { - exec { player, npc -> openInterface(player, Components.GRAVESTONE_SHOP_652) player.achievementDiaryManager.finishTask(player, DiaryType.LUMBRIDGE, 0, 15); - end() + loadLabel(player, "nowhere") } } - label("start_restless_ghost") { - exec { player, npc -> - open(player, FatherAereckQuestDialogueFile(), npc) - loadLabel(player, "quest_main_entry") - } + //compile this too see if it works + label("start_restless_ghost_quest") { + open(player!!, FatherAereckQuestDialogueFile(), npc!!) } + // Because using end() breaks shit + label("nowhere") {} + } } \ No newline at end of file diff --git a/Server/src/main/content/region/misthalin/lumbridge/quest/therestlessghost/FatherAereckQuestDialogueFile.kt b/Server/src/main/content/region/misthalin/lumbridge/quest/therestlessghost/FatherAereckQuestDialogueFile.kt index 4d85b152d..8ffd9774c 100644 --- a/Server/src/main/content/region/misthalin/lumbridge/quest/therestlessghost/FatherAereckQuestDialogueFile.kt +++ b/Server/src/main/content/region/misthalin/lumbridge/quest/therestlessghost/FatherAereckQuestDialogueFile.kt @@ -21,6 +21,27 @@ class FatherAereckQuestDialogueFile : DialogueLabeller() { override fun addConversation() { + //passthrough for mid-quest dialogue skip + exec { player, npc -> + when (getQuestStage(player, Quests.THE_RESTLESS_GHOST)) { + 10 -> { + loadLabel(player, "quest_stage_10") + } + 20 -> { + loadLabel(player, "quest_stage_20") + } + 30 -> { + loadLabel(player, "quest_stage_30") + } + 40 -> { + loadLabel(player, "quest_stage_40") + } + else -> { + loadLabel(player, "quest_main_entry") + } + } + } + label("quest_main_entry") { npc("That's lucky, I need someone to do a quest for me.") goto("start_quest_opts") @@ -54,13 +75,15 @@ class FatherAereckQuestDialogueFile : DialogueLabeller() { npc("Take care travelling through the swamps, I have heard", "they can be quite dangerous.") player("I will, thanks.") - - end() + + goto("nowhere") + } label("no_time") { npc("Oh well. If you do have some spare time on your", "hands, come back and talk to me.") - end() + + goto("nowhere") } //mid quest dialogue @@ -95,5 +118,9 @@ class FatherAereckQuestDialogueFile : DialogueLabeller() { npc("Great! Put it in the ghost's coffin and see what", "happens!"); } + + //Because doing end() breaks + label("nowhere") {} + } } \ No newline at end of file