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:
@@ -1,6 +1,7 @@
|
||||
package core.api
|
||||
|
||||
import com.moandjiezana.toml.Toml
|
||||
import content.data.Quests
|
||||
import content.data.consumables.*
|
||||
import content.data.skill.SkillingTool
|
||||
import content.global.handlers.iface.ge.StockMarket
|
||||
@@ -1909,14 +1910,14 @@ fun getQuestPoints(player: Player): Int {
|
||||
/**
|
||||
* Gets the stage for the given quest for the given player
|
||||
*/
|
||||
fun getQuestStage(player: Player, quest: String): Int {
|
||||
fun getQuestStage(player: Player, quest: Quests): Int {
|
||||
return player.questRepository.getStage(quest)
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the stage for the given quest for the given player
|
||||
*/
|
||||
fun setQuestStage(player: Player, quest: String, stage: Int) {
|
||||
fun setQuestStage(player: Player, quest: Quests, stage: Int) {
|
||||
player.questRepository.setStage(QuestRepository.getQuests()[quest]!!, stage)
|
||||
player.questRepository.syncronizeTab(player)
|
||||
}
|
||||
@@ -1924,14 +1925,14 @@ fun setQuestStage(player: Player, quest: String, stage: Int) {
|
||||
/**
|
||||
* Check if a quest is in progress
|
||||
*/
|
||||
fun isQuestInProgress(player: Player, quest: String, startStage: Int, endStage: Int): Boolean {
|
||||
fun isQuestInProgress(player: Player, quest: Quests, startStage: Int, endStage: Int): Boolean {
|
||||
return player.questRepository.getStage(quest) in startStage..endStage
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a quest is complete
|
||||
*/
|
||||
fun isQuestComplete(player: Player, quest: String): Boolean {
|
||||
fun isQuestComplete(player: Player, quest: Quests): Boolean {
|
||||
return player.questRepository.getStage(quest) == 100
|
||||
}
|
||||
|
||||
@@ -1941,7 +1942,7 @@ fun isQuestComplete(player: Player, quest: String): Boolean {
|
||||
* @param quest The quest name string
|
||||
* @return the quest object
|
||||
*/
|
||||
fun getQuest(player: Player, quest: String): Quest {
|
||||
fun getQuest(player: Player, quest: Quests): Quest {
|
||||
return player.questRepository.getQuest(quest)
|
||||
}
|
||||
|
||||
@@ -1949,7 +1950,7 @@ fun getQuest(player: Player, quest: String): Quest {
|
||||
/**
|
||||
* Check if a player meets the requirements to start a quest, and then starts it if they do. Returns success bool
|
||||
*/
|
||||
fun startQuest(player: Player, quest: String): Boolean {
|
||||
fun startQuest(player: Player, quest: Quests): Boolean {
|
||||
val quest = player.questRepository.getQuest(quest)
|
||||
val canStart = quest.hasRequirements(player)
|
||||
if (!canStart) return false
|
||||
@@ -1960,7 +1961,7 @@ fun startQuest(player: Player, quest: String): Boolean {
|
||||
/**
|
||||
* Finishes a quest, gives rewards, marks as completed, etc
|
||||
*/
|
||||
fun finishQuest(player: Player, quest: String) {
|
||||
fun finishQuest(player: Player, quest: Quests) {
|
||||
player.questRepository.getQuest(quest).finish(player)
|
||||
}
|
||||
|
||||
@@ -2078,7 +2079,7 @@ fun announceIfRare(player: Player, item: Item) {
|
||||
}
|
||||
}
|
||||
|
||||
fun hasRequirement (player: Player, req: QuestReq, message: Boolean = true) : Boolean {
|
||||
fun hasRequirement(player: Player, req: QuestReq, message: Boolean = true) : Boolean {
|
||||
var (isMet, unmetReqs) = req.evaluate(player)
|
||||
val messageList = ArrayList<String>()
|
||||
|
||||
@@ -2099,9 +2100,9 @@ fun hasRequirement (player: Player, req: QuestReq, message: Boolean = true) : Bo
|
||||
if (isMet) return true
|
||||
|
||||
if (unmetReqs.size == 2 && unmetReqs[0] is QuestReq) {
|
||||
messageList.add ("This requires completion of ${(unmetReqs[0] as QuestReq).questReq.questName} to access.")
|
||||
messageList.add ("This requires completion of ${(unmetReqs[0] as QuestReq).questReq.quest} to access.")
|
||||
} else {
|
||||
messageList.add ("You need the pre-reqs for ${req.questReq.questName} to access this.")
|
||||
messageList.add ("You need the pre-reqs for ${req.questReq.quest} to access this.")
|
||||
messageList.add ("Please check the page in your quest journal for more info.")
|
||||
}
|
||||
|
||||
@@ -2113,8 +2114,8 @@ fun hasRequirement (player: Player, req: QuestReq, message: Boolean = true) : Bo
|
||||
}
|
||||
|
||||
@JvmOverloads
|
||||
fun hasRequirement (player: Player, quest: String, message: Boolean = true) : Boolean {
|
||||
val questReq = QuestRequirements.values().filter { it.questName.equals(quest, true) }.firstOrNull() ?: return false
|
||||
fun hasRequirement(player: Player, quest: Quests, message: Boolean = true) : Boolean {
|
||||
val questReq = QuestRequirements.values().firstOrNull { it.quest == quest } ?: return false
|
||||
return hasRequirement(player, QuestReq(questReq), message)
|
||||
}
|
||||
|
||||
@@ -2809,15 +2810,15 @@ fun getCredits(player: Player) : Int {
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that a quest is required, and sends the player "You must have completed the $questName quest $message"
|
||||
* Asserts that a quest is required, and sends the player "You must have completed the $quest quest $message"
|
||||
* @param player the player we are checking
|
||||
* @param questName the name of the quest we are checking for
|
||||
* @param message the text appended to "You must have completed the $questName quest ..." if the quest is not complete.
|
||||
* @param quest the quest we are checking for
|
||||
* @param message the text appended to "You must have completed the $quest quest ..." if the quest is not complete.
|
||||
* @return whether or not the quest has been completed
|
||||
*/
|
||||
fun requireQuest(player: Player, questName: String, message: String) : Boolean {
|
||||
if (!isQuestComplete(player, questName)) {
|
||||
sendMessage(player, "You must have completed the $questName quest $message")
|
||||
fun requireQuest(player: Player, quest: Quests, message: String) : Boolean {
|
||||
if (!isQuestComplete(player, quest)) {
|
||||
sendMessage(player, "You must have completed the $quest quest $message")
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package core.game.bots;
|
||||
|
||||
import content.data.Quests;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
|
||||
@@ -13,7 +14,7 @@ public abstract class Script {
|
||||
public ArrayList<Item> inventory = new ArrayList<>(20);
|
||||
public ArrayList<Item> equipment = new ArrayList<>(20);
|
||||
public Map<Integer, Integer> skills = new HashMap<>();
|
||||
public ArrayList<String> quests = new ArrayList<>(20);
|
||||
public ArrayList<Quests> quests = new ArrayList<>(20);
|
||||
|
||||
|
||||
public Player bot;
|
||||
@@ -31,7 +32,7 @@ public abstract class Script {
|
||||
for (Map.Entry<Integer, Integer> skill : skills.entrySet()) {
|
||||
setLevel(skill.getKey(), skill.getValue());
|
||||
}
|
||||
for (String quest : quests) {
|
||||
for (Quests quest : quests) {
|
||||
bot.getQuestRepository().setStage(bot.getQuestRepository().getQuest(quest), 100);
|
||||
}
|
||||
for (Item i : equipment) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package core.game.dialogue
|
||||
|
||||
import content.data.Quests
|
||||
import core.api.splitLines
|
||||
import core.game.node.entity.player.Player
|
||||
import core.tools.END_DIALOGUE
|
||||
@@ -311,7 +312,7 @@ class DialogueBuilder(var target: DialogueBuilderFile, var clauseIndex: Int = -1
|
||||
fun defaultDialogue(): DialogueBuilder {
|
||||
return onPredicate({ _ -> return@onPredicate true})
|
||||
}
|
||||
fun onQuestStages(name: String, vararg stages: Int): DialogueBuilder {
|
||||
fun onQuestStages(name: Quests, vararg stages: Int): DialogueBuilder {
|
||||
return onPredicate() { player ->
|
||||
val questStage = player.questRepository.getStage(name)
|
||||
return@onPredicate stages.contains(questStage)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package core.game.global.action;
|
||||
|
||||
import content.data.Quests;
|
||||
import core.game.node.entity.Entity;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.diary.DiaryType;
|
||||
@@ -84,10 +85,6 @@ public final class DoorActionHandler {
|
||||
return;
|
||||
}
|
||||
DoorConfigLoader.Door d = DoorConfigLoader.Companion.forId(object.getId());
|
||||
if (d != null && !d.getQuestRequirement().equals("")) {
|
||||
if (!hasRequirement(player, d.getQuestRequirement()))
|
||||
return;
|
||||
}
|
||||
if (d == null || d.isAutoWalk()) {
|
||||
handleAutowalkDoor(player, object);
|
||||
return;
|
||||
|
||||
@@ -43,7 +43,7 @@ class GravePurchaseInterface : InterfaceListener {
|
||||
val cost = selectedType.cost
|
||||
val requirement = selectedType.requiredQuest
|
||||
|
||||
if (requirement.isNotEmpty() && !isQuestComplete(player, requirement)) {
|
||||
if (requirement != null && !isQuestComplete(player, requirement)) {
|
||||
sendDialogue(player, "That gravestone requires completion of $requirement.")
|
||||
return@on true
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package core.game.node.entity.combat.graves
|
||||
|
||||
import org.rs09.consts.NPCs
|
||||
import content.data.Quests
|
||||
|
||||
enum class GraveType(val npcId: Int, val cost: Int, val durationMinutes: Int, val isMembers: Boolean, val requiredQuest: String = "", val text: String) {
|
||||
enum class GraveType(val npcId: Int, val cost: Int, val durationMinutes: Int, val isMembers: Boolean, val requiredQuest: Quests? = null, val text: String) {
|
||||
MEM_PLAQUE(NPCs.GRAVE_MARKER_6565, 0, 2, false, text = "In memory of @name,<br>who died here."),
|
||||
FLAG(NPCs.GRAVE_MARKER_6568, 50, 2, false, text = MEM_PLAQUE.text),
|
||||
SMALL_GS(NPCs.GRAVESTONE_6571, 500, 2, false, text = "In loving memory of our dear friend @name,<br>who died in this place @mins ago."),
|
||||
@@ -12,9 +13,9 @@ enum class GraveType(val npcId: Int, val cost: Int, val durationMinutes: Int, va
|
||||
SARA_SYMBOL(NPCs.SARADOMIN_SYMBOL_6583, 50000, 4, true, text = "@name,<br>an enlightened servant of Saradomin,<br>perished in this place."),
|
||||
ZAM_SYMBOL(NPCs.ZAMORAK_SYMBOL_6586, 50000, 4, true, text = "@name,<br>a most bloodthirsty follower of Zamorak,<br>perished in this place."),
|
||||
GUTH_SYMBOL(NPCs.GUTHIX_SYMBOL_6589, 50000, 4, true, text = "@name,<br>who walked with the Balance of Guthix,<br>perished in this place."),
|
||||
BAND_SYMBOL(NPCs.BANDOS_SYMBOL_6592, 50000, 4, true, requiredQuest = "Land of the Goblins", text = "@name,<br>a vicious warrior dedicated to Bandos,<br>perished in this place. "),
|
||||
ARMA_SYMBOL(NPCs.ARMADYL_SYMBOL_6595, 50000, 4, true, requiredQuest = "Temple of Ikov", text = "@name,<br>a follower of the Law of Armadyl,<br>perished in this place."),
|
||||
ZARO_SYMBOL(NPCs.MEMORIAL_STONE_6598, 50000, 4, true, requiredQuest = "Desert Treasure", text = "@name,<br>servant of the Unknown Power,<br>perished in this place."),
|
||||
BAND_SYMBOL(NPCs.BANDOS_SYMBOL_6592, 50000, 4, true, requiredQuest = Quests.LAND_OF_THE_GOBLINS, text = "@name,<br>a vicious warrior dedicated to Bandos,<br>perished in this place. "),
|
||||
ARMA_SYMBOL(NPCs.ARMADYL_SYMBOL_6595, 50000, 4, true, requiredQuest = Quests.TEMPLE_OF_IKOV, text = "@name,<br>a follower of the Law of Armadyl,<br>perished in this place."),
|
||||
ZARO_SYMBOL(NPCs.MEMORIAL_STONE_6598, 50000, 4, true, requiredQuest = Quests.DESERT_TREASURE, text = "@name,<br>servant of the Unknown Power,<br>perished in this place."),
|
||||
ANGEL_DEATH(NPCs.MEMORIAL_STONE_6601, 500000, 5, true, text = "Ye frail mortals who gaze upon this sight,<br>forget not the fate of @name, once mighty, now<br>surrendered to the inescapable grasp of destiny.<br><i>Requiescat in pace.</i>");
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -14,12 +14,10 @@ import core.ServerConstants;
|
||||
import core.game.interaction.InteractionListeners;
|
||||
import content.global.handlers.iface.RulesAndInfo;
|
||||
import core.tools.Log;
|
||||
import core.tools.SystemLogger;
|
||||
import core.game.world.GameWorld;
|
||||
import core.game.world.repository.Repository;
|
||||
import core.game.world.update.UpdateSequence;
|
||||
import core.game.node.entity.player.link.SpellBookManager;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
@@ -30,6 +28,7 @@ import java.util.stream.IntStream;
|
||||
|
||||
import static core.api.ContentAPIKt.*;
|
||||
import static core.tools.GlobalsKt.colorize;
|
||||
import content.data.Quests;
|
||||
|
||||
|
||||
/**
|
||||
@@ -158,10 +157,10 @@ public final class LoginConfiguration {
|
||||
}
|
||||
|
||||
SpellBookManager.SpellBook currentSpellBook = SpellBookManager.SpellBook.forInterface(player.getSpellBookManager().getSpellBook());
|
||||
if (currentSpellBook == SpellBookManager.SpellBook.ANCIENT && !hasRequirement(player, "Desert Treasure")) {
|
||||
if (currentSpellBook == SpellBookManager.SpellBook.ANCIENT && !hasRequirement(player, Quests.DESERT_TREASURE)) {
|
||||
player.sendMessage(colorize("%RAs you can no longer use Ancient Magic, you have been set back to Modern."));
|
||||
player.getSpellBookManager().setSpellBook(SpellBookManager.SpellBook.MODERN);
|
||||
} else if (currentSpellBook == SpellBookManager.SpellBook.LUNAR && !hasRequirement(player, "Lunar Diplomacy")) {
|
||||
} else if (currentSpellBook == SpellBookManager.SpellBook.LUNAR && !hasRequirement(player, Quests.LUNAR_DIPLOMACY)) {
|
||||
player.sendMessage(colorize("%RAs you can no longer use Lunar Magic, you have been set back to Modern."));
|
||||
player.getSpellBookManager().setSpellBook(SpellBookManager.SpellBook.MODERN);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import core.api.*
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.item.Item
|
||||
import org.rs09.consts.Items
|
||||
import content.data.Quests
|
||||
|
||||
/**
|
||||
* Runs one-time save-version-related hooks.
|
||||
@@ -38,7 +39,7 @@ class SaveVersionHooks : LoginListener {
|
||||
}
|
||||
|
||||
// Unlock Surok's Theme if eligible
|
||||
if (getQuestStage(player, "What Lies Below") > 70) {
|
||||
if (getQuestStage(player, Quests.WHAT_LIES_BELOW) > 70) {
|
||||
player.musicPlayer.unlock(250, false)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package core.game.node.entity.player.link.emote;
|
||||
|
||||
import content.data.Quests;
|
||||
import core.game.container.impl.EquipmentContainer;
|
||||
import core.game.node.entity.player.info.Rights;
|
||||
import core.game.world.map.Direction;
|
||||
@@ -106,7 +107,7 @@ public enum Emotes {
|
||||
public void play(Player player) {
|
||||
if(player.getLocation().getRegionId() == 13206 && !player.getAttribute("mistag-greeted", false)) {
|
||||
RegionManager.getLocalNpcs(player).forEach(npc -> {
|
||||
if (npc.getId() == 2084 && npc.getLocation().withinDistance(player.getLocation(), 3) && player.getQuestRepository().getQuest("Lost Tribe").getStage(player) == 45) {
|
||||
if (npc.getId() == 2084 && npc.getLocation().withinDistance(player.getLocation(), 3) && player.getQuestRepository().getQuest(Quests.THE_LOST_TRIBE).getStage(player) == 45) {
|
||||
player.getDialogueInterpreter().open(2084,npc,"greeting");
|
||||
player.setAttribute("/save:mistag-greeted",true);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package core.game.node.entity.player.link.quest;
|
||||
|
||||
import content.data.Quests;
|
||||
import core.game.component.Component;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.plugin.Plugin;
|
||||
@@ -50,9 +51,9 @@ public abstract class Quest implements Plugin<Object> {
|
||||
public static final int REWARD_COMPONENT = 277;
|
||||
|
||||
/**
|
||||
* The name of the quest.
|
||||
* The quest as a Quests item (currently only used for the quest's name).
|
||||
*/
|
||||
private final String name;
|
||||
private final Quests quest;
|
||||
|
||||
/**
|
||||
* The index id of the quest.
|
||||
@@ -76,7 +77,7 @@ public abstract class Quest implements Plugin<Object> {
|
||||
|
||||
/**
|
||||
* Constructs a new {@link Quest}
|
||||
* @param name of the quest. Prereqs reference this
|
||||
* @param quest of the quest. Prereqs reference this
|
||||
* @param index of the quest, usually buttonId + 1
|
||||
* @param buttonId of the quest on the quest list in game
|
||||
* @param questPoints rewarded after completing quest
|
||||
@@ -97,8 +98,8 @@ public abstract class Quest implements Plugin<Object> {
|
||||
* if (VARPBIT[451] > 1) return 2; if (VARPBIT[451] == 0) return 0; return 1; }; if (arg0 == 88)<br>
|
||||
* Use 5 numbers: {0, 451, 0, 1, 2} -> {Ignore, VARPBIT, return 0, return 1, return 2}<br>
|
||||
*/
|
||||
public Quest(String name, int index, int buttonId, int questPoints, int...configs) {
|
||||
this.name = name;
|
||||
public Quest(Quests quest, int index, int buttonId, int questPoints, int...configs) {
|
||||
this.quest = quest;
|
||||
this.index = index;
|
||||
this.buttonId = buttonId;
|
||||
this.questPoints = questPoints;
|
||||
@@ -131,7 +132,7 @@ public abstract class Quest implements Plugin<Object> {
|
||||
for (int i = 0; i < 311; i++) {
|
||||
player.getPacketDispatch().sendString("" , JOURNAL_COMPONENT, i);
|
||||
}
|
||||
player.getPacketDispatch().sendString("<col=8A0808>" + getName() + "</col>", JOURNAL_COMPONENT, 2);
|
||||
player.getPacketDispatch().sendString("<col=8A0808>" + getQuest() + "</col>", JOURNAL_COMPONENT, 2);
|
||||
|
||||
}
|
||||
|
||||
@@ -140,8 +141,8 @@ public abstract class Quest implements Plugin<Object> {
|
||||
* @param player The player.
|
||||
*/
|
||||
public void finish(Player player) {
|
||||
if(player.getQuestRepository().isComplete(name)) {
|
||||
throw new IllegalStateException("Tried to complete quest " + name + " twice, which is not allowed!");
|
||||
if(player.getQuestRepository().isComplete(quest)) {
|
||||
throw new IllegalStateException("Tried to complete quest " + quest + " twice, which is not allowed!");
|
||||
}
|
||||
for (int i = 0; i < 18; i++) {
|
||||
if (i == 9 || i == 3 || i == 6) {
|
||||
@@ -157,7 +158,7 @@ public abstract class Quest implements Plugin<Object> {
|
||||
return true;
|
||||
}));
|
||||
player.getPacketDispatch().sendString("" + player.getQuestRepository().getPoints() + "", 277, 7);
|
||||
player.getPacketDispatch().sendString("You have completed the " + getName() + " Quest!", 277, 4);
|
||||
player.getPacketDispatch().sendString("You have completed the " + getQuest() + " Quest!", 277, 4);
|
||||
player.getPacketDispatch().sendMessage("Congratulations! Quest complete!");
|
||||
int questJingles[] = {152, 153, 154};
|
||||
playJingle(player, questJingles[new Random().nextInt(3)]);
|
||||
@@ -255,7 +256,7 @@ public abstract class Quest implements Plugin<Object> {
|
||||
*/
|
||||
public int[] getConfig(Player player, int stage) {
|
||||
if (configs.length < 4) {
|
||||
throw new IndexOutOfBoundsException("Quest -> " + name + " configs array length was not valid. config length = " + configs.length + "!");
|
||||
throw new IndexOutOfBoundsException("Quest -> " + quest + " configs array length was not valid. config length = " + configs.length + "!");
|
||||
}
|
||||
if (configs.length >= 5) {
|
||||
// {questVarpId, questVarbitId, valueToSet}
|
||||
@@ -308,8 +309,8 @@ public abstract class Quest implements Plugin<Object> {
|
||||
* Gets the name.
|
||||
* @return the name.
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
public Quests getQuest() {
|
||||
return quest;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -346,7 +347,7 @@ public abstract class Quest implements Plugin<Object> {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Quest [name=" + name + ", index=" + index + ", buttonId=" + buttonId + ", questPoints=" + questPoints + ", configs=" + Arrays.toString(configs) + "]";
|
||||
return "Quest [name=" + quest + ", index=" + index + ", buttonId=" + buttonId + ", questPoints=" + questPoints + ", configs=" + Arrays.toString(configs) + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package core.game.node.entity.player.link.quest;
|
||||
|
||||
import content.data.Quests;
|
||||
import core.game.node.entity.player.Player;
|
||||
|
||||
import core.tools.Log;
|
||||
import core.tools.SystemLogger;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
@@ -25,7 +25,7 @@ public final class QuestRepository {
|
||||
/**
|
||||
* The static mapping of instanced quests.
|
||||
*/
|
||||
private static final Map<String, Quest> QUESTS = new TreeMap<>();
|
||||
private static final Map<Quests, Quest> QUESTS = new TreeMap<>();
|
||||
|
||||
/**
|
||||
* The mapping of quest indexes with related stages.
|
||||
@@ -100,7 +100,7 @@ public final class QuestRepository {
|
||||
if(oldStage < stage) {
|
||||
quests.put(quest.getIndex(), stage);
|
||||
} else {
|
||||
log(this.getClass(), Log.WARN, String.format("Nonmonotonic QuestRepository.setStage call for player \"%s\", quest \"%s\", old stage %d, new stage %d", player.getName(), quest.getName(), oldStage, stage));
|
||||
log(this.getClass(), Log.WARN, String.format("Nonmonotonic QuestRepository.setStage call for player \"%s\", quest \"%s\", old stage %d, new stage %d", player.getName(), quest.getQuest(), oldStage, stage));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,51 +198,49 @@ public final class QuestRepository {
|
||||
/**
|
||||
* Checks if the quest is complete.
|
||||
*
|
||||
* @param name The name of the quest.
|
||||
* @param quest The quest.
|
||||
* @return {@code True} if so.
|
||||
*/
|
||||
public boolean isComplete(String name) {
|
||||
Quest quest = getQuest(name);
|
||||
if (quest == null) {
|
||||
log(this.getClass(), Log.ERR, "Error can't check if quest is complete for " + name);
|
||||
public boolean isComplete(Quests quest) {
|
||||
Quest theQuest = getQuest(quest);
|
||||
if (theQuest == null) {
|
||||
log(this.getClass(), Log.ERR, "Error can't check if quest is complete for " + quest);
|
||||
return false;
|
||||
}
|
||||
return quest.getStage(player) >= 100;
|
||||
return theQuest.getStage(player) >= 100;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the quest has at least started.
|
||||
*
|
||||
* @param name The name of the quest.
|
||||
* @param quest The quest by id.
|
||||
* @return {@code True} if so.
|
||||
*/
|
||||
public boolean hasStarted(String name) {
|
||||
Quest quest = getQuest(name);
|
||||
public boolean hasStarted(Quests quest) {
|
||||
Quest theQuest = getQuest(quest);
|
||||
if (quest == null) {
|
||||
log(this.getClass(), Log.ERR, "Error can't check if quest is complete for " + name);
|
||||
log(this.getClass(), Log.ERR, "Error can't check if quest is complete for " + quest);
|
||||
return false;
|
||||
}
|
||||
return quest.getStage(player) > 0;
|
||||
return theQuest.getStage(player) > 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the stage of quest by name.
|
||||
*
|
||||
* @param name The name of the quest.
|
||||
* Gets the stage of quest by id.
|
||||
* @param quest The quest.
|
||||
* @return The stage.
|
||||
*/
|
||||
public int getStage(String name) {
|
||||
var quest = QUESTS.get(name);
|
||||
if (quest == null) {
|
||||
public int getStage(Quests quest) {
|
||||
var theQuest = QUESTS.get(quest);
|
||||
if (theQuest == null) {
|
||||
return 0;
|
||||
}
|
||||
return getStage(quest);
|
||||
return getStage(theQuest);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the stage of a quest.
|
||||
*
|
||||
* @param quest The quest.
|
||||
* @return The stage.
|
||||
*/
|
||||
@@ -251,13 +249,12 @@ public final class QuestRepository {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the quest by name.
|
||||
*
|
||||
* @param name The name.
|
||||
* Gets the quest by id.
|
||||
* @param quest The quest.
|
||||
* @return The quest.
|
||||
*/
|
||||
public Quest getQuest(String name) {
|
||||
return QUESTS.get(name);
|
||||
public Quest getQuest(Quests quest) {
|
||||
return QUESTS.get(quest);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -284,7 +281,7 @@ public final class QuestRepository {
|
||||
* @param quest The quest.
|
||||
*/
|
||||
public static void register(Quest quest) {
|
||||
QUESTS.put(quest.getName(), quest);
|
||||
QUESTS.put(quest.getQuest(), quest);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -292,7 +289,7 @@ public final class QuestRepository {
|
||||
*
|
||||
* @return the quests.
|
||||
*/
|
||||
public static Map<String, Quest> getQuests() {
|
||||
public static Map<Quests, Quest> getQuests() {
|
||||
return QUESTS;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import core.game.node.entity.skill.Skills
|
||||
import kotlin.math.min
|
||||
|
||||
import java.util.ArrayList
|
||||
import content.data.Quests
|
||||
|
||||
interface Requirement {
|
||||
abstract fun evaluate (player: Player) : Pair<Boolean, List<Requirement>>
|
||||
@@ -22,7 +23,7 @@ open class SkillReq (val skillId: Int, val level: Int, val soft: Boolean = false
|
||||
|
||||
open class QuestReq (val questReq: QuestRequirements, val stageRequired: Int = 100) : Requirement {
|
||||
override fun evaluate (player: Player) : Pair<Boolean, List<Requirement>> {
|
||||
val quest = QuestRepository.getQuests()[questReq.questName]
|
||||
val quest = QuestRepository.getQuests()[questReq.quest]
|
||||
val unmetRequirements = ArrayList<Requirement>()
|
||||
var isMet = true
|
||||
if (quest == null) {
|
||||
@@ -57,144 +58,144 @@ open class QPCumulative (val amount: Int) : Requirement {
|
||||
}
|
||||
}
|
||||
|
||||
enum class QuestRequirements (val questName: String, vararg val requirements: Requirement) {
|
||||
COOK_ASSIST ("Cook's Assistant"),
|
||||
DEMON_SLAYER ("Demon Slayer"),
|
||||
DORIC_QUEST ("Doric's Quest"),
|
||||
DRAGON_SLAYER ("Dragon Slayer", QPReq(32)),
|
||||
ERNEST ("Ernest the Chicken"),
|
||||
GOBLIN_DIP ("Goblin Diplomacy"),
|
||||
IMP_CATCHER ("Imp Catcher"),
|
||||
KNIGHT_SWORD ("The Knight's Sword", SkillReq(Skills.MINING, 10, true)),
|
||||
PIRATE_T ("Pirate's Treasure"),
|
||||
ALI_RESCUE ("Prince Ali Rescue"),
|
||||
RESTLESS_GHOST ("The Restless Ghost"),
|
||||
ROMEO ("Romeo & Juliet"),
|
||||
RUNE_MYST ("Rune Mysteries"),
|
||||
SHEEP ("Sheep Shearer"),
|
||||
ARRAV ("Shield of Arrav"),
|
||||
VAMPIRE ("Vampire Slayer"),
|
||||
DORIC ("Doric's Quest"),
|
||||
RUNE_MYSTERIES("Rune Mysteries"),
|
||||
BLACK_KNIGHT("Black Knights' Fortress", QPReq(12)),
|
||||
WITCH_POTION ("Witch's Potion"),
|
||||
DRUIDIC_RITUAL ("Druidic Ritual"),
|
||||
LOST_CITY ("Lost City", SkillReq(Skills.CRAFTING, 31, true), SkillReq(Skills.WOODCUTTING, 36, true)),
|
||||
WITCH_HOUSE ("Witch's House"),
|
||||
MERLIN ("Merlin's Crystal"),
|
||||
HERO ("Heroes' Quest", QPReq(55), SkillReq(Skills.COOKING, 53, true), SkillReq(Skills.FISHING, 53, true), SkillReq(Skills.HERBLORE, 25, true), SkillReq(Skills.MINING, 50, true), QuestReq(ARRAV), QuestReq(LOST_CITY), QuestReq(MERLIN), QuestReq(DRAGON_SLAYER)),
|
||||
SCORP_CATCHER ("Scorpion Catcher", SkillReq(Skills.PRAYER, 31)),
|
||||
FAMILY_CREST ("Family Crest", SkillReq(Skills.MINING, 40, true), SkillReq(Skills.SMITHING, 40, true), SkillReq(Skills.MAGIC, 59, true), SkillReq(Skills.CRAFTING, 40, true)),
|
||||
FISHING_CONTEST ("Fishing Contest", SkillReq(Skills.FISHING, 10)),
|
||||
TOTEM ("Tribal Totem", SkillReq(Skills.THIEVING, 21)),
|
||||
MONK ("Monk's Friend"),
|
||||
IKOV ("Temple of Ikov", SkillReq(Skills.THIEVING, 42, true), SkillReq(Skills.RANGE, 40)),
|
||||
CLOCK_TOWER ("Clock Tower"),
|
||||
GRAIL ("Holy Grail", QuestReq (MERLIN), SkillReq (Skills.ATTACK, 20)),
|
||||
GNOME_VILLAGE ("Tree Gnome Village"),
|
||||
FIGHT_ARENA ("Fight Arena"),
|
||||
HAZEEL ("Hazeel Cult"),
|
||||
SHEEP_HERDER ("Sheep Herder"),
|
||||
PLAGUE_CITY ("Plague City"),
|
||||
SEA_SLUG ("Sea Slug", SkillReq(Skills.FIREMAKING, 30, true)),
|
||||
WATERFALL ("Waterfall Quest"),
|
||||
POTION ("Jungle Potion", SkillReq(Skills.HERBLORE, 3, true), QuestReq(DRUIDIC_RITUAL)),
|
||||
GRAND_TREE ("The Grand Tree", SkillReq(Skills.AGILITY, 25, true)),
|
||||
BIOHAZARD ("Biohazard", QuestReq(PLAGUE_CITY)),
|
||||
UNDERGROUND_PASS ("Underground Pass", SkillReq (Skills.RANGE, 25), QuestReq(BIOHAZARD), QuestReq(PLAGUE_CITY)),
|
||||
OBSERVATORY ("Observatory Quest"),
|
||||
TOURIST ("The Tourist Trap", SkillReq (Skills.FLETCHING, 10, true), SkillReq(Skills.SMITHING, 20, true)),
|
||||
WATCHTOWER ("Watchtower", SkillReq (Skills.MAGIC, 14, true), SkillReq(Skills.THIEVING, 15, true), SkillReq (Skills.AGILITY, 25, true), SkillReq (Skills.HERBLORE, 14, true), SkillReq(Skills.MINING, 40, true)),
|
||||
DWARF_CANNON ("Dwarf Cannon"),
|
||||
MURDER_MYS ("Murder Mystery"),
|
||||
DIG_SITE ("Dig Site", SkillReq(Skills.AGILITY, 10, true), SkillReq (Skills.HERBLORE, 10, true), SkillReq (Skills.THIEVING, 25, true)),
|
||||
GERTRUDE ("Gertrude's Cat"),
|
||||
SHILO ("Shilo Village", QuestReq(POTION), SkillReq(Skills.CRAFTING, 20, true), SkillReq(Skills.AGILITY, 32, true)),
|
||||
LEGEND ("Legend's Quest", QPReq(107), SkillReq(Skills.AGILITY, 50, true), SkillReq(Skills.CRAFTING, 50, true), SkillReq(Skills.HERBLORE, 45, true), SkillReq(Skills.MAGIC, 56, true), SkillReq(Skills.MINING, 52, true), SkillReq(Skills.PRAYER, 42, true), SkillReq(Skills.SMITHING, 50, true), SkillReq(Skills.STRENGTH, 50, true), SkillReq(Skills.THIEVING, 50, true), SkillReq(Skills.WOODCUTTING, 50, true), QuestReq(FAMILY_CREST), QuestReq(HERO), QuestReq(SHILO), QuestReq(UNDERGROUND_PASS), QuestReq(WATERFALL)),
|
||||
DEATH_PLATEAU ("Death Plateau"),
|
||||
TROLL_STRONGHOLD ("Troll Stronghold", QuestReq(DEATH_PLATEAU), SkillReq(Skills.AGILITY, 15, true)),
|
||||
EADGAR ("Eadgar's Ruse", QuestReq (DRUIDIC_RITUAL), QuestReq (TROLL_STRONGHOLD), SkillReq(Skills.HERBLORE, 31, true)),
|
||||
CHOMPY ("Big Chompy Bird Hunting", SkillReq (Skills.FLETCHING, 5, true), SkillReq (Skills.COOKING, 30, true), SkillReq(Skills.RANGE, 30, false)),
|
||||
ELEMENTAL_W1 ("Elemental Workshop I", SkillReq(Skills.MINING, 20, true), SkillReq(Skills.SMITHING, 20, true), SkillReq(Skills.CRAFTING, 20, true)),
|
||||
PRIEST ("Priest in Peril"),
|
||||
NATURE_SPIRIT ("Nature Spirit", QuestReq(PRIEST), QuestReq(RESTLESS_GHOST)),
|
||||
REGICIDE ("Regicide", QuestReq (UNDERGROUND_PASS), SkillReq (Skills.CRAFTING, 10), SkillReq(Skills.AGILITY, 56, true)),
|
||||
TAI_BWO ("Tai Bwo Wannai Trio", SkillReq (Skills.AGILITY, 15, true), SkillReq(Skills.COOKING, 30), SkillReq(Skills.FISHING, 65, true), QuestReq(POTION)),
|
||||
SHADES ("Shades of Mort'ton", QuestReq(PRIEST), SkillReq(Skills.CRAFTING, 20, true), SkillReq(Skills.HERBLORE, 15, true), SkillReq(Skills.FIREMAKING, 5, true)),
|
||||
FREM_TRIALS ("Fremennik Trials", SkillReq(Skills.FLETCHING, 25, true), SkillReq(Skills.WOODCUTTING, 40, true), SkillReq(Skills.CRAFTING, 40, true)),
|
||||
HORROR_DEEP ("Horror from the Deep", SkillReq(Skills.AGILITY, 35, true)),
|
||||
THRONE ("Throne of Miscellania", QuestReq(HERO), QuestReq(FREM_TRIALS)),
|
||||
MONKEY ("Monkey Madness", QuestReq(GRAND_TREE), QuestReq(GNOME_VILLAGE)),
|
||||
MINE ("Haunted Mine", QuestReq(PRIEST), SkillReq(Skills.CRAFTING, 35, true)),
|
||||
TROLL_ROMANCE ("Troll Romance", QuestReq(TROLL_STRONGHOLD), SkillReq(Skills.AGILITY, 28, true)),
|
||||
SEARCH_MYREQUE ("In Search of the Myreque", QuestReq(NATURE_SPIRIT), SkillReq(Skills.AGILITY, 25, true)),
|
||||
FENKENSTRAIN ("Creature of Fenkenstrain", QuestReq(PRIEST), QuestReq(RESTLESS_GHOST), SkillReq(Skills.THIEVING, 25, true), SkillReq(Skills.CRAFTING, 20, true)),
|
||||
ROVING_ELVES ("Roving Elves", QuestReq(REGICIDE), QuestReq(WATERFALL), SkillReq(Skills.AGILITY, 56, true)),
|
||||
GHOSTS_AHOY ("Ghosts Ahoy", QuestReq(PRIEST), QuestReq(RESTLESS_GHOST), SkillReq(Skills.AGILITY, 25, true), SkillReq(Skills.COOKING, 20, true)),
|
||||
FAVOR ("One Small Favor", QuestReq(RUNE_MYSTERIES), QuestReq(SHILO), SkillReq(Skills.AGILITY, 36, true), SkillReq(Skills.CRAFTING, 25, true), SkillReq(Skills.HERBLORE, 18, true), SkillReq(Skills.SMITHING, 30, true)),
|
||||
MOUNTAIN_DAUGHTER ("Mountain Daughter", SkillReq(Skills.AGILITY, 20, true)),
|
||||
BETWEEN_ROCK ("Between a Rock...", QuestReq(DWARF_CANNON), QuestReq(FISHING_CONTEST), SkillReq(Skills.DEFENCE, 30, true), SkillReq(Skills.MINING, 40, true), SkillReq(Skills.SMITHING, 50, true)),
|
||||
FEUD ("The Feud", SkillReq(Skills.THIEVING, 30)),
|
||||
GOLEM ("The Golem", SkillReq(Skills.CRAFTING, 20, true), SkillReq(Skills.THIEVING, 25, true)),
|
||||
DESERT ("Desert Treasure", QuestReq (DIG_SITE), QuestReq (IKOV), QuestReq(TOURIST), QuestReq(TROLL_STRONGHOLD), QuestReq(PRIEST), QuestReq(WATERFALL), SkillReq(Skills.THIEVING, 53), SkillReq(Skills.MAGIC, 50), SkillReq(Skills.FIREMAKING, 50, true), SkillReq(Skills.SLAYER, 10)),
|
||||
ICTHLARIN ("Icthlarin's Little Helper", QuestReq (GERTRUDE)),
|
||||
TEARS_OF_GUTHIX ("Tears of Guthix", QPReq(43), SkillReq(Skills.FIREMAKING, 49, true), SkillReq(Skills.CRAFTING, 20, true), SkillReq(Skills.MINING, 20, true)),
|
||||
LOST_TRIBE ("Lost Tribe", QuestReq(GOBLIN_DIP), QuestReq(RUNE_MYSTERIES), SkillReq(Skills.AGILITY, 13, true), SkillReq(Skills.THIEVING, 13, true), SkillReq(Skills.MINING, 17, true)),
|
||||
GIANT_DWARF ("The Giant Dwarf", SkillReq(Skills.CRAFTING, 12, true), SkillReq(Skills.FIREMAKING, 16, true), SkillReq(Skills.MAGIC, 33, true), SkillReq(Skills.THIEVING, 14, true)),
|
||||
RECRUITMENT_DRIVE ("Recruitment Drive", QuestReq (BLACK_KNIGHT), QuestReq(DRUIDIC_RITUAL)),
|
||||
MEP_1 ("Mourning's End Part I", SkillReq(Skills.RANGE, 60), SkillReq(Skills.THIEVING, 50), QuestReq(ROVING_ELVES), QuestReq(CHOMPY), QuestReq(SHEEP_HERDER)),
|
||||
FORGETTABLE ("Forgettable Tale of a Drunken Dwarf", SkillReq (Skills.COOKING, 22, true), SkillReq(Skills.FARMING, 17, true), QuestReq(GIANT_DWARF), QuestReq(FISHING_CONTEST)),
|
||||
GARDEN ("Garden of Tranquility", QuestReq(FENKENSTRAIN), SkillReq(Skills.FARMING, 25)),
|
||||
TWO_CATS ("A Tale of Two Cats", QuestReq(ICTHLARIN)),
|
||||
WANTED ("Wanted!", QPReq(32), QuestReq(RECRUITMENT_DRIVE), QuestReq(LOST_TRIBE), QuestReq(PRIEST)),
|
||||
MEP_2 ("Mourning's End Part II", QuestReq(MEP_1)),
|
||||
ZOGRE ("Zogre Flesh Eaters", QuestReq(CHOMPY), QuestReq(POTION), SkillReq(Skills.SMITHING, 4, true), SkillReq(Skills.HERBLORE, 8, true), SkillReq(Skills.RANGE, 30)),
|
||||
RUM_DEAL ("Rum Deal", QuestReq(ZOGRE), QuestReq(PRIEST), SkillReq(Skills.CRAFTING, 42, true), SkillReq(Skills.FISHING, 50, true), SkillReq(Skills.FARMING, 40, true), SkillReq(Skills.PRAYER, 47, true), SkillReq(Skills.SLAYER, 42)),
|
||||
SHADOW ("Shadow of the Storm", SkillReq(Skills.CRAFTING, 30, true), QuestReq(GOLEM), QuestReq(DEMON_SLAYER)),
|
||||
HISTORY ("Making History", QuestReq(PRIEST), QuestReq(RESTLESS_GHOST)),
|
||||
RATCATCHERS ("Ratcatchers", QuestReq(ICTHLARIN), QuestReq(GIANT_DWARF)),
|
||||
SPIRITS_ELID ("Spirits of the Elid", SkillReq(Skills.MAGIC, 33, true), SkillReq(Skills.RANGE, 37, true), SkillReq(Skills.MINING, 37, true), SkillReq(Skills.THIEVING, 37, true)),
|
||||
DEVIOUS ("Devious Minds", SkillReq(Skills.SMITHING, 65, true), SkillReq(Skills.RUNECRAFTING, 50, true), SkillReq(Skills.FLETCHING, 50, true), QuestReq(WANTED), QuestReq(TROLL_STRONGHOLD), QuestReq(DORIC)),
|
||||
SAND ("The Hand in the Sand", SkillReq(Skills.THIEVING, 17, true), SkillReq(Skills.CRAFTING, 49, true)),
|
||||
ENAKHRA ("Enakhra's Lament", SkillReq(Skills.CRAFTING, 50, true), SkillReq(Skills.FIREMAKING, 45, true), SkillReq(Skills.PRAYER, 43, true), SkillReq(Skills.MAGIC, 39, true)),
|
||||
CABIN_FEVER ("Cabin Fever", QuestReq(PIRATE_T), QuestReq(RUM_DEAL), SkillReq(Skills.AGILITY, 42), SkillReq(Skills.CRAFTING, 45), SkillReq(Skills.SMITHING, 50), SkillReq(Skills.RANGE, 40)),
|
||||
FAIRYTALE_1 ("Fairytale I - Growing Pains", QuestReq(LOST_CITY), QuestReq(NATURE_SPIRIT)),
|
||||
RFD ("Recipe for Disaster", QPReq(175), QuestReq(COOK_ASSIST), SkillReq(Skills.COOKING, 70, true), SkillReq(Skills.AGILITY, 48, true), SkillReq(Skills.MINING, 50, true), SkillReq(Skills.FISHING, 53, true), SkillReq(Skills.THIEVING, 53, true), SkillReq(Skills.HERBLORE, 25, true), SkillReq(Skills.MAGIC, 59, true), SkillReq(Skills.SMITHING, 40, true), SkillReq(Skills.FIREMAKING, 50, true), SkillReq(Skills.RANGE, 40), SkillReq(Skills.CRAFTING, 40, true), SkillReq(Skills.FLETCHING, 10, true), SkillReq(Skills.WOODCUTTING, 36, true), QuestReq(FISHING_CONTEST), QuestReq(GOBLIN_DIP), QuestReq(CHOMPY), QuestReq(MURDER_MYS), QuestReq(NATURE_SPIRIT), QuestReq(WITCH_HOUSE), QuestReq(GERTRUDE), QuestReq(SHADOW), QuestReq(LEGEND), QuestReq(MONKEY), QuestReq(DESERT), QuestReq(HORROR_DEEP)),
|
||||
AID_MYREQUE ("In Aid of the Myreque", QuestReq(SEARCH_MYREQUE), SkillReq(Skills.AGILITY, 25, true), SkillReq(Skills.CRAFTING, 25), SkillReq(Skills.MINING, 15), SkillReq(Skills.MAGIC, 7, true)),
|
||||
SOUL_BANE ("A Soul's Bane"),
|
||||
BONE_MAN_1 ("Rag and Bone Man I"),
|
||||
SWAN ("Swan Song", QPReq(100), SkillReq(Skills.MAGIC, 66, true), SkillReq(Skills.COOKING, 62, true), SkillReq(Skills.FISHING, 62, true), SkillReq(Skills.SMITHING, 45, true), SkillReq(Skills.FIREMAKING, 42, true), SkillReq(Skills.CRAFTING, 40, true), QuestReq(FAVOR), QuestReq(GARDEN)),
|
||||
ROYAL_TROUBLE ("Royal Trouble", SkillReq(Skills.AGILITY, 40, true), SkillReq(Skills.SLAYER, 40, true), QuestReq(THRONE)),
|
||||
DEATH_DORGESHUUN ("Death to the Dorgeshuun", QuestReq(LOST_TRIBE), SkillReq(Skills.AGILITY, 23, true), SkillReq(Skills.THIEVING, 23, true)),
|
||||
FAIRYTALE_2 ("Fairytale II - Cure a Queen", QuestReq(FAIRYTALE_1), SkillReq(Skills.THIEVING, 40), SkillReq(Skills.FARMING, 49, true), SkillReq(Skills.HERBLORE, 57, true)),
|
||||
LUNAR_DIPLOMACY ("Lunar Diplomacy", QuestReq(FREM_TRIALS), QuestReq(LOST_CITY), QuestReq(RUNE_MYSTERIES), QuestReq(SHILO), SkillReq(Skills.HERBLORE, 5), SkillReq(Skills.CRAFTING, 61), SkillReq(Skills.DEFENCE, 40), SkillReq(Skills.FIREMAKING, 49), SkillReq(Skills.MAGIC, 65), SkillReq(Skills.MINING, 60), SkillReq(Skills.WOODCUTTING, 55)),
|
||||
GLOUPHRIE ("The Eyes of Glouphrie", QuestReq(GRAND_TREE), SkillReq(Skills.CONSTRUCTION, 5), SkillReq(Skills.MAGIC, 46)),
|
||||
HALLOWVALE ("Darkness of Hallowvale", QuestReq(AID_MYREQUE), SkillReq(Skills.CONSTRUCTION, 5, true), SkillReq(Skills.MINING, 20), SkillReq(Skills.THIEVING, 22), SkillReq(Skills.AGILITY, 26, true), SkillReq(Skills.CRAFTING, 32), SkillReq(Skills.MAGIC, 33, true), SkillReq(Skills.STRENGTH, 40)),
|
||||
SLUG_MENACE ("The Slug Menace", QuestReq(WANTED), QuestReq(SEA_SLUG), SkillReq(Skills.CRAFTING, 30), SkillReq(Skills.RUNECRAFTING, 30), SkillReq(Skills.SLAYER, 30), SkillReq(Skills.THIEVING, 30)),
|
||||
ELEMENTAL_W2 ("Elemental Workshop II", QuestReq(ELEMENTAL_W1), SkillReq(Skills.MAGIC, 20, true), SkillReq(Skills.SMITHING, 30, true)),
|
||||
ARM_ADVENTURE ("My Arm's Big Adventure", SkillReq(Skills.FARMING, 29, true), SkillReq(Skills.WOODCUTTING, 10), QuestReq(EADGAR), QuestReq(FEUD), QuestReq(POTION)),
|
||||
ENL_JOURNEY ("Enlightened Journey", QPReq(20), SkillReq(Skills.FIREMAKING, 20, true), SkillReq(Skills.FARMING, 30, true), SkillReq(Skills.CRAFTING, 36, true)),
|
||||
EAGLE ("Eagles' Peak", SkillReq(Skills.HUNTER, 27, true)),
|
||||
ANMA ("Animal Magnetism", QuestReq(RESTLESS_GHOST), QuestReq(ERNEST), QuestReq(PRIEST), SkillReq(Skills.SLAYER, 18), SkillReq(Skills.CRAFTING, 19), SkillReq(Skills.RANGE, 30), SkillReq(Skills.WOODCUTTING, 35)),
|
||||
CONTACT ("Contact!", QuestReq(ALI_RESCUE), QuestReq(ICTHLARIN)),
|
||||
COLD_WAR ("Cold War", SkillReq(Skills.HUNTER, 10), SkillReq(Skills.AGILITY, 30, true), SkillReq(Skills.CRAFTING, 30), SkillReq(Skills.CONSTRUCTION, 34), SkillReq(Skills.THIEVING, 15)),
|
||||
FREM_ISLES ("The Fremennik Isles", QuestReq(FREM_TRIALS), SkillReq(Skills.CONSTRUCTION, 20, true)),
|
||||
BRAIN_ROBBERY ("The Great Brain Robbery", SkillReq(Skills.CRAFTING, 16), SkillReq(Skills.CONSTRUCTION, 30), SkillReq(Skills.PRAYER, 50), QuestReq(FENKENSTRAIN), QuestReq(CABIN_FEVER), QuestReq(RFD)),
|
||||
WHAT_LIES_BELOW ("What Lies Below", QuestReq(RUNE_MYSTERIES), SkillReq(Skills.RUNECRAFTING, 35)),
|
||||
OLAF ("Olaf's Quest", QuestReq(FREM_TRIALS), SkillReq(Skills.FIREMAKING, 40, true), SkillReq(Skills.WOODCUTTING, 50, true)),
|
||||
ANOTHER_SLICE ("Another Slice of H.A.M", SkillReq(Skills.ATTACK, 15), SkillReq(Skills.PRAYER, 25), QuestReq(DEATH_DORGESHUUN), QuestReq(GIANT_DWARF), QuestReq(DIG_SITE)),
|
||||
DREAM_MENTOR ("Dream Mentor", QuestReq(LUNAR_DIPLOMACY), QuestReq(EADGAR)),
|
||||
GRIM_TALES ("Grim Tales", QuestReq(WITCH_HOUSE), SkillReq(Skills.FARMING, 45, true), SkillReq(Skills.HERBLORE, 52, true), SkillReq(Skills.THIEVING, 58, true), SkillReq(Skills.AGILITY, 59, true), SkillReq(Skills.WOODCUTTING, 71, true)),
|
||||
KINGS_RANSOM ("King's Ransom", SkillReq(Skills.MAGIC, 45), SkillReq(Skills.MINING, 45, true), SkillReq(Skills.DEFENCE, 65), QuestReq(BLACK_KNIGHT), QuestReq(GRAIL), QuestReq(MURDER_MYS), QuestReq(FAVOR)),
|
||||
TOWER_OF_LIFE ("Tower of Life", SkillReq(Skills.CONSTRUCTION, 10)),
|
||||
BONE_MAN_2 ("Rag and Bone Man II", SkillReq(Skills.SLAYER, 40, true), SkillReq(Skills.DEFENCE, 20), QuestReq(BONE_MAN_1), QuestReq(FREM_TRIALS), QuestReq(FENKENSTRAIN), QuestReq(ZOGRE), QuestReq(WATERFALL)),
|
||||
LAND_GOBLINS ("Land of the Goblins", QuestReq(ANOTHER_SLICE), QuestReq(FISHING_CONTEST), SkillReq(Skills.AGILITY, 38), SkillReq(Skills.FISHING, 40), SkillReq(Skills.THIEVING, 45), SkillReq(Skills.HERBLORE, 48)),
|
||||
PATH_GLOUPHRIE ("The Path of Glouphrie", QuestReq(GLOUPHRIE), QuestReq(GNOME_VILLAGE), QuestReq(WATERFALL), SkillReq(Skills.AGILITY, 45), SkillReq(Skills.RANGE, 47), SkillReq(Skills.SLAYER, 56), SkillReq(Skills.STRENGTH, 60), SkillReq(Skills.THIEVING, 56)),
|
||||
DEFENDER_VARROCK ("Defender of Varrock", QuestReq(ARRAV), QuestReq(KNIGHT_SWORD), QuestReq(DEMON_SLAYER), QuestReq(IKOV), QuestReq(FAMILY_CREST), QuestReq(WHAT_LIES_BELOW), QuestReq(GARDEN), SkillReq(Skills.AGILITY, 51), SkillReq(Skills.HUNTER, 51), SkillReq(Skills.MINING, 59), SkillReq(Skills.SMITHING, 54)),
|
||||
SPIRIT_OF_SUMMER ("Spirit of Summer", QuestReq(RESTLESS_GHOST), SkillReq(Skills.CONSTRUCTION, 40), SkillReq(Skills.FARMING, 26), SkillReq(Skills.PRAYER, 35), SkillReq(Skills.SUMMONING, 19)),
|
||||
SUMMERS_END ("Summer's End", QuestReq(SPIRIT_OF_SUMMER), SkillReq(Skills.FIREMAKING, 47), SkillReq(Skills.HUNTER, 35), SkillReq(Skills.MINING, 45), SkillReq(Skills.PRAYER, 55), SkillReq(Skills.SUMMONING, 23), SkillReq(Skills.WOODCUTTING, 37)),
|
||||
SEERGAZE ("Legacy of Seergaze", QuestReq(HALLOWVALE), SkillReq(Skills.AGILITY, 29), SkillReq(Skills.CONSTRUCTION, 20), SkillReq(Skills.CRAFTING, 47), SkillReq(Skills.FIREMAKING, 40), SkillReq(Skills.MAGIC, 49), SkillReq(Skills.MINING, 35), SkillReq(Skills.SLAYER, 31)),
|
||||
SMOKING_KILLS ("Smoking Kills", QuestReq(RESTLESS_GHOST), QuestReq(ICTHLARIN), SkillReq(Skills.CRAFTING, 25), SkillReq(Skills.SLAYER, 35)),
|
||||
WHILE_GUTHIX_SLEEPS ("While Guthix Sleeps", SkillReq(Skills.SUMMONING, 23), SkillReq(Skills.HUNTER, 55), SkillReq(Skills.THIEVING, 60), SkillReq(Skills.DEFENCE, 65), SkillReq(Skills.FARMING, 65), SkillReq(Skills.HERBLORE, 65), SkillReq(Skills.MAGIC, 75), QuestReq(DEFENDER_VARROCK), QuestReq(DREAM_MENTOR), QuestReq(SAND), QuestReq(KINGS_RANSOM), QuestReq(LEGEND), QuestReq(MEP_2), QuestReq(PATH_GLOUPHRIE), QuestReq(RFD), QuestReq(SUMMERS_END), QuestReq(SWAN), QuestReq(TEARS_OF_GUTHIX), QuestReq(ZOGRE)),
|
||||
ALL_FIRED_UP ("All Fired Up", QuestReq(PRIEST), SkillReq(Skills.FIREMAKING, 43))
|
||||
enum class QuestRequirements(val quest: Quests, vararg val requirements: Requirement) {
|
||||
COOK_ASSIST (Quests.COOKS_ASSISTANT),
|
||||
DEMON_SLAYER (Quests.DEMON_SLAYER),
|
||||
DORIC_QUEST (Quests.DORICS_QUEST),
|
||||
DRAGON_SLAYER (Quests.DRAGON_SLAYER, QPReq(32)),
|
||||
ERNEST (Quests.ERNEST_THE_CHICKEN),
|
||||
GOBLIN_DIP (Quests.GOBLIN_DIPLOMACY),
|
||||
IMP_CATCHER (Quests.IMP_CATCHER),
|
||||
KNIGHT_SWORD (Quests.THE_KNIGHTS_SWORD, SkillReq(Skills.MINING, 10, true)),
|
||||
PIRATE_T (Quests.PIRATES_TREASURE),
|
||||
ALI_RESCUE (Quests.PRINCE_ALI_RESCUE),
|
||||
RESTLESS_GHOST (Quests.THE_RESTLESS_GHOST),
|
||||
ROMEO (Quests.ROMEO_JULIET),
|
||||
RUNE_MYST (Quests.RUNE_MYSTERIES),
|
||||
SHEEP (Quests.SHEEP_SHEARER),
|
||||
ARRAV (Quests.SHIELD_OF_ARRAV),
|
||||
VAMPIRE (Quests.VAMPIRE_SLAYER),
|
||||
DORIC (Quests.DORICS_QUEST),
|
||||
RUNE_MYSTERIES(Quests.RUNE_MYSTERIES),
|
||||
BLACK_KNIGHT(Quests.BLACK_KNIGHTS_FORTRESS, QPReq(12)),
|
||||
WITCH_POTION (Quests.WITCHS_POTION),
|
||||
DRUIDIC_RITUAL (Quests.DRUIDIC_RITUAL),
|
||||
LOST_CITY (Quests.LOST_CITY, SkillReq(Skills.CRAFTING, 31, true), SkillReq(Skills.WOODCUTTING, 36, true)),
|
||||
WITCH_HOUSE (Quests.WITCHS_HOUSE),
|
||||
MERLIN (Quests.MERLINS_CRYSTAL),
|
||||
HERO (Quests.HEROES_QUEST, QPReq(55), SkillReq(Skills.COOKING, 53, true), SkillReq(Skills.FISHING, 53, true), SkillReq(Skills.HERBLORE, 25, true), SkillReq(Skills.MINING, 50, true), QuestReq(ARRAV), QuestReq(LOST_CITY), QuestReq(MERLIN), QuestReq(DRAGON_SLAYER)),
|
||||
SCORP_CATCHER (Quests.SCORPION_CATCHER, SkillReq(Skills.PRAYER, 31)),
|
||||
FAMILY_CREST (Quests.FAMILY_CREST, SkillReq(Skills.MINING, 40, true), SkillReq(Skills.SMITHING, 40, true), SkillReq(Skills.MAGIC, 59, true), SkillReq(Skills.CRAFTING, 40, true)),
|
||||
FISHING_CONTEST (Quests.FISHING_CONTEST, SkillReq(Skills.FISHING, 10)),
|
||||
TOTEM (Quests.TRIBAL_TOTEM, SkillReq(Skills.THIEVING, 21)),
|
||||
MONK (Quests.MONKS_FRIEND),
|
||||
IKOV (Quests.TEMPLE_OF_IKOV, SkillReq(Skills.THIEVING, 42, true), SkillReq(Skills.RANGE, 40)),
|
||||
CLOCK_TOWER (Quests.CLOCK_TOWER),
|
||||
GRAIL (Quests.HOLY_GRAIL, QuestReq (MERLIN), SkillReq (Skills.ATTACK, 20)),
|
||||
GNOME_VILLAGE (Quests.TREE_GNOME_VILLAGE),
|
||||
FIGHT_ARENA (Quests.FIGHT_ARENA),
|
||||
HAZEEL (Quests.HAZEEL_CULT),
|
||||
SHEEP_HERDER (Quests.SHEEP_HERDER),
|
||||
PLAGUE_CITY (Quests.PLAGUE_CITY),
|
||||
SEA_SLUG (Quests.SEA_SLUG, SkillReq(Skills.FIREMAKING, 30, true)),
|
||||
WATERFALL (Quests.WATERFALL_QUEST),
|
||||
POTION (Quests.JUNGLE_POTION, SkillReq(Skills.HERBLORE, 3, true), QuestReq(DRUIDIC_RITUAL)),
|
||||
GRAND_TREE (Quests.THE_GRAND_TREE, SkillReq(Skills.AGILITY, 25, true)),
|
||||
BIOHAZARD (Quests.BIOHAZARD, QuestReq(PLAGUE_CITY)),
|
||||
UNDERGROUND_PASS (Quests.UNDERGROUND_PASS, SkillReq (Skills.RANGE, 25), QuestReq(BIOHAZARD), QuestReq(PLAGUE_CITY)),
|
||||
OBSERVATORY (Quests.OBSERVATORY_QUEST),
|
||||
TOURIST (Quests.THE_TOURIST_TRAP, SkillReq (Skills.FLETCHING, 10, true), SkillReq(Skills.SMITHING, 20, true)),
|
||||
WATCHTOWER (Quests.WATCHTOWER, SkillReq (Skills.MAGIC, 14, true), SkillReq(Skills.THIEVING, 15, true), SkillReq (Skills.AGILITY, 25, true), SkillReq (Skills.HERBLORE, 14, true), SkillReq(Skills.MINING, 40, true)),
|
||||
DWARF_CANNON (Quests.DWARF_CANNON),
|
||||
MURDER_MYS (Quests.MURDER_MYSTERY),
|
||||
DIG_SITE (Quests.THE_DIG_SITE, SkillReq(Skills.AGILITY, 10, true), SkillReq (Skills.HERBLORE, 10, true), SkillReq (Skills.THIEVING, 25, true)),
|
||||
GERTRUDE (Quests.GERTRUDES_CAT),
|
||||
SHILO (Quests.SHILO_VILLAGE, QuestReq(POTION), SkillReq(Skills.CRAFTING, 20, true), SkillReq(Skills.AGILITY, 32, true)),
|
||||
LEGEND (Quests.LEGENDS_QUEST, QPReq(107), SkillReq(Skills.AGILITY, 50, true), SkillReq(Skills.CRAFTING, 50, true), SkillReq(Skills.HERBLORE, 45, true), SkillReq(Skills.MAGIC, 56, true), SkillReq(Skills.MINING, 52, true), SkillReq(Skills.PRAYER, 42, true), SkillReq(Skills.SMITHING, 50, true), SkillReq(Skills.STRENGTH, 50, true), SkillReq(Skills.THIEVING, 50, true), SkillReq(Skills.WOODCUTTING, 50, true), QuestReq(FAMILY_CREST), QuestReq(HERO), QuestReq(SHILO), QuestReq(UNDERGROUND_PASS), QuestReq(WATERFALL)),
|
||||
DEATH_PLATEAU (Quests.DEATH_PLATEAU),
|
||||
TROLL_STRONGHOLD (Quests.TROLL_STRONGHOLD, QuestReq(DEATH_PLATEAU), SkillReq(Skills.AGILITY, 15, true)),
|
||||
EADGAR (Quests.EADGARS_RUSE, QuestReq (DRUIDIC_RITUAL), QuestReq (TROLL_STRONGHOLD), SkillReq(Skills.HERBLORE, 31, true)),
|
||||
CHOMPY (Quests.BIG_CHOMPY_BIRD_HUNTING, SkillReq (Skills.FLETCHING, 5, true), SkillReq (Skills.COOKING, 30, true), SkillReq(Skills.RANGE, 30, false)),
|
||||
ELEMENTAL_W1 (Quests.ELEMENTAL_WORKSHOP_I, SkillReq(Skills.MINING, 20, true), SkillReq(Skills.SMITHING, 20, true), SkillReq(Skills.CRAFTING, 20, true)),
|
||||
PRIEST (Quests.PRIEST_IN_PERIL),
|
||||
NATURE_SPIRIT (Quests.NATURE_SPIRIT, QuestReq(PRIEST), QuestReq(RESTLESS_GHOST)),
|
||||
REGICIDE (Quests.REGICIDE, QuestReq (UNDERGROUND_PASS), SkillReq (Skills.CRAFTING, 10), SkillReq(Skills.AGILITY, 56, true)),
|
||||
TAI_BWO (Quests.TAI_BWO_WANNAI_TRIO, SkillReq (Skills.AGILITY, 15, true), SkillReq(Skills.COOKING, 30), SkillReq(Skills.FISHING, 65, true), QuestReq(POTION)),
|
||||
SHADES (Quests.SHADES_OF_MORTTON, QuestReq(PRIEST), SkillReq(Skills.CRAFTING, 20, true), SkillReq(Skills.HERBLORE, 15, true), SkillReq(Skills.FIREMAKING, 5, true)),
|
||||
FREM_TRIALS (Quests.THE_FREMENNIK_TRIALS, SkillReq(Skills.FLETCHING, 25, true), SkillReq(Skills.WOODCUTTING, 40, true), SkillReq(Skills.CRAFTING, 40, true)),
|
||||
HORROR_DEEP (Quests.HORROR_FROM_THE_DEEP, SkillReq(Skills.AGILITY, 35, true)),
|
||||
THRONE (Quests.THRONE_OF_MISCELLANIA, QuestReq(HERO), QuestReq(FREM_TRIALS)),
|
||||
MONKEY (Quests.MONKEY_MADNESS, QuestReq(GRAND_TREE), QuestReq(GNOME_VILLAGE)),
|
||||
MINE (Quests.HAUNTED_MINE, QuestReq(PRIEST), SkillReq(Skills.CRAFTING, 35, true)),
|
||||
TROLL_ROMANCE (Quests.TROLL_ROMANCE, QuestReq(TROLL_STRONGHOLD), SkillReq(Skills.AGILITY, 28, true)),
|
||||
SEARCH_MYREQUE (Quests.IN_SEARCH_OF_THE_MYREQUE, QuestReq(NATURE_SPIRIT), SkillReq(Skills.AGILITY, 25, true)),
|
||||
FENKENSTRAIN (Quests.CREATURE_OF_FENKENSTRAIN, QuestReq(PRIEST), QuestReq(RESTLESS_GHOST), SkillReq(Skills.THIEVING, 25, true), SkillReq(Skills.CRAFTING, 20, true)),
|
||||
ROVING_ELVES (Quests.ROVING_ELVES, QuestReq(REGICIDE), QuestReq(WATERFALL), SkillReq(Skills.AGILITY, 56, true)),
|
||||
GHOSTS_AHOY (Quests.GHOSTS_AHOY, QuestReq(PRIEST), QuestReq(RESTLESS_GHOST), SkillReq(Skills.AGILITY, 25, true), SkillReq(Skills.COOKING, 20, true)),
|
||||
FAVOR (Quests.ONE_SMALL_FAVOUR, QuestReq(RUNE_MYSTERIES), QuestReq(SHILO), SkillReq(Skills.AGILITY, 36, true), SkillReq(Skills.CRAFTING, 25, true), SkillReq(Skills.HERBLORE, 18, true), SkillReq(Skills.SMITHING, 30, true)),
|
||||
MOUNTAIN_DAUGHTER (Quests.MOUNTAIN_DAUGHTER, SkillReq(Skills.AGILITY, 20, true)),
|
||||
BETWEEN_ROCK (Quests.BETWEEN_A_ROCK, QuestReq(DWARF_CANNON), QuestReq(FISHING_CONTEST), SkillReq(Skills.DEFENCE, 30, true), SkillReq(Skills.MINING, 40, true), SkillReq(Skills.SMITHING, 50, true)),
|
||||
FEUD (Quests.THE_FEUD, SkillReq(Skills.THIEVING, 30)),
|
||||
GOLEM (Quests.THE_GOLEM, SkillReq(Skills.CRAFTING, 20, true), SkillReq(Skills.THIEVING, 25, true)),
|
||||
DESERT (Quests.DESERT_TREASURE, QuestReq (DIG_SITE), QuestReq (IKOV), QuestReq(TOURIST), QuestReq(TROLL_STRONGHOLD), QuestReq(PRIEST), QuestReq(WATERFALL), SkillReq(Skills.THIEVING, 53), SkillReq(Skills.MAGIC, 50), SkillReq(Skills.FIREMAKING, 50, true), SkillReq(Skills.SLAYER, 10)),
|
||||
ICTHLARIN (Quests.ICTHLARINS_LITTLE_HELPER, QuestReq (GERTRUDE)),
|
||||
TEARS_OF_GUTHIX (Quests.TEARS_OF_GUTHIX, QPReq(43), SkillReq(Skills.FIREMAKING, 49, true), SkillReq(Skills.CRAFTING, 20, true), SkillReq(Skills.MINING, 20, true)),
|
||||
LOST_TRIBE (Quests.THE_LOST_TRIBE, QuestReq(GOBLIN_DIP), QuestReq(RUNE_MYSTERIES), SkillReq(Skills.AGILITY, 13, true), SkillReq(Skills.THIEVING, 13, true), SkillReq(Skills.MINING, 17, true)),
|
||||
GIANT_DWARF (Quests.THE_GIANT_DWARF, SkillReq(Skills.CRAFTING, 12, true), SkillReq(Skills.FIREMAKING, 16, true), SkillReq(Skills.MAGIC, 33, true), SkillReq(Skills.THIEVING, 14, true)),
|
||||
RECRUITMENT_DRIVE (Quests.RECRUITMENT_DRIVE, QuestReq (BLACK_KNIGHT), QuestReq(DRUIDIC_RITUAL)),
|
||||
MEP_1 (Quests.MOURNINGS_END_PART_I, SkillReq(Skills.RANGE, 60), SkillReq(Skills.THIEVING, 50), QuestReq(ROVING_ELVES), QuestReq(CHOMPY), QuestReq(SHEEP_HERDER)),
|
||||
FORGETTABLE (Quests.FORGETTABLE_TALE, SkillReq (Skills.COOKING, 22, true), SkillReq(Skills.FARMING, 17, true), QuestReq(GIANT_DWARF), QuestReq(FISHING_CONTEST)),
|
||||
GARDEN (Quests.GARDEN_OF_TRANQUILITY, QuestReq(FENKENSTRAIN), SkillReq(Skills.FARMING, 25)),
|
||||
TWO_CATS (Quests.A_TAIL_OF_TWO_CATS, QuestReq(ICTHLARIN)),
|
||||
WANTED (Quests.WANTED, QPReq(32), QuestReq(RECRUITMENT_DRIVE), QuestReq(LOST_TRIBE), QuestReq(PRIEST)),
|
||||
MEP_2 (Quests.MOURNINGS_END_PART_II, QuestReq(MEP_1)),
|
||||
ZOGRE (Quests.ZOGRE_FLESH_EATERS, QuestReq(CHOMPY), QuestReq(POTION), SkillReq(Skills.SMITHING, 4, true), SkillReq(Skills.HERBLORE, 8, true), SkillReq(Skills.RANGE, 30)),
|
||||
RUM_DEAL (Quests.RUM_DEAL, QuestReq(ZOGRE), QuestReq(PRIEST), SkillReq(Skills.CRAFTING, 42, true), SkillReq(Skills.FISHING, 50, true), SkillReq(Skills.FARMING, 40, true), SkillReq(Skills.PRAYER, 47, true), SkillReq(Skills.SLAYER, 42)),
|
||||
SHADOW (Quests.SHADOW_OF_THE_STORM, SkillReq(Skills.CRAFTING, 30, true), QuestReq(GOLEM), QuestReq(DEMON_SLAYER)),
|
||||
HISTORY (Quests.MAKING_HISTORY, QuestReq(PRIEST), QuestReq(RESTLESS_GHOST)),
|
||||
RATCATCHERS (Quests.RATCATCHERS, QuestReq(ICTHLARIN), QuestReq(GIANT_DWARF)),
|
||||
SPIRITS_ELID (Quests.SPIRITS_OF_THE_ELID, SkillReq(Skills.MAGIC, 33, true), SkillReq(Skills.RANGE, 37, true), SkillReq(Skills.MINING, 37, true), SkillReq(Skills.THIEVING, 37, true)),
|
||||
DEVIOUS (Quests.DEVIOUS_MINDS, SkillReq(Skills.SMITHING, 65, true), SkillReq(Skills.RUNECRAFTING, 50, true), SkillReq(Skills.FLETCHING, 50, true), QuestReq(WANTED), QuestReq(TROLL_STRONGHOLD), QuestReq(DORIC)),
|
||||
SAND (Quests.THE_HAND_IN_THE_SAND, SkillReq(Skills.THIEVING, 17, true), SkillReq(Skills.CRAFTING, 49, true)),
|
||||
ENAKHRA (Quests.ENAKHRAS_LAMENT, SkillReq(Skills.CRAFTING, 50, true), SkillReq(Skills.FIREMAKING, 45, true), SkillReq(Skills.PRAYER, 43, true), SkillReq(Skills.MAGIC, 39, true)),
|
||||
CABIN_FEVER (Quests.CABIN_FEVER, QuestReq(PIRATE_T), QuestReq(RUM_DEAL), SkillReq(Skills.AGILITY, 42), SkillReq(Skills.CRAFTING, 45), SkillReq(Skills.SMITHING, 50), SkillReq(Skills.RANGE, 40)),
|
||||
FAIRYTALE_1 (Quests.FAIRYTALE_I_GROWING_PAINS, QuestReq(LOST_CITY), QuestReq(NATURE_SPIRIT)),
|
||||
RFD (Quests.RECIPE_FOR_DISASTER, QPReq(175), QuestReq(COOK_ASSIST), SkillReq(Skills.COOKING, 70, true), SkillReq(Skills.AGILITY, 48, true), SkillReq(Skills.MINING, 50, true), SkillReq(Skills.FISHING, 53, true), SkillReq(Skills.THIEVING, 53, true), SkillReq(Skills.HERBLORE, 25, true), SkillReq(Skills.MAGIC, 59, true), SkillReq(Skills.SMITHING, 40, true), SkillReq(Skills.FIREMAKING, 50, true), SkillReq(Skills.RANGE, 40), SkillReq(Skills.CRAFTING, 40, true), SkillReq(Skills.FLETCHING, 10, true), SkillReq(Skills.WOODCUTTING, 36, true), QuestReq(FISHING_CONTEST), QuestReq(GOBLIN_DIP), QuestReq(CHOMPY), QuestReq(MURDER_MYS), QuestReq(NATURE_SPIRIT), QuestReq(WITCH_HOUSE), QuestReq(GERTRUDE), QuestReq(SHADOW), QuestReq(LEGEND), QuestReq(MONKEY), QuestReq(DESERT), QuestReq(HORROR_DEEP)),
|
||||
AID_MYREQUE (Quests.IN_AID_OF_THE_MYREQUE, QuestReq(SEARCH_MYREQUE), SkillReq(Skills.AGILITY, 25, true), SkillReq(Skills.CRAFTING, 25), SkillReq(Skills.MINING, 15), SkillReq(Skills.MAGIC, 7, true)),
|
||||
SOUL_BANE (Quests.A_SOULS_BANE),
|
||||
BONE_MAN_1 (Quests.RAG_AND_BONE_MAN),
|
||||
SWAN (Quests.SWAN_SONG, QPReq(100), SkillReq(Skills.MAGIC, 66, true), SkillReq(Skills.COOKING, 62, true), SkillReq(Skills.FISHING, 62, true), SkillReq(Skills.SMITHING, 45, true), SkillReq(Skills.FIREMAKING, 42, true), SkillReq(Skills.CRAFTING, 40, true), QuestReq(FAVOR), QuestReq(GARDEN)),
|
||||
ROYAL_TROUBLE (Quests.ROYAL_TROUBLE, SkillReq(Skills.AGILITY, 40, true), SkillReq(Skills.SLAYER, 40, true), QuestReq(THRONE)),
|
||||
DEATH_DORGESHUUN (Quests.DEATH_TO_THE_DORGESHUUN, QuestReq(LOST_TRIBE), SkillReq(Skills.AGILITY, 23, true), SkillReq(Skills.THIEVING, 23, true)),
|
||||
FAIRYTALE_2 (Quests.FAIRYTALE_II_CURE_A_QUEEN, QuestReq(FAIRYTALE_1), SkillReq(Skills.THIEVING, 40), SkillReq(Skills.FARMING, 49, true), SkillReq(Skills.HERBLORE, 57, true)),
|
||||
LUNAR_DIPLOMACY (Quests.LUNAR_DIPLOMACY, QuestReq(FREM_TRIALS), QuestReq(LOST_CITY), QuestReq(RUNE_MYSTERIES), QuestReq(SHILO), SkillReq(Skills.HERBLORE, 5), SkillReq(Skills.CRAFTING, 61), SkillReq(Skills.DEFENCE, 40), SkillReq(Skills.FIREMAKING, 49), SkillReq(Skills.MAGIC, 65), SkillReq(Skills.MINING, 60), SkillReq(Skills.WOODCUTTING, 55)),
|
||||
GLOUPHRIE (Quests.THE_EYES_OF_GLOUPHRIE, QuestReq(GRAND_TREE), SkillReq(Skills.CONSTRUCTION, 5), SkillReq(Skills.MAGIC, 46)),
|
||||
HALLOWVALE (Quests.DARKNESS_OF_HALLOWVALE, QuestReq(AID_MYREQUE), SkillReq(Skills.CONSTRUCTION, 5, true), SkillReq(Skills.MINING, 20), SkillReq(Skills.THIEVING, 22), SkillReq(Skills.AGILITY, 26, true), SkillReq(Skills.CRAFTING, 32), SkillReq(Skills.MAGIC, 33, true), SkillReq(Skills.STRENGTH, 40)),
|
||||
SLUG_MENACE (Quests.THE_SLUG_MENACE, QuestReq(WANTED), QuestReq(SEA_SLUG), SkillReq(Skills.CRAFTING, 30), SkillReq(Skills.RUNECRAFTING, 30), SkillReq(Skills.SLAYER, 30), SkillReq(Skills.THIEVING, 30)),
|
||||
ELEMENTAL_W2 (Quests.ELEMENTAL_WORKSHOP_II, QuestReq(ELEMENTAL_W1), SkillReq(Skills.MAGIC, 20, true), SkillReq(Skills.SMITHING, 30, true)),
|
||||
ARM_ADVENTURE (Quests.MY_ARMS_BIG_ADVENTURE, SkillReq(Skills.FARMING, 29, true), SkillReq(Skills.WOODCUTTING, 10), QuestReq(EADGAR), QuestReq(FEUD), QuestReq(POTION)),
|
||||
ENL_JOURNEY (Quests.ENLIGHTENED_JOURNEY, QPReq(20), SkillReq(Skills.FIREMAKING, 20, true), SkillReq(Skills.FARMING, 30, true), SkillReq(Skills.CRAFTING, 36, true)),
|
||||
EAGLE (Quests.EAGLES_PEAK, SkillReq(Skills.HUNTER, 27, true)),
|
||||
ANMA (Quests.ANIMAL_MAGNETISM, QuestReq(RESTLESS_GHOST), QuestReq(ERNEST), QuestReq(PRIEST), SkillReq(Skills.SLAYER, 18), SkillReq(Skills.CRAFTING, 19), SkillReq(Skills.RANGE, 30), SkillReq(Skills.WOODCUTTING, 35)),
|
||||
CONTACT (Quests.CONTACT, QuestReq(ALI_RESCUE), QuestReq(ICTHLARIN)),
|
||||
COLD_WAR (Quests.COLD_WAR, SkillReq(Skills.HUNTER, 10), SkillReq(Skills.AGILITY, 30, true), SkillReq(Skills.CRAFTING, 30), SkillReq(Skills.CONSTRUCTION, 34), SkillReq(Skills.THIEVING, 15)),
|
||||
FREM_ISLES (Quests.THE_FREMENNIK_ISLES, QuestReq(FREM_TRIALS), SkillReq(Skills.CONSTRUCTION, 20, true)),
|
||||
BRAIN_ROBBERY (Quests.THE_GREAT_BRAIN_ROBBERY, SkillReq(Skills.CRAFTING, 16), SkillReq(Skills.CONSTRUCTION, 30), SkillReq(Skills.PRAYER, 50), QuestReq(FENKENSTRAIN), QuestReq(CABIN_FEVER), QuestReq(RFD)),
|
||||
WHAT_LIES_BELOW (Quests.WHAT_LIES_BELOW, QuestReq(RUNE_MYSTERIES), SkillReq(Skills.RUNECRAFTING, 35)),
|
||||
OLAF (Quests.OLAFS_QUEST, QuestReq(FREM_TRIALS), SkillReq(Skills.FIREMAKING, 40, true), SkillReq(Skills.WOODCUTTING, 50, true)),
|
||||
ANOTHER_SLICE (Quests.ANOTHER_SLICE_OF_HAM, SkillReq(Skills.ATTACK, 15), SkillReq(Skills.PRAYER, 25), QuestReq(DEATH_DORGESHUUN), QuestReq(GIANT_DWARF), QuestReq(DIG_SITE)),
|
||||
DREAM_MENTOR (Quests.DREAM_MENTOR, QuestReq(LUNAR_DIPLOMACY), QuestReq(EADGAR)),
|
||||
GRIM_TALES (Quests.GRIM_TALES, QuestReq(WITCH_HOUSE), SkillReq(Skills.FARMING, 45, true), SkillReq(Skills.HERBLORE, 52, true), SkillReq(Skills.THIEVING, 58, true), SkillReq(Skills.AGILITY, 59, true), SkillReq(Skills.WOODCUTTING, 71, true)),
|
||||
KINGS_RANSOM (Quests.KINGS_RANSOM, SkillReq(Skills.MAGIC, 45), SkillReq(Skills.MINING, 45, true), SkillReq(Skills.DEFENCE, 65), QuestReq(BLACK_KNIGHT), QuestReq(GRAIL), QuestReq(MURDER_MYS), QuestReq(FAVOR)),
|
||||
TOWER_OF_LIFE (Quests.TOWER_OF_LIFE, SkillReq(Skills.CONSTRUCTION, 10)),
|
||||
BONE_MAN_2 (Quests.RAG_AND_BONE_MAN, SkillReq(Skills.SLAYER, 40, true), SkillReq(Skills.DEFENCE, 20), QuestReq(BONE_MAN_1), QuestReq(FREM_TRIALS), QuestReq(FENKENSTRAIN), QuestReq(ZOGRE), QuestReq(WATERFALL)),
|
||||
LAND_GOBLINS (Quests.LAND_OF_THE_GOBLINS, QuestReq(ANOTHER_SLICE), QuestReq(FISHING_CONTEST), SkillReq(Skills.AGILITY, 38), SkillReq(Skills.FISHING, 40), SkillReq(Skills.THIEVING, 45), SkillReq(Skills.HERBLORE, 48)),
|
||||
PATH_GLOUPHRIE (Quests.THE_PATH_OF_GLOUPHRIE, QuestReq(GLOUPHRIE), QuestReq(GNOME_VILLAGE), QuestReq(WATERFALL), SkillReq(Skills.AGILITY, 45), SkillReq(Skills.RANGE, 47), SkillReq(Skills.SLAYER, 56), SkillReq(Skills.STRENGTH, 60), SkillReq(Skills.THIEVING, 56)),
|
||||
DEFENDER_VARROCK (Quests.DEFENDER_OF_VARROCK, QuestReq(ARRAV), QuestReq(KNIGHT_SWORD), QuestReq(DEMON_SLAYER), QuestReq(IKOV), QuestReq(FAMILY_CREST), QuestReq(WHAT_LIES_BELOW), QuestReq(GARDEN), SkillReq(Skills.AGILITY, 51), SkillReq(Skills.HUNTER, 51), SkillReq(Skills.MINING, 59), SkillReq(Skills.SMITHING, 54)),
|
||||
SPIRIT_OF_SUMMER (Quests.SPIRIT_OF_SUMMER, QuestReq(RESTLESS_GHOST), SkillReq(Skills.CONSTRUCTION, 40), SkillReq(Skills.FARMING, 26), SkillReq(Skills.PRAYER, 35), SkillReq(Skills.SUMMONING, 19)),
|
||||
SUMMERS_END (Quests.SUMMERS_END, QuestReq(SPIRIT_OF_SUMMER), SkillReq(Skills.FIREMAKING, 47), SkillReq(Skills.HUNTER, 35), SkillReq(Skills.MINING, 45), SkillReq(Skills.PRAYER, 55), SkillReq(Skills.SUMMONING, 23), SkillReq(Skills.WOODCUTTING, 37)),
|
||||
SEERGAZE (Quests.LEGACY_OF_SEERGAZE, QuestReq(HALLOWVALE), SkillReq(Skills.AGILITY, 29), SkillReq(Skills.CONSTRUCTION, 20), SkillReq(Skills.CRAFTING, 47), SkillReq(Skills.FIREMAKING, 40), SkillReq(Skills.MAGIC, 49), SkillReq(Skills.MINING, 35), SkillReq(Skills.SLAYER, 31)),
|
||||
SMOKING_KILLS (Quests.SMOKING_KILLS, QuestReq(RESTLESS_GHOST), QuestReq(ICTHLARIN), SkillReq(Skills.CRAFTING, 25), SkillReq(Skills.SLAYER, 35)),
|
||||
WHILE_GUTHIX_SLEEPS (Quests.WHILE_GUTHIX_SLEEPS, SkillReq(Skills.SUMMONING, 23), SkillReq(Skills.HUNTER, 55), SkillReq(Skills.THIEVING, 60), SkillReq(Skills.DEFENCE, 65), SkillReq(Skills.FARMING, 65), SkillReq(Skills.HERBLORE, 65), SkillReq(Skills.MAGIC, 75), QuestReq(DEFENDER_VARROCK), QuestReq(DREAM_MENTOR), QuestReq(SAND), QuestReq(KINGS_RANSOM), QuestReq(LEGEND), QuestReq(MEP_2), QuestReq(PATH_GLOUPHRIE), QuestReq(RFD), QuestReq(SUMMERS_END), QuestReq(SWAN), QuestReq(TEARS_OF_GUTHIX), QuestReq(ZOGRE)),
|
||||
ALL_FIRED_UP (Quests.ALL_FIRED_UP, QuestReq(PRIEST), SkillReq(Skills.FIREMAKING, 43))
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import org.rs09.consts.Components
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
import java.io.FileReader
|
||||
import content.data.Quests
|
||||
|
||||
/**
|
||||
* The "controller" class for shops. Handles opening shops from various NPC interactions and updating stock, etc.
|
||||
@@ -149,7 +150,7 @@ class Shops : StartupListener, TickListener, InteractionListener, InterfaceListe
|
||||
}
|
||||
|
||||
on(NPCs.FUR_TRADER_1316, IntType.NPC, "trade") { player, node ->
|
||||
if (!isQuestComplete(player, "Fremennik Trials")) {
|
||||
if (!isQuestComplete(player, Quests.THE_FREMENNIK_TRIALS)) {
|
||||
sendNPCDialogue(player, NPCs.FUR_TRADER_1316, "I don't sell to outerlanders.", core.game.dialogue.FacialExpression.ANNOYED).also { END_DIALOGUE }
|
||||
} else {
|
||||
shopsByNpc[node.id]?.openFor(player)
|
||||
@@ -158,7 +159,7 @@ class Shops : StartupListener, TickListener, InteractionListener, InterfaceListe
|
||||
}
|
||||
|
||||
on(NPCs.CANDLE_MAKER_562, IntType.NPC, "trade") { player, node ->
|
||||
if (getQuestStage(player, "Merlin's Crystal") > 60) {
|
||||
if (getQuestStage(player, Quests.MERLINS_CRYSTAL) > 60) {
|
||||
openId(player, 56)
|
||||
} else {
|
||||
shopsByNpc[node.id]?.openFor(player)
|
||||
|
||||
@@ -57,7 +57,7 @@ class QuestCommandSet : CommandSet(Privilege.ADMIN){
|
||||
questObject.reset(player)
|
||||
}
|
||||
questObject.updateVarps(player)
|
||||
notify(player, "<col=209dff>Setting " + questObject.name + " to stage $stage</col>")
|
||||
notify(player, "<col=209dff>Setting " + questObject.quest + " to stage $stage</col>")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ class QuestCommandSet : CommandSet(Privilege.ADMIN){
|
||||
player.packetDispatch.sendString("<col=ecf0f1>" + "Available Quests" + "</col>", 275, 2)
|
||||
for (q in QuestRepository.getQuests().toSortedMap().values) {
|
||||
// Add a space to beginning and end of string for the strikethrough
|
||||
player.packetDispatch.sendString("<col=ecf0f1>" + (if (q.isCompleted(player)) "<str> " else "") + q.name + " ", 275, lineId++)
|
||||
player.packetDispatch.sendString("<col=ecf0f1>" + (if (q.isCompleted(player)) "<str> " else "") + q.quest + " ", 275, lineId++)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ class QuestCommandSet : CommandSet(Privilege.ADMIN){
|
||||
stage in 1..99 -> "ff8400"
|
||||
else -> "ff0000"
|
||||
}
|
||||
admin.packetDispatch.sendString("<col=ecf0f1>${q.name}</col>", 275, lineId++)
|
||||
admin.packetDispatch.sendString("<col=ecf0f1>${q.quest}</col>", 275, lineId++)
|
||||
admin.packetDispatch.sendString("<col=ecf0f1>Index: </col><col=ff1f1f><shad=2>${q.index}</shad></col> | <col=ecf0f1>Stage:</col> <col=$statusColor><shad=2>${lookupUser.questRepository.getStage(q)}</shad></col>", 275, lineId++)
|
||||
admin.packetDispatch.sendString("<str> ", 275, lineId++)
|
||||
}
|
||||
|
||||
@@ -31,14 +31,12 @@ class DoorConfigLoader {
|
||||
door.isFence = e["fence"].toString().toBoolean()
|
||||
door.isMetal = e["metal"].toString().toBoolean()
|
||||
door.isAutoWalk = e["autowalk"]?.toString()?.toBoolean() ?: false
|
||||
door.questRequirement = e["questRequirement"]?.toString() ?: ""
|
||||
DOORS[door.id] = door
|
||||
val replacedDoor = Door(door.replaceId)
|
||||
replacedDoor.replaceId = door.id
|
||||
replacedDoor.isFence = door.isFence
|
||||
replacedDoor.isMetal = door.isMetal
|
||||
replacedDoor.isAutoWalk = door.isAutoWalk
|
||||
replacedDoor.questRequirement = door.questRequirement
|
||||
DOORS[door.replaceId] = replacedDoor
|
||||
count++
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user