From 6e02c5a28cdde8e4f3bff571ec4c342ee5ad8d3b Mon Sep 17 00:00:00 2001 From: Blake <23241364+blakephillips@users.noreply.github.com> Date: Mon, 2 Dec 2024 19:24:32 -0500 Subject: [PATCH 1/2] Add runes, Falador/Ardougne to TeleportCollections --- .../collections/TeleportCollections.java | 53 +++++++++++++++++-- 1 file changed, 48 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/questhelper/collections/TeleportCollections.java b/src/main/java/com/questhelper/collections/TeleportCollections.java index 6a6c6483ae..31045b0653 100644 --- a/src/main/java/com/questhelper/collections/TeleportCollections.java +++ b/src/main/java/com/questhelper/collections/TeleportCollections.java @@ -1,13 +1,16 @@ package com.questhelper.collections; +import com.questhelper.requirements.item.ItemRequirement; +import com.questhelper.requirements.item.ItemRequirements; import com.questhelper.requirements.item.TeleportItemRequirement; +import com.questhelper.requirements.util.LogicType; import net.runelite.api.ItemID; public enum TeleportCollections { BURTHORPE_TELEPORT() { - public TeleportItemRequirement getItemRequirement() + public ItemRequirement getItemRequirement() { TeleportItemRequirement burthTele = new TeleportItemRequirement("Teleport to Burthorpe. Games necklace (Burthorpe [1]), minigame teleport (Burthorpe Games Room)", ItemCollections.GAMES_NECKLACES); @@ -16,24 +19,64 @@ public TeleportItemRequirement getItemRequirement() }, VARROCK_TELEPORT() { - public TeleportItemRequirement getItemRequirement() + public ItemRequirement getItemRequirement() { TeleportItemRequirement varrockTele = new TeleportItemRequirement("Teleport to Varrock. Varrock teleport tablet/spell, Chronicle, Ring of Wealth (Grand Exchange [2])", ItemID.VARROCK_TELEPORT); varrockTele.addAlternates(ItemID.CHRONICLE); varrockTele.addAlternates(ItemCollections.RING_OF_WEALTHS); - return varrockTele; + + ItemRequirement varrockRunes = new ItemRequirements("Varrock teleport runes", + new ItemRequirement("Law rune", ItemID.LAW_RUNE, 1), + new ItemRequirement("Air rune", ItemID.AIR_RUNE, 3), + new ItemRequirement("Water rune", ItemID.WATER_RUNE, 1) + ); + return new ItemRequirements(LogicType.OR, "Teleport to Varrock. Varrock teleport tablet/spell, Chronicle, Ring of Wealth (Grand Exchange [2])", + varrockTele, varrockRunes); } }, SOPHANEM_TELEPORT() { - public TeleportItemRequirement getItemRequirement() + public ItemRequirement getItemRequirement() { TeleportItemRequirement sophTele = new TeleportItemRequirement("Teleport to Sophanem. Pharaoh's sceptre (Jalsavrah [1])", ItemCollections.PHAROAH_SCEPTRE); return sophTele; } + }, + ARDOUGNE_TELEPORT() + { + @Override + public ItemRequirement getItemRequirement() + { + TeleportItemRequirement ardougneTele = new TeleportItemRequirement("Teleport to Ardougne. Ardougne cloak, Ardougne teleport tablet/spell", + ItemCollections.ARDY_CLOAKS); + ardougneTele.addAlternates(ItemID.ARDOUGNE_TELEPORT); + + ItemRequirement ardougneRunes = new ItemRequirements("Ardougne teleport runes", + new ItemRequirement("Law rune", ItemID.LAW_RUNE, 2), + new ItemRequirement("Water rune", ItemID.WATER_RUNE, 2) + ); + return new ItemRequirements(LogicType.OR, "Teleport to Ardougne. Ardougne cloak, Ardougne teleport tablet/spell", ardougneTele, ardougneRunes); + } + }, + FALADOR_TELEPORT() + { + @Override + public ItemRequirement getItemRequirement() + { + TeleportItemRequirement faladorTele = new TeleportItemRequirement("Teleport to Falador. Falador teleport tablet/spell", + ItemID.FALADOR_TELEPORT); + + ItemRequirement faladorRunes = new ItemRequirements("Falador teleport runes", + new ItemRequirement("Law rune", ItemID.LAW_RUNE, 1), + new ItemRequirement("Air rune", ItemID.AIR_RUNE, 3), + new ItemRequirement("Water rune", ItemID.WATER_RUNE, 1) + ); + + return new ItemRequirements(LogicType.OR, "Teleport to Falador. Falador teleport tablet/spell", faladorTele, faladorRunes); + } }; - public abstract TeleportItemRequirement getItemRequirement(); + public abstract ItemRequirement getItemRequirement(); } From ebfaab30f383cca1fae27d26a4768aa763236967 Mon Sep 17 00:00:00 2001 From: Blake <23241364+blakephillips@users.noreply.github.com> Date: Tue, 3 Dec 2024 18:54:53 -0500 Subject: [PATCH 2/2] Add modified teleportCollections requirements to BikeShedder --- .../playerquests/bikeshedder/BikeShedder.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/java/com/questhelper/playerquests/bikeshedder/BikeShedder.java b/src/main/java/com/questhelper/playerquests/bikeshedder/BikeShedder.java index f4dcbbecd7..7b65760151 100644 --- a/src/main/java/com/questhelper/playerquests/bikeshedder/BikeShedder.java +++ b/src/main/java/com/questhelper/playerquests/bikeshedder/BikeShedder.java @@ -26,6 +26,7 @@ import com.google.common.collect.ImmutableMap; import com.questhelper.collections.ItemCollections; +import com.questhelper.collections.TeleportCollections; import com.questhelper.panel.PanelDetails; import com.questhelper.questhelpers.BasicQuestHelper; import com.questhelper.requirements.item.ItemRequirement; @@ -47,6 +48,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.widgets.ComponentID; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Map; import static com.questhelper.requirements.util.LogicHelper.or; @@ -65,6 +67,10 @@ public class BikeShedder extends BasicQuestHelper private ObjectStep useCoinOnBush; private ObjectStep useManyCoinsOnBush; + private ItemRequirement varrockTeleport; + private ItemRequirement ardougneTeleport; + private ItemRequirement faladorTeleport; + private Zone conditionalRequirementZone; private ZoneRequirement conditionalRequirementZoneRequirement; private ZoneRequirement conditionalRequirementZoneSouthRequirement; @@ -116,6 +122,10 @@ protected void setupRequirements() useLogOnBush = new ObjectStep(this, NullObjectID.NULL_10778, new WorldPoint(3223, 3217, 0), "Use log on bush", anyLog); useLogOnBush.addIcon(ItemID.LOGS); + varrockTeleport = TeleportCollections.VARROCK_TELEPORT.getItemRequirement(); + ardougneTeleport = TeleportCollections.ARDOUGNE_TELEPORT.getItemRequirement(); + faladorTeleport = TeleportCollections.FALADOR_TELEPORT.getItemRequirement(); + oneCoin = new ItemRequirement("Coins", ItemCollections.COINS, 1); oneCoin.setHighlightInInventory(true); useCoinOnBush = new ObjectStep(this, NullObjectID.NULL_10778, new WorldPoint(3223, 3217, 0), "Use coins on the bush.", oneCoin); @@ -154,6 +164,11 @@ protected void setupRequirements() goDownstairsInSunrisePalace = new ObjectStep(getQuest().getQuestHelper(), ObjectID.STAIRCASE_52627, new WorldPoint(1690, 3164, 1), "Climb downstairs, ensure stairs are well highlighted!"); } + @Override + public List getItemRecommended() { + return Arrays.asList(varrockTeleport, ardougneTeleport, faladorTeleport); + } + @Override public List getPanels() {