Fixed Death Plateau softlock in Dunstan dialogue

Fixed Harold not accepting blurberry special
Spiked boots now accessible
This commit is contained in:
Oven Bread 2025-02-16 05:17:13 +00:00 committed by Ryan
parent 4387b346dc
commit 957477b9b0
5 changed files with 111 additions and 6 deletions

View file

@ -6,9 +6,11 @@ import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic import core.game.dialogue.Topic
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.node.item.Item
import core.plugin.Initializable import core.plugin.Initializable
import core.tools.END_DIALOGUE import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE import core.tools.START_DIALOGUE
import org.rs09.consts.Items
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
/** /**
@ -28,6 +30,7 @@ class DunstanDialogue(player: Player? = null) : DialoguePlugin(player) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage++ } START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage++ }
1 -> npcl(FacialExpression.FRIENDLY, "Hi! What can I do for you?").also { stage++ } 1 -> npcl(FacialExpression.FRIENDLY, "Hi! What can I do for you?").also { stage++ }
2 -> showTopics( 2 -> showTopics(
Topic(FacialExpression.THINKING, "Can you put some spikes on my Climbing boots?", 30),
Topic(FacialExpression.THINKING, "Is it OK if I use your anvil?", 10), Topic(FacialExpression.THINKING, "Is it OK if I use your anvil?", 10),
Topic(FacialExpression.FRIENDLY, "Nothing, thanks.", END_DIALOGUE), Topic(FacialExpression.FRIENDLY, "Nothing, thanks.", END_DIALOGUE),
Topic(FacialExpression.FRIENDLY, "How is your son getting on?", 15), Topic(FacialExpression.FRIENDLY, "How is your son getting on?", 15),
@ -41,6 +44,37 @@ class DunstanDialogue(player: Player? = null) : DialoguePlugin(player) {
15 -> npcl(FacialExpression.FRIENDLY, "He is getting on fine! He has just been promoted to Sergeant! I'm really proud of him!").also { stage++ } 15 -> npcl(FacialExpression.FRIENDLY, "He is getting on fine! He has just been promoted to Sergeant! I'm really proud of him!").also { stage++ }
16 -> playerl(FacialExpression.FRIENDLY, "I'm happy for you!").also { stage++ } 16 -> playerl(FacialExpression.FRIENDLY, "I'm happy for you!").also { stage++ }
17 -> npcl(FacialExpression.FRIENDLY, "Anything else before I get on with my work?").also { stage = 2 } 17 -> npcl(FacialExpression.FRIENDLY, "Anything else before I get on with my work?").also { stage = 2 }
30 -> playerl(FacialExpression.FRIENDLY, "Can you put some spikes on my Climbing boots?").also { stage++ }
31 -> npcl(FacialExpression.NEUTRAL,"For you, no problem.").also { stage++ }
32 -> npc(FacialExpression.THINKING, "Do you realise that you can only use the Climbing", "boots right now? The Spiked boots can only be used in", "the Icelands but no ones been able to get there for", "years!").also { stage++ }
33 -> showTopics(
Topic(FacialExpression.NEUTRAL, "Yes, but I still want them.", 40, true),
Topic(FacialExpression.NEUTRAL, "Oh OK, I'll leave them thanks.", 43),
)
40 -> {
if (inInventory(player!!, Items.CLIMBING_BOOTS_3105) && inInventory(player!!, Items.IRON_BAR_2351)) {
sendDoubleItemDialogue(player!!, Items.IRON_BAR_2351, Items.CLIMBING_BOOTS_3105, "You give Dunstan an Iron bar and the climbing boots.")
sendMessage(player!!, "You give Dunstan an Iron bar and the climbing boots.")
if (removeItem(player!!, Item(Items.CLIMBING_BOOTS_3105)) && removeItem(player!!, Item(Items.IRON_BAR_2351))) {
addItemOrDrop(player!!, Items.SPIKED_BOOTS_3107)
stage++
} else {
stage = END_DIALOGUE
}
} else if (inInventory(player!!, Items.CLIMBING_BOOTS_3105)){
npcl(FacialExpression.NEUTRAL,"Sorry, I'll need an iron bar to make the spikes.")
stage = 2
} else {
playerl(FacialExpression.NEUTRAL,"I don't have them on me.")
stage = 2
}
}
41 -> sendItemDialogue(player!!, Items.SPIKED_BOOTS_3107, "Dunstan has given you the spiked boots.").also { stage++
sendMessage(player!!, "Dunstan has given you the spiked boots.")
}
43 -> npcl(FacialExpression.FRIENDLY, "Anything else before I get on with my work?").also {
stage = 2
}
} }
return true return true
} }
@ -57,6 +91,7 @@ class DunstanDialogue(player: Player? = null) : DialoguePlugin(player) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage++ } START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage++ }
1 -> npcl(FacialExpression.FRIENDLY, "Hi! What can I do for you?").also { stage++ } 1 -> npcl(FacialExpression.FRIENDLY, "Hi! What can I do for you?").also { stage++ }
2 -> showTopics( 2 -> showTopics(
Topic(FacialExpression.THINKING, "Can you put some spikes on my Climbing boots?", 30),
Topic(FacialExpression.THINKING, "Is it OK if I use your anvil?", 10), Topic(FacialExpression.THINKING, "Is it OK if I use your anvil?", 10),
Topic(FacialExpression.FRIENDLY, "Nothing, thanks.", END_DIALOGUE), Topic(FacialExpression.FRIENDLY, "Nothing, thanks.", END_DIALOGUE),
Topic(FacialExpression.FRIENDLY, "How is your son getting on?", 15), Topic(FacialExpression.FRIENDLY, "How is your son getting on?", 15),
@ -69,6 +104,37 @@ class DunstanDialogue(player: Player? = null) : DialoguePlugin(player) {
15 -> npcl(FacialExpression.SAD, "He was captured by those cursed trolls! I don't know what to do. Even the imperial guard are too afraid to go rescue him.").also { stage++ } 15 -> npcl(FacialExpression.SAD, "He was captured by those cursed trolls! I don't know what to do. Even the imperial guard are too afraid to go rescue him.").also { stage++ }
16 -> playerl(FacialExpression.ASKING, "What happened?").also { stage++ } 16 -> playerl(FacialExpression.ASKING, "What happened?").also { stage++ }
17 -> npcl(FacialExpression.SAD, "Talk to Denulth, he can tell you all about it. Anything else before I get on with my work?").also { stage = 2 } 17 -> npcl(FacialExpression.SAD, "Talk to Denulth, he can tell you all about it. Anything else before I get on with my work?").also { stage = 2 }
30 -> npcl(FacialExpression.NEUTRAL,"For you, no problem.").also { stage++ }
31 -> npc(FacialExpression.THINKING, "Do you realise that you can only use the Climbing", "boots right now? The Spiked boots can only be used in", "the Icelands but no ones been able to get there for", "years!").also { stage++ }
32 -> showTopics(
Topic(FacialExpression.NEUTRAL, "Yes, but I still want them.", 40, true),
Topic(FacialExpression.NEUTRAL, "Oh OK, I'll leave them thanks.", 43),
)
40 -> {
if (inInventory(player!!, Items.CLIMBING_BOOTS_3105) && inInventory(player!!, Items.IRON_BAR_2351)) {
sendDoubleItemDialogue(player!!, Items.IRON_BAR_2351, Items.CLIMBING_BOOTS_3105, "You give Dunstan an Iron bar and the climbing boots.")
sendMessage(player!!, "You give Dunstan an Iron bar and the climbing boots.")
if (removeItem(player!!, Item(Items.CLIMBING_BOOTS_3105)) && removeItem(player!!, Item(Items.IRON_BAR_2351))) {
addItemOrDrop(player!!, Items.SPIKED_BOOTS_3107)
stage++
} else {
stage = END_DIALOGUE
}
} else if (inInventory(player!!, Items.CLIMBING_BOOTS_3105)){
npcl(FacialExpression.NEUTRAL,"Sorry, I'll need an iron bar to make the spikes.")
stage = 2
} else {
playerl(FacialExpression.NEUTRAL,"I don't have them on me.")
stage = 2
}
}
41 -> sendItemDialogue(player!!, Items.SPIKED_BOOTS_3107, "Dunstan has given you the spiked boots.").also {
stage = 43
sendMessage(player!!, "Dunstan has given you the spiked boots.")
}
43 -> npcl(FacialExpression.FRIENDLY, "Anything else before I get on with my work?").also {
stage = 2
}
} }
return true return true
} }

View file

@ -154,7 +154,7 @@ class DenulthDialogueFile : DialogueFile() {
stage = 8 stage = 8
} }
} }
7 -> playerl(FacialExpression.FRIENDLY, "I have opened the door but I don't have the combination on me.").also { stage++ } 7 -> playerl(FacialExpression.FRIENDLY, "I have opened the door but I don't have the combination on me.").also { stage = END_DIALOGUE }
8 -> playerl(FacialExpression.FRIENDLY, "Yes! The door is open and here is the combination.").also { stage++ } 8 -> playerl(FacialExpression.FRIENDLY, "Yes! The door is open and here is the combination.").also { stage++ }
9 -> sendItemDialogue(player!!, Items.COMBINATION_3102, "You give Denulth the combination to the equipment room.").also { 9 -> sendItemDialogue(player!!, Items.COMBINATION_3102, "You give Denulth the combination to the equipment room.").also {
if (removeItem(player!!, Item(Items.COMBINATION_3102))) { if (removeItem(player!!, Item(Items.COMBINATION_3102))) {

View file

@ -83,15 +83,17 @@ class DunstanDialogueFile : DialogueFile() {
4 -> playerl(FacialExpression.FRIENDLY, "I don't have the climbing boots.").also { stage = END_DIALOGUE } 4 -> playerl(FacialExpression.FRIENDLY, "I don't have the climbing boots.").also { stage = END_DIALOGUE }
5 -> playerl(FacialExpression.FRIENDLY, "I don't have the iron bar or the climbing boots.").also { stage = END_DIALOGUE } 5 -> playerl(FacialExpression.FRIENDLY, "I don't have the iron bar or the climbing boots.").also { stage = END_DIALOGUE }
7 -> sendDoubleItemDialogue(player!!, Items.IRON_BAR_2351, Items.CLIMBING_BOOTS_3105, "You give Dunstan an iron bar and the climbing boots.").also { 7 -> sendDoubleItemDialogue(player!!, Items.IRON_BAR_2351, Items.CLIMBING_BOOTS_3105, "You give Dunstan an Iron bar and the climbing boots.").also {
sendMessage(player!!, "You give Dunstan an Iron bar and the climbing boots.")
if (removeItem(player!!, Item(Items.CLIMBING_BOOTS_3105)) && removeItem(player!!, Item(Items.IRON_BAR_2351))) { if (removeItem(player!!, Item(Items.CLIMBING_BOOTS_3105)) && removeItem(player!!, Item(Items.IRON_BAR_2351))) {
addItemOrDrop(player!!, Items.SPIKED_BOOTS_3107)
stage++ stage++
} else { } else {
stage = END_DIALOGUE stage = END_DIALOGUE
} }
} }
8 -> sendItemDialogue(player!!, Items.SPIKED_BOOTS_3107, "Dunstan has given you the spiked boots.").also { stage++ 8 -> sendItemDialogue(player!!, Items.SPIKED_BOOTS_3107, "Dunstan has given you the spiked boots.").also { stage++
addItemOrDrop(player!!, Items.SPIKED_BOOTS_3107) sendMessage(player!!, "Dunstan has given you the spiked boots.")
} }
9 -> playerl(FacialExpression.FRIENDLY, "Thank you!").also { stage++ } 9 -> playerl(FacialExpression.FRIENDLY, "Thank you!").also { stage++ }
10 -> npcl(FacialExpression.FRIENDLY, "No problem.").also { 10 -> npcl(FacialExpression.FRIENDLY, "No problem.").also {

View file

@ -112,6 +112,9 @@ class HaroldDialogueFile : DialogueFile() {
if (removeItem(player!!, Items.BLURBERRY_SPECIAL_2064)) { if (removeItem(player!!, Items.BLURBERRY_SPECIAL_2064)) {
sendMessage(player!!, "You give Harold a Blurberry Special.") sendMessage(player!!, "You give Harold a Blurberry Special.")
sendItemDialogue(player!!, Items.BLURBERRY_SPECIAL_2064, "You give Harold a Blurberry Special.").also { stage++ } sendItemDialogue(player!!, Items.BLURBERRY_SPECIAL_2064, "You give Harold a Blurberry Special.").also { stage++ }
} else if (removeItem(player!!, Items.BLURBERRY_SPECIAL_9520)) { // This should not be here since 9520 is used by the gnome restaurant minigame.
sendMessage(player!!, "You give Harold a Blurberry Special.")
sendItemDialogue(player!!, Items.BLURBERRY_SPECIAL_2064, "You give Harold a Blurberry Special.").also { stage++ }
} else if (removeItem(player!!, Items.PREMADE_BLURB_SP_2028)) { } else if (removeItem(player!!, Items.PREMADE_BLURB_SP_2028)) {
sendMessage(player!!, "You give Harold a Blurberry Special.") sendMessage(player!!, "You give Harold a Blurberry Special.")
sendItemDialogue(player!!, Items.PREMADE_BLURB_SP_2028, "You give Harold a Blurberry Special.").also { stage++ } sendItemDialogue(player!!, Items.PREMADE_BLURB_SP_2028, "You give Harold a Blurberry Special.").also { stage++ }

View file

@ -1,13 +1,14 @@
package content.region.asgarnia.burthorpe.quest.trollstronghold package content.region.asgarnia.burthorpe.quest.trollstronghold
import content.data.Quests import content.data.Quests
import core.api.finishQuest import core.api.*
import core.api.getQuestStage
import core.game.dialogue.DialogueFile import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic import core.game.dialogue.Topic
import core.game.node.item.Item
import core.tools.END_DIALOGUE import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE import core.tools.START_DIALOGUE
import org.rs09.consts.Items
class DunstanDialogueFile : DialogueFile() { class DunstanDialogueFile : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) { override fun handle(componentID: Int, buttonID: Int) {
@ -18,14 +19,47 @@ class DunstanDialogueFile : DialogueFile() {
1 -> playerl(FacialExpression.FRIENDLY, "Not yet.").also { stage++ } 1 -> playerl(FacialExpression.FRIENDLY, "Not yet.").also { stage++ }
2 -> npcl(FacialExpression.FRIENDLY, "Please hurry! Who knows what they will do to him? Is there anything I can do in the meantime?").also { stage++ } 2 -> npcl(FacialExpression.FRIENDLY, "Please hurry! Who knows what they will do to him? Is there anything I can do in the meantime?").also { stage++ }
3 -> showTopics( 3 -> showTopics(
Topic(FacialExpression.THINKING, "Can you put some spikes on my Climbing boots?", 30),
Topic(FacialExpression.THINKING, "Is it OK if I use your anvil?", 10), Topic(FacialExpression.THINKING, "Is it OK if I use your anvil?", 10),
Topic(FacialExpression.FRIENDLY, "Nothing, thanks.", END_DIALOGUE), Topic(FacialExpression.NEUTRAL, "Nothing, thanks.", 20),
) )
10 -> npcl(FacialExpression.FRIENDLY, "So you're a smithy are you?").also { stage++ } 10 -> npcl(FacialExpression.FRIENDLY, "So you're a smithy are you?").also { stage++ }
11 -> playerl(FacialExpression.FRIENDLY, "I dabble.").also { stage++ } 11 -> playerl(FacialExpression.FRIENDLY, "I dabble.").also { stage++ }
12 -> npcl(FacialExpression.FRIENDLY, "A fellow smith is welcome to use my anvil!").also { stage++ } 12 -> npcl(FacialExpression.FRIENDLY, "A fellow smith is welcome to use my anvil!").also { stage++ }
13 -> playerl(FacialExpression.FRIENDLY, "Thanks!").also { stage++ } 13 -> playerl(FacialExpression.FRIENDLY, "Thanks!").also { stage++ }
14 -> npcl(FacialExpression.FRIENDLY, "Anything else before I get on with my work?").also { stage = 3 } 14 -> npcl(FacialExpression.FRIENDLY, "Anything else before I get on with my work?").also { stage = 3 }
20 -> npcl(FacialExpression.NEUTRAL, "All right. Speak to you later then.").also { stage = END_DIALOGUE }
30 -> playerl("Can you put some spikes on my Climbing boots?").also { stage++ }
31 -> npcl("For you, no problem.").also { stage++ }
32 -> npc("Do you realise that you can only use the Climbing", "boots right now? The Spiked boots can only be used in", "the Icelands but no ones been able to get there for", "years!").also { stage++ }
33 -> showTopics(
Topic(FacialExpression.NEUTRAL, "Yes, but I still want them.", 40, true),
Topic(FacialExpression.NEUTRAL, "Oh OK, I'll leave them thanks.", 43),
)
40 -> {
if (inInventory(player!!, Items.CLIMBING_BOOTS_3105) && inInventory(player!!, Items.IRON_BAR_2351)) {
sendDoubleItemDialogue(player!!, Items.IRON_BAR_2351, Items.CLIMBING_BOOTS_3105, "You give Dunstan an Iron bar and the climbing boots.")
sendMessage(player!!, "You give Dunstan an Iron bar and the climbing boots.")
if (removeItem(player!!, Item(Items.CLIMBING_BOOTS_3105)) && removeItem(player!!, Item(Items.IRON_BAR_2351))) {
addItemOrDrop(player!!, Items.SPIKED_BOOTS_3107)
stage++
} else {
stage = END_DIALOGUE
}
} else if (inInventory(player!!, Items.CLIMBING_BOOTS_3105)){
npcl("Sorry, I'll need an iron bar to make the spikes.")
stage = 3
} else {
playerl("I don't have them on me.")
stage = 3
}
}
41 -> sendItemDialogue(player!!, Items.SPIKED_BOOTS_3107, "Dunstan has given you the spiked boots.").also { stage++
sendMessage(player!!, "Dunstan has given you the spiked boots.")
}
43 -> npcl(FacialExpression.FRIENDLY, "Anything else before I get on with my work?").also {
stage = 3
}
} }
} }
11 -> { 11 -> {