diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/BlackKnightTitan.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/BlackKnightTitan.kt new file mode 100644 index 000000000..9de875e46 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/BlackKnightTitan.kt @@ -0,0 +1,53 @@ +package rs09.game.content.quest.members.holygrail + +import api.* + +import org.rs09.consts.NPCs +import org.rs09.consts.Items +import org.rs09.consts.Animations + +import core.plugin.Initializable +import core.tools.RandomFunction +import core.game.system.task.Pulse + +import core.game.node.Node +import core.game.node.entity.Entity +import core.game.node.entity.npc.NPC +import core.game.node.entity.player.Player +import core.game.node.entity.npc.AbstractNPC +import core.game.node.entity.combat.BattleState +import core.game.node.entity.combat.CombatStyle + +import core.game.world.map.Location +import core.game.world.map.path.Pathfinder +import core.game.interaction.MovementPulse +import rs09.game.interaction.InteractionListener +import rs09.game.interaction.IntType +import core.game.world.update.flag.context.Animation + +@Initializable +class BlackKnightTitan : AbstractNPC, InteractionListener { + constructor() : super(NPCs.BLACK_KNIGHT_TITAN_221, null, false) + private constructor(id: Int, location: Location) : super(id, location) {} + + + override fun construct(id: Int, location: Location, vararg objects: Any?): AbstractNPC { + val npc = BlackKnightTitan(id, location) + npc.isRespawn = false + return npc + } + + override fun getIds(): IntArray { + TODO("Not yet implemented") + } + + + override fun finalizeDeath(killer: Entity) { + TODO("Not yet implemented") + //Well done, you have defeated the Black Knight Titan! + } + + override fun defineListeners() { + TODO("Not yet implemented") + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/HolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/HolyGrail.kt new file mode 100644 index 000000000..070776c57 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/HolyGrail.kt @@ -0,0 +1,93 @@ +package rs09.game.content.quest.members.holygrail + + +import api.rewardXP +import core.game.node.entity.player.Player +import core.game.node.entity.player.link.quest.Quest +import core.game.node.entity.skill.Skills +import core.plugin.Initializable +import org.rs09.consts.Items + +/** +* Represents the "Holy Grail" quest. +* @author Chisato +*/ + +@Initializable +class HolyGrail: Quest("Holy Grail", 76, 75, 2, 30, 0, 1, 80) { + override fun newInstance(`object`: Any?): Quest { + return this + } + + override fun drawJournal(player: Player?, stage: Int) { + super.drawJournal(player, stage) + var line = 11 + player?: return + if(stage == 0){ + line(player, "King Arthur is sending out his knights on a quest for the", line++) + line(player, "famous Holy Grail. If you are a Knight of the Round Table", line++) + line(player, "go to King Arthur for further orders.", line++) + line++ + line(player, "To start this quest, I require:", line++) + line(player, "!!20 Attack (In order to wield Excalibur)??", line++, player.skills.getLevel(Skills.ATTACK) >= 20) + line(player, "!!Completion of Merlin's Crystal??", line++, player.questRepository.isComplete("Merlin's Crystal")) + line++ + } + if(stage == 10){ + line(player, "King Arthur recommended I get more information about the", line++) + line(player, "Holy Grail from Merlin.", line++) + line++ + } + if(stage == 20){ + line(player, "Merlin recommends looking for Entrana, perhaps the High", line++) + line(player, "Priest of the church can help me?", line++) + line++ + } + if(stage == 30){ + line(player, "I need an artifact of The Fisher Realm. Perhaps Brother", line++) + line(player, "Galahad can help me get one.", line++) + line++ + } + if(stage == 40){ + line(player, "I must get into the castle and speak to the king of The", line++) + line(player, "Fisher Realm. However I need some type of whistle. I was", line++) + line(player, "told I can find it in a haunted mansion. However I need", line++) + line(player, "to have an artifact of the fisher realm for it to", line++) + line(player, "appear.", line++) + line++ + line(player, "Once I have the whistle I need to find a way to get there.", line++) + line(player, "6 heads point to the location which I must find.", line++) + line++ + } + if(stage == 50){ + line(player, "I should find the Fisher King's son, Sir Percival. Sir", line++) + line(player, "Percival is also a knight of the round table. Perhaps", line++) + line(player, "King Arthur will know how to get to him?", line++) + line++ + } + if(stage == 60){ + line(player, "Legend has it once The Fisher Realm is restored a hero", line++) + line(player, "can claim the Holy Grail from the castle and after give", line++) + line(player, "it to King Arthur.", line++) + line++ + } + if(stage == 100){ + line(player, "I returned to the Grail Castle to find that the land had been renewed with Percival as the new King there", line++) + line(player, "Out of gratitude he allowed me to take the Grail, which I took to King Arthur to prove my prowess as a Knight.", line++, true) + + } + } + + override fun finish(player: Player?) { + super.finish(player) + player ?: return + var ln = 10 + player.packetDispatch.sendItemZoomOnInterface(Items.HOLY_GRAIL_19, 230, 277, 5) + drawReward(player,"2 Quest Points", ln++) + drawReward(player,"11,000 Prayer Experience", ln++) + drawReward(player,"15,300 Defence Experience", ln++) + drawReward(player,"Access to the Fisher Realm.", ln++) + rewardXP(player, Skills.PRAYER, 11000.0) + rewardXP(player, Skills.DEFENCE, 15300.0) + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/EntranaHighPriestHolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/EntranaHighPriestHolyGrail.kt new file mode 100644 index 000000000..adbd927dd --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/EntranaHighPriestHolyGrail.kt @@ -0,0 +1,56 @@ +package rs09.game.content.quest.members.holygrail.dialogue + +import api.questStage +import core.game.node.entity.npc.NPC +import org.rs09.consts.NPCs +import rs09.game.content.dialogue.DialogueFile +import rs09.game.interaction.InteractionListener +import rs09.game.interaction.IntType + +/** + * Handles EntranaHighPriestHolyGrail Dialogue + * @author Chisato + */ +class EntranaHighPriestHolyGrailDialogue : DialogueFile() { + override fun handle(componentID: Int, buttonID: Int) { + val questName = "Holy Grail" + val questStage = questStage(player!!, questName) + when { + } + } +} + +//Choose an option: +//What are the six heads? +//What are the six heads? +//The six stone heads have appeared just recently in the world. They all face the point of the realm crossing. +//Find where two of the heads face, and you should be able to pinpoint where it is. +//What's a Fisher King? +//What's a Fisher King? +//The Fisher King is the owner and slave of the Grail. +//What do you mean by the whistle? +//What do you mean by the whistle? +//You don't know about the whistles yet? The whistles are easy. You will need one to get to and from the Fisher King's realm. +//They reside in a haunted manor house in Misthalin, though you may not perceive them unless you carry something from the realm of the Fisher King... +//Ok, I will go searching. +//Many greetings. Welcome to our fair island. +//Hello. I am in search of the Holy Grail. +//The object of which you speak did once pass through holy Entrana. I know not where it is now however. +//Nor do I really care. +//Did you say the Grail? You are a Grail knight, yes? Well you'd better hurry. A Fisher King is in pain. +//Well I would, but I don't know where I am going! +//Go to where the six heads face, blow the whistle and away you go! +//Bless you "player.name"! + +/** + * Handles EntranaHighPriestHolyGrailListener to launch the dialogue + * @author Chisato + */ +class EntranaHighPriestListener : InteractionListener { + override fun defineListeners() { + on(NPCs.HIGH_PRIEST_216, IntType.NPC, "talk-to"){ player, _ -> + player.dialogueInterpreter.open(EntranaHighPriestHolyGrailDialogue(), NPC(NPCs.HIGH_PRIEST_216)) + return@on true + } + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/FishermanHolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/FishermanHolyGrail.kt new file mode 100644 index 000000000..e3231de21 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/FishermanHolyGrail.kt @@ -0,0 +1,41 @@ +package rs09.game.content.quest.members.holygrail.dialogue + +import api.questStage +import core.game.node.entity.npc.NPC +import org.rs09.consts.NPCs +import rs09.game.content.dialogue.DialogueFile +import rs09.game.interaction.InteractionListener +import rs09.game.interaction.IntType + +/** + * Handles FishermanHolyGrail Dialogue + * @author Chisato + */ +class FishermanHolyGrailDialogue : DialogueFile() { + override fun handle(componentID: Int, buttonID: Int) { + val questName = "Holy Grail" + val questStage = questStage(player!!, questName) + when { + } + } +} + +//Any idea how to get into the castle? +//Why, that's easy! Just ring one of the bells outside. +//...I didn't see any bells. +//You must be blind then. There's ALWAYS bells there when I go to the castle. + + + +/** + * Handles FishermanHolyGrailListener to launch the dialogue + * @author Chisato + */ +class FishermanListener : InteractionListener { + override fun defineListeners() { + on(NPCs.FISHERMAN_219, IntType.NPC, "talk-to"){ player, _ -> + player.dialogueInterpreter.open(FishermanHolyGrailDialogue(), NPC(NPCs.FISHERMAN_219)) + return@on true + } + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/KingArthurHolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/KingArthurHolyGrail.kt new file mode 100644 index 000000000..43a3289cc --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/KingArthurHolyGrail.kt @@ -0,0 +1,178 @@ +package rs09.game.content.quest.members.holygrail.dialogue + +import api.* +import core.game.content.dialogue.FacialExpression +import org.rs09.consts.Items +import rs09.game.content.dialogue.DialogueFile +import rs09.tools.END_DIALOGUE + +/** + * Handles KingArthurHolyGrail Dialogue + * @author Chisato + */ +class KingArthurHolyGrailDialogue : DialogueFile() { + override fun handle(componentID: Int, buttonID: Int) { + val questName = "Holy Grail" + val questStage = questStage(player!!, questName) + when (questStage) { + 0 -> { + when (stage) { + 0 -> playerl( + FacialExpression.HALF_ASKING, + "Now I am a knight of the round table, do you have any more quests for me?" + ).also { stage++ } + + 1 -> npcl( + FacialExpression.NEUTRAL, + "Aha! I'm glad you are here! I am sending out various knights on an important quest. I was wondering if you too would like to take up this quest?" + ).also { stage++ } + + 2 -> options("Tell me of this quest.", + "I am weary of questing for the time being...".also { stage++ }) + + 3 -> when (buttonID) { + 1 -> playerl(FacialExpression.FRIENDLY, "Tell me of this quest.").also { stage++ } + 2 -> { + stage = END_DIALOGUE + } + } + + 4 -> npcl( + FacialExpression.NEUTRAL, + "Well, we recently found out that the Holy Grail has passed into the Runescape world" + ).also { stage++ } + + 5 -> npcl(FacialExpression.HAPPY, "This is most fortuitous!").also { stage++ } + 6 -> npcl( + FacialExpression.NEUTRAL, + "None of my knights ever did return with it last time. Now we have the opportunity to give it another go, maybe this time we will have more luck!" + ).also { stage++ } + + 7 -> options("I'd enjoy trying that.", "I may come back and try that later.".also { stage++ }) + + 8 -> when (buttonID) { + 1 -> playerl(FacialExpression.FRIENDLY, "I'd enjoy trying that.").also { stage++ } + 2 -> { + stage = END_DIALOGUE + } + } + + 9 -> npcl( + FacialExpression.NEUTRAL, + "Go speak to Merlin. He may be able to give a better clue as to where it is now you have freed him from that crystal." + ).also { stage++ } + + 10 -> npcl( + FacialExpression.NEUTRAL, "He has set up his workshop in the room next to the library." + ).also { stage = END_DIALOGUE } + .also { player!!.questRepository.getQuest("Holy Grail").start(player) } + .also { player!!.questRepository.syncronizeTab(player) } + } + } + + 10 -> { + when (stage) { + 0 -> npcl(FacialExpression.ASKING, "How goes thy quest?").also { stage++ } + 1 -> playerl( + FacialExpression.FRIENDLY, "I have made progress, but I have not recovered the Grail yet." + ).also { stage++ } + + 2 -> npcl( + FacialExpression.FRIENDLY, + "Well, the Grail IS very elusive, it may take some perseverance. As I said before, speak to Merlin in the workshop by the library." + ).also { stage = END_DIALOGUE } + } + } + + 20 -> { + when (stage) { + 0 -> npcl(FacialExpression.ASKING, "How goes thy quest?").also { stage++ } + 1 -> playerl( + FacialExpression.FRIENDLY, "I have made progress, but I have not recovered the Grail yet." + ).also { stage++ } + + 2 -> npcl( + FacialExpression.FRIENDLY, + "My knight, Sir Ghalad, is in Mcgrubor woods. he may have information you need." + ).also { stage = END_DIALOGUE } + } + } + + 30 -> { + when (stage) { + 0 -> npcl(FacialExpression.ASKING, "How goes thy quest?").also { stage++ } + 1 -> playerl( + FacialExpression.FRIENDLY, "I have made progress, but I have not recovered the Grail yet." + ).also { stage++ } + + 2 -> npcl(FacialExpression.FRIENDLY, "This is a good time to seek the Fisher Realm.").also { + stage = END_DIALOGUE + } + } + } + + 40 -> { + when (stage) { + 0 -> playerl( + FacialExpression.ASKING, "Hello, do you have a knight named Sir Percival?" + ).also { stage++ } + + 1 -> npcl( + FacialExpression.HALF_THINKING, + "Ah yes. I remember young Percival. He rode off on a quest a couple of months ago. We are getting a bit worried, he's not back yet..." + ).also { stage++ } + + 2 -> npcl( + FacialExpression.HALF_THINKING, + "he was going to try and recover the golden boots of Arkaneeses." + ).also { stage++ } + + 3 -> playerl(FacialExpression.ASKING, "Any idea which way that would be?").also { stage++ } + 4 -> npcl( + FacialExpression.NEUTRAL, + "Not exactly. We discovered some magic golden feathers that are said to point the way to the boots... " + ).also { stage++ } + + 5 -> npcl( + FacialExpression.NEUTRAL, + "They certainly point somewhere. Just blowing on them gently will supposedly show the way to go." + ).also { stage++ } + + 6 -> sendDialogue(player!!, "King Arthur gives you a feather.").also { stage++ } + 7 -> addItem(player!!, 18, 1) + } + } + + 50 -> { + npcl(FacialExpression.ASKING, "How goes ty quest?") + if (inInventory(player!!, Items.HOLY_GRAIL_19)) { + when (stage) { + 0 -> playerl(FacialExpression.HAPPY, "I have retrieved the Grail!").also { stage++ } + 1 -> npcl(FacialExpression.AMAZED, "Wow! Incredible! You truly are a splendid knight!").also { + removeItem(player!!, Items.HOLY_GRAIL_19) + finishQuest(player!!, questName) + stage = END_DIALOGUE + } + } + } else { + when (stage) { + 0 -> playerl(FacialExpression.NEUTRAL, "I still need to get the Holy Grail.").also { stage++ } + 1 -> playerl( + FacialExpression.NEUTRAL, "I believe it is somewhere in the Fisher Realm." + ).also { stage++ } + + 2 -> npcl(FacialExpression.NEUTRAL, "Okay, carry on then.").also { stage = END_DIALOGUE } + } + } + } + + 100 -> { + npcl( + FacialExpression.FRIENDLY, + "Thank you for retrieving the Grail! You shall long be remembered as one of the greatest heroes amongst" + " the Knights of the Round Table!" + ).also { stage = END_DIALOGUE } + } + + } + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/KingPercivalHolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/KingPercivalHolyGrail.kt new file mode 100644 index 000000000..ac9e193c7 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/KingPercivalHolyGrail.kt @@ -0,0 +1,57 @@ +package rs09.game.content.quest.members.holygrail.dialogue + +import api.questStage +import core.game.content.dialogue.FacialExpression +import core.game.node.entity.npc.NPC +import org.rs09.consts.NPCs +import rs09.game.content.dialogue.DialogueFile +import rs09.game.interaction.InteractionListener +import rs09.game.interaction.IntType +import rs09.tools.END_DIALOGUE + +/** + * Handles KingPercivalHolyGrail Dialogue + * @author Chisato + */ +class KingPercivalHolyGrailDialogue : DialogueFile() { + override fun handle(componentID: Int, buttonID: Int) { + val questName = "Holy Grail" + val questStage = questStage(player!!, questName) + when { + questStage >= 60 -> { + when (stage) { + 0 -> npcl( + FacialExpression.AMAZED, + "You missed all the excitement! I got here and agreed to take over duties as king here, " + + "then before my eyes the most miraculous changes occurred here... " + + "grass and trees were growing outside before our very eyes!" + ).also { stage++ } + 1 -> npcl(FacialExpression.HAPPY, "Thank you very much for showing me the way home.").also { stage = END_DIALOGUE } + } + } + else -> { + when (stage) { + 0 -> npcl(FacialExpression.NEUTRAL, "Hi").also { stage++ } + 1 -> playerl(FacialExpression.NEUTRAL, "Hello").also { stage++ } + 2 -> npcl(FacialExpression.NEUTRAL, "...").also { stage++ } + 3 -> playerl(FacialExpression.NEUTRAL, "...").also { stage++ } + 4 -> npcl(FacialExpression.HALF_ASKING, "See you later then?").also { stage++ } + 5 -> playerl(FacialExpression.NEUTRAL, "Yes...").also { stage = END_DIALOGUE } + } + } + } + } +} + +/** + * Handles KingPercivalHolyGrailListener to launch the dialogue + * @author Chisato + */ +class KingPercivalListener : InteractionListener { + override fun defineListeners() { + on(NPCs.KING_PERCIVAL_212, IntType.NPC, "talk-to") { player, _ -> + player.dialogueInterpreter.open(KingPercivalHolyGrailDialogue(), NPC(NPCs.KING_PERCIVAL_212)) + return@on true + } + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/MerlinHolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/MerlinHolyGrail.kt new file mode 100644 index 000000000..dde89b709 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/MerlinHolyGrail.kt @@ -0,0 +1,59 @@ +package rs09.game.content.quest.members.holygrail.dialogue + +import api.questStage +import core.game.node.entity.npc.NPC +import org.rs09.consts.NPCs +import rs09.game.content.dialogue.DialogueFile +import rs09.game.interaction.InteractionListener +import rs09.game.interaction.IntType + +/** + * Handles MerlinHolyGrail Dialogue + * @author Chisato + */ +class MerlinHolyGrailDialogue : DialogueFile() { + override fun handle(componentID: Int, buttonID: Int) { + val questName = "Holy Grail" + val questStage = questStage(player!!, questName) + when { + } + } +} + + +//Hello. King Arthur has sent me on a quest for the Holy Grail. He thought you could offer some assistance. +//Ah yes... the Holy Grail... That is a powerful artefact indeed. Returning it here would help Camelot a lot. +//Due to its nature the Holy Grail is likely to reside in a holy place. +//Any suggestions? +//I believe there is a holy island somewhere not far away... I'm not entirely sure... I spent too long inside that +//crystal! Anyways, go and talk to someone over there. I suppose you could also try speaking to Sir Galahad? +//He returned from the quest many years after everyone else. He seems to know something about it, but he can only +//speak about those experiences cryptically. +//Where can I find Sir Galahad? +//Galahad now lives a life of religious contemplation. He lives somewhere west of McGrubor's Wood I think. Though +//I recommend speaking to someone on the holy island first. +//How goes the quest for the Holy Grail? +//I am to find an artifact in Draynor Manor +//I see +//How goes the quest for the Holy Grail? +//I am trying to find the son of the king of The Fisher Realm! +//That is a task indeed! +//I found the Holy Grail! +//REALLY!!? +//Yes! +//You really need to give The Holy Grail to King Arthur! +//I am amazed with you adventurer thank you for getting the Holy Grail back to Camelot! +// + +/** + * Handles MerlinHolyGrailListener to launch the dialogue + * @author Chisato + */ +class MerlinListener : InteractionListener { + override fun defineListeners() { + on(NPCs.MERLIN_213, IntType.NPC, "talk-to"){ player, _ -> + player.dialogueInterpreter.open(MerlinHolyGrailDialogue(), NPC(NPCs.MERLIN_213)) + return@on true + } + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/SirGalahadHolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/SirGalahadHolyGrail.kt new file mode 100644 index 000000000..7108dad65 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/SirGalahadHolyGrail.kt @@ -0,0 +1,58 @@ +package rs09.game.content.quest.members.holygrail.dialogue + +import api.questStage +import core.game.node.entity.npc.NPC +import org.rs09.consts.NPCs +import rs09.game.content.dialogue.DialogueFile +import rs09.game.interaction.InteractionListener +import rs09.game.interaction.IntType + +/** + * Handles SirGalahadHolyGrail Dialogue + * @author Chisato + */ +class SirGalahadHolyGrailDialogue : DialogueFile() { + override fun handle(componentID: Int, buttonID: Int) { + val questName = "Holy Grail" + val questStage = questStage(player!!, questName) + when { + } + } +} + +//Welcome to my home. It's rare for me to have guests! Would you like a cup of tea? I'll just put the kettle on. +//Brother Galahad hangs a kettle over the fire +//I'm looking for Sir Galahad +//I AM Sir Galahad. Although I've retired as a Knight, and now live as a solitary monk. Also, I prefer to be +//known as Brother rather than Sir now. +//I'm on a quest to find the Holy Grail! +//Ah... the Grail... yes... that did fill me with wonder! Oh, that I could have stayed forever! The atmosphere, the food, the people... +//How can I find it? +//Well, I did not find it through looking - though admittedly I looked long and hard - eventually, it found me. +//Interesting. Though, I don't know where to start asking you questions. +//Ah, well you can always have tea... +//Umm.... +//I'm looking for Sir Galahad +//I AM Sir Galahad. Although I've retired as a Knight, and now live as a solitary monk. Also, I prefer to be +//known as Brother rather than Sir now. +//I'm on a quest to find the Holy Grail! +//Ah... the Grail... yes... that did fill me with wonder! Oh, that I could have stayed forever! The atmosphere, the food, the people... +//Hmm, actually, yes I seek an item from the realm of the Fisher King. Do you have one? +//Funny you should mention that, but when I left there I took a small cloth from the table as a keepsake. +//I don't suppose I could borrow that? It could come in useful on my quest. +//Galahad reluctantly passes you a small cloth. +//No, no thank you, I will be heading out. + + +/** + * Handles SirGalahadHolyGrailListener to launch the dialogue + * @author Chisato + */ +class SirGalahadListener : InteractionListener { + override fun defineListeners() { + on(NPCs.GALAHAD_218, IntType.NPC, "talk-to"){ player, _ -> + player.dialogueInterpreter.open(SirGalahadHolyGrailDialogue(), NPC(NPCs.GALAHAD_218)) + return@on true + } + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/SirPercivalHolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/SirPercivalHolyGrail.kt new file mode 100644 index 000000000..7c75f9685 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/SirPercivalHolyGrail.kt @@ -0,0 +1,72 @@ +package rs09.game.content.quest.members.holygrail.dialogue + +import api.questStage +import core.game.node.entity.npc.NPC +import org.rs09.consts.NPCs +import rs09.game.content.dialogue.DialogueFile +import rs09.game.interaction.InteractionListener +import rs09.game.interaction.IntType + +/** + * Handles SirPercivalHolyGrail Dialogue + * @author Chisato + */ +class SirPercivalHolyGrailDialogue : DialogueFile() { + override fun handle(componentID: Int, buttonID: Int) { + val questName = "Holy Grail" + val questStage = questStage(player!!, questName) + when { + } + } +} + +//Choose an option: +//How did you end up in a sack? +//How did you end up in a sack? +//It's a little embarrassing really. After going on a long and challenging quest to retrieve the boots +//of Arkaneeses, defeating many powerful enemies on the way, I fell into a goblin trap! +//I've been kept as a slave here for the last 3 months! A day or so ago, +//they decided it was a fun game to put me in this sack; then they forgot about me! I'm now very hungry, and my bones feel very stiff. +//Come with me, I shall make you a king. +//Come with me, I shall make you a king. +//What are you talking about? The king of where? +//Your father is apparently someone called the Fisher King. He is dying and wishes you to be his heir. +//I have been told that before. I have not been able to find the castle again though. +//Well, I do have the means to get us there - a magic whistle! +//You show him the magic whistle and explain where to blow it... +//Ok, I will see you there then! +//Your father wishes to speak to you. +//Your father wishes to speak to you. +//My father? You have spoken to him recently? +//He is dying and wishes you to be his heir +//I have been told that before. I have not been able to find that castle again though. +//Well, I do have the means to get us there - a magic whistle! +//You show him the magic whistle and explain where to blow it... +//Ok, I will see you there then! +//Found you! +//That you did... +//I need to give you a whistle... +//A what? +//I will be right back, stay here. +//Okay +//Wow, thank you! I could hardly breathe in there! +//Hi +//Hello +//... +//... +//See you later then? +//Yes... + + +/** + * Handles SirPercivalHolyGrailListener to launch the dialogue + * @author Chisato + */ +class SirPercivalListener : InteractionListener { + override fun defineListeners() { + on(NPCs.SIR_PERCIVAL_211, IntType.NPC, "talk-to"){ player, _ -> + player.dialogueInterpreter.open(SirPercivalHolyGrailDialogue(), NPC(NPCs.SIR_PERCIVAL_211)) + return@on true + } + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/TheFisherKingHolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/TheFisherKingHolyGrail.kt new file mode 100644 index 000000000..2d1c9a336 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/TheFisherKingHolyGrail.kt @@ -0,0 +1,61 @@ +package rs09.game.content.quest.members.holygrail.dialogue + +import api.questStage +import core.game.node.entity.npc.NPC +import org.rs09.consts.NPCs +import rs09.game.content.dialogue.DialogueFile +import rs09.game.interaction.InteractionListener +import rs09.game.interaction.IntType + +/** + * Handles TheFisherKingHolyGrail Dialogue + * @author Chisato + */ +class TheFisherKingHolyGrailDialogue : DialogueFile() { + override fun handle(componentID: Int, buttonID: Int) { + val questName = "Holy Grail" + val questStage = questStage(player!!, questName) + when { + } + } +} + + + +//Ah! You got inside at last! You spent all that time fumbling around outside. I thought you'd never make it here. +//Choose an option: +//How did you know what I have been doing? +//How did you know what I have been doing? +//Oh, I can see what is happening in my realm. I have sent clues to help you get here, such as the fisherman, and the crone. +//Do you mind if I have a look around? +//No, not at all. Please, be my guest. +//I seek the Holy Grail +//I seek the Holy Grail +//Ah excellent. A knight come to seek the Holy Grail. Maybe our land can be restored to its +//former glory. At the moment the Grail cannot be removed from the castle. +//Legend has it a questing knight will one day work out how to restore our land; then he will claim the Grail as his prize. +//Any ideas how I can restore the land? +//None at all. +//You don't look too well. +//You don't look too well. +//Nope, I don't feel so good either. I fear my life is running short... Alas, my son and heir is not here. I am waiting for my son to return to this castle. +//If you could find my son, that would be a great weight off my shoulders. +//Who is your son? +//He is known as Percival. I believe he is a knight of the round table. +//I shall go and see if I can find him. +//Hello adventurer! +//Hi... + + +/** + * Handles TheFisherKingHolyGrailListener to launch the dialogue + * @author Chisato + */ +class TheFisherKingListener : InteractionListener { + override fun defineListeners() { + on(NPCs.THE_FISHER_KING_220, IntType.NPC, "talk-to"){ player, _ -> + player.dialogueInterpreter.open(TheFisherKingHolyGrailDialogue(), NPC(NPCs.THE_FISHER_KING_220)) + return@on true + } + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirBedivereHolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirBedivereHolyGrail.kt new file mode 100644 index 000000000..79061098b --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirBedivereHolyGrail.kt @@ -0,0 +1,43 @@ +package rs09.game.content.quest.members.holygrail.dialogue.knightsoftheroundtable + +import api.questStage +import core.game.node.entity.npc.NPC +import org.rs09.consts.NPCs +import rs09.game.content.dialogue.DialogueFile +import rs09.game.interaction.InteractionListener +import rs09.game.interaction.IntType + +/** + * Handles SirBedivereHolyGrail Dialogue + * @author Chisato + */ +class SirBedivereHolyGrailDialogue : DialogueFile() { + override fun handle(componentID: Int, buttonID: Int) { + val questName = "Holy Grail" + val questStage = questStage(player!!, questName) + when { + } + } +} +//May I help you? You are looking for the Grail now adventurer? +//Absolutely. +//The best of luck to you! Make the name of Camelot proud, and bring it back to us. +//You look in good spirits. +//Yup +//That Holy Grail... +//... +//I am glad you got it! You ought to be in good spirits +//I appreciate that + +/** + * Handles SirBedivereHolyGrailListener to launch the dialogue + * @author Chisato + */ +class SirBedivereListener : InteractionListener { + override fun defineListeners() { + on(NPCs.SIR_BEDIVERE_242, IntType.NPC, "talk-to"){ player, _ -> + player.dialogueInterpreter.open(SirBedivereHolyGrailDialogue(), NPC(NPCs.SIR_BEDIVERE_242)) + return@on true + } + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirGawainHolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirGawainHolyGrail.kt new file mode 100644 index 000000000..c8567c7a3 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirGawainHolyGrail.kt @@ -0,0 +1,43 @@ +package rs09.game.content.quest.members.holygrail.dialogue.knightsoftheroundtable + +import api.questStage +import core.game.node.entity.npc.NPC +import org.rs09.consts.NPCs +import rs09.game.content.dialogue.DialogueFile +import rs09.game.interaction.InteractionListener +import rs09.game.interaction.IntType + +/** + * Handles SirGawainHolyGrail Dialogue + * @author Chisato + */ +class SirGawainHolyGrailDialogue : DialogueFile() { + override fun handle(componentID: Int, buttonID: Int) { + val questName = "Holy Grail" + val questStage = questStage(player!!, questName) + when { + } + } +} +//Good day to you (player.isMale() ? "Sir, " : "Madam, ")! +//I seek the Grail in the name of Camelot! +//The Grail? That is truly a noble quest indeed. None but Galahad have come close. +//Galahad? Who is he? +//He used to be one of the Knights of the Round Table, but he mysteriously disappeared many years ago. +//Why would he quit being a Knight? +//That is a good question. I'm afraid I don't have the answer. +//Getting the Holy Grail was a major victory for us, thank you. +//You are welcome. + +/** + * Handles SirBedivereHolyGrailListener to launch the dialogue + * @author Chisato + */ +class SirGawainListener : InteractionListener { + override fun defineListeners() { + on(NPCs.SIR_GAWAIN_240, IntType.NPC, "talk-to"){ player, _ -> + player.dialogueInterpreter.open(SirGawainHolyGrailDialogue(), NPC(NPCs.SIR_GAWAIN_240)) + return@on true + } + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirKayHolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirKayHolyGrail.kt new file mode 100644 index 000000000..d470686fe --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirKayHolyGrail.kt @@ -0,0 +1,39 @@ +package rs09.game.content.quest.members.holygrail.dialogue.knightsoftheroundtable + +import api.questStage +import core.game.node.entity.npc.NPC +import org.rs09.consts.NPCs +import rs09.game.content.dialogue.DialogueFile +import rs09.game.interaction.InteractionListener +import rs09.game.interaction.IntType + +/** + * Handles SirKayHolyGrail Dialogue + * @author Chisato + */ +class SirKayHolyGrailDialogue : DialogueFile() { + override fun handle(componentID: Int, buttonID: Int) { + val questName = "Holy Grail" + val questStage = questStage(player!!, questName) + when { + } + } +} +//Good day (player.isMale() ? "Sir, " : "Madam, ")! I hear you are questing for the Holy Grail? +//That's right. Any hints? +//Unfortunately not. +//You got the Holy Grail! +//Yes, I did... + +/** + * Handles SirKayHolyGrailListener to launch the dialogue + * @author Chisato + */ +class SirKayHolyGrailListener : InteractionListener { + override fun defineListeners() { + on(NPCs.SIR_KAY_241, IntType.NPC, "talk-to"){ player, _ -> + player.dialogueInterpreter.open(SirKayHolyGrailDialogue(), NPC(NPCs.SIR_KAY_241)) + return@on true + } + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirLancelotHolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirLancelotHolyGrail.kt new file mode 100644 index 000000000..daef9f6ae --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirLancelotHolyGrail.kt @@ -0,0 +1,45 @@ +package rs09.game.content.quest.members.holygrail.dialogue.knightsoftheroundtable + +import api.questStage +import core.game.node.entity.npc.NPC +import org.rs09.consts.NPCs +import rs09.game.content.dialogue.DialogueFile +import rs09.game.interaction.InteractionListener +import rs09.game.interaction.IntType + +/** + * Handles SirLancelotHolyGrail Dialogue + * @author Chisato + */ +class SirLancelotHolyGrailDialogue : DialogueFile() { + override fun handle(componentID: Int, buttonID: Int) { + val questName = "Holy Grail" + val questStage = questStage(player!!, questName) + when { + } + } +} + +//Greetings! I am Sir Lancelot, the greatest Knight in the land! What do you want? +//I am questing for the Holy Grail. +//The Grail? Ha! Frankly, little man, you're not in that league. +//Why do you say that? +//You got lucky with freeing Merlin but there's no way a puny wannabe like you is going to find the Holy Grail +//where so many others have failed. +//We'll see about that. +//There is no way a wannabe like you got the Holy Grail without help. You lucky knight. +//I am sure you would have gotten it if you tried... +//Yup... + +/** + * Handles SirLancelotHolyGrailListener to launch the dialogue + * @author Chisato + */ +class SirLancelotHolyGrailListener : InteractionListener { + override fun defineListeners() { + on(NPCs.SIR_LANCELOT_239, IntType.NPC, "talk-to"){ player, _ -> + player.dialogueInterpreter.open(SirLancelotHolyGrailDialogue(), NPC(NPCs.SIR_LANCELOT_239)) + return@on true + } + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirLucanHolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirLucanHolyGrail.kt new file mode 100644 index 000000000..04c10c6e0 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirLucanHolyGrail.kt @@ -0,0 +1,40 @@ +package rs09.game.content.quest.members.holygrail.dialogue.knightsoftheroundtable + +import api.questStage +import core.game.node.entity.npc.NPC +import org.rs09.consts.NPCs +import rs09.game.content.dialogue.DialogueFile +import rs09.game.interaction.InteractionListener +import rs09.game.interaction.IntType + +/** + * Handles SirLucanHolyGrail Dialogue + * @author Chisato + */ +class SirLucanHolyGrailDialogue : DialogueFile() { + override fun handle(componentID: Int, buttonID: Int) { + val questName = "Holy Grail" + val questStage = questStage(player!!, questName) + when { + } + } +} +//Hello there adventurer. +//I seek the Grail of legend! +//I'm afraid I don't have any suggestions. +//Thanks. I'll try and find someone who does. +//Thank you for getting the Holy Grail! +//You are welcome. + +/** + * Handles SirLucanHolyGrailListener to launch the dialogue + * @author Chisato + */ +class SirLucanHolyGrailListener : InteractionListener { + override fun defineListeners() { + on(NPCs.SIR_LUCAN_245, IntType.NPC, "talk-to"){ player, _ -> + player.dialogueInterpreter.open(SirLucanHolyGrailDialogue(), NPC(NPCs.SIR_LUCAN_245)) + return@on true + } + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirPalomedesHolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirPalomedesHolyGrail.kt new file mode 100644 index 000000000..bf5070ada --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirPalomedesHolyGrail.kt @@ -0,0 +1,41 @@ +package rs09.game.content.quest.members.holygrail.dialogue.knightsoftheroundtable + +import api.questStage +import core.game.node.entity.npc.NPC +import org.rs09.consts.NPCs +import rs09.game.content.dialogue.DialogueFile +import rs09.game.interaction.InteractionListener +import rs09.game.interaction.IntType + +/** + * Handles SirPalomedesHolyGrail Dialogue + * @author Chisato + */ +class SirPalomedesHolyGrailDialogue : DialogueFile() { + override fun handle(componentID: Int, buttonID: Int) { + val questName = "Holy Grail" + val questStage = questStage(player!!, questName) + when { + } + } +} + +//Hello there adventurer, what do you want of me? +//I'd like some advice on finding the Grail. +//Sorry, I cannot help you with that. +//Amazing job getting the Holy Grail! +//Thank you. + + +/** + * Handles SirPalomedesHolyGrailListener to launch the dialogue + * @author Chisato + */ +class SirPalomedesHolyGrailListener : InteractionListener { + override fun defineListeners() { + on(NPCs.SIR_PALOMEDES_3787, IntType.NPC, "talk-to"){ player, _ -> + player.dialogueInterpreter.open(SirPalomedesHolyGrailDialogue(), NPC(NPCs.SIR_PALOMEDES_3787)) + return@on true + } + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirPelleasHolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirPelleasHolyGrail.kt new file mode 100644 index 000000000..e34680df9 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirPelleasHolyGrail.kt @@ -0,0 +1,45 @@ +package rs09.game.content.quest.members.holygrail.dialogue.knightsoftheroundtable + +import api.questStage +import core.game.node.entity.npc.NPC +import org.rs09.consts.NPCs +import rs09.game.content.dialogue.DialogueFile +import rs09.game.interaction.InteractionListener +import rs09.game.interaction.IntType + +/** + * Handles SirPelleasHolyGrail Dialogue + * @author Chisato + */ +class SirPelleasHolyGrailDialogue : DialogueFile() { + override fun handle(componentID: Int, buttonID: Int) { + val questName = "Holy Grail" + val questStage = questStage(player!!, questName) + when { + } + } +} + +//Greetings to the court of King Arthur! +//Any suggestions on finding the Grail? +//My best guess would be some sort of spell. Merlin is our magic expert. Ask him? Although having said that, +//I believe Galahad found its location once. +//Really? Know where I can find him? +//I'm afraid not. He left here many moons ago and I know not where he went. +//Greetings to the court of King Arthur! +//Sure... +//Great job on the Holy Grail too! +//Thanks! + +/** + * Handles SirPelleasHolyGrailListener to launch the dialogue + * @author Chisato + */ +class SirPelleasHolyGrailListener : InteractionListener { + override fun defineListeners() { + on(NPCs.SIR_PELLEAS_244, IntType.NPC, "talk-to"){ player, _ -> + player.dialogueInterpreter.open(SirPelleasHolyGrailDialogue(), NPC(NPCs.SIR_PELLEAS_244)) + return@on true + } + } +} diff --git a/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirTristamHolyGrail.kt b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirTristamHolyGrail.kt new file mode 100644 index 000000000..c76d6d704 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/quest/members/holygrail/dialogue/knightsoftheroundtable/SirTristamHolyGrail.kt @@ -0,0 +1,40 @@ +package rs09.game.content.quest.members.holygrail.dialogue.knightsoftheroundtable + +import api.questStage +import core.game.node.entity.npc.NPC +import org.rs09.consts.NPCs +import rs09.game.content.dialogue.DialogueFile +import rs09.game.interaction.InteractionListener +import rs09.game.interaction.IntType + +/** + * Handles SirTristamHolyGrail Dialogue + * @author Chisato + */ +class SirTristamHolyGrailDialogue : DialogueFile() { + override fun handle(componentID: Int, buttonID: Int) { + val questName = "Holy Grail" + val questStage = questStage(player!!, questName) + when { + } + } +} +//Hail Arthur, King of the Britons! +//Um... Hello. I am seeking the Grail. +//Good luck with that! +//Hail Arthur, King of the Britons! +//Oh and good job getting the Holy Grail! +//Thanks. + +/** + * Handles SirTristamHolyGrailListener to launch the dialogue + * @author Chisato + */ +class SirTristamHolyGrailListener : InteractionListener { + override fun defineListeners() { + on(NPCs.SIR_TRISTRAM_243, IntType.NPC, "talk-to"){ player, _ -> + player.dialogueInterpreter.open(SirTristamHolyGrailDialogue(), NPC(NPCs.SIR_TRISTRAM_243)) + return@on true + } + } +}