Refactored how quests are referred to internally

Fixed numerous requirement checks for Rag and Bone Man II, The Lost Tribe, The Tourist Trap, Waterfall Quest and The Fremennik Trials
This commit is contained in:
Player Name
2025-02-09 02:37:14 +00:00
committed by Ryan
parent c03947e0b0
commit d91f77c294
577 changed files with 2634 additions and 2138 deletions
+2 -4
View File
@@ -1984,16 +1984,14 @@
"replaceId": "28518", "replaceId": "28518",
"fence": "false", "fence": "false",
"metal": "true", "metal": "true",
"autowalk": "true", "autowalk": "true"
"questRequirement": "Icthlarin's Little Helper"
}, },
{ {
"id": "28514", "id": "28514",
"replaceId": "28518", "replaceId": "28518",
"fence": "false", "fence": "false",
"metal": "true", "metal": "true",
"autowalk": "true", "autowalk": "true"
"questRequirement": "Icthlarin's Little Helper"
}, },
{ {
"id": "21065", "id": "21065",
+1 -1
View File
@@ -100,7 +100,7 @@ public enum GodBook {
* @param page the page. * @param page the page.
*/ */
public void insertPage(Player player, Item book, Item page) { public void insertPage(Player player, Item book, Item page) {
if (!hasRequirement(player, "Horror from the Deep")) if (!hasRequirement(player, Quests.HORROR_FROM_THE_DEEP))
return; return;
if (hasPage(player, book, page)) { if (hasPage(player, book, page)) {
player.sendMessage("The book already has that page."); player.sendMessage("The book already has that page.");
+158
View File
@@ -0,0 +1,158 @@
package content.data
enum class Quests(val questName: String) {
MYTHS_OF_THE_WHITE_LANDS("Myths of the White Lands"),
BLACK_KNIGHTS_FORTRESS("Black Knights' Fortress"),
COOKS_ASSISTANT("Cook's Assistant"),
DEMON_SLAYER("Demon Slayer"),
DORICS_QUEST("Doric's Quest"),
DRAGON_SLAYER("Dragon Slayer"),
ERNEST_THE_CHICKEN("Ernest the Chicken"),
GOBLIN_DIPLOMACY("Goblin Diplomacy"),
IMP_CATCHER("Imp Catcher"),
THE_KNIGHTS_SWORD("The Knight's Sword"),
PIRATES_TREASURE("Pirate's Treasure"),
PRINCE_ALI_RESCUE("Prince Ali Rescue"),
THE_RESTLESS_GHOST("The Restless Ghost"),
ROMEO_JULIET("Romeo & Juliet"),
RUNE_MYSTERIES("Rune Mysteries"),
SHEEP_SHEARER("Sheep Shearer"),
SHIELD_OF_ARRAV("Shield of Arrav"),
VAMPIRE_SLAYER("Vampire Slayer"),
WITCHS_POTION("Witch's Potion"),
ANIMAL_MAGNETISM("Animal Magnetism"),
BETWEEN_A_ROCK("Between a Rock..."),
BIG_CHOMPY_BIRD_HUNTING("Big Chompy Bird Hunting"),
BIOHAZARD("Biohazard"),
CABIN_FEVER("Cabin Fever"),
CLOCK_TOWER("Clock Tower"),
CONTACT("Contact!"),
ZOGRE_FLESH_EATERS("Zogre Flesh Eaters"),
CREATURE_OF_FENKENSTRAIN("Creature of Fenkenstrain"),
DARKNESS_OF_HALLOWVALE("Darkness of Hallowvale"),
DEATH_TO_THE_DORGESHUUN("Death to the Dorgeshuun"),
DEATH_PLATEAU("Death Plateau"),
DESERT_TREASURE("Desert Treasure"),
DEVIOUS_MINDS("Devious Minds"),
THE_DIG_SITE("The Dig Site"),
DRUIDIC_RITUAL("Druidic Ritual"),
DWARF_CANNON("Dwarf Cannon"),
EADGARS_RUSE("Eadgar's Ruse"),
EAGLES_PEAK("Eagles' Peak"),
ELEMENTAL_WORKSHOP_I("Elemental Workshop I"),
ELEMENTAL_WORKSHOP_II("Elemental Workshop II"),
ENAKHRAS_LAMENT("Enakhra's Lament"),
ENLIGHTENED_JOURNEY("Enlightened Journey"),
THE_EYES_OF_GLOUPHRIE("The Eyes of Glouphrie"),
FAIRYTALE_I_GROWING_PAINS("Fairytale I - Growing Pains"),
FAIRYTALE_II_CURE_A_QUEEN("Fairytale II - Cure a Queen"),
FAMILY_CREST("Family Crest"),
THE_FEUD("The Feud"),
FIGHT_ARENA("Fight Arena"),
FISHING_CONTEST("Fishing Contest"),
FORGETTABLE_TALE("Forgettable Tale..."),
THE_FREMENNIK_TRIALS("The Fremennik Trials"),
WATERFALL_QUEST("Waterfall Quest"),
GARDEN_OF_TRANQUILITY("Garden of Tranquility"),
GERTRUDES_CAT("Gertrude's Cat"),
GHOSTS_AHOY("Ghosts Ahoy"),
THE_GIANT_DWARF("The Giant Dwarf"),
THE_GOLEM("The Golem"),
THE_GRAND_TREE("The Grand Tree"),
THE_HAND_IN_THE_SAND("The Hand in the Sand"),
HAUNTED_MINE("Haunted Mine"),
HAZEEL_CULT("Hazeel Cult"),
HEROES_QUEST("Heroes' Quest"),
HOLY_GRAIL("Holy Grail"),
HORROR_FROM_THE_DEEP("Horror from the Deep"),
ICTHLARINS_LITTLE_HELPER("Icthlarin's Little Helper"),
IN_AID_OF_THE_MYREQUE("In Aid of the Myreque"),
IN_SEARCH_OF_THE_MYREQUE("In Search of the Myreque"),
JUNGLE_POTION("Jungle Potion"),
LEGENDS_QUEST("Legend's Quest"),
LOST_CITY("Lost City"),
THE_LOST_TRIBE("The Lost Tribe"),
LUNAR_DIPLOMACY("Lunar Diplomacy"),
MAKING_HISTORY("Making History"),
MERLINS_CRYSTAL("Merlin's Crystal"),
MONKEY_MADNESS("Monkey Madness"),
MONKS_FRIEND("Monk's Friend"),
MOUNTAIN_DAUGHTER("Mountain Daughter"),
MOURNINGS_END_PART_I("Mourning's End Part I"),
MOURNINGS_END_PART_II("Mourning's End Part II"),
MURDER_MYSTERY("Murder Mystery"),
MY_ARMS_BIG_ADVENTURE("My Arm's Big Adventure"),
NATURE_SPIRIT("Nature Spirit"),
OBSERVATORY_QUEST("Observatory Quest"),
ONE_SMALL_FAVOUR("One Small Favour"),
PLAGUE_CITY("Plague City"),
PRIEST_IN_PERIL("Priest in Peril"),
RAG_AND_BONE_MAN("Rag and Bone Man"),
RATCATCHERS("Ratcatchers"),
RECIPE_FOR_DISASTER("Recipe for Disaster"),
RECRUITMENT_DRIVE("Recruitment Drive"),
REGICIDE("Regicide"),
ROVING_ELVES("Roving Elves"),
ROYAL_TROUBLE("Royal Trouble"),
RUM_DEAL("Rum Deal"),
SCORPION_CATCHER("Scorpion Catcher"),
SEA_SLUG("Sea Slug"),
THE_SLUG_MENACE("The Slug Menace"),
SHADES_OF_MORTTON("Shades of Mort'ton"),
SHADOW_OF_THE_STORM("Shadow of the Storm"),
SHEEP_HERDER("Sheep Herder"),
SHILO_VILLAGE("Shilo Village"),
A_SOULS_BANE("A Soul's Bane"),
SPIRITS_OF_THE_ELID("Spirits of the Elid"),
SWAN_SONG("Swan Song"),
TAI_BWO_WANNAI_TRIO("Tai Bwo Wannai Trio"),
A_TAIL_OF_TWO_CATS("A Tail of Two Cats"),
TEARS_OF_GUTHIX("Tears of Guthix"),
TEMPLE_OF_IKOV("Temple of Ikov"),
THRONE_OF_MISCELLANIA("Throne of Miscellania"),
THE_TOURIST_TRAP("The Tourist Trap"),
WITCHS_HOUSE("Witch's House"),
TREE_GNOME_VILLAGE("Tree Gnome Village"),
TRIBAL_TOTEM("Tribal Totem"),
TROLL_ROMANCE("Troll Romance"),
TROLL_STRONGHOLD("Troll Stronghold"),
UNDERGROUND_PASS("Underground Pass"),
WANTED("Wanted!"),
WATCHTOWER("Watchtower"),
COLD_WAR("Cold War"),
THE_FREMENNIK_ISLES("The Fremennik Isles"),
TOWER_OF_LIFE("Tower of Life"),
THE_GREAT_BRAIN_ROBBERY("The Great Brain Robbery"),
WHAT_LIES_BELOW("What Lies Below"),
OLAFS_QUEST("Olaf's Quest"),
ANOTHER_SLICE_OF_HAM("Another Slice of H.A.M"),
DREAM_MENTOR("Dream Mentor"),
GRIM_TALES("Grim Tales"),
KINGS_RANSOM("King's Ransom"),
THE_PATH_OF_GLOUPHRIE("The Path of Glouphrie"),
BACK_TO_MY_ROOTS("Back to my Roots"),
LAND_OF_THE_GOBLINS("Land of the Goblins"),
DEALING_WITH_SCABARAS("Dealing with Scabaras"),
WOLF_WHISTLE("Wolf Whistle"),
AS_A_FIRST_RESORT("As a First Resort..."),
CATAPULT_CONSTRUCTION("Catapult Construction"),
KENNITHS_CONCERNS("Kennith's Concerns"),
LEGACY_OF_SEERGAZE("Legacy of Seergaze"),
PERILS_OF_ICE_MOUNTAIN("Perils of Ice Mountain"),
TOKTZ_KET_DILL("TokTz-Ket-Dill"),
SMOKING_KILLS("Smoking Kills"),
ROCKING_OUT("Rocking Out"),
SPIRIT_OF_SUMMER("Spirit of Summer"),
MEETING_HISTORY("Meeting History"),
ALL_FIRED_UP("All Fired Up"),
SUMMERS_END("Summer's End"),
DEFENDER_OF_VARROCK("Defender of Varrock"),
SWEPT_AWAY("Swept Away"),
WHILE_GUTHIX_SLEEPS("While Guthix Sleeps"),
IN_PYRE_NEED("In Pyre Need"),
TEST_QUEST("Test Quest");
override fun toString(): String {
return questName
}
}
@@ -30,7 +30,7 @@ class ShootingStar(var level: ShootingStarType = ShootingStarType.values().rando
"Relleka mining site" to Location.create(2682, 3700, 0), // Rellekka mining site "Relleka mining site" to Location.create(2682, 3700, 0), // Rellekka mining site
"Jatizso mine" to Location.create(2393, 3815, 0), //Jatiszo mining site (requires Fremennik Isles prereqs) "Jatizso mine" to Location.create(2393, 3815, 0), //Jatiszo mining site (requires Fremennik Isles prereqs)
"Lunar Isle mine" to Location.create(2140, 3939, 0), // Lunar Isle mine (requires Lunar Diplomacy prereqs) "Lunar Isle mine" to Location.create(2140, 3939, 0), // Lunar Isle mine (requires Lunar Diplomacy prereqs)
"Miscellania coal mine" to Location.create(2529, 3887, 0), // Miscellania coal mine (requires Fremennik Trials) "Miscellania coal mine" to Location.create(2529, 3887, 0), // Miscellania coal mine (requires The Fremennik Trials)
//"Neitiznot runite mine" to Location.create(2376, 3835, 0), // Near the Neitiznot runite mine (requires Fremennik Isles prereqs) currently inaccessible as bridge does not work //"Neitiznot runite mine" to Location.create(2376, 3835, 0), // Near the Neitiznot runite mine (requires Fremennik Isles prereqs) currently inaccessible as bridge does not work
"Ardougne mining site" to Location.create(2600, 3232, 0), // Ardougne mining site (Monastery) "Ardougne mining site" to Location.create(2600, 3232, 0), // Ardougne mining site (Monastery)
"Ardougne eastern mine" to Location.create(2706, 3334, 0), // Ardougne mining site (Legends Guild) "Ardougne eastern mine" to Location.create(2706, 3334, 0), // Ardougne mining site (Legends Guild)
@@ -12,11 +12,11 @@ import core.ServerStore.Companion.getBoolean
import core.game.dialogue.DialogueFile import core.game.dialogue.DialogueFile
import core.game.interaction.InteractionListener import core.game.interaction.InteractionListener
import core.game.interaction.IntType import core.game.interaction.IntType
import core.tools.SystemLogger
import core.game.system.command.Privilege import core.game.system.command.Privilege
import core.game.world.GameWorld import core.game.world.GameWorld
import core.tools.Log import core.tools.Log
import core.tools.secondsToTicks import core.tools.secondsToTicks
import content.data.Quests
class ShootingStarPlugin : LoginListener, InteractionListener, TickListener, Commands, StartupListener { class ShootingStarPlugin : LoginListener, InteractionListener, TickListener, Commands, StartupListener {
override fun login(player: Player) { override fun login(player: Player) {
@@ -80,17 +80,17 @@ class ShootingStarPlugin : LoginListener, InteractionListener, TickListener, Com
override fun handle(componentID: Int, buttonID: Int) { override fun handle(componentID: Int, buttonID: Int) {
fun teleportToStar(player: Player) { fun teleportToStar(player: Player) {
val condition: (p: Player) -> Boolean = when (star.location.toLowerCase()) { val condition: (p: Player) -> Boolean = when (star.location.toLowerCase()) {
"canifis bank" -> {p -> requireQuest(p, "Priest in Peril", "to access this.") } "canifis bank" -> {p -> requireQuest(p, Quests.PRIEST_IN_PERIL, "to access this.")}
//"burgh de rott bank" -> {p -> hasRequirement(p, "In Aid of the Myreque") } //disabled: crash //"burgh de rott bank" -> {p -> hasRequirement(p, Quests.IN_AID_OF_THE_MYREQUE)} //disabled: crash
"crafting guild" -> {p -> hasLevelStat(p, Skills.CRAFTING, 40) } "crafting guild" -> {p -> hasLevelStat(p, Skills.CRAFTING, 40)}
"lletya bank" -> {p -> hasRequirement(p, "Mourning's End Part I") } "lletya bank" -> {p -> hasRequirement(p, Quests.MOURNINGS_END_PART_I)}
"jatizso mine" -> {p -> hasRequirement(p, "The Fremennik Isles") } "jatizso mine" -> {p -> hasRequirement(p, Quests.THE_FREMENNIK_ISLES)}
"south crandor mining site" -> {p -> hasRequirement(p, "Dragon Slayer") } "south crandor mining site" -> {p -> hasRequirement(p, Quests.DRAGON_SLAYER)}
"shilo village mining site" -> {p -> hasRequirement(p, "Shilo Village") } "shilo village mining site" -> {p -> hasRequirement(p, Quests.SHILO_VILLAGE)}
"mos le'harmless bank" -> {p -> hasRequirement(p, "Cabin Fever") } //needs to be updated to check for completion when the quest releases; https://runescape.wiki/w/Mos_Le%27Harmless?oldid=913025 "mos le'harmless bank" -> {p -> hasRequirement(p, Quests.CABIN_FEVER)} //needs to be updated to check for completion when the quest releases; https://runescape.wiki/w/Mos_Le%27Harmless?oldid=913025
"lunar isle mine" -> {p -> hasRequirement(p, "Lunar Diplomacy") } "lunar isle mine" -> {p -> hasRequirement(p, Quests.LUNAR_DIPLOMACY)}
"miscellania coal mine" -> {p -> requireQuest(p, "The Fremennik Trials", "to access this.") } "miscellania coal mine" -> {p -> requireQuest(p, Quests.THE_FREMENNIK_TRIALS, "to access this.")}
//"neitiznot runite mine" -> {p -> hasRequirement(p, "The Fremennik Isles") } //disabled: currently not reachable //"neitiznot runite mine" -> {p -> hasRequirement(p, Quests.THE_FREMENNIK_ISLES)} //disabled: currently not reachable
else -> {_ -> true} else -> {_ -> true}
} }
if (!condition.invoke(player)) { if (!condition.invoke(player)) {
@@ -7,8 +7,6 @@ import core.api.*
import core.game.bots.* import core.game.bots.*
import core.game.ge.GrandExchange import core.game.ge.GrandExchange
import core.game.interaction.DestinationFlag import core.game.interaction.DestinationFlag
import core.game.interaction.IntType
import core.game.interaction.InteractionListeners
import core.game.interaction.MovementPulse import core.game.interaction.MovementPulse
import core.game.node.Node import core.game.node.Node
import core.game.node.entity.skill.Skills import core.game.node.entity.skill.Skills
@@ -16,6 +14,7 @@ import core.game.node.item.Item
import core.game.world.map.Location import core.game.world.map.Location
import core.game.world.map.zone.ZoneBorders import core.game.world.map.zone.ZoneBorders
import org.rs09.consts.Items import org.rs09.consts.Items
import content.data.Quests
@PlayerCompatible @PlayerCompatible
@ScriptName("Falador Cannonball Smelter") @ScriptName("Falador Cannonball Smelter")
@@ -273,6 +272,6 @@ class CannonballSmelter : Script() {
skills.put(Skills.HITPOINTS,99) skills.put(Skills.HITPOINTS,99)
skills.put(Skills.DEFENCE,99) skills.put(Skills.DEFENCE,99)
skills.put(Skills.SMITHING,35) skills.put(Skills.SMITHING,35)
quests.add("Dwarf Cannon") quests.add(Quests.DWARF_CANNON)
} }
} }
@@ -10,6 +10,7 @@ import core.plugin.Initializable
import core.plugin.Plugin import core.plugin.Plugin
import core.tools.Log import core.tools.Log
import org.rs09.consts.Sounds import org.rs09.consts.Sounds
import content.data.Quests
/** /**
* Represents the experience interface. * Represents the experience interface.
@@ -78,15 +79,15 @@ class ExperienceInterface() : ComponentPlugin() {
} }
private fun checkHerblore(player: Player): Boolean{ private fun checkHerblore(player: Player): Boolean{
return (player.questRepository.isComplete("Druidic Ritual")) return (player.questRepository.isComplete(Quests.DRUIDIC_RITUAL))
} }
private fun checkSummoning(player: Player): Boolean{ private fun checkSummoning(player: Player): Boolean{
return player.questRepository.isComplete("Wolf Whistle") return player.questRepository.isComplete(Quests.WOLF_WHISTLE)
} }
private fun checkRunecrafting(player: Player): Boolean{ private fun checkRunecrafting(player: Player): Boolean{
return player.questRepository.isComplete("Rune Mysteries") return player.questRepository.isComplete(Quests.RUNE_MYSTERIES)
} }
companion object { companion object {
@@ -10,7 +10,7 @@ import core.game.world.GameWorld
import core.game.world.map.Location import core.game.world.map.Location
import core.game.world.map.RegionManager import core.game.world.map.RegionManager
import core.tools.RandomFunction import core.tools.RandomFunction
import content.data.Quests
/** /**
* Handles the fairy ring interface * Handles the fairy ring interface
@@ -179,7 +179,7 @@ enum class FairyRing(val tile: Location?, val tip: String = "", val childId: Int
AKS(Location.create(2571, 2956, 0), "Feldip Hills: Jungle Hunter area", 25), AKS(Location.create(2571, 2956, 0), "Feldip Hills: Jungle Hunter area", 25),
ALQ(Location.create(3597, 3495, 0), "Morytania: Haunted Woods east of Canifis", 27) { ALQ(Location.create(3597, 3495, 0), "Morytania: Haunted Woods east of Canifis", 27) {
override fun checkAccess(player: Player) : Boolean { override fun checkAccess(player: Player) : Boolean {
return requireQuest(player, "Priest in Peril", "to use this ring.") return requireQuest(player, Quests.PRIEST_IN_PERIL, "to use this ring.")
} }
}, },
ALS(Location.create(2644, 3495, 0), "Kandarin: McGrubor's Wood", 29), ALS(Location.create(2644, 3495, 0), "Kandarin: McGrubor's Wood", 29),
@@ -191,7 +191,7 @@ enum class FairyRing(val tile: Location?, val tip: String = "", val childId: Int
BKQ(Location.create(3041, 4532, 0), "Other realms: Enchanted Valley", 39), BKQ(Location.create(3041, 4532, 0), "Other realms: Enchanted Valley", 39),
BKR(Location.create(3469, 3431, 0), "Morytania: Mort Myre, south of Canifis", 40) { BKR(Location.create(3469, 3431, 0), "Morytania: Mort Myre, south of Canifis", 40) {
override fun checkAccess(player: Player) : Boolean { override fun checkAccess(player: Player) : Boolean {
return requireQuest(player, "Priest in Peril", "to use this ring.") return requireQuest(player, Quests.PRIEST_IN_PERIL, "to use this ring.")
} }
}, },
BLP(Location.create(2437, 5126, 0), "Dungeons: TzHaar area", 42), BLP(Location.create(2437, 5126, 0), "Dungeons: TzHaar area", 42),
@@ -199,7 +199,7 @@ enum class FairyRing(val tile: Location?, val tip: String = "", val childId: Int
BLR(Location.create(2740, 3351, 0), "Kandarin: Legends' Guild", 44), BLR(Location.create(2740, 3351, 0), "Kandarin: Legends' Guild", 44),
CIP(Location.create(2513, 3884, 0), "Islands: Miscellania", 46) { CIP(Location.create(2513, 3884, 0), "Islands: Miscellania", 46) {
override fun checkAccess(player: Player): Boolean { override fun checkAccess(player: Player): Boolean {
return requireQuest(player, "Fremennik Trials", "to use this ring.") return requireQuest(player, Quests.THE_FREMENNIK_TRIALS, "to use this ring.")
} }
}, },
CIQ(Location.create(2528, 3127, 0), "Kandarin: North-west of Yanille", 47), CIQ(Location.create(2528, 3127, 0), "Kandarin: North-west of Yanille", 47),
@@ -208,7 +208,7 @@ enum class FairyRing(val tile: Location?, val tip: String = "", val childId: Int
CKR(Location.create(2801, 3003, 0), "Karamja: South of Tai Bwo Wannai Village", 56), CKR(Location.create(2801, 3003, 0), "Karamja: South of Tai Bwo Wannai Village", 56),
CKS(Location.create(3447, 3470, 0), "Morytania: Canifis", 57) { CKS(Location.create(3447, 3470, 0), "Morytania: Canifis", 57) {
override fun checkAccess(player: Player) : Boolean { override fun checkAccess(player: Player) : Boolean {
return requireQuest(player, "Priest in Peril", "to use this ring.") return requireQuest(player, Quests.PRIEST_IN_PERIL, "to use this ring.")
} }
}, },
CLP(Location.create(3082, 3206, 0), "Islands: South of Draynor Village", 58), CLP(Location.create(3082, 3206, 0), "Islands: South of Draynor Village", 58),
@@ -9,6 +9,7 @@ import core.plugin.Initializable;
import core.plugin.Plugin; import core.plugin.Plugin;
import static core.api.ContentAPIKt.hasRequirement; import static core.api.ContentAPIKt.hasRequirement;
import content.data.Quests;
/** /**
* Represents the prayer interface. * Represents the prayer interface.
@@ -27,7 +28,7 @@ public final class PrayerTabInterface extends ComponentPlugin {
public boolean handle(Player player, Component component, int opcode, int button, int slot, int itemId) { public boolean handle(Player player, Component component, int opcode, int button, int slot, int itemId) {
final PrayerType type = PrayerType.get(button); final PrayerType type = PrayerType.get(button);
if (type == PrayerType.CHIVALRY || type == PrayerType.PIETY) if (type == PrayerType.CHIVALRY || type == PrayerType.PIETY)
if (!hasRequirement(player, "King's Ransom")) if (!hasRequirement(player, Quests.KINGS_RANSOM))
return true; return true;
if (type == null) { if (type == null) {
return true; return true;
@@ -10,12 +10,13 @@ import kotlin.math.*
import java.util.* import java.util.*
import org.rs09.consts.* import org.rs09.consts.*
import content.data.Quests
object QuestTabUtils { object QuestTabUtils {
@JvmStatic @JvmStatic
fun showRequirementsInterface (player: Player, button: Int) { fun showRequirementsInterface(player: Player, button: Int) {
val questName = getNameForButton (button) val questName = getNameForButton(button)
val questReq = QuestRequirements.values().filter { it.questName.equals(questName, true) }.firstOrNull() ?: return val questReq = QuestRequirements.values().filter { it.quest.questName == questName }.firstOrNull() ?: return
var (isMet, unmetReqs) = QuestReq(questReq).evaluate(player) var (isMet, unmetReqs) = QuestReq(questReq).evaluate(player)
var messageList = ArrayList<String>() var messageList = ArrayList<String>()
@@ -27,7 +28,7 @@ object QuestTabUtils {
closeInterface(player) closeInterface(player)
for (req in unmetReqs) { for (req in unmetReqs) {
if (req is QuestReq) if (req is QuestReq)
questList.add(req.questReq.questName) questList.add(req.questReq.quest.questName)
else if (req is SkillReq) { else if (req is SkillReq) {
if (statMap[req.skillId] == null || (statMap[req.skillId] != null && statMap[req.skillId]!! < req.level)) if (statMap[req.skillId] == null || (statMap[req.skillId] != null && statMap[req.skillId]!! < req.level))
statMap[req.skillId] = req.level statMap[req.skillId] = req.level
@@ -82,163 +83,163 @@ object QuestTabUtils {
openInterface(player, Components.QUESTJOURNAL_SCROLL_275) openInterface(player, Components.QUESTJOURNAL_SCROLL_275)
} }
fun getNameForButton (button: Int) : String { private fun getNameForButton(button: Int) : String {
val name = when (button) { val quest = when (button) {
10 -> "Myths of the White Lands" 10 -> Quests.MYTHS_OF_THE_WHITE_LANDS.questName
11 -> "Myths of the White Lands" 11 -> Quests.MYTHS_OF_THE_WHITE_LANDS.questName
12 -> "Free Quests" 12 -> "Free Quests"
13 -> "Black Knights' Fortress" 13 -> Quests.BLACK_KNIGHTS_FORTRESS.questName
14 -> "Cook's Assistant" 14 -> Quests.COOKS_ASSISTANT.questName
15 -> "Demon Slayer" 15 -> Quests.DEMON_SLAYER.questName
16 -> "Doric's Quest" 16 -> Quests.DORICS_QUEST.questName
17 -> "Dragon Slayer" 17 -> Quests.DRAGON_SLAYER.questName
18 -> "Ernest the Chicken" 18 -> Quests.ERNEST_THE_CHICKEN.questName
19 -> "Goblin Diplomacy" 19 -> Quests.GOBLIN_DIPLOMACY.questName
20 -> "Imp Catcher" 20 -> Quests.IMP_CATCHER.questName
21 -> "The Knight's Sword" 21 -> Quests.THE_KNIGHTS_SWORD.questName
22 -> "Pirate's Treasure" 22 -> Quests.PIRATES_TREASURE.questName
23 -> "Prince Ali Rescue" 23 -> Quests.PRINCE_ALI_RESCUE.questName
24 -> "The Restless Ghost" 24 -> Quests.THE_RESTLESS_GHOST.questName
25 -> "Romeo & Juliet" 25 -> Quests.ROMEO_JULIET.questName
26 -> "Rune Mysteries" 26 -> Quests.RUNE_MYSTERIES.questName
27 -> "Sheep Shearer" 27 -> Quests.SHEEP_SHEARER.questName
28 -> "Shield of Arrav" 28 -> Quests.SHIELD_OF_ARRAV.questName
29 -> "Vampire Slayer" 29 -> Quests.VAMPIRE_SLAYER.questName
30 -> "Witch's Potion" 30 -> Quests.WITCHS_POTION.questName
31 -> "Members' Quests" 31 -> "Members' Quests"
32 -> "Animal Magnetism" 32 -> Quests.ANIMAL_MAGNETISM.questName
33 -> "Between a Rock..." 33 -> Quests.BETWEEN_A_ROCK.questName
34 -> "Big Chompy Bird Hunting" 34 -> Quests.BIG_CHOMPY_BIRD_HUNTING.questName
35 -> "Biohazard" 35 -> Quests.BIOHAZARD.questName
36 -> "Cabin Fever" 36 -> Quests.CABIN_FEVER.questName
37 -> "Clock Tower" 37 -> Quests.CLOCK_TOWER.questName
38 -> "Contact!" 38 -> Quests.CONTACT.questName
39 -> "Zogre Flesh Eaters" 39 -> Quests.ZOGRE_FLESH_EATERS.questName
40 -> "Creature of Fenkenstrain" 40 -> Quests.CREATURE_OF_FENKENSTRAIN.questName
41 -> "Darkness of Hallowvale" 41 -> Quests.DARKNESS_OF_HALLOWVALE.questName
42 -> "Death to the Dorgeshuun" 42 -> Quests.DEATH_TO_THE_DORGESHUUN.questName
43 -> "Death Plateau" 43 -> Quests.DEATH_PLATEAU.questName
44 -> "Desert Treasure" 44 -> Quests.DESERT_TREASURE.questName
45 -> "Devious Minds" 45 -> Quests.DEVIOUS_MINDS.questName
46 -> "The Dig Site" 46 -> Quests.THE_DIG_SITE.questName
47 -> "Druidic Ritual" 47 -> Quests.DRUIDIC_RITUAL.questName
48 -> "Dwarf Cannon" 48 -> Quests.DWARF_CANNON.questName
49 -> "Eadgar's Ruse" 49 -> Quests.EADGARS_RUSE.questName
50 -> "Eagles' Peak" 50 -> Quests.EAGLES_PEAK.questName
51 -> "Elemental Workshop I" 51 -> Quests.ELEMENTAL_WORKSHOP_I.questName
52 -> "Elemental Workshop II" 52 -> Quests.ELEMENTAL_WORKSHOP_II.questName
53 -> "Enakhra's Lament" 53 -> Quests.ENAKHRAS_LAMENT.questName
54 -> "Enlightened Journey" 54 -> Quests.ENLIGHTENED_JOURNEY.questName
55 -> "The Eyes of Glouphrie" 55 -> Quests.THE_EYES_OF_GLOUPHRIE.questName
56 -> "Fairytale I - Growing Pains" 56 -> Quests.FAIRYTALE_I_GROWING_PAINS.questName
57 -> "Fairytale II - Cure a Queen" 57 -> Quests.FAIRYTALE_II_CURE_A_QUEEN.questName
58 -> "Family Crest" 58 -> Quests.FAMILY_CREST.questName
59 -> "The Feud" 59 -> Quests.THE_FEUD.questName
60 -> "Fight Arena" 60 -> Quests.FIGHT_ARENA.questName
61 -> "Fishing Contest" 61 -> Quests.FISHING_CONTEST.questName
62 -> "Forgettable Tale..." 62 -> Quests.FORGETTABLE_TALE.questName
63 -> "The Fremennik Trials" 63 -> Quests.THE_FREMENNIK_TRIALS.questName
64 -> "Waterfall Quest" 64 -> Quests.WATERFALL_QUEST.questName
65 -> "Garden of Tranquillity" 65 -> Quests.GARDEN_OF_TRANQUILITY.questName
66 -> "Gertrude's Cat" 66 -> Quests.GERTRUDES_CAT.questName
67 -> "Ghosts Ahoy" 67 -> Quests.GHOSTS_AHOY.questName
68 -> "The Giant Dwarf" 68 -> Quests.THE_GIANT_DWARF.questName
69 -> "The Golem" 69 -> Quests.THE_GOLEM.questName
70 -> "The Grand Tree" 70 -> Quests.THE_GRAND_TREE.questName
71 -> "The Hand in the Sand" 71 -> Quests.THE_HAND_IN_THE_SAND.questName
72 -> "Haunted Mine" 72 -> Quests.HAUNTED_MINE.questName
73 -> "Hazeel Cult" 73 -> Quests.HAZEEL_CULT.questName
74 -> "Heroes' Quest" 74 -> Quests.HEROES_QUEST.questName
75 -> "Holy Grail" 75 -> Quests.HOLY_GRAIL.questName
76 -> "Horror from the Deep" 76 -> Quests.HORROR_FROM_THE_DEEP.questName
77 -> "Icthlarin's Little Helper" 77 -> Quests.ICTHLARINS_LITTLE_HELPER.questName
78 -> "In Aid of the Myreque" 78 -> Quests.IN_AID_OF_THE_MYREQUE.questName
79 -> "In Search of the Myreque" 79 -> Quests.IN_SEARCH_OF_THE_MYREQUE.questName
80 -> "Jungle Potion" 80 -> Quests.JUNGLE_POTION.questName
81 -> "Legend's Quest" 81 -> Quests.LEGENDS_QUEST.questName
82 -> "Lost City" 82 -> Quests.LOST_CITY.questName
83 -> "The Lost Tribe" 83 -> Quests.THE_LOST_TRIBE.questName
84 -> "Lunar Diplomacy" 84 -> Quests.LUNAR_DIPLOMACY.questName
85 -> "Making History" 85 -> Quests.MAKING_HISTORY.questName
86 -> "Merlin's Crystal" 86 -> Quests.MERLINS_CRYSTAL.questName
87 -> "Monkey Madness" 87 -> Quests.MONKEY_MADNESS.questName
88 -> "Monk's Friend" 88 -> Quests.MONKS_FRIEND.questName
89 -> "Mountain Daughter" 89 -> Quests.MOUNTAIN_DAUGHTER.questName
90 -> "Mourning's End Part I" 90 -> Quests.MOURNINGS_END_PART_I.questName
91 -> "Mourning's End Part II" 91 -> Quests.MOURNINGS_END_PART_II.questName
92 -> "Murder Mystery" 92 -> Quests.MURDER_MYSTERY.questName
93 -> "My Arm's Big Adventure" 93 -> Quests.MY_ARMS_BIG_ADVENTURE.questName
94 -> "Nature Spirit" 94 -> Quests.NATURE_SPIRIT.questName
95 -> "Observatory Quest" 95 -> Quests.OBSERVATORY_QUEST.questName
96 -> "One Small Favour" 96 -> Quests.ONE_SMALL_FAVOUR.questName
97 -> "Plague City" 97 -> Quests.PLAGUE_CITY.questName
98 -> "Priest in Peril" 98 -> Quests.PRIEST_IN_PERIL.questName
99 -> "Rag and Bone Man" 99 -> Quests.RAG_AND_BONE_MAN.questName
100 -> "Ratcatchers" 100 -> Quests.RATCATCHERS.questName
101 -> "Recipe for Disaster" 101 -> Quests.RECIPE_FOR_DISASTER.questName
102 -> "Recruitment Drive" 102 -> Quests.RECRUITMENT_DRIVE.questName
103 -> "Regicide" 103 -> Quests.REGICIDE.questName
104 -> "Roving Elves" 104 -> Quests.ROVING_ELVES.questName
105 -> "Royal Trouble" 105 -> Quests.ROYAL_TROUBLE.questName
106 -> "Rum Deal" 106 -> Quests.RUM_DEAL.questName
107 -> "Scorpion Catcher" 107 -> Quests.SCORPION_CATCHER.questName
108 -> "Sea Slug" 108 -> Quests.SEA_SLUG.questName
109 -> "The Slug Menace" 109 -> Quests.THE_SLUG_MENACE.questName
110 -> "Shades of Mort'ton" 110 -> Quests.SHADES_OF_MORTTON.questName
111 -> "Shadow of the Storm" 111 -> Quests.SHADOW_OF_THE_STORM.questName
112 -> "Sheep Herder" 112 -> Quests.SHEEP_HERDER.questName
113 -> "Shilo Village" 113 -> Quests.SHILO_VILLAGE.questName
114 -> "A Soul's Bane" 114 -> Quests.A_SOULS_BANE.questName
115 -> "Spirits of the Elid" 115 -> Quests.SPIRITS_OF_THE_ELID.questName
116 -> "Swan Song" 116 -> Quests.SWAN_SONG.questName
117 -> "Tai Bwo Wannai Trio" 117 -> Quests.TAI_BWO_WANNAI_TRIO.questName
118 -> "A Tail of Two Cats" 118 -> Quests.A_TAIL_OF_TWO_CATS.questName
119 -> "Tears of Guthix" 119 -> Quests.TEARS_OF_GUTHIX.questName
120 -> "Temple of Ikov" 120 -> Quests.TEMPLE_OF_IKOV.questName
121 -> "Throne of Miscellania" 121 -> Quests.THRONE_OF_MISCELLANIA.questName
122 -> "The Tourist Trap" 122 -> Quests.THE_TOURIST_TRAP.questName
123 -> "Witch's House" 123 -> Quests.WITCHS_HOUSE.questName
124 -> "Tree Gnome Village" 124 -> Quests.TREE_GNOME_VILLAGE.questName
125 -> "Tribal Totem" 125 -> Quests.TRIBAL_TOTEM.questName
126 -> "Troll Romance" 126 -> Quests.TROLL_ROMANCE.questName
127 -> "Troll Stronghold" 127 -> Quests.TROLL_STRONGHOLD.questName
128 -> "Underground Pass" 128 -> Quests.UNDERGROUND_PASS.questName
129 -> "Wanted!" 129 -> Quests.WANTED.questName
130 -> "Watchtower" 130 -> Quests.WATCHTOWER.questName
131 -> "Cold War" 131 -> Quests.COLD_WAR.questName
132 -> "The Fremennik Isles" 132 -> Quests.THE_FREMENNIK_ISLES.questName
133 -> "Tower of Life" 133 -> Quests.TOWER_OF_LIFE.questName
134 -> "The Great Brain Robbery" 134 -> Quests.THE_GREAT_BRAIN_ROBBERY.questName
135 -> "What Lies Below" 135 -> Quests.WHAT_LIES_BELOW.questName
136 -> "Olaf's Quest" 136 -> Quests.OLAFS_QUEST.questName
137 -> "Another Slice of H.A.M" 137 -> Quests.ANOTHER_SLICE_OF_HAM.questName
138 -> "Dream Mentor" 138 -> Quests.DREAM_MENTOR.questName
139 -> "Grim Tales" 139 -> Quests.GRIM_TALES.questName
140 -> "King's Ransom" 140 -> Quests.KINGS_RANSOM.questName
141 -> "The Path of Glouphrie" 141 -> Quests.THE_PATH_OF_GLOUPHRIE.questName
142 -> "Back to my Roots" 142 -> Quests.BACK_TO_MY_ROOTS.questName
143 -> "Land of the Goblins" 143 -> Quests.LAND_OF_THE_GOBLINS.questName
144 -> "Dealing with Scabaras" 144 -> Quests.DEALING_WITH_SCABARAS.questName
145 -> "Wolf Whistle" 145 -> Quests.WOLF_WHISTLE.questName
146 -> "As a First Resort..." 146 -> Quests.AS_A_FIRST_RESORT.questName
147 -> "Catapult Construction" 147 -> Quests.CATAPULT_CONSTRUCTION.questName
148 -> "Kennith's Concerns" 148 -> Quests.KENNITHS_CONCERNS.questName
149 -> "Legacy of Seergaze" 149 -> Quests.LEGACY_OF_SEERGAZE.questName
150 -> "Perils of Ice Mountain" 150 -> Quests.PERILS_OF_ICE_MOUNTAIN.questName
151 -> "TokTz-Ket-Dill" 151 -> Quests.TOKTZ_KET_DILL.questName
152 -> "Smoking Kills" 152 -> Quests.SMOKING_KILLS.questName
153 -> "Rocking Out" 153 -> Quests.ROCKING_OUT.questName
154 -> "Spirit of Summer" 154 -> Quests.SPIRIT_OF_SUMMER.questName
155 -> "Meeting History" 155 -> Quests.MEETING_HISTORY.questName
156 -> "All Fired Up" 156 -> Quests.ALL_FIRED_UP.questName
157 -> "Summer's End" 157 -> Quests.SUMMERS_END.questName
158 -> "Defender of Varrock" 158 -> Quests.DEFENDER_OF_VARROCK.questName
159 -> "Swept Away" 159 -> Quests.SWEPT_AWAY.questName
160 -> "While Guthix Sleeps" 160 -> Quests.WHILE_GUTHIX_SLEEPS.questName
161 -> "In Pyre Need" 161 -> Quests.IN_PYRE_NEED.questName
162 -> "Myths of the White Lands" 162 -> Quests.MYTHS_OF_THE_WHITE_LANDS.questName
else -> "" else -> ""
} }
return name return quest as String
} }
} }
@@ -13,6 +13,7 @@ import core.game.world.update.flag.context.Graphics
import org.rs09.consts.Items import org.rs09.consts.Items
import org.rs09.consts.Scenery import org.rs09.consts.Scenery
import org.rs09.consts.Sounds import org.rs09.consts.Sounds
import content.data.Quests
@Suppress("unused") @Suppress("unused")
class EctophialListener : InteractionListener { class EctophialListener : InteractionListener {
@@ -37,7 +38,7 @@ class EctophialListener : InteractionListener {
} }
on(Items.ECTOPHIAL_4251, IntType.ITEM, "empty") { player, node -> on(Items.ECTOPHIAL_4251, IntType.ITEM, "empty") { player, node ->
if (!hasRequirement(player, "Ghosts Ahoy")) if (!hasRequirement(player, Quests.GHOSTS_AHOY))
return@on true return@on true
if (player.isTeleBlocked) { if (player.isTeleBlocked) {
@@ -4,6 +4,7 @@ import core.api.*
import core.game.node.entity.player.link.quest.QuestRepository import core.game.node.entity.player.link.quest.QuestRepository
import org.rs09.consts.Items import org.rs09.consts.Items
import core.game.interaction.InteractionListener import core.game.interaction.InteractionListener
import content.data.Quests
class ItemQuestRequirementListener : InteractionListener { class ItemQuestRequirementListener : InteractionListener {
@@ -106,7 +107,7 @@ class ItemQuestRequirementListener : InteractionListener {
/* /*
onEquip(fremennikIslesEquipment) { player, _ -> onEquip(fremennikIslesEquipment) { player, _ ->
if (!isQuestComplete(player, "Fremennik Isles")) { if (!isQuestComplete(player, Quests.THE_FREMENNIK_ISLES)) {
sendMessage(player, "You must have completed The Fremennik Isles to equip this.") sendMessage(player, "You must have completed The Fremennik Isles to equip this.")
return@onEquip false return@onEquip false
} }
@@ -114,7 +115,7 @@ class ItemQuestRequirementListener : InteractionListener {
} }
onEquip(fremennikIslesDuringQuestEquipment){ player, _ -> onEquip(fremennikIslesDuringQuestEquipment){ player, _ ->
if (questStage(player, "Fremennik Isles") > 0) { if (questStage(player, Quests.THE_FREMENNIK_ISLES) > 0) {
sendMessage(player, "You must have started The Fremennik Isles to equip this.") sendMessage(player, "You must have started The Fremennik Isles to equip this.")
return@onEquip false return@onEquip false
} }
@@ -123,23 +124,23 @@ class ItemQuestRequirementListener : InteractionListener {
*/ */
onEquip(fremennikTrialsEquipment) { player, _ -> onEquip(fremennikTrialsEquipment) { player, _ ->
return@onEquip hasRequirement(player, "Fremennik Trials") return@onEquip hasRequirement(player, Quests.THE_FREMENNIK_TRIALS)
} }
onEquip(fremennikIslesEquipment) {player, _ -> onEquip(fremennikIslesEquipment) {player, _ ->
return@onEquip hasRequirement(player, "The Fremennik Isles") return@onEquip hasRequirement(player, Quests.THE_FREMENNIK_ISLES)
} }
onEquip(avasBackpacks){ player, _ -> onEquip(avasBackpacks){ player, _ ->
return@onEquip hasRequirement(player, "Animal Magnetism") return@onEquip hasRequirement(player, Quests.ANIMAL_MAGNETISM)
} }
onEquip(lostCityWeapons){ player, _ -> onEquip(lostCityWeapons){ player, _ ->
return@onEquip hasRequirement(player, "Lost City") return@onEquip hasRequirement(player, Quests.LOST_CITY)
} }
onEquip(Items.CAPE_OF_LEGENDS_1052) { player, _ -> onEquip(Items.CAPE_OF_LEGENDS_1052) { player, _ ->
return@onEquip hasRequirement(player, "Legend's Quest") return@onEquip hasRequirement(player, Quests.LEGENDS_QUEST)
} }
onEquip(questCapes) { player, _ -> onEquip(questCapes) { player, _ ->
@@ -152,84 +153,84 @@ class ItemQuestRequirementListener : InteractionListener {
} }
onEquip(Items.WOLFBANE_2952){ player, _ -> onEquip(Items.WOLFBANE_2952){ player, _ ->
return@onEquip hasRequirement(player, "Priest in Peril") return@onEquip hasRequirement(player, Quests.PRIEST_IN_PERIL)
} }
onEquip(Items.ANCIENT_MACE_11061){ player, _ -> onEquip(Items.ANCIENT_MACE_11061){ player, _ ->
return@onEquip hasRequirement(player, "Another Slice of H.A.M") return@onEquip hasRequirement(player, Quests.ANOTHER_SLICE_OF_HAM)
} }
onEquip(Items.ANCIENT_STAFF_4675){ player, _ -> onEquip(Items.ANCIENT_STAFF_4675){ player, _ ->
return@onEquip hasRequirement(player, "Desert Treasure") return@onEquip hasRequirement(player, Quests.DESERT_TREASURE)
} }
onEquip(Items.ELEMENTAL_SHIELD_2890) { player, _ -> onEquip(Items.ELEMENTAL_SHIELD_2890) { player, _ ->
return@onEquip hasRequirement(player, "Elemental Workshop I") return@onEquip hasRequirement(player, Quests.ELEMENTAL_WORKSHOP_I)
} }
onEquip(crystalEquipment){ player, _ -> onEquip(crystalEquipment){ player, _ ->
return@onEquip hasRequirement(player, "Roving Elves") return@onEquip hasRequirement(player, Quests.ROVING_ELVES)
} }
onEquip(dragonSlayerEquipment) {player, _ -> onEquip(dragonSlayerEquipment) {player, _ ->
return@onEquip hasRequirement(player, "Dragon Slayer") return@onEquip hasRequirement(player, Quests.DRAGON_SLAYER)
} }
onEquip(Items.DRAGON_SCIMITAR_4587) {player, _ -> onEquip(Items.DRAGON_SCIMITAR_4587) {player, _ ->
return@onEquip hasRequirement(player, "Monkey Madness") return@onEquip hasRequirement(player, Quests.MONKEY_MADNESS)
} }
onEquip(Items.GLOVES_7462) {player, _ -> onEquip(Items.GLOVES_7462) {player, _ ->
return@onEquip hasRequirement(player, "Recipe for Disaster") return@onEquip hasRequirement(player, Quests.RECIPE_FOR_DISASTER)
} }
onEquip(Items.SLAYER_HELMET_13263) {player, _ -> onEquip(Items.SLAYER_HELMET_13263) {player, _ ->
return@onEquip hasRequirement(player, "Smoking Kills") return@onEquip hasRequirement(player, Quests.SMOKING_KILLS)
} }
onEquip (Items.DRAGON_HALBERD_3204) {player, _ -> onEquip (Items.DRAGON_HALBERD_3204) {player, _ ->
return@onEquip hasRequirement(player, "Regicide") return@onEquip hasRequirement(player, Quests.REGICIDE)
} }
onEquip (Items.CLIMBING_BOOTS_3105) {player, _ -> onEquip (Items.CLIMBING_BOOTS_3105) {player, _ ->
return@onEquip hasRequirement(player, "Death Plateau") return@onEquip hasRequirement(player, Quests.DEATH_PLATEAU)
} }
onEquip (godBooks) {player, _ -> onEquip (godBooks) {player, _ ->
return@onEquip hasRequirement(player, "Horror from the Deep") return@onEquip hasRequirement(player, Quests.HORROR_FROM_THE_DEEP)
} }
onEquip (pharaohScepters) {player, _ -> onEquip (pharaohScepters) {player, _ ->
return@onEquip hasRequirement(player, "Icthlarin's Little Helper") return@onEquip hasRequirement(player, Quests.ICTHLARINS_LITTLE_HELPER)
} }
onEquip (Items.DRAGON_SQ_SHIELD_1187) {player, _ -> onEquip (Items.DRAGON_SQ_SHIELD_1187) {player, _ ->
//because I know people won't believe it: https://runescape.wiki/w/Dragon_sq_shield?oldid=899636 //because I know people won't believe it: https://runescape.wiki/w/Dragon_sq_shield?oldid=899636
return@onEquip hasRequirement(player, "Legend's Quest") return@onEquip hasRequirement(player, Quests.LEGENDS_QUEST)
} }
onEquip (initiateArmour) {player, _ -> onEquip (initiateArmour) {player, _ ->
return@onEquip hasRequirement(player, "Recruitment Drive") return@onEquip hasRequirement(player, Quests.RECRUITMENT_DRIVE)
} }
onEquip (proselyteArmour) {player, _ -> onEquip (proselyteArmour) {player, _ ->
return@onEquip hasRequirement(player, "The Slug Menace") return@onEquip hasRequirement(player, Quests.THE_SLUG_MENACE)
} }
onEquip (spiritShields) {player, _ -> onEquip (spiritShields) {player, _ ->
return@onEquip hasRequirement(player, "Summer's End") return@onEquip hasRequirement(player, Quests.SUMMERS_END)
} }
onEquip (Items.DRAGON_MACE_1434) {player, _ -> onEquip (Items.DRAGON_MACE_1434) {player, _ ->
return@onEquip hasRequirement(player, "Heroes' Quest") return@onEquip hasRequirement(player, Quests.HEROES_QUEST)
} }
onEquip (Items.DRAGON_BATTLEAXE_1377) {player, _ -> onEquip (Items.DRAGON_BATTLEAXE_1377) {player, _ ->
return@onEquip hasRequirement(player, "Heroes' Quest") return@onEquip hasRequirement(player, Quests.HEROES_QUEST)
} }
onEquip (Items.DARKLIGHT_6746) {player, _ -> onEquip (Items.DARKLIGHT_6746) {player, _ ->
return@onEquip hasRequirement(player, "Shadow of the Storm") return@onEquip hasRequirement(player, Quests.SHADOW_OF_THE_STORM)
} }
} }
} }
@@ -8,6 +8,7 @@ import core.game.node.entity.player.Player;
import core.plugin.Initializable; import core.plugin.Initializable;
import core.plugin.Plugin; import core.plugin.Plugin;
import content.region.morytania.quest.naturespirit.NSUtils; import content.region.morytania.quest.naturespirit.NSUtils;
import content.data.Quests;
/** /**
* Handles the Silver Sickle (b) to collect Mort Myre Fungus. * Handles the Silver Sickle (b) to collect Mort Myre Fungus.
@@ -28,7 +29,7 @@ public final class SilverSicklePlugin extends OptionHandler {
switch (option) { switch (option) {
case "operate": case "operate":
case "cast bloom": case "cast bloom":
if(player.getQuestRepository().getQuest("Nature Spirit").getStage(player) >= 75) { if(player.getQuestRepository().getQuest(Quests.NATURE_SPIRIT).getStage(player) >= 75) {
player.getPacketDispatch().sendAnimation(9021); player.getPacketDispatch().sendAnimation(9021);
NSUtils.castBloom(player); NSUtils.castBloom(player);
} else { } else {
@@ -10,12 +10,13 @@ import core.game.node.entity.player.link.TeleportManager
import core.game.node.item.Item import core.game.node.item.Item
import core.game.world.map.Location import core.game.world.map.Location
import core.api.hasRequirement; import core.api.hasRequirement;
import content.data.Quests
class TeleTabsListener : InteractionListener { class TeleTabsListener : InteractionListener {
enum class TeleTabs(val item: Int, val location: Location, val exp: Double, val requirementCheck: (Player) -> Boolean = { true }) { enum class TeleTabs(val item: Int, val location: Location, val exp: Double, val requirementCheck: (Player) -> Boolean = { true }) {
ADDOUGNE_TELEPORT(8011, Location.create(2662, 3307, 0), 61.0, { ADDOUGNE_TELEPORT(8011, Location.create(2662, 3307, 0), 61.0, {
player -> hasRequirement(player, "Plague City"); player -> hasRequirement(player, Quests.PLAGUE_CITY);
}), }),
AIR_ALTAR_TELEPORT(13599, Location.create(2978, 3296, 0), 0.0), AIR_ALTAR_TELEPORT(13599, Location.create(2978, 3296, 0), 0.0),
ASTRAL_ALTAR_TELEPORT(13611, Location.create(2156, 3862, 0), 0.0), ASTRAL_ALTAR_TELEPORT(13611, Location.create(2156, 3862, 0), 0.0),
@@ -14,6 +14,7 @@ import core.game.world.map.zone.impl.WildernessZone;
import core.plugin.Plugin; import core.plugin.Plugin;
import static core.api.ContentAPIKt.hasRequirement; import static core.api.ContentAPIKt.hasRequirement;
import content.data.Quests;
/** /**
* Represents the rotten potato plugin. * Represents the rotten potato plugin.
@@ -34,7 +35,7 @@ public final class TeleportCrystalPlugin extends OptionHandler {
@Override @Override
public boolean handle(Player player, Node node, String option) { public boolean handle(Player player, Node node, String option) {
if (!hasRequirement(player, "Mourning's End Part I")) if (!hasRequirement(player, Quests.MOURNINGS_END_PART_I))
return true; return true;
if (!WildernessZone.checkTeleport(player, 20)) { if (!WildernessZone.checkTeleport(player, 20)) {
player.getPacketDispatch().sendMessage("The crystal is unresponsive."); player.getPacketDispatch().sendMessage("The crystal is unresponsive.");
@@ -10,27 +10,27 @@ import org.rs09.consts.NPCs
import core.game.interaction.InteractionListener import core.game.interaction.InteractionListener
import core.game.interaction.IntType import core.game.interaction.IntType
import core.game.world.GameWorld.Pulser import core.game.world.GameWorld.Pulser
import content.data.Quests
class GCItemOnCat : InteractionListener { class GCItemOnCat : InteractionListener {
override fun defineListeners() { override fun defineListeners() {
val GERTCAT = "Gertrude's Cat"
val BEND_DOWN = 827 val BEND_DOWN = 827
onUseWith(IntType.NPC, Items.BUCKET_OF_MILK_1927, NPCs.GERTRUDES_CAT_2997) { player, used, with -> onUseWith(IntType.NPC, Items.BUCKET_OF_MILK_1927, NPCs.GERTRUDES_CAT_2997) { player, used, with ->
if(getQuestStage(player, GERTCAT) == 20 && removeItem(player, used.asItem())){ if(getQuestStage(player, Quests.GERTRUDES_CAT) == 20 && removeItem(player, used.asItem())){
addItem(player, Items.BUCKET_1925) addItem(player, Items.BUCKET_1925)
animate(player, BEND_DOWN) //bend down animate(player, BEND_DOWN) //bend down
sendChat(with.asNpc(), "Mew!") sendChat(with.asNpc(), "Mew!")
setQuestStage(player, GERTCAT, 30) setQuestStage(player, Quests.GERTRUDES_CAT, 30)
} }
return@onUseWith true return@onUseWith true
} }
onUseWith(IntType.NPC, Items.DOOGLE_SARDINE_1552, NPCs.GERTRUDES_CAT_2997){ player, used, with -> onUseWith(IntType.NPC, Items.DOOGLE_SARDINE_1552, NPCs.GERTRUDES_CAT_2997){ player, used, with ->
if(getQuestStage(player, GERTCAT) == 30 && removeItem(player, used.asItem())){ if(getQuestStage(player, Quests.GERTRUDES_CAT) == 30 && removeItem(player, used.asItem())){
animate(player, BEND_DOWN) animate(player, BEND_DOWN)
sendChat(with.asNpc(), "Mew!") sendChat(with.asNpc(), "Mew!")
setQuestStage(player, GERTCAT, 40) setQuestStage(player, Quests.GERTRUDES_CAT, 40)
} }
return@onUseWith true return@onUseWith true
} }
@@ -42,7 +42,7 @@ class GCItemOnCat : InteractionListener {
onUseWith(IntType.NPC, Items.THREE_LITTLE_KITTENS_13236, NPCs.GERTRUDES_CAT_2997){ player, used, with -> onUseWith(IntType.NPC, Items.THREE_LITTLE_KITTENS_13236, NPCs.GERTRUDES_CAT_2997){ player, used, with ->
if(removeItem(player, used.asItem())){ if(removeItem(player, used.asItem())){
setQuestStage(player, GERTCAT, 60) setQuestStage(player, Quests.GERTRUDES_CAT, 60)
//below copied verbatim from original, I don't like it. //below copied verbatim from original, I don't like it.
Pulser.submit(object : Pulse(1) { Pulser.submit(object : Pulse(1) {
var count = 0 var count = 0
@@ -14,6 +14,7 @@ import core.game.world.map.path.Pathfinder;
import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Animation;
import core.plugin.Initializable; import core.plugin.Initializable;
import core.plugin.Plugin; import core.plugin.Plugin;
import content.data.Quests;
/** /**
* Represents the plugin used to handle the use with interactions. * Represents the plugin used to handle the use with interactions.
@@ -50,7 +51,7 @@ public final class GertrudeCatUsePlugin extends UseWithHandler {
public boolean handle(NodeUsageEvent event) { public boolean handle(NodeUsageEvent event) {
final Player player = event.getPlayer(); final Player player = event.getPlayer();
final NPC npc = ((NPC) event.getUsedWith()); final NPC npc = ((NPC) event.getUsedWith());
final Quest quest = player.getQuestRepository().getQuest("Gertrude's Cat"); final Quest quest = player.getQuestRepository().getQuest(Quests.GERTRUDES_CAT);
if (event.getUsedItem().getId() == 1927 && quest.getStage(player) == 20) { if (event.getUsedItem().getId() == 1927 && quest.getStage(player) == 20) {
if (player.getInventory().remove(event.getUsedItem())) { if (player.getInventory().remove(event.getUsedItem())) {
player.getInventory().add(EMPTY_BUCKET); player.getInventory().add(EMPTY_BUCKET);
@@ -5,20 +5,19 @@ import org.rs09.consts.Items
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import core.game.interaction.InteractionListener import core.game.interaction.InteractionListener
import core.game.interaction.IntType import core.game.interaction.IntType
import content.data.Quests
class RopeOnLadyKeli : InteractionListener { class RopeOnLadyKeli : InteractionListener {
override fun defineListeners() { override fun defineListeners() {
val PAR = "Prince Ali Rescue"
onUseWith(IntType.NPC, Items.ROPE_954, NPCs.LADY_KELI_919) { player, used, with -> onUseWith(IntType.NPC, Items.ROPE_954, NPCs.LADY_KELI_919) { player, used, with ->
if(getQuestStage(player, PAR) in 40..50 && getAttribute(player, "guard-drunk", false)){ if(getQuestStage(player, Quests.PRINCE_ALI_RESCUE) in 40..50 && getAttribute(player, "guard-drunk", false)){
if(removeItem(player, used.asItem())){ if(removeItem(player, used.asItem())){
sendDialogue(player, "You overpower Keli, tie her up, and put her in a cupboard.") sendDialogue(player, "You overpower Keli, tie her up, and put her in a cupboard.")
setQuestStage(player, PAR, 50) setQuestStage(player, Quests.PRINCE_ALI_RESCUE, 50)
setAttribute(player, "keli-gone", getWorldTicks() + 350) setAttribute(player, "keli-gone", getWorldTicks() + 350)
} }
} else { } else {
if (getQuestStage(player, PAR) == 40){ if (getQuestStage(player, Quests.PRINCE_ALI_RESCUE) == 40){
sendMessage(player, "You need to do something about the guard first.") sendMessage(player, "You need to do something about the guard first.")
} }
} }
@@ -1,7 +1,7 @@
package content.global.handlers.item.withobject package content.global.handlers.item.withobject
import content.data.Quests
import core.api.* import core.api.*
import content.region.kandarin.quest.dwarfcannon.DwarfCannon
import core.game.node.Node import core.game.node.Node
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.node.entity.skill.Skills import core.game.node.entity.skill.Skills
@@ -19,8 +19,8 @@ class AmmoMouldOnFurnace : InteractionListener {
private fun cannonBallOnUseWithHandler(player: Player, used: Node, with: Node): Boolean { private fun cannonBallOnUseWithHandler(player: Player, used: Node, with: Node): Boolean {
face(player, with.centerLocation) face(player, with.centerLocation)
if(!isQuestComplete(player, DwarfCannon.NAME)) { if(!isQuestComplete(player, Quests.DWARF_CANNON)) {
sendDialogue(player, "You need to complete the ${DwarfCannon.NAME} quest in order to do this.") sendDialogue(player, "You need to complete the ${Quests.DWARF_CANNON} quest in order to do this.")
return true return true
} }
if (getDynLevel(player, Skills.SMITHING) < levelRequirement) { if (getDynLevel(player, Skills.SMITHING) < levelRequirement) {
@@ -15,6 +15,7 @@ import core.game.node.scenery.Scenery;
import core.plugin.Plugin; import core.plugin.Plugin;
import core.plugin.Initializable; import core.plugin.Initializable;
import core.plugin.ClassScanner; import core.plugin.ClassScanner;
import content.data.Quests;
/** /**
* Represents the option handler used for smithing. * Represents the option handler used for smithing.
@@ -68,7 +69,7 @@ public final class SmithingPlugin extends UseWithHandler {
@Override @Override
public boolean handle(NodeUsageEvent event) { public boolean handle(NodeUsageEvent event) {
final Player player = event.getPlayer(); final Player player = event.getPlayer();
if (((Scenery) event.getUsedWith()).getId() == 2782 && !player.getQuestRepository().isComplete("Doric's Quest")) { if (((Scenery) event.getUsedWith()).getId() == 2782 && !player.getQuestRepository().isComplete(Quests.DORICS_QUEST)) {
player.getDialogueInterpreter().sendDialogue("Property of Doric the Dwarf."); player.getDialogueInterpreter().sendDialogue("Property of Doric the Dwarf.");
return true; return true;
} }
@@ -7,6 +7,7 @@ import core.game.node.item.GroundItemManager;
import core.game.node.item.Item; import core.game.node.item.Item;
import core.plugin.Initializable; import core.plugin.Initializable;
import core.game.world.map.Location; import core.game.world.map.Location;
import content.data.Quests;
/** /**
* Represents a rat npc. * Represents a rat npc.
@@ -51,7 +52,7 @@ public class RatNPC extends AbstractNPC {
super.finalizeDeath(killer); super.finalizeDeath(killer);
if (killer instanceof Player) { if (killer instanceof Player) {
final Player p = ((Player) killer); final Player p = ((Player) killer);
if (p.getQuestRepository().getQuest("Witch's Potion").isStarted(p)) { if (p.getQuestRepository().getQuest(Quests.WITCHS_POTION).isStarted(p)) {
GroundItemManager.create(RAT_TAIL, getLocation(), p); GroundItemManager.create(RAT_TAIL, getLocation(), p);
} }
} }
@@ -17,6 +17,7 @@ import org.rs09.consts.NPCs
import org.rs09.consts.Sounds import org.rs09.consts.Sounds
import core.game.world.map.Location import core.game.world.map.Location
import core.game.world.map.Direction import core.game.world.map.Direction
import content.data.Quests
private val sheepIds = intArrayOf( private val sheepIds = intArrayOf(
NPCs.SHEEP_42, NPCs.SHEEP_42,
@@ -74,7 +75,7 @@ class SheepBehavior : NPCBehavior(*sheepIds), InteractionListener {
val sheep = node as NPC val sheep = node as NPC
sheep.faceTemporary(player, 1) sheep.faceTemporary(player, 1)
if (sheep.id == NPCs.SHEEP_3579) { if (sheep.id == NPCs.SHEEP_3579) {
if (player.questRepository.getQuest("Sheep Shearer").isStarted(player)) { if (player.questRepository.getQuest(Quests.SHEEP_SHEARER).isStarted(player)) {
setAttribute(player, ATTR_IS_PENGUIN_SHEEP_SHEARED, true) setAttribute(player, ATTR_IS_PENGUIN_SHEEP_SHEARED, true)
} }
animate(player, Animation(893)) animate(player, Animation(893))
@@ -9,6 +9,7 @@ import core.game.world.map.Location;
import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Animation;
import core.plugin.Initializable; import core.plugin.Initializable;
import core.plugin.Plugin; import core.plugin.Plugin;
import content.data.Quests;
/** /**
* Handles the bar squeezing shortcut. * Handles the bar squeezing shortcut.
@@ -61,7 +62,7 @@ public class BarSqueezeShortcut extends AgilityShortcut {
@Override @Override
public boolean checkRequirements(Player player) { public boolean checkRequirements(Player player) {
if (!player.getQuestRepository().isComplete("Priest in Peril") && !(player.getLocation().getY() >= 3159 && player.getLocation().getY() <= 3161)) { if (!player.getQuestRepository().isComplete(Quests.PRIEST_IN_PERIL) && !(player.getLocation().getY() >= 3159 && player.getLocation().getY() <= 3161)) {
player.getDialogueInterpreter().sendDialogue("You need to have completed Priest in Peril in order to do this."); player.getDialogueInterpreter().sendDialogue("You need to have completed Priest in Peril in order to do this.");
return false; return false;
} }
@@ -15,6 +15,7 @@ import core.plugin.Initializable;
import core.plugin.Plugin; import core.plugin.Plugin;
import static core.api.ContentAPIKt.hasRequirement; import static core.api.ContentAPIKt.hasRequirement;
import content.data.Quests;
/** /**
* Handles a tunnel shortcut. * Handles a tunnel shortcut.
@@ -73,7 +74,7 @@ public class TunnelShortcut extends AgilityShortcut {
@Override @Override
public void run(final Player player, Scenery object, String option, boolean failed) { public void run(final Player player, Scenery object, String option, boolean failed) {
if (object.getId() == 14922) { if (object.getId() == 14922) {
if (!hasRequirement(player, "Swan Song")) if (!hasRequirement(player, Quests.SWAN_SONG))
return; return;
} }
player.lock(6); player.lock(6);
@@ -3,6 +3,7 @@ package content.global.skill.construction;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
import org.rs09.consts.Items; import org.rs09.consts.Items;
import core.game.node.entity.skill.Skills; import core.game.node.entity.skill.Skills;
import content.data.Quests;
/** /**
* Family crest types. * Family crest types.
@@ -16,7 +17,7 @@ public enum CrestType implements CrestRequirement {
@Override @Override
public boolean eligible(Player player) { public boolean eligible(Player player) {
return player.getQuestRepository().isComplete("Shield of Arrav"); return player.getQuestRepository().isComplete(Quests.SHIELD_OF_ARRAV);
} }
}, },
ASGARNIA("the symbol of Asgarnia"), // no requirements ASGARNIA("the symbol of Asgarnia"), // no requirements
@@ -24,21 +25,21 @@ public enum CrestType implements CrestRequirement {
@Override @Override
public boolean eligible(Player player) { public boolean eligible(Player player) {
return player.getQuestRepository().isComplete("The Lost Tribe"); return player.getQuestRepository().isComplete(Quests.THE_LOST_TRIBE);
} }
}, },
DRAGON("a dragon") { // requires Dragon Slayer DRAGON("a dragon") { // requires Dragon Slayer
@Override @Override
public boolean eligible(Player player) { public boolean eligible(Player player) {
return player.getQuestRepository().isComplete("Dragon Slayer"); return player.getQuestRepository().isComplete(Quests.DRAGON_SLAYER);
} }
}, },
FAIRY("a fairy") { // requries Lost City FAIRY("a fairy") { // requries Lost City
@Override @Override
public boolean eligible(Player player) { public boolean eligible(Player player) {
return player.getQuestRepository().isComplete("Lost City"); return player.getQuestRepository().isComplete(Quests.LOST_CITY);
} }
}, },
GUTHIX("the symbol of Guthix") { // Requires 70+ Prayer GUTHIX("the symbol of Guthix") { // Requires 70+ Prayer
@@ -16,6 +16,7 @@ import org.rs09.consts.Items;
import org.rs09.consts.Sounds; import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio; import static core.api.ContentAPIKt.playAudio;
import content.data.Quests;
public class StandardCookingPulse extends Pulse { public class StandardCookingPulse extends Pulse {
//range animation //range animation
@@ -72,7 +73,7 @@ public class StandardCookingPulse extends Pulse {
this.experience = 0; this.experience = 0;
if (properties != null) { if (properties != null) {
// Handle Cook's Assistant range // Handle Cook's Assistant range
if (object.getId() == LUMBRIDGE_RANGE && !player.getQuestRepository().isComplete("Cook's Assistant")) { if (object.getId() == LUMBRIDGE_RANGE && !player.getQuestRepository().isComplete(Quests.COOKS_ASSISTANT)) {
player.getPacketDispatch().sendMessage("You need to have completed the Cook's Assistant quest in order to use that range."); player.getPacketDispatch().sendMessage("You need to have completed the Cook's Assistant quest in order to use that range.");
return false; return false;
} }
@@ -12,6 +12,7 @@ import core.game.interaction.QueueStrength
import core.tools.StringUtils import core.tools.StringUtils
import core.tools.prependArticle import core.tools.prependArticle
import org.rs09.consts.Sounds import org.rs09.consts.Sounds
import content.data.Quests
class UseWithPatchHandler : InteractionListener { class UseWithPatchHandler : InteractionListener {
val RAKE = Items.RAKE_5341 val RAKE = Items.RAKE_5341
@@ -39,7 +40,7 @@ class UseWithPatchHandler : InteractionListener {
val usedItem = used.asItem() val usedItem = used.asItem()
if (patch == FarmingPatch.TROLL_STRONGHOLD_HERB) { if (patch == FarmingPatch.TROLL_STRONGHOLD_HERB) {
if (!hasRequirement(player, "My Arm's Big Adventure")) if (!hasRequirement(player, Quests.MY_ARMS_BIG_ADVENTURE))
return@onUseWith true return@onUseWith true
} }
@@ -9,6 +9,7 @@ import core.game.node.entity.player.Player;
import core.game.node.item.Item; import core.game.node.item.Item;
import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Animation;
import core.tools.StringUtils; import core.tools.StringUtils;
import content.data.Quests;
/** /**
* fletching skill pulse * fletching skill pulse
@@ -57,7 +58,7 @@ public final class FletchingPulse extends SkillPulse<Item> {
amount = player.getInventory().getAmount(node); amount = player.getInventory().getAmount(node);
} }
if (fletch == Fletching.FletchingItems.OGRE_ARROW_SHAFT) { if (fletch == Fletching.FletchingItems.OGRE_ARROW_SHAFT) {
if (player.getQuestRepository().getQuest("Big Chompy Bird Hunting").getStage(player) == 0) { if (player.getQuestRepository().getQuest(Quests.BIG_CHOMPY_BIRD_HUNTING).getStage(player) == 0) {
player.getPacketDispatch().sendMessage("You must have started Big Chompy Bird Hunting to make those."); player.getPacketDispatch().sendMessage("You must have started Big Chompy Bird Hunting to make those.");
return false; return false;
} }
@@ -7,6 +7,7 @@ import core.game.node.entity.player.Player;
import core.game.node.item.Item; import core.game.node.item.Item;
import static core.api.ContentAPIKt.*; import static core.api.ContentAPIKt.*;
import content.data.Quests;
/** /**
* Represents the dart pulse. * Represents the dart pulse.
@@ -46,7 +47,7 @@ public final class DartPulse extends SkillPulse<Item> {
player.getDialogueInterpreter().sendDialogue("You need a fletching level of " + dart.level + " to do this."); player.getDialogueInterpreter().sendDialogue("You need a fletching level of " + dart.level + " to do this.");
return false; return false;
} }
if (!player.getQuestRepository().isComplete("The Tourist Trap")){ if (!player.getQuestRepository().isComplete(Quests.THE_TOURIST_TRAP)){
player.getDialogueInterpreter().sendDialogue("You need to have completed Tourist Trap to fletch darts."); player.getDialogueInterpreter().sendDialogue("You need to have completed Tourist Trap to fletch darts.");
return false; return false;
} }
@@ -6,6 +6,7 @@ import core.game.interaction.InteractionListener
import core.game.node.entity.skill.Skills import core.game.node.entity.skill.Skills
import core.game.node.item.Item import core.game.node.item.Item
import java.util.* import java.util.*
import content.data.Quests
/** /**
* Dirty herb cleaning listener * Dirty herb cleaning listener
@@ -15,7 +16,7 @@ class HerbCleanListener : InteractionListener {
override fun defineListeners() { override fun defineListeners() {
on(IntType.ITEM, "clean") { player, node -> on(IntType.ITEM, "clean") { player, node ->
lock(player, 1) lock(player, 1)
if (!requireQuest(player, "Druidic Ritual", "before you can use Herblore.")) return@on true if (!requireQuest(player, Quests.DRUIDIC_RITUAL, "before you can use Herblore.")) return@on true
val herb: Herbs = Herbs.forItem(node as Item) ?: return@on true val herb: Herbs = Herbs.forItem(node as Item) ?: return@on true
if (getDynLevel(player, Skills.HERBLORE) < herb.level) { if (getDynLevel(player, Skills.HERBLORE) < herb.level) {
@@ -5,6 +5,7 @@ import core.game.node.entity.skill.Skills;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
import core.game.node.item.Item; import core.game.node.item.Item;
import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Animation;
import content.data.Quests;
/** /**
* Represents the pulse used to create herb tars. * Represents the pulse used to create herb tars.
@@ -52,7 +53,7 @@ public final class HerbTarPulse extends SkillPulse<Item> {
@Override @Override
public boolean checkRequirements() { public boolean checkRequirements() {
if (!player.getQuestRepository().isComplete("Druidic Ritual")) { if (!player.getQuestRepository().isComplete(Quests.DRUIDIC_RITUAL)) {
player.getPacketDispatch().sendMessage("You must complete the Druidic Ritual quest before you can use Herblore."); player.getPacketDispatch().sendMessage("You must complete the Druidic Ritual quest before you can use Herblore.");
return false; return false;
} }
@@ -12,6 +12,7 @@ import core.tools.RandomFunction;
import org.rs09.consts.Sounds; import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio; import static core.api.ContentAPIKt.playAudio;
import content.data.Quests;
/** /**
@@ -69,7 +70,7 @@ public final class HerblorePulse extends SkillPulse<Item> {
@Override @Override
public boolean checkRequirements() { public boolean checkRequirements() {
if (!player.getQuestRepository().isComplete("Druidic Ritual")) { if (!player.getQuestRepository().isComplete(Quests.DRUIDIC_RITUAL)) {
player.getPacketDispatch().sendMessage("You must complete the Druidic Ritual quest before you can use Herblore."); player.getPacketDispatch().sendMessage("You must complete the Druidic Ritual quest before you can use Herblore.");
return false; return false;
} }
@@ -9,6 +9,7 @@ import core.game.node.entity.player.link.SpellBookManager.SpellBook
import core.game.node.entity.skill.Skills import core.game.node.entity.skill.Skills
import org.rs09.consts.Scenery import org.rs09.consts.Scenery
import org.rs09.consts.Sounds import org.rs09.consts.Sounds
import content.data.Quests
class MagicAltarListener : InteractionListener { class MagicAltarListener : InteractionListener {
override fun defineListeners() { override fun defineListeners() {
@@ -24,7 +25,7 @@ class MagicAltarListener : InteractionListener {
private fun meetsRequirements(player: Player, altar: Node): Boolean { private fun meetsRequirements(player: Player, altar: Node): Boolean {
val level = if (altar.id == ANCIENT_ALTAR) 50 else 65 val level = if (altar.id == ANCIENT_ALTAR) 50 else 65
if (!hasRequirement(player, if (altar.id == ANCIENT_ALTAR) "Desert Treasure" else "Lunar Diplomacy")) { if (!hasRequirement(player, if (altar.id == ANCIENT_ALTAR) Quests.DESERT_TREASURE else Quests.LUNAR_DIPLOMACY)) {
return false return false
} }
@@ -29,6 +29,7 @@ import core.game.world.update.flag.context.Graphics
import org.rs09.consts.Items import org.rs09.consts.Items
import org.rs09.consts.Scenery import org.rs09.consts.Scenery
import org.rs09.consts.Sounds import org.rs09.consts.Sounds
import content.data.Quests
class ModernListeners : SpellListener("modern"){ class ModernListeners : SpellListener("modern"){
override fun defineListeners() { override fun defineListeners() {
@@ -65,28 +66,28 @@ class ModernListeners : SpellListener("modern"){
} }
onCast(Modern.ARDOUGNE_TELEPORT, NONE){ player, _ -> onCast(Modern.ARDOUGNE_TELEPORT, NONE){ player, _ ->
if (!hasRequirement(player, "Plague City")) if (!hasRequirement(player, Quests.PLAGUE_CITY))
return@onCast return@onCast
requires(player,51, arrayOf(Item(Items.WATER_RUNE_555,2),Item(Items.LAW_RUNE_563,2))) requires(player,51, arrayOf(Item(Items.WATER_RUNE_555,2),Item(Items.LAW_RUNE_563,2)))
sendTeleport(player,61.0, Location.create(2662, 3307, 0)) sendTeleport(player,61.0, Location.create(2662, 3307, 0))
} }
onCast(Modern.WATCHTOWER_TELEPORT, NONE){ player, _ -> onCast(Modern.WATCHTOWER_TELEPORT, NONE){ player, _ ->
if (!hasRequirement(player, "Watchtower")) if (!hasRequirement(player, Quests.WATCHTOWER))
return@onCast return@onCast
requires(player,58, arrayOf(Item(Items.EARTH_RUNE_557,2),Item(Items.LAW_RUNE_563,2))) requires(player,58, arrayOf(Item(Items.EARTH_RUNE_557,2),Item(Items.LAW_RUNE_563,2)))
sendTeleport(player,68.0, Location.create(2549, 3112, 0)) sendTeleport(player,68.0, Location.create(2549, 3112, 0))
} }
onCast(Modern.TROLLHEIM_TELEPORT, NONE){ player, _ -> onCast(Modern.TROLLHEIM_TELEPORT, NONE){ player, _ ->
if (!hasRequirement(player, "Eadgar's Ruse")) if (!hasRequirement(player, Quests.EADGARS_RUSE))
return@onCast return@onCast
requires(player,61, arrayOf(Item(Items.FIRE_RUNE_554,2),Item(Items.LAW_RUNE_563,2))) requires(player,61, arrayOf(Item(Items.FIRE_RUNE_554,2),Item(Items.LAW_RUNE_563,2)))
sendTeleport(player,68.0, Location.create(2891, 3678, 0)) sendTeleport(player,68.0, Location.create(2891, 3678, 0))
} }
onCast(Modern.APE_ATOLL_TELEPORT, NONE){ player, _ -> onCast(Modern.APE_ATOLL_TELEPORT, NONE){ player, _ ->
if (!hasRequirement(player, "Monkey Madness")) if (!hasRequirement(player, Quests.MONKEY_MADNESS))
return@onCast return@onCast
requires(player,64, arrayOf(Item(Items.FIRE_RUNE_554,2),Item(Items.WATER_RUNE_555,2),Item(Items.LAW_RUNE_563,2),Item(Items.BANANA_1963))) requires(player,64, arrayOf(Item(Items.FIRE_RUNE_554,2),Item(Items.WATER_RUNE_555,2),Item(Items.LAW_RUNE_563,2),Item(Items.BANANA_1963)))
sendTeleport(player,74.0, Location.create(2754, 2784, 0)) sendTeleport(player,74.0, Location.create(2754, 2784, 0))
@@ -12,11 +12,12 @@ import core.game.node.entity.skill.Skills
import core.game.world.map.Location import core.game.world.map.Location
import org.rs09.consts.Scenery import org.rs09.consts.Scenery
import org.rs09.consts.Sounds import org.rs09.consts.Sounds
import content.data.Quests
class PrayerAltarListener : InteractionListener { class PrayerAltarListener : InteractionListener {
override fun defineListeners() { override fun defineListeners() {
on(altars, IntType.SCENERY, "pray", "pray-at") { player, node -> on(altars, IntType.SCENERY, "pray", "pray-at") { player, node ->
if (node.id == Scenery.TRIBAL_STATUE_3863 && !hasRequirement(player, "Tai Bwo Wannai Trio")) { if (node.id == Scenery.TRIBAL_STATUE_3863 && !hasRequirement(player, Quests.TAI_BWO_WANNAI_TRIO)) {
// https://runescape.wiki/w/Tribal_Statue?oldid=1940922 // https://runescape.wiki/w/Tribal_Statue?oldid=1940922
return@on true return@on true
} }
@@ -43,9 +44,9 @@ class PrayerAltarListener : InteractionListener {
} }
on(Scenery.CHAOS_ALTAR_61, IntType.SCENERY, "check") { player, _ -> on(Scenery.CHAOS_ALTAR_61, IntType.SCENERY, "check") { player, _ ->
if (getQuestStage(player, "Merlin's Crystal") == 70) { if (getQuestStage(player, Quests.MERLINS_CRYSTAL) == 70) {
sendDialogue(player, "You find a small inscription at the bottom of the altar. It reads: 'Snarthon Candtrick Termanto'.") sendDialogue(player, "You find a small inscription at the bottom of the altar. It reads: 'Snarthon Candtrick Termanto'.")
setQuestStage(player, "Merlin's Crystal", 80) setQuestStage(player, Quests.MERLINS_CRYSTAL, 80)
} else { } else {
sendMessage(player, "An altar of the evil god Zamorak.") sendMessage(player, "An altar of the evil god Zamorak.")
} }
@@ -5,6 +5,7 @@ import core.game.node.entity.player.Player;
import core.game.node.scenery.Scenery; import core.game.node.scenery.Scenery;
import static core.api.ContentAPIKt.hasRequirement; import static core.api.ContentAPIKt.hasRequirement;
import content.data.Quests;
/** /**
* Represents an altar an it's relative information(corresponding ruin, etc) * Represents an altar an it's relative information(corresponding ruin, etc)
@@ -72,15 +73,15 @@ public enum Altar {
*/ */
public void enterRift(Player player) { public void enterRift(Player player) {
if (this == ASTRAL) { if (this == ASTRAL) {
if (!hasRequirement(player, "Lunar Diplomacy")) if (!hasRequirement(player, Quests.LUNAR_DIPLOMACY))
return; return;
} }
if (this == DEATH) { if (this == DEATH) {
if (!hasRequirement(player, "Mourning's End Part II")) if (!hasRequirement(player, Quests.MOURNINGS_END_PART_II))
return; return;
} }
if (this == BLOOD) { if (this == BLOOD) {
if (!hasRequirement(player, "Legacy of Seergaze")) if (!hasRequirement(player, Quests.LEGACY_OF_SEERGAZE))
return; return;
} }
if (this == LAW) { if (this == LAW) {
@@ -89,7 +90,7 @@ public enum Altar {
return; return;
} }
} }
if (this == COSMIC && !player.getQuestRepository().isComplete("Lost City")) { if (this == COSMIC && !player.getQuestRepository().isComplete(Quests.LOST_CITY)) {
player.getPacketDispatch().sendMessage("You need to have completed the Lost City quest in order to do that."); player.getPacketDispatch().sendMessage("You need to have completed the Lost City quest in order to do that.");
return; return;
} }
@@ -1,5 +1,6 @@
package content.global.skill.runecrafting package content.global.skill.runecrafting
import content.data.Quests
import content.region.misthalin.varrock.diary.VarrockAchivementDiary.Companion.EasyTasks.ENTER_EARTH_ALTAR import content.region.misthalin.varrock.diary.VarrockAchivementDiary.Companion.EasyTasks.ENTER_EARTH_ALTAR
import core.api.* import core.api.*
import core.game.container.impl.EquipmentContainer.SLOT_HAT import core.game.container.impl.EquipmentContainer.SLOT_HAT
@@ -19,7 +20,7 @@ class MysteriousRuinListener : InteractionListener {
private val animation = Animation(827) private val animation = Animation(827)
private val allowedUsed = arrayOf(1438, 1448, 1444, 1440, 1442, 5516, 1446, 1454, 1452, 1462, 1458, 1456, 1450, 1460).toIntArray() private val allowedUsed = arrayOf(1438, 1448, 1444, 1440, 1442, 5516, 1446, 1454, 1452, 1462, 1458, 1456, 1450, 1460).toIntArray()
private val allowedWith = allRuins() private val allowedWith = allRuins()
private val nothingInteresting = "Nothing interesting happens" private val nothingInteresting = "Nothing interesting happens."
override fun defineListeners() { override fun defineListeners() {
onUseWith(IntType.SCENERY, allowedUsed, *allowedWith) { player, used, with -> onUseWith(IntType.SCENERY, allowedUsed, *allowedWith) { player, used, with ->
@@ -76,9 +77,9 @@ class MysteriousRuinListener : InteractionListener {
private fun checkQuestCompletion(player: Player, ruin: MysteriousRuin): Boolean { private fun checkQuestCompletion(player: Player, ruin: MysteriousRuin): Boolean {
return when (ruin) { return when (ruin) {
MysteriousRuin.DEATH -> hasRequirement(player, QuestReq(MEP_2), true) MysteriousRuin.DEATH -> hasRequirement(player, Quests.MOURNINGS_END_PART_II, true)
MysteriousRuin.BLOOD -> hasRequirement(player, QuestReq(SEERGAZE), true) MysteriousRuin.BLOOD -> hasRequirement(player, Quests.LEGACY_OF_SEERGAZE, true)
else -> hasRequirement(player, QuestReq(RUNE_MYSTERIES), true) else -> hasRequirement(player, Quests.RUNE_MYSTERIES, true)
} }
} }
@@ -102,4 +103,4 @@ class MysteriousRuinListener : InteractionListener {
}) })
} }
} }
@@ -24,6 +24,7 @@ import org.rs09.consts.Sounds;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import content.data.Quests;
/** /**
* A class used to craft runes. * A class used to craft runes.
@@ -102,15 +103,15 @@ public final class RuneCraftPulse extends SkillPulse<Item> {
@Override @Override
public boolean checkRequirements() { public boolean checkRequirements() {
if (altar == Altar.ASTRAL) { if (altar == Altar.ASTRAL) {
if (!hasRequirement(player, "Lunar Diplomacy")) if (!hasRequirement(player, Quests.LUNAR_DIPLOMACY))
return false; return false;
} }
if (altar == Altar.DEATH) { if (altar == Altar.DEATH) {
if (!hasRequirement(player, "Mourning's End Part II")) if (!hasRequirement(player, Quests.MOURNINGS_END_PART_II))
return false; return false;
} }
if (altar == Altar.BLOOD) { if (altar == Altar.BLOOD) {
if (!hasRequirement(player, "Legacy of Seergaze")) if (!hasRequirement(player, Quests.LEGACY_OF_SEERGAZE))
return false; return false;
} }
if (!altar.isOurania() && getDynLevel(player, Skills.RUNECRAFTING) < rune.getLevel()) { if (!altar.isOurania() && getDynLevel(player, Skills.RUNECRAFTING) < rune.getLevel()) {
@@ -24,6 +24,7 @@ import core.plugin.Initializable;
import core.plugin.Plugin; import core.plugin.Plugin;
import static core.api.ContentAPIKt.hasRequirement; import static core.api.ContentAPIKt.hasRequirement;
import content.data.Quests;
/** /**
* Handles runecraftign related options. * Handles runecraftign related options.
@@ -52,7 +53,7 @@ public class RunecraftingPlugin extends OptionHandler {
@Override @Override
public boolean handle(final Player player, Node node, String option) { public boolean handle(final Player player, Node node, String option) {
if (!player.getQuestRepository().isComplete("Rune Mysteries") && player.getDetails().getRights() != Rights.ADMINISTRATOR) { if (!player.getQuestRepository().isComplete(Quests.RUNE_MYSTERIES) && player.getDetails().getRights() != Rights.ADMINISTRATOR) {
player.getPacketDispatch().sendMessage("You need to finish the Rune Mysteries Quest in order to do this."); player.getPacketDispatch().sendMessage("You need to finish the Rune Mysteries Quest in order to do this.");
return true; return true;
} }
@@ -97,7 +98,7 @@ public class RunecraftingPlugin extends OptionHandler {
} }
Altar a = Altar.forObject(((Scenery) node)); Altar a = Altar.forObject(((Scenery) node));
if (a == Altar.ASTRAL) { if (a == Altar.ASTRAL) {
if (!hasRequirement(player, "Lunar Diplomacy")) if (!hasRequirement(player, Quests.LUNAR_DIPLOMACY))
return true; return true;
} }
player.getPulseManager().run(new RuneCraftPulse(player, null, a, false, null)); player.getPulseManager().run(new RuneCraftPulse(player, null, a, false, null));
@@ -7,6 +7,7 @@ import core.game.node.entity.player.Player;
import core.game.node.item.Item; import core.game.node.item.Item;
import static core.api.ContentAPIKt.*; import static core.api.ContentAPIKt.*;
import content.data.Quests;
/** /**
@@ -51,7 +52,7 @@ public final class ZamorakMageDialogue extends DialoguePlugin {
public boolean open(Object... args) { public boolean open(Object... args) {
npc = (NPC) args[0]; npc = (NPC) args[0];
varrockMage = npc.getId() == 2261 || npc.getId() == 2260; varrockMage = npc.getId() == 2261 || npc.getId() == 2260;
if (!player.getQuestRepository().isComplete("Rune Mysteries")) { if (!player.getQuestRepository().isComplete(Quests.RUNE_MYSTERIES)) {
end(); end();
player.sendMessage("The mage doesn't seem interested in talking to you."); player.sendMessage("The mage doesn't seem interested in talking to you.");
return true; return true;
@@ -16,6 +16,7 @@ import core.ServerStore.Companion.getInt
import core.api.* import core.api.*
import core.cache.def.impl.ItemDefinition import core.cache.def.impl.ItemDefinition
import org.rs09.consts.Items import org.rs09.consts.Items
import content.data.Quests
enum class SkillcapePerks(val attribute: String, val effect: ((Player) -> Unit)? = null) { enum class SkillcapePerks(val attribute: String, val effect: ((Player) -> Unit)? = null) {
BAREFISTED_SMITHING("cape_perks:barefisted-smithing"), BAREFISTED_SMITHING("cape_perks:barefisted-smithing"),
@@ -195,11 +196,11 @@ enum class SkillcapePerks(val attribute: String, val effect: ((Player) -> Unit)?
end() end()
if(spellbook != null){ if(spellbook != null){
if (spellbook == SpellBookManager.SpellBook.ANCIENT) { if (spellbook == SpellBookManager.SpellBook.ANCIENT) {
if (!hasRequirement(player, "Desert Treasure")) if (!hasRequirement(player, Quests.DESERT_TREASURE))
return true return true
} }
else if (spellbook == SpellBookManager.SpellBook.LUNAR) { else if (spellbook == SpellBookManager.SpellBook.LUNAR) {
if (!hasRequirement(player, "Lunar Diplomacy")) if (!hasRequirement(player, Quests.LUNAR_DIPLOMACY))
return true return true
} }
player.spellBookManager.setSpellBook(spellbook) player.spellBookManager.setSpellBook(spellbook)
@@ -260,9 +261,9 @@ enum class SkillcapePerks(val attribute: String, val effect: ((Player) -> Unit)?
fun sendAltar(player: Player,altar: Altar){ fun sendAltar(player: Player,altar: Altar){
end() end()
if (altar == Altar.DEATH && !hasRequirement(player, "Mourning's End Part II")) return if (altar == Altar.DEATH && !hasRequirement(player, Quests.MOURNINGS_END_PART_II)) return
if (altar == Altar.ASTRAL && !hasRequirement(player, "Lunar Diplomacy")) return if (altar == Altar.ASTRAL && !hasRequirement(player, Quests.LUNAR_DIPLOMACY)) return
if (altar == Altar.BLOOD && !hasRequirement(player, "Legacy of Seergaze")) return if (altar == Altar.BLOOD && !hasRequirement(player, Quests.LEGACY_OF_SEERGAZE)) return
if (altar == Altar.LAW && !ItemDefinition.canEnterEntrana(player)) { if (altar == Altar.LAW && !ItemDefinition.canEnterEntrana(player)) {
sendItemDialogue(player, Items.SARADOMIN_SYMBOL_8055, "No weapons or armour are permitted on holy Entrana.") sendItemDialogue(player, Items.SARADOMIN_SYMBOL_8055, "No weapons or armour are permitted on holy Entrana.")
return return
@@ -17,6 +17,7 @@ import core.plugin.Initializable;
import static core.tools.DialogueConstKt.END_DIALOGUE; import static core.tools.DialogueConstKt.END_DIALOGUE;
import content.data.Quests;
/** /**
* Represents the dialogue plugin used for a slayer master. * Represents the dialogue plugin used for a slayer master.
@@ -99,7 +100,7 @@ public final class SlayerMasterDialogue extends DialoguePlugin {
npc = (NPC) args[0]; npc = (NPC) args[0];
} }
master = Master.forId(args[0] instanceof NPC ? ((NPC) args[0]).getId() : (int) args[0]); master = Master.forId(args[0] instanceof NPC ? ((NPC) args[0]).getId() : (int) args[0]);
quest = player.getQuestRepository().getQuest("Animal Magnetism"); quest = player.getQuestRepository().getQuest(Quests.ANIMAL_MAGNETISM);
if (master == Master.DURADEL) { if (master == Master.DURADEL) {
if (Skillcape.isMaster(player, Skills.SLAYER)) { if (Skillcape.isMaster(player, Skills.SLAYER)) {
@@ -12,6 +12,7 @@ import core.plugin.Initializable;
import core.plugin.Plugin; import core.plugin.Plugin;
import static core.api.ContentAPIKt.hasRequirement; import static core.api.ContentAPIKt.hasRequirement;
import content.data.Quests;
/** /**
* Handles related slayer nodes. * Handles related slayer nodes.
@@ -63,7 +64,7 @@ public class SlayerPlugin extends OptionHandler {
player.teleport(new Location(2729, 3733, 0)); player.teleport(new Location(2729, 3733, 0));
break; break;
case 15767: case 15767:
if (!hasRequirement(player, "Cabin Fever")) if (!hasRequirement(player, Quests.CABIN_FEVER))
return true; return true;
player.teleport(new Location(3748, 9373, 0)); player.teleport(new Location(3748, 9373, 0));
break; break;
@@ -17,6 +17,7 @@ import core.plugin.Plugin;
import core.plugin.ClassScanner; import core.plugin.ClassScanner;
import static core.api.ContentAPIKt.hasRequirement; import static core.api.ContentAPIKt.hasRequirement;
import content.data.Quests;
/** /**
* Handles the slayer reward interface plugin. * Handles the slayer reward interface plugin.
@@ -309,7 +310,7 @@ public class SlayerRewardPlugin extends ComponentPlugin {
@Override @Override
public boolean handle(Player player, Node node, String option) { public boolean handle(Player player, Node node, String option) {
if (!hasRequirement(player, "Smoking Kills")) if (!hasRequirement(player, Quests.SMOKING_KILLS))
return true; return true;
openTab(player, BUY); openTab(player, BUY);
return true; return true;
@@ -8,6 +8,7 @@ import java.util.HashMap;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
import static core.api.ContentAPIKt.hasRequirement; import static core.api.ContentAPIKt.hasRequirement;
import content.data.Quests;
/** /**
* A non-garbage way of representing tasks * A non-garbage way of representing tasks
@@ -30,34 +31,34 @@ public enum Tasks {
BLACK_DRAGONS(80, new int[] {54, 4673, 4674, 4675, 4676, 3376, 50 }, new String[] { "Black dragons are the strongest dragons;", "watch out for their fiery breath." }, 1, false, true), BLACK_DRAGONS(80, new int[] {54, 4673, 4674, 4675, 4676, 3376, 50 }, new String[] { "Black dragons are the strongest dragons;", "watch out for their fiery breath." }, 1, false, true),
BLOODVELDS(50, new int[] { 1618, 1619, 6215, 7643, 7642 }, new String[] { "Bloodvelds are strange demonic creatures, they use their", "long rasping tongue to feed on just about", "anything they can find." }, 50, false, false), BLOODVELDS(50, new int[] { 1618, 1619, 6215, 7643, 7642 }, new String[] { "Bloodvelds are strange demonic creatures, they use their", "long rasping tongue to feed on just about", "anything they can find." }, 50, false, false),
BLUE_DRAGONS(65, new int[] { 55, 4681, 4682, 4683, 4684, 5178, 52, 4665, 4666, }, new String[] { "Blue dragons aren't as strong as other dragons but they're", "still very powerful, watch out for their fiery breath." }, 1, false, true), BLUE_DRAGONS(65, new int[] { 55, 4681, 4682, 4683, 4684, 5178, 52, 4665, 4666, }, new String[] { "Blue dragons aren't as strong as other dragons but they're", "still very powerful, watch out for their fiery breath." }, 1, false, true),
BRINE_RATS(45, new int[] { 3707 }, new String[] { "Brine rats can be found in caves that are near the", "sea. They are hairless, bad-tempered and generally", "unfriendly." }, 47, "Olaf's Quest"), BRINE_RATS(45, new int[] { 3707 }, new String[] { "Brine rats can be found in caves that are near the", "sea. They are hairless, bad-tempered and generally", "unfriendly." }, 47, Quests.OLAFS_QUEST),
BRONZE_DRAGONS(75, new int[] { 1590 }, new String[] { "Bronze Dragons are the weakest of the metallic", "dragons, their bronze scales are far thicker than", "normal bronze armour." }, 1, false, true), BRONZE_DRAGONS(75, new int[] { 1590 }, new String[] { "Bronze Dragons are the weakest of the metallic", "dragons, their bronze scales are far thicker than", "normal bronze armour." }, 1, false, true),
CATABLEPONS(35, new int[] { 4397, 4398, 4399, }, new String[] { "Catablepon are mythical, cow like, magical creatures", "Beware their weakening glare." }, 1, false, false), CATABLEPONS(35, new int[] { 4397, 4398, 4399, }, new String[] { "Catablepon are mythical, cow like, magical creatures", "Beware their weakening glare." }, 1, false, false),
CAVE_BUG(1, new int[] { 1832, 5750, }, new String[] { "Cave Bugs are like Cave Crawlers, except smaller and", "easier to squish, though they still have a fondness", "for plants." }, 7, false, false), CAVE_BUG(1, new int[] { 1832, 5750, }, new String[] { "Cave Bugs are like Cave Crawlers, except smaller and", "easier to squish, though they still have a fondness", "for plants." }, 7, false, false),
CAVE_CRAWLERS(10, new int[] { 1600, 1601, 1602, 1603, }, new String[] { "Cave Crawlers are small and fast, often hiding in", "ambush. Avoid their barbed tongue or you'll", "get poisoned." }, 10, false, false), CAVE_CRAWLERS(10, new int[] { 1600, 1601, 1602, 1603, }, new String[] { "Cave Crawlers are small and fast, often hiding in", "ambush. Avoid their barbed tongue or you'll", "get poisoned." }, 10, false, false),
CAVE_HORRORS(85, new int[] { 4353, 4354, 4355, 4356, 4357, }, new String[] { "Cave Horrors can be found under Mos Le'Harmless. You", "will need a Witchwood Icon to fight them effectively." }, 58, "Cabin Fever"), CAVE_HORRORS(85, new int[] { 4353, 4354, 4355, 4356, 4357, }, new String[] { "Cave Horrors can be found under Mos Le'Harmless. You", "will need a Witchwood Icon to fight them effectively." }, 58, Quests.CABIN_FEVER),
CAVE_SLIMES(15, new int[] { 1831 }, new String[] { "Cave Slimes are the lesser cousins of Jellies, though", "don't be fooled they can still be dangerous as", "they're often poisonous." }, 17, false, false), CAVE_SLIMES(15, new int[] { 1831 }, new String[] { "Cave Slimes are the lesser cousins of Jellies, though", "don't be fooled they can still be dangerous as", "they're often poisonous." }, 17, false, false),
COCKATRICES(25, new int[] { 1620, 1621, 4227, }, new String[] { "Cockatrice, like Basilisks, have a gaze which will", "paralyse and harm their prey. You'll need a Mirror", "Shield to protect you." }, 25, false, false), COCKATRICES(25, new int[] { 1620, 1621, 4227, }, new String[] { "Cockatrice, like Basilisks, have a gaze which will", "paralyse and harm their prey. You'll need a Mirror", "Shield to protect you." }, 25, false, false),
COWS(5, new int[] { 81, 1766, 1768, 2310, 397, 955, 1767, 3309 }, new String[] { "Cows are bigger than you, so they'll often hit fairly", "hard but are usually fairly slow to react." }, 1, false, false), COWS(5, new int[] { 81, 1766, 1768, 2310, 397, 955, 1767, 3309 }, new String[] { "Cows are bigger than you, so they'll often hit fairly", "hard but are usually fairly slow to react." }, 1, false, false),
CRAWLING_HAND(1,new int[] { 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 4226, 7640, 7641 }, new String[] { "Crawling Hands are undead severed hands, fast and", "dexterous they claw their victims." }, 5, true, false), CRAWLING_HAND(1,new int[] { 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 4226, 7640, 7641 }, new String[] { "Crawling Hands are undead severed hands, fast and", "dexterous they claw their victims." }, 5, true, false),
CROCODILES(50, new int[] { 1993, 6779 }, new String[] { "Crocodiles are large reptiles which live near water.", "You'll want to have a stabbing weapon handy for", "puncturing their thick scaly hides." }, 1, false, false), CROCODILES(50, new int[] { 1993, 6779 }, new String[] { "Crocodiles are large reptiles which live near water.", "You'll want to have a stabbing weapon handy for", "puncturing their thick scaly hides." }, 1, false, false),
DAGANNOTHS(75, new int[] { 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 2454, 2455, 2456, 2881, 2882, 2883, 2887, 2888, 3591, }, new String[] { "Dagannoth are large sea dwelling creatures which are", "very aggressive. You'll often find them in caves", "near sea water." }, 1, "Horror from the Deep"), DAGANNOTHS(75, new int[] { 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 2454, 2455, 2456, 2881, 2882, 2883, 2887, 2888, 3591, }, new String[] { "Dagannoth are large sea dwelling creatures which are", "very aggressive. You'll often find them in caves", "near sea water." }, 1, Quests.HORROR_FROM_THE_DEEP),
DARK_BEASTS(90, new int[] { 2783 }, new String[] { "Dark Beasts are large, dog-like predators.", "Their massively muscled bodies protect", "them from crushing weapons." }, 90, "Mourning's Ends Part II"), DARK_BEASTS(90, new int[] { 2783 }, new String[] { "Dark Beasts are large, dog-like predators.", "Their massively muscled bodies protect", "them from crushing weapons." }, 90, Quests.MOURNINGS_END_PART_II),
DESERT_LIZARDS(15, new int[] { 2803, 2804, 2805, 2806, 2807, 2808 }, new String[] { "Lizards are large reptiles with tough skin. Those", "found in the desert will need you to douse them with", "freezing water to finish them off after a tough battle." }, 22, false, false), DESERT_LIZARDS(15, new int[] { 2803, 2804, 2805, 2806, 2807, 2808 }, new String[] { "Lizards are large reptiles with tough skin. Those", "found in the desert will need you to douse them with", "freezing water to finish them off after a tough battle." }, 22, false, false),
DOG(15, new int[] { 99, 3582, 1994, 1593, 1594, 3582 }, new String[] { "Dogs are much like Wolves, they are", "pack creatures which will hunt in groups." }, 1, false, false), DOG(15, new int[] { 99, 3582, 1994, 1593, 1594, 3582 }, new String[] { "Dogs are much like Wolves, they are", "pack creatures which will hunt in groups." }, 1, false, false),
DUST_DEVILS(70, new int[] { 1624 }, new String[] { "Dust Devils use clouds of dust, sand, ash and whatever", "else they can inhale to blind and disorientate", "their victims." }, 65, false, false), DUST_DEVILS(70, new int[] { 1624 }, new String[] { "Dust Devils use clouds of dust, sand, ash and whatever", "else they can inhale to blind and disorientate", "their victims." }, 65, false, false),
DWARF(6, new int[] { 118, 120, 121, 382, 3219, 3220, 3221, 3268, 3269, 3270, 3271, 3272, 3273, 3274, 3275, 3294, 3295, 4316, 5880, 5881, 5882, 5883, 5884, 5885, 2130, 2131, 2132, 2133, 3276, 3277, 3278, 3279, 119, 2423 }, new String[] { "Dwarves are a small but tough race of miners, often", "using pickaxes to pierce their opponents armour." }, 1, false, false), DWARF(6, new int[] { 118, 120, 121, 382, 3219, 3220, 3221, 3268, 3269, 3270, 3271, 3272, 3273, 3274, 3275, 3294, 3295, 4316, 5880, 5881, 5882, 5883, 5884, 5885, 2130, 2131, 2132, 2133, 3276, 3277, 3278, 3279, 119, 2423 }, new String[] { "Dwarves are a small but tough race of miners, often", "using pickaxes to pierce their opponents armour." }, 1, false, false),
EARTH_WARRIORS(35, new int[] { 124 }, new String[] { "Earth Warriors are a kind of earth elemental,", "grind them to dust with blunt weapons." }, 1, false, false), EARTH_WARRIORS(35, new int[] { 124 }, new String[] { "Earth Warriors are a kind of earth elemental,", "grind them to dust with blunt weapons." }, 1, false, false),
ELVES(70, new int[] { 1183, 1184, 2359, 2360, 2361, 2362, 2373, 7438, 7439, 7440, 7441 }, new String[]{ "Elves are quick, agile, and vicious fighters which", "often favour bows and polearms."}, 1, "Regicide"), ELVES(70, new int[] { 1183, 1184, 2359, 2360, 2361, 2362, 2373, 7438, 7439, 7440, 7441 }, new String[]{ "Elves are quick, agile, and vicious fighters which", "often favour bows and polearms."}, 1, Quests.REGICIDE),
// Waiting for either Rum Deal or Pirate Pete and Fever Spiders before adding this assignment // Waiting for either Rum Deal or Pirate Pete and Fever Spiders before adding this assignment
FEVER_SPIDER(1, new int[] { 2850 }, new String[] { "Fever Spiders are giant spiders that carry the deadly", "Spider Fever. If you don't want to catch it I suggest", "you wear Slayer Gloves to fight them." }, 42, "Rum Deal"), FEVER_SPIDER(1, new int[] { 2850 }, new String[] { "Fever Spiders are giant spiders that carry the deadly", "Spider Fever. If you don't want to catch it I suggest", "you wear Slayer Gloves to fight them." }, 42, Quests.RUM_DEAL),
FIRE_GIANTS(65, new int[] { 110, 1582, 1583, 1584, 1585, 1586, 7003, 7004 }, new String[] { "Like other giants, Fire Giants often wield large weapons", "learn to recognise what kind of weapon it is,", "and act accordingly." }, 1, false, false), FIRE_GIANTS(65, new int[] { 110, 1582, 1583, 1584, 1585, 1586, 7003, 7004 }, new String[] { "Like other giants, Fire Giants often wield large weapons", "learn to recognise what kind of weapon it is,", "and act accordingly." }, 1, false, false),
FLESH_CRAWLERS(15, new int[] { 4389, 4390, 4391 }, new String[] { "Flesh Crawlers are scavengers and will eat you - and", "anyone else, given the chance." }, 1, false, false), FLESH_CRAWLERS(15, new int[] { 4389, 4390, 4391 }, new String[] { "Flesh Crawlers are scavengers and will eat you - and", "anyone else, given the chance." }, 1, false, false),
GARGOYLES(80, new int[] { 1610, 6389 }, new String[] { "Gargoyles are winged creatures of stone. You'll need", "to fight them to near death before breaking them apart", "with a rock hammer." }, 75, false, false), GARGOYLES(80, new int[] { 1610, 6389 }, new String[] { "Gargoyles are winged creatures of stone. You'll need", "to fight them to near death before breaking them apart", "with a rock hammer." }, 75, false, false),
GHOSTS(13, new int[] { 103, 104, 491, 1541, 1549, 2716, 2931, 4387, 388, 5342, 5343, 5344, 5345, 5346, 5347, 5348, 1698, 5349, 5350, 5351, 5352, 5369, 5370, 5371, 5372, 5373, 5374, 5572, 6094, 6095, 6096, 6097, 6098, 6504, 13645, 13466, 13467, 13468, 13469, 13470, 13471, 13472, 13473, 13474, 13475, 13476, 13477, 13478, 13479, 13480, 13481 }, new String[] { "Ghosts are undead so magic is your best bet against", "them, there is even a spell specially for fighting", "the undead." }, 1, true, false), GHOSTS(13, new int[] { 103, 104, 491, 1541, 1549, 2716, 2931, 4387, 388, 5342, 5343, 5344, 5345, 5346, 5347, 5348, 1698, 5349, 5350, 5351, 5352, 5369, 5370, 5371, 5372, 5373, 5374, 5572, 6094, 6095, 6096, 6097, 6098, 6504, 13645, 13466, 13467, 13468, 13469, 13470, 13471, 13472, 13473, 13474, 13475, 13476, 13477, 13478, 13479, 13480, 13481 }, new String[] { "Ghosts are undead so magic is your best bet against", "them, there is even a spell specially for fighting", "the undead." }, 1, true, false),
GHOULS(25, new int[] { 1218, 3059 }, new String[] { "Ghouls aren't undead but they are stronger and", "tougher than they look. However they're also very", "cowardly and will run if they're losing a fight." }, 1, false, false), GHOULS(25, new int[] { 1218, 3059 }, new String[] { "Ghouls aren't undead but they are stronger and", "tougher than they look. However they're also very", "cowardly and will run if they're losing a fight." }, 1, false, false),
GOBLINS(1, new int[] { 100, 101, 102, 444, 445, 489, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 2274, 2275, 2276, 2277, 2278, 2279, 2280, 2281, 2678, 2679, 2680, 2681, 3060, 3264, 3265, 3266, 3267, 3413, 3414, 3415, 3726, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272, 4273, 4274, 4275, 4276, 4407, 4408, 4409, 4410, 4411, 4412, 4479, 4480, 4481, 4482, 4483, 4484, 4485, 4486, 4487, 4488, 4489, 4490, 4491, 4492, 4499, 4633, 4634, 4635, 4636, 4637, 5786, 5824, 5855, 5856, 6125, 6126, 6132, 6133, 6279, 6280, 6281, 6282, 6283, 6402, 6403, 6404, 6405, 6406, 6407, 6408, 6409, 6410, 6411, 6412, 6413, 6414, 6415, 6416, 6417, 6418, 6419, 6420, 6421, 6422, 6423, 6424, 6425, 6426, 6427, 6428, 6429, 6430, 6431, 6432, 6433, 6434, 6435, 6436, 6437, 6438, 6439, 6440, 6441, 6442, 6443, 6444, 6445, 6446, 6447, 6448, 6449, 6450, 6451, 6452, 6453, 6454, 6455, 6456, 6457, 6458, 6459, 6460, 6461, 6462, 6463, 6464, 6465, 6466, 6467, 6490, 6491, 6492, 6493, 6494, 6495, 6496, 6497 }, new String[] { "Goblins are mostly just annoying, but they can be vicious.", "Watch out for the spears they sometimes carry." }, 1, false, false), GOBLINS(1, new int[] { 100, 101, 102, 444, 445, 489, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 2274, 2275, 2276, 2277, 2278, 2279, 2280, 2281, 2678, 2679, 2680, 2681, 3060, 3264, 3265, 3266, 3267, 3413, 3414, 3415, 3726, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272, 4273, 4274, 4275, 4276, 4407, 4408, 4409, 4410, 4411, 4412, 4479, 4480, 4481, 4482, 4483, 4484, 4485, 4486, 4487, 4488, 4489, 4490, 4491, 4492, 4499, 4633, 4634, 4635, 4636, 4637, 5786, 5824, 5855, 5856, 6125, 6126, 6132, 6133, 6279, 6280, 6281, 6282, 6283, 6402, 6403, 6404, 6405, 6406, 6407, 6408, 6409, 6410, 6411, 6412, 6413, 6414, 6415, 6416, 6417, 6418, 6419, 6420, 6421, 6422, 6423, 6424, 6425, 6426, 6427, 6428, 6429, 6430, 6431, 6432, 6433, 6434, 6435, 6436, 6437, 6438, 6439, 6440, 6441, 6442, 6443, 6444, 6445, 6446, 6447, 6448, 6449, 6450, 6451, 6452, 6453, 6454, 6455, 6456, 6457, 6458, 6459, 6460, 6461, 6462, 6463, 6464, 6465, 6466, 6467, 6490, 6491, 6492, 6493, 6494, 6495, 6496, 6497 }, new String[] { "Goblins are mostly just annoying, but they can be vicious.", "Watch out for the spears they sometimes carry." }, 1, false, false),
GORAKS(70, new int[] { 4418, 6218 }, new String[] { "Goraks are extremely aggressive creatures. They have", "been imprisoned on an alternative plane, which is", "only accessible by using the fairyrings. Be extremely", "careful, their touch drains health as well as skills!" }, 1, "A Fairy Tale I - Growing Pains"), GORAKS(70, new int[] { 4418, 6218 }, new String[] { "Goraks are extremely aggressive creatures. They have", "been imprisoned on an alternative plane, which is", "only accessible by using the fairyrings. Be extremely", "careful, their touch drains health as well as skills!" }, 1, Quests.FAIRYTALE_I_GROWING_PAINS),
GREATER_DEMONS(75, new int[] { 83, 4698, 4699, 4700, 4701, 6204 }, new String[] { "Greater Demons are magic creatures so they are weak", "to magical attacks. Though not the strongest demon,", "they are still dangerous." }, 1, false, false), GREATER_DEMONS(75, new int[] { 83, 4698, 4699, 4700, 4701, 6204 }, new String[] { "Greater Demons are magic creatures so they are weak", "to magical attacks. Though not the strongest demon,", "they are still dangerous." }, 1, false, false),
GREEN_DRAGONS(52, new int[] { 941, 4677, 4678, 4679, 4680, 5362, 742 }, new String[] { "Green Dragons are the weakest dragon but still very", "powerful, watch out for their fiery breath." }, 1, false, true), GREEN_DRAGONS(52, new int[] { 941, 4677, 4678, 4679, 4680, 5362, 742 }, new String[] { "Green Dragons are the weakest dragon but still very", "powerful, watch out for their fiery breath." }, 1, false, true),
HARPIE_BUG_SWARMS(45, new int[] { 3153 }, new String[] { "Harpie Bug Swarms are pesky critters that are hard to", "hit. You need a lit bug lantern to distract them with", "its hypnotic light." }, 33, false, false), HARPIE_BUG_SWARMS(45, new int[] { 3153 }, new String[] { "Harpie Bug Swarms are pesky critters that are hard to", "hit. You need a lit bug lantern to distract them with", "its hypnotic light." }, 33, false, false),
@@ -70,21 +71,21 @@ public enum Tasks {
INFERNAL_MAGES(40, new int[] { 1643, 1644, 1645, 1646, 1647 }, new String[] { "Infernal Mages are dangerous spell users, beware of", "their magic spells and go properly prepared" }, 45, false, false), INFERNAL_MAGES(40, new int[] { 1643, 1644, 1645, 1646, 1647 }, new String[] { "Infernal Mages are dangerous spell users, beware of", "their magic spells and go properly prepared" }, 45, false, false),
IRON_DRAGONS(80, new int[] { 1591 }, new String[] { "Iron Dragons are some of the weaker metallic dragons,", "their iron scales are far thicker than normal", "iron armour." }, 1, false, true), IRON_DRAGONS(80, new int[] { 1591 }, new String[] { "Iron Dragons are some of the weaker metallic dragons,", "their iron scales are far thicker than normal", "iron armour." }, 1, false, true),
JELLIES(57, new int[] { 1637, 1638, 1639, 1640, 1641, 1642 }, new String[] { "Jellies are nasty cube-like gelatinous creatures which", "absorb everything they come across into themselves." }, 52, false, false), JELLIES(57, new int[] { 1637, 1638, 1639, 1640, 1641, 1642 }, new String[] { "Jellies are nasty cube-like gelatinous creatures which", "absorb everything they come across into themselves." }, 52, false, false),
JUNGLE_HORRORS(65, new int[] { 4348, 4349, 4350, 4351, 4352 }, new String[] { "Jungle Horrors can be found all over Mos Le'Harmless.", "They are strong and aggressive, so watch out!" }, 1, "Cabin Fever"), JUNGLE_HORRORS(65, new int[] { 4348, 4349, 4350, 4351, 4352 }, new String[] { "Jungle Horrors can be found all over Mos Le'Harmless.", "They are strong and aggressive, so watch out!" }, 1, Quests.CABIN_FEVER),
KALPHITES(15, new int[] { 1153, 1154, 1155, 1156, 1157, 1159, 1160, 1161 }, new String[] { "Kalphites are large insects which live in great hives", "under the desert sands." }, 1, false, false), KALPHITES(15, new int[] { 1153, 1154, 1155, 1156, 1157, 1159, 1160, 1161 }, new String[] { "Kalphites are large insects which live in great hives", "under the desert sands." }, 1, false, false),
// Waiting for the killer watt plane to be implemented before adding to assignments // Waiting for the killer watt plane to be implemented before adding to assignments
KILLERWATTS(1, new int[] { 3201 }, new String[] { "Killerwatts store huge amounts of energy in their", "bodies, which is released if they are touched. You'll", "need to wear heavily insulated boots to counter this", "shocking effect." }, 37, "Ernest the Chicken"), KILLERWATTS(1, new int[] { 3201 }, new String[] { "Killerwatts store huge amounts of energy in their", "bodies, which is released if they are touched. You'll", "need to wear heavily insulated boots to counter this", "shocking effect." }, 37, Quests.ERNEST_THE_CHICKEN),
KURASKS(65, new int[] { 1608, 1609, 4229, 7805, 7797 }, new String[] { "Kurasks are large brutal creatures with very thick", "hides. You'll need a Leaf-Tipped Spear Sword or", "Battle-axe, Broad Arrows, or a Magic Dart to harm them." }, 70, false, false), KURASKS(65, new int[] { 1608, 1609, 4229, 7805, 7797 }, new String[] { "Kurasks are large brutal creatures with very thick", "hides. You'll need a Leaf-Tipped Spear Sword or", "Battle-axe, Broad Arrows, or a Magic Dart to harm them." }, 70, false, false),
LESSER_DEMONS(60, new int[] { 82, 6203, 3064, 4694, 4695, 6206, 3064, 4696, 4697, 6101 }, new String[] { "Lesser Demons are magic creatures so they are weak to", "magical attacks. Though they're relatively weak they", "are still dangerous." }, 1, false, false), LESSER_DEMONS(60, new int[] { 82, 6203, 3064, 4694, 4695, 6206, 3064, 4696, 4697, 6101 }, new String[] { "Lesser Demons are magic creatures so they are weak to", "magical attacks. Though they're relatively weak they", "are still dangerous." }, 1, false, false),
MINOTAURS(7, new int[] { 4404, 4405, 4406 }, new String[] { "Minotaurs are large manlike creatures but you'll", "want to be careful of their horns." }, 1, false, false), MINOTAURS(7, new int[] { 4404, 4405, 4406 }, new String[] { "Minotaurs are large manlike creatures but you'll", "want to be careful of their horns." }, 1, false, false),
MITHRIL_DRAGONS(60, new int[] { 5363 }, new String[] { "Mithril dragons are more vulnerable to magic and to", "stab-based melee attacks than to anything else." }, 1, false, true), MITHRIL_DRAGONS(60, new int[] { 5363 }, new String[] { "Mithril dragons are more vulnerable to magic and to", "stab-based melee attacks than to anything else." }, 1, false, true),
MOGRES(1, new int[] { 114 }, new String[] { "Mogres are a type of aquatic Ogre that is", "often mistaken for a giant mudskipper. You have to force", "them out of the water with a fishing explosive." }, 32, false, false), MOGRES(1, new int[] { 114 }, new String[] { "Mogres are a type of aquatic Ogre that is", "often mistaken for a giant mudskipper. You have to force", "them out of the water with a fishing explosive." }, 32, false, false),
// Waiting for molanisks transform to be implemented before adding this to assignments // Waiting for molanisks transform to be implemented before adding this to assignments
MOLANISKS(1, new int[] { 5751 }, new String[] { "Molanisks are subterranean creatures. You can find", "them in caves deep below the ground. I heard that the", "goblins have recently had trouble with some, but they", "use a bell of some sort to deal with them."}, 39, "Death to the Dorgeshuun"), MOLANISKS(1, new int[] { 5751 }, new String[] { "Molanisks are subterranean creatures. You can find", "them in caves deep below the ground. I heard that the", "goblins have recently had trouble with some, but they", "use a bell of some sort to deal with them."}, 39, Quests.DEATH_TO_THE_DORGESHUUN),
MONKEYS(1, new int[] { 132, 1463, 1464, 2301, 4344, 4363, 6943, 7211, 7213, 7215, 7217, 7219, 7221, 7223, 7225, 7227, 1455, 1459, 1460, 1456, 1457, 1458 }, new String[] { "Monkeys are tricky creatures, they are agile and", "fairly fast. Learn to anticipate their movements." }, 1, false, false), MONKEYS(1, new int[] { 132, 1463, 1464, 2301, 4344, 4363, 6943, 7211, 7213, 7215, 7217, 7219, 7221, 7223, 7225, 7227, 1455, 1459, 1460, 1456, 1457, 1458 }, new String[] { "Monkeys are tricky creatures, they are agile and", "fairly fast. Learn to anticipate their movements." }, 1, false, false),
MOSS_GIANTS(40, new int[] { 112, 1587, 1588, 1681, 4534, 4688, 4706 }, new String[] { "Like other giants, Moss Giants often wield large", "weapons, learn to recognise what kind of weapon it is", "and act accordingly." }, 1, false, false), MOSS_GIANTS(40, new int[] { 112, 1587, 1588, 1681, 4534, 4688, 4706 }, new String[] { "Like other giants, Moss Giants often wield large", "weapons, learn to recognise what kind of weapon it is", "and act accordingly." }, 1, false, false),
// Waiting for zygomite transform to be implemented before adding this to assignments // Waiting for zygomite transform to be implemented before adding this to assignments
MUTATED_ZYGOMITES(1, new int[] { 3346, 3347 }, new String[] { "Mutated Zygomites are hard to destroy. They regenerate", "quickly so you will need to finish them with fungicide." }, 57, "Lost City"), MUTATED_ZYGOMITES(1, new int[] { 3346, 3347 }, new String[] { "Mutated Zygomites are hard to destroy. They regenerate", "quickly so you will need to finish them with fungicide." }, 57, Quests.LOST_CITY),
NECHRYAELS(85, new int[] { 1613 }, new String[] { "Nechryael are demons of decay which summon small", "winged beings to help them fight their victims." }, 80, false, false), NECHRYAELS(85, new int[] { 1613 }, new String[] { "Nechryael are demons of decay which summon small", "winged beings to help them fight their victims." }, 80, false, false),
OGRES(40, new int[] { 115, 374, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2060, 2801, 3419, 7078, 7079, 7080, 7081, 7082 }, new String[] { "Ogres are brutal creatures, favouring large blunt", "maces and clubs they often attack without warning." }, 1, false, false), OGRES(40, new int[] { 115, 374, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2060, 2801, 3419, 7078, 7079, 7080, 7081, 7082 }, new String[] { "Ogres are brutal creatures, favouring large blunt", "maces and clubs they often attack without warning." }, 1, false, false),
OTHERWORDLY_BEING(40, new int[] { 126 }, new String[] { "Otherworldly Beings are ethereal beings making them", "weak to magical attack." }, 1, false, false), OTHERWORDLY_BEING(40, new int[] { 126 }, new String[] { "Otherworldly Beings are ethereal beings making them", "weak to magical attack." }, 1, false, false),
@@ -92,22 +93,22 @@ public enum Tasks {
RED_DRAGONS(1, new int[] { 53, 1589, 3588, 4667, 4668, 4669, 4670, 4671, 4672 }, new String[] { "Red Dragons are very powerful, stronger than most", "dragons, watch out for their fiery breath." }, 1, false, false), RED_DRAGONS(1, new int[] { 53, 1589, 3588, 4667, 4668, 4669, 4670, 4671, 4672 }, new String[] { "Red Dragons are very powerful, stronger than most", "dragons, watch out for their fiery breath." }, 1, false, false),
ROCK_SLUGS(20, new int[] { 1631, 1632 }, new String[] { "Rockslugs are strange stoney slugs. You'll need to", "fight them to near death before finishing them off", "with Salt." }, 20, false, false), ROCK_SLUGS(20, new int[] { 1631, 1632 }, new String[] { "Rockslugs are strange stoney slugs. You'll need to", "fight them to near death before finishing them off", "with Salt." }, 20, false, false),
// Seems to need Contact or the NPCs added to dungeons before adding this assignment as a task // Seems to need Contact or the NPCs added to dungeons before adding this assignment as a task
SCABARITES(1, new int[] { 2001, 4500, 5251, 5252, 5255, 5256, 5250, 5254, 6777, 6778, 6774, 6780, 6781, 6773 }, new String[] {"Scabarites are insectoid creatures, found beyond the", "Kharidian deserts. They can be extremely dangerous."}, 1, "Contact!"), SCABARITES(1, new int[] { 2001, 4500, 5251, 5252, 5255, 5256, 5250, 5254, 6777, 6778, 6774, 6780, 6781, 6773 }, new String[] {"Scabarites are insectoid creatures, found beyond the", "Kharidian deserts. They can be extremely dangerous."}, 1, Quests.CONTACT),
SCORPIONS(7, new int[] { 107, 1477, 4402, 4403, 144 }, new String[] { "Scorpions are almost always poisonous, their hard", "carapace makes them resistant to crushing and", "stabbing attacks." }, 1, false, false), SCORPIONS(7, new int[] { 107, 1477, 4402, 4403, 144 }, new String[] { "Scorpions are almost always poisonous, their hard", "carapace makes them resistant to crushing and", "stabbing attacks." }, 1, false, false),
SEA_SNAKES(1, new int[] { 3939, 3940 }, new String[] { "Sea Snakes are long and slithery with a venomous bite.", "The larger ones are more poisonous, so keep an eye on", "your health." }, 1, "Royal Trouble"), SEA_SNAKES(1, new int[] { 3939, 3940 }, new String[] { "Sea Snakes are long and slithery with a venomous bite.", "The larger ones are more poisonous, so keep an eye on", "your health." }, 1, Quests.ROYAL_TROUBLE),
SHADE(30, new int[] { 3617, 1250, 1241, 1246, 1248, 1250, 428, 1240 }, new String[] { "Shades are undead so magic is your best best against", "them, you can find Shades at Mort'ton." }, 1, true, false), SHADE(30, new int[] { 3617, 1250, 1241, 1246, 1248, 1250, 428, 1240 }, new String[] { "Shades are undead so magic is your best best against", "them, you can find Shades at Mort'ton." }, 1, true, false),
// Dungeon needs to be connected to the Legend's Guild before adding this assignment as a task // Dungeon needs to be connected to the Legend's Guild before adding this assignment as a task
SHADOW_WARRIORS(1, new int[] { 158 }, new String[] { "Shadow Warriors are dark and mysterious, they hide in", "the shadows so be wary of ambushes." }, 1, "Legends' Quest"), SHADOW_WARRIORS(1, new int[] { 158 }, new String[] { "Shadow Warriors are dark and mysterious, they hide in", "the shadows so be wary of ambushes." }, 1, Quests.LEGENDS_QUEST),
SKELETAL_WYVERN(70, new int[] { 3068, 3069, 3070, 3071 }, new String[] { "Skeletal Wyverns are extremely dangerous and they are", "hard to hit with arrows as they slip right through.", "To stand a good chance of surviving you'll need some", "elemental shielding from its icy breath." }, 72, false, false), SKELETAL_WYVERN(70, new int[] { 3068, 3069, 3070, 3071 }, new String[] { "Skeletal Wyverns are extremely dangerous and they are", "hard to hit with arrows as they slip right through.", "To stand a good chance of surviving you'll need some", "elemental shielding from its icy breath." }, 72, false, false),
SKELETONS(15, new int[] { 90, 91, 92, 93, 94, 459, 1471, 1575, 1973, 2036, 2037, 2715, 2717, 3065, 3151, 3291, 3581, 3697, 3698, 3699, 3700, 3701, 3702, 3703, 3704, 3705, 3844, 3850, 3851, 4384, 4385, 4386, 5332, 5333, 5334, 5335, 5336, 5337, 5338, 5339, 5340, 5341, 5359, 5365, 5366, 5367, 5368, 5381, 5384, 5385, 5386, 5387, 5388, 5389, 5390, 5391, 5392, 5411, 5412, 5422, 6091, 6092, 6093, 6103, 6104, 6105, 6106, 6107, 6764, 6765, 6766, 6767, 6768, 2050, 2056, 2057, 1539, 7640 }, new String[] { "Skeletons are undead so magic is your best bet against", "them, there is even a spell specially for fighting the undead." }, 1, true, false), SKELETONS(15, new int[] { 90, 91, 92, 93, 94, 459, 1471, 1575, 1973, 2036, 2037, 2715, 2717, 3065, 3151, 3291, 3581, 3697, 3698, 3699, 3700, 3701, 3702, 3703, 3704, 3705, 3844, 3850, 3851, 4384, 4385, 4386, 5332, 5333, 5334, 5335, 5336, 5337, 5338, 5339, 5340, 5341, 5359, 5365, 5366, 5367, 5368, 5381, 5384, 5385, 5386, 5387, 5388, 5389, 5390, 5391, 5392, 5411, 5412, 5422, 6091, 6092, 6093, 6103, 6104, 6105, 6106, 6107, 6764, 6765, 6766, 6767, 6768, 2050, 2056, 2057, 1539, 7640 }, new String[] { "Skeletons are undead so magic is your best bet against", "them, there is even a spell specially for fighting the undead." }, 1, true, false),
SPIDERS(1, new int[] { 61, 1004, 1221, 1473, 1474, 63, 4401, 2034, 977, 7207, 134, 1009, 59, 60, 4400, 58, 62, 1478, 2491, 2492, 6376, 6377, }, new String[] { "Spiders are often poisonous, and many varieties are", "camouflaged too." }, 1, false, false), SPIDERS(1, new int[] { 61, 1004, 1221, 1473, 1474, 63, 4401, 2034, 977, 7207, 134, 1009, 59, 60, 4400, 58, 62, 1478, 2491, 2492, 6376, 6377, }, new String[] { "Spiders are often poisonous, and many varieties are", "camouflaged too." }, 1, false, false),
SPIRTUAL_MAGES(60, new int[] { 6221, 6231, 6257, 6278 }, new String[] { "Spiritual mages can be found in the icy caverns near", "Trollheim, supporting the cause of their chosen god." }, 83, "Death Plateau"), SPIRTUAL_MAGES(60, new int[] { 6221, 6231, 6257, 6278 }, new String[] { "Spiritual mages can be found in the icy caverns near", "Trollheim, supporting the cause of their chosen god." }, 83, Quests.DEATH_PLATEAU),
SPIRTUAL_RANGERS(60, new int[] { 6220, 6230, 6256, 6276 }, new String[] { "Spiritual rangers can be found in the icy caverns near", "Trollheim, supporting the cause of their chosen god." }, 63, "Death Plateau"), SPIRTUAL_RANGERS(60, new int[] { 6220, 6230, 6256, 6276 }, new String[] { "Spiritual rangers can be found in the icy caverns near", "Trollheim, supporting the cause of their chosen god." }, 63, Quests.DEATH_PLATEAU),
SPIRTUAL_WARRIORS(60, new int[] { 6219, 6229, 6255, 6277, }, new String[] { "Spiritual warriors can be found in the icy caverns near", "Trollheim, supporting the cause of their chosen god." }, 68, "Death Plateau"), SPIRTUAL_WARRIORS(60, new int[] { 6219, 6229, 6255, 6277, }, new String[] { "Spiritual warriors can be found in the icy caverns near", "Trollheim, supporting the cause of their chosen god." }, 68, Quests.DEATH_PLATEAU),
STEEL_DRAGONS( 85,new int[] { 1592, 3590 }, new String[] { "Steel dragons are dangerous and metallic, with steel", "scales that are far thicker than normal steel armour. As", "you are an accomplished slayer, I am sure you'll be", "able to deal with them easily."}, 1, false, true), STEEL_DRAGONS( 85,new int[] { 1592, 3590 }, new String[] { "Steel dragons are dangerous and metallic, with steel", "scales that are far thicker than normal steel armour. As", "you are an accomplished slayer, I am sure you'll be", "able to deal with them easily."}, 1, false, true),
SUQAHS (65, new int[] { 4527, 4528, 4529, 4530, 4531, 4532, 4533 }, new String[] { "Suqahs can only be found on the mystical Lunar Isle.", "They are capable of melee and magic attacks and often", "drop hide, teeth and herbs!" }, 1, "Lunar Diplomacy"), SUQAHS (65, new int[] { 4527, 4528, 4529, 4530, 4531, 4532, 4533 }, new String[] { "Suqahs can only be found on the mystical Lunar Isle.", "They are capable of melee and magic attacks and often", "drop hide, teeth and herbs!" }, 1, Quests.LUNAR_DIPLOMACY),
// No access to Lair of Tarn Razorlor but this should be added as a task when there is access // No access to Lair of Tarn Razorlor but this should be added as a task when there is access
TERROR_DOGS(1, new int[] { 5417, 5418 }, new String[] { "Terror dogs are the personal pets of Tarn Razorlor.", "Wherever you find him, you will find them. They are", "bad-tempered and generally unfriendly." }, 40, "Haunted Mine"), TERROR_DOGS(1, new int[] { 5417, 5418 }, new String[] { "Terror dogs are the personal pets of Tarn Razorlor.", "Wherever you find him, you will find them. They are", "bad-tempered and generally unfriendly." }, 40, Quests.HAUNTED_MINE),
TROLLS(60, new int[] { 72, 3584, 1098, 1096, 1097, 1095, 1101, 1105, 1102, 1103, 1104, 1130, 1131, 1132, 1133, 1134, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1138, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 3840, 3841, 3842, 3843, 3845, 1933, 1934, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 391, 392, 393, 394, 395, 396}, new String[] { "Trolls regenerate damage quickly but are still", "vulnerable to poisons, they usually use crushing", "weapons." }, 1, false, false), TROLLS(60, new int[] { 72, 3584, 1098, 1096, 1097, 1095, 1101, 1105, 1102, 1103, 1104, 1130, 1131, 1132, 1133, 1134, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1138, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 3840, 3841, 3842, 3843, 3845, 1933, 1934, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 391, 392, 393, 394, 395, 396}, new String[] { "Trolls regenerate damage quickly but are still", "vulnerable to poisons, they usually use crushing", "weapons." }, 1, false, false),
TUROTHS(60, new int[] { 1622, 1611, 1623, 1626, 1627, 1628, 1629, 1630, 7800}, new String[] { "Turoth are large vicious creatures with thick hides.", "You'll need a Leaf-Tipped Spear Sword or Battle-axe,", "Broad Arrows, or a Magic Dart to harm them." }, 55, false, false), TUROTHS(60, new int[] { 1622, 1611, 1623, 1626, 1627, 1628, 1629, 1630, 7800}, new String[] { "Turoth are large vicious creatures with thick hides.", "You'll need a Leaf-Tipped Spear Sword or Battle-axe,", "Broad Arrows, or a Magic Dart to harm them." }, 55, false, false),
VAMPIRES(35, new int[] { 1220, 1223, 1225, 6214 }, new String[] { "Vampires are extremely powerful beings. They feed on", "the blood of the living so watch out you don't", "get bitten." }, 1, false, false), VAMPIRES(35, new int[] { 1220, 1223, 1225, 6214 }, new String[] { "Vampires are extremely powerful beings. They feed on", "the blood of the living so watch out you don't", "get bitten." }, 1, false, false),
@@ -117,8 +118,8 @@ public enum Tasks {
// If a grapple is implemented from W Castle Wars to E Posion Swamps // If a grapple is implemented from W Castle Wars to E Posion Swamps
// The dungeon connected and populated // The dungeon connected and populated
// then these could be added as a task // then these could be added as a task
WARPED_TERROR_BIRD(1, new int[] { 6285, 6286, 6287, 6288, 6289, 6290, 6291, 6292, 6293, 6294, 6295, 6323, 6324, 6325, 6326, 6327, 6328, 6329, 6330, 6331, 6332, 6608 }, new String[] { "Warped Creatures can supposedly be found within a", "mysterious dungeon on the eastern edge of the Poison", "Waste. Be aware that to defeat them, you'll need to", "purify them in some way." },56, "The Path of Glouphrie"), WARPED_TERROR_BIRD(1, new int[] { 6285, 6286, 6287, 6288, 6289, 6290, 6291, 6292, 6293, 6294, 6295, 6323, 6324, 6325, 6326, 6327, 6328, 6329, 6330, 6331, 6332, 6608 }, new String[] { "Warped Creatures can supposedly be found within a", "mysterious dungeon on the eastern edge of the Poison", "Waste. Be aware that to defeat them, you'll need to", "purify them in some way." },56, Quests.THE_PATH_OF_GLOUPHRIE),
WARPED_TORTOISE(1, new int[] { 6296, 6297 }, new String[] { "Warped Creatures can supposedly be found within a", "mysterious dungeon on the eastern edge of the Poison", "Waste. Be aware that to defeat them, you'll need to", "purify them in some way." },56, "The Path of Glouphrie"), WARPED_TORTOISE(1, new int[] { 6296, 6297 }, new String[] { "Warped Creatures can supposedly be found within a", "mysterious dungeon on the eastern edge of the Poison", "Waste. Be aware that to defeat them, you'll need to", "purify them in some way." },56, Quests.THE_PATH_OF_GLOUPHRIE),
WATERFIENDS(75, new int[] { 5361 }, new String[] { "Waterfiends are creatures of water, which live under", "the Baxtorian Lake. Their watery form is well defended", "against slashing and piercing weapons, so use", "something blunt." }, 1, false, false), WATERFIENDS(75, new int[] { 5361 }, new String[] { "Waterfiends are creatures of water, which live under", "the Baxtorian Lake. Their watery form is well defended", "against slashing and piercing weapons, so use", "something blunt." }, 1, false, false),
WEREWOLVES(60, new int[] { 6006, 6007, 6008, 6009, 6010, 6011, 6012, 6013, 6014, 6015, 6016, 6017, 6018, 6019, 6020, 6021, 6022, 6023, 6024, 6025, 6212, 6213, 6607, 6609, 6614, 6617, 6625, 6632, 6644, 6663, 6675, 6686, 6701, 6712, 6724, 6728, }, new String[] { "Werewolves are feral creatures, they are strong and", "tough with sharp claws and teeth." }, 1, false, false), WEREWOLVES(60, new int[] { 6006, 6007, 6008, 6009, 6010, 6011, 6012, 6013, 6014, 6015, 6016, 6017, 6018, 6019, 6020, 6021, 6022, 6023, 6024, 6025, 6212, 6213, 6607, 6609, 6614, 6617, 6625, 6632, 6644, 6663, 6675, 6686, 6701, 6712, 6724, 6728, }, new String[] { "Werewolves are feral creatures, they are strong and", "tough with sharp claws and teeth." }, 1, false, false),
WOLVES(20, new int[] { 95, 96, 97, 141, 142, 143, 839, 1198, 1330, 1558, 1559, 1951, 1952, 1953, 1954, 1955, 1956, 4413, 4414, 6046, 6047, 6048, 6049, 6050, 6051, 6052, 6829, 6830, 7005 }, new String[] { "Wolves are pack animals, so you'll always find them", "in groups. Watch out for their bite, it can be nasty." }, 1, false, false), WOLVES(20, new int[] { 95, 96, 97, 141, 142, 143, 839, 1198, 1330, 1558, 1559, 1951, 1952, 1953, 1954, 1955, 1956, 4413, 4414, 6046, 6047, 6048, 6049, 6050, 6051, 6052, 6829, 6830, 7005 }, new String[] { "Wolves are pack animals, so you'll always find them", "in groups. Watch out for their bite, it can be nasty." }, 1, false, false),
@@ -144,7 +145,7 @@ public enum Tasks {
public final int[] ids; public final int[] ids;
public boolean undead = false; public boolean undead = false;
public boolean dragon = false; public boolean dragon = false;
public String questReq = ""; public Quests questReq = null;
Tasks(int combatCheck, int[] ids, String[] info, int levelReq, boolean undead, boolean dragon){ Tasks(int combatCheck, int[] ids, String[] info, int levelReq, boolean undead, boolean dragon){
this.levelReq = levelReq; this.levelReq = levelReq;
this.ids = ids; this.ids = ids;
@@ -154,7 +155,7 @@ public enum Tasks {
this.combatCheck = combatCheck; this.combatCheck = combatCheck;
} }
Tasks (int combatCheck, int[] ids, String[] info, int levelReq, String questReq) { Tasks (int combatCheck, int[] ids, String[] info, int levelReq, Quests questReq) {
this.combatCheck = combatCheck; this.combatCheck = combatCheck;
this.ids = ids; this.ids = ids;
this.info = info; this.info = info;
@@ -171,7 +172,7 @@ public enum Tasks {
} }
public boolean hasQuestRequirements (Player player) { public boolean hasQuestRequirements (Player player) {
return questReq.isEmpty() || hasRequirement(player, questReq, false); return questReq == null || hasRequirement(player, questReq, false);
} }
public static Tasks forId(int id){ public static Tasks forId(int id){
@@ -19,6 +19,7 @@ import core.plugin.Plugin;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import content.data.Quests;
/** /**
* Represents the plugin used for the furnace. * Represents the plugin used for the furnace.
@@ -64,7 +65,7 @@ public final class FurnaceOptionPlugin extends OptionHandler {
private static void show(final Player player) { private static void show(final Player player) {
player.getInterfaceManager().openChatbox(311); player.getInterfaceManager().openChatbox(311);
player.getPacketDispatch().sendItemZoomOnInterface(2349, 150, 311, 4); player.getPacketDispatch().sendItemZoomOnInterface(2349, 150, 311, 4);
if (player.getQuestRepository().isComplete("The Knight's Sword")) { if (player.getQuestRepository().isComplete(Quests.THE_KNIGHTS_SWORD)) {
player.getPacketDispatch().sendString("<br><br><br><br><col=000000>Blurite", 311, 20); player.getPacketDispatch().sendString("<br><br><br><br><col=000000>Blurite", 311, 20);
} }
player.getPacketDispatch().sendItemZoomOnInterface(Bar.BLURITE.getProduct().getId(), 150, 311, 5); player.getPacketDispatch().sendItemZoomOnInterface(Bar.BLURITE.getProduct().getId(), 150, 311, 5);
@@ -14,6 +14,7 @@ import core.tools.StringUtils;
import static core.api.ContentAPIKt.hasRequirement; import static core.api.ContentAPIKt.hasRequirement;
import static core.api.ContentAPIKt.sendDialogue; import static core.api.ContentAPIKt.sendDialogue;
import content.data.Quests;
/** /**
* Represents the pulse used to smith a bar. * Represents the pulse used to smith a bar.
@@ -67,11 +68,11 @@ public class SmithingPulse extends SkillPulse<Item> {
player.getDialogueInterpreter().sendDialogue("You need a hammer to work the metal with."); player.getDialogueInterpreter().sendDialogue("You need a hammer to work the metal with.");
return false; return false;
} }
if (!player.getQuestRepository().isComplete("The Tourist Trap") && bar.getSmithingType() == SmithingType.TYPE_DART_TIP) { if (!player.getQuestRepository().isComplete(Quests.THE_TOURIST_TRAP) && bar.getSmithingType() == SmithingType.TYPE_DART_TIP) {
player.getDialogueInterpreter().sendDialogue("You need to complete Tourist Trap to smith dart tips."); player.getDialogueInterpreter().sendDialogue("You need to complete Tourist Trap to smith dart tips.");
return false; return false;
} }
if (!hasRequirement(player, "Death Plateau", false) && bar.getSmithingType() == SmithingType.TYPE_CLAWS) { if (!hasRequirement(player, Quests.DEATH_PLATEAU, false) && bar.getSmithingType() == SmithingType.TYPE_CLAWS) {
sendDialogue(player, "You need to complete Death Plateau to smith claws."); sendDialogue(player, "You need to complete Death Plateau to smith claws.");
return false; return false;
} }
@@ -3,7 +3,6 @@ package content.global.skill.smithing.smelting;
import static core.api.ContentAPIKt.*; import static core.api.ContentAPIKt.*;
import core.api.Container; import core.api.Container;
import core.api.EquipmentSlot;
import core.game.event.ResourceProducedEvent; import core.game.event.ResourceProducedEvent;
import core.game.container.impl.EquipmentContainer; import core.game.container.impl.EquipmentContainer;
import core.tools.Log; import core.tools.Log;
@@ -19,6 +18,7 @@ import core.game.world.update.flag.context.Graphics;
import core.tools.RandomFunction; import core.tools.RandomFunction;
import core.tools.StringUtils; import core.tools.StringUtils;
import org.rs09.consts.Sounds; import org.rs09.consts.Sounds;
import content.data.Quests;
/** /**
* Represents the pulse used to smelt. * Represents the pulse used to smelt.
@@ -90,7 +90,7 @@ public class SmeltingPulse extends SkillPulse<Item> {
if (bar == null || player == null) { if (bar == null || player == null) {
return false; return false;
} }
if (bar == Bar.BLURITE && !player.getQuestRepository().isComplete("The Knight's Sword")) { if (bar == Bar.BLURITE && !player.getQuestRepository().isComplete(Quests.THE_KNIGHTS_SWORD)) {
return false; return false;
} }
if (player.getSkills().getLevel(Skills.SMITHING) < bar.getLevel()) { if (player.getSkills().getLevel(Skills.SMITHING) < bar.getLevel()) {
@@ -34,6 +34,7 @@ import core.plugin.Plugin;
import core.plugin.ClassScanner; import core.plugin.ClassScanner;
import static core.api.ContentAPIKt.*; import static core.api.ContentAPIKt.*;
import content.data.Quests;
/** /**
* Handles the summoning training room. * Handles the summoning training room.
@@ -81,7 +82,7 @@ public final class SummoningTrainingRoom extends OptionHandler {
public boolean handle(final Player player, Node node, String option) { public boolean handle(final Player player, Node node, String option) {
Scenery object = (Scenery) node; Scenery object = (Scenery) node;
Location loc = null; Location loc = null;
Quest quest = player.getQuestRepository().getQuest("Wolf Whistle"); Quest quest = player.getQuestRepository().getQuest(Quests.WOLF_WHISTLE);
int questVal = quest.getStage(player) == 0 ? 0 : quest.getStage(player) > 0 && quest.getStage(player) < 100 ? 5 : 28893; int questVal = quest.getStage(player) == 0 ? 0 : quest.getStage(player) > 0 && quest.getStage(player) < 100 ? 5 : 28893;
switch (option) { switch (option) {
case "close": case "close":
@@ -312,7 +313,7 @@ public final class SummoningTrainingRoom extends OptionHandler {
@Override @Override
public boolean open(Object... args) { public boolean open(Object... args) {
cutscene = (CutscenePlugin) args[0]; cutscene = (CutscenePlugin) args[0];
quest = player.getQuestRepository().getQuest("Wolf Whistle"); quest = player.getQuestRepository().getQuest(Quests.WOLF_WHISTLE);
fluffy = NPC.create(6990, cutscene.getBase().transform(41, 52, 1)); fluffy = NPC.create(6990, cutscene.getBase().transform(41, 52, 1));
fluffy.init(); fluffy.init();
fluffy.faceTemporary(player, 1); fluffy.faceTemporary(player, 1);
@@ -9,6 +9,7 @@ import core.game.node.item.Item;
import core.game.world.map.zone.ZoneBorders; import core.game.world.map.zone.ZoneBorders;
import core.plugin.Initializable; import core.plugin.Initializable;
import core.plugin.Plugin; import core.plugin.Plugin;
import content.data.Quests;
/** /**
* Handles summoning a familiar. * Handles summoning a familiar.
@@ -26,7 +27,7 @@ public final class SummonFamiliarPlugin extends OptionHandler {
@Override @Override
public boolean handle(Player player, Node node, String option) { public boolean handle(Player player, Node node, String option) {
Item item = (Item) node; Item item = (Item) node;
if (!player.getQuestRepository().isComplete("Wolf Whistle") && player.getAttribute("in-cutscene", null) == null) { if (!player.getQuestRepository().isComplete(Quests.WOLF_WHISTLE) && player.getAttribute("in-cutscene", null) == null) {
player.getPacketDispatch().sendMessage("You have to complete Wolf Whistle before you can summon a familiar."); player.getPacketDispatch().sendMessage("You have to complete Wolf Whistle before you can summon a familiar.");
return true; return true;
} }
@@ -10,14 +10,13 @@ import core.game.node.item.Item;
import core.game.node.scenery.Scenery; import core.game.node.scenery.Scenery;
import core.game.node.scenery.SceneryBuilder; import core.game.node.scenery.SceneryBuilder;
import core.game.world.GameWorld; import core.game.world.GameWorld;
import core.game.world.map.Direction;
import core.game.world.map.Location;
import core.game.world.map.RegionManager; import core.game.world.map.RegionManager;
import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Animation;
import core.tools.RandomFunction; import core.tools.RandomFunction;
import core.tools.StringUtils; import core.tools.StringUtils;
import static core.api.ContentAPIKt.*; import static core.api.ContentAPIKt.*;
import content.data.Quests;
/** /**
* Represents the pulse used to thieve a stall. * Represents the pulse used to thieve a stall.
@@ -74,12 +73,12 @@ public final class StallThiefPulse extends SkillPulse<Scenery> {
player.getPacketDispatch().sendMessage("You don't have enough inventory space."); player.getPacketDispatch().sendMessage("You don't have enough inventory space.");
return false; return false;
} }
if (player.getLocation().isInRegion(10553) && !isQuestComplete(player, "Fremennik Trials") && stall.full_ids.contains(4278)) { if (player.getLocation().isInRegion(10553) && !isQuestComplete(player, Quests.THE_FREMENNIK_TRIALS) && stall.full_ids.contains(4278)) {
sendDialogue(player, "The fur trader is staring at you suspiciously. You cannot steal from his stall while he distrusts you."); sendDialogue(player, "The fur trader is staring at you suspiciously. You cannot steal from his stall while he distrusts you.");
return false; return false;
} }
if (player.getLocation().isInRegion(10553) && !isQuestComplete(player, "Fremennik Trials") && stall.full_ids.contains(4277)) { if (player.getLocation().isInRegion(10553) && !isQuestComplete(player, Quests.THE_FREMENNIK_TRIALS) && stall.full_ids.contains(4277)) {
sendDialogue(player, "The fishmonger is staring at you suspiciously. You cannot steal from his stall while he distrusts you."); sendDialogue(player, "The fishmonger is staring at you suspiciously. You cannot steal from his stall while he distrusts you.");
return false; return false;
} }
@@ -1,6 +1,6 @@
package content.global.travel.glider; package content.global.travel.glider;
import content.region.kandarin.quest.grandtree.TheGrandTree; import content.data.Quests;
import core.game.component.Component; import core.game.component.Component;
import core.game.dialogue.DialoguePlugin; import core.game.dialogue.DialoguePlugin;
import core.game.dialogue.FacialExpression; import core.game.dialogue.FacialExpression;
@@ -58,7 +58,7 @@ public final class CaptainDalburDialogue extends DialoguePlugin {
stage = 1; stage = 1;
break; break;
case 1: case 1:
if(!isQuestComplete(player, TheGrandTree.questName)){ if(!isQuestComplete(player, Quests.THE_GRAND_TREE)){
interpreter.sendDialogues(npc, FacialExpression.ANNOYED, "I only fly friends of the gnomes!"); interpreter.sendDialogues(npc, FacialExpression.ANNOYED, "I only fly friends of the gnomes!");
stage = END_DIALOGUE; stage = END_DIALOGUE;
} }
@@ -1,6 +1,6 @@
package content.global.travel.glider; package content.global.travel.glider;
import content.region.kandarin.quest.grandtree.TheGrandTree; import content.data.Quests;
import core.api.ContentAPIKt; import core.api.ContentAPIKt;
import core.cache.def.impl.NPCDefinition; import core.cache.def.impl.NPCDefinition;
import core.game.component.Component; import core.game.component.Component;
@@ -31,7 +31,7 @@ public final class GliderPlugin extends OptionHandler {
@Override @Override
public boolean handle(Player player, Node node, String option) { public boolean handle(Player player, Node node, String option) {
if(isQuestComplete(player, TheGrandTree.questName)){ if(isQuestComplete(player, Quests.THE_GRAND_TREE)){
player.getInterfaceManager().open(new Component(138)); player.getInterfaceManager().open(new Component(138));
Gliders.sendConfig(node.asNpc(), player); Gliders.sendConfig(node.asNpc(), player);
} else { } else {
@@ -11,6 +11,7 @@ import core.game.node.entity.player.link.diary.DiaryType;
import core.game.node.item.Item; import core.game.node.item.Item;
import static core.api.ContentAPIKt.*; import static core.api.ContentAPIKt.*;
import content.data.Quests;
/** /**
* Represents the dialogue used to handle the sailing from and to karamja. * Represents the dialogue used to handle the sailing from and to karamja.
@@ -46,7 +47,7 @@ public class SeamanDialoguePlugin extends DialoguePlugin {
@Override @Override
public boolean open(Object... args) { public boolean open(Object... args) {
npc = (NPC) args[0]; npc = (NPC) args[0];
if (args.length > 1 && player.getQuestRepository().isComplete("Pirate's Treasure")) { if (args.length > 1 && player.getQuestRepository().isComplete(Quests.PIRATES_TREASURE)) {
if (player.getEquipment().get(EquipmentContainer.SLOT_RING) != null && player.getEquipment().get(EquipmentContainer.SLOT_RING).getId() == Items.RING_OF_CHAROSA_6465) { if (player.getEquipment().get(EquipmentContainer.SLOT_RING) != null && player.getEquipment().get(EquipmentContainer.SLOT_RING).getId() == Items.RING_OF_CHAROSA_6465) {
travel(); travel();
} else if (player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).isComplete(0)) { } else if (player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).isComplete(0)) {
@@ -17,6 +17,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import static core.api.ContentAPIKt.*; import static core.api.ContentAPIKt.*;
import content.data.Quests;
/** /**
* Represents a class used to charter ships. * Represents a class used to charter ships.
@@ -84,7 +85,7 @@ public final class ShipCharter {
*/ */
public static int getCost(final Player player, Destination destination) { public static int getCost(final Player player, Destination destination) {
int cost = destination.getCost(player, destination); int cost = destination.getCost(player, destination);
if (player.getQuestRepository().isComplete("Cabin Fever")) { if (player.getQuestRepository().isComplete(Quests.CABIN_FEVER)) {
cost -= Math.round((cost / 2.)); cost -= Math.round((cost / 2.));
} }
if (player.getEquipment().containsItem(RING_OF_CHAROS)) { if (player.getEquipment().containsItem(RING_OF_CHAROS)) {
@@ -142,13 +143,13 @@ public final class ShipCharter {
PORT_PHASMATYS(Location.create(3705, 3503, 1), 24, new int[] { 3650, 3250, 1850, 0, 0, 0, 2050, 1850, 3200, 1100 }, Location.create(3702, 3502, 0), 2, 13) { PORT_PHASMATYS(Location.create(3705, 3503, 1), 24, new int[] { 3650, 3250, 1850, 0, 0, 0, 2050, 1850, 3200, 1100 }, Location.create(3702, 3502, 0), 2, 13) {
@Override @Override
public boolean checkTravel(Player player) { public boolean checkTravel(Player player) {
return requireQuest(player, "Priest in Peril", "to go there."); return requireQuest(player, Quests.PRIEST_IN_PERIL, "to go there.");
} }
}, },
CRANDOR(Location.create(2792, 3417, 1), 32, new int[] { 0, 480, 480, 925, 400, 3650, 1600, 400, 3200, 3800 }, null, 10, 21) { CRANDOR(Location.create(2792, 3417, 1), 32, new int[] { 0, 480, 480, 925, 400, 3650, 1600, 400, 3200, 3800 }, null, 10, 21) {
@Override @Override
public boolean checkTravel(Player player) { public boolean checkTravel(Player player) {
return requireQuest(player, "Dragon Slayer", "to go there."); return requireQuest(player, Quests.DRAGON_SLAYER, "to go there.");
} }
}, },
BRIMHAVEN(Location.create(2763, 3238, 1), 28, new int[] { 0, 480, 480, 925, 400, 3650, 1600, 400, 3200, 3800 }, Location.create(2760, 3238, 0), 6, 17){ BRIMHAVEN(Location.create(2763, 3238, 1), 28, new int[] { 0, 480, 480, 925, 400, 3650, 1600, 400, 3200, 3800 }, Location.create(2760, 3238, 0), 6, 17){
@@ -170,7 +171,7 @@ public final class ShipCharter {
PORT_TYRAS(Location.create(2142, 3122, 0), 23, new int[] { 3200, 3200, 3200, 1600, 3200, 3200, 3200, 3200, 0, 3200 }, Location.create(2143, 3122, 0), 1, 12) { PORT_TYRAS(Location.create(2142, 3122, 0), 23, new int[] { 3200, 3200, 3200, 1600, 3200, 3200, 3200, 3200, 0, 3200 }, Location.create(2143, 3122, 0), 1, 12) {
@Override @Override
public boolean checkTravel(Player player) { public boolean checkTravel(Player player) {
return hasRequirement(player, "Regicide"); return hasRequirement(player, Quests.REGICIDE);
} }
}, },
@@ -193,14 +194,14 @@ public final class ShipCharter {
SHIPYARD(Location.create(3001, 3032, 0), 26, new int[] { 400, 1600, 200, 225, 720, 1850, 400, 0, 3200, 900 }, Location.create(3001, 3032, 0), 4, 15) { SHIPYARD(Location.create(3001, 3032, 0), 26, new int[] { 400, 1600, 200, 225, 720, 1850, 400, 0, 3200, 900 }, Location.create(3001, 3032, 0), 4, 15) {
@Override @Override
public boolean checkTravel(Player player) { public boolean checkTravel(Player player) {
return requireQuest(player, "The Grand Tree", "to go there."); return requireQuest(player, Quests.THE_GRAND_TREE, "to go there.");
} }
}, },
OO_GLOG(Location.create(2623, 2857, 0), 33, new int[] { 300, 3400, 2000, 550, 5000, 2800, 1400, 900, 3200, 0}, Location.create(2622, 2857, 0), 11, 22), OO_GLOG(Location.create(2623, 2857, 0), 33, new int[] { 300, 3400, 2000, 550, 5000, 2800, 1400, 900, 3200, 0}, Location.create(2622, 2857, 0), 11, 22),
MOS_LE_HARMLESS(Location.create(3671, 2931, 0), 31, new int[] { 725, 625, 1025, 0, 1025, 0, 325, 275, 1600, 500 }, Location.create(3671, 2933, 0), 9, 20) { MOS_LE_HARMLESS(Location.create(3671, 2931, 0), 31, new int[] { 725, 625, 1025, 0, 1025, 0, 325, 275, 1600, 500 }, Location.create(3671, 2933, 0), 9, 20) {
@Override @Override
public boolean checkTravel(Player player) { public boolean checkTravel(Player player) {
return hasRequirement(player, "Cabin Fever"); return hasRequirement(player, Quests.CABIN_FEVER);
} }
}; };
@@ -12,12 +12,12 @@ import core.game.world.map.Location
import core.game.world.update.flag.context.Animation import core.game.world.update.flag.context.Animation
import core.game.world.update.flag.context.Graphics import core.game.world.update.flag.context.Graphics
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import content.region.kandarin.quest.tree.TreeGnomeVillage
import core.game.dialogue.DialogueFile import core.game.dialogue.DialogueFile
import core.game.interaction.InteractionListener import core.game.interaction.InteractionListener
import core.game.interaction.IntType import core.game.interaction.IntType
import core.game.world.GameWorld.Pulser import core.game.world.GameWorld.Pulser
import core.tools.END_DIALOGUE import core.tools.END_DIALOGUE
import content.data.Quests
class GnomeSpiritTreeListener: InteractionListener { class GnomeSpiritTreeListener: InteractionListener {
val spiritTrees = intArrayOf(1317,1293,1294) val spiritTrees = intArrayOf(1317,1293,1294)
@@ -46,7 +46,7 @@ class GnomeSpiritTreeTeleportDialogue: DialogueFile() {
private val GRAPHICS = arrayOf(Graphics(1228), Graphics(1229)) private val GRAPHICS = arrayOf(Graphics(1228), Graphics(1229))
fun hasQuestCompleted(player: Player): Boolean { fun hasQuestCompleted(player: Player): Boolean {
if (!isQuestComplete(player, TreeGnomeVillage.questName)) { if (!isQuestComplete(player, Quests.TREE_GNOME_VILLAGE)) {
sendDialogue(player, "The tree doesn't feel like talking.") sendDialogue(player, "The tree doesn't feel like talking.")
stage = END_DIALOGUE stage = END_DIALOGUE
return false return false
@@ -10,6 +10,7 @@ import org.rs09.consts.Items
import core.game.interaction.InteractionListener import core.game.interaction.InteractionListener
import core.game.interaction.IntType import core.game.interaction.IntType
import core.game.world.GameWorld import core.game.world.GameWorld
import content.data.Quests
private val VALID_LOGS = intArrayOf(Items.LOGS_1511, Items.OAK_LOGS_1521,Items.WILLOW_LOGS_1519,Items.MAPLE_LOGS_1517,Items.YEW_LOGS_1515,Items.MAGIC_LOGS_1513) private val VALID_LOGS = intArrayOf(Items.LOGS_1511, Items.OAK_LOGS_1521,Items.WILLOW_LOGS_1519,Items.MAPLE_LOGS_1517,Items.YEW_LOGS_1515,Items.MAGIC_LOGS_1513)
private val FILL_ANIM = Animation(9136) private val FILL_ANIM = Animation(9136)
@@ -24,8 +25,8 @@ class AFUBeaconListeners : InteractionListener {
override fun defineListeners() { override fun defineListeners() {
on(IntType.SCENERY,"add-logs","light"){ player, node -> on(IntType.SCENERY,"add-logs","light"){ player, node ->
val beacon = AFUBeacon.forLocation(node.location) val beacon = AFUBeacon.forLocation(node.location)
val questComplete = player.questRepository.isComplete("All Fired Up") val questComplete = player.questRepository.isComplete(Quests.ALL_FIRED_UP)
val questStage = player.questRepository.getStage("All Fired Up") val questStage = player.questRepository.getStage(Quests.ALL_FIRED_UP)
if ((beacon != AFUBeacon.RIVER_SALVE && beacon != AFUBeacon.RAG_AND_BONE && !questComplete) if ((beacon != AFUBeacon.RIVER_SALVE && beacon != AFUBeacon.RAG_AND_BONE && !questComplete)
|| (beacon == AFUBeacon.RIVER_SALVE && questStage < 20 && !questComplete) || (beacon == AFUBeacon.RIVER_SALVE && questStage < 20 && !questComplete)
@@ -68,7 +69,7 @@ class AFUBeaconListeners : InteractionListener {
} }
AFUBeacon.GOBLIN_VILLAGE -> { AFUBeacon.GOBLIN_VILLAGE -> {
if(!player.questRepository.isComplete("Lost Tribe")){ if(!player.questRepository.isComplete(Quests.THE_LOST_TRIBE)){
player.dialogueInterpreter.sendDialogues(NPC(beacon.keeper).getShownNPC(player), core.game.dialogue.FacialExpression.THINKING,"We no trust you outsider. You no light our beacon.","(Complete Lost Tribe to use this beacon.)") player.dialogueInterpreter.sendDialogues(NPC(beacon.keeper).getShownNPC(player), core.game.dialogue.FacialExpression.THINKING,"We no trust you outsider. You no light our beacon.","(Complete Lost Tribe to use this beacon.)")
return return
} }
@@ -151,7 +152,7 @@ class AFUBeaconListeners : InteractionListener {
experience += session?.getBonusExperience() ?: 0.0 experience += session?.getBonusExperience() ?: 0.0
player.skills.addExperience(Skills.FIREMAKING,experience) player.skills.addExperience(Skills.FIREMAKING,experience)
} else { } else {
player.questRepository.getQuest("All Fired Up").setStage(player, player.questRepository.getStage("All Fired Up") + 10) player.questRepository.getQuest(Quests.ALL_FIRED_UP).setStage(player, player.questRepository.getStage(Quests.ALL_FIRED_UP) + 10)
} }
} }
2 -> player.unlock().also { return true } 2 -> player.unlock().also { return true }
@@ -183,7 +184,7 @@ class AFUBeaconListeners : InteractionListener {
if(questComplete){ if(questComplete){
session?.refreshTimer(beacon,logs.id) session?.refreshTimer(beacon,logs.id)
} else { } else {
player.questRepository.getQuest("All Fired Up").setStage(player, 80) player.questRepository.getQuest(Quests.ALL_FIRED_UP).setStage(player, 80)
} }
} }
2 -> player.unlock().also { return true } 2 -> player.unlock().also { return true }
@@ -1,5 +1,6 @@
package content.minigame.allfiredup package content.minigame.allfiredup
import content.data.Quests
import core.game.node.entity.impl.ForceMovement import core.game.node.entity.impl.ForceMovement
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.node.entity.skill.Skills import core.game.node.entity.skill.Skills
@@ -26,7 +27,7 @@ class AFURepairClimbHandler : InteractionListener {
override fun defineListeners() { override fun defineListeners() {
on(repairIDs, IntType.SCENERY, "repair"){ player, _ -> on(repairIDs, IntType.SCENERY, "repair"){ player, _ ->
if (hasRequirement(player, "All Fired Up")){ if (hasRequirement(player, Quests.ALL_FIRED_UP)){
val rco: RepairClimbObject? = getClimbingObject(player) val rco: RepairClimbObject? = getClimbingObject(player)
repair(player,rco!!) repair(player,rco!!)
return@on true return@on true
@@ -13,6 +13,7 @@ import org.rs09.consts.Items
import core.game.dialogue.DialogueFile import core.game.dialogue.DialogueFile
import core.game.interaction.InteractionListener import core.game.interaction.InteractionListener
import core.game.interaction.IntType import core.game.interaction.IntType
import content.data.Quests
/** /**
* Adds functionality to the pharoah's scepter * Adds functionality to the pharoah's scepter
@@ -23,7 +24,7 @@ class PharaohSceptre : InteractionListener {
val SCEPTRES = intArrayOf(Items.PHARAOHS_SCEPTRE_9044, Items.PHARAOHS_SCEPTRE_9046, Items.PHARAOHS_SCEPTRE_9048, Items.PHARAOHS_SCEPTRE_9050) val SCEPTRES = intArrayOf(Items.PHARAOHS_SCEPTRE_9044, Items.PHARAOHS_SCEPTRE_9046, Items.PHARAOHS_SCEPTRE_9048, Items.PHARAOHS_SCEPTRE_9050)
on(SCEPTRES, IntType.ITEM, "teleport", "operate"){ player, node -> on(SCEPTRES, IntType.ITEM, "teleport", "operate"){ player, node ->
if (!hasRequirement(player, "Icthlarin's Little Helper")) if (!hasRequirement(player, Quests.ICTHLARINS_LITTLE_HELPER))
return@on true return@on true
val sceptre = node.asItem() val sceptre = node.asItem()
@@ -23,6 +23,7 @@ import core.game.interaction.InteractionListener
import core.game.interaction.IntType import core.game.interaction.IntType
import core.game.world.GameWorld import core.game.world.GameWorld
import core.plugin.ClassScanner import core.plugin.ClassScanner
import content.data.Quests
class GardenObjectsPlugin : InteractionListener { class GardenObjectsPlugin : InteractionListener {
@@ -503,7 +504,7 @@ class GardenObjectsPlugin : InteractionListener {
override fun open(vararg args: Any): Boolean { override fun open(vararg args: Any): Boolean {
npc = args[0] as NPC npc = args[0] as NPC
quest = player.questRepository.getQuest("Prince Ali Rescue") quest = player.questRepository.getQuest(Quests.PRINCE_ALI_RESCUE)
when (quest!!.getStage(player)) { when (quest!!.getStage(player)) {
100 -> { 100 -> {
interpreter.sendDialogues(player, null, "I'd like to talk about sq'irks.") interpreter.sendDialogues(player, null, "I'd like to talk about sq'irks.")
@@ -11,6 +11,7 @@ import core.game.world.map.Location;
import core.game.world.update.flag.context.Graphics; import core.game.world.update.flag.context.Graphics;
import static core.api.ContentAPIKt.hasRequirement; import static core.api.ContentAPIKt.hasRequirement;
import content.data.Quests;
/** /**
* Dialogue for Sorceress Apprentice * Dialogue for Sorceress Apprentice
@@ -238,7 +239,7 @@ public class SorceressApprenticeDialogue extends DialoguePlugin {
} }
public static void teleport(final NPC npc, final Player player) { public static void teleport(final NPC npc, final Player player) {
if (!hasRequirement(player, "Prince Ali Rescue")) if (!hasRequirement(player, Quests.PRINCE_ALI_RESCUE))
return; return;
npc.faceTemporary(player, 4); npc.faceTemporary(player, 4);
npc.graphics(new Graphics(108)); npc.graphics(new Graphics(108));
@@ -20,8 +20,8 @@ class BernaldDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
// // Garden of Tranquility has not been implemented. // // Garden of Tranquility has not been implemented.
// if(hasRequirement(player!!, "Garden of Tranquility")) { // if(hasRequirement(player!!, Quests.GARDEN_OF_TRANQUILITY)) {
// if (isQuestComplete(player!!, DeathPlateau.questName)) { // if (isQuestComplete(player!!, Quests.DEATH_PLATEAU)) {
// when (stage) { // when (stage) {
// 0 -> playerl(FacialExpression.FRIENDLY, "How are your grapes coming along?").also { stage++ } // 0 -> playerl(FacialExpression.FRIENDLY, "How are your grapes coming along?").also { stage++ }
// 1 -> npc(FacialExpression.FRIENDLY, "Marvellous, thanks to your help, " + player.username + "!").also { stage = END_DIALOGUE } // 1 -> npc(FacialExpression.FRIENDLY, "Marvellous, thanks to your help, " + player.username + "!").also { stage = END_DIALOGUE }
@@ -9,6 +9,7 @@ import core.plugin.Initializable
import core.tools.END_DIALOGUE import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import content.data.Quests
/** /**
* Breoca Dialogue * Breoca Dialogue
@@ -18,7 +19,7 @@ import org.rs09.consts.NPCs
@Initializable @Initializable
class BreocaDialogue(player: Player? = null) : DialoguePlugin(player) { class BreocaDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int) : Boolean { override fun handle(interfaceId: Int, buttonId: Int) : Boolean {
if(isQuestComplete(player!!, "Death Plateau")) { if(isQuestComplete(player!!, Quests.DEATH_PLATEAU)) {
when (stage) { when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..3).toIntArray().random() } START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..3).toIntArray().random() }
1 -> npcl(FacialExpression.HAPPY, "I heard about what you did, thank you!").also { stage = END_DIALOGUE } 1 -> npcl(FacialExpression.HAPPY, "I heard about what you did, thank you!").also { stage = END_DIALOGUE }
@@ -9,6 +9,7 @@ import core.plugin.Initializable
import core.tools.END_DIALOGUE import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import content.data.Quests
/** /**
* Ceolburg Dialogue * Ceolburg Dialogue
@@ -18,7 +19,7 @@ import org.rs09.consts.NPCs
@Initializable @Initializable
class CeolburgDialogue(player: Player? = null) : DialoguePlugin(player) { class CeolburgDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int) : Boolean { override fun handle(interfaceId: Int, buttonId: Int) : Boolean {
if(isQuestComplete(player!!, "Death Plateau")) { if(isQuestComplete(player!!, Quests.DEATH_PLATEAU)) {
when (stage) { when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..3).toIntArray().random() } START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..3).toIntArray().random() }
1 -> npcl(FacialExpression.HAPPY, "I heard about what you did, thank you!").also { stage = END_DIALOGUE } 1 -> npcl(FacialExpression.HAPPY, "I heard about what you did, thank you!").also { stage = END_DIALOGUE }
@@ -1,8 +1,7 @@
package content.region.asgarnia.burthorpe.dialogue package content.region.asgarnia.burthorpe.dialogue
import content.region.asgarnia.burthorpe.quest.deathplateau.DeathPlateau import content.data.Quests
import content.region.asgarnia.burthorpe.quest.deathplateau.DenulthDialogueFile import content.region.asgarnia.burthorpe.quest.deathplateau.DenulthDialogueFile
import content.region.asgarnia.burthorpe.quest.trollstronghold.TrollStronghold
import core.api.isQuestComplete import core.api.isQuestComplete
import core.api.isQuestInProgress import core.api.isQuestInProgress
import core.api.openDialogue import core.api.openDialogue
@@ -25,7 +24,7 @@ class DenulthDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
// When Troll Stronghold is complete // When Troll Stronghold is complete
if (isQuestComplete(player!!, TrollStronghold.questName)) { if (isQuestComplete(player!!, Quests.TROLL_STRONGHOLD)) {
when(stage) { when(stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hello!").also { stage++ } START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hello!").also { stage++ }
1 -> npcl(FacialExpression.HAPPY, "Welcome back friend!").also { stage++ } 1 -> npcl(FacialExpression.HAPPY, "Welcome back friend!").also { stage++ }
@@ -49,13 +48,13 @@ class DenulthDialogue(player: Player? = null) : DialoguePlugin(player) {
} }
// Troll Stronghold in progress // Troll Stronghold in progress
if (isQuestInProgress(player!!, TrollStronghold.questName, 1, 99)) { if (isQuestInProgress(player!!, Quests.TROLL_STRONGHOLD, 1, 99)) {
openDialogue(player!!, content.region.asgarnia.burthorpe.quest.trollstronghold.DenulthDialogueFile(), npc) openDialogue(player!!, content.region.asgarnia.burthorpe.quest.trollstronghold.DenulthDialogueFile(), npc)
return true return true
} }
// When Death Plateau is completed, start Troll Stronghold // When Death Plateau is completed, start Troll Stronghold
if (isQuestComplete(player!!, DeathPlateau.questName)) { if (isQuestComplete(player!!, Quests.DEATH_PLATEAU)) {
when(stage) { when(stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hello!").also { stage++ } START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hello!").also { stage++ }
1 -> npcl(FacialExpression.HAPPY, "Welcome back friend!").also { stage++ } 1 -> npcl(FacialExpression.HAPPY, "Welcome back friend!").also { stage++ }
@@ -78,7 +77,7 @@ class DenulthDialogue(player: Player? = null) : DialoguePlugin(player) {
) )
16 -> npcl(FacialExpression.HAPPY, "God speed friend! I would send some of my men with you, but none of them are brave enough to follow.").also { 16 -> npcl(FacialExpression.HAPPY, "God speed friend! I would send some of my men with you, but none of them are brave enough to follow.").also {
stage = END_DIALOGUE stage = END_DIALOGUE
setQuestStage(player!!, TrollStronghold.questName, 1) setQuestStage(player!!, Quests.TROLL_STRONGHOLD, 1)
} }
20 -> npcl(FacialExpression.ANGRY, "You are right citizen. The White Knights have taken advantage of the old and weak king, they control most of Asgarnia, including Falador. However they do not control Burthorpe!").also { stage++ } 20 -> npcl(FacialExpression.ANGRY, "You are right citizen. The White Knights have taken advantage of the old and weak king, they control most of Asgarnia, including Falador. However they do not control Burthorpe!").also { stage++ }
@@ -1,7 +1,6 @@
package content.region.asgarnia.burthorpe.dialogue package content.region.asgarnia.burthorpe.dialogue
import content.region.asgarnia.burthorpe.quest.deathplateau.DeathPlateau import content.data.Quests
import content.region.asgarnia.burthorpe.quest.trollstronghold.TrollStronghold
import core.api.* import core.api.*
import core.game.dialogue.DialoguePlugin import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
@@ -24,7 +23,7 @@ class DunstanDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
// When Troll Stronghold is complete // When Troll Stronghold is complete
if (isQuestComplete(player!!, TrollStronghold.questName)) { if (isQuestComplete(player!!, Quests.TROLL_STRONGHOLD)) {
when (stage) { when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage++ } START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage++ }
1 -> npcl(FacialExpression.FRIENDLY, "Hi! What can I do for you?").also { stage++ } 1 -> npcl(FacialExpression.FRIENDLY, "Hi! What can I do for you?").also { stage++ }
@@ -47,13 +46,13 @@ class DunstanDialogue(player: Player? = null) : DialoguePlugin(player) {
} }
// Troll Stronghold in progress // Troll Stronghold in progress
if (isQuestInProgress(player!!, TrollStronghold.questName, 1, 99)) { if (isQuestInProgress(player!!, Quests.TROLL_STRONGHOLD, 1, 99)) {
openDialogue(player!!, content.region.asgarnia.burthorpe.quest.trollstronghold.DunstanDialogueFile(), npc) openDialogue(player!!, content.region.asgarnia.burthorpe.quest.trollstronghold.DunstanDialogueFile(), npc)
return true return true
} }
// When Death Plateau is complete // When Death Plateau is complete
if (isQuestComplete(player!!, DeathPlateau.questName)) { if (isQuestComplete(player!!, Quests.DEATH_PLATEAU)) {
when (stage) { when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage++ } START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage++ }
1 -> npcl(FacialExpression.FRIENDLY, "Hi! What can I do for you?").also { stage++ } 1 -> npcl(FacialExpression.FRIENDLY, "Hi! What can I do for you?").also { stage++ }
@@ -75,7 +74,7 @@ class DunstanDialogue(player: Player? = null) : DialoguePlugin(player) {
} }
// Death Plateau in progress // Death Plateau in progress
if (isQuestInProgress(player!!, DeathPlateau.questName, 21, 24)) { if (isQuestInProgress(player!!, Quests.DEATH_PLATEAU, 21, 24)) {
// Call the dialogue file for Dunstan from the deathplateau quest folder. // Call the dialogue file for Dunstan from the deathplateau quest folder.
openDialogue(player!!, content.region.asgarnia.burthorpe.quest.deathplateau.DunstanDialogueFile(), npc) openDialogue(player!!, content.region.asgarnia.burthorpe.quest.deathplateau.DunstanDialogueFile(), npc)
return true return true
@@ -1,6 +1,6 @@
package content.region.asgarnia.burthorpe.dialogue package content.region.asgarnia.burthorpe.dialogue
import content.region.asgarnia.burthorpe.quest.deathplateau.DeathPlateau import content.data.Quests
import content.region.asgarnia.burthorpe.quest.deathplateau.EohricDialogueFile import content.region.asgarnia.burthorpe.quest.deathplateau.EohricDialogueFile
import core.api.getQuestStage import core.api.getQuestStage
import core.api.openDialogue import core.api.openDialogue
@@ -19,7 +19,7 @@ import org.rs09.consts.NPCs
@Initializable @Initializable
class EohricDialogue(player: Player? = null) : DialoguePlugin(player) { class EohricDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
if (getQuestStage(player!!, DeathPlateau.questName) >= 5) { if (getQuestStage(player!!, Quests.DEATH_PLATEAU) >= 5) {
// Call the dialogue file for Eohric from the deathplateau quest folder. // Call the dialogue file for Eohric from the deathplateau quest folder.
openDialogue(player!!, EohricDialogueFile(), npc) openDialogue(player!!, EohricDialogueFile(), npc)
return true return true
@@ -1,14 +1,12 @@
package content.region.asgarnia.burthorpe.dialogue package content.region.asgarnia.burthorpe.dialogue
import content.region.asgarnia.burthorpe.quest.deathplateau.DeathPlateau import content.data.Quests
import content.region.asgarnia.burthorpe.quest.deathplateau.HaroldDialogueFile import content.region.asgarnia.burthorpe.quest.deathplateau.HaroldDialogueFile
import core.api.* import core.api.*
import core.game.dialogue.DialoguePlugin import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.world.update.flag.context.Animation import core.game.world.update.flag.context.Animation
import core.game.world.update.flag.context.Graphics
import core.plugin.Initializable import core.plugin.Initializable
import core.tools.END_DIALOGUE import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE import core.tools.START_DIALOGUE
@@ -23,7 +21,7 @@ import org.rs09.consts.NPCs
@Initializable @Initializable
class HaroldDialogue(player: Player? = null) : DialoguePlugin(player) { class HaroldDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
if (isQuestInProgress(player!!, DeathPlateau.questName, 10, 29)) { if (isQuestInProgress(player!!, Quests.DEATH_PLATEAU, 10, 29)) {
// Call the dialogue file for Harold from the deathplateau quest folder. // Call the dialogue file for Harold from the deathplateau quest folder.
openDialogue(player!!, HaroldDialogueFile(), npc) openDialogue(player!!, HaroldDialogueFile(), npc)
} }
@@ -9,6 +9,7 @@ import core.plugin.Initializable
import core.tools.END_DIALOGUE import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import content.data.Quests
/** /**
* Hild Dialogue * Hild Dialogue
@@ -18,7 +19,7 @@ import org.rs09.consts.NPCs
@Initializable @Initializable
class HildDialogue(player: Player? = null) : DialoguePlugin(player) { class HildDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int) : Boolean { override fun handle(interfaceId: Int, buttonId: Int) : Boolean {
if(isQuestComplete(player!!, "Death Plateau")) { if(isQuestComplete(player!!, Quests.DEATH_PLATEAU)) {
when (stage) { when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..3).toIntArray().random() } START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..3).toIntArray().random() }
1 -> npcl(FacialExpression.HAPPY, "I heard about what you did, thank you!").also { stage = END_DIALOGUE } 1 -> npcl(FacialExpression.HAPPY, "I heard about what you did, thank you!").also { stage = END_DIALOGUE }
@@ -9,6 +9,7 @@ import core.plugin.Initializable
import core.tools.END_DIALOGUE import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import content.data.Quests
/** /**
* Hygd Dialogue * Hygd Dialogue
@@ -18,7 +19,7 @@ import org.rs09.consts.NPCs
@Initializable @Initializable
class HygdDialogue(player: Player? = null) : DialoguePlugin(player) { class HygdDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int) : Boolean { override fun handle(interfaceId: Int, buttonId: Int) : Boolean {
if(isQuestComplete(player!!, "Death Plateau")) { if(isQuestComplete(player!!, Quests.DEATH_PLATEAU)) {
when (stage) { when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..3).toIntArray().random() } START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..3).toIntArray().random() }
1 -> npcl(FacialExpression.HAPPY, "I heard about what you did, thank you!").also { stage = END_DIALOGUE } 1 -> npcl(FacialExpression.HAPPY, "I heard about what you did, thank you!").also { stage = END_DIALOGUE }
@@ -9,6 +9,7 @@ import core.plugin.Initializable
import core.tools.END_DIALOGUE import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import content.data.Quests
/** /**
@@ -19,7 +20,7 @@ import org.rs09.consts.NPCs
@Initializable @Initializable
class OcgaDialogue(player: Player? = null) : DialoguePlugin(player) { class OcgaDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int) : Boolean { override fun handle(interfaceId: Int, buttonId: Int) : Boolean {
if(isQuestComplete(player!!, "Death Plateau")) { if(isQuestComplete(player!!, Quests.DEATH_PLATEAU)) {
when (stage) { when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..3).toIntArray().random() } START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..3).toIntArray().random() }
1 -> npcl(FacialExpression.HAPPY, "I heard about what you did, thank you!").also { stage = END_DIALOGUE } 1 -> npcl(FacialExpression.HAPPY, "I heard about what you did, thank you!").also { stage = END_DIALOGUE }
@@ -9,6 +9,7 @@ import core.plugin.Initializable
import core.tools.END_DIALOGUE import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import content.data.Quests
/** /**
* Penda Dialogue * Penda Dialogue
@@ -18,7 +19,7 @@ import org.rs09.consts.NPCs
@Initializable @Initializable
class PendaDialogue(player: Player? = null) : DialoguePlugin(player) { class PendaDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int) : Boolean { override fun handle(interfaceId: Int, buttonId: Int) : Boolean {
if(isQuestComplete(player!!, "Death Plateau")) { if(isQuestComplete(player!!, Quests.DEATH_PLATEAU)) {
when (stage) { when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..5).toIntArray().random() } START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..5).toIntArray().random() }
1 -> npcl(FacialExpression.HAPPY, "I heard about what you did, thank you!").also { stage = END_DIALOGUE } 1 -> npcl(FacialExpression.HAPPY, "I heard about what you did, thank you!").also { stage = END_DIALOGUE }
@@ -8,9 +8,8 @@ import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.plugin.Initializable import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import content.data.Quests
/** /**
* Unferth Dialogue * Unferth Dialogue
@@ -37,7 +36,7 @@ class UnferthDialogue(player: Player? = null) : DialoguePlugin(player) {
class UnferthDialogueFile : DialogueBuilderFile() { class UnferthDialogueFile : DialogueBuilderFile() {
override fun create(b: DialogueBuilder) { override fun create(b: DialogueBuilder) {
b.onPredicate { player -> isQuestComplete(player, "A Tail of Two Cats") }.playerl( b.onPredicate { player -> isQuestComplete(player, Quests.A_TAIL_OF_TWO_CATS) }.playerl(
FacialExpression.FRIENDLY, "Hi Unferth. How are you doing?" FacialExpression.FRIENDLY, "Hi Unferth. How are you doing?"
).npcl( ).npcl(
FacialExpression.GUILTY, "It's just not the same without Bob around." FacialExpression.GUILTY, "It's just not the same without Bob around."
@@ -18,6 +18,7 @@ import core.plugin.Initializable;
import core.plugin.ClassScanner; import core.plugin.ClassScanner;
import static core.api.ContentAPIKt.hasRequirement; import static core.api.ContentAPIKt.hasRequirement;
import content.data.Quests;
/** /**
* Represents the hero guild. * Represents the hero guild.
@@ -42,7 +43,7 @@ public final class HeroGuildPlugin extends OptionHandler {
switch (id) { switch (id) {
case 2624: case 2624:
case 2625: case 2625:
if (!hasRequirement(player, "Heroes' Quest")) if (!hasRequirement(player, Quests.HEROES_QUEST))
return true; return true;
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node); DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
break; break;
@@ -82,15 +83,15 @@ public final class HeroGuildPlugin extends OptionHandler {
@Override @Override
public boolean handle(NodeUsageEvent event) { public boolean handle(NodeUsageEvent event) {
final Player player = event.getPlayer(); final Player player = event.getPlayer();
if (!hasRequirement(player, "Heroes' Quest")) if (!hasRequirement(player, Quests.HEROES_QUEST))
return true; return true;
final EnchantedJewellery jewellery; final EnchantedJewellery jewellery;
assert event.getUsedItem() != null; assert event.getUsedItem() != null;
jewellery = EnchantedJewellery.Companion.getIdMap().get(event.getUsedItem().getId()); jewellery = EnchantedJewellery.Companion.getIdMap().get(event.getUsedItem().getId());
if (!hasRequirement(player, "Heroes' Quest")) if (!hasRequirement(player, Quests.HEROES_QUEST))
return true; return true;
if (jewellery == EnchantedJewellery.COMBAT_BRACELET || jewellery == EnchantedJewellery.SKILLS_NECKLACE) if (jewellery == EnchantedJewellery.COMBAT_BRACELET || jewellery == EnchantedJewellery.SKILLS_NECKLACE)
if (!hasRequirement(player, "Legend's Quest")) if (!hasRequirement(player, Quests.LEGENDS_QUEST))
return true; return true;
if (jewellery == null && event.getUsedItem().getId() != 2572) { if (jewellery == null && event.getUsedItem().getId() != 2572) {
return true; return true;
@@ -5,9 +5,9 @@ import core.api.getAttribute
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.node.entity.player.link.quest.Quest import core.game.node.entity.player.link.quest.Quest
import core.game.node.entity.skill.Skills import core.game.node.entity.skill.Skills
import core.game.world.map.Location
import core.plugin.Initializable import core.plugin.Initializable
import org.rs09.consts.Items import org.rs09.consts.Items
import content.data.Quests
/** /**
* Death Plateau Quest * Death Plateau Quest
@@ -15,16 +15,13 @@ import org.rs09.consts.Items
* @author ovenbread * @author ovenbread
*/ */
@Initializable @Initializable
class DeathPlateau : Quest("Death Plateau",44, 43, 1, 314, 0, 1, 80) { class DeathPlateau : Quest(Quests.DEATH_PLATEAU,44, 43, 1, 314, 0, 1, 80) {
companion object {
const val questName = "Death Plateau"
}
override fun drawJournal(player: Player?, stage: Int) { override fun drawJournal(player: Player?, stage: Int) {
super.drawJournal(player, stage) super.drawJournal(player, stage)
var line = 12 var line = 12
var stage = getStage(player) var stage = getStage(player)
var started = player?.questRepository?.getStage(questName)!! > 0 var started = player?.questRepository?.getStage(Quests.DEATH_PLATEAU)!! > 0
if(!started){ if(!started){
line(player, "I can start this quest by speaking to !!Denulth?? who is in his", line++) line(player, "I can start this quest by speaking to !!Denulth?? who is in his", line++)
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.deathplateau package content.region.asgarnia.burthorpe.quest.deathplateau
import content.data.Quests
import core.api.getQuestStage import core.api.getQuestStage
import core.api.getScenery import core.api.getScenery
import core.api.sendDialogue import core.api.sendDialogue
@@ -26,7 +27,7 @@ class DeathPlateauDoorDialogueFile(val door: Int) : DialogueFile() {
if(door == 2) { if(door == 2) {
npc = NPC(NPCs.TENZING_1071) npc = NPC(NPCs.TENZING_1071)
when (getQuestStage(player!!, DeathPlateau.questName)) { when (getQuestStage(player!!, Quests.DEATH_PLATEAU)) {
in 0 .. 19 -> { in 0 .. 19 -> {
when (stage) { when (stage) {
0 -> sendDialogue(player!!, "You knock on the door.").also { stage++ } 0 -> sendDialogue(player!!, "You knock on the door.").also { stage++ }
@@ -53,7 +54,7 @@ class DeathPlateauDoorDialogueFile(val door: Int) : DialogueFile() {
} }
if(door == 3) { if(door == 3) {
npc = NPC(NPCs.TENZING_1071) npc = NPC(NPCs.TENZING_1071)
when (getQuestStage(player!!, DeathPlateau.questName)) { when (getQuestStage(player!!, Quests.DEATH_PLATEAU)) {
in 0..24 -> { in 0..24 -> {
when (stage) { when (stage) {
0 -> npcl(FacialExpression.FRIENDLY, "Where do you think you're going? This is private property!").also { stage = END_DIALOGUE } 0 -> npcl(FacialExpression.FRIENDLY, "Where do you think you're going? This is private property!").also { stage = END_DIALOGUE }
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.deathplateau package content.region.asgarnia.burthorpe.quest.deathplateau
import content.data.Quests
import core.api.* import core.api.*
import core.game.global.action.DoorActionHandler import core.game.global.action.DoorActionHandler
import core.game.interaction.IntType import core.game.interaction.IntType
@@ -74,16 +75,16 @@ class DeathPlateauInteractionListener : InteractionListener {
GroundItemManager.get(Items.STONE_BALL_3111, location(2895, 3562, 0), player) != null && GroundItemManager.get(Items.STONE_BALL_3111, location(2895, 3562, 0), player) != null &&
GroundItemManager.get(Items.STONE_BALL_3112, location(2895, 3563, 0), player) != null && GroundItemManager.get(Items.STONE_BALL_3112, location(2895, 3563, 0), player) != null &&
GroundItemManager.get(Items.STONE_BALL_3113, location(2895, 3564, 0), player) != null) { GroundItemManager.get(Items.STONE_BALL_3113, location(2895, 3564, 0), player) != null) {
if (getQuestStage(player, DeathPlateau.questName) == 16) { if (getQuestStage(player, Quests.DEATH_PLATEAU) == 16) {
sendMessage(player, "The equipment room door has unlocked.") sendMessage(player, "The equipment room door has unlocked.")
setQuestStage(player, DeathPlateau.questName, 19) setQuestStage(player, Quests.DEATH_PLATEAU, 19)
} }
} }
return@onUseWith true return@onUseWith true
} }
on(Scenery.LARGE_DOOR_3743, SCENERY, "open") { player, node -> on(Scenery.LARGE_DOOR_3743, SCENERY, "open") { player, node ->
if (getQuestStage(player, DeathPlateau.questName) > 16) { if (getQuestStage(player, Quests.DEATH_PLATEAU) > 16) {
DoorActionHandler.handleAutowalkDoor(player, node as core.game.node.scenery.Scenery) DoorActionHandler.handleAutowalkDoor(player, node as core.game.node.scenery.Scenery)
} else { } else {
sendMessage(player, "The door is locked.") sendMessage(player, "The door is locked.")
@@ -1,14 +1,13 @@
package content.region.asgarnia.burthorpe.quest.deathplateau package content.region.asgarnia.burthorpe.quest.deathplateau
import content.data.Quests
import core.api.* import core.api.*
import core.game.dialogue.DialogueFile import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic import core.game.dialogue.Topic
import core.game.node.entity.npc.NPC
import core.game.node.item.Item import core.game.node.item.Item
import core.tools.END_DIALOGUE import core.tools.END_DIALOGUE
import org.rs09.consts.Items import org.rs09.consts.Items
import org.rs09.consts.NPCs
/** /**
@@ -20,7 +19,7 @@ import org.rs09.consts.NPCs
class DenulthDialogueFile : DialogueFile() { class DenulthDialogueFile : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) { override fun handle(componentID: Int, buttonID: Int) {
when (getQuestStage(player!!, DeathPlateau.questName)) { when (getQuestStage(player!!, Quests.DEATH_PLATEAU)) {
in 0..4 -> { in 0..4 -> {
when (stage) { when (stage) {
0 -> playerl(FacialExpression.FRIENDLY, "Hello!").also { stage++ } 0 -> playerl(FacialExpression.FRIENDLY, "Hello!").also { stage++ }
@@ -54,7 +53,7 @@ class DenulthDialogueFile : DialogueFile() {
309 -> playerl(FacialExpression.FRIENDLY, "A stone what...?!").also { stage++ } 309 -> playerl(FacialExpression.FRIENDLY, "A stone what...?!").also { stage++ }
310 -> npcl(FacialExpression.FRIENDLY, "Well citizen, the Prince is fond of puzzles. Why we couldn't just have a key is beyond me!").also { stage++ } 310 -> npcl(FacialExpression.FRIENDLY, "Well citizen, the Prince is fond of puzzles. Why we couldn't just have a key is beyond me!").also { stage++ }
311 -> playerl(FacialExpression.SUSPICIOUS, "I'll get on it right away!").also { 311 -> playerl(FacialExpression.SUSPICIOUS, "I'll get on it right away!").also {
setQuestStage(player!!, DeathPlateau.questName, 5) setQuestStage(player!!, Quests.DEATH_PLATEAU, 5)
stage = END_DIALOGUE stage = END_DIALOGUE
} }
} }
@@ -104,7 +103,7 @@ class DenulthDialogueFile : DialogueFile() {
} }
11 -> npcl(FacialExpression.FRIENDLY, "This certificate proves that we have accepted Dunstan's son for training in the Imperial Guard!").also { stage++ } 11 -> npcl(FacialExpression.FRIENDLY, "This certificate proves that we have accepted Dunstan's son for training in the Imperial Guard!").also { stage++ }
12 -> playerl(FacialExpression.FRIENDLY, "Thank you Denulth, I shall be back shortly!").also { 12 -> playerl(FacialExpression.FRIENDLY, "Thank you Denulth, I shall be back shortly!").also {
setQuestStage(player!!, DeathPlateau.questName, 23) setQuestStage(player!!, Quests.DEATH_PLATEAU, 23)
stage = END_DIALOGUE stage = END_DIALOGUE
} }
} }
@@ -169,7 +168,7 @@ class DenulthDialogueFile : DialogueFile() {
12 -> npcl(FacialExpression.FRIENDLY, "You are now an honourary member of the Imperial Guard!").also { stage++ } 12 -> npcl(FacialExpression.FRIENDLY, "You are now an honourary member of the Imperial Guard!").also { stage++ }
13 -> { 13 -> {
stage = END_DIALOGUE stage = END_DIALOGUE
finishQuest(player!!, DeathPlateau.questName) finishQuest(player!!, Quests.DEATH_PLATEAU)
} }
} }
} }
@@ -3,17 +3,16 @@ package content.region.asgarnia.burthorpe.quest.deathplateau
import core.api.* import core.api.*
import core.game.dialogue.DialogueFile import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.game.node.item.Item import core.game.node.item.Item
import core.tools.END_DIALOGUE import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE import core.tools.START_DIALOGUE
import org.rs09.consts.Items import org.rs09.consts.Items
import org.rs09.consts.NPCs import content.data.Quests
class DunstanDialogueFile : DialogueFile() { class DunstanDialogueFile : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) { override fun handle(componentID: Int, buttonID: Int) {
when (getQuestStage(player!!, DeathPlateau.questName)) { when (getQuestStage(player!!, Quests.DEATH_PLATEAU)) {
21 -> { 21 -> {
when (stage) { when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage++ } START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage++ }
@@ -29,7 +28,7 @@ class DunstanDialogueFile : DialogueFile() {
10 -> npcl(FacialExpression.FRIENDLY, "My son has just turned 16 and I'd very much like him to join the Imperial Guard. The Prince's elite forces are invite only so it's very unlikely he'll get in. If you can arrange that you have a deal!").also { stage++ } 10 -> npcl(FacialExpression.FRIENDLY, "My son has just turned 16 and I'd very much like him to join the Imperial Guard. The Prince's elite forces are invite only so it's very unlikely he'll get in. If you can arrange that you have a deal!").also { stage++ }
11 -> playerl(FacialExpression.FRIENDLY, "That won't be a problem as I'm helping out the Imperial Guard!").also { stage++ } 11 -> playerl(FacialExpression.FRIENDLY, "That won't be a problem as I'm helping out the Imperial Guard!").also { stage++ }
12 -> npcl(FacialExpression.FRIENDLY, "Excellent! You'll need to bring an Iron bar for the spikes!").also { 12 -> npcl(FacialExpression.FRIENDLY, "Excellent! You'll need to bring an Iron bar for the spikes!").also {
setQuestStage(player!!, "Death Plateau", 22) setQuestStage(player!!, Quests.DEATH_PLATEAU, 22)
stage = END_DIALOGUE stage = END_DIALOGUE
} }
} }
@@ -60,7 +59,7 @@ class DunstanDialogueFile : DialogueFile() {
5 -> npcl(FacialExpression.FRIENDLY, "Thank you!").also { 5 -> npcl(FacialExpression.FRIENDLY, "Thank you!").also {
// Jumps to the next stage immediately in one continuous dialogue (questStage 24, stage 2). // Jumps to the next stage immediately in one continuous dialogue (questStage 24, stage 2).
setQuestStage(player!!, "Death Plateau", 24) setQuestStage(player!!, Quests.DEATH_PLATEAU, 24)
stage = 2 stage = 2
} }
} }
@@ -4,10 +4,9 @@ import core.api.*
import core.game.dialogue.DialogueFile import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic import core.game.dialogue.Topic
import core.game.node.entity.npc.NPC
import core.tools.END_DIALOGUE import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs import content.data.Quests
/** /**
* Eohric sub dialogue file for death plateau. * Eohric sub dialogue file for death plateau.
@@ -17,7 +16,7 @@ import org.rs09.consts.NPCs
*/ */
class EohricDialogueFile : DialogueFile() { class EohricDialogueFile : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) { override fun handle(componentID: Int, buttonID: Int) {
when (getQuestStage(player!!, DeathPlateau.questName)) { when (getQuestStage(player!!, Quests.DEATH_PLATEAU)) {
in 5..9 -> { in 5..9 -> {
when (stage) { when (stage) {
START_DIALOGUE -> player(FacialExpression.FRIENDLY, "Hi!").also { stage++ } START_DIALOGUE -> player(FacialExpression.FRIENDLY, "Hi!").also { stage++ }
@@ -31,7 +30,7 @@ class EohricDialogueFile : DialogueFile() {
11 -> player(FacialExpression.FRIENDLY, "Do you know where he is staying?").also { stage++ } 11 -> player(FacialExpression.FRIENDLY, "Do you know where he is staying?").also { stage++ }
12 -> npc(FacialExpression.FRIENDLY, "Harold is staying at the Toad and Chicken.").also { stage++ } 12 -> npc(FacialExpression.FRIENDLY, "Harold is staying at the Toad and Chicken.").also { stage++ }
13 -> player(FacialExpression.FRIENDLY, "Thanks!").also { 13 -> player(FacialExpression.FRIENDLY, "Thanks!").also {
setQuestStage(player!!, "Death Plateau", 10) setQuestStage(player!!, Quests.DEATH_PLATEAU, 10)
HaroldDialogueFile.resetNpc(player!!) HaroldDialogueFile.resetNpc(player!!)
stage = END_DIALOGUE stage = END_DIALOGUE
} }
@@ -58,7 +57,7 @@ class EohricDialogueFile : DialogueFile() {
2 -> playerl(FacialExpression.HALF_GUILTY, "I found Harold but he won't talk to me!.").also { stage++ } 2 -> playerl(FacialExpression.HALF_GUILTY, "I found Harold but he won't talk to me!.").also { stage++ }
3 -> npcl(FacialExpression.THINKING, "Hmm. Harold has got in trouble a few over his drinking and gambling. Perhaps he'd open up after a drink?").also { stage++ } 3 -> npcl(FacialExpression.THINKING, "Hmm. Harold has got in trouble a few over his drinking and gambling. Perhaps he'd open up after a drink?").also { stage++ }
4 -> playerl(FacialExpression.FRIENDLY, "Thanks, I'll try that!").also { 4 -> playerl(FacialExpression.FRIENDLY, "Thanks, I'll try that!").also {
setQuestStage(player!!, "Death Plateau", 12) setQuestStage(player!!, Quests.DEATH_PLATEAU, 12)
stage = END_DIALOGUE stage = END_DIALOGUE
} }
} }
@@ -11,6 +11,7 @@ import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE import core.tools.START_DIALOGUE
import org.rs09.consts.Animations import org.rs09.consts.Animations
import org.rs09.consts.Items import org.rs09.consts.Items
import content.data.Quests
/** /**
* Harold sub dialogue file for death plateau. * Harold sub dialogue file for death plateau.
@@ -38,7 +39,7 @@ class HaroldDialogueFile : DialogueFile() {
setAttribute(player!!, ATTRIBUTE_JUMPSTAGE, 0) setAttribute(player!!, ATTRIBUTE_JUMPSTAGE, 0)
} }
println(getAttribute(player!!, ATTRIBUTE_HAROLD_MONEY, -1)) println(getAttribute(player!!, ATTRIBUTE_HAROLD_MONEY, -1))
when (getQuestStage(player!!, DeathPlateau.questName)) { when (getQuestStage(player!!, Quests.DEATH_PLATEAU)) {
10 -> { // First time meeting. 10 -> { // First time meeting.
when (stage) { when (stage) {
START_DIALOGUE -> player(FacialExpression.FRIENDLY, "Hello there.").also { stage++ } START_DIALOGUE -> player(FacialExpression.FRIENDLY, "Hello there.").also { stage++ }
@@ -47,7 +48,7 @@ class HaroldDialogueFile : DialogueFile() {
3 -> npcl(FacialExpression.FRIENDLY, "Yeah.").also { stage++ } 3 -> npcl(FacialExpression.FRIENDLY, "Yeah.").also { stage++ }
4 -> playerl(FacialExpression.HAPPY, "Denulth said that you lost the combination to the equipment room ?").also { stage++ } 4 -> playerl(FacialExpression.HAPPY, "Denulth said that you lost the combination to the equipment room ?").also { stage++ }
5 -> npcl(FacialExpression.FRIENDLY, "I don't want to talk about it!").also { 5 -> npcl(FacialExpression.FRIENDLY, "I don't want to talk about it!").also {
setQuestStage(player!!, "Death Plateau", 11) setQuestStage(player!!, Quests.DEATH_PLATEAU, 11)
stage = END_DIALOGUE stage = END_DIALOGUE
} }
} }
@@ -71,7 +72,7 @@ class HaroldDialogueFile : DialogueFile() {
4 -> { 4 -> {
if (inInventory(player!!, Items.ASGARNIAN_ALE_1905, 1)) { if (inInventory(player!!, Items.ASGARNIAN_ALE_1905, 1)) {
removeItem(player!!, Items.ASGARNIAN_ALE_1905) removeItem(player!!, Items.ASGARNIAN_ALE_1905)
setQuestStage(player!!, "Death Plateau", 12) setQuestStage(player!!, Quests.DEATH_PLATEAU, 12)
sendMessage(player!!, "You give Harold an Asgarnian Ale.") sendMessage(player!!, "You give Harold an Asgarnian Ale.")
setAttribute(player!!, ATTRIBUTE_HAROLD_MONEY, 200) setAttribute(player!!, ATTRIBUTE_HAROLD_MONEY, 200)
sendItemDialogue(player!!, Items.ASGARNIAN_ALE_1905, "You give Harold an Asgarnian Ale.").also { stage++ } sendItemDialogue(player!!, Items.ASGARNIAN_ALE_1905, "You give Harold an Asgarnian Ale.").also { stage++ }
@@ -81,7 +82,7 @@ class HaroldDialogueFile : DialogueFile() {
} }
5 -> { 5 -> {
end() end()
setQuestStage(player!!, "Death Plateau", 13) setQuestStage(player!!, Quests.DEATH_PLATEAU, 13)
animate(npc!!, Animations.HUMAN_EATTING_829) animate(npc!!, Animations.HUMAN_EATTING_829)
runTask(npc!!, 5) { runTask(npc!!, 5) {
npcl(FacialExpression.FRIENDLY, "Arrh. That hit the spot!").also { stage = END_DIALOGUE } npcl(FacialExpression.FRIENDLY, "Arrh. That hit the spot!").also { stage = END_DIALOGUE }
@@ -120,7 +121,7 @@ class HaroldDialogueFile : DialogueFile() {
} }
24 -> { 24 -> {
end() end()
setQuestStage(player!!, DeathPlateau.questName, 14) setQuestStage(player!!, Quests.DEATH_PLATEAU, 14)
npc!!.isWalks = false npc!!.isWalks = false
animate(npc!!, Animations.HUMAN_EATTING_829) animate(npc!!, Animations.HUMAN_EATTING_829)
runTask(npc!!, 4) { runTask(npc!!, 4) {
@@ -204,7 +205,7 @@ class HaroldDialogueFile : DialogueFile() {
37 -> npcl(FacialExpression.FRIENDLY, "I'll write you out an IOU for the rest.").also { stage++ } 37 -> npcl(FacialExpression.FRIENDLY, "I'll write you out an IOU for the rest.").also { stage++ }
38 -> { 38 -> {
addItemOrDrop(player!!, Items.IOU_3103) addItemOrDrop(player!!, Items.IOU_3103)
setQuestStage(player!!, DeathPlateau.questName, 15) setQuestStage(player!!, Quests.DEATH_PLATEAU, 15)
sendMessage(player!!, "Harold has given you an IOU scribbled on some paper.") sendMessage(player!!, "Harold has given you an IOU scribbled on some paper.")
sendItemDialogue(player!!, Items.IOU_3103, "Harold has given you an IOU scribbled on some paper.").also {stage = END_DIALOGUE} sendItemDialogue(player!!, Items.IOU_3103, "Harold has given you an IOU scribbled on some paper.").also {stage = END_DIALOGUE}
} }
@@ -292,7 +293,7 @@ class HaroldDialogueFile : DialogueFile() {
34 -> npcl(FacialExpression.DRUNK, "I owe you the resht!").also { stage++ } 34 -> npcl(FacialExpression.DRUNK, "I owe you the resht!").also { stage++ }
35 -> { 35 -> {
addItemOrDrop(player!!, Items.IOU_3103) addItemOrDrop(player!!, Items.IOU_3103)
setQuestStage(player!!, DeathPlateau.questName, 15) setQuestStage(player!!, Quests.DEATH_PLATEAU, 15)
sendMessage(player!!, "Harold has given you an IOU scribbled on some paper.") sendMessage(player!!, "Harold has given you an IOU scribbled on some paper.")
sendItemDialogue(player!!, Items.IOU_3103, "Harold has given you an IOU scribbled on some paper.").also {stage = END_DIALOGUE} sendItemDialogue(player!!, Items.IOU_3103, "Harold has given you an IOU scribbled on some paper.").also {stage = END_DIALOGUE}
} }
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.deathplateau package content.region.asgarnia.burthorpe.quest.deathplateau
import content.data.Quests
import core.api.* import core.api.*
import core.game.dialogue.DialogueFile import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
@@ -9,7 +10,7 @@ import org.rs09.consts.Items
class IOUNoteDialogueFile : DialogueFile() { class IOUNoteDialogueFile : DialogueFile() {
var a = 0 var a = 0
override fun handle(componentID: Int, buttonID: Int) { override fun handle(componentID: Int, buttonID: Int) {
when (getQuestStage(player!!, DeathPlateau.questName)) { when (getQuestStage(player!!, Quests.DEATH_PLATEAU)) {
in 15..16 -> { in 15..16 -> {
when (stage) { when (stage) {
0 -> player(FacialExpression.NEUTRAL, "The IOU says that Harold owes me some money.").also { stage++ } 0 -> player(FacialExpression.NEUTRAL, "The IOU says that Harold owes me some money.").also { stage++ }
@@ -18,7 +19,7 @@ class IOUNoteDialogueFile : DialogueFile() {
3 -> { 3 -> {
if (removeItem(player!!, Items.IOU_3103)) { if (removeItem(player!!, Items.IOU_3103)) {
addItemOrDrop(player!!, Items.COMBINATION_3102) addItemOrDrop(player!!, Items.COMBINATION_3102)
setQuestStage(player!!, DeathPlateau.questName, 16) setQuestStage(player!!, Quests.DEATH_PLATEAU, 16)
sendItemDialogue(player!!, Items.COMBINATION_3102, "You have found the combination!").also { stage++ } sendItemDialogue(player!!, Items.COMBINATION_3102, "You have found the combination!").also { stage++ }
} }
} }
@@ -5,11 +5,12 @@ import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic import core.game.dialogue.Topic
import core.tools.END_DIALOGUE import core.tools.END_DIALOGUE
import content.data.Quests
class SabaDialogueFile : DialogueFile() { class SabaDialogueFile : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) { override fun handle(componentID: Int, buttonID: Int) {
when (getQuestStage(player!!, DeathPlateau.questName)) { when (getQuestStage(player!!, Quests.DEATH_PLATEAU)) {
19 -> { 19 -> {
when (stage) { when (stage) {
0 -> player(FacialExpression.FRIENDLY, "Hello!").also { stage++ } 0 -> player(FacialExpression.FRIENDLY, "Hello!").also { stage++ }
@@ -34,7 +35,7 @@ class SabaDialogueFile : DialogueFile() {
29 -> npcl(FacialExpression.HALF_GUILTY,"Before the trolls came there used to be a nettlesome Sherpa that took humans exploring or something equally stupid. Perhaps he'd know another way.").also { stage++ } 29 -> npcl(FacialExpression.HALF_GUILTY,"Before the trolls came there used to be a nettlesome Sherpa that took humans exploring or something equally stupid. Perhaps he'd know another way.").also { stage++ }
30 -> playerl(FacialExpression.FRIENDLY, "Where does this Sherpa live?").also { stage++ } 30 -> playerl(FacialExpression.FRIENDLY, "Where does this Sherpa live?").also { stage++ }
31 -> npcl(FacialExpression.ANNOYED,"I don't know but it can't be far as he used to be around all the time!").also { 31 -> npcl(FacialExpression.ANNOYED,"I don't know but it can't be far as he used to be around all the time!").also {
setQuestStage(player!!, "Death Plateau", 20) setQuestStage(player!!, Quests.DEATH_PLATEAU, 20)
stage = END_DIALOGUE } stage = END_DIALOGUE }
} }
} }
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.deathplateau package content.region.asgarnia.burthorpe.quest.deathplateau
import content.data.Quests
import core.api.* import core.api.*
import core.game.node.entity.Entity import core.game.node.entity.Entity
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
@@ -11,9 +12,9 @@ class SecretWayLocation : MapArea {
} }
override fun areaEnter(entity: Entity) { override fun areaEnter(entity: Entity) {
if (entity is Player && getQuestStage(entity, DeathPlateau.questName) == 25) { if (entity is Player && getQuestStage(entity, Quests.DEATH_PLATEAU) == 25) {
sendPlayerDialogue(entity, "I think this is far enough, I can see Death Plateau and it looks like the trolls haven't found the path. I'd better go and tell Denulth.") sendPlayerDialogue(entity, "I think this is far enough, I can see Death Plateau and it looks like the trolls haven't found the path. I'd better go and tell Denulth.")
setQuestStage(entity, DeathPlateau.questName, 26) setQuestStage(entity, Quests.DEATH_PLATEAU, 26)
} }
} }
} }
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.deathplateau package content.region.asgarnia.burthorpe.quest.deathplateau
import content.data.Quests
import core.api.* import core.api.*
import core.game.dialogue.DialogueFile import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
@@ -12,7 +13,7 @@ import org.rs09.consts.Items
class TenzingDialogueFile : DialogueFile() { class TenzingDialogueFile : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) { override fun handle(componentID: Int, buttonID: Int) {
when (getQuestStage(player!!, DeathPlateau.questName)) { when (getQuestStage(player!!, Quests.DEATH_PLATEAU)) {
20 -> { 20 -> {
when (stage) { when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hello!").also { stage++ } START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hello!").also { stage++ }
@@ -34,7 +35,7 @@ class TenzingDialogueFile : DialogueFile() {
20 -> npcl(FacialExpression.FRIENDLY, "Thank you traveller!").also { stage++ } 20 -> npcl(FacialExpression.FRIENDLY, "Thank you traveller!").also { stage++ }
21 -> sendItemDialogue(player!!, Items.CLIMBING_BOOTS_3105, "Tenzing has given you his Climbing boots.").also { 21 -> sendItemDialogue(player!!, Items.CLIMBING_BOOTS_3105, "Tenzing has given you his Climbing boots.").also {
addItemOrDrop(player!!, Items.CLIMBING_BOOTS_3105, 1) addItemOrDrop(player!!, Items.CLIMBING_BOOTS_3105, 1)
setQuestStage(player!!, DeathPlateau.questName, 21) setQuestStage(player!!, Quests.DEATH_PLATEAU, 21)
stage = END_DIALOGUE stage = END_DIALOGUE
} }
30 -> npcl(FacialExpression.ANNOYED, "Hmph.").also { stage = END_DIALOGUE } 30 -> npcl(FacialExpression.ANNOYED, "Hmph.").also { stage = END_DIALOGUE }
@@ -104,7 +105,7 @@ class TenzingDialogueFile : DialogueFile() {
9 -> npcl(FacialExpression.FRIENDLY, "I don't think the Trolls have found the secret way yet, if they had I would've been attacked by now.").also { stage++ } 9 -> npcl(FacialExpression.FRIENDLY, "I don't think the Trolls have found the secret way yet, if they had I would've been attacked by now.").also { stage++ }
10 -> playerl(FacialExpression.FRIENDLY, "OK thanks but I think I'd better check the path. I don't want to send the Imperial Guards to their death!").also { stage++ } 10 -> playerl(FacialExpression.FRIENDLY, "OK thanks but I think I'd better check the path. I don't want to send the Imperial Guards to their death!").also { stage++ }
11 -> npcl(FacialExpression.FRIENDLY, "You are wise for one so young.").also { 11 -> npcl(FacialExpression.FRIENDLY, "You are wise for one so young.").also {
setQuestStage(player!!, DeathPlateau.questName, 25) setQuestStage(player!!, Quests.DEATH_PLATEAU, 25)
stage = END_DIALOGUE stage = END_DIALOGUE
} }
} }
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.heroesquest package content.region.asgarnia.burthorpe.quest.heroesquest
import content.data.Quests
import core.api.* import core.api.*
import core.game.dialogue.DialogueBuilder import core.game.dialogue.DialogueBuilder
import core.game.dialogue.DialogueBuilderFile import core.game.dialogue.DialogueBuilderFile
@@ -31,9 +32,9 @@ class AchiettiesDialogueFile : DialogueBuilderFile() {
override fun create(b: DialogueBuilder) { override fun create(b: DialogueBuilder) {
b.onQuestStages(HeroesQuest.questName, 0,1) b.onQuestStages(Quests.HEROES_QUEST, 0,1)
.branch { player -> .branch { player ->
return@branch getQuestStage(player, HeroesQuest.questName) return@branch getQuestStage(player, Quests.HEROES_QUEST)
}.let{ branch -> }.let{ branch ->
branch.onValue(0) branch.onValue(0)
.npcl(FacialExpression.FRIENDLY, "Greetings. Welcome to the Heroes' Guild.") .npcl(FacialExpression.FRIENDLY, "Greetings. Welcome to the Heroes' Guild.")
@@ -58,8 +59,8 @@ class AchiettiesDialogueFile : DialogueBuilderFile() {
return@let branch return@let branch
}.onValue(1) }.onValue(1)
.betweenStage { df, player, _, _ -> .betweenStage { df, player, _, _ ->
if(getQuestStage(player, HeroesQuest.questName) == 0) { if(getQuestStage(player, Quests.HEROES_QUEST) == 0) {
setQuestStage(player, HeroesQuest.questName, 1) setQuestStage(player, Quests.HEROES_QUEST, 1)
} }
} }
.npcl("Well you seem to meet our initial requirements, so you may now begin the tasks to earn membership in the Heroes' Guild.") .npcl("Well you seem to meet our initial requirements, so you may now begin the tasks to earn membership in the Heroes' Guild.")
@@ -107,7 +108,7 @@ class AchiettiesDialogueFile : DialogueBuilderFile() {
} }
} }
b.onQuestStages(HeroesQuest.questName, 2,3,4) b.onQuestStages(Quests.HEROES_QUEST, 2, 3, 4)
.npcl("Greetings. Welcome to the Heroes' Guild.") .npcl("Greetings. Welcome to the Heroes' Guild.")
.npcl("How goes thy quest adventurer?") .npcl("How goes thy quest adventurer?")
.playerl("It's tough. I've not done it yet.") .playerl("It's tough. I've not done it yet.")
@@ -129,7 +130,7 @@ class AchiettiesDialogueFile : DialogueBuilderFile() {
.end() .end()
} }
b.onQuestStages(HeroesQuest.questName, 6) b.onQuestStages(Quests.HEROES_QUEST, 6)
.npcl("Greetings. Welcome to the Heroes' Guild.") .npcl("Greetings. Welcome to the Heroes' Guild.")
.npcl("How goes thy quest adventurer?") .npcl("How goes thy quest adventurer?")
.branch { player -> .branch { player ->
@@ -166,14 +167,14 @@ class AchiettiesDialogueFile : DialogueBuilderFile() {
removeItem(player, Items.FIRE_FEATHER_1583) removeItem(player, Items.FIRE_FEATHER_1583)
removeItem(player, Items.LAVA_EEL_2149) removeItem(player, Items.LAVA_EEL_2149)
removeItem(player, Items.THIEVES_ARMBAND_1579) removeItem(player, Items.THIEVES_ARMBAND_1579)
if (getQuestStage(player, HeroesQuest.questName) == 6) { if (getQuestStage(player, Quests.HEROES_QUEST) == 6) {
finishQuest(player, HeroesQuest.questName) finishQuest(player, Quests.HEROES_QUEST)
} }
} }
} }
} }
b.onQuestStages(HeroesQuest.questName, 100) b.onQuestStages(Quests.HEROES_QUEST, 100)
.npcl("Greetings. Welcome to the Heroes' Guild.") .npcl("Greetings. Welcome to the Heroes' Guild.")
} }
} }
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.heroesquest package content.region.asgarnia.burthorpe.quest.heroesquest
import content.data.Quests
import core.api.getQuestStage import core.api.getQuestStage
import core.api.openDialogue import core.api.openDialogue
import core.api.openNpcShop import core.api.openNpcShop
@@ -7,7 +8,6 @@ import core.api.setQuestStage
import core.game.dialogue.DialogueBuilder import core.game.dialogue.DialogueBuilder
import core.game.dialogue.DialogueBuilderFile import core.game.dialogue.DialogueBuilderFile
import core.game.dialogue.DialoguePlugin import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.plugin.Initializable import core.plugin.Initializable
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
@@ -40,13 +40,16 @@ class AlfonseTheWaiterDialogueFile : DialogueBuilderFile() {
optionBuilder.option_playerl("No thank you.") optionBuilder.option_playerl("No thank you.")
.end() .end()
optionBuilder.optionIf("Do you sell Gherkins?"){ player -> return@optionIf getQuestStage(player, HeroesQuest.questName) >= 2 && HeroesQuest.isPhoenix(player) } optionBuilder.optionIf("Do you sell Gherkins?"){ player -> return@optionIf getQuestStage(
player,
Quests.HEROES_QUEST
) >= 2 && HeroesQuest.isPhoenix(player) }
.playerl("Do you sell Gherkins?") .playerl("Do you sell Gherkins?")
.npc("Hmmmm Gherkins eh? Ask Charlie the cook, round the", "back. He may have some 'gherkins' for you!") .npc("Hmmmm Gherkins eh? Ask Charlie the cook, round the", "back. He may have some 'gherkins' for you!")
.linel("Alfonse winks at you.") .linel("Alfonse winks at you.")
.endWith { _, player -> .endWith { _, player ->
if(getQuestStage(player, HeroesQuest.questName) == 2) { if(getQuestStage(player, Quests.HEROES_QUEST) == 2) {
setQuestStage(player, HeroesQuest.questName, 3) setQuestStage(player, Quests.HEROES_QUEST, 3)
} }
} }
@@ -1,8 +1,8 @@
package content.region.asgarnia.burthorpe.quest.heroesquest package content.region.asgarnia.burthorpe.quest.heroesquest
import content.data.Quests
import core.api.getQuestStage import core.api.getQuestStage
import core.api.openDialogue import core.api.openDialogue
import core.api.openNpcShop
import core.api.setQuestStage import core.api.setQuestStage
import core.game.dialogue.DialogueBuilder import core.game.dialogue.DialogueBuilder
import core.game.dialogue.DialogueBuilderFile import core.game.dialogue.DialogueBuilderFile
@@ -33,11 +33,11 @@ class CharlieTheCookDialogueFile : DialogueBuilderFile() {
.let { optionBuilder -> .let { optionBuilder ->
val continuePath = b.placeholder() val continuePath = b.placeholder()
optionBuilder.optionIf("I'm looking for a gherkin..."){ player -> return@optionIf getQuestStage(player, HeroesQuest.questName) >= 3 && HeroesQuest.isPhoenix(player) } optionBuilder.optionIf("I'm looking for a gherkin...") { player -> return@optionIf getQuestStage(player, Quests.HEROES_QUEST) >= 3 && HeroesQuest.isPhoenix(player) }
.playerl("I'm looking for a gherkin...") .playerl("I'm looking for a gherkin...")
.goto(continuePath) .goto(continuePath)
optionBuilder.optionIf("I'm a fellow member of the Phoenix Gang."){ player -> return@optionIf getQuestStage(player, HeroesQuest.questName) >= 3 && HeroesQuest.isPhoenix(player) } optionBuilder.optionIf("I'm a fellow member of the Phoenix Gang.") { player -> return@optionIf getQuestStage(player, Quests.HEROES_QUEST) >= 3 && HeroesQuest.isPhoenix(player) }
.playerl("I'm a fellow member of the Phoenix Gang.") .playerl("I'm a fellow member of the Phoenix Gang.")
.goto(continuePath) .goto(continuePath)
@@ -61,8 +61,8 @@ class CharlieTheCookDialogueFile : DialogueBuilderFile() {
.playerl("Mind if I check it out for myself?") .playerl("Mind if I check it out for myself?")
.npcl("Not at all! The more minds we have working on the problem, the quicker we get that loot!") .npcl("Not at all! The more minds we have working on the problem, the quicker we get that loot!")
.endWith { _, player -> .endWith { _, player ->
if (getQuestStage(player, HeroesQuest.questName) == 3) { if (getQuestStage(player, Quests.HEROES_QUEST) == 3) {
setQuestStage(player, HeroesQuest.questName, 4) setQuestStage(player, Quests.HEROES_QUEST, 4)
} }
} }
@@ -74,8 +74,8 @@ class CharlieTheCookDialogueFile : DialogueBuilderFile() {
.playerl("Mind if I check it out for myself?") .playerl("Mind if I check it out for myself?")
.npcl("Not at all! The more minds we have working on the problem, the quicker we get that loot!") .npcl("Not at all! The more minds we have working on the problem, the quicker we get that loot!")
.endWith { _, player -> .endWith { _, player ->
if (getQuestStage(player, HeroesQuest.questName) == 3) { if (getQuestStage(player, Quests.HEROES_QUEST) == 3) {
setQuestStage(player, HeroesQuest.questName, 4) setQuestStage(player, Quests.HEROES_QUEST, 4)
} }
} }
} }
@@ -1,8 +1,8 @@
package content.region.asgarnia.burthorpe.quest.heroesquest package content.region.asgarnia.burthorpe.quest.heroesquest
import content.data.Quests
import core.api.* import core.api.*
import core.game.dialogue.* import core.game.dialogue.*
import core.game.global.action.DoorActionHandler
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.plugin.Initializable import core.plugin.Initializable
import org.rs09.consts.Items import org.rs09.consts.Items
@@ -28,7 +28,7 @@ class GarvDialogue(player: Player? = null) : DialoguePlugin(player){
class GarvDialogueFile : DialogueBuilderFile() { class GarvDialogueFile : DialogueBuilderFile() {
override fun create(b: DialogueBuilder) { override fun create(b: DialogueBuilder) {
// Technically this won't happen since you have to get past Grubor. // Technically this won't happen since you have to get past Grubor.
b.onQuestStages(HeroesQuest.questName, 0,1,2) b.onQuestStages(Quests.HEROES_QUEST, 0, 1, 2)
.npcl("Hello. What do you want?") .npcl("Hello. What do you want?")
.options() .options()
.let { optionBuilder -> .let { optionBuilder ->
@@ -40,7 +40,7 @@ class GarvDialogueFile : DialogueBuilderFile() {
.end() .end()
} }
b.onQuestStages(HeroesQuest.questName, 3,4,5,6,100) b.onQuestStages(Quests.HEROES_QUEST, 3, 4, 5, 6, 100)
// .npcl("Oi! Where do you think you're going pal?") - When you click on the door instead of Garv. // .npcl("Oi! Where do you think you're going pal?") - When you click on the door instead of Garv.
.npcl("Hello. What do you want?") .npcl("Hello. What do you want?")
.playerl("Hi. I'm Hartigen. I've come to work here.") .playerl("Hi. I'm Hartigen. I've come to work here.")
@@ -55,8 +55,8 @@ class GarvDialogueFile : DialogueBuilderFile() {
branch2.onValue(1) branch2.onValue(1)
.npcl("You'd better come in then, Grip will want to talk to you.") .npcl("You'd better come in then, Grip will want to talk to you.")
.endWith { _, player -> .endWith { _, player ->
if(getQuestStage(player, HeroesQuest.questName) == 3) { if(getQuestStage(player, Quests.HEROES_QUEST) == 3) {
setQuestStage(player, HeroesQuest.questName, 4) setQuestStage(player, Quests.HEROES_QUEST, 4)
} }
} }
branch2.onValue(0) branch2.onValue(0)
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.heroesquest package content.region.asgarnia.burthorpe.quest.heroesquest
import content.data.Quests
import core.api.* import core.api.*
import core.game.dialogue.DialogueBuilder import core.game.dialogue.DialogueBuilder
import core.game.dialogue.DialogueBuilderFile import core.game.dialogue.DialogueBuilderFile
@@ -38,7 +39,7 @@ class GerrantDialogueFile : DialogueBuilderFile() {
optionBuilder.option_playerl("Sorry, I'm not interested.") optionBuilder.option_playerl("Sorry, I'm not interested.")
.end() .end()
optionBuilder.optionIf("I want to find out how to catch a lava eel.") { player -> return@optionIf getQuestStage(player, HeroesQuest.questName) >= 1 } optionBuilder.optionIf("I want to find out how to catch a lava eel.") { player -> return@optionIf getQuestStage(player, Quests.HEROES_QUEST) >= 1 }
.playerl("I want to find out how to catch a lava eel.") .playerl("I want to find out how to catch a lava eel.")
.npcl("Lava eels, eh? That's a tricky one, that is. You'll need a lava-proof fishing rod. The method for making this would be to take an ordinary fishing rod, and then cover it with fire-proof blamish oil.") .npcl("Lava eels, eh? That's a tricky one, that is. You'll need a lava-proof fishing rod. The method for making this would be to take an ordinary fishing rod, and then cover it with fire-proof blamish oil.")
.branch { player -> .branch { player ->
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.heroesquest package content.region.asgarnia.burthorpe.quest.heroesquest
import content.data.Quests
import core.api.* import core.api.*
import core.game.dialogue.DialogueFile import core.game.dialogue.DialogueFile
import core.game.node.entity.Entity import core.game.node.entity.Entity
@@ -38,8 +39,8 @@ class GripBehavior : NPCBehavior(NPCs.GRIP_792) {
override fun onDeathFinished(self: NPC, killer: Entity) { override fun onDeathFinished(self: NPC, killer: Entity) {
if (killer is Player) { if (killer is Player) {
if (getQuestStage(killer, HeroesQuest.questName) == 4) { if (getQuestStage(killer, Quests.HEROES_QUEST) == 4) {
setQuestStage(killer, HeroesQuest.questName, 5) setQuestStage(killer, Quests.HEROES_QUEST, 5)
} }
val gi = GroundItem( val gi = GroundItem(
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.heroesquest package content.region.asgarnia.burthorpe.quest.heroesquest
import content.data.Quests
import core.api.* import core.api.*
import core.game.dialogue.DialogueBuilder import core.game.dialogue.DialogueBuilder
import core.game.dialogue.DialogueBuilderFile import core.game.dialogue.DialogueBuilderFile
@@ -26,7 +27,8 @@ class GruborDialogue (player: Player? = null) : DialoguePlugin(player) {
class GruborDialogueFile : DialogueBuilderFile() { class GruborDialogueFile : DialogueBuilderFile() {
override fun create(b: DialogueBuilder) { override fun create(b: DialogueBuilder) {
b.onPredicate { player -> getQuestStage(player, HeroesQuest.questName) >= 2 && b.onPredicate { player ->
getQuestStage(player, Quests.HEROES_QUEST) >= 2 &&
getAttribute(player, HeroesQuest.attributeGruborLetsYouIn, false) && getAttribute(player, HeroesQuest.attributeGruborLetsYouIn, false) &&
HeroesQuest.isBlackArm(player) HeroesQuest.isBlackArm(player)
} }
@@ -34,7 +36,8 @@ class GruborDialogueFile : DialogueBuilderFile() {
.npcl("Hi, I'm a little busy right now.") .npcl("Hi, I'm a little busy right now.")
.end() .end()
b.onPredicate { player -> getQuestStage(player, HeroesQuest.questName) >= 2 && b.onPredicate { player ->
getQuestStage(player, Quests.HEROES_QUEST) >= 2 &&
!getAttribute(player, HeroesQuest.attributeGruborLetsYouIn, false) && !getAttribute(player, HeroesQuest.attributeGruborLetsYouIn, false) &&
HeroesQuest.isBlackArm(player) HeroesQuest.isBlackArm(player)
} }
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.heroesquest package content.region.asgarnia.burthorpe.quest.heroesquest
import content.data.Quests
import content.region.misthalin.varrock.quest.shieldofarrav.ShieldofArrav import content.region.misthalin.varrock.quest.shieldofarrav.ShieldofArrav
import core.api.* import core.api.*
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
@@ -12,7 +13,7 @@ import org.rs09.consts.Items
* Heroes' Quest * Heroes' Quest
*/ */
@Initializable @Initializable
class HeroesQuest : Quest("Heroes' Quest",75, 74, 1, 188, 0, 1, 15) { class HeroesQuest : Quest(Quests.HEROES_QUEST,75, 74, 1, 188, 0, 1, 15) {
/** /**
* Do note: "other players can help you even if they have already finished Heroes' Quest" * Do note: "other players can help you even if they have already finished Heroes' Quest"
* 1 - Talked to Achietties to start the quest * 1 - Talked to Achietties to start the quest
@@ -34,7 +35,6 @@ class HeroesQuest : Quest("Heroes' Quest",75, 74, 1, 188, 0, 1, 15) {
*/ */
companion object { companion object {
const val questName = "Heroes' Quest"
const val attributeGruborLetsYouIn = "/save:quest:heroesquest-gruborletsyouin" const val attributeGruborLetsYouIn = "/save:quest:heroesquest-gruborletsyouin"
const val attributeGripTookPapers = "/save:quest:heroesquest-griptookpapers" const val attributeGripTookPapers = "/save:quest:heroesquest-griptookpapers"
const val attributeGripSaidDuties = "/save:quest:heroesquest-gripsaidduties" const val attributeGripSaidDuties = "/save:quest:heroesquest-gripsaidduties"
@@ -42,10 +42,10 @@ class HeroesQuest : Quest("Heroes' Quest",75, 74, 1, 188, 0, 1, 15) {
const val attributeHasOpenedChestDoor = "/save:quest:heroesquest-hasopenedchestdoor" const val attributeHasOpenedChestDoor = "/save:quest:heroesquest-hasopenedchestdoor"
fun checkQuestsAreComplete(player: Player): Boolean { fun checkQuestsAreComplete(player: Player): Boolean {
return isQuestComplete(player, "Shield of Arrav") && return isQuestComplete(player, Quests.SHIELD_OF_ARRAV) &&
isQuestComplete(player, "Lost City") && isQuestComplete(player, Quests.LOST_CITY) &&
isQuestComplete(player, "Merlin's Crystal") && isQuestComplete(player, Quests.MERLINS_CRYSTAL) &&
isQuestComplete(player, "Dragon Slayer") && isQuestComplete(player, Quests.DRAGON_SLAYER) &&
getQuestPoints(player) >= 55 getQuestPoints(player) >= 55
} }
@@ -65,10 +65,10 @@ class HeroesQuest : Quest("Heroes' Quest",75, 74, 1, 188, 0, 1, 15) {
hasLevelStat(player, Skills.MINING, 50), hasLevelStat(player, Skills.MINING, 50),
hasLevelStat(player, Skills.FISHING, 53), hasLevelStat(player, Skills.FISHING, 53),
hasLevelStat(player, Skills.COOKING, 53), hasLevelStat(player, Skills.COOKING, 53),
isQuestComplete(player, "Shield of Arrav"), isQuestComplete(player, Quests.SHIELD_OF_ARRAV),
isQuestComplete(player, "Lost City"), isQuestComplete(player, Quests.LOST_CITY),
isQuestComplete(player, "Merlin's Crystal"), isQuestComplete(player, Quests.MERLINS_CRYSTAL),
isQuestComplete(player, "Dragon Slayer"), isQuestComplete(player, Quests.DRAGON_SLAYER),
getQuestPoints(player) >= 55, getQuestPoints(player) >= 55,
).all { it } ).all { it }
} }
@@ -85,7 +85,7 @@ class HeroesQuest : Quest("Heroes' Quest",75, 74, 1, 188, 0, 1, 15) {
var line = 12 var line = 12
var stage = getStage(player) var stage = getStage(player)
var started = getQuestStage(player!!, questName) > 0 var started = getQuestStage(player!!, Quests.HEROES_QUEST) > 0
if(!started){ if(!started){
if (checkQuestsAreComplete(player)) { if (checkQuestsAreComplete(player)) {
@@ -95,10 +95,10 @@ class HeroesQuest : Quest("Heroes' Quest",75, 74, 1, 188, 0, 1, 15) {
} else { } else {
line(player, "I can start this quest by speaking to !!Achietties?? at the", line++) line(player, "I can start this quest by speaking to !!Achietties?? at the", line++)
line(player, "!!Heroes' Guild?? located !!North?? of !!Taverly?? after completing", line++) line(player, "!!Heroes' Guild?? located !!North?? of !!Taverly?? after completing", line++)
line(player, "!!The Shield of Arrav??", line++, isQuestComplete(player, "Shield of Arrav")) line(player, "!!The Shield of Arrav??", line++, isQuestComplete(player, Quests.SHIELD_OF_ARRAV))
line(player, "!!The Lost City??", line++, isQuestComplete(player, "Lost City")) line(player, "!!The Lost City??", line++, isQuestComplete(player, Quests.LOST_CITY))
line(player, "!!Merlin's Crystal??", line++, isQuestComplete(player, "Merlin's Crystal")) line(player, "!!Merlin's Crystal??", line++, isQuestComplete(player, Quests.MERLINS_CRYSTAL))
line(player, "!!The Dragon Slayer??", line++, isQuestComplete(player, "Dragon Slayer")) line(player, "!!The Dragon Slayer??", line++, isQuestComplete(player, Quests.DRAGON_SLAYER))
line(player, "!!and gaining 55 Quest Points??", line++, getQuestPoints(player) >= 55) line(player, "!!and gaining 55 Quest Points??", line++, getQuestPoints(player) >= 55)
} }
line(player, "To complete this quest I need:", line++, false) line(player, "To complete this quest I need:", line++, false)
@@ -217,7 +217,7 @@ class HeroesQuest : Quest("Heroes' Quest",75, 74, 1, 188, 0, 1, 15) {
} }
override fun reset(player: Player) { override fun reset(player: Player) {
if (getQuestStage(player, questName) == 0) { if (getQuestStage(player, Quests.HEROES_QUEST) == 0) {
removeAttribute(player, attributeGruborLetsYouIn) removeAttribute(player, attributeGruborLetsYouIn)
removeAttribute(player, attributeGripTookPapers) removeAttribute(player, attributeGripTookPapers)
removeAttribute(player, attributeGripSaidDuties) removeAttribute(player, attributeGripSaidDuties)
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.heroesquest package content.region.asgarnia.burthorpe.quest.heroesquest
import content.data.Quests
import core.api.* import core.api.*
import core.game.dialogue.DialogueFile import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
@@ -22,7 +23,7 @@ class HeroesQuestListener: InteractionListener {
override fun defineListeners() { override fun defineListeners() {
// Black arm gang office door. // Black arm gang office door.
on(Scenery.DOOR_2626, IntType.SCENERY, "open") { player, node -> on(Scenery.DOOR_2626, IntType.SCENERY, "open") { player, node ->
if (getQuestStage(player, HeroesQuest.questName) >= 2 && if (getQuestStage(player, Quests.HEROES_QUEST) >= 2 &&
getAttribute(player, HeroesQuest.attributeGruborLetsYouIn, false) && getAttribute(player, HeroesQuest.attributeGruborLetsYouIn, false) &&
HeroesQuest.isBlackArm(player)) { HeroesQuest.isBlackArm(player)) {
DoorActionHandler.handleAutowalkDoor(player, node.asScenery()) DoorActionHandler.handleAutowalkDoor(player, node.asScenery())
@@ -34,7 +35,7 @@ class HeroesQuestListener: InteractionListener {
// Kitchen entrance // Kitchen entrance
on(Scenery.DOOR_2628, IntType.SCENERY, "open") { player, node -> on(Scenery.DOOR_2628, IntType.SCENERY, "open") { player, node ->
if (getQuestStage(player, HeroesQuest.questName) >= 3 && HeroesQuest.isPhoenix(player)) { if (getQuestStage(player, Quests.HEROES_QUEST) >= 3 && HeroesQuest.isPhoenix(player)) {
DoorActionHandler.handleAutowalkDoor(player, node.asScenery()) DoorActionHandler.handleAutowalkDoor(player, node.asScenery())
} else { } else {
sendDialogue(player, "This door is locked.") sendDialogue(player, "This door is locked.")
@@ -44,7 +45,7 @@ class HeroesQuestListener: InteractionListener {
// Kitchen wall // Kitchen wall
on(Scenery.WALL_2629, IntType.SCENERY, "push") { player, node -> on(Scenery.WALL_2629, IntType.SCENERY, "push") { player, node ->
if (getQuestStage(player, HeroesQuest.questName) >= 4 && HeroesQuest.isPhoenix(player)) { if (getQuestStage(player, Quests.HEROES_QUEST) >= 4 && HeroesQuest.isPhoenix(player)) {
DoorActionHandler.handleAutowalkDoor(player, node.asScenery()) DoorActionHandler.handleAutowalkDoor(player, node.asScenery())
} else { } else {
openDialogue(player, CharlieTheCookDialogueFile(), NPC(NPCs.CHARLIE_THE_COOK_794)) openDialogue(player, CharlieTheCookDialogueFile(), NPC(NPCs.CHARLIE_THE_COOK_794))
@@ -54,7 +55,7 @@ class HeroesQuestListener: InteractionListener {
// Mansion frontdoor // Mansion frontdoor
on(Scenery.DOOR_2627, IntType.SCENERY, "open") { player, node -> on(Scenery.DOOR_2627, IntType.SCENERY, "open") { player, node ->
if (getQuestStage(player, HeroesQuest.questName) >= 4 && HeroesQuest.isBlackArm(player)) { if (getQuestStage(player, Quests.HEROES_QUEST) >= 4 && HeroesQuest.isBlackArm(player)) {
DoorActionHandler.handleAutowalkDoor(player, node.asScenery()) DoorActionHandler.handleAutowalkDoor(player, node.asScenery())
} else { } else {
openDialogue(player, GarvDialogueFile(), NPC(NPCs.GARV_788)) openDialogue(player, GarvDialogueFile(), NPC(NPCs.GARV_788))
@@ -127,8 +128,8 @@ class HeroesQuestListener: InteractionListener {
if (inInventory(player, Items.PETES_CANDLESTICK_1577)) { if (inInventory(player, Items.PETES_CANDLESTICK_1577)) {
sendMessage(player, "You search the chest but find nothing.") sendMessage(player, "You search the chest but find nothing.")
} else { } else {
if (getQuestStage(player, HeroesQuest.questName) == 4) { if (getQuestStage(player, Quests.HEROES_QUEST) == 4) {
setQuestStage(player, HeroesQuest.questName, 5) setQuestStage(player, Quests.HEROES_QUEST, 5)
} }
sendDialogue(player, "You find two candlesticks in the chest. So that will be one for you, and one for the person who killed Grip for you.") sendDialogue(player, "You find two candlesticks in the chest. So that will be one for you, and one for the person who killed Grip for you.")
addItemOrDrop(player, Items.PETES_CANDLESTICK_1577, 2) addItemOrDrop(player, Items.PETES_CANDLESTICK_1577, 2)
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.heroesquest package content.region.asgarnia.burthorpe.quest.heroesquest
import content.data.Quests
import core.api.* import core.api.*
import core.game.dialogue.* import core.game.dialogue.*
import org.rs09.consts.Items import org.rs09.consts.Items
@@ -7,7 +8,7 @@ import org.rs09.consts.Items
class KatrineDialogueFile : DialogueBuilderFile() { class KatrineDialogueFile : DialogueBuilderFile() {
override fun create(b: DialogueBuilder) { override fun create(b: DialogueBuilder) {
// 0 is handled by default in the old KatrineDialogue. // 0 is handled by default in the old KatrineDialogue.
b.onQuestStages(HeroesQuest.questName, 1) b.onQuestStages(Quests.HEROES_QUEST, 1)
.playerl("Hey.") .playerl("Hey.")
.npcl("Hey.") .npcl("Hey.")
.options() .options()
@@ -30,15 +31,15 @@ class KatrineDialogueFile : DialogueBuilderFile() {
.npcl("Visit our hideout in the alleyway on palm street.") .npcl("Visit our hideout in the alleyway on palm street.")
.npcl("To get in you will need to tell them the secret password 'four leaved clover'.") .npcl("To get in you will need to tell them the secret password 'four leaved clover'.")
.endWith { _, player -> .endWith { _, player ->
if(getQuestStage(player, HeroesQuest.questName) == 1) { if(getQuestStage(player, Quests.HEROES_QUEST) == 1) {
setQuestStage(player, HeroesQuest.questName, 2) setQuestStage(player, Quests.HEROES_QUEST, 2)
} }
} }
} }
// This is not authentic, she falls back to a boring default conversation, but I guess people might need help during the quest // This is not authentic, she falls back to a boring default conversation, but I guess people might need help during the quest
b.onQuestStages(HeroesQuest.questName, 2,3,4) b.onQuestStages(Quests.HEROES_QUEST, 2, 3, 4)
.playerl("What am I supposed to be doing again?") .playerl("What am I supposed to be doing again?")
.npcl("You told me you wanted to get the rank of master thief! Now pay attention.") .npcl("You told me you wanted to get the rank of master thief! Now pay attention.")
.npcl("Some of the MOST coveted prizes in thiefdom right now are in the pirate town of Brimhaven on Karamja.") .npcl("Some of the MOST coveted prizes in thiefdom right now are in the pirate town of Brimhaven on Karamja.")
@@ -72,7 +73,7 @@ class KatrineDialogueFile : DialogueBuilderFile() {
*/ */
b.onQuestStages(HeroesQuest.questName, 5) b.onQuestStages(Quests.HEROES_QUEST, 5)
.branch { player -> .branch { player ->
return@branch if (inInventory(player, Items.PETES_CANDLESTICK_1577)) { 1 } else { 0 } return@branch if (inInventory(player, Items.PETES_CANDLESTICK_1577)) { 1 } else { 0 }
}.let { branch -> }.let { branch ->
@@ -94,8 +95,8 @@ class KatrineDialogueFile : DialogueBuilderFile() {
.endWith { _, player -> .endWith { _, player ->
if (removeItem(player, Items.PETES_CANDLESTICK_1577)) { if (removeItem(player, Items.PETES_CANDLESTICK_1577)) {
addItemOrDrop(player, Items.THIEVES_ARMBAND_1579) addItemOrDrop(player, Items.THIEVES_ARMBAND_1579)
if (getQuestStage(player, HeroesQuest.questName) == 5) { if (getQuestStage(player, Quests.HEROES_QUEST) == 5) {
setQuestStage(player, HeroesQuest.questName, 6) setQuestStage(player, Quests.HEROES_QUEST, 6)
} }
} }
} }
@@ -114,7 +115,7 @@ class KatrineDialogueFile : DialogueBuilderFile() {
} }
// I lost the armband and some stupid default shit. // I lost the armband and some stupid default shit.
b.onQuestStages(HeroesQuest.questName, 6) b.onQuestStages(Quests.HEROES_QUEST, 6)
.playerl("I have lost my master thief's armband...") .playerl("I have lost my master thief's armband...")
.npcl("Lucky I 'ave a spare ain't it? Don't lose it again.") .npcl("Lucky I 'ave a spare ain't it? Don't lose it again.")
.endWith { _, player -> .endWith { _, player ->
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.heroesquest package content.region.asgarnia.burthorpe.quest.heroesquest
import content.data.Quests
import core.api.* import core.api.*
import core.game.dialogue.* import core.game.dialogue.*
import org.rs09.consts.Items import org.rs09.consts.Items
@@ -7,7 +8,7 @@ import org.rs09.consts.Items
class StravenDialogueFile : DialogueBuilderFile() { class StravenDialogueFile : DialogueBuilderFile() {
override fun create(b: DialogueBuilder) { override fun create(b: DialogueBuilder) {
// 0 is handled by default in the old StravenDialogue. // 0 is handled by default in the old StravenDialogue.
b.onQuestStages(HeroesQuest.questName, 1) b.onQuestStages(Quests.HEROES_QUEST, 1)
.playerl("How would I go about getting a Master Thief armband?") .playerl("How would I go about getting a Master Thief armband?")
.npcl("Ooh... tricky stuff. Took me YEARS to get that rank.") .npcl("Ooh... tricky stuff. Took me YEARS to get that rank.")
.npcl("Well, what some of the more aspiring thieves in our gang are working on right now is to steal some very valuable candlesticks from Scarface Pete - the pirate leader on Karamja.") .npcl("Well, what some of the more aspiring thieves in our gang are working on right now is to steal some very valuable candlesticks from Scarface Pete - the pirate leader on Karamja.")
@@ -15,12 +16,12 @@ class StravenDialogueFile : DialogueBuilderFile() {
.npcl("Go talk to our man Alfonse, the waiter in the Shrimp and Parrot.") .npcl("Go talk to our man Alfonse, the waiter in the Shrimp and Parrot.")
.npcl("Use the secret word 'gherkin' to show you're one of us.") .npcl("Use the secret word 'gherkin' to show you're one of us.")
.endWith { _, player -> .endWith { _, player ->
if(getQuestStage(player, HeroesQuest.questName) == 1) { if(getQuestStage(player, Quests.HEROES_QUEST) == 1) {
setQuestStage(player, HeroesQuest.questName, 2) setQuestStage(player, Quests.HEROES_QUEST, 2)
} }
} }
b.onQuestStages(HeroesQuest.questName, 2,3,4) b.onQuestStages(Quests.HEROES_QUEST, 2, 3, 4)
.playerl("What am I supposed to be doing again?") .playerl("What am I supposed to be doing again?")
.npcl("You told me you wanted to get a Master thief's armband! Now pay attention.") .npcl("You told me you wanted to get a Master thief's armband! Now pay attention.")
.npcl("Some of the more aspiring thieves in our gang are working on right now is to steal some very valuable candlesticks from Scarface Pete - the pirate leader on Karamja.") .npcl("Some of the more aspiring thieves in our gang are working on right now is to steal some very valuable candlesticks from Scarface Pete - the pirate leader on Karamja.")
@@ -30,7 +31,7 @@ class StravenDialogueFile : DialogueBuilderFile() {
.end() .end()
b.onQuestStages(HeroesQuest.questName, 5) b.onQuestStages(Quests.HEROES_QUEST, 5)
.branch { player -> .branch { player ->
return@branch if (inInventory(player, Items.PETES_CANDLESTICK_1577)) { 1 } else { 0 } return@branch if (inInventory(player, Items.PETES_CANDLESTICK_1577)) { 1 } else { 0 }
}.let { branch -> }.let { branch ->
@@ -44,8 +45,8 @@ class StravenDialogueFile : DialogueBuilderFile() {
.endWith { _, player -> .endWith { _, player ->
if (removeItem(player, Items.PETES_CANDLESTICK_1577)) { if (removeItem(player, Items.PETES_CANDLESTICK_1577)) {
addItemOrDrop(player, Items.THIEVES_ARMBAND_1579) addItemOrDrop(player, Items.THIEVES_ARMBAND_1579)
if (getQuestStage(player, HeroesQuest.questName) == 5) { if (getQuestStage(player, Quests.HEROES_QUEST) == 5) {
setQuestStage(player, HeroesQuest.questName, 6) setQuestStage(player, Quests.HEROES_QUEST, 6)
} }
} }
} }
@@ -61,7 +62,7 @@ class StravenDialogueFile : DialogueBuilderFile() {
} }
// I lost the armband and some stupid default shit. // I lost the armband and some stupid default shit.
b.onQuestStages(HeroesQuest.questName, 6) b.onQuestStages(Quests.HEROES_QUEST, 6)
.playerl("I'm afraid I've lost my master thief's armband.") .playerl("I'm afraid I've lost my master thief's armband.")
.npcl("Lucky for you I have a spare. Don't lose it again!") .npcl("Lucky for you I have a spare. Don't lose it again!")
.endWith { _, player -> .endWith { _, player ->
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.heroesquest package content.region.asgarnia.burthorpe.quest.heroesquest
import content.data.Quests
import core.api.* import core.api.*
import core.game.dialogue.* import core.game.dialogue.*
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
@@ -27,13 +28,13 @@ class TrobertDialogue(player: Player? = null) : DialoguePlugin(player){
class TrobertDialogueFile : DialogueBuilderFile() { class TrobertDialogueFile : DialogueBuilderFile() {
override fun create(b: DialogueBuilder) { override fun create(b: DialogueBuilder) {
// Technically this won't happen since you have to get past Grubor. // Technically this won't happen since you have to get past Grubor.
b.onQuestStages(HeroesQuest.questName, 0,1) b.onQuestStages(Quests.HEROES_QUEST, 0, 1)
.npcl("Welcome to our Brimhaven headquarters. I'm Trobert and I'm in charge here.") .npcl("Welcome to our Brimhaven headquarters. I'm Trobert and I'm in charge here.")
.playerl("Pleased to meet you.") .playerl("Pleased to meet you.")
.npcl("Likewise.") .npcl("Likewise.")
.end() .end()
b.onQuestStages(HeroesQuest.questName, 2) b.onQuestStages(Quests.HEROES_QUEST, 2)
.npcl("Welcome to our Brimhaven headquarters. I'm Trobert and I'm in charge here.") .npcl("Welcome to our Brimhaven headquarters. I'm Trobert and I'm in charge here.")
.options() .options()
.let { optionBuilder -> .let { optionBuilder ->
@@ -56,8 +57,8 @@ class TrobertDialogueFile : DialogueBuilderFile() {
.npcl("Good good. Well, here's the ID papers, take them and introduce yourself to the guards at Scarface Pete's mansion, we'll have that treasure in no time.") .npcl("Good good. Well, here's the ID papers, take them and introduce yourself to the guards at Scarface Pete's mansion, we'll have that treasure in no time.")
.endWith { _, player -> .endWith { _, player ->
addItemOrDrop(player, Items.ID_PAPERS_1584) addItemOrDrop(player, Items.ID_PAPERS_1584)
if(getQuestStage(player, HeroesQuest.questName) == 2) { if(getQuestStage(player, Quests.HEROES_QUEST) == 2) {
setQuestStage(player, HeroesQuest.questName, 3) setQuestStage(player, Quests.HEROES_QUEST, 3)
} }
} }
@@ -66,7 +67,7 @@ class TrobertDialogueFile : DialogueBuilderFile() {
.end() .end()
} }
b.onQuestStages(HeroesQuest.questName, 3,4,5) b.onQuestStages(Quests.HEROES_QUEST, 3, 4, 5)
.branch { player -> .branch { player ->
return@branch if (inInventory(player, Items.ID_PAPERS_1584)) { 1 } else { 0 } return@branch if (inInventory(player, Items.ID_PAPERS_1584)) { 1 } else { 0 }
}.let { branch -> }.let { branch ->
@@ -82,7 +83,7 @@ class TrobertDialogueFile : DialogueBuilderFile() {
} }
} }
b.onQuestStages(HeroesQuest.questName, 6,100) b.onQuestStages(Quests.HEROES_QUEST, 6, 100)
.npcl("How's it going?") .npcl("How's it going?")
.playerl("Fine, thanks.") .playerl("Fine, thanks.")
.end() .end()
@@ -1,8 +1,8 @@
package content.region.asgarnia.burthorpe.quest.trollstronghold package content.region.asgarnia.burthorpe.quest.trollstronghold
import content.data.Quests
import core.api.isQuestInProgress import core.api.isQuestInProgress
import core.api.produceGroundItem import core.api.produceGroundItem
import core.api.transformNpc
import core.game.node.entity.Entity import core.game.node.entity.Entity
import core.game.node.entity.combat.CombatStyle import core.game.node.entity.combat.CombatStyle
import core.game.node.entity.npc.AbstractNPC import core.game.node.entity.npc.AbstractNPC
@@ -44,7 +44,7 @@ class BerryNpc(id: Int = 0, location: Location? = null) : AbstractNPC(id, locati
} }
override fun finalizeDeath(killer: Entity?) { override fun finalizeDeath(killer: Entity?) {
if (isQuestInProgress(killer as Player, TrollStronghold.questName, 8, 10)) { if (isQuestInProgress(killer as Player, Quests.TROLL_STRONGHOLD, 8, 10)) {
produceGroundItem(killer, Items.CELL_KEY_2_3137, 1, this.location) produceGroundItem(killer, Items.CELL_KEY_2_3137, 1, this.location)
} }
super.finalizeDeath(killer) super.finalizeDeath(killer)
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.trollstronghold package content.region.asgarnia.burthorpe.quest.trollstronghold
import content.data.Quests
import core.api.* import core.api.*
import core.game.dialogue.DialoguePlugin import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
@@ -13,7 +14,7 @@ import org.rs09.consts.NPCs
@Initializable @Initializable
class DadDialogue(player: Player? = null) : DialoguePlugin(player) { class DadDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when (getQuestStage(player!!, TrollStronghold.questName)) { when (getQuestStage(player!!, Quests.TROLL_STRONGHOLD)) {
in 3..4 -> { in 3..4 -> {
when (stage) { when (stage) {
START_DIALOGUE -> npcl(FacialExpression.OLD_HAPPY, "What tiny human do in troll arena? Dad challenge human to fight!").also { stage++ } START_DIALOGUE -> npcl(FacialExpression.OLD_HAPPY, "What tiny human do in troll arena? Dad challenge human to fight!").also { stage++ }
@@ -27,7 +28,7 @@ class DadDialogue(player: Player? = null) : DialoguePlugin(player) {
3 -> npcl(FacialExpression.OLD_HAPPY, "Tiny human brave. Dad squish!").also { stage++ } 3 -> npcl(FacialExpression.OLD_HAPPY, "Tiny human brave. Dad squish!").also { stage++ }
4 -> npc!!.attack(player).also { 4 -> npc!!.attack(player).also {
npc!!.skills.lifepoints = npc!!.skills.maximumLifepoints // Reset dad to max hitpoints. npc!!.skills.lifepoints = npc!!.skills.maximumLifepoints // Reset dad to max hitpoints.
setQuestStage(player!!, TrollStronghold.questName, 4) setQuestStage(player!!, Quests.TROLL_STRONGHOLD, 4)
stage = END_DIALOGUE stage = END_DIALOGUE
} }
} }
@@ -1,5 +1,6 @@
package content.region.asgarnia.burthorpe.quest.trollstronghold package content.region.asgarnia.burthorpe.quest.trollstronghold
import content.data.Quests
import core.api.setQuestStage import core.api.setQuestStage
import core.game.dialogue.DialogueFile import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
@@ -13,14 +14,14 @@ class DadDialogueFile(private val dialogueNum: Int = 0) : DialogueFile() {
1 -> when (stage) { 1 -> when (stage) {
START_DIALOGUE -> npcl(FacialExpression.OLD_HAPPY, "No human pass through arena without defeating Dad!").also { START_DIALOGUE -> npcl(FacialExpression.OLD_HAPPY, "No human pass through arena without defeating Dad!").also {
stage = END_DIALOGUE stage = END_DIALOGUE
setQuestStage(player!!, TrollStronghold.questName, 3) setQuestStage(player!!, Quests.TROLL_STRONGHOLD, 3)
} }
} }
2 -> when (stage) { 2 -> when (stage) {
START_DIALOGUE -> npcl(FacialExpression.OLD_NORMAL, "Tiny human brave. Dad squish!").also { stage++ } START_DIALOGUE -> npcl(FacialExpression.OLD_NORMAL, "Tiny human brave. Dad squish!").also { stage++ }
1 -> npc!!.attack(player).also { 1 -> npc!!.attack(player).also {
npc!!.skills.lifepoints = npc!!.skills.maximumLifepoints // Reset dad to max hitpoints. npc!!.skills.lifepoints = npc!!.skills.maximumLifepoints // Reset dad to max hitpoints.
setQuestStage(player!!, TrollStronghold.questName, 4) setQuestStage(player!!, Quests.TROLL_STRONGHOLD, 4)
stage = END_DIALOGUE stage = END_DIALOGUE
} }
} }
@@ -31,7 +32,7 @@ class DadDialogueFile(private val dialogueNum: Int = 0) : DialogueFile() {
Topic(FacialExpression.ANGRY_WITH_SMILE, "I'm not done yet! Prepare to die!", 2) Topic(FacialExpression.ANGRY_WITH_SMILE, "I'm not done yet! Prepare to die!", 2)
) )
2 -> player!!.attack(npc).also { 2 -> player!!.attack(npc).also {
setQuestStage(player!!, TrollStronghold.questName, 5) setQuestStage(player!!, Quests.TROLL_STRONGHOLD, 5)
stage = END_DIALOGUE stage = END_DIALOGUE
} }
} }

Some files were not shown because too many files have changed in this diff Show More