Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add runes, Falador/Ardougne to TeleportCollections #1881

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 48 additions & 5 deletions src/main/java/com/questhelper/collections/TeleportCollections.java
Original file line number Diff line number Diff line change
@@ -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);
Expand All @@ -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();
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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<ItemRequirement> getItemRecommended() {
return Arrays.asList(varrockTeleport, ardougneTeleport, faladorTeleport);
}

@Override
public List<PanelDetails> getPanels()
{
Expand Down