Implemented White Wolf Mountain & Ice Queen

This commit is contained in:
Oven Bread
2024-06-08 11:24:25 +00:00
committed by Ryan
parent 1f6b0e900f
commit d0f24afc2e
7 changed files with 154 additions and 53 deletions
@@ -0,0 +1,64 @@
package content.region.asgarnia.whitewolfmountain
import content.data.skill.SkillingTool
import core.api.*
import core.game.interaction.InteractionListener
import core.game.interaction.QueueStrength
import core.game.node.entity.skill.Skills
import org.rs09.consts.Scenery
class WhiteWolfMountainListener : InteractionListener {
override fun defineListeners() {
on(Scenery.ROCK_SLIDE_2634, SCENERY, "investigate") { player, node ->
// dtWpLjw4X0A
sendMessage(player, "These rocks contain nothing interesting.")
sendMessage(player, "They are just in the way.")
return@on true
}
on(Scenery.ROCK_SLIDE_2634, SCENERY, "mine") { player, node ->
val pickaxe = SkillingTool.getPickaxe(player)
val rockScenery = node as core.game.node.scenery.Scenery
if (getDynLevel(player, Skills.MINING) < 50) {
sendMessage(player, "You need a mining level of 50 to mine this rock slide.")
return@on true
}
if (pickaxe == null) {
sendMessage(player, "You do not have a pickaxe to use.")
return@on true
}
animate(player, pickaxe.animation)
lock(player, 6)
queueScript(player, 0, QueueStrength.SOFT) { stage: Int ->
when (stage) {
// Scenery.ROCKSLIDE_471 is the original rock.
0 -> {
replaceScenery(rockScenery, Scenery.ROCKSLIDE_472, 2)
return@queueScript delayScript(player, 2)
}
1 -> {
replaceScenery(rockScenery, Scenery.ROCKSLIDE_473, 2)
return@queueScript delayScript(player, 2)
}
2 -> {
replaceScenery(rockScenery, 476, 2)
player.walkingQueue.reset()
if (player.location.x < 2839) {
player.walkingQueue.addPath(2840, 3517)
} else {
player.walkingQueue.addPath(2837, 3518)
}
return@queueScript delayScript(player, 2)
}
else -> return@queueScript stopExecuting(player)
}
}
return@on true
}
}
}
@@ -1,59 +1,63 @@
package content.region.misc.entrana.dialogue
import core.api.addItemOrDrop
import core.api.*
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.Items
import org.rs09.consts.NPCs
/**
* @author qmqz
*/
@Initializable
class HighPriestEntranaDialogue(player: Player? = null) : DialoguePlugin(player){
override fun open(vararg args: Any?): Boolean {
npc = args[0] as NPC
if (!player.questRepository.isComplete("Heroes' Quest")) {
npc(FacialExpression.FRIENDLY, "Many greetings. Welcome to our fair island.").also { stage = 10 }
} else {
options("Have you seen a pair of ice gloves?", "Ask about Entrana").also { stage = 5 }
}
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
1 -> npcl(FacialExpression.FRIENDLY, "and devoted the island to those who wish peace for the world.").also { stage++ }
2 -> npcl(FacialExpression.FRIENDLY, "The inhabitants of this island are mostly monks who spend their time meditating on Saradomin's ways.").also { stage++ }
3 -> npcl(FacialExpression.FRIENDLY, "Of course, there are now more pilgrims to this holy site, since Saradomin defeated Zamorak in the battle of Lumbridge. It is good that so many see Saradomin's true glory!").also { stage = 99 }
5 -> when (buttonId) {
1 -> npcl(FacialExpression.FRIENDLY, "By which you mean the pair of mythical gloves you stole from the cold dead body of the Queen of the Ice?").also { stage = 20 }
2 -> npcl(FacialExpression.FRIENDLY,"You are standing on the holy island of Entrana. It was here that Saradomin first stepped upon Gielinor. In homage to Saradomin's first arrival, we have built a great church,").also { stage = 1 }
// Ice gloves were NOT reclaimable till 2017.
START_DIALOGUE -> npcl(FacialExpression.FRIENDLY, "Many greetings. Welcome to our fair island.").also {
if (inInventory(player, Items.SILVER_POT_4658) ||
inInventory(player, Items.SILVER_POT_4660) ||
inInventory(player, Items.SILVER_POT_4662) ||
inInventory(player, Items.SILVER_POT_4664) ||
inInventory(player, Items.SILVER_POT_4666)) {
stage = 6
} else {
stage = 1
}
}
1 -> npcl(FacialExpression.FRIENDLY, "You are standing on the holy island of Entrana. It was here that Saradomin first stepped upon Gielinor.").also { stage++ }
2 -> npcl(FacialExpression.FRIENDLY, "In homage to Saradomin's first arrival, we have built a great church, and devoted the island to those who wish peace for the world.").also { stage++ }
3 -> npcl(FacialExpression.FRIENDLY, "The inhabitants of this island are mostly monks who spend their time meditating on Saradomin's ways.").also { stage++ }
4 -> npcl(FacialExpression.FRIENDLY, "Of course, there are now more pilgrims to this holy site, since Saradomin defeated Zamorak in the battle of Lumbridge.").also { stage++ }
5 -> npcl(FacialExpression.FRIENDLY, "It is good that so many see Saradomin's true glory!").also { stage = END_DIALOGUE }
10 -> npc(FacialExpression.FRIENDLY, "Enjoy our stay here. May it be spiritually uplifting!").also { stage = 99 }
20 -> player(FacialExpression.SUSPICIOUS, "Er...").also { stage++ }
21 -> npcl(FacialExpression.ANNOYED, "The gloves that you acquired to aid you in plucking the Entranan firebird? Another victim of your murderous nature, I should add.").also { stage++ }
22 -> npcl(FacialExpression.ANNOYED, "The ice gloves that, from context, I would assume you have lost, if not carelessly discarded?").also { stage++ }
23 -> player(FacialExpression.FRIENDLY, "Those ice gloves, yes.").also { stage++ }
24 -> sendDialogue("The high priest of Entrana shivers as he hands you your lost ice gloves.").also {
addItemOrDrop(player, Items.ICE_GLOVES_1580, 1)
stage++
6 -> playerl(FacialExpression.FRIENDLY, "Hi, I was wondering, can you quickly bless this for me?").also { stage++ }
7 -> npc(FacialExpression.FRIENDLY, "A somewhat strange request, but I see no harm in it.", "There you go.", "May Saradomin walk with you.").also {
if (inInventory(player, Items.SILVER_POT_4658)) {
if (removeItem(player, Items.SILVER_POT_4658)) {
addItemOrDrop(player, Items.BLESSED_POT_4659)
}
} else if (inInventory(player, Items.SILVER_POT_4660)) {
if (removeItem(player, Items.SILVER_POT_4660)) {
addItemOrDrop(player, Items.BLESSED_POT_4661)
}
} else if (inInventory(player, Items.SILVER_POT_4662)) {
if (removeItem(player, Items.SILVER_POT_4662)) {
addItemOrDrop(player, Items.BLESSED_POT_4663)
}
} else if (inInventory(player, Items.SILVER_POT_4664)) {
if (removeItem(player, Items.SILVER_POT_4664)) {
addItemOrDrop(player, Items.BLESSED_POT_4665)
}
} else if (inInventory(player, Items.SILVER_POT_4666)) {
if (removeItem(player, Items.SILVER_POT_4666)) {
addItemOrDrop(player, Items.BLESSED_POT_4667)
}
}
stage = END_DIALOGUE
}
25 -> npcl(FacialExpression.ANNOYED, "One of my monks found these gloves. If only to spare this world from further carnage, I return them to you.").also { stage = 99 }
99 -> end()
}
return true
}
@@ -65,4 +69,4 @@ class HighPriestEntranaDialogue(player: Player? = null) : DialoguePlugin(player)
override fun getIds(): IntArray {
return intArrayOf(NPCs.HIGH_PRIEST_216)
}
}
}
@@ -59,6 +59,9 @@ public enum SpecialLadders implements LadderAchievementCheck {
CASTLEWARS_ZAMORAK_OUTERWALL_STAIRS_UP(Location.create(2382, 3130, 0), Location.create(2383, 3132, 0)),
CASTLEWARS_ZAMOUTER_WALL_STAIRS_DOWN(Location.create(2382, 3132, 0), Location.create(2382, 3129, 0)),
WHITE_WOLF_MOUNTAIN_FAKE_LADDER_1_UP(Location.create(2837, 9927, 0), Location.create(2837, 3527, 0)),
WHITE_WOLF_MOUNTAIN_FAKE_LADDER_2_UP(Location.create(2823, 9930, 0), Location.create(2823, 3529, 0)),
PORT_SARIM_RAT_PITS_DOWN(new Location(3018,3232,0), new Location(2962,9650,0)) {
@Override
public void checkAchievement(Player player) {
@@ -85,6 +85,9 @@ public final class MultiwayCombatZone extends MapZone {
register(new ZoneBorders(3097, 4224, 3225, 4317));
register(new ZoneBorders(3116, 5412, 3362, 5584));
register(new ZoneBorders(3078, 5520, 3123, 5552, 0));
// Ice queen
register(new ZoneBorders(2855, 9928, 2880, 9968));
registerRegion(11318); //White wolf mountain
registerRegion(11844); //Corporeal beast
registerRegion(10329);//TDS
registerRegion(13370);//Venenatis