Implemented Hazeel Cult quest
This commit is contained in:
@@ -132205,5 +132205,15 @@
|
|||||||
"examine": "Emperor of all he surveys.",
|
"examine": "Emperor of all he surveys.",
|
||||||
"name": "Penguin",
|
"name": "Penguin",
|
||||||
"id": "12764"
|
"id": "12764"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"examine": "This key opens a chest in the Carnillean household.",
|
||||||
|
"name": "Chest key",
|
||||||
|
"id": "709"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"examine": "This stuff looks nasty.",
|
||||||
|
"name": "Poison",
|
||||||
|
"id": "273"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -887,6 +887,10 @@
|
|||||||
"region": "10390",
|
"region": "10390",
|
||||||
"id": "102"
|
"id": "102"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"region": "10391",
|
||||||
|
"id": "478"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"region": "10393",
|
"region": "10393",
|
||||||
"id": "346"
|
"id": "346"
|
||||||
|
|||||||
@@ -9386,6 +9386,7 @@
|
|||||||
"attack_level": "1"
|
"attack_level": "1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"examine": "On special duty to protect the Canilleans.",
|
||||||
"name": "Guard",
|
"name": "Guard",
|
||||||
"defence_level": "1",
|
"defence_level": "1",
|
||||||
"safespot": null,
|
"safespot": null,
|
||||||
@@ -9398,18 +9399,19 @@
|
|||||||
"attack_level": "1"
|
"attack_level": "1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"examine": "A member of the Hazeel cult.",
|
||||||
|
"melee_animation": "811",
|
||||||
|
"respawn_delay": "60",
|
||||||
|
"defence_animation": "425",
|
||||||
"death_animation": "836",
|
"death_animation": "836",
|
||||||
"name": "Clivet",
|
"name": "Clivet",
|
||||||
"defence_level": "1",
|
"defence_level": "1",
|
||||||
"safespot": null,
|
"safespot": null,
|
||||||
"lifepoints": "25",
|
"lifepoints": "25",
|
||||||
"melee_animation": "811",
|
|
||||||
"strength_level": "1",
|
"strength_level": "1",
|
||||||
"id": "893",
|
"id": "893",
|
||||||
"range_level": "1",
|
"range_level": "1",
|
||||||
"respawn_delay": "60",
|
"attack_level": "1"
|
||||||
"attack_level": "1",
|
|
||||||
"defence_animation": "425"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"examine": "A member of the Hazeel cult.",
|
"examine": "A member of the Hazeel cult.",
|
||||||
@@ -74201,6 +74203,7 @@
|
|||||||
"id": "880"
|
"id": "880"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"examine": "The Carnillean family chef.",
|
||||||
"name": "Claus the chef",
|
"name": "Claus the chef",
|
||||||
"id": "886"
|
"id": "886"
|
||||||
},
|
},
|
||||||
@@ -74209,14 +74212,17 @@
|
|||||||
"id": "888"
|
"id": "888"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"examine": "Ceril Carnillean's wife.",
|
||||||
"name": "Henryeta Carnillean",
|
"name": "Henryeta Carnillean",
|
||||||
"id": "889"
|
"id": "889"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"examine": "The Carnellian family butler.",
|
||||||
"name": "Butler Jones",
|
"name": "Butler Jones",
|
||||||
"id": "890"
|
"id": "890"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"examine": "Leader of the Hazeel cult.",
|
||||||
"name": "Alomone",
|
"name": "Alomone",
|
||||||
"id": "891"
|
"id": "891"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2573,7 +2573,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "885",
|
"npc_id": "885",
|
||||||
"loc_data": "{2565,3271,0,0,0}-{2573,3268,1,0,0}-"
|
"loc_data": "{2565,3271,0,1,0}-{2573,3268,1,1,0}-"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"npc_id": "886",
|
||||||
|
"loc_data": "{2567,9669,0,1,0}-"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "887",
|
"npc_id": "887",
|
||||||
@@ -2581,15 +2585,27 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "888",
|
"npc_id": "888",
|
||||||
"loc_data": "{2565,3273,0,0,0}-"
|
"loc_data": "{2565,3273,0,1,0}-"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "889",
|
"npc_id": "889",
|
||||||
"loc_data": "{2571,3270,0,0,0}-"
|
"loc_data": "{2571,3270,0,1,0}-"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "890",
|
"npc_id": "890",
|
||||||
"loc_data": "{2569,3272,0,0,0}-{2573,3269,1,0,0}-"
|
"loc_data": "{2569,3272,0,1,0}-{2573,3269,1,1,0}-"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"npc_id": "891",
|
||||||
|
"loc_data": "{2609,9670,0,1,0}-"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"npc_id": "893",
|
||||||
|
"loc_data": "{2567,9683,0,1,0}-"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"npc_id": "894",
|
||||||
|
"loc_data": "{2609,9686,0,1,0}-{2607,9681,0,1,0}-{2609,9674,0,1,0}-{2608,9672,0,1,0}-{2604,9674,0,1,0}-{2605,9671,0,1,0}-"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "895",
|
"npc_id": "895",
|
||||||
|
|||||||
@@ -0,0 +1,146 @@
|
|||||||
|
package content.region.kandarin.ardougne.quest.hazeelcult
|
||||||
|
|
||||||
|
import content.data.Quests
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCult.Companion.mahjarratArc
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCultListeners.Companion.HAZEEL_SCROLL
|
||||||
|
import core.api.*
|
||||||
|
import core.game.dialogue.*
|
||||||
|
import core.game.node.entity.npc.NPC
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.game.world.map.Location
|
||||||
|
import core.plugin.Initializable
|
||||||
|
import core.tools.END_DIALOGUE
|
||||||
|
import org.rs09.consts.*
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class AlomoneDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
|
||||||
|
val hazeel = HazeelNPC(NPCs.HAZEEL_892, Location.create(2607, 9669, 0))
|
||||||
|
|
||||||
|
override fun handle(componentID: Int, buttonID: Int, ): Boolean {
|
||||||
|
|
||||||
|
val questStage = getQuestStage(player, Quests.HAZEEL_CULT)
|
||||||
|
|
||||||
|
when {
|
||||||
|
// you can't access Alomone before stage 2
|
||||||
|
// stage 2 - talk to clivet (set attr for carnillean)
|
||||||
|
// stage 2 - talk to clivet (set attr for mahjarrat)
|
||||||
|
// stage 3 - poison poured in food (mahjarrat-only stage)
|
||||||
|
(questStage in 2..3) -> when (stage) {
|
||||||
|
0 -> {
|
||||||
|
if (mahjarratArc(player)) {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Hi there.").also { stage = 20 }
|
||||||
|
} else {
|
||||||
|
npcl(FacialExpression.ANGRY, "How did YOU get in here?").also { stage ++}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// carnillean arc
|
||||||
|
1 -> playerl(FacialExpression.NEUTRAL, "I've come for the Carnillean family armour. Hand it over, or face the consequences.").also { stage++ }
|
||||||
|
2 -> npcl(FacialExpression.ANNOYED, "I thought I made it clear to the butler you could not be allowed to interfere with our mission. The incompetent fool must be going soft.").also { stage++ }
|
||||||
|
3 -> playerl(FacialExpression.NEUTRAL, "So, the butler's part of your sordid little cult, huh? Why is it ALWAYS the butler? I should have known...").also { stage++ }
|
||||||
|
4 -> npcl(FacialExpression.ANNOYED, "Well, you won't live long enough to tell anyone! DIE!!!").also { stage++ }
|
||||||
|
5 -> {
|
||||||
|
end()
|
||||||
|
setQuestStage(player, Quests.HAZEEL_CULT, 4)
|
||||||
|
npc!!.attack(player!!)
|
||||||
|
}
|
||||||
|
|
||||||
|
// mahjarrat arc
|
||||||
|
20 -> npcl(FacialExpression.NEUTRAL, "Well well well... So we have a new recruit. Clivet told me of your desire to join us in our glorious task to resurrect the mighty Hazeel from his slumber.").also { stage++ }
|
||||||
|
21 -> npcl(FacialExpression.NEUTRAL, "To accomplish this, we require the ancient words of summoning which will restore his shattered body, so that he can bring vengeance upon his enemies.").also { stage++ }
|
||||||
|
22 -> npcl(FacialExpression.NEUTRAL, "Hazeel in his mighty cunning anticipated that he might be defeated and secured within his home somewhere a powerful magical scroll that could restore him.").also { stage++ }
|
||||||
|
23 -> npcl(FacialExpression.NEUTRAL, "The words to this powerful enchantment are hidden within the Carnillean mansion, right under the nose of his unsuspecting foes. We already have an agent in place there").also { stage++}
|
||||||
|
24 -> npcl(FacialExpression.NEUTRAL, "in their Butler Jones, a faithful follower of Hazeel. His loyalty to Hazeel is beyond questioning, yet he has been unsuccessful in locating the scroll containing the spell so far.").also { stage++ }
|
||||||
|
25 -> npcl(FacialExpression.NEUTRAL, "Go back to the mansion, and assist us in finding this enchantment, so that together we can restore Hazeel to his true power and glory!").also { stage = END_DIALOGUE}.also { setQuestStage(player, Quests.HAZEEL_CULT, 4) }
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 4 - alomone either fought or he tells you he needs scroll
|
||||||
|
// stage 5 - either returning the armour, or finding the scroll
|
||||||
|
(questStage in 4..5 && mahjarratArc(player)) -> when (stage) {
|
||||||
|
0 -> if(npc.id == NPCs.ALOMONE_891 && !getAttribute(player, "hazeelSpawned", false)) {
|
||||||
|
playerl(FacialExpression.NEUTRAL, "Hi.").also { stage++ }
|
||||||
|
} else {
|
||||||
|
playerl(FacialExpression.NEUTRAL, "Hi.").also { stage = 12 }
|
||||||
|
}
|
||||||
|
1 -> npcl(FacialExpression.NEUTRAL, "Have you brought me the scroll of restoration to complete the ritual?").also { stage++ }
|
||||||
|
2 -> if(inInventory(player, HAZEEL_SCROLL)){
|
||||||
|
playerl(FacialExpression.NEUTRAL, "Yep. Got it right here.").also { stage++ }
|
||||||
|
} else {
|
||||||
|
playerl(FacialExpression.NEUTRAL, "No, not yet.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
3 -> npcl(FacialExpression.NEUTRAL, "FINALLY! Quickly, give it to me and I will begin the ritual!").also { stage++ }
|
||||||
|
4 -> sendDialogue(player, "You hand Alomone the scroll of Hazeel.").also { stage++ }
|
||||||
|
5 -> npcl(FacialExpression.NEUTRAL, "Yes... YES! With the words contained within this scroll our Lord shall return to this realm and bring destruction to our enemies!").also { stage++ }
|
||||||
|
6 -> npcl(FacialExpression.NEUTRAL, "Watch adventurer, and witness the glorious rebirth of Hazeel!").also { stage++ }
|
||||||
|
7 -> npcl(FacialExpression.NEUTRAL, "Lord Hazeel... Lord Zamorak... I call upon the powers of evil... The forces of chaos... The strength of hatred...").also { stage++ }
|
||||||
|
8 -> npcl(FacialExpression.NEUTRAL, "Sentente sillaberi junque dithmento! Ia! Ia! dextrimon encanto! termando... imcando... solly enty rando... sentente! Ia! Ia! Indenti zaggarati g'thxa!").also { stage++ }
|
||||||
|
9 -> sendDialogue(player, "Alomone continues to recite the scroll. It is in a language you have never heard and do not understand at all.").also { stage++ }
|
||||||
|
10 -> npcl(FacialExpression.NEUTRAL, "Dintenta! Sententa! Retenta! Q'exjta! Ia! Sottottott! Ia! Dysmenta junque fammatio svelken! Sottey! Sentey! SOLOMENT!").also { stage++ }
|
||||||
|
11 -> {
|
||||||
|
sendDialogue(player, "As Alomone finishes reading the scroll you hear a shrill scream emanate from Hazeel's coffin.").also { stage++ }
|
||||||
|
hazeel.init()
|
||||||
|
setAttribute(player,"hazeelSpawned", true)
|
||||||
|
player.face(hazeel)
|
||||||
|
hazeel.isWalks = false
|
||||||
|
}
|
||||||
|
12 -> sendNPCDialogue(player, NPCs.HAZEEL_892, "My loyal followers. I have pride in you all. Never did I expect to return to this land and I see I have much to attend to.").also { stage++ }
|
||||||
|
13 -> sendNPCDialogue(player, NPCs.HAZEEL_892, "Soon this world will cower once more at the name Hazeel, and my fury will blaze across mine enemies just as my loyal followers gain their rewards.").also { stage++ }
|
||||||
|
14 -> sendDialogue(player, "Hazeel turns to look at you directly.").also{ hazeel.face(player) }.also { stage++ }
|
||||||
|
15 -> sendNPCDialogue(player, NPCs.HAZEEL_892, "Adventurer. I know that thy efforts were principal in my return to this plain of existence. I offer you my thanks directly.").also { stage++ }
|
||||||
|
16 -> sendNPCDialogue(player, NPCs.HAZEEL_892, "You may not be a follower of Zamorak directly but your cunning and treachery mark you as a friend to the Mahjarrat. Rest assured; I will call on your assistance again.").also { stage++ }
|
||||||
|
17 -> sendNPCDialogue(player, NPCs.HAZEEL_892, "Weak as I am now, my strength shall return, and my followers will be greatly rewarded when my powers peak once more. Join me in my cause as my servant, and all").also { stage++ }
|
||||||
|
18 -> sendNPCDialogue(player, NPCs.HAZEEL_892, "the riches of this plane shall be yours to share, in domination over all who oppose my kind. You would be wise to pledge yourself now while you still may.").also { stage++ }
|
||||||
|
19 -> playerl(FacialExpression.ANGRY, "I serve nobody but myself.").also { stage++ }
|
||||||
|
20 -> sendNPCDialogue(player, NPCs.HAZEEL_892, "Your insolence shall be overlooked this time for I am in truth in your debt. Come close: I shall reward you with wealth such as you deserve.").also { stage++ }
|
||||||
|
21 -> sendNPCDialogue(player, NPCs.HAZEEL_892, "Although your true reward will be later, when Zamorak and I, together, lay waste to this miserable planet, and you are spared as an ally to us.").also { stage++ }
|
||||||
|
22 -> sendDialogue(player, "Hazeel gives you some coins. They seem to be extremely ancient.").also { stage++ }
|
||||||
|
23 -> sendNPCDialogue(player, NPCs.HAZEEL_892, "And now I must leave you my loyal subjects for time is short, and I have many pressing matters to address before I make my return. I must leave now, and head Northwards").also { stage++ }
|
||||||
|
24 -> sendNPCDialogue(player, NPCs.HAZEEL_892, "to join my fellow mahjarrat and regain my strength and powers. I shall return when I am ready to fight my enemies and much blood shall flow across these lands!").also { stage++ }
|
||||||
|
25 -> sendDialogue(player, "The cultists let out a mighty cheer.").also { stage++ }
|
||||||
|
26 -> {
|
||||||
|
end()
|
||||||
|
removeItem(player, HAZEEL_SCROLL)
|
||||||
|
val hazeel = player.findNpcInViewport(NPCs.HAZEEL_892)
|
||||||
|
hazeel?.clear()
|
||||||
|
removeAttribute(player,"hazeelSpawned")
|
||||||
|
finishQuest(player, Quests.HAZEEL_CULT)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 100 - quest complete - either presenting proof that jones is a bad guy (duh) or resurrecting hazeel
|
||||||
|
// also valid for stages 4 and 5 in the carnillean arc.
|
||||||
|
(questStage in 4..100) -> when (stage) {
|
||||||
|
0 -> {
|
||||||
|
if (mahjarratArc(player)) {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Hi there.").also { stage++ }
|
||||||
|
} else {
|
||||||
|
npcl(FacialExpression.ANNOYED, "You have crossed my path too many times intruder. Leave or face my wrath.").also { stage = 2 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
1 -> npcl(FacialExpression.NEUTRAL, "Welcome, adventurer. Know that as a friend to Hazeel, you are always welcome here.").also { stage = END_DIALOGUE }
|
||||||
|
|
||||||
|
2 -> playerl(FacialExpression.FRIENDLY, "Yeah, whatever.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// function used to find any hazeels and remove them at the end of the quest.
|
||||||
|
// this has the potential to remove other players' hazeels, but the player could still complete the quest by either continuing their
|
||||||
|
// active dialogue or speaking to alomone, and just dealing with the fact that their hazeel is not on the map. relogging and restarting
|
||||||
|
// the dialogue would get these players a new hazeel.
|
||||||
|
private fun Player.findNpcInViewport(npcId: Int): NPC? {
|
||||||
|
val viewport = viewport ?: return null
|
||||||
|
for (plane in viewport.viewingPlanes) {
|
||||||
|
for (npc in plane.npcs) {
|
||||||
|
if (npc.id == npcId) {
|
||||||
|
return npc
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hazeel is in this array because in the event the player quits the dialogue halfway through in the final stage, it can be restarted by speaking to either alomone or hazeel.
|
||||||
|
override fun getIds(): IntArray = intArrayOf(NPCs.ALOMONE_891, NPCs.HAZEEL_892)
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package content.region.kandarin.ardougne.quest.hazeelcult
|
||||||
|
|
||||||
|
import content.data.Quests
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCult.Companion.carnilleanArc
|
||||||
|
import core.api.isQuestInProgress
|
||||||
|
import core.api.produceGroundItem
|
||||||
|
import core.game.node.entity.Entity
|
||||||
|
import core.game.node.entity.npc.AbstractNPC
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.game.world.map.Location
|
||||||
|
import core.plugin.Initializable
|
||||||
|
import org.rs09.consts.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alomone drops the Carnillean Amour during the Hazeel Cult quest.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class AlomoneNPC(
|
||||||
|
id: Int = 0,
|
||||||
|
location: Location? = null,
|
||||||
|
) : AbstractNPC(id, location) {
|
||||||
|
override fun construct(
|
||||||
|
id: Int,
|
||||||
|
location: Location,
|
||||||
|
vararg objects: Any,
|
||||||
|
): AbstractNPC = AlomoneNPC(id, location)
|
||||||
|
|
||||||
|
override fun getIds(): IntArray = intArrayOf(NPCs.ALOMONE_891)
|
||||||
|
|
||||||
|
override fun finalizeDeath(killer: Entity?) {
|
||||||
|
if (killer is Player) {
|
||||||
|
if (isQuestInProgress(killer, Quests.HAZEEL_CULT, 3, 4) && carnilleanArc(killer)) {
|
||||||
|
produceGroundItem(killer, Items.CARNILLEAN_ARMOUR_2405, 1, this.location)
|
||||||
|
}
|
||||||
|
super.finalizeDeath(killer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+80
@@ -0,0 +1,80 @@
|
|||||||
|
package content.region.kandarin.ardougne.quest.hazeelcult
|
||||||
|
|
||||||
|
import content.data.Quests
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCult.Companion.mahjarratArc
|
||||||
|
import core.api.getQuestStage
|
||||||
|
import core.api.inEquipmentOrInventory
|
||||||
|
import core.game.dialogue.DialoguePlugin
|
||||||
|
import core.game.dialogue.FacialExpression
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.plugin.Initializable
|
||||||
|
import core.tools.END_DIALOGUE
|
||||||
|
import org.rs09.consts.*
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class ButlerJonesDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
|
||||||
|
override fun handle(componentID: Int, buttonID: Int): Boolean {
|
||||||
|
val questStage = getQuestStage(player!!, Quests.HAZEEL_CULT)
|
||||||
|
|
||||||
|
when {
|
||||||
|
// stage 3 - poison poured in food (mahjarrat-only stage)
|
||||||
|
(questStage == 3) -> when (stage) {
|
||||||
|
0 -> playerl(FacialExpression.FRIENDLY, "Hello there.").also { stage++ }
|
||||||
|
1 -> npcl(FacialExpression.NEUTRAL, "Hello, adventurer. Such a terrible shame about Scruffy. I wonder if the family will ever fully recover.").also { stage++ }
|
||||||
|
2 -> npcl(FacialExpression.FRIENDLY, "Anyway, I hear your quest is going well.").also { stage++ }
|
||||||
|
3 -> playerl(FacialExpression.FRIENDLY, "Really?").also { stage++ }
|
||||||
|
4 -> npcl(FacialExpression.ANNOYED, "Oh yes. Do keep up the good work.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 4 - alomone either fought or he tells you he needs scroll
|
||||||
|
(questStage == 4 && mahjarratArc(player) && inEquipmentOrInventory(player, Items.HAZEELS_MARK_2406)) -> when (stage) {
|
||||||
|
0 -> npcl(FacialExpression.NEUTRAL, "Hello again friend. I see you have the mark now; you should keep it covered up.").also { stage++ }
|
||||||
|
1 -> playerl(FacialExpression.FRIENDLY, "That? Oh, it's nothing. Just an old amulet.").also { stage++ }
|
||||||
|
2 -> npcl(FacialExpression.NEUTRAL, "You don't have to pretend with me, friend! Our cause is one and the same; the sooner Lord Hazeel is avenged the better for this city... and for us!").also { stage++ }
|
||||||
|
3 -> playerl(FacialExpression.FRIENDLY, "So do you have any idea where the scroll with the enchantment is?").also { stage++ }
|
||||||
|
4 -> npcl(FacialExpression.ANNOYED, "No idea I'm afraid. I KNOW it's somewhere in this house, but for the life of me I can't find it anywhere. I've searched high and low for it!").also { stage++ }
|
||||||
|
5 -> playerl(FacialExpression.FRIENDLY, "And Sir Ceril doesn't suspect a thing?").also { stage++ }
|
||||||
|
6 -> npcl(FacialExpression.ANNOYED, "Ha! That silly old fool? He can't see the forest for the trees.").also { stage++ }
|
||||||
|
7 -> playerl(FacialExpression.FRIENDLY, "I'll keep on looking then...").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 0 - unstarted
|
||||||
|
// stage 1 - after talking to ceril
|
||||||
|
// stage 2 - talk to clivet (set attr for carnillean)
|
||||||
|
// stage 2 - talk to clivet (set attr for mahjarrat)
|
||||||
|
// stage 5 - either returning the armour, or finding the scroll
|
||||||
|
// also stage 4 if you are carnillean side
|
||||||
|
(questStage in 0..5) -> when (stage) {
|
||||||
|
0 -> playerl(FacialExpression.FRIENDLY, "Hello there.").also { stage++ }
|
||||||
|
1 -> npcl(FacialExpression.FRIENDLY, "Hello. How are you today?").also { stage++ }
|
||||||
|
2 -> playerl(FacialExpression.FRIENDLY, "Good thank you, and yourself?").also { stage++ }
|
||||||
|
3 -> npcl(FacialExpression.FRIENDLY, "Very well, thank you.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 100 - quest complete - either presenting proof that jones is a bad guy (duh) or resurrecting hazeel
|
||||||
|
(questStage == 100) -> when (stage) {
|
||||||
|
0 -> {
|
||||||
|
if (mahjarratArc(player)) {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Hello stranger.").also { stage = 1 }
|
||||||
|
} else {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Hello there.").also { stage = 6 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
1 -> npcl(FacialExpression.NEUTRAL, "It's an honour to be in your presence again, adventurer. I hope things are well?").also { stage++ }
|
||||||
|
2 -> playerl(FacialExpression.FRIENDLY, "Not bad, thanks. Yourself?").also { stage++ }
|
||||||
|
3 -> npcl(FacialExpression.ANNOYED, "Unfortunately, I am still forced to deal with this insufferable family. Many generations have passed, but they are still the enemy. As such, they must be kept a close eye on.").also { stage++ }
|
||||||
|
4 -> npcl(FacialExpression.ANNOYED, "Still, I have no doubt that the time will soon come for me to leave this place. Our lord will certainly have need of me elsewhere once his current work is complete.").also { stage++ }
|
||||||
|
5 -> playerl(FacialExpression.FRIENDLY, "I see. Well good luck with it all.").also { stage = END_DIALOGUE }
|
||||||
|
|
||||||
|
6 -> npcl(FacialExpression.ANNOYED, "Why hello there.").also { stage++ }
|
||||||
|
7 -> playerl(FacialExpression.FRIENDLY, "I take it you're the new butler...?").also { stage++ }
|
||||||
|
8 -> npcl(FacialExpression.ANNOYED, "That's right. I hear that they had some problems with the last one.").also { stage++ }
|
||||||
|
9 -> playerl(FacialExpression.FRIENDLY, "Yes, you could say that...").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray = intArrayOf(NPCs.BUTLER_JONES_890)
|
||||||
|
}
|
||||||
+147
@@ -0,0 +1,147 @@
|
|||||||
|
package content.region.kandarin.ardougne.quest.hazeelcult
|
||||||
|
|
||||||
|
import content.data.Quests
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCult.Companion.carnilleanArc
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCult.Companion.fakeFinish
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCult.Companion.mahjarratArc
|
||||||
|
import core.api.*
|
||||||
|
import core.game.dialogue.DialoguePlugin
|
||||||
|
import core.game.dialogue.FacialExpression
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.plugin.Initializable
|
||||||
|
import core.tools.END_DIALOGUE
|
||||||
|
import org.rs09.consts.*
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class CerilCarnilleanDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
|
||||||
|
override fun handle(componentID: Int, buttonID: Int): Boolean {
|
||||||
|
val questStage = getQuestStage(player!!, Quests.HAZEEL_CULT)
|
||||||
|
when {
|
||||||
|
// stage 0 - unstarted
|
||||||
|
(questStage == 0) -> {
|
||||||
|
when (stage) {
|
||||||
|
0 -> npcl(FacialExpression.ANGRY, "Blooming, thieving, weirdo cultists! Why don't they leave me alone? String 'em all up, that's what I say!").also { stage++ }
|
||||||
|
1 -> options("What's wrong?", "You probably deserve it.", "You seem uptight, I'll leave you alone.").also { stage++ }
|
||||||
|
2 -> when (buttonID) {
|
||||||
|
1 -> playerl(FacialExpression.HALF_ASKING, "What's wrong?").also { stage++ }
|
||||||
|
2 -> playerl(FacialExpression.FRIENDLY, "You probably deserve it.").also { stage = 20 }
|
||||||
|
3 -> playerl(FacialExpression.FRIENDLY, "You seem uptight, I'll leave you alone.").also { stage = 21 }
|
||||||
|
}
|
||||||
|
3 -> npcl(FacialExpression.ANGRY, "It's those blooming cultists from the forest! Those freaks keep breaking into my house!").also { stage++ }
|
||||||
|
4 -> playerl(FacialExpression.FRIENDLY, "Have they taken much?").also { stage++ }
|
||||||
|
5 -> npcl(FacialExpression.ANGRY, "They first broke in months ago and stole a suit of armour. The strange thing is that they've broken in four times since but taken nothing.").also { stage++ }
|
||||||
|
6 -> playerl(FacialExpression.FRIENDLY, "And you are...?").also { stage++ }
|
||||||
|
7 -> npcl(FacialExpression.ANGRY, "Why, I am Sir Ceril Carnillean! We really are quite a famous bloodline... who've played a vital role in the politics of Ardougne for many generations.").also { stage++ }
|
||||||
|
8 -> npcl(FacialExpression.FRIENDLY, "Perhaps you would be able to assist me in returning the stolen armour? For a modest cash reward of course!").also { stage++ }
|
||||||
|
9 -> options("Yes, of course, I'd be happy to help.", "No thanks. I've got other plans.").also { stage++ }
|
||||||
|
10 -> when (buttonID) {
|
||||||
|
1 -> playerl(FacialExpression.FRIENDLY, "Yes, of course, I'd be happy to help.").also { stage++ }
|
||||||
|
2 -> playerl(FacialExpression.FRIENDLY, "No thanks. I've got other plans.").also { stage = 19 }
|
||||||
|
}
|
||||||
|
11 -> npcl(FacialExpression.FRIENDLY, "That's very noble of you sirrah! I caught a glimpse of the thieves leaving but due to... uh... yeah, my cold I was unable to give chase.").also { stage++ }
|
||||||
|
12 -> npcl(FacialExpression.FRIENDLY, "They're some kind of crazy cult who dress all in black, and hang out near the cave entrance in the forest south of here.").also { stage++ }
|
||||||
|
13 -> playerl(FacialExpression.FRIENDLY, "How do you know that?").also { stage++ }
|
||||||
|
14 -> npcl(FacialExpression.FRIENDLY, "My old butler, Higson, once followed them to their hideout there. Unfortunately the next night he died in his sleep.").also { stage++ }
|
||||||
|
15 -> playerl(FacialExpression.FRIENDLY, "That's awful!").also { stage++ }
|
||||||
|
16 -> npcl(FacialExpression.FRIENDLY, "No, it's okay. A replacement arrived the next day. He's been great - cooks an excellent broth!").also { stage++ }
|
||||||
|
|
||||||
|
17 -> playerl(FacialExpression.FRIENDLY, "Ok. I'll see what I can do.").also { stage++ }
|
||||||
|
18 -> {
|
||||||
|
end()
|
||||||
|
setQuestStage(player, Quests.HAZEEL_CULT, 1)
|
||||||
|
}
|
||||||
|
19 -> npcl(FacialExpression.FRIENDLY, "Well no wonder I'm the one with the big house and you're the one on the streets.").also { stage = END_DIALOGUE }
|
||||||
|
20 -> npcl(FacialExpression.FRIENDLY, "And who are you to judge me? You look like a peasant anyway. I'm wasting my time talking to you.").also { stage = END_DIALOGUE }
|
||||||
|
21 -> npcl(FacialExpression.FRIENDLY, "Yes, I doubt you could help anyway.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 3 - poison poured in food (mahjarrat-only stage)
|
||||||
|
(questStage == 3) -> when (stage) {
|
||||||
|
0 -> playerl(FacialExpression.FRIENDLY, "Hello again.").also { stage++ }
|
||||||
|
1 -> npcl(FacialExpression.ANNOYED, "Oh the inhumanity... the cruelty... the misery... the pain...").also { stage++ }
|
||||||
|
2 -> npcl(FacialExpression.ANNOYED, "My son is a good boy, really, but how could he give his dinner to Scruffy without having the servants test it for poison first? How?").also { stage++ }
|
||||||
|
3 -> npcl(FacialExpression.ANNOYED, "How could he be so thoughtless and careless? He knows we are all under threat!").also { stage++ }
|
||||||
|
4 -> playerl(FacialExpression.FRIENDLY, "Scruffy?").also { stage++ }
|
||||||
|
5 -> npcl(FacialExpression.ANNOYED, "He's been with our family for twenty years... that's 140 in dog years! The poor dog... What did he ever do to deserve such a fate?").also { stage++ }
|
||||||
|
6 -> playerl(FacialExpression.FRIENDLY, "Your dog got poisoned? That's not right.").also { stage++ }
|
||||||
|
7 -> npcl(FacialExpression.NEUTRAL, "I agree! I hope whichever evildoer is responsible gets the full weight of the law brought upon them!").also { stage++ }
|
||||||
|
8 -> playerl(FacialExpression.NEUTRAL, "Uh... yeah... me too.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 4 - alomone either fought or he tells you he needs scroll
|
||||||
|
(questStage == 4 && carnilleanArc(player) && inInventory(player, Items.CARNILLEAN_ARMOUR_2405)) -> when (stage) {
|
||||||
|
0 -> playerl(FacialExpression.FRIENDLY, "Look! I've recovered your armour!").also { stage++ }
|
||||||
|
1 -> npcl(FacialExpression.FRIENDLY, "Well done! I must say I am very impressed! Come on, hand it over.").also { stage++ }
|
||||||
|
2 -> npcl(FacialExpression.FRIENDLY, "Before we send you on your way with your payment, I'll just get Jones to whip you up a batch of his special broth.").also { stage++ }
|
||||||
|
3 -> playerl(FacialExpression.FRIENDLY, "I'd rather not if it's all the same to you. I overheard the cultists talking, and apparently Jones is in league with them.").also { stage++ }
|
||||||
|
4 -> {
|
||||||
|
// check if we are upstairs
|
||||||
|
if(player.location.z == 1) {
|
||||||
|
npcl(FacialExpression.ANGRY, "W-what? RIGHT! You! We're going to blooming well sort this out right now once and for all!").also { stage++ }
|
||||||
|
} else {
|
||||||
|
npcl(FacialExpression.ANGRY, "W-what? RIGHT! You! Come with me upstairs! We're going to blooming-well sort this out, once and for all!").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
5 -> npcl(FacialExpression.HALF_ASKING, "Jones! This commoner says you had something to do with the theft of my armour. What do you have to say for yourself about that?").also { stage++ }
|
||||||
|
6 -> sendNPCDialogue(player, NPCs.BUTLER_JONES_890, "It wasn't me m'lud. I am, as you know, a loyal servant.").also { stage++ }
|
||||||
|
7 -> npcl(FacialExpression.FRIENDLY, "Humph. Quite right too. I cannot fathom why this scoundrel would accuse you of such a crime without evidence to back up @g[his,her] accusations.").also { stage++ }
|
||||||
|
8 -> npcl(FacialExpression.FRIENDLY, "Right, I have decided. I have given my word as a nobleman to reward you for your efforts in retrieving my armour.").also { stage++ }
|
||||||
|
// it is authentic that the previous line ends in a period and the next line starts with a non-capital 'but'
|
||||||
|
9 -> npcl(FacialExpression.FRIENDLY, "but I must also compensate Jones for this terrible slander you have made against him.").also { stage++ }
|
||||||
|
10 -> {
|
||||||
|
sendDialogue(player, "Sir Ceril gives you 5 gold. Sir Ceril gives Jones 1995 gold.")
|
||||||
|
addItemOrDrop(player, Items.COINS_995, 5)
|
||||||
|
stage++
|
||||||
|
}
|
||||||
|
11 -> npcl(FacialExpression.ANGRY, "Now take it and leave you scoundrel! And don't darken my doorstep again!").also { stage++ }
|
||||||
|
12 -> sendNPCDialogue(player, NPCs.BUTLER_JONES_890, "Don't worry m'lud, this fool won't be bothering us any more.").also { stage++ }
|
||||||
|
13 -> sendDialogue(player, "Jones smirks at you. You are going to need more than words to prove Jones' treachery.").also { stage++ }
|
||||||
|
14 -> {
|
||||||
|
end()
|
||||||
|
removeItem(player, Items.CARNILLEAN_ARMOUR_2405)
|
||||||
|
setQuestStage(player, Quests.HAZEEL_CULT, 5)
|
||||||
|
fakeFinish(player)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 5 - either returning the armour, or finding the scroll
|
||||||
|
(questStage == 5 && carnilleanArc(player)) -> when (stage) {
|
||||||
|
// The ceril-jones-player dialogue is continued in the listener for the wardrobe where the player finds the evidence that Jones is bad.
|
||||||
|
0 -> npcl(FacialExpression.ANGRY, "Leave, you scoundrel! And don't darken my doorstep again!").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 1 - after talking to ceril
|
||||||
|
// stage 2 - talk to clivet (set attr for carnillean)
|
||||||
|
// stage 2 - talk to clivet (set attr for mahjarrat)
|
||||||
|
// also covers stage 4 and 5 if you're playing the mahjarrat side
|
||||||
|
(questStage in 1..99) -> when (stage) {
|
||||||
|
0 -> playerl(FacialExpression.FRIENDLY, "Hello, Ceril.").also { stage++ }
|
||||||
|
1 -> npcl(FacialExpression.ANNOYED, "That's Sir Ceril to you, you impudent scamp. Show a bit of respect to your betters. Now, shouldn't you be recovering my armour?").also { stage++ }
|
||||||
|
2 -> playerl(FacialExpression.FRIENDLY, "Yeah yeah, I'm on it.").also { stage++ }
|
||||||
|
3 -> npcl(FacialExpression.ANNOYED, "Good. I suggest you start with that cave south of the city, near the Clock Tower. That is where the cult is based.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 100 - quest complete - either presenting proof that jones is a bad guy (duh) or resurrecting hazeel
|
||||||
|
(questStage == 100) -> when (stage) {
|
||||||
|
0 -> playerl(FacialExpression.FRIENDLY, "Hello, Ceril.").also { stage++ }
|
||||||
|
1 -> {
|
||||||
|
if (mahjarratArc(player)) {
|
||||||
|
npcl(FacialExpression.FRIENDLY, "Oh... I may be wrong... but ever since I asked for your help, things around here have gone from bad to worse...").also { stage = 3 }
|
||||||
|
} else {
|
||||||
|
npcl(FacialExpression.FRIENDLY, "Well hello again adventurer! It's good to see you again! If it wasn't for your quick thinking the treacherous Jones would have poisoned my family and me by now! We are in your debt.").also { stage = 2 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
2 -> playerl(FacialExpression.FRIENDLY, "Don't worry about it, a good deed is its own reward. And that 2000 gold didn't hurt either.").also { stage = END_DIALOGUE }
|
||||||
|
|
||||||
|
3 -> npcl(FacialExpression.NEUTRAL, "I think you'd better keep out of my way. And for the last time, it's Sir Ceril! Sir! It's not that hard to blooming remember!").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray = intArrayOf(NPCs.CERIL_CARNILLEAN_885)
|
||||||
|
}
|
||||||
+56
@@ -0,0 +1,56 @@
|
|||||||
|
package content.region.kandarin.ardougne.quest.hazeelcult
|
||||||
|
|
||||||
|
import content.data.Quests
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCult.Companion.mahjarratArc
|
||||||
|
import core.api.*
|
||||||
|
import core.game.dialogue.DialoguePlugin
|
||||||
|
import core.game.dialogue.FacialExpression
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.plugin.Initializable
|
||||||
|
import core.tools.END_DIALOGUE
|
||||||
|
import org.rs09.consts.*
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class ClausTheChefDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
|
||||||
|
override fun handle(componentID: Int, buttonID: Int): Boolean {
|
||||||
|
val questStage = getQuestStage(player!!, Quests.HAZEEL_CULT)
|
||||||
|
when {
|
||||||
|
|
||||||
|
// stage 0 - unstarted
|
||||||
|
// stage 1 - after talking to ceril
|
||||||
|
// stage 2 - talk to clivet (set attr for carnillean)
|
||||||
|
// stage 2 - talk to clivet (set attr for mahjarrat)
|
||||||
|
// stage 3 - poison poured in food (mahjarrat-only stage)
|
||||||
|
// stage 4 - alomone either fought or he tells you he needs scroll
|
||||||
|
// stage 5 - either returning the armour, or finding the scroll
|
||||||
|
(questStage in 0..99) -> {
|
||||||
|
when (stage) {
|
||||||
|
0 -> playerl(FacialExpression.FRIENDLY, "Hello there.").also { stage++ }
|
||||||
|
1 -> npcl(FacialExpression.FRIENDLY, "Sorry, can't stop to chat! You would be amazed at how many meals this family gets through daily!").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 100 - quest complete - either presenting proof that jones is a bad guy (duh) or resurrecting hazeel
|
||||||
|
(questStage == 100) -> {
|
||||||
|
when (stage) {
|
||||||
|
0 -> {
|
||||||
|
if (mahjarratArc(player)) {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Hey.").also { stage++ }
|
||||||
|
} else {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Hiya.").also { stage = 2 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
1 -> npcl(FacialExpression.NEUTRAL, "Oh, hello there. Sorry, but I can't really talk right now. Things haven't been great here recently, and I have a lot of work to do.").also { stage = END_DIALOGUE }
|
||||||
|
|
||||||
|
2 -> npcl(FacialExpression.HALF_ASKING, "Well hello there adventurer! Are we fit and well?").also { stage++ }
|
||||||
|
3 -> playerl(FacialExpression.FRIENDLY, "Yep, fine thanks.").also { stage++ }
|
||||||
|
4 -> npcl(FacialExpression.FRIENDLY, "Glad to hear it.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray = intArrayOf(NPCs.CLAUS_THE_CHEF_886)
|
||||||
|
}
|
||||||
@@ -0,0 +1,162 @@
|
|||||||
|
package content.region.kandarin.ardougne.quest.hazeelcult
|
||||||
|
|
||||||
|
import content.data.Quests
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCult.Companion.mahjarratArc
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCultListeners.Companion.attrCarnillean
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCultListeners.Companion.attrHazeel
|
||||||
|
import core.api.*
|
||||||
|
import core.game.dialogue.DialoguePlugin
|
||||||
|
import core.game.dialogue.FacialExpression
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.plugin.Initializable
|
||||||
|
import core.tools.END_DIALOGUE
|
||||||
|
import org.rs09.consts.*
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class ClivetDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
|
||||||
|
override fun handle(componentID: Int, buttonID: Int, ): Boolean {
|
||||||
|
|
||||||
|
val questStage = getQuestStage(player!!, Quests.HAZEEL_CULT)
|
||||||
|
|
||||||
|
when {
|
||||||
|
// stage 0 - unstarted
|
||||||
|
(questStage == 0) -> when (stage) {
|
||||||
|
0 -> npcl(FacialExpression.ANNOYED, "What do you want traveller?").also { stage++ }
|
||||||
|
1 -> playerl(FacialExpression.ANNOYED, "Just passing by.").also { stage++ }
|
||||||
|
2 -> npcl(FacialExpression.ANNOYED, "You have no business here.").also { stage++ }
|
||||||
|
3 -> npcl(FacialExpression.ANGRY, "Leave...now").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 1 - after talking to ceril
|
||||||
|
(questStage == 1) -> when (stage) {
|
||||||
|
0 -> playerl(FacialExpression.ANNOYED, "Do you know the Carnilleans?").also { stage++ }
|
||||||
|
1 -> npcl(FacialExpression.ANNOYED, "You mind your business, I'll mind mine.").also { stage++ }
|
||||||
|
2 -> playerl(FacialExpression.ANNOYED, "Look I KNOW you're hiding something. I've heard there's a cult hideout down here.").also { stage++ }
|
||||||
|
3 -> npcl(FacialExpression.ANGRY, "If you want to stay healthy you'll leave now.").also { stage++ }
|
||||||
|
4 -> playerl(FacialExpression.ANNOYED, "I have my orders.").also { stage++ }
|
||||||
|
5 -> npcl(FacialExpression.HALF_ASKING, "So... that two faced cold hearted snob has made you fall for his propaganda eh?").also { stage++ }
|
||||||
|
6 -> playerl(FacialExpression.FRIENDLY, "Sir Ceril Carnillean is a man of honour!").also { stage++ }
|
||||||
|
7 -> npcl(FacialExpression.ANNOYED, "Is he now? Is he REALLY? There is a lot more to the Carnilleans than meets the eye you fool...").also { stage++ }
|
||||||
|
8 -> npcl(FacialExpression.ANNOYED, "And none of it is honourable.").also { stage++ }
|
||||||
|
9 -> options("What do you mean?", "I've heard enough of your rubbish.").also { stage++ }
|
||||||
|
10 -> when (buttonID) {
|
||||||
|
1 -> playerl(FacialExpression.HALF_ASKING, "What do you mean?").also { stage++ }
|
||||||
|
2 -> playerl(FacialExpression.ANNOYED, "I've heard enough of your rubbish.").also { stage = 22 }
|
||||||
|
}
|
||||||
|
11 -> npcl(FacialExpression.ANNOYED, "The Carnillean home does not belong to them. The builder of the house was Lord Hazeel, one of the Mahjarrat followers of Zamorak. Many years ago there was a civil war").also { stage++ }
|
||||||
|
12 -> npcl(FacialExpression.ANNOYED, "in this land, and the hateful Saradominists declared war upon all Zamorakians who lived here. Lord Hazeel nobly would not repent his beliefs, and the Carnilleans harassed").also { stage++ }
|
||||||
|
13 -> npcl(FacialExpression.ANNOYED, "Hazeel and his followers for many decades. One fateful night, under cover of darkness, they stormed his home in an angry mob torturing and butchering all loyal").also { stage++ }
|
||||||
|
14 -> npcl(FacialExpression.ANNOYED, "Zamorakians they encountered inside. The following morning, the Carnillean forefathers moved into the empty household and claimed it as their own.").also { stage++ }
|
||||||
|
15 -> npcl(FacialExpression.ANNOYED, "They have grown fat on the hard work of Lord Hazeel ever since. Unluckily for them Lord Hazeel as a Mahjarrat had access to powers and enchantments they knew nothing").also { stage++ }
|
||||||
|
16 -> npcl(FacialExpression.ANNOYED, "about, and made preparations for his return when first they began to storm his home. Soon the day will come when he will return to wreak his vengeance upon the thieves!").also { stage++ }
|
||||||
|
17 -> playerl(FacialExpression.ANNOYED, "The politics and histories of Ardougne do not concern me. I have been given a job and intend to see it through to the end.").also { stage++ }
|
||||||
|
18 -> npcl(FacialExpression.ANNOYED, "Well then friend, perhaps I can offer you a different job then? Sooner as later Our master WILL return to this land; those faithful to him will be well rewarded.").also { stage++ }
|
||||||
|
19 -> npcl(FacialExpression.ANNOYED, "Join our cult and assist us in his restoration, and you will be well rewarded; try and prevent his return and suffer the wrath of Zamorak and the Mahjarrat.").also { stage++ }
|
||||||
|
20 -> options("You're crazy, I'd never help you.", "So what would I have to do?").also { stage++ }
|
||||||
|
21 -> when (buttonID) {
|
||||||
|
1 -> playerl(FacialExpression.DISGUSTED_HEAD_SHAKE, "You're crazy, I'd never help you.").also { stage++ }
|
||||||
|
2 -> playerl(FacialExpression.HALF_ASKING, "So what would I have to do?").also { stage = 40 }
|
||||||
|
}
|
||||||
|
|
||||||
|
// SET CARNILLEAN ARC
|
||||||
|
22 -> npcl(FacialExpression.ANNOYED, "Then you are a fool. Go back to your small minded mundane little life; you will never know the glories you could have tasted as one of us!").also { stage++ }
|
||||||
|
23 -> {
|
||||||
|
end()
|
||||||
|
setAttribute(player, attrCarnillean, true)
|
||||||
|
setQuestStage(player, Quests.HAZEEL_CULT, 2)
|
||||||
|
runTask(player, 1) {
|
||||||
|
npc.isInvisible = true
|
||||||
|
sendDialogue(player, "The man jumps onto the raft and pushes off down into the sewer system.")
|
||||||
|
sendMessage(player, "Clivet: You'll never find us...")
|
||||||
|
stage = END_DIALOGUE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// SET MAHJARRAT ARC
|
||||||
|
40 -> npcl(FacialExpression.NEUTRAL, "You must prove your loyalty to our cause. Killing one of the Carnillean household should be sufficient proof of your dedication to resurrecting our master Lord Hazeel.").also { stage++ }
|
||||||
|
41 -> npcl(FacialExpression.NEUTRAL, "So what say you adventurer? Join our side against the Carnillean thieves?").also { stage++ }
|
||||||
|
42 -> options("No. I won't do it.", "Ok, count me in.").also { stage++ }
|
||||||
|
43 -> when (buttonID) {
|
||||||
|
1 -> playerl(FacialExpression.DISGUSTED_HEAD_SHAKE, "No. I won't do it.").also { stage = 22 }
|
||||||
|
2 -> playerl(FacialExpression.NEUTRAL, "Ok, count me in.").also { stage++ }
|
||||||
|
}
|
||||||
|
44 -> npcl(FacialExpression.NEUTRAL, "Excellent. It takes a rare character to see through the cursed Carnillean lies. I can see you are a person of exactly the right character to join the followers of Hazeel.").also { stage++ }
|
||||||
|
45 -> npcl(FacialExpression.NEUTRAL, "Here, take this poison. Pour it into their food, and once the deed is done, return here and speak to me once more.").also { stage++ }
|
||||||
|
46 -> {
|
||||||
|
end()
|
||||||
|
setAttribute(player, attrHazeel, true)
|
||||||
|
setQuestStage(player, Quests.HAZEEL_CULT, 2)
|
||||||
|
addItemOrDrop(player, Items.POISON_273)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 2 - talk to clivet (set attr for carnillean)
|
||||||
|
// stage 2 - talk to clivet (set attr for mahjarrat)
|
||||||
|
(questStage == 2) -> when (stage) {
|
||||||
|
0 -> {
|
||||||
|
if (mahjarratArc(player) && !inInventory(player, Items.POISON_273)) {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "I need some more poison.").also { stage++ }
|
||||||
|
} else if (mahjarratArc(player) && inInventory(player, Items.POISON_273)){
|
||||||
|
npcl(FacialExpression.FRIENDLY, "You have a mission for us, adventurer. Go to the Carnilliean household and poison Ceril Carnillean's meal to prove your loyalty.").also { stage = END_DIALOGUE }
|
||||||
|
} else {
|
||||||
|
playerl(FacialExpression.HALF_ASKING, "WHERE is the cult hideout?").also { stage = 3 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
1 -> npcl(FacialExpression.ANNOYED, "Fool! Be more careful with it this time.").also { stage++ }
|
||||||
|
2 -> {
|
||||||
|
end()
|
||||||
|
addItemOrDrop(player, Items.POISON_273)
|
||||||
|
}
|
||||||
|
3 -> npcl(FacialExpression.ANNOYED, "You're more of a fool than you look if you think you will ever find it. When Lord Hazeel is revived you will be the first to grovel for his mercy!").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 3 - poison poured in food (mahjarrat-only stage)
|
||||||
|
(questStage == 3 && mahjarratArc(player)) -> when (stage) {
|
||||||
|
0 -> {
|
||||||
|
if (!inEquipmentOrInventory(player, Items.HAZEELS_MARK_2406)) {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "I poured the poison into the Carnillean's meal as requested. It didn't quite go to plan however.").also { stage++ }
|
||||||
|
} else {
|
||||||
|
playerl(FacialExpression.HALF_ASKING, "What was I supposed to do again?").also { stage = 6 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
1 -> npcl(FacialExpression.NEUTRAL, "Yes, we heard all about it from one of our sources. Hazeel has eyes everywhere! You have now proved your loyalty and will be rewarded when Hazeel is revived!").also { stage++ }
|
||||||
|
2 -> playerl(FacialExpression.HALF_ASKING, "Ok. So what's next?").also { stage++ }
|
||||||
|
3 -> npcl(FacialExpression.NEUTRAL, "Here. Wear this amulet; it is called The Sign of Hazeel. Not only will it identify you as one of our brotherhood to other followers but it is also the key to finding our hideout.").also { addItemOrDrop(player, Items.HAZEELS_MARK_2406) }.also { stage++ }
|
||||||
|
4 -> playerl(FacialExpression.NEUTRAL, "How does this amulet help do that then?").also { stage++ }
|
||||||
|
5 -> npcl(FacialExpression.NEUTRAL, "Hazeel in his wisdom when he built this lair did so by making it inaccessible unless the flow of the sewers is controlled exactly by the sewer valves above ground.").also { stage++ }
|
||||||
|
6 -> npcl(FacialExpression.NEUTRAL, "Each sewer valve must be correctly set before the water level is such that you may enter. The secret of the correct settings is contained in these amulets which honour him.").also { stage++ }
|
||||||
|
7 -> npcl(FacialExpression.NEUTRAL, "Starting from left to right, follow the design of the amulet to locate each sewer valve, and then turn each so as to follow the amulet design.").also { stage++ }
|
||||||
|
8 -> npcl(FacialExpression.NEUTRAL, "When you solve the sequence you may enter our hideout where our leader, Alomone, awaits you.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 4 - alomone either fought or he tells you he needs scroll
|
||||||
|
// stage 5 - either returning the armour, or finding the scroll
|
||||||
|
// stage 100 - quest complete - either presenting proof that jones is a bad guy (duh) or resurrecting hazeel
|
||||||
|
(questStage in 4..100) -> when (stage) {
|
||||||
|
0 -> {
|
||||||
|
if (mahjarratArc(player)) {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Hello.").also { stage++ }
|
||||||
|
} else {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 4 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
1 -> npcl(FacialExpression.FRIENDLY, "It is good to see you once more, adventurer. Glory to Hazeel!").also { stage++ }
|
||||||
|
2 -> {
|
||||||
|
// if player doesn't have hazeel's mark they can get a new copy.
|
||||||
|
if (hasAnItem(player, Items.HAZEELS_MARK_2406).container == null) {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "I've lost my Mark of Hazeel.").also { stage++ }
|
||||||
|
} else {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Glory to Hazeel!").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
3 -> npcl(FacialExpression.ANNOYED, "Here, take this.").also { addItemOrDrop(player, Items.HAZEELS_MARK_2406) }.also { stage = END_DIALOGUE }
|
||||||
|
|
||||||
|
4 -> npcl(FacialExpression.ANNOYED, "You may have won this battle meddler, but the war rages on. Go bother some goblins or something, for when Hazeel returns your destruction is assured.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray = intArrayOf(NPCs.CLIVET_893)
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package content.region.kandarin.ardougne.quest.hazeelcult
|
||||||
|
|
||||||
|
import core.api.*
|
||||||
|
import core.game.node.entity.npc.AbstractNPC
|
||||||
|
import core.game.world.map.Location
|
||||||
|
import core.plugin.Initializable
|
||||||
|
import org.rs09.consts.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clivet disappears briefly during the Hazeel Cult quest.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class ClivetNPC(id: Int = 0, location: Location? = null, ) : AbstractNPC(id, location) {
|
||||||
|
override fun construct(id: Int, location: Location, vararg objects: Any, ): AbstractNPC = ClivetNPC(id, location)
|
||||||
|
|
||||||
|
override fun getIds(): IntArray = intArrayOf(NPCs.CLIVET_893)
|
||||||
|
|
||||||
|
private var invisibilityTimerRunning = false
|
||||||
|
|
||||||
|
override fun tick() {
|
||||||
|
|
||||||
|
if (isInvisible && !invisibilityTimerRunning) {
|
||||||
|
invisibilityTimerRunning = true
|
||||||
|
|
||||||
|
runTask(this, 20) {
|
||||||
|
isInvisible = false
|
||||||
|
invisibilityTimerRunning = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
super.tick()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package content.region.kandarin.ardougne.quest.hazeelcult
|
||||||
|
|
||||||
|
import content.data.Quests
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCult.Companion.mahjarratArc
|
||||||
|
import core.api.getQuestStage
|
||||||
|
import core.game.dialogue.DialoguePlugin
|
||||||
|
import core.game.dialogue.FacialExpression
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.plugin.Initializable
|
||||||
|
import core.tools.END_DIALOGUE
|
||||||
|
import org.rs09.consts.*
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class GuardHCDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
|
||||||
|
override fun handle(componentID: Int, buttonID: Int): Boolean {
|
||||||
|
val questStage = getQuestStage(player!!, Quests.HAZEEL_CULT)
|
||||||
|
|
||||||
|
when {
|
||||||
|
// stage 0 - unstarted
|
||||||
|
(questStage == 0) -> {
|
||||||
|
when (stage) {
|
||||||
|
0 -> playerl(FacialExpression.FRIENDLY, "Hello.").also { stage++ }
|
||||||
|
1 -> npcl(FacialExpression.FRIENDLY, "Hello. If you've come to admire the Carnillean family home, I must warn you not to cause any trouble.").also { stage++ }
|
||||||
|
2 -> npcl(FacialExpression.FRIENDLY, "Due to recent criminal activities against such a prominent member of Ardougnian politics, I have been sent here on special guard duty to ensure the Carnilleans' security.").also { stage++ }
|
||||||
|
3 -> npcl(FacialExpression.FRIENDLY, "Anyone caught interfering with the person or possessions of said Carnilleans will be taken to jail so quickly that their feet won't touch the floor!").also { stage++ }
|
||||||
|
4 -> playerl(FacialExpression.FRIENDLY, "Well, I wasn't actually planning on doing anything like that...").also { stage++ }
|
||||||
|
5 -> npcl(FacialExpression.FRIENDLY, "Glad to hear it. Let's keep it that way, hmmm?").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 3 - poison poured in food (mahjarrat-only stage)
|
||||||
|
(questStage == 3) -> {
|
||||||
|
when (stage) {
|
||||||
|
0 -> npcl(FacialExpression.SAD, "Today is a dark day. Those cultists have been back, and this time they've gone further than ever before! Murder! We can't afford to keep letting them get away with this.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 1 - after talking to ceril
|
||||||
|
// stage 2 - talk to clivet (set attr for carnillean)
|
||||||
|
// stage 2 - talk to clivet (set attr for mahjarrat)
|
||||||
|
// stage 4 - alomone either fought or he tells you he needs scroll
|
||||||
|
// stage 5 - either returning the armour, or finding the scroll
|
||||||
|
(questStage in 1..99) -> {
|
||||||
|
when (stage) {
|
||||||
|
0 -> playerl(FacialExpression.FRIENDLY, "Hello there.").also { stage++ }
|
||||||
|
1 -> npcl(FacialExpression.FRIENDLY, "Hello there. I hear you're after that cult who broke in the other night. It always gladdens me when civilians assist the law like this.").also { stage++ }
|
||||||
|
2 -> playerl(FacialExpression.FRIENDLY, "I'm just happy to be of help.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 100 - quest complete - either presenting proof that jones is a bad guy (duh) or resurrecting hazeel
|
||||||
|
(questStage == 100) -> when (stage) {
|
||||||
|
0 -> {
|
||||||
|
if (mahjarratArc(player)) {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Hello there.").also { stage = 1 }
|
||||||
|
} else {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 6 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
1 -> npcl(FacialExpression.NEUTRAL, "Hello, adventurer. It's a shame you never found that cult. We have a horrible suspicion that there's been another burglary.").also { stage++ }
|
||||||
|
2 -> playerl(FacialExpression.NEUTRAL, "That's worrying.").also { stage++ }
|
||||||
|
3 -> npcl(FacialExpression.NEUTRAL, "Yes, it is. The thing is, we can't even work out what they've taken! It's all very odd.").also { stage++ }
|
||||||
|
4 -> playerl(FacialExpression.HALF_ASKING, "Is there anything more I can do to help?").also { stage++ }
|
||||||
|
5 -> npcl(FacialExpression.NEUTRAL, "I don't think so. Sir Ceril says you've done enough.").also { stage = END_DIALOGUE }
|
||||||
|
|
||||||
|
6 -> npcl(FacialExpression.ANNOYED, "Well well well... if it isn't our very own local hero. Good to see you managed to clear your name. I always had faith in you!").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray = intArrayOf(NPCs.GUARD_887)
|
||||||
|
}
|
||||||
@@ -0,0 +1,198 @@
|
|||||||
|
package content.region.kandarin.ardougne.quest.hazeelcult
|
||||||
|
|
||||||
|
import content.data.Quests
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCultListeners.Companion.HAZEEL_CULT_VARP
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCultListeners.Companion.attrCarnillean
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCultListeners.Companion.attrHazeel
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCultListeners.Companion.attrSewer1R
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCultListeners.Companion.attrSewer2R
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCultListeners.Companion.attrSewer3L
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCultListeners.Companion.attrSewer4R
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCultListeners.Companion.attrSewer5R
|
||||||
|
import core.api.*
|
||||||
|
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
|
||||||
|
|
||||||
|
/* HAZEEL CULT
|
||||||
|
*
|
||||||
|
* Primary video source: https://www.youtube.com/watch?v=hFBJx_xERQ4 (carnillean playthrough)
|
||||||
|
* Primary video source: https://www.youtube.com/watch?v=ZYPB823IyRk (mahjarrat playthrough)
|
||||||
|
* https://web.archive.org/web/20081217064620/http://runescape.salmoneus.net/quests/HazeelCult.html
|
||||||
|
* https://web.archive.org/web/20090121182721/http://runehq.com/guide.php?type=quest&id=00297
|
||||||
|
* https://runescape.wiki/w/Hazeel_Cult?oldid=815270
|
||||||
|
*
|
||||||
|
* Varp 223 - Hazeel Cult progress
|
||||||
|
* https://chisel.weirdgloop.org/varbs/display?varplayer=223
|
||||||
|
* Values Stage Description
|
||||||
|
* 0 0 unstarted
|
||||||
|
* 2 1 after talking to ceril
|
||||||
|
* 3 2 talk to clivet (set attr for carnillean)
|
||||||
|
* 4 2 talk to clivet (set attr for mahjarrat)
|
||||||
|
* 5 3 poison poured in food (mahjarrat-only stage)
|
||||||
|
* 6 4 alomone either fought or he tells you he needs scroll
|
||||||
|
* 7 5 either returning the armour, or finding the scroll
|
||||||
|
* 9 100 quest complete - either presenting proof that jones is a bad guy (duh) or resurrecting hazeel
|
||||||
|
*
|
||||||
|
* The varp values just appear to track quest stages, so I don't update the varp at intermediate quest stages.
|
||||||
|
*
|
||||||
|
* Good source of half the quest log: https://youtu.be/Kf95y-YdviA?si=kWeA-8oa-22TttE4&t=140
|
||||||
|
*
|
||||||
|
* Original framework of the quest and about half the dialogue is credit to szumaster.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class HazeelCult : Quest(Quests.HAZEEL_CULT, 74, 73, 1, HAZEEL_CULT_VARP, 0, 1, 9) {
|
||||||
|
|
||||||
|
// These functions are used at various points to check whether the player is following the Carnillean's side, or Hazeel's.
|
||||||
|
companion object {
|
||||||
|
fun carnilleanArc(player: Player) : Boolean {
|
||||||
|
return (!getAttribute(player, attrHazeel, false) && getAttribute(player, attrCarnillean, false))
|
||||||
|
}
|
||||||
|
|
||||||
|
fun mahjarratArc(player: Player) : Boolean {
|
||||||
|
return (getAttribute(player, attrHazeel, false) && !getAttribute(player, attrCarnillean, false))
|
||||||
|
}
|
||||||
|
|
||||||
|
// the fake ending where you don't prove Jones guilty yet. lol.
|
||||||
|
fun fakeFinish(player: Player) {
|
||||||
|
openInterface(player, 277)
|
||||||
|
|
||||||
|
player.packetDispatch.sendString("" + player.getQuestRepository().getPoints() + "", 277, 7)
|
||||||
|
player.packetDispatch.sendString("You have... kind of... completed the Hazeel Cult Quest!", 277, 4)
|
||||||
|
|
||||||
|
player.packetDispatch.sendItemZoomOnInterface(Items.COINS_995, 230, 277, 5)
|
||||||
|
|
||||||
|
player.packetDispatch.sendString("5 coins", 277, 10)
|
||||||
|
player.packetDispatch.sendString("", 277, 11)
|
||||||
|
player.packetDispatch.sendString("", 277, 12)
|
||||||
|
player.packetDispatch.sendString("", 277, 13)
|
||||||
|
player.packetDispatch.sendString("", 277, 14)
|
||||||
|
player.packetDispatch.sendString("", 277, 15)
|
||||||
|
player.packetDispatch.sendString("", 277, 16)
|
||||||
|
player.packetDispatch.sendString("", 277, 17)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun drawJournal(player: Player, stage: Int) {
|
||||||
|
super.drawJournal(player, stage)
|
||||||
|
var line = 11
|
||||||
|
|
||||||
|
val attributeMahjarrat = mahjarratArc(player)
|
||||||
|
val attributeCarnillean = carnilleanArc(player)
|
||||||
|
|
||||||
|
if (stage >= 0) {
|
||||||
|
line(player, "I can start the quest by talking to !!Sir Ceril Carnillean?? at", line++, stage >= 1)
|
||||||
|
line(player, "the house due !!West?? of !!Ardougne Zoo??.", line++, stage >= 1)
|
||||||
|
line++
|
||||||
|
}
|
||||||
|
if (stage >= 1) {
|
||||||
|
line(player, "I spoke to !!Sir Ceril Carnillean?? at his house and agreed to", line++, stage >= 2)
|
||||||
|
line(player, "help him !!investigate?? the theft of a !!family heirloom??.", line++, stage >= 2)
|
||||||
|
line++
|
||||||
|
}
|
||||||
|
if (stage >= 2) {
|
||||||
|
line(player, "I found a !!member of the cult?? called !!Clivet?? at the entrance", line++, stage >= 3)
|
||||||
|
line(player, "to the !!cult's hideout??, south of !!Ardougne??.", line++, stage >= 3)
|
||||||
|
line++
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --------------- *
|
||||||
|
* HAZEEL SIDE
|
||||||
|
* --------------- */
|
||||||
|
if (stage >= 3 && attributeMahjarrat && !attributeCarnillean) {
|
||||||
|
line(player, "Having decided to assist the cult in their mission to revive !!Hazeel??,", line++, stage >= 4)
|
||||||
|
line(player, "I tried to !!poison?? the !!Carnilleans?? but instead", line++, stage >= 4)
|
||||||
|
line(player, "only managed to kill their pet dog.", line++, stage >= 4)
|
||||||
|
line++
|
||||||
|
}
|
||||||
|
if (stage >= 4 && attributeMahjarrat && !attributeCarnillean) {
|
||||||
|
line(player, "I spoke to !!Clivet?? and he told me that I had failed,", line++, stage >= 5)
|
||||||
|
line(player, "but he gave me an !!amulet?? anyway.", line++, stage >= 5)
|
||||||
|
line(player, "Then I managed to take the sewer rafts to the cult hideout.", line++, stage >= 5)
|
||||||
|
line++
|
||||||
|
}
|
||||||
|
if (stage >= 5 && attributeMahjarrat && !attributeCarnillean) {
|
||||||
|
line(player, "I found the scroll needed to revive !!Hazeel?? in a", line++, stage >= 100)
|
||||||
|
line(player, "secret compartment upstairs at the !!Carnillean Mansion??.", line++, stage >= 100)
|
||||||
|
line++
|
||||||
|
}
|
||||||
|
if (stage == 100 && attributeMahjarrat && !attributeCarnillean) {
|
||||||
|
line(player, "I gave !!Alomone?? the scroll from the !!Carnillean Mansion?? and", line++, true)
|
||||||
|
line(player, "helped perform the revivification of !!Hazeel??.", line++, true)
|
||||||
|
line(player, "I was rewarded for all of my help", line++, true)
|
||||||
|
line(player, "in returning !!Hazeel?? to his followers.", line++, true)
|
||||||
|
line++
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --------------- *
|
||||||
|
* CARNILLEAN SIDE
|
||||||
|
* --------------- */
|
||||||
|
if (stage >= 2 && attributeCarnillean && !attributeMahjarrat) {
|
||||||
|
line(player, "He told me a pack of lies about the !!Carnilleans??,", line++, stage >= 4)
|
||||||
|
line(player, "then asked me to join the !!cult??. Obviously, I refused.", line++, stage >= 4)
|
||||||
|
line(player, "I was still no closer to recovering the !!missing armour??.", line++, stage >= 4)
|
||||||
|
line(player, "After speaking to him, he jumped onto a !!raft?? and headed", line++, stage >= 4)
|
||||||
|
line(player, "into the !!sewer system??. I need to find a way to follow", line++, stage >= 4)
|
||||||
|
line++
|
||||||
|
}
|
||||||
|
if (stage >= 4 && attributeCarnillean && !attributeMahjarrat) {
|
||||||
|
line(player, "I managed to enter !!the hideout??, kill the !!cult leader?? and", line++, stage >= 5)
|
||||||
|
line(player, "retrieve !!the armour??. I discovered that !!Jones the Butler??", line++, stage >= 5)
|
||||||
|
line(player, "was secretly a !!member of the cult?? and a !!traitor??.", line++, stage >= 5)
|
||||||
|
line++
|
||||||
|
}
|
||||||
|
// this stage displays a 'fake' quest ending!
|
||||||
|
// https://youtu.be/hFBJx_xERQ4?si=ft_1rZGKAHpDjind&t=648
|
||||||
|
if (stage >= 5 && attributeCarnillean && !attributeMahjarrat) {
|
||||||
|
line(player, "I returned !!the armour??, but !!Ceril?? didn't believe !!Jones was involved??", line++, stage >= 100)
|
||||||
|
line(player, "with the cult and was responsible for the theft.", line++, stage >= 100)
|
||||||
|
line++
|
||||||
|
}
|
||||||
|
if (stage == 100 && attributeCarnillean && !attributeMahjarrat) {
|
||||||
|
line(player, "I found undeniable evidence that the !!Butler?? was", line++, true)
|
||||||
|
line(player, "involved with the cult and gave it to !!Ceril??.", line++, true)
|
||||||
|
line(player, "My name was cleared and", line++, true)
|
||||||
|
line(player, "I graciously accepted the reward for all of my help.", line++, true)
|
||||||
|
line++
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --------------- *
|
||||||
|
* QUEST COMPLETE
|
||||||
|
* --------------- */
|
||||||
|
if (stage == 100) {
|
||||||
|
line(player, "<col=FF0000>QUEST COMPLETE!</col>", line, false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun finish(player: Player) {
|
||||||
|
var ln = 10
|
||||||
|
super.finish(player)
|
||||||
|
player.packetDispatch.sendItemZoomOnInterface(Items.COINS_995, 230, 277, 5)
|
||||||
|
|
||||||
|
drawReward(player, "1 Quest Point", ln++)
|
||||||
|
drawReward(player, "2,000 Coins", ln++)
|
||||||
|
drawReward(player, "1,500 Thieving XP", ln)
|
||||||
|
|
||||||
|
rewardXP(player, Skills.THIEVING, 1500.0)
|
||||||
|
addItemOrDrop(player, Items.COINS_995, 2000)
|
||||||
|
|
||||||
|
// no attributes need removing on quest completion. the sewer valves are not saved, and which quest arc you chose affects the quest journal and post-quest dialogue.
|
||||||
|
}
|
||||||
|
|
||||||
|
// use ::setqueststage 74 0 to reset quest.
|
||||||
|
override fun reset(player: Player) {
|
||||||
|
removeAttribute(player, attrSewer1R)
|
||||||
|
removeAttribute(player, attrSewer2R)
|
||||||
|
removeAttribute(player, attrSewer3L)
|
||||||
|
removeAttribute(player, attrSewer4R)
|
||||||
|
removeAttribute(player, attrSewer5R)
|
||||||
|
removeAttribute(player, attrHazeel)
|
||||||
|
removeAttribute(player, attrCarnillean)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun newInstance(`object`: Any?): Quest = this
|
||||||
|
}
|
||||||
+266
@@ -0,0 +1,266 @@
|
|||||||
|
package content.region.kandarin.ardougne.quest.hazeelcult
|
||||||
|
|
||||||
|
import content.data.Quests
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCult.Companion.carnilleanArc
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCult.Companion.mahjarratArc
|
||||||
|
import core.api.*
|
||||||
|
import core.game.dialogue.FacialExpression
|
||||||
|
import core.game.global.action.DoorActionHandler
|
||||||
|
import core.game.interaction.IntType
|
||||||
|
import core.game.interaction.InteractionListener
|
||||||
|
import core.game.world.map.Location
|
||||||
|
import org.rs09.consts.*
|
||||||
|
|
||||||
|
class HazeelCultListeners : InteractionListener {
|
||||||
|
|
||||||
|
override fun defineListeners() {
|
||||||
|
on(CLIVET_STAIRS, IntType.SCENERY, "climb-up") { player, _ ->
|
||||||
|
teleport(player, location(2586, 3237, 0))
|
||||||
|
sendMessage(player, "You climb up the stairs.")
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
on(CAVE_ENTRANCE, IntType.SCENERY, "enter") { player, _ ->
|
||||||
|
teleport(player, location(2570, 9682, 0))
|
||||||
|
sendMessage(player, "You enter the cave.")
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
on(CLIVET_RAFT, IntType.SCENERY, "board") { player, node ->
|
||||||
|
// to use the raft, you must also be at either
|
||||||
|
// Carnillean Arc Stage 2 or greater,
|
||||||
|
// Mahjarrat Arc Stage 3 with Hazeel's Mark,
|
||||||
|
// Mahjarrat Arc Stage 4 or greater
|
||||||
|
val questStage = getQuestStage(player, Quests.HAZEEL_CULT)
|
||||||
|
val questReq = if(
|
||||||
|
(carnilleanArc(player) && questStage >= 2) ||
|
||||||
|
(mahjarratArc(player) && inEquipmentOrInventory(player, Items.HAZEELS_MARK_2406) && questStage >= 3) ||
|
||||||
|
(mahjarratArc(player) && questStage >= 4)
|
||||||
|
) {true} else false
|
||||||
|
val raftUnlock = if(
|
||||||
|
getAttribute(player, attrSewer1R, false) &&
|
||||||
|
getAttribute(player, attrSewer2R, false) &&
|
||||||
|
getAttribute(player, attrSewer3L, false) &&
|
||||||
|
getAttribute(player, attrSewer4R, false) &&
|
||||||
|
getAttribute(player, attrSewer5R, false) &&
|
||||||
|
questReq
|
||||||
|
) {true} else false
|
||||||
|
|
||||||
|
|
||||||
|
// check which raft this is.
|
||||||
|
val x = node.location.x
|
||||||
|
|
||||||
|
if (x == 2567) { // raft to cultists. only use if you've turned the valves.
|
||||||
|
if (!raftUnlock) {
|
||||||
|
sendNPCDialogue(player, CLIVET_NPC, "Hey! I don't remember saying you could use that raft!", FacialExpression.ANNOYED)
|
||||||
|
} else {
|
||||||
|
teleport(player, location(2606, 9692, 0))
|
||||||
|
sendDialogue(player, "The raft washes up the sewer, past the islands until it reaches the end of the sewer passage.")
|
||||||
|
}
|
||||||
|
} else { // raft away from cultists. no check on this one since the valve attributes aren't saved.
|
||||||
|
teleport(player, location(2567, 9680, 0))
|
||||||
|
sendDialogue(player, "The raft flows back to the cave entrance.")
|
||||||
|
}
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Valve 1 - This is right across the bridge south of the Carnilleans' house. Turn it right.
|
||||||
|
* Valve 2 - This is right behind Carnilleans' house. Turn it right.
|
||||||
|
* Valve 3 - This is north of the cave. Turn it left.
|
||||||
|
* Valve 4 - This is south of the zoo's penguin cage. Turn it right.
|
||||||
|
* Valve 5 - Go southeast of the fourth valve, past the monk. Turn it right.
|
||||||
|
*
|
||||||
|
* All 4 of the below sources turn the valves in different orders. Text quest guides make no mention of needing a specific order,
|
||||||
|
* even though Clivet's bad-side dialogue makes it seem like it. For this implementation, the player needs to set each valve in the
|
||||||
|
* correct direction, order of the valves does not matter.
|
||||||
|
*
|
||||||
|
* Bad side - turns in order: https://www.youtube.com/watch?v=ZYPB823IyRk
|
||||||
|
* Good side - turns out of order: https://www.youtube.com/watch?v=OuEvnA6Cyrw
|
||||||
|
* Good side - turns out of order: https://www.youtube.com/watch?v=JG7E3uVx4rs
|
||||||
|
* Bad side - turns out of order: https://www.youtube.com/watch?v=T8JyyhDEVSg
|
||||||
|
*
|
||||||
|
* I allow the valve attributes to be set even if quest is unstarted, but getting on the raft checks the quest stage.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// valves 1, 2, 4, 5 should be turned right
|
||||||
|
on(SEWERS, IntType.SCENERY, "turn-right") { player, node ->
|
||||||
|
if (!player.location.withinDistance(node.asScenery().location, 2)) return@on true
|
||||||
|
|
||||||
|
val currentSewer = node.id
|
||||||
|
when (currentSewer) {
|
||||||
|
SEWER_1 -> setAttribute(player, attrSewer1R, true)
|
||||||
|
SEWER_2 -> setAttribute(player, attrSewer2R, true)
|
||||||
|
SEWER_3 -> removeAttribute(player, attrSewer3L)
|
||||||
|
SEWER_4 -> setAttribute(player, attrSewer4R, true)
|
||||||
|
SEWER_5 -> setAttribute(player, attrSewer5R, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
lock(player, 4)
|
||||||
|
animate(player, TURN_VALVE_ANIMATION)
|
||||||
|
sendDialogueLines(player, "You turn the large metal valve to the right. Beneath your feet you", "can hear the sudden sound of rushing water from the sewer.")
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
// valve 3 should be turned left
|
||||||
|
on(SEWERS, IntType.SCENERY, "turn-left") { player, node ->
|
||||||
|
if (!player.location.withinDistance(node.asScenery().location, 2)) return@on true
|
||||||
|
|
||||||
|
val currentSewer = node.id
|
||||||
|
when (currentSewer) {
|
||||||
|
SEWER_1 -> removeAttribute(player, attrSewer1R)
|
||||||
|
SEWER_2 -> removeAttribute(player, attrSewer2R)
|
||||||
|
SEWER_3 -> setAttribute(player, attrSewer3L, true)
|
||||||
|
SEWER_4 -> removeAttribute(player, attrSewer4R)
|
||||||
|
SEWER_5 -> removeAttribute(player, attrSewer5R)
|
||||||
|
}
|
||||||
|
|
||||||
|
lock(player, 4)
|
||||||
|
animate(player, TURN_VALVE_ANIMATION)
|
||||||
|
sendDialogueLines(player, "You turn the large metal valve to the left. Beneath your feet you", "can hear the sudden sound of rushing water from the sewer.")
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
// this wardrobe contains some poison and an amulet, used to convince ceril that jones is a baddie
|
||||||
|
on(WARDROBE, IntType.SCENERY, "search") { player, _ ->
|
||||||
|
openDialogue(player, WardrobeRevealDialogueFile())
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
// siding with Hazeel and trying to poison the Carnilleans
|
||||||
|
onUseWith(IntType.SCENERY, POISON, COOKING_RANGE) { player, _, _ ->
|
||||||
|
if (mahjarratArc(player) && removeItem(player, POISON)) {
|
||||||
|
sendDialogueLines(player, "You pour the poison into the hot pot.", "The poison dissolves into the soup.")
|
||||||
|
setQuestStage(player, Quests.HAZEEL_CULT, 3)
|
||||||
|
} else {
|
||||||
|
sendNPCDialogue(player, NPCs.CLAUS_THE_CHEF_886, "Oi - I don't want people messing around with my range!")
|
||||||
|
}
|
||||||
|
return@onUseWith true
|
||||||
|
}
|
||||||
|
|
||||||
|
// crate in the basement. they key can only be obtained in the mahjarrat arc, which locks the secret passage, chest, and hazeel scroll to that arc as well.
|
||||||
|
on(CRATE, IntType.SCENERY, "search") { player, _ ->
|
||||||
|
if (getQuestStage(player, Quests.HAZEEL_CULT) >= 1 &&
|
||||||
|
mahjarratArc(player) &&
|
||||||
|
!inInventory(player, CHEST_KEY)
|
||||||
|
) {
|
||||||
|
sendDialogue(player, "You search the crate. Under various food packages you find an old rusty key.")
|
||||||
|
addItemOrDrop(player, CHEST_KEY, 1)
|
||||||
|
} else {
|
||||||
|
sendMessage(player, "You search the crate but find nothing.")
|
||||||
|
}
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
// secret wall on the way up to retrieve the hazeel scroll
|
||||||
|
on(SECRET_PASSAGE, IntType.SCENERY, "Knock-at") { player, node ->
|
||||||
|
if (inInventory(player, CHEST_KEY) && player.location.y == 3274) {
|
||||||
|
DoorActionHandler.handleAutowalkDoor(player, node.asScenery())
|
||||||
|
sendMessage(player, "There is something odd about the wall here.")
|
||||||
|
sendMessage(player, "You find a secret passageway")
|
||||||
|
} else if (player.location.y == 3275) {
|
||||||
|
DoorActionHandler.handleAutowalkDoor(player, node.asScenery())
|
||||||
|
} else {
|
||||||
|
sendMessage(player, "Nothing interesting happens.")
|
||||||
|
}
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
// chest with hazeel scroll. unlocks with key, opens, and contains the scroll.
|
||||||
|
on(Scenery.CHEST_2856, IntType.SCENERY, "Open") { player, _ ->
|
||||||
|
sendMessage(player, "This chest is locked shut.")
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
// chest with hazeel scroll. unlocks with key, opens, and contains the scroll.
|
||||||
|
onUseWith(IntType.SCENERY, CHEST_KEY, Scenery.CHEST_2856) { player, _, _ ->
|
||||||
|
sendMessage(player, "You unlock the chest.")
|
||||||
|
animate(player, Animations.HUMAN_OPEN_CHEST_536)
|
||||||
|
addScenery(Scenery.CHEST_2857,CHEST_LOCATION, 2, 10)
|
||||||
|
removeScenery(core.game.node.scenery.Scenery(Scenery.CHEST_2856, Location(2565, 3272, 2)))
|
||||||
|
return@onUseWith true
|
||||||
|
}
|
||||||
|
|
||||||
|
// chest with hazeel scroll. unlocks with key, opens, and contains the scroll.
|
||||||
|
on(Scenery.CHEST_2857, IntType.SCENERY, "Close") { _, _ ->
|
||||||
|
addScenery(Scenery.CHEST_2856, CHEST_LOCATION, 2, 10)
|
||||||
|
removeScenery(core.game.node.scenery.Scenery(Scenery.CHEST_2857, CHEST_LOCATION))
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
// chest with hazeel scroll. unlocks with key, opens, and contains the scroll.
|
||||||
|
on(Scenery.CHEST_2857, IntType.SCENERY, "Search") { player, _ ->
|
||||||
|
val hasScroll = hasAnItem(player, HAZEEL_SCROLL).container != null
|
||||||
|
if (hasScroll) {
|
||||||
|
sendDialogue(player, "You already have the scroll from this chest.")
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
addItemOrDrop(player, HAZEEL_SCROLL, 1)
|
||||||
|
sendItemDialogue(player, HAZEEL_SCROLL, "Inside the chest you find the Scroll of Hazeel.")
|
||||||
|
setQuestStage(player, Quests.HAZEEL_CULT, 5)
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// interact locations for the sewer valves
|
||||||
|
override fun defineDestinationOverrides() {
|
||||||
|
setDest(IntType.SCENERY, intArrayOf(SEWER_1), "turn-right", "turn-left") { _, _ ->
|
||||||
|
return@setDest Location.create(2563, 3246, 0)
|
||||||
|
}
|
||||||
|
setDest(IntType.SCENERY, intArrayOf(SEWER_2), "turn-right", "turn-left") { _, _ ->
|
||||||
|
return@setDest Location.create(2571, 3263, 0)
|
||||||
|
}
|
||||||
|
setDest(IntType.SCENERY, intArrayOf(SEWER_3), "turn-right", "turn-left") { _, _ ->
|
||||||
|
return@setDest Location.create(2586, 3244, 0)
|
||||||
|
}
|
||||||
|
setDest(IntType.SCENERY, intArrayOf(SEWER_4), "turn-right", "turn-left") { _, _ ->
|
||||||
|
return@setDest Location.create(2597, 3262, 0)
|
||||||
|
}
|
||||||
|
setDest(IntType.SCENERY, intArrayOf(SEWER_5), "turn-right", "turn-left") { _, _ ->
|
||||||
|
return@setDest Location.create(2610, 3242, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
const val HAZEEL_CULT_VARP = 223
|
||||||
|
|
||||||
|
const val attrSewer1R = "quest:hazeelcult-sewer1"
|
||||||
|
const val attrSewer2R = "quest:hazeelcult-sewer2"
|
||||||
|
const val attrSewer3L = "quest:hazeelcult-sewer3"
|
||||||
|
const val attrSewer4R = "quest:hazeelcult-sewer4"
|
||||||
|
const val attrSewer5R = "quest:hazeelcult-sewer5"
|
||||||
|
|
||||||
|
const val attrHazeel = "/save:quest:hazeelcult-hazeel" // true when you agree to help Clivet
|
||||||
|
const val attrCarnillean = "/save:quest:hazeelcult-carnillean" // true when you DON'T agree to help Clivet
|
||||||
|
|
||||||
|
const val CLIVET_NPC = NPCs.CLIVET_893
|
||||||
|
const val CLIVET_RAFT = Scenery.RAFT_2849
|
||||||
|
|
||||||
|
const val CAVE_ENTRANCE = Scenery.CAVE_ENTRANCE_2852
|
||||||
|
const val CLIVET_STAIRS = Scenery.STAIRS_2853
|
||||||
|
|
||||||
|
const val HAZEEL_SCROLL = Items.HAZEEL_SCROLL_2403
|
||||||
|
|
||||||
|
const val SEWER_1 = Scenery.SEWER_VALVE_2844 // Valve 1 - This is right across the bridge south of the Carnilleans' house. Turn it right.
|
||||||
|
const val SEWER_2 = Scenery.SEWER_VALVE_2845 // Valve 2 - This is right behind Carnilleans' house. Turn it right.
|
||||||
|
const val SEWER_3 = Scenery.SEWER_VALVE_2846 // Valve 3 - This is north of the cave. Turn it left.
|
||||||
|
const val SEWER_4 = Scenery.SEWER_VALVE_2847 // Valve 4 - This is south of the zoo's penguin cage. Turn it right.
|
||||||
|
const val SEWER_5 = Scenery.SEWER_VALVE_2848 // Valve 5 - Go southeast of the fourth valve, past the monk. Turn it right.
|
||||||
|
|
||||||
|
val SEWERS = intArrayOf(SEWER_1, SEWER_2, SEWER_3, SEWER_4, SEWER_5)
|
||||||
|
|
||||||
|
const val WARDROBE = Scenery.WARDROBE_2851
|
||||||
|
|
||||||
|
const val TURN_VALVE_ANIMATION = 4861
|
||||||
|
|
||||||
|
const val CRATE = Scenery.CRATE_34585
|
||||||
|
const val CHEST_KEY = Items.CHEST_KEY_709
|
||||||
|
const val POISON = Items.POISON_273
|
||||||
|
const val COOKING_RANGE = Scenery.COOKING_RANGE_2859
|
||||||
|
|
||||||
|
const val SECRET_PASSAGE = Scenery.WALL_26940
|
||||||
|
|
||||||
|
val CHEST_LOCATION = Location(2565, 3272, 2)
|
||||||
|
}
|
||||||
|
}
|
||||||
+45
@@ -0,0 +1,45 @@
|
|||||||
|
package content.region.kandarin.ardougne.quest.hazeelcult
|
||||||
|
|
||||||
|
import content.data.Quests
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCult.Companion.mahjarratArc
|
||||||
|
import core.api.getQuestStage
|
||||||
|
import core.game.dialogue.DialoguePlugin
|
||||||
|
import core.game.dialogue.FacialExpression
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.plugin.Initializable
|
||||||
|
import core.tools.END_DIALOGUE
|
||||||
|
import org.rs09.consts.*
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class HazeelCultistDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
|
||||||
|
override fun handle(componentID: Int, buttonID: Int, ): Boolean {
|
||||||
|
val questStage = getQuestStage(player!!, Quests.HAZEEL_CULT)
|
||||||
|
|
||||||
|
when {
|
||||||
|
(questStage in 1..99) -> when (stage) {
|
||||||
|
0 -> playerl(FacialExpression.FRIENDLY, "Hi.").also { stage++ }
|
||||||
|
1 -> npcl(FacialExpression.ANNOYED, "What? Who are you and why did you come here? It doesn't matter, leave now adventurer. While you still can.",).also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
|
||||||
|
(questStage == 100) -> when (stage) {
|
||||||
|
0 -> {
|
||||||
|
if (mahjarratArc(player)) {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 1 }
|
||||||
|
} else {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 2 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
1 -> npcl(FacialExpression.FRIENDLY, "The adventurer returns! Glory to you for your efforts in bringing about the return of Lord Hazeel!").also { stage = END_DIALOGUE }
|
||||||
|
2 -> npcl(FacialExpression.ANNOYED, "It's the meddler! The one who blew Jones' cover! I don't know why you came to this place but it is here that you will die.").also { stage++ }
|
||||||
|
3 -> {
|
||||||
|
end()
|
||||||
|
npc.attack(player)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray = intArrayOf(NPCs.HAZEEL_CULTIST_894)
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package content.region.kandarin.ardougne.quest.hazeelcult
|
||||||
|
|
||||||
|
import core.game.node.entity.npc.AbstractNPC
|
||||||
|
import core.game.world.map.Location
|
||||||
|
import core.plugin.Initializable
|
||||||
|
import org.rs09.consts.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hazeel is spawned in briefly during the Mahjarrat end of Hazeel Cult quest.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class HazeelNPC(id: Int = 0, location: Location? = null, ) : AbstractNPC(id, location) {
|
||||||
|
override fun construct(id: Int, location: Location, vararg objects: Any, ): AbstractNPC = HazeelNPC(id, location)
|
||||||
|
|
||||||
|
override fun getIds(): IntArray = intArrayOf(NPCs.HAZEEL_892)
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package content.region.kandarin.ardougne.quest.hazeelcult
|
||||||
|
|
||||||
|
import content.data.Quests
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCult.Companion.mahjarratArc
|
||||||
|
import core.api.getQuestStage
|
||||||
|
import core.game.dialogue.DialoguePlugin
|
||||||
|
import core.game.dialogue.FacialExpression
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.plugin.Initializable
|
||||||
|
import core.tools.END_DIALOGUE
|
||||||
|
import org.rs09.consts.*
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class HenryetaDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
|
||||||
|
override fun handle(componentID: Int, buttonID: Int): Boolean {
|
||||||
|
val questStage = getQuestStage(player!!, Quests.HAZEEL_CULT)
|
||||||
|
|
||||||
|
when {
|
||||||
|
// stage 3 - poison poured in food (mahjarrat-only stage)
|
||||||
|
(questStage == 3) -> {
|
||||||
|
when (stage) {
|
||||||
|
0 -> playerl(FacialExpression.FRIENDLY, "Hello. Are you okay?").also { stage++ }
|
||||||
|
1 -> npcl(FacialExpression.SAD, "No, no I am very far from OK. Those hooligans slaughtered my precious Scruffy! I shall never recover! I am emotionally scarred for life!").also { stage = END_DIALOGUE }
|
||||||
|
2 -> playerl(FacialExpression.NEUTRAL, "It WAS only a dog you know...").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 0 - unstarted
|
||||||
|
// stage 1 - after talking to ceril
|
||||||
|
// stage 2 - talk to clivet (set attr for carnillean)
|
||||||
|
// stage 2 - talk to clivet (set attr for mahjarrat)
|
||||||
|
// stage 4 - alomone either fought or he tells you he needs scroll
|
||||||
|
// stage 5 - either returning the armour, or finding the scroll
|
||||||
|
(questStage in 0..99) -> {
|
||||||
|
when (stage) {
|
||||||
|
0 -> npcl(FacialExpression.FRIENDLY, "Oh, hello. I'm afraid I'm not very presentable at the moment. I've been under incredible stress of late! It's ruining my complexion!").also { stage++ }
|
||||||
|
1 -> playerl(FacialExpression.FRIENDLY, "Why? What's wrong?").also { stage++ }
|
||||||
|
2 -> npcl(FacialExpression.FRIENDLY, "It's those awful cultists! I just don't feel safe here anymore!").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 100 - quest complete - either presenting proof that jones is a bad guy (duh) or resurrecting hazeel
|
||||||
|
(questStage == 100) -> when (stage) {
|
||||||
|
0 -> {
|
||||||
|
if (mahjarratArc(player)) {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 1 }
|
||||||
|
} else {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 3 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
1 -> npcl(FacialExpression.HALF_ASKING, "Oh, it's you. I'm very disappointed that you never found those awful cultists. You're quite useless really, aren't you?").also { stage++ }
|
||||||
|
2 -> playerl(FacialExpression.HAPPY, "Yup, I guess I am.").also { stage = END_DIALOGUE }
|
||||||
|
|
||||||
|
3 -> npcl(FacialExpression.FRIENDLY, "Hello again adventurer! Since you dealt with those horrible hooligan cultists, things have vastly improved for us around here!").also { stage++ }
|
||||||
|
4 -> playerl(FacialExpression.HAPPY, "My pleasure, Lady Henryeta.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray = intArrayOf(NPCs.HENRYETA_CARNILLEAN_889)
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
package content.region.kandarin.ardougne.quest.hazeelcult
|
||||||
|
|
||||||
|
import content.data.Quests
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCult.Companion.mahjarratArc
|
||||||
|
import core.api.getQuestStage
|
||||||
|
import core.game.dialogue.DialoguePlugin
|
||||||
|
import core.game.dialogue.FacialExpression
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.plugin.Initializable
|
||||||
|
import core.tools.END_DIALOGUE
|
||||||
|
import org.rs09.consts.*
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class PhilipeDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
|
||||||
|
override fun handle(
|
||||||
|
componentID: Int,
|
||||||
|
buttonID: Int,
|
||||||
|
): Boolean {
|
||||||
|
val questStage = getQuestStage(player!!, Quests.HAZEEL_CULT)
|
||||||
|
|
||||||
|
when {
|
||||||
|
// stage 0 - unstarted
|
||||||
|
(questStage == 0) -> {
|
||||||
|
when (stage) {
|
||||||
|
0 -> npcl(FacialExpression.CHILD_NORMAL, "Hello, how are you today?").also { stage++ }
|
||||||
|
1 -> playerl(FacialExpression.FRIENDLY, "Good thank you. And yourself?").also { stage++ }
|
||||||
|
2 -> npcl(FacialExpression.CHILD_NORMAL, "Fine and dandy.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 3 - poison poured in food (mahjarrat-only stage)
|
||||||
|
(questStage == 3) -> {
|
||||||
|
when (stage) {
|
||||||
|
0 -> playerl(FacialExpression.FRIENDLY, "Hello there.").also { stage++ }
|
||||||
|
1 -> npcl(FacialExpression.CHILD_SAD, "Someone killed Scruffy. I liked Scruffy. He never told me off.").also { stage++ }
|
||||||
|
2 -> playerl(FacialExpression.HALF_GUILTY, "Yeah... it's a real shame.").also { stage++ }
|
||||||
|
3 -> npcl(FacialExpression.CHILD_SAD, "I want my mommy.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 1 - after talking to ceril
|
||||||
|
// stage 2 - talk to clivet (set attr for carnillean)
|
||||||
|
// stage 2 - talk to clivet (set attr for mahjarrat)
|
||||||
|
// stage 4 - alomone either fought or he tells you he needs scroll
|
||||||
|
// stage 5 - either returning the armour, or finding the scroll
|
||||||
|
(questStage in 1..99) -> {
|
||||||
|
when (stage) {
|
||||||
|
0 -> npcl(FacialExpression.CHILD_NORMAL, "Mommy said you're here to kill all the nasty people that keep breaking in.").also { stage++ }
|
||||||
|
1 -> playerl(FacialExpression.FRIENDLY, "Something like that.").also { stage++ }
|
||||||
|
2 -> npcl(FacialExpression.CHILD_FRIENDLY, "Can I watch?").also { stage++ }
|
||||||
|
3 -> playerl(FacialExpression.FRIENDLY, "No!").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// stage 100 - quest complete - either presenting proof that jones is a bad guy (duh) or resurrecting hazeel
|
||||||
|
(questStage == 100) -> when (stage) {
|
||||||
|
0 -> {
|
||||||
|
if (mahjarratArc(player)) {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Hello there.").also { stage = 1 }
|
||||||
|
} else {
|
||||||
|
playerl(FacialExpression.FRIENDLY, "Hello youngster.").also { stage = 4 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
1 -> npcl(FacialExpression.CHILD_NORMAL, "What have you brought me? I want some more toys!").also { stage++ }
|
||||||
|
2 -> playerl(FacialExpression.FRIENDLY, "I'm afraid I don't have any toys.").also { stage++ }
|
||||||
|
3 -> npcl(FacialExpression.CHILD_SAD, "Toys! I want toys!").also { stage = END_DIALOGUE }
|
||||||
|
|
||||||
|
4 -> npcl(FacialExpression.CHILD_NORMAL, "Daddy says you don't like Mr. Jones. Mr. Jones is nice. He brings me toys and sweets.").also { stage++ }
|
||||||
|
5 -> playerl(FacialExpression.FRIENDLY, "Jones is a bad man, Philipe.").also { stage++ }
|
||||||
|
6 -> npcl(FacialExpression.CHILD_NORMAL, "You're a bad " + (if (player.isMale) "man" else "lady") + " I don't like you!").also { stage++ }
|
||||||
|
7 -> playerl(FacialExpression.FRIENDLY, "I'll try and console myself about that disappointment somehow.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray = intArrayOf(NPCs.PHILIPE_CARNILLEAN_888)
|
||||||
|
}
|
||||||
+81
@@ -0,0 +1,81 @@
|
|||||||
|
package content.region.kandarin.ardougne.quest.hazeelcult
|
||||||
|
|
||||||
|
import content.data.Quests
|
||||||
|
import content.region.kandarin.ardougne.quest.hazeelcult.HazeelCult.Companion.carnilleanArc
|
||||||
|
import core.api.*
|
||||||
|
import core.game.dialogue.DialogueFile
|
||||||
|
import core.game.dialogue.DialoguePlugin
|
||||||
|
import core.game.dialogue.FacialExpression
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.plugin.Initializable
|
||||||
|
import core.tools.END_DIALOGUE
|
||||||
|
import org.rs09.consts.NPCs
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This dialogue is triggered at stage 5 of Hazeel Cult during the Carnillean Arc by searching the wardrobe for evidence.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class WardrobeRevealDialogue (player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||||
|
openDialogue(player, WardrobeRevealDialogueFile())
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
override fun newInstance(player: Player): DialoguePlugin {
|
||||||
|
return WardrobeRevealDialogue(player)
|
||||||
|
}
|
||||||
|
override fun getIds(): IntArray {
|
||||||
|
return intArrayOf() // dialogue is triggered manually
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WardrobeRevealDialogueFile : DialogueFile() {
|
||||||
|
override fun handle(componentID: Int, buttonID: Int) {
|
||||||
|
val questStage = getQuestStage(player!!, Quests.HAZEEL_CULT)
|
||||||
|
when {
|
||||||
|
(questStage == 5 && carnilleanArc(player!!)) -> {
|
||||||
|
when (stage) {
|
||||||
|
// note that it's authentic for the 'wardrobe' to be referred to as 'cupboard' in the dialogue. it used to be a cupboard pre-graphical update. https://youtu.be/CH7i06Noc18?si=zAdxBNlIS92cseBR&t=606
|
||||||
|
0 -> sendDialogue(player!!, "You search the cupboard thoroughly. You find a bottle of poison and a mysterious amulet. You pass your discovery on to Ceril.").also { stage++ }
|
||||||
|
1 -> sendPlayerDialogue(player!!, "Ceril!").also { stage++ }
|
||||||
|
2 -> sendNPCDialogue(player!!, NPCs.CERIL_CARNILLEAN_885, "What do you want now you scoundrel?", FacialExpression.ANGRY).also { stage++ }
|
||||||
|
3 -> sendPlayerDialogue(player!!, "Look what I've found in the cupboard!", FacialExpression.ANGRY).also { stage++ }
|
||||||
|
4 -> sendDialogue(player!!, "You hand Ceril the bottle of poison.").also { stage++ }
|
||||||
|
5 -> sendNPCDialogue(player!!, NPCs.CERIL_CARNILLEAN_885, "I... I don't believe it! Poison! JONES!").also { stage++ }
|
||||||
|
6 -> sendNPCDialogue(player!!, NPCs.BUTLER_JONES_890, "You called m'lud?").also { stage++ }
|
||||||
|
7 -> sendNPCDialogue(player!!, NPCs.CERIL_CARNILLEAN_885, "JONES! Just WHAT is this POISON doing here???").also { stage++ }
|
||||||
|
8 -> sendNPCDialogue(player!!, NPCs.BUTLER_JONES_890, "P-p-poison??? Yeah... uh... well, hmm... Oh, it's for Killing rats.").also { stage++ } // '...for Killing...' is authentic
|
||||||
|
9 -> sendNPCDialogue(player!!, NPCs.BUTLER_JONES_890, "Yes, that's right. Killing rats. I am but a loyal butler sir.").also { stage++ }
|
||||||
|
10 -> sendNPCDialogue(player!!, NPCs.CERIL_CARNILLEAN_885, "Rats eh? Yes, fair enough. Sorry to have doubted you old boy.").also { stage++ }
|
||||||
|
11 -> sendPlayerDialogue(player!!, "Then how about this?").also { stage++ }
|
||||||
|
12 -> sendDialogue(player!!, "You show Ceril the amulet from the cupboard.").also { stage++ }
|
||||||
|
13 -> sendNPCDialogue(player!!, NPCs.CERIL_CARNILLEAN_885, "Wh-what??? I've seen this amulet before... The thieves that broke in... One of them was wearing an identical amulet! Jones! I don't believe it!").also { stage++ }
|
||||||
|
14 -> sendNPCDialogue(player!!, NPCs.CERIL_CARNILLEAN_885, "Jones! We trusted you! We took you into our home!").also { stage++ }
|
||||||
|
15 -> sendNPCDialogue(player!!, NPCs.BUTLER_JONES_890, "You senile old fool... It was all too easy! I should have killed you and your pathetic family weeks ago!", FacialExpression.ANGRY).also { stage++ }
|
||||||
|
16 -> sendNPCDialogue(player!!, NPCs.CERIL_CARNILLEAN_885, "To think we took you in and trusted you... and this is how you repay us...").also { stage++ }
|
||||||
|
17 -> sendNPCDialogue(player!!, NPCs.CERIL_CARNILLEAN_885, "GUARD!").also { stage++ }
|
||||||
|
18 -> sendDialogue(player!!, "A guard rushes into the house.").also { stage++ }
|
||||||
|
19 -> sendNPCDialogue(player!!, NPCs.CERIL_CARNILLEAN_885, "Take him away. Attempted murder and burglary.").also { stage++ }
|
||||||
|
20 -> sendNPCDialogue(player!!, NPCs.BUTLER_JONES_890, "Don't think this is the last you have heard of me Ceril. You and your family will pay dearly for this. GLORY TO HAZEEL! ALL PRAISE ZAMORAK!").also { stage++ }
|
||||||
|
21 -> sendNPCDialogue(player!!, NPCs.GUARD_887, "Now now. Come along quietly. There'll be no revenge where YOU'RE going - Port Sarim Jail.").also { stage++ }
|
||||||
|
22 -> sendNPCDialogue(player!!, NPCs.CERIL_CARNILLEAN_885, "It looks like I am indebted to you sirrah!").also { stage++ }
|
||||||
|
23 -> sendPlayerDialogue(player!!, "No problem. We all make mistakes.").also { stage++ }
|
||||||
|
24 -> sendNPCDialogue(player!!, NPCs.CERIL_CARNILLEAN_885, "But if it weren't for you... My whole family... we could have been... I apologize for my harshness before.").also { stage++ }
|
||||||
|
25 -> sendNPCDialogue(player!!, NPCs.CERIL_CARNILLEAN_885, "The very least I can do is to reward you for your noble efforts, and to offer my sincerest apologies as a Lord and a gentleman.").also { stage++ }
|
||||||
|
26 -> sendPlayerDialogue(player!!, "Thank you Lord Ceril.").also { stage++ }
|
||||||
|
27 -> sendNPCDialogue(player!!, NPCs.CERIL_CARNILLEAN_885, "No, no, thank YOU! Feel free to stop by anytime adventurer!"
|
||||||
|
).also {
|
||||||
|
end()
|
||||||
|
finishQuest(player!!, Quests.HAZEEL_CULT)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
(questStage in 0..100) -> {
|
||||||
|
when(stage) {
|
||||||
|
0 -> sendDialogue(player!!, "You search the cupboard thoroughly but find nothing of interest.").also {stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user