mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-01 14:39:13 -06:00
more dialogue
This commit is contained in:
parent
d14e4ac3a6
commit
23fda5fbc9
2 changed files with 130 additions and 109 deletions
|
|
@ -1,7 +1,7 @@
|
|||
package content.region.misthalin.lumbridge.dialogue;
|
||||
|
||||
import content.data.Quests
|
||||
import content.region.misthalin.lumbridge.quest.therestlessghost.FatherUrhneyQuestDialogueFile
|
||||
import content.region.misthalin.lumbridge.quest.therestlessghost.*
|
||||
import core.api.addItem
|
||||
import core.api.freeSlots
|
||||
import core.api.getQuestStage
|
||||
|
|
@ -36,73 +36,72 @@ class FatherUrhneyDefaultDialogueFile: DialogueLabeller() {
|
|||
goto("main_opts")
|
||||
|
||||
label("main_opts") {
|
||||
|
||||
exec {player, npc ->
|
||||
when (getQuestStage(player, Quests.THE_RESTLESS_GHOST)) {
|
||||
0 -> {
|
||||
options(
|
||||
DialogueOption(
|
||||
"thats_friendly",
|
||||
"Well, that's friendly"
|
||||
),
|
||||
DialogueOption(
|
||||
"repo_house",
|
||||
"I've come to repossess your house."
|
||||
),
|
||||
|
||||
)
|
||||
loadLabel(player, "pre_quest_opts")
|
||||
}
|
||||
10 -> {
|
||||
options(
|
||||
DialogueOption(
|
||||
"thats_friendly",
|
||||
"Well, that's friendly"
|
||||
),
|
||||
DialogueOption(
|
||||
"father_aereck_sent",
|
||||
"Father Aereck sent me to talk to you."
|
||||
),
|
||||
DialogueOption(
|
||||
"repo_house",
|
||||
"I've come to repossess your house."
|
||||
)
|
||||
)
|
||||
loadLabel(player, "mid_quest_opts")
|
||||
}
|
||||
|
||||
else -> {
|
||||
options(
|
||||
DialogueOption(
|
||||
"thats_friendly",
|
||||
"Well, that's friendly"
|
||||
),
|
||||
DialogueOption(
|
||||
"ive_lost_amulet",
|
||||
"I've lost the Amulet of Ghostspeak."
|
||||
),
|
||||
DialogueOption(
|
||||
"repo_house",
|
||||
"I've come to repossess your house."
|
||||
)
|
||||
)
|
||||
loadLabel(player, "post_quest_opts")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
label("father_aereck_sent") {
|
||||
open(player!!, FatherUrhneyQuestDialogueFile(), npc!!)
|
||||
loadLabel(player!!, "father_aereck_sent_me")
|
||||
label("pre_quest_opts") {
|
||||
options(
|
||||
DialogueOption(
|
||||
"thats_friendly",
|
||||
"Well, that's friendly"
|
||||
),
|
||||
DialogueOption(
|
||||
"repo_house",
|
||||
"I've come to repossess your house."
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
label("ive_lost_amulet") {
|
||||
open(player!!, FatherUrhneyQuestDialogueFile(), npc!!)
|
||||
loadLabel(player!!, "lost_amulet")
|
||||
label("mid_quest_opts") {
|
||||
options(
|
||||
DialogueOption(
|
||||
"thats_friendly",
|
||||
"Well, that's friendly"
|
||||
),
|
||||
DialogueOption(
|
||||
"father_aereck_sent",
|
||||
"Father Aereck sent me to talk to you."
|
||||
),
|
||||
DialogueOption(
|
||||
"repo_house",
|
||||
"I've come to repossess your house."
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
label("post_quest_opts") {
|
||||
options(
|
||||
DialogueOption(
|
||||
"thats_friendly",
|
||||
"Well, that's friendly."
|
||||
),
|
||||
DialogueOption(
|
||||
"ive_lost_amulet",
|
||||
"I've lost the Amulet of Ghostspeak."
|
||||
),
|
||||
DialogueOption(
|
||||
"repo_house",
|
||||
"I've come to repossess your house."
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
label("thats_friendly") {
|
||||
npc("I SAID go AWAY.")
|
||||
player("Okay, okay... sheesh, what a grouch.")
|
||||
end()
|
||||
goto("nowhere")
|
||||
}
|
||||
|
||||
label("repo_house") {
|
||||
|
|
@ -129,13 +128,26 @@ class FatherUrhneyDefaultDialogueFile: DialogueLabeller() {
|
|||
player("Sorry. I must have got the wrong address. All the", "houses look the same around here.")
|
||||
npc("What? What houses? What ARE you talking about???")
|
||||
player("Never mind.")
|
||||
end()
|
||||
goto("nowhere")
|
||||
}
|
||||
|
||||
label("want_house") {
|
||||
npc("Oh... go away and stop wasting my time!")
|
||||
end()
|
||||
goto("nowhere")
|
||||
}
|
||||
|
||||
//needs to be down here for some stupid reason
|
||||
label("father_aereck_sent") {
|
||||
open(player!!, FatherUrhneyQuestDialogueFile(), npc!!)
|
||||
}
|
||||
|
||||
//needs to be down here for some stupid reason
|
||||
label("ive_lost_amulet") {
|
||||
open(player!!, FatherUrhneyQuestAmuletDialogueFile(), npc!!)
|
||||
}
|
||||
|
||||
//because end() breaks shit
|
||||
label("nowhere") {}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@ import core.api.addItem
|
|||
import core.api.anyInEquipment
|
||||
import core.api.anyInInventory
|
||||
import core.api.freeSlots
|
||||
import core.api.getQuestStage
|
||||
import core.api.inBank
|
||||
import core.api.inInventory
|
||||
import core.api.sendDialogue
|
||||
|
|
@ -19,77 +20,85 @@ import org.rs09.consts.Items
|
|||
|
||||
class FatherUrhneyQuestDialogueFile : DialogueLabeller() {
|
||||
override fun addConversation() {
|
||||
label("father_aereck_sent_me") {
|
||||
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.");
|
||||
|
||||
npc(FacialExpression.ANGRY, "Oh, the silly fool.");
|
||||
npc(FacialExpression.ANGRY, "I leave town for just five months, and ALREADY he", "can't manage.");
|
||||
npc(FacialExpression.SAD, "(sigh)");
|
||||
npc(FacialExpression.ANGRY, "Well, I can't go back and exorcise it. I vowed not to", "leave this place. Until I had done a full two years of", "prayer and meditation.");
|
||||
npc(FacialExpression.NEUTRAL, "Tell you what I can do though; take this 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.");
|
||||
|
||||
npc(FacialExpression.ANGRY, "Oh, the silly fool.");
|
||||
npc(FacialExpression.ANGRY, "I leave town for just five months, and ALREADY he", "can't manage.");
|
||||
npc(FacialExpression.SAD, "(sigh)");
|
||||
npc(FacialExpression.ANGRY, "Well, I can't go back and exorcise it. I vowed not to", "leave this place. Until I had done a full two years of", "prayer and meditation.");
|
||||
npc(FacialExpression.NEUTRAL, "Tell you what I can do though; take this amulet.");
|
||||
|
||||
goto("take_amulet")
|
||||
}
|
||||
goto("take_amulet")
|
||||
|
||||
label("take_amulet") {
|
||||
exec { player, npc ->
|
||||
if (freeSlots(player) >= 1) {
|
||||
if (addItem(player, Items.GHOSTSPEAK_AMULET_552, 1)) {
|
||||
sendItemDialogue(player, Item(Items.GHOSTSPEAK_AMULET_552), "Father Urhney hands you an amulet.")
|
||||
setQuestStage(player, Quests.THE_RESTLESS_GHOST, 20)
|
||||
|
||||
npc(FacialExpression.NEUTRAL, "It is an Amulet of Ghostspeak.");
|
||||
npc(FacialExpression.NEUTRAL, "So called, because when you wear it you can speak to", "ghosts. A lot of ghosts are doomed to be ghosts because", "they have left some important task uncompleted.");
|
||||
npc(FacialExpression.NEUTRAL, "Maybe if you know what this task is, you can get rid of", "the ghost. I'm not making any guarantees mind you,", "but it is the best I can do right now.");
|
||||
player("Thank you. I'll give it a try!");
|
||||
if (getQuestStage(player, Quests.THE_RESTLESS_GHOST) in 10..19) {
|
||||
item(Item(Items.GHOSTSPEAK_AMULET_552), "Father Urhney hands you an amulet.")
|
||||
if (freeSlots(player) >= 1) {
|
||||
if (addItem(player, Items.GHOSTSPEAK_AMULET_552, 1)) {
|
||||
|
||||
setQuestStage(player, Quests.THE_RESTLESS_GHOST, 20)
|
||||
|
||||
loadLabel(player, "post_take_amulet")
|
||||
}
|
||||
} else {
|
||||
sendMessage(player, "You don't have enough inventory space to accept this amulet.")
|
||||
}
|
||||
} else {
|
||||
// Closes the dialogue prematurely to reveal message
|
||||
end()
|
||||
sendMessage(player, "You don't have enough inventory space to accept this amulet.")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
end()
|
||||
|
||||
goto("nowhere")
|
||||
}
|
||||
|
||||
label("lost_amulet") {
|
||||
label("post_take_amulet") {
|
||||
npc(FacialExpression.NEUTRAL, "It is an Amulet of Ghostspeak.")
|
||||
npc(FacialExpression.NEUTRAL, "So called, because when you wear it you can speak to", "ghosts. A lot of ghosts are doomed to be ghosts because", "they have left some important task uncompleted.")
|
||||
npc(FacialExpression.NEUTRAL, "Maybe if you know what this task is, you can get rid of", "the ghost. I'm not making any guarantees mind you,", "but it is the best I can do right now.")
|
||||
player("Thank you. I'll give it a try!")
|
||||
|
||||
goto("nowhere")
|
||||
}
|
||||
|
||||
exec { player, npc ->
|
||||
sendDialogue(player, "Father Urhney sighs.")
|
||||
//because end() breaks shit
|
||||
label("nowhere") {}
|
||||
}
|
||||
}
|
||||
|
||||
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!");
|
||||
goto("nowhere")
|
||||
class FatherUrhneyQuestAmuletDialogueFile : DialogueLabeller() {
|
||||
override fun addConversation() {
|
||||
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.");
|
||||
}
|
||||
|
||||
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!");
|
||||
goto("nowhere")
|
||||
}
|
||||
|
||||
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)) {
|
||||
sendItemDialogue(player, 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.");
|
||||
end()
|
||||
}
|
||||
} else {
|
||||
// Closes the dialogue prematurely to reveal message
|
||||
end()
|
||||
sendMessage(player, "You don't have enough inventory space to accept this amulet.")
|
||||
}
|
||||
|
||||
//last effort dialogue end if somehow it screws up
|
||||
end()
|
||||
} else {
|
||||
sendMessage(player, "You don't have enough inventory space to accept this amulet.")
|
||||
}
|
||||
}
|
||||
|
||||
goto("nowhere")
|
||||
|
||||
//because end() breaks shit
|
||||
label("nowhere") {}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue