Awusah and Listeners

This commit is contained in:
Oven Bread 2025-01-07 15:21:13 -08:00
parent 73f36d5b7e
commit dcd902982e
4 changed files with 129 additions and 2 deletions

View file

@ -8,7 +8,7 @@ import core.plugin.Initializable;
* Handles Awusah pre-quest * Handles Awusah pre-quest
* @author ceik * @author ceik
*/ */
@Initializable
public class Awusah extends DialoguePlugin { public class Awusah extends DialoguePlugin {
//TODO: Add dialogue for after the quest Spirits of Elid //TODO: Add dialogue for after the quest Spirits of Elid
public Awusah(){ public Awusah(){

View file

@ -0,0 +1,109 @@
package content.region.desert.quest.spiritsoftheelid
import core.api.*
import core.game.dialogue.*
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.NPCs
@Initializable
class AwusahDialogue (player: Player? = null) : DialoguePlugin(player) {
override fun newInstance(player: Player): DialoguePlugin {
return AwusahDialogue(player)
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
openDialogue(player, AwusahDialogueFile(), npc)
return false
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.AWUSAH_THE_MAYOR_3040)
}
}
class AwusahDialogueFile : DialogueLabeller() {
override fun addConversation() {
assignToIds(NPCs.AWUSAH_THE_MAYOR_3040)
exec { player, npc ->
loadLabel(player, "spiritsoftheelidqueststage" + getQuestStage(player, SpiritsOfTheElid.questName))
}
label("spiritsoftheelidqueststage0")
npc(ChatAnim.HAPPY, "Many salutations to you @g[sir,madam], what brings you to", "our little town?")
options(
DialogueOption("searchingquest", "I am an adventurer in search of quests.", expression = ChatAnim.HAPPY),
DialogueOption("justlooking", "I'm just looking around."),
DialogueOption("menaphos", "I'm passing through on my way to Menaphos."),
)
label("justlooking")
player("I'm just looking around.")
npc("Well we've not fallen on the best of times here, but there are a few shops to look around and we have someone selling a marvelous new invention called a choc ice..")
npc("Oh, and there's the old temple if you're interested in a bit of history.")
label("menaphos")
player("I'm passing through on my way to Menaphos.")
npc("Oh you don't want to go there. I hear rumours of plagues and the like.")
player("Thanks for the warning, but I might go and investigate anyway.")
label("searchingquest")
npc("Hmm, well that could be quite fortuitous. We really", "could do with some help here. Our town seems to have", "come under a curse, and we are desperate to get it", "removed.")
player(ChatAnim.THINKING, "A curse? What sort of curse?")
npc(ChatAnim.SAD, "Well first of all our fountain, which has served us for", "many years, suddenly dried up. We then started", "transporting water from the river, but what we carried", "would always have completely dried up by the time we")
npc(ChatAnim.SAD, "got it back to the village.")
goto("moredetails")
label("moredetails")
options(
DialogueOption("whatwater", "So what do you do for water now?", expression = ChatAnim.THINKING),
DialogueOption("whycursed", "Any idea how you got this curse?", expression = ChatAnim.THINKING),
DialogueOption("lolnop", "I'm sorry to hear of your plight, but I must be going."),
)
label("whatwater")
npc(ChatAnim.SAD, "Well it's tough. There is a guy who calls himself Ali the", "carter down in the market. He's from Pollnivneach, so", "the curse doesn't seem to have affected him. He's got a", "cart full of water which he's selling to the people here.")
npc(ChatAnim.SAD, "Unfortunately in typical Pollnivneach style he's taking", "the opportunity to sell the water at outrageous prices", "because he knows we are desperate. Oh and Rokuh has", "developed something quite remarkable, called a choc ice")
npc(ChatAnim.SAD, "which is helping people stay cool.")
options(
DialogueOption("whycursed", "Any idea how you got this curse?", expression = ChatAnim.THINKING),
DialogueOption("lolnop", "I'm sorry to hear of your plight, but I must be going."),
)
label("whycursed")
npc("Well we think it was because we were negligent in our", "duty to protect a priest of Saradomin. He came to us a", "few weeks ago from the north and we welcomed him", "into our town. He taught us much of the wisdom of")
npc("Saradomin. Then about a week ago, we found him dead", "by the river. It seems unlikely that it is coincidence we", "were then cursed. If you look around the town you", "might be able to find out more.")
options(
DialogueOption("startquest", "Ok I will have a look around and see what I can do.", expression = ChatAnim.FRIENDLY),
DialogueOption("whatwater", "So what do you do for water now?", expression = ChatAnim.THINKING),
DialogueOption("lolnop", "I'm sorry to hear of your plight, but I must be going."),
)
label("startquest")
exec { player, _ ->
if(getQuestStage(player, SpiritsOfTheElid.questName) == 0) {
setQuestStage(player, SpiritsOfTheElid.questName, 10)
}
}
npc(ChatAnim.FRIENDLY, "Good luck to you.")
label("spiritsoftheelidqueststage10")
npc("Many salutations to you @g[sir,madam], have you made any progress in uncovering the reasons for our curse yet?")
options(
DialogueOption("workingonit", "I am working on it."),
DialogueOption("whattodoagain", "What was I meant to do again?", expression = ChatAnim.THINKING),
DialogueOption("notimetoinvestigate", "I haven't really had the time to investigate."),
)
label("workingonit")
npc("Please try your best, that water salesman is not doing much good for the economy of our town.")
label("whattodoagain")
npc("Look around this town, see if you can uncover any information to why we were cursed and how the curse might be lifted. I suspect that it might be because a priest of Saradomin died while staying at our town, but")
npc("that isn't much help in getting the curse lifted and it is possible I'm wrong anyway.")
label("notimetoinvestigate")
npc("Well I hope somebody can find the time soon, the despair of the people of this town increases daily.")
}
}

View file

@ -9,6 +9,8 @@ import org.rs09.consts.Items
/** /**
* Spirit of the Elid Quest * Spirit of the Elid Quest
*
* The quest log is as close as I can get due to lots of videos not being interested in this quest.
*/ */
@Initializable @Initializable
class SpiritsOfTheElid : Quest("Spirits of the Elid", 116, 115, 2,616, 1444, 0, 1, 60) { class SpiritsOfTheElid : Quest("Spirits of the Elid", 116, 115, 2,616, 1444, 0, 1, 60) {
@ -84,6 +86,7 @@ class SpiritsOfTheElid : Quest("Spirits of the Elid", 116, 115, 2,616, 1444, 0,
if (stage >= 30) { if (stage >= 30) {
line++
line(player, "I killed 3 golems and unblocked three waterchannels in", line++, true) line(player, "I killed 3 golems and unblocked three waterchannels in", line++, true)
line(player, "various ways. This allowed me to get through another pair", line++, true) line(player, "various ways. This allowed me to get through another pair", line++, true)
line(player, "of double doors.", line++, true) line(player, "of double doors.", line++, true)
@ -91,6 +94,7 @@ class SpiritsOfTheElid : Quest("Spirits of the Elid", 116, 115, 2,616, 1444, 0,
line(player, "I have spoken to the Spirits of the Elid.", line++, true) line(player, "I have spoken to the Spirits of the Elid.", line++, true)
} else if (stage >= 20) { } else if (stage >= 20) {
// http://youtu.be/vZ5P08cGSbA // http://youtu.be/vZ5P08cGSbA
line++
line(player, "I have come to a second pair of !!double doors?? I need to get", line++, false) line(player, "I have come to a second pair of !!double doors?? I need to get", line++, false)
line(player, "through. There are !!3 single doors here too.", line++, false) line(player, "through. There are !!3 single doors here too.", line++, false)
line++ line++
@ -143,7 +147,7 @@ class SpiritsOfTheElid : Quest("Spirits of the Elid", 116, 115, 2,616, 1444, 0,
line++ line++
line(player, "I spoke to Awusah again. He told me the !!statuette?? was", line++, false) line(player, "I spoke to Awusah again. He told me the !!statuette?? was", line++, false)
line(player, "thrown down a !!crevice to the west of Nardah??.", line++, false) line(player, "thrown down a !!crevice to the west of Nardah??.", line++, false)
// Derived // Derived foot fetish
line++ line++
line(player, "I met a genie down the crevice. He told me that he had", line++, false) line(player, "I met a genie down the crevice. He told me that he had", line++, false)
line(player, "the statuette which he would give it to me exchange", line++, false) line(player, "the statuette which he would give it to me exchange", line++, false)

View file

@ -0,0 +1,14 @@
package content.region.desert.quest.spiritsoftheelid
import core.api.*
import core.game.interaction.InteractionListener
import org.rs09.consts.Scenery
class SpiritsOfTheElidListeners : InteractionListener {
override fun defineListeners() {
// on(intArrayOf(Scenery.GRAVE_5168, Scenery.GRAVE_5169), SCENERY, "read") { player, node ->
// sendMessage(player, "The grave says:")
// return@on true
// }
}
}