mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
finished zealot dialogue
This commit is contained in:
parent
a8becdf020
commit
6f728cbef8
3 changed files with 128 additions and 30 deletions
|
|
@ -34,6 +34,7 @@ class HauntedMine : Quest(Quests.HAUNTED_MINE,73 ,72 ,2 ,382, 0, 1, 11) {
|
||||||
|
|
||||||
const val attributeKilledTreusDayth = "/save:quest:hauntedmine-killedtreusdayth" // True after you've killed Treus Dayth.
|
const val attributeKilledTreusDayth = "/save:quest:hauntedmine-killedtreusdayth" // True after you've killed Treus Dayth.
|
||||||
const val attributeKeyMentioned = "/save:quest:hauntedmine-keymentioned" // True after the player asks about a way into the mines.
|
const val attributeKeyMentioned = "/save:quest:hauntedmine-keymentioned" // True after the player asks about a way into the mines.
|
||||||
|
const val attributeZealotKeyReturned = "/save:quest:hauntedmine-zealotkeyreturned" // True after you return the zealot's key after the quest. Note that this should not reset after quest completion
|
||||||
}
|
}
|
||||||
|
|
||||||
// Quest Journal ref: https://youtu.be/CD77NeKz1J4?si=AxNEg5YZU5oJ3T11&t=231
|
// Quest Journal ref: https://youtu.be/CD77NeKz1J4?si=AxNEg5YZU5oJ3T11&t=231
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ class HauntedMineListeners : InteractionListener {
|
||||||
return@onUseWith true
|
return@onUseWith true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// you should not be able to pickpocket the key after the quest, but that should be taken care of by clearing the attributeKeyMentioned when the quest finishes.
|
||||||
on(NPCs.ZEALOT_1528, IntType.NPC, "pickpocket"){ player, node ->
|
on(NPCs.ZEALOT_1528, IntType.NPC, "pickpocket"){ player, node ->
|
||||||
if(getAttribute(player, attributeKeyMentioned, false) && !player.inventory.containsItem(Item(Items.ZEALOTS_KEY_4078))){
|
if(getAttribute(player, attributeKeyMentioned, false) && !player.inventory.containsItem(Item(Items.ZEALOTS_KEY_4078))){
|
||||||
player.lock()
|
player.lock()
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
package content.region.morytania.quest.hauntedmine
|
package content.region.morytania.quest.hauntedmine
|
||||||
|
|
||||||
import content.data.Quests
|
import content.data.Quests
|
||||||
import content.region.kandarin.quest.murdermystery.MurderMystery.Companion.attributeAskPoisonAnna
|
|
||||||
import content.region.kandarin.quest.murdermystery.MurderMystery.Companion.attributePoisonClue
|
|
||||||
import content.region.morytania.quest.hauntedmine.HauntedMine.Companion.attributeKeyMentioned
|
import content.region.morytania.quest.hauntedmine.HauntedMine.Companion.attributeKeyMentioned
|
||||||
|
import content.region.morytania.quest.hauntedmine.HauntedMine.Companion.attributeZealotKeyReturned
|
||||||
import core.api.*
|
import core.api.*
|
||||||
import core.game.dialogue.*
|
import core.game.dialogue.*
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
|
|
@ -30,11 +29,18 @@ class ZealotDialogue (player: Player? = null) : DialoguePlugin(player) {
|
||||||
// message on why you should appreciate this bespoke, small-batch, hand-crafted dialogue. >:(
|
// message on why you should appreciate this bespoke, small-batch, hand-crafted dialogue. >:(
|
||||||
class ZealotDialogueFile : DialogueFile() {
|
class ZealotDialogueFile : DialogueFile() {
|
||||||
override fun handle(componentID: Int, buttonID: Int) {
|
override fun handle(componentID: Int, buttonID: Int) {
|
||||||
when (getQuestStage(player!!, Quests.MURDER_MYSTERY)) {
|
when (getQuestStage(player!!, Quests.HAUNTED_MINE)) {
|
||||||
|
|
||||||
|
// dialogue before/during the quest
|
||||||
|
in 0..99 -> when (stage) {
|
||||||
|
0 -> playerl(
|
||||||
|
FacialExpression.NEUTRAL, "Hello there."
|
||||||
|
).also {
|
||||||
|
if (getQuestStage(player!!, Quests.HAUNTED_MINE) == 0) {
|
||||||
|
stage = 1
|
||||||
|
} else stage = 89
|
||||||
|
}
|
||||||
|
|
||||||
// dialogue before starting the quest
|
|
||||||
0 -> when (stage) {
|
|
||||||
0 -> playerl(FacialExpression.NEUTRAL, "Hello there.").also { stage++ }
|
|
||||||
1 -> npcl(FacialExpression.NEUTRAL, "State thy allegiance stranger.").also { stage++ }
|
1 -> npcl(FacialExpression.NEUTRAL, "State thy allegiance stranger.").also { stage++ }
|
||||||
2 -> showTopics(
|
2 -> showTopics(
|
||||||
Topic("I follow the path of Saradomin.", 3, true),
|
Topic("I follow the path of Saradomin.", 3, true),
|
||||||
|
|
@ -444,40 +450,130 @@ class ZealotDialogueFile : DialogueFile() {
|
||||||
).also { stage = END_DIALOGUE }
|
).also { stage = END_DIALOGUE }
|
||||||
|
|
||||||
88 -> playerl(FacialExpression.NEUTRAL, "I hope it goes well. Goodbye.").also { stage = END_DIALOGUE }
|
88 -> playerl(FacialExpression.NEUTRAL, "I hope it goes well. Goodbye.").also { stage = END_DIALOGUE }
|
||||||
|
|
||||||
|
// break point where if we've already started the quest
|
||||||
|
89 -> npcl(
|
||||||
|
FacialExpression.NEUTRAL,
|
||||||
|
"Hello again. I'm afraid I'm rather preoccupied. What was it you wanted?"
|
||||||
|
).also {
|
||||||
|
stage = if (getAttribute(player!!, attributeKeyMentioned, false)) {
|
||||||
|
90
|
||||||
|
} else 91
|
||||||
}
|
}
|
||||||
|
|
||||||
// dialogue after the quest is in progress
|
90 -> showTopics(
|
||||||
in 1..99 -> when (stage) {
|
Topic(FacialExpression.NEUTRAL, "Can you explain the history of these mines again?", 32),
|
||||||
0 -> playerl(FacialExpression.NEUTRAL, "Quest in progress").also { stage = END_DIALOGUE }
|
Topic("Is there any other way into the mines?", 44, true),
|
||||||
/*
|
Topic("How does a lost artefact that was only legendary help?", 77, true),
|
||||||
// these are here so i can copy them
|
Topic("Why was everyone in the mines slaughtered?", 80, true),
|
||||||
0 -> playerl(FacialExpression.NEUTRAL, "").also { stage++ }
|
|
||||||
0 -> npcl(FacialExpression.NEUTRAL, "").also { stage++ }
|
|
||||||
0 -> showTopics(
|
|
||||||
Topic("", 0, true),
|
|
||||||
Topic("", 0, true),
|
|
||||||
Topic("", 0, true),
|
|
||||||
Topic("", 0, true),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
*/
|
91 -> showTopics(
|
||||||
|
Topic(FacialExpression.NEUTRAL, "Can you explain the history of these mines again?", 32),
|
||||||
|
Topic("Where is the second entrance to the mines?", 48, true),
|
||||||
|
Topic("Can I borrow your key?", 63, true),
|
||||||
|
Topic("How does a lost artefact that was only legendary help?", 77, true),
|
||||||
|
Topic("Why was everyone in the mines slaughtered?", 80, true),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// dialogue after the quest is completed
|
// dialogue after the quest is completed
|
||||||
100 -> when (stage) {
|
100 -> when (stage) {
|
||||||
0 -> playerl(FacialExpression.NEUTRAL, "Quest complete").also { stage = END_DIALOGUE }
|
|
||||||
/*
|
|
||||||
// these are here so i can copy them
|
|
||||||
0 -> playerl(FacialExpression.NEUTRAL, "").also { stage++ }
|
|
||||||
0 -> npcl(FacialExpression.NEUTRAL, "").also { stage++ }
|
|
||||||
0 -> showTopics(
|
0 -> showTopics(
|
||||||
Topic("", 0, true),
|
Topic("I've done it, I've managed to recreate the salve amulet!", 1, true),
|
||||||
Topic("", 0, true),
|
Topic(FacialExpression.NEUTRAL, "What powers does the salve amulet have?", 23),
|
||||||
Topic("", 0, true),
|
)
|
||||||
Topic("", 0, true),
|
// check if the zealot's key has been returned.
|
||||||
|
1 -> playerl(
|
||||||
|
FacialExpression.NEUTRAL,
|
||||||
|
"I've done it, I've managed to recreate the salve amulet!"
|
||||||
|
).also {
|
||||||
|
stage = if (!getAttribute(player!!, attributeZealotKeyReturned, false)) {
|
||||||
|
2
|
||||||
|
} else 19
|
||||||
|
}
|
||||||
|
|
||||||
|
2 -> npcl(
|
||||||
|
FacialExpression.NEUTRAL,
|
||||||
|
"That hardly seems likely. There is no way you could have made it to the bottom of the mines without the key which is in my possession."
|
||||||
|
).also { stage++ }
|
||||||
|
|
||||||
|
3 -> showTopics(
|
||||||
|
Topic("I found another way down.", 4, true),
|
||||||
|
Topic("Correction, the key that was in your possession.", 6, true),
|
||||||
|
Topic("Fine, don't believe me.", 18, true),
|
||||||
)
|
)
|
||||||
|
|
||||||
*/
|
4 -> playerl(FacialExpression.NEUTRAL, "I, er... found another way down.").also { stage++ }
|
||||||
|
5 -> npcl(
|
||||||
|
FacialExpression.NEUTRAL,
|
||||||
|
"Mock me not, this is a serious task I am undertaking. I don't have the time for your halfwitted attempt at humour."
|
||||||
|
).also { stage = END_DIALOGUE }
|
||||||
|
|
||||||
|
6 -> playerl(
|
||||||
|
FacialExpression.NEUTRAL,
|
||||||
|
"Correction, the key that was in your possession."
|
||||||
|
).also { stage++ }
|
||||||
|
|
||||||
|
7 -> npcl(FacialExpression.NEUTRAL, "My key, where is it? You stole it?").also { stage++ }
|
||||||
|
8 -> npcl(FacialExpression.NEUTRAL, "Return that key to me now!").also {
|
||||||
|
stage = if (player!!.inventory.contains(Items.ZEALOTS_KEY_4078, 1)) {
|
||||||
|
10
|
||||||
|
} else 16
|
||||||
|
}
|
||||||
|
|
||||||
|
10 -> showTopics(
|
||||||
|
Topic("Ok, I've finished with it now anyway.", 11, true),
|
||||||
|
Topic("Actually maybe I'll just keep hold of it for now.", 14, true),
|
||||||
|
)
|
||||||
|
|
||||||
|
11 -> playerl(FacialExpression.NEUTRAL, "Ok, I've finished with it now anyway.").also { stage++ }
|
||||||
|
12 -> npcl(
|
||||||
|
FacialExpression.NEUTRAL,
|
||||||
|
"Good, maybe all is not lost, despite your apparent lack of common sense."
|
||||||
|
).also { stage++ }
|
||||||
|
// remove the key and set an attribute that it's been returned.
|
||||||
|
13 -> playerl(FacialExpression.NEUTRAL, "Er... you're welcome?").also { stage = END_DIALOGUE }.also {
|
||||||
|
removeItem(
|
||||||
|
player!!, Items.ZEALOTS_KEY_4078
|
||||||
|
)
|
||||||
|
}.also { setAttribute(player!!, attributeZealotKeyReturned, true) }
|
||||||
|
|
||||||
|
14 -> playerl(
|
||||||
|
FacialExpression.NEUTRAL,
|
||||||
|
"Actually maybe I'll just keep hold of it for now."
|
||||||
|
).also { stage++ }
|
||||||
|
|
||||||
|
15 -> npcl(
|
||||||
|
FacialExpression.NEUTRAL,
|
||||||
|
"Meddling fool, there are bigger things at stake here than you and your petty thieving intellect can understand."
|
||||||
|
).also { stage = END_DIALOGUE }
|
||||||
|
|
||||||
|
16 -> playerl(FacialExpression.NEUTRAL, "I seem to have misplaced it, sorry.").also { stage++ }
|
||||||
|
17 -> npcl(
|
||||||
|
FacialExpression.NEUTRAL,
|
||||||
|
"Arrrrrrrgh, you're unbelievable. Get out of my sight."
|
||||||
|
).also { stage++ }
|
||||||
|
|
||||||
|
18 -> playerl(FacialExpression.NEUTRAL, "Fine, don't believe me.").also { stage = END_DIALOGUE }
|
||||||
|
19 -> npcl(
|
||||||
|
FacialExpression.NEUTRAL,
|
||||||
|
"Then it is fortunate for us that Saradomin has guided you. Success certainly doesn't seem likely to have stemmed from rational behaviour on your part."
|
||||||
|
).also { stage++ }
|
||||||
|
|
||||||
|
20 -> playerl(
|
||||||
|
FacialExpression.NEUTRAL,
|
||||||
|
"You still haven't forgiven me for borrowing your key have you?"
|
||||||
|
).also { stage++ }
|
||||||
|
|
||||||
|
21 -> npcl(FacialExpression.NEUTRAL, "Borrowed!? You stole it!").also { stage++ }
|
||||||
|
22 -> playerl(FacialExpression.NEUTRAL, "I'd better be going now.").also { stage = END_DIALOGUE }
|
||||||
|
23 -> npcl(
|
||||||
|
FacialExpression.NEUTRAL,
|
||||||
|
"From what I have heard they would be put to best use in the slaying of the evil undead, the zombies and skeletons that walk this land."
|
||||||
|
).also { stage++ }
|
||||||
|
|
||||||
|
24 -> playerl(FacialExpression.NEUTRAL, "Thanks for the tip.").also { stage = END_DIALOGUE }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue