Requirements Audit

Added a new quest requirement system
Ensured that all implemented rewards are obtainable, even if all requirements are not implemented
Rewards that should have higher requirements than what is currently obtainable will have those requirements automatically increase as more quests are added
The requirements for any quest can be viewed at any time by clicking it in the quest list
Things that were previously locked/unavailable but are now available (with prereqs) are:
- It is now possible to obtain and equip Barrow's Gloves with the Recipe for Disaster prereqs
- It is now possible to obtain and equip an Ancient Staff with the Desert Treasure prereqs
- It is now possible to enchant your secateurs into Magic Secateurs with the Fairy Tale I - Growing Pains prereqs and 40k gold
- It is now possible to equip the Ancient Mace with the Another Slice of H.A.M prereqs
- It is now possible to get Suqahs as a task from Duradel with the Lunar Diplomacy prereqs
- It is now possible to obtain a Seal of Passage by speaking with Chieftan Brundt after meeting the Lunar Diplomacy prereqs
- It is now possible to obtain Ancient Staves by killing the level 96 and 103 mummies in the Ancient Pyramid (1/500)
Things that were freely available but are now locked include:
- Sophanem now requires/requires the prereqs of Icthlarin's Little Helper
- Pharaoh's Sceptre requires the same^
- Equipping god books now requires Horror from the Deep/its prereqs
- Neitiznot helmet now requires the Fremennik Isles prereqs rather than just Fremennik Trials
- Cape of Legends now correctly requires the full possible prereqs for Legend's Quest rather than just 55 QP
- Dragon Scimitar now correctly requires the Monkey Madness prereqs
- Ape Atoll teleport now correctly requires the Monkey Madness prereqs
- Slayer Helmet and the Slayer Rewards Shop in general now correctly require the Smoking Kills prereqs (not high)
- Dragon Halberd now requires the Regicide prereqs
- Climbing Boots now require the Death Plateau prereqs
- Dragon SQ Shield now requires the Legend's Quest prereqs to equip (source available in sourcecode)
- Initiate Armour now requires the Recruitment Drive prereqs
- Proselyte Armour now requires the Slug Menace prereqs
- Access to Piscatoris now requires the Swan Song prereqs (effectively Quest Cape here.)
- The disease-free herb patch in Trollheim now requires the My Arm's Big Adventure prereqs.
- Ardougne Teleport now requires the Plague City prereqs
- Watchtower Teleport now requires the Watchtower prereqs
- Trollheim Teleport now requires the Eadgar's Ruse prereqs
- The Lunar spellbook now requires the Lunar Diplomacy prereqs
- The Ancient spellbook now requires the Desert Treasure prereqs
- Crafting Astral Runes now requires the Lunar Diplomacy prereqs
- Crafting Death Runes now requires the Mourning's End Part II prereqs
- Crafting Blood Runes now requires the Legacy of Seergaze prereqs
- Access to Cave Horrors now requires the Cabin Fever prereqs
- Sorceress' Garden now requires Prince Ali Rescue
- Access to the Heroes' Guild now requires the Heroes' Quest prereqs
- Access to GWD now requires the Troll Stronghold prereqs
- Access to Neitiznot and Jatizso now requires Fremennik Trials
- Access to Shilo Villa now requires the Shilo Village prereqs
- The Keldagrim cart system now requires The Giant Dwarf prereqs
- Fairy Rings now require the full Fairy Tale I - Growing Pains prereqs
- Ectophial now requires the Ghosts Ahoy prereqs
- Access to Tormented Demons now requires the While Guthix Sleeps prereqs
- Access to the Halberd Shop and the ability to equip Dragon Halberds now requires the Regicide prereqs
- Access to Lletya now requires the Mourning's End Part I prereqs
- Access to Corporeal Beast now requires the Summer's End prereqs
- Chivalry and Piety prayers now require the King's Ransom prereqs
- Ali Morrisane's rune shop now requires the The Feud prereqs
- Armoured Zombies now require the Defender of Varrock prereqs
- Experiments now require the Creature of Fenkenstrain prereqs
- The carpet to Sophanem now requires the Icthlarin's Little Helper prereqs
- The carpet to Uzer now requires The Golem
- The carpet to Bedabin Camp now requires The Tourist Trap
- The bank in Sophanem now requires the Contact! prereqs
- The Dragon Battleaxe now requires the prereqs of Heroes' Quest to equip.
- The Dragon Mace now requires the prereqs of Heroes' Quest to equip.
- Spirit shields of all varieties (improved, blessed, unblessed) now require the prereqs of Summer's End to equip.
- Bork access now requires What Lies Below
This commit is contained in:
Ceikry
2023-05-30 09:03:05 +00:00
committed by Ryan
parent 5404ef849d
commit cb630e7043
55 changed files with 1009 additions and 265 deletions
@@ -14,6 +14,8 @@ import core.game.world.update.flag.context.Animation;
import core.plugin.Initializable;
import core.plugin.Plugin;
import static core.api.ContentAPIKt.hasRequirement;
/**
* Handles a tunnel shortcut.
* @author Vexia
@@ -70,6 +72,10 @@ public class TunnelShortcut extends AgilityShortcut {
@Override
public void run(final Player player, Scenery object, String option, boolean failed) {
if (object.getId() == 14922) {
if (!hasRequirement(player, "Swan Song"))
return;
}
player.lock(6);
final Scenery o = object;
final Location start = player.getLocation();
@@ -33,6 +33,11 @@ class UseWithPatchHandler : InteractionListener {
val patch = FarmingPatch.forObject(with.asScenery()) ?: return@onUseWith true
val usedItem = used.asItem()
if (patch == FarmingPatch.TROLL_STRONGHOLD_HERB) {
if (!hasRequirement(player, "My Arm's Big Adventure"))
return@onUseWith true
}
player.faceLocation(with.location)
when(usedItem.id){
RAKE -> PatchRaker.rake(player,patch)
@@ -92,21 +92,29 @@ class ModernListeners : SpellListener("modern"){
}
onCast(Modern.ARDOUGNE_TELEPORT, NONE){ player, _ ->
if (!hasRequirement(player, "Plague City"))
return@onCast
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))
}
onCast(Modern.WATCHTOWER_TELEPORT, NONE){ player, _ ->
if (!hasRequirement(player, "Watchtower"))
return@onCast
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))
}
onCast(Modern.TROLLHEIM_TELEPORT, NONE){ player, _ ->
if (!hasRequirement(player, "Eadgar's Ruse"))
return@onCast
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))
}
onCast(Modern.APE_ATOLL_TELEPORT, NONE){ player, _ ->
if (!hasRequirement(player, "Monkey Madness"))
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)))
sendTeleport(player,74.0, Location.create(2754, 2784, 0))
}
@@ -16,6 +16,8 @@ import core.game.world.map.Location;
import core.game.world.update.flag.context.Animation;
import core.plugin.Plugin;
import static core.api.ContentAPIKt.hasRequirement;
/**
* Handles the praying at an alter.
* @author Vexia
@@ -104,6 +106,8 @@ public class PrayerAltarPlugin extends OptionHandler {
ANCIENT(6552, SpellBook.ANCIENT.getInterfaceId(), "You feel a strange wisdom fill your mind...", "You feel a strange drain upon your memory...") {
@Override
public void pray(Player player) {
if (!hasRequirement(player, "Desert Treasure"))
return;
if (player.getSkills().getStaticLevel(Skills.MAGIC) < 50) {
player.sendMessage("You need a Magic level of at least 50 in order to do this.");
return;
@@ -121,6 +125,8 @@ public class PrayerAltarPlugin extends OptionHandler {
LUNAR(17010, SpellBook.LUNAR.getInterfaceId(), "Lunar spells activated!", "Modern spells activated!") {
@Override
public void pray(Player player) {
if (!hasRequirement(player, "Lunar Diplomacy"))
return;
if (player.getSkills().getStaticLevel(Skills.MAGIC) < 65) {
player.sendMessage("You need a Magic level of at least 65 in order to do this.");
return;
@@ -4,6 +4,8 @@ import core.cache.def.impl.ItemDefinition;
import core.game.node.entity.player.Player;
import core.game.node.scenery.Scenery;
import static core.api.ContentAPIKt.hasRequirement;
/**
* Represents an altar an it's relative information(corresponding ruin, etc)
* @author 'Vexia
@@ -69,6 +71,18 @@ public enum Altar {
* @param player the player.
*/
public void enterRift(Player player) {
if (this == ASTRAL) {
if (!hasRequirement(player, "Lunar Diplomacy"))
return;
}
if (this == DEATH) {
if (!hasRequirement(player, "Mourning's End Part II"))
return;
}
if (this == BLOOD) {
if (!hasRequirement(player, "Legacy of Seergaze"))
return;
}
if (this == LAW) {
if (!ItemDefinition.canEnterEntrana(player)) {
player.sendMessage("You can't take weapons and armour into the law rift.");
@@ -5,6 +5,8 @@ import core.game.node.entity.player.Player;
import core.game.node.scenery.Scenery;
import core.game.world.map.Location;
import static core.api.ContentAPIKt.hasRequirement;
/**
* Represents a mysterious ruin.
* @author 'Vexia
@@ -70,6 +72,14 @@ public enum MysteriousRuin {
* @param player the player.
*/
public void enter(Player player) {
if (this == DEATH) {
if (!hasRequirement(player, "Mourning's End Part II"))
return;
}
if (this == BLOOD) {
if (!hasRequirement(player, "Legacy of Seergaze"))
return;
}
if (player.getEquipment().get(EquipmentContainer.SLOT_HAT) == null) {
return;
}
@@ -15,6 +15,7 @@ import core.tools.RandomFunction;
import static core.api.ContentAPIKt.inEquipment;
import static core.game.system.command.sets.StatAttributeKeysKt.STATS_BASE;
import static core.game.system.command.sets.StatAttributeKeysKt.STATS_RC;
import static core.api.ContentAPIKt.hasRequirement;
import core.game.world.GameWorld;
import org.rs09.consts.Items;
@@ -96,6 +97,18 @@ public final class RuneCraftPulse extends SkillPulse<Item> {
@Override
public boolean checkRequirements() {
if (altar == Altar.ASTRAL) {
if (!hasRequirement(player, "Lunar Diplomacy"))
return false;
}
if (altar == Altar.DEATH) {
if (!hasRequirement(player, "Mourning's End Part II"))
return false;
}
if (altar == Altar.BLOOD) {
if (!hasRequirement(player, "Legacy of Seergaze"))
return false;
}
if (!altar.isOurania() && player.getSkills().getLevel(Skills.RUNECRAFTING) < rune.getLevel()) {
player.getPacketDispatch().sendMessage("You need a Runecrafting level of at least " + rune.getLevel() + " to craft this rune.");
return false;
@@ -23,6 +23,8 @@ import content.global.travel.EssenceTeleport;
import core.game.world.GameWorld;
import core.plugin.ClassScanner;
import static core.api.ContentAPIKt.hasRequirement;
/**
* Handles runecraftign related options.
* @author Vexia
@@ -94,7 +96,12 @@ public class RunecraftingPlugin extends OptionHandler {
player.sendMessage("You can only craft Astral runes on Lunar Isle.");
return true;
}
player.getPulseManager().run(new RuneCraftPulse(player, null, Altar.forObject(((Scenery) node)), false, null));
Altar a = Altar.forObject(((Scenery) node));
if (a == Altar.ASTRAL) {
if (!hasRequirement(player, "Lunar Diplomacy"))
return true;
}
player.getPulseManager().run(new RuneCraftPulse(player, null, a, false, null));
break;
case "locate":
final Talisman talisman = Talisman.forItem(((Item) node));
@@ -5,12 +5,14 @@ import core.game.node.entity.player.Player
import core.game.node.entity.player.link.SpellBookManager
import core.game.node.entity.player.link.TeleportManager
import content.global.skill.runecrafting.Altar
import core.game.world.map.Location
import core.game.world.map.zone.impl.DarkZone
import core.plugin.Initializable
import core.game.world.GameWorld
import content.global.skill.farming.*
import core.api.getAttribute
import core.api.sendDialogue
import core.api.hasRequirement
enum class SkillcapePerks(val attribute: String, val effect: ((Player) -> Unit)? = null) {
BAREFISTED_SMITHING("cape_perks:barefisted-smithing"),
@@ -184,12 +186,20 @@ enum class SkillcapePerks(val attribute: String, val effect: ((Player) -> Unit)?
else -> null
}
end()
if(spellbook != null){
if (spellbook == SpellBookManager.SpellBook.ANCIENT) {
if (!hasRequirement(player, "Desert Treasure"))
return true
}
else if (spellbook == SpellBookManager.SpellBook.LUNAR) {
if (!hasRequirement(player, "Lunar Diplomacy"))
return true
}
player.spellBookManager.setSpellBook(spellbook)
player.interfaceManager.openTab(Component(spellbook.interfaceId))
player.incrementAttribute("/save:cape_perks:librarian-magus-charges",-1)
}
end()
return true
}
@@ -244,7 +254,16 @@ enum class SkillcapePerks(val attribute: String, val effect: ((Player) -> Unit)?
fun sendAltar(player: Player,altar: Altar){
end()
player.teleporter.send(altar.ruin.end,TeleportManager.TeleportType.TELE_OTHER)
if (altar == Altar.DEATH && !hasRequirement(player, "Mourning's End Part II"))
return
else if (altar == Altar.ASTRAL && !hasRequirement(player, "Lunar Diplomacy"))
return
else if (altar == Altar.BLOOD && !hasRequirement(player, "Legacy of Seergaze"))
return
var endLoc = if (altar == Altar.ASTRAL) Location.create(2151, 3864, 0) else altar.ruin.end
player.teleporter.send(endLoc, TeleportManager.TeleportType.TELE_OTHER)
player.incrementAttribute("/save:cape_perks:abyssal_warp",-1)
}
@@ -242,7 +242,7 @@ public enum Master {
new Task(Tasks.SPIRTUAL_RANGERS,2),
new Task(Tasks.SPIRTUAL_WARRIORS,2),
new Task(Tasks.STEEL_DRAGONS,7),
//new Task(Tasks.SUQAHS,8),
new Task(Tasks.SUQAHS,8),
new Task(Tasks.TROLLS,6),
new Task(Tasks.TZHAAR, 10),
new Task(Tasks.VAMPIRES,8),
@@ -306,4 +306,4 @@ public enum Master {
this.weight = weight;
}
}
}
}
@@ -11,6 +11,8 @@ import core.game.world.map.Location;
import core.plugin.Initializable;
import core.plugin.Plugin;
import static core.api.ContentAPIKt.hasRequirement;
/**
* Handles related slayer nodes.
* @author Vexia
@@ -61,6 +63,8 @@ public class SlayerPlugin extends OptionHandler {
player.teleport(new Location(2729, 3733, 0));
break;
case 15767:
if (!hasRequirement(player, "Cabin Fever"))
return true;
player.teleport(new Location(3748, 9373, 0));
break;
case 15811:
@@ -16,6 +16,8 @@ import core.plugin.Initializable;
import core.plugin.Plugin;
import core.plugin.ClassScanner;
import static core.api.ContentAPIKt.hasRequirement;
/**
* Handles the slayer reward interface plugin.
* @author Vexia
@@ -307,6 +309,8 @@ public class SlayerRewardPlugin extends ComponentPlugin {
@Override
public boolean handle(Player player, Node node, String option) {
if (!hasRequirement(player, "Smoking Kills"))
return true;
openTab(player, BUY);
return true;
}
@@ -31,7 +31,7 @@ object SlayerUtils {
fun canBeAssigned(player: Player, task: Tasks): Boolean
{
return player.getSkills().getLevel(Skills.SLAYER) >= task.levelReq && !SlayerManager.getInstance(player).flags.removed.contains(task)
return player.getSkills().getLevel(Skills.SLAYER) >= task.levelReq && !SlayerManager.getInstance(player).flags.removed.contains(task) && task.hasQuestRequirements(player)
}
fun assign(player: Player, task: Tasks, master: Master)
@@ -56,4 +56,4 @@ object SlayerUtils {
.spellBook == SpellBook.MODERN.interfaceId
)
}
}
}
@@ -5,6 +5,9 @@ import core.cache.def.impl.NPCDefinition;
import java.util.Arrays;
import java.util.HashMap;
import core.game.node.entity.player.Player;
import static core.api.ContentAPIKt.hasRequirement;
/**
* A non-garbage way of representing tasks
@@ -29,7 +32,7 @@ public enum Tasks {
CATABLEPONS(35, new int[] { 4397, 4398, 4399, }, new String[] { "They use the magic spell Weaken to drain up to 15% of their", "opponent's maximum Strength level." }, 1, false, false),
CAVE_BUG(1, new int[] { 1832, 5750, }, new String[] { "It regenerates life points quickly and seems to be a good", "herblore monster." }, 7, false, false),
CAVE_CRAWLERS(10, new int[] { 1600, 1601, 1602, 1603, }, new String[] { "The poisonous parts of them are presumably removed." }, 10, false, false),
CAVE_HORRORS(85, new int[] { 4353, 4354, 4355, 4356, 4357, }, new String[] { "A Cave horror wears a creepy mask, it is", "prefered to wear a witchwood icon." }, 58, false, false),
CAVE_HORRORS(85, new int[] { 4353, 4354, 4355, 4356, 4357, }, new String[] { "A Cave horror wears a creepy mask, it is", "prefered to wear a witchwood icon." }, 58, "Cabin Fever"),
CAVE_SLIMES(15, new int[] { 1831 }, new String[] { "These are lesser versions of jellies, watch out they can poison you." }, 17, false, false),
COCKATRICES(25, new int[] { 1620, 1621, 4227, }, new String[] { "A Mirror shield is necessary when fighting these monsters." }, 25, false, false),
COWS(5, new int[] { 1766, 1768, 2310, 81, 397, 955, 1767, 3309 }, new String[] { "Cow's may seem stupid, however they know more then", "you think. Don't under estimate them." }, 1, false, false),
@@ -88,6 +91,7 @@ public enum Tasks {
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, }, new String[] { "Trolls have a crushing attack, it's bets to wear a high crushing defence." }, 1, false, false),
TUROTHS(60, new int[] { 1626, 1627, 1628, 1629, 1630 }, new String[] { "Turoths are Slayer monsters that require a Slayer level of 55 to kill" }, 55, false, false),
TZHAAR(45, new int[] { 2591, 2592, 2593, 2745, 2594, 2595, 2596, 2597, 2604, 2605, 2606, 2607, 2608, 2609, 7755, 7753, 2598, 2599, 2600, 2601, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2624, 2617, 2618, 2625, 2602, 2603, 7754, 7767, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2624, 2625, 2627, 2628, 2629, 2630, 2631, 2632, 7746, 7747, 7748, 7749, 7750, 7751, 7752, 7753, 7754, 7755, 7756, 7757, 7758, 7759, 7760, 7761, 7762, 7763, 7764, 7765, 7766, 7767, 7768, 7769, 7770, 7771, 7747, 7747, 7748, 7749, 7750, 7751, 7752, 7753, 7757, 7765, 7769, 7768 }, new String[] { "Young Tzhaar's of the century are furious with your kind." }, 1, false, false),
SUQAHS (65, new int[] { 4527, 4528, 4529, 4530, 4531, 4532, 4533 }, new String[] { "Suquah are big, angry folk that inhabit Lunar Isle." }, 1, "Lunar Diplomacy"),
VAMPIRES(35, new int[] { 1023, 1220, 1223, 1225, 6214 }, new String[] { "Vampies arr equiped with large fangs", "they can do serious damage." }, 1, false, false),
WATERFIENDS(75, new int[] { 5361 }, new String[] { "A waterfiend takes no damage from fire!" }, 1, false, false),
WEREWOLFS(60, new int[] { 1665, 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[] { "There temper is alot more nasty then a regular wolf!" }, 1, false, false),
@@ -111,9 +115,10 @@ public enum Tasks {
public final int combatCheck;
public final String[] info;
public final int[] ids;
public final boolean undead;
public final boolean dragon;
public boolean undead = false;
public boolean dragon = false;
public int amtHash;
public String questReq = "";
Tasks(int combatCheck, int[] ids, String[] info, int levelReq, boolean undead, boolean dragon){
this.levelReq = levelReq;
this.ids = ids;
@@ -133,6 +138,14 @@ public enum Tasks {
this.combatCheck = combatCheck;
}
Tasks (int combatCheck, int[] ids, String[] info, int levelReq, String questReq) {
this.combatCheck = combatCheck;
this.ids = ids;
this.info = info;
this.levelReq = levelReq;
this.questReq = questReq;
}
public int[] getNpcs(){
return ids;
}
@@ -141,6 +154,10 @@ public enum Tasks {
return info;
}
public boolean hasQuestRequirements (Player player) {
return questReq.equals("") || hasRequirement(player, questReq, false);
}
public static Tasks forId(int id){
return taskMap.get(id);
}