Awusah and Listeners

This commit is contained in:
Oven Bread 2025-01-07 17:15:46 -08:00
parent dcd902982e
commit 9b5ebdde67
5 changed files with 138 additions and 37 deletions

View file

@ -10,7 +10,7 @@ import core.game.node.entity.player.Player;
*/
//TODO: Add post-quest dialogue
@Initializable
public class Ghaslor extends DialoguePlugin {
public Ghaslor(){
/**

View file

@ -87,7 +87,6 @@ class AwusahDialogueFile : DialogueLabeller() {
}
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(

View file

@ -0,0 +1,84 @@
package content.region.desert.quest.spiritsoftheelid
import core.api.*
import core.game.dialogue.*
import core.game.node.entity.player.Player
import core.game.node.item.Item
import core.plugin.Initializable
import org.rs09.consts.Items
import org.rs09.consts.NPCs
@Initializable
class GhaslorDialogue (player: Player? = null) : DialoguePlugin(player) {
override fun newInstance(player: Player): DialoguePlugin {
return GhaslorDialogue(player)
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
openDialogue(player, GhaslorDialogueFile(), npc)
return false
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.GHASLOR_THE_ELDER_3029)
}
}
class GhaslorDialogueFile : DialogueLabeller() {
override fun addConversation() {
assignToIds(NPCs.GHASLOR_THE_ELDER_3029)
exec { player, npc ->
loadLabel(player, "spiritsoftheelidqueststage" + getQuestStage(player, SpiritsOfTheElid.questName))
}
label("spiritsoftheelidqueststage10")
player("Hello, I'm an adventurer in search of err.. adventure.")
npc("Well I'm Ghaslor, the oldest person in this here town and keeper of some of the lores and histories of our village. If you're new around here I'd go talk to the mayor.")
player("Thanks, I might go and look him up then.")
label("spiritsoftheelidqueststage10")
npc("Good day to you young @g[man,lady].")
options(
DialogueOption("causeofcurse", "I am trying to find out the cause of this town's curse.", expression = ChatAnim.THINKING),
DialogueOption("howarethings", "How are things?"),
)
label("How are things?")
npc("Lousy, young people have no respect for their elders, there's too many confusing newfangled magic carpets and snake charmers around these days and now we don't even have any water.")
player("Well I hope things pick up for you.")
label("causeofwater")
npc("Oh that's something which no one but the gods and the river spirits seem to know.")
options(
DialogueOption("whycursed", "River spirits, what are they?", expression = ChatAnim.THINKING),
DialogueOption("lolnop", "Thank you very much for your help."),
)
label("whycursed")
player("River spirits, what are they?")
npc("They're the guardians of the source of the river Elid, they'll know of our curse, seeing as it's related to water we bring from the river. It's said that nothing happens on the river that they don't know about.")
player("So would it be possible for me to find these spirits and ask them what is going on?")
npc("Ahh now the spirits are something which no one from here have seen in a good long time, certainly not in my lifetime, I don't think even in my own grandfather's lifetime.")
npc("Most the younger people of this town don't even remember that the spirits even exist.")
exec { player, _ ->
if(inInventory(player, Items.BALLAD_6793)) {
loadLabel(player, "alreadyhaveballad")
} else {
loadLabel(player, "hereisballad")
}
}
label("hereisballad")
npc("Here I have something around here somewhere which may be of interest to you.")
npc("Aha yes here it is, the ballad of Jareesh. This tells of a previous quest to try and find the spirits.")
exec { player, _ ->
setAttribute(player, SpiritsOfTheElid.attributeObtainedBallad, true)
addItemOrDrop(player, Items.BALLAD_6793)
}
item(Item(Items.BALLAD_6793), "Ghaslor hands you a scroll.")
label("alreadyhaveballad")
npc("You already have the ballad of Jareesh, which tells of a previous quest to try and find the spirits.")
player("Thank you very much for your help.")
}
}

View file

@ -17,7 +17,15 @@ class SpiritsOfTheElid : Quest("Spirits of the Elid", 116, 115, 2,616, 1444, 0,
companion object {
const val questName = "Spirits of the Elid"
const val attributeObtainedBallad = "/save:quest:spiritsoftheelid-obtainedballad"
const val attributeTalkedToCustodian = "/save:quest:spiritsoftheelid-talkedtocustodian"
const val attributeCastGrabForKey = "/save:quest:spiritsoftheelid-castgrabforkey"
const val attributeFoundRobeTop = "/save:quest:spiritsoftheelid-foundrobetop"
const val attributeFoundRobeBottom = "/save:quest:spiritsoftheelid-foundrobebottom"
const val attributeClimbedRiver = "/save:quest:spiritsoftheelid-climbedriver"
}
override fun drawJournal(player: Player, stage: Int) {
super.drawJournal(player, stage)
var line = 12
@ -59,30 +67,34 @@ class SpiritsOfTheElid : Quest("Spirits of the Elid", 116, 115, 2,616, 1444, 0,
line(player, "to what can be done about this.", line++, false)
line++
// Following sections appear as you do it. No line spaces.
//
if (getAttribute(player, attributeObtainedBallad, false)) {
line(player, "Ghastor the village elder gave me !!The Ballad of Jaressh??", line++, false)
line(player, "which provides some useful information about a previous", line++, false)
line(player, "trip to see some !!river spirits??.", line++, false)
// http://youtu.be/SWjuatbJvxI (There seems to be a strange magical force preventing you from / opening the door.)
}
if (getAttribute(player, attributeTalkedToCustodian, false)) {
line(player, "The shrine custodian let slip that the !!ancestral key?? she", line++, false)
line(player, "had on display is for the chambers of the !!Spirits of the??", line++, false)
line(player, "!!Elid??.", line++, false)
//
}
if (getAttribute(player, attributeCastGrabForKey, false)) {
line(player, "I cast telekinetic grab to steal the !!ancestral key?? from the", line++, false)
line(player, "shrine.", line++, false)
//
}
if (getAttribute(player, attributeFoundRobeTop, false)) {
line(player, "I found a !!robe of Elidinis top?? in a cupboard and repaired it", line++, false)
line(player, "with a needle and thread.", line++, false)
//
}
if (getAttribute(player, attributeFoundRobeBottom, false)) {
line(player, "I found a !!robe of Elidinis bottom?? in a cupboard and", line++, false)
line(player, "repaired it with a needle and thread.", line++, false)
}
if (getAttribute(player, attributeClimbedRiver, false)) {
// http://youtu.be/vZ5P08cGSbA
line(player, "I managed to climb up to a !!cave at the source of the river??.", line++, false)
line(player, "Further progress is blocked by a !!door??.", line++, false)
}
}
if (stage >= 30) {
@ -116,15 +128,15 @@ class SpiritsOfTheElid : Quest("Spirits of the Elid", 116, 115, 2,616, 1444, 0,
// http://youtu.be/QgiKtgo8toE
if (stage >= 40) {
// For weird reasons "statuette" becomes "statue".
// For weird reasons "statuette" becomes "statue". http://youtu.be/SWjuatbJvxI 12:35
line++
line(player, "This spirits told me the townspeople of Nardah threw away a", line++, true)
line(player, "!!statue of Elidinis??. As a result they were cursed to have", line++, true)
line(player, "This spirits told me the townspeople of Nardah threw away", line++, true)
line(player, "a statue of Elidinis. As a result they were cursed to have", line++, true)
line(player, "no water. As long as they do not have the statue the", line++, true)
line(player, "curse will stand.", line++, true)
} else if (stage >= 30) {
line++
line(player, "This spirits told me the townspeople of Nardah threw away a", line++, false)
line(player, "This spirits tell me the townspeople of Nardah threw away a", line++, false)
line(player, "!!statuette of Elidinis??. As a result they were cursed to have", line++, false)
line(player, "no water. As long as they do not have the statuette the", line++, false)
line(player, "curse will stand.", line++, false)
@ -135,9 +147,9 @@ class SpiritsOfTheElid : Quest("Spirits of the Elid", 116, 115, 2,616, 1444, 0,
line(player, "I spoke to Awusah again. He told me the statuette was", line++, true)
line(player, "thrown down a crevice to the west of Nardah.", line++, true)
line++
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, "for the sole of Awusah!", line++, false)
line(player, "I met a genie down the crevice. He told me that he had", line++, true)
line(player, "the statuette which he would give it to me exchange", line++, true)
line(player, "for the sole of Awusah!", line++, true)
line++
line(player, "I have cut the soles from Awusah's shoes. Fortunately", line++, true)
line(player, "the genie wanted Awusah's sole and not Awusah's soul.", line++, true) // Authentically, its sole not soles
@ -177,7 +189,12 @@ class SpiritsOfTheElid : Quest("Spirits of the Elid", 116, 115, 2,616, 1444, 0,
}
override fun reset(player: Player) {
//removeAttribute(player, attributeChosenEnding)
removeAttribute(player, attributeObtainedBallad)
removeAttribute(player, attributeTalkedToCustodian)
removeAttribute(player, attributeCastGrabForKey)
removeAttribute(player, attributeFoundRobeTop)
removeAttribute(player, attributeFoundRobeBottom)
removeAttribute(player, attributeClimbedRiver)
}
override fun finish(player: Player) {

View file

@ -6,9 +6,10 @@ 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
// }
on(Scenery.DOOR_10431, SCENERY, "open") { player, node ->
// http://youtu.be/SWjuatbJvxI
sendDialogueLines(player, "There seems to be a strange magical force preventing you from", "opening the door.")
return@on true
}
}
}