diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/quest/MQuestScript.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/quest/MQuestScript.java index f13a80f1c42..b8906da11a2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/quest/MQuestScript.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/quest/MQuestScript.java @@ -239,7 +239,7 @@ private boolean handleRequirements(DetailedQuestStep questStep) { if (requirement instanceof ItemRequirement) { var itemRequirement = (ItemRequirement) requirement; - if (itemRequirement.isEquip() && Rs2Inventory.contains(itemRequirement.getAllIds().stream().mapToInt(i -> i).toArray()) + if (itemRequirement.mustBeEquipped() && Rs2Inventory.contains(itemRequirement.getAllIds().stream().mapToInt(i -> i).toArray()) && itemRequirement.getAllIds().stream().noneMatch(Rs2Equipment::isWearing)) { Rs2Inventory.wear(itemRequirement.getAllIds().stream().filter(Rs2Inventory::contains).findFirst().orElse(-1)); return true; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/QuestHelperConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/QuestHelperConfig.java index 2277d5fad83..9047d7866fa 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/QuestHelperConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/QuestHelperConfig.java @@ -534,6 +534,17 @@ default boolean showWidgetHints() ) default boolean solvePuzzles() { return true; } + @ConfigItem( + keyName = "showWorldMapPoint", + name = "Display world map point", + description = "Choose whether the arrow & icon of your current step should be visible on the world map.
Changing this will take effect next time your quest step updates.", + section = hintsSection + ) + default boolean showWorldMapPoint() + { + return true; + } + @ConfigItem( keyName = "useShortestPath", name = "Use 'Shortest Path' plugin", @@ -681,4 +692,24 @@ default boolean showCompletedQuests() { return false; } + + @ConfigSection( + position = 5, + name = "Development", + description = "Options that configure the quest helper development experience", + closedByDefault = true + ) + String developmentSection = "developmentSection"; + + @ConfigItem( + keyName = "devShowOverlayOnLaunch", + name = "Show overlay on launch", + description = "Show the dev overlay (::questhelperdebug) on launch", + position = 4, + section = developmentSection + ) + default boolean devShowOverlayOnLaunch() + { + return false; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/QuestHelperPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/QuestHelperPlugin.java index 349bc76f559..0525afce86a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/QuestHelperPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/QuestHelperPlugin.java @@ -46,11 +46,9 @@ import lombok.Getter; import lombok.extern.slf4j.Slf4j; import net.runelite.api.*; -import net.runelite.api.annotations.Varbit; import net.runelite.api.events.*; import net.runelite.api.gameval.InventoryID; -import net.runelite.api.gameval.ItemID; -import net.runelite.api.gameval.VarbitID; +import net.runelite.api.gameval.VarPlayerID; import net.runelite.client.RuneLite; import net.runelite.client.callback.ClientThread; import net.runelite.client.chat.ChatMessageManager; @@ -69,8 +67,8 @@ import net.runelite.client.ui.NavigationButton; import net.runelite.client.ui.components.colorpicker.ColorPickerManager; import net.runelite.client.util.Text; -import org.apache.commons.lang3.ArrayUtils; +import javax.annotation.Nullable; import javax.inject.Inject; import javax.inject.Named; import javax.swing.*; @@ -198,6 +196,14 @@ protected void startUp() throws IOException questOverlayManager.startUp(); + if (developerMode) + { + if (config.devShowOverlayOnLaunch()) + { + questOverlayManager.addDebugOverlay(); + } + } + final BufferedImage icon = Icon.QUEST_ICON.getImage(); panel = new QuestHelperPanel(this, questManager, configManager); @@ -229,6 +235,11 @@ protected void shutDown() eventBus.unregister(playerStateManager); eventBus.unregister(runeliteObjectManager); eventBus.unregister(worldMapAreaManager); + if (developerMode) + { + // We don't check if it was added, since removing an unadded overlay is a no-op + questOverlayManager.removeDebugOverlay(); + } questOverlayManager.shutDown(); playerStateManager.shutDown(); @@ -333,7 +344,7 @@ public void onVarbitChanged(VarbitChanged event) } if (client.getWorldType().contains(WorldType.QUEST_SPEEDRUNNING) - && event.getVarpId() == VarPlayer.IN_RAID_PARTY + && event.getVarpId() == VarPlayerID.RAIDS_PARTY_GROUPHOLDER && event.getValue() == 0 && client.getGameState() == GameState.LOGGED_IN) { @@ -409,6 +420,18 @@ public void onConfigChanged(ConfigChanged event) questManager.getSelectedQuest().setSidebarOrder(loadSidebarOrder(questManager.getSelectedQuest())); } } + + if (developerMode && "devShowOverlayOnLaunch".equals(event.getKey())) + { + if (config.devShowOverlayOnLaunch()) + { + questOverlayManager.addDebugOverlay(); + } + else + { + questOverlayManager.removeDebugOverlay(); + } + } } @Subscribe @@ -462,7 +485,7 @@ public List getPluginBankTagItemsForSections() return questBankManager.getBankTagService().getPluginBankTagItemsForSections(false); } - public QuestHelper getSelectedQuest() + public @Nullable QuestHelper getSelectedQuest() { return questManager.getSelectedQuest(); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/bank/banktab/QuestBankTab.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/bank/banktab/QuestBankTab.java index 1f4070c052b..0ebd16abf5c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/bank/banktab/QuestBankTab.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/bank/banktab/QuestBankTab.java @@ -37,6 +37,8 @@ import net.runelite.api.gameval.InterfaceID; import net.runelite.api.gameval.InventoryID; import net.runelite.api.gameval.ItemID; +import net.runelite.api.gameval.SpriteID; +import net.runelite.api.gameval.VarClientID; import net.runelite.api.gameval.VarbitID; import net.runelite.api.widgets.ItemQuantityMode; import net.runelite.api.widgets.JavaScriptCallback; @@ -154,7 +156,7 @@ public void refreshBankTab() @Subscribe public void onGrandExchangeSearched(GrandExchangeSearched event) { - final String input = client.getVarcStrValue(VarClientStr.INPUT_TEXT); + final String input = client.getVarcStrValue(VarClientID.MESLAYERINPUT); String QUEST_BANK_TAG = "quest-helper"; if (!input.equals(QUEST_BANK_TAG) || questHelper.getSelectedQuest() == null) @@ -400,7 +402,7 @@ private void sortBankTabItems(Widget itemContainer, Widget[] containerChildren, List itemList = new ArrayList<>(); for (Widget itemWidget : containerChildren) { - if (itemWidget.getSpriteId() == SpriteID.RESIZEABLE_MODE_SIDE_PANEL_BACKGROUND + if (itemWidget.getSpriteId() == SpriteID.TRADEBACKING_DARK || itemWidget.getText().contains("Tab")) { itemWidget.setHidden(true); @@ -508,7 +510,7 @@ private void hideBankWidgets(Widget itemContainer, Widget[] containerChildren) // ~bankmain_drawitem uses 6512 for empty item slots if (!widget.isSelfHidden() && (widget.getItemId() > -1 && widget.getItemId() != ItemID.BLANKOBJECT) || - (widget.getSpriteId() == SpriteID.RESIZEABLE_MODE_SIDE_PANEL_BACKGROUND || widget.getText().contains("Tab")) + (widget.getSpriteId() == SpriteID.TRADEBACKING_DARK || widget.getText().contains("Tab")) ) { widget.setHidden(true); @@ -757,7 +759,7 @@ private int addSubSectionHeader(Widget itemContainer, String title, int totalSec private int addSectionHeader(Widget itemContainer, String title, int totalSectionsHeight) { - addedWidgets.add(createGraphic(itemContainer, SpriteID.RESIZEABLE_MODE_SIDE_PANEL_BACKGROUND, ITEM_ROW_START, totalSectionsHeight)); + addedWidgets.add(createGraphic(itemContainer, SpriteID.TRADEBACKING_DARK, ITEM_ROW_START, totalSectionsHeight)); addedWidgets.add(createText(itemContainer, title, new Color(228, 216, 162).getRGB(), (ITEMS_PER_ROW * ITEM_HORIZONTAL_SPACING) + ITEM_ROW_START , TEXT_HEIGHT, ITEM_ROW_START, totalSectionsHeight + LINE_VERTICAL_SPACING)); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/bank/banktab/QuestBankTabInterface.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/bank/banktab/QuestBankTabInterface.java index 08a3d147d3a..32e6be9e82d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/bank/banktab/QuestBankTabInterface.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/bank/banktab/QuestBankTabInterface.java @@ -31,6 +31,8 @@ import net.runelite.api.*; import net.runelite.api.events.MenuOptionClicked; import net.runelite.api.gameval.InterfaceID; +import net.runelite.api.gameval.SpriteID; +import net.runelite.api.gameval.VarClientID; import net.runelite.api.gameval.VarbitID; import net.runelite.api.widgets.JavaScriptCallback; import net.runelite.api.widgets.Widget; @@ -83,13 +85,13 @@ public void init() int QUEST_BUTTON_SIZE = 25; int QUEST_BUTTON_X = 408; int QUEST_BUTTON_Y = 5; - questBackgroundWidget = createGraphic("quest-helper", SpriteID.UNKNOWN_BUTTON_SQUARE_SMALL, QUEST_BUTTON_SIZE, + questBackgroundWidget = createGraphic("quest-helper", SpriteID.Miscgraphics3.UNKNOWN_BUTTON_SQUARE_SMALL, QUEST_BUTTON_SIZE, QUEST_BUTTON_SIZE, QUEST_BUTTON_X, QUEST_BUTTON_Y); questBackgroundWidget.setAction(1, VIEW_TAB); questBackgroundWidget.setOnOpListener((JavaScriptCallback) this::handleTagTab); - questIconWidget = createGraphic("", SpriteID.QUESTS_PAGE_ICON_BLUE_QUESTS, QUEST_BUTTON_SIZE - 6, + questIconWidget = createGraphic("", SpriteID.AchievementDiaryIcons.BLUE_QUESTS, QUEST_BUTTON_SIZE - 6, QUEST_BUTTON_SIZE - 6, QUEST_BUTTON_X + 3, QUEST_BUTTON_Y + 3); @@ -148,8 +150,8 @@ public void handleSearch() closeTab(); // This ensures that when clicking Search when tab is selected, the search input is opened rather // than client trying to close it first - client.setVarcStrValue(VarClientStr.INPUT_TEXT, ""); - client.setVarcIntValue(VarClientInt.INPUT_TYPE, 0); + client.setVarcStrValue(VarClientID.MESLAYERINPUT, ""); + client.setVarcIntValue(VarClientID.MESLAYERMODE, 0); } } @@ -186,7 +188,7 @@ public void closeTab() questTabActive = false; if (questBackgroundWidget != null) { - questBackgroundWidget.setSpriteId(SpriteID.UNKNOWN_BUTTON_SQUARE_SMALL); + questBackgroundWidget.setSpriteId(SpriteID.Miscgraphics3.UNKNOWN_BUTTON_SQUARE_SMALL); questBackgroundWidget.revalidate(); } } @@ -210,7 +212,7 @@ public void refreshTab() if (searchButtonBackground != null) { searchButtonBackground.setOnTimerListener((Object[]) null); - searchButtonBackground.setSpriteId(SpriteID.EQUIPMENT_SLOT_TILE); + searchButtonBackground.setSpriteId(SpriteID.Miscgraphics.EQUIPMENT_SLOT_TILE); } } @@ -228,7 +230,7 @@ private void activateTab(boolean wasInPotionStorage) client.menuAction(-1, InterfaceID.Bankmain.POTIONSTORE_BUTTON, MenuAction.CC_OP, 1, -1, "Potion store", ""); } - questBackgroundWidget.setSpriteId(SpriteID.UNKNOWN_BUTTON_SQUARE_SMALL_SELECTED); + questBackgroundWidget.setSpriteId(SpriteID.Miscgraphics3.UNKNOWN_BUTTON_SQUARE_SMALL_SELECTED); questBackgroundWidget.revalidate(); questTabActive = true; @@ -242,7 +244,7 @@ private void activateTab(boolean wasInPotionStorage) if (searchButtonBackground != null) { searchButtonBackground.setOnTimerListener((Object[]) null); - searchButtonBackground.setSpriteId(SpriteID.EQUIPMENT_SLOT_TILE); + searchButtonBackground.setSpriteId(SpriteID.Miscgraphics.EQUIPMENT_SLOT_TILE); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/bank/banktab/QuestGrandExchangeInterface.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/bank/banktab/QuestGrandExchangeInterface.java index 6f2e9a7cd88..abeefb059c0 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/bank/banktab/QuestGrandExchangeInterface.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/bank/banktab/QuestGrandExchangeInterface.java @@ -31,6 +31,8 @@ import lombok.Setter; import net.runelite.api.*; import net.runelite.api.gameval.InterfaceID; +import net.runelite.api.gameval.SpriteID; +import net.runelite.api.gameval.VarClientID; import net.runelite.api.widgets.JavaScriptCallback; import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.WidgetType; @@ -83,14 +85,14 @@ public void init() int QUEST_BUTTON_SIZE = 20; int QUEST_BUTTON_X = 480; int QUEST_BUTTON_Y = 0; - questBackgroundWidget = createGraphic("quest helper", SpriteID.UNKNOWN_BUTTON_SQUARE_SMALL, + questBackgroundWidget = createGraphic("quest helper", SpriteID.Miscgraphics3.UNKNOWN_BUTTON_SQUARE_SMALL, QUEST_BUTTON_SIZE, QUEST_BUTTON_SIZE, QUEST_BUTTON_X, QUEST_BUTTON_Y); questBackgroundWidget.setAction(1, VIEW_TAB); questBackgroundWidget.setOnOpListener((JavaScriptCallback) this::handleTagTab); - questIconWidget = createGraphic("", SpriteID.QUESTS_PAGE_ICON_BLUE_QUESTS, QUEST_BUTTON_SIZE - 6, + questIconWidget = createGraphic("", SpriteID.AchievementDiaryIcons.BLUE_QUESTS, QUEST_BUTTON_SIZE - 6, QUEST_BUTTON_SIZE - 6, QUEST_BUTTON_X + 3, QUEST_BUTTON_Y + 3); @@ -154,14 +156,14 @@ public void closeOptions() active = false; if (questBackgroundWidget != null) { - questBackgroundWidget.setSpriteId(SpriteID.UNKNOWN_BUTTON_SQUARE_SMALL); + questBackgroundWidget.setSpriteId(SpriteID.Miscgraphics3.UNKNOWN_BUTTON_SQUARE_SMALL); questBackgroundWidget.revalidate(); } grandExchangeTitle.setHidden(true); - client.setVarcStrValue(VarClientStr.INPUT_TEXT, ""); - client.setVarcIntValue(VarClientInt.INPUT_TYPE, 14); + client.setVarcStrValue(VarClientID.MESLAYERINPUT, ""); + client.setVarcIntValue(VarClientID.MESLAYERMODE, 14); clientThread.invokeLater(() -> updateSearchInterface(false)); } @@ -173,12 +175,12 @@ private void activateTab() return; } - questBackgroundWidget.setSpriteId(SpriteID.UNKNOWN_BUTTON_SQUARE_SMALL_SELECTED); + questBackgroundWidget.setSpriteId(SpriteID.Miscgraphics3.UNKNOWN_BUTTON_SQUARE_SMALL_SELECTED); questBackgroundWidget.revalidate(); grandExchangeTitle.setHidden(false); active = true; - client.setVarcStrValue(VarClientStr.INPUT_TEXT, "quest-helper"); - client.setVarcIntValue(VarClientInt.INPUT_TYPE, 14); + client.setVarcStrValue(VarClientID.MESLAYERINPUT, "quest-helper"); + client.setVarcIntValue(VarClientID.MESLAYERMODE, 14); clientThread.invokeLater(() -> updateSearchInterface(true)); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/collections/ItemCollections.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/collections/ItemCollections.java index 300131a53c1..07007445b54 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/collections/ItemCollections.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/collections/ItemCollections.java @@ -170,6 +170,7 @@ public enum ItemCollections SAW("Saw", ImmutableList.of( ItemID.POH_SAW, ItemID.WEARABLE_SAW, + ItemID.WEARABLE_SAW_OFFHAND, ItemID.EYEGLO_CRYSTAL_SAW )), @@ -485,7 +486,14 @@ public enum ItemCollections ItemID._4DOSEPRAYERRESTORE, ItemID._3DOSEPRAYERRESTORE, ItemID._2DOSEPRAYERRESTORE, - ItemID._1DOSEPRAYERRESTORE + ItemID._1DOSEPRAYERRESTORE, + ItemID._4DOSE2RESTORE, + ItemID._3DOSE2RESTORE, + ItemID._2DOSE2RESTORE, + ItemID._1DOSE2RESTORE, + ItemID.HUNTER_MIX_MOONMOTH_2DOSE, + ItemID.HUNTER_MIX_MOONMOTH_1DOSE, + ItemID.BUTTERFLY_JAR_MOONMOTH )), RESTORE_POTIONS(ImmutableList.of( @@ -1218,17 +1226,16 @@ public enum ItemCollections ItemID.DRAMEN_STAFF )), - ESSENCE_LOW(ImmutableList.of( - ItemID.BLANKRUNE_DAEYALT, - ItemID.BLANKRUNE_HIGH, - ItemID.BLANKRUNE - )), - ESSENCE_HIGH(ImmutableList.of( ItemID.BLANKRUNE_DAEYALT, ItemID.BLANKRUNE_HIGH )), + ESSENCE_LOW(new ImmutableList.Builder() + .addAll(ESSENCE_HIGH.items).add( + ItemID.BLANKRUNE).build() + ), + COINS(ImmutableList.of( ItemID.COINS, ItemID.MAGICTRAINING_COINS, diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/ardougne/ArdougneHard.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/ardougne/ArdougneHard.java index 25ef4b36aaa..d08ea96525e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/ardougne/ArdougneHard.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/ardougne/ArdougneHard.java @@ -129,13 +129,13 @@ public QuestStep loadStep() doHard.addStep(notDragSquare, dragSquareTask); deathRuneTask = new ConditionalStep(this, enterMournerHQ); - deathRuneTask.addStep(inMournerHQ, enterMournerBasement); + deathRuneTask.addStep(new Conditions(redAtAltar, inDeath02), deathAltar); + deathRuneTask.addStep(new Conditions(redAtDoor, inDeath02), turnKeyMirror); + deathRuneTask.addStep(new Conditions(inDeath), deathRune); deathRuneTask.addStep(inDeath0, deathMoveUp1); + deathRuneTask.addStep(inDeath12, deathMoveDown0); deathRuneTask.addStep(inDeath1, deathMoveUp2); deathRuneTask.addStep(inDeath2, deathMoveDown1); - deathRuneTask.addStep(inDeath12, deathMoveDown0); - deathRuneTask.addStep(new Conditions(redAtDoor, inDeath02), turnKeyMirror); - deathRuneTask.addStep(new Conditions(redAtAltar, inDeath02), deathRune); doHard.addStep(notDeathRune, deathRuneTask); return doHard; @@ -158,9 +158,9 @@ protected void setupRequirements() notDeathRune = new VarplayerRequirement(VarPlayerID.ARDOUNGE_ACHIEVEMENT_DIARY2, false, 5); notYanHouse = new VarbitRequirement(VarbitID.POH_HOUSE_LOCATION, 6, Operation.NOT_EQUAL); - notYanHouse2 = new VarbitRequirement(2187, 6); - redAtDoor = new VarbitRequirement(1249, 1); - redAtAltar = new VarbitRequirement(1250, 1); + notYanHouse2 = new VarbitRequirement(VarbitID.POH_HOUSE_LOCATION, 6); + redAtDoor = new VarbitRequirement(VarbitID.MOURNING_LIGHT_TEMPLE_1_B_EAST, 1); + redAtAltar = new VarbitRequirement(VarbitID.MOURNING_LIGHT_TEMPLE_1_B_WEST, 1); earthRune = new ItemRequirement("Earth rune", ItemID.EARTHRUNE).showConditioned(notTPWatchtower); lawRune = new ItemRequirement("Law runes", ItemID.LAWRUNE).showConditioned(notTPWatchtower); @@ -184,16 +184,20 @@ protected void setupRequirements() crystalTrink = new ItemRequirement("Crystal Trinket", ItemID.MOURNING_CRYSTAL_TRINKET).showConditioned(notDeathRune).isNotConsumed(); highEss = new ItemRequirement("Pure or Daeyalt essence", ItemCollections.ESSENCE_HIGH) .showConditioned(notDeathRune); - newKey = new KeyringRequirement("New key", configManager, KeyringCollection.NEW_KEY).showConditioned(notDeathRune).isNotConsumed(); + + var hasCompletedSOTE = new QuestRequirement(QuestHelperQuest.SONG_OF_THE_ELVES, QuestState.FINISHED); + + newKey = new KeyringRequirement("New key", configManager, KeyringCollection.NEW_KEY).showConditioned(notDeathRune).isNotConsumed().hideConditioned(hasCompletedSOTE); newKey.setTooltip("Another can be found on the desk in the south-east room of the Mourner HQ basement."); - mournerBoots = new ItemRequirement("Mourner boots", ItemID.MOURNING_MOURNER_BOOTS).isNotConsumed(); - gasMask = new ItemRequirement("Gas mask", ItemID.GASMASK).isNotConsumed(); - mournerGloves = new ItemRequirement("Mourner gloves", ItemID.MOURNING_MOURNER_GLOVES).isNotConsumed(); - mournerCloak = new ItemRequirement("Mourner cloak", ItemID.MOURNING_MOURNER_CLOAK).isNotConsumed(); - mournerTop = new ItemRequirement("Mourner top", ItemID.MOURNING_MOURNER_TOP).isNotConsumed(); - mournerTrousers = new ItemRequirement("Mourner trousers", ItemID.MOURNING_MOURNER_LEGS).isNotConsumed(); + + mournerBoots = new ItemRequirement("Mourner boots", ItemID.MOURNING_MOURNER_BOOTS).isNotConsumed().hideConditioned(hasCompletedSOTE); + gasMask = new ItemRequirement("Gas mask", ItemID.GASMASK).isNotConsumed().hideConditioned(hasCompletedSOTE); + mournerGloves = new ItemRequirement("Mourner gloves", ItemID.MOURNING_MOURNER_GLOVES).isNotConsumed().hideConditioned(hasCompletedSOTE); + mournerCloak = new ItemRequirement("Mourner cloak", ItemID.MOURNING_MOURNER_CLOAK).isNotConsumed().hideConditioned(hasCompletedSOTE); + mournerTop = new ItemRequirement("Mourner top", ItemID.MOURNING_MOURNER_TOP).isNotConsumed().hideConditioned(hasCompletedSOTE); + mournerTrousers = new ItemRequirement("Mourner trousers", ItemID.MOURNING_MOURNER_LEGS).isNotConsumed().hideConditioned(hasCompletedSOTE); mournersOutfit = new ItemRequirements("Full mourners' outfit", gasMask, mournerTop, mournerTrousers, - mournerCloak, mournerBoots, mournerGloves).showConditioned(notDeathRune).isNotConsumed(); + mournerCloak, mournerBoots, mournerGloves).showConditioned(notDeathRune).isNotConsumed().hideConditioned(hasCompletedSOTE); mournersOutfit.setTooltip("Another set can be obtained at the north entrance to Arandar."); rake = new ItemRequirement("Rake", ItemID.RAKE) .showConditioned(new Conditions(LogicType.OR, notPalmTree, notPoisonIvy)).isNotConsumed(); @@ -244,7 +248,7 @@ public void setupSteps() moveHouse = new NpcStep(this, NpcID.POH_ESTATE_AGENT, new WorldPoint(2638, 3293, 0), "Talk to an Estate agent and relocate your house to Yanille.", coins.quantity(25000)); moveHouse.addDialogStep("Can you move my house please?"); - yanPOH = new ObjectStep(this, 15482, new WorldPoint(2544, 3098, 0), + yanPOH = new ObjectStep(this, ObjectID.POH_YANILLE_PORTAL, new WorldPoint(2544, 3098, 0), "Enter your house from the portal in Yanille."); magicGuild = new ObjectStep(this, ObjectID.MAGICGUILD_DOOR_L, new WorldPoint(2584, 3088, 0), @@ -257,7 +261,7 @@ public void setupSteps() redSally = new ObjectStep(this, ObjectID.HUNTING_SAPLING_UP_RED, new WorldPoint(2474, 3239, 0), "Catch a Red Salamander.", true, rope, smallFishingNet); - recharge = new ObjectStep(this, 2638, new WorldPoint(2729, 3378, 0), + recharge = new ObjectStep(this, ObjectID.LG_TOTEM_POLE_LEGENDS, new WorldPoint(2729, 3378, 0), "Recharge some jewellery at the Totem pole in the Legends' Guild.", rechargableJewelry); monkeyCage = new NpcStep(this, NpcID.MM_MONKEY_MINDER, new WorldPoint(2607, 3277, 0), @@ -287,19 +291,19 @@ public void setupSteps() "Go down to the ground floor.", deathAccess, highEss, crystalTrink); turnKeyMirror = new ObjectStep(this, ObjectID.MOURNING_TEMPLE_PILLAR_1_B, new WorldPoint(1881, 4639, 0), "Enter the central area, and turn the pillar's mirror west."); - deathAltar = new ObjectStep(this, 34823, new WorldPoint(1860, 4639, 0), - "Enter the Death altar.", deathAccess, highEss, crystalTrink); + deathAltar = new ObjectStep(this, ObjectID.DEATHTEMPLE_RUINED, new WorldPoint(1860, 4639, 0), + "Enter the Death altar.", deathAccess.highlighted(), highEss, crystalTrink); deathAltar.addIcon(ItemID.DEATH_TALISMAN); deathRune = new ObjectStep(this, ObjectID.DEATH_ALTAR, new WorldPoint(2205, 4836, 0), "Craft some death runes from essence." + "TURN THE MIDDLE PILLAR TO POINT BACK EAST OR YOU'LL HAVE TO RETURN VIA THE UNDERGROUND PASS.", highEss); - poisonIvy = new ObjectStep(this, 7580, new WorldPoint(2618, 3226, 0), + poisonIvy = new ObjectStep(this, ObjectID.FARMING_BUSH_PATCH_4, new WorldPoint(2618, 3226, 0), "Plant and harvest poison ivy in the Ardougne Monastery bush patch. " + "If you're waiting for it to grow and want to complete further tasks, use the tick box on panel.", rake, seedDib, poisonIvySeed); - palmTree = new ObjectStep(this, 7963, new WorldPoint(2490, 3180, 0), + palmTree = new ObjectStep(this, ObjectID.FARMING_FRUIT_TREE_PATCH_2, new WorldPoint(2490, 3180, 0), "Check the health of a palm tree near Tree Gnome Village. " + "If you're waiting for it to grow and want to complete further tasks, use the tick box on panel.", spade, rake, palmSap); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/ardougne/ArdougneMedium.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/ardougne/ArdougneMedium.java index 3cf16b27895..f7ceb5f6fd1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/ardougne/ArdougneMedium.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/ardougne/ArdougneMedium.java @@ -55,6 +55,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.gameval.VarPlayerID; import net.runelite.client.game.FishingSpot; @@ -163,8 +164,8 @@ protected void setupRequirements() notIbanUpgrade = new VarplayerRequirement(VarPlayerID.ARDOUNGE_ACHIEVEMENT_DIARY, false, 24); notNecroTower = new VarplayerRequirement(VarPlayerID.ARDOUNGE_ACHIEVEMENT_DIARY, false, 25); - notCWBallon = new VarbitRequirement(2869, 1); - notCWBallon2 = new VarbitRequirement(2869, 0); + notCWBallon = new VarbitRequirement(VarbitID.ZEP_MULTI_CAST, 1); + notCWBallon2 = new VarbitRequirement(VarbitID.ZEP_MULTI_CAST, 0); normalBook = new SpellbookRequirement(Spellbook.NORMAL); combatGear = new ItemRequirement("Combat gear", -1, -1).isNotConsumed(); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/desert/DesertEasy.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/desert/DesertEasy.java index 8d3ffe7d127..99af7a2e11e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/desert/DesertEasy.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/desert/DesertEasy.java @@ -217,24 +217,24 @@ public void setupSteps() "Kill a vulture.", true); killVulture.addAlternateNpcs(NpcID.RAG_VULTURE_FLYING); - moveToPyramidPlunder = new ObjectStep(this, 26622, new WorldPoint(3289, 2800, 0), + moveToPyramidPlunder = new ObjectStep(this, ObjectID.NTK_PYRAMID_DOOR_NORTH_MULTI, new WorldPoint(3289, 2800, 0), "Enter the Pyramid plunder minigame. If you don't see a Guardian mummy exit and try a different entrance."); startPyramidPlunder = new NpcStep(this, NpcID.NTK_MUMMY_GUARDIAN, new WorldPoint(1934, 4427, 3), "Talk to the guardian mummy to start the minigame. If you don't see a Guardian mummy exit and try a different entrance."); startPyramidPlunder.addDialogStep("I know what I'm doing - let's get on with it."); - openSarc = new ObjectStep(this, 26626, new WorldPoint(1928, 4465, 0), + openSarc = new ObjectStep(this, ObjectID.NTK_SARCOPHAGUS_MULTI, new WorldPoint(1928, 4465, 0), "Open the sarcophagus in the first room."); sellArtefact = new NpcStep(this, NpcID.AGILITY_PYRAMID_SIMON, new WorldPoint(3346, 2827, 0), "Talk to Simon Templeton and sell your artefact.", pyramidPlunderArtefact); sellArtefact.addDialogStep("Yes, show me the money."); - enterKalph = new ObjectStep(this, 3827, new WorldPoint(3228, 3109, 0), + enterKalph = new ObjectStep(this, ObjectID.KALPHITE_BURROW_ENTRANCE, new WorldPoint(3228, 3109, 0), "Use the rope on the entrance and enter the Kalphite Hive.", rope.highlighted()); enterKalph.addAlternateObjects(ObjectID.KALPHITE_BURROW_ENTRANCE_WITHROPE); enterKalph.addIcon(ItemID.ROPE); - enterKalphForCacti = new ObjectStep(this, 3827, new WorldPoint(3228, 3109, 0), + enterKalphForCacti = new ObjectStep(this, ObjectID.KALPHITE_BURROW_ENTRANCE, new WorldPoint(3228, 3109, 0), "Use the rope on the entrance and enter the Kalphite Hive.", rope.highlighted()); enterKalphForCacti.addAlternateObjects(ObjectID.KALPHITE_BURROW_ENTRANCE_WITHROPE); enterKalphForCacti.addIcon(ItemID.ROPE); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/desert/DesertElite.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/desert/DesertElite.java index ed674161ff4..5ad42c5b9e8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/desert/DesertElite.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/desert/DesertElite.java @@ -171,7 +171,7 @@ protected void setupZones() public void setupSteps() { - moveToPyramidPlunder = new ObjectStep(this, 26622, new WorldPoint(3289, 2800, 0), + moveToPyramidPlunder = new ObjectStep(this, ObjectID.NTK_PYRAMID_DOOR_NORTH_MULTI, new WorldPoint(3289, 2800, 0), "Enter the Pyramid plunder minigame. If you don't see a Guardian mummy exit and try a different " + "entrance.", true); ((ObjectStep) moveToPyramidPlunder).addAlternateObjects(ObjectID.NTK_PYRAMID_DOOR_EAST_MULTI, ObjectID.NTK_PYRAMID_DOOR_SOUTH_MULTI, @@ -180,7 +180,7 @@ public void setupSteps() "Talk to the guardian mummy to start the minigame."); startPyramidPlunder.addDialogStep("I know what I'm doing - let's get on with it."); - traversePyramid = new ObjectStep(this, 26618, new WorldPoint(1951, 4452, 0), + traversePyramid = new ObjectStep(this, ObjectID.NTK_TOMB_DOOR1, new WorldPoint(1951, 4452, 0), "Go through each of the pyramid rooms until the final room.", true); ((ObjectStep) traversePyramid).setMaxObjectDistance(40); ((ObjectStep) traversePyramid).setMaxRenderDistance(10); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/desert/DesertHard.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/desert/DesertHard.java index 014c79931c9..6e9c8b9b546 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/desert/DesertHard.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/desert/DesertHard.java @@ -201,11 +201,11 @@ protected void setupZones() public void setupSteps() { - moveToKalph = new ObjectStep(this, 3827, new WorldPoint(3228, 3109, 0), + moveToKalph = new ObjectStep(this, ObjectID.KALPHITE_BURROW_ENTRANCE, new WorldPoint(3228, 3109, 0), "Use the rope on the entrance and enter the Kalphite Hive.", rope.highlighted().quantity(2)); moveToKalph.addAlternateObjects(ObjectID.KALPHITE_BURROW_ENTRANCE_WITHROPE); moveToKalph.addIcon(ItemID.ROPE); - kalphQueen = new ObjectStep(this, 23609, new WorldPoint(3510, 9498, 2), + kalphQueen = new ObjectStep(this, ObjectID.KALPHITE_CHAMBER_ENTRANCE_UPDATE, new WorldPoint(3510, 9498, 2), "Climb down the tunnel entrance that leads to the Kalphite Queen and kill her.", rope); kalphQueen.addAlternateObjects(10230); kalphQueen.addIcon(ItemID.ROPE); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/desert/DesertMedium.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/desert/DesertMedium.java index 5a46f14e848..d2be4ac2f37 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/desert/DesertMedium.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/desert/DesertMedium.java @@ -208,7 +208,7 @@ protected void setupZones() public void setupSteps() { - moveToEagle = new ObjectStep(this, 19790, new WorldPoint(2329, 3495, 0), + moveToEagle = new ObjectStep(this, ObjectID.EAGLEPEAK_ENTRANCE_CAVE_MULTI, new WorldPoint(2329, 3495, 0), "Enter the cave at the top of Eagles' Peak. You can use a fairy ring to (AKQ), then head " + "south to get there easily."); eagleTravel = new NpcStep(this, NpcID.EAGLEPEAK_EAGLE_TODESERT, new WorldPoint(2027, 4964, 3), @@ -240,7 +240,7 @@ public void setupSteps() visitGenie = new NpcStep(this, NpcID.ELID_GENIE, new WorldPoint(3371, 9320, 0), "Visit the genie."); - moveToGenie = new ObjectStep(this, 10478, new WorldPoint(3374, 2904, 0), + moveToGenie = new ObjectStep(this, ObjectID.ELID_FALLOFF_5, new WorldPoint(3374, 2904, 0), "Climb down the crevice west of Nardah.", rope, lightSource); talkToSimon = new NpcStep(this, NpcID.AGILITY_PYRAMID_SIMON, new WorldPoint(3346, 2827, 0), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/falador/FaladorElite.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/falador/FaladorElite.java index 8db5ed4f72d..114ddbe74da 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/falador/FaladorElite.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/falador/FaladorElite.java @@ -53,6 +53,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.gameval.VarPlayerID; import java.util.ArrayList; @@ -149,9 +150,9 @@ protected void setupRequirements() faladorTeleport = new TeleportItemRequirement("Multiple Teleports to Falador", ItemID.POH_TABLET_FALADORTELEPORT, -1); - magicTreeNearbyNotCheckedVar = new VarbitRequirement(4471, 60); - magicTreeNearbyCheckedVar = new VarbitRequirement(4471, 61); - stumpNearbyVar = new VarbitRequirement(4471, 62); + magicTreeNearbyNotCheckedVar = new VarbitRequirement(VarbitID.WESTERN_DIARY_EASY_COMPLETE, 60); + magicTreeNearbyCheckedVar = new VarbitRequirement(VarbitID.WESTERN_DIARY_EASY_COMPLETE, 61); + stumpNearbyVar = new VarbitRequirement(VarbitID.WESTERN_DIARY_EASY_COMPLETE, 62); inAirAltar = new ZoneRequirement(airAltar); inFaladorCastle1 = new ZoneRequirement(faladorCastle1); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/fremennik/DagRoute.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/fremennik/DagRoute.java index 64cf077e40b..4075ccb267a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/fremennik/DagRoute.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/fremennik/DagRoute.java @@ -38,11 +38,11 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.steps.*; import net.runelite.api.Prayer; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.SpriteID; import java.util.List; @@ -161,21 +161,21 @@ public void setupConditions() public void setupSteps() { moveToWaterbirth = steps.get(null); - moveToDagCave = new ObjectStep(questHelper, 8929, new WorldPoint(2521, 3740, 0), + moveToDagCave = new ObjectStep(questHelper, ObjectID.DAGANNOTH_CAVEENTRANCE_ROCK, new WorldPoint(2521, 3740, 0), "Enter the cave and pray melee. Make sure you are full stamina and prayer before entering.", protectMelee, thrownaxe, petRock, food, stamPot, prayerPot); - dropPetRock = new ObjectStep(questHelper, 8965, new WorldPoint(2490, 10162, 0), + dropPetRock = new ObjectStep(questHelper, ObjectID.DAGANNOTH_PRESSURE_PAD_2, new WorldPoint(2490, 10162, 0), "Drop your pet rock on one pressure pad then stand on the other pad to open the gate.", petRock);// item on tile req? dropPetRock.addIcon(ItemID.VT_USELESS_ROCK); - dropPetRock.addTileMarker(new WorldPoint(2490, 10164, 0), SpriteID.SKILL_AGILITY); - moveToAxeSpot = new ObjectStep(questHelper, 8945, new WorldPoint(2545, 10146, 0), + dropPetRock.addTileMarker(new WorldPoint(2490, 10164, 0), SpriteID.Staticons.AGILITY); + moveToAxeSpot = new ObjectStep(questHelper, ObjectID.DAGANNOTH_DUGUPSOIL_2, new WorldPoint(2545, 10146, 0), "Continue onwards until you reach the barrier.", thrownaxe); activateSpecial = new DetailedQuestStep(questHelper, "Activate special attack with the rune thrownaxes equipped.", thrownaxe.equipped(), specialAttackEnabled); throwAxe = new NpcStep(questHelper, 2253, new WorldPoint(2543, 10143, 0), "Attack the Door-Support with a rune thrownaxe special attack. If done correctly the axe should ricochet" + " and lower all 3 barriers.", thrownaxe.equipped(), specialAttackEnabled); - moveToDagCave1 = new ObjectStep(questHelper, 10177, new WorldPoint(2546, 10143, 0), + moveToDagCave1 = new ObjectStep(questHelper, ObjectID.DAGANNOTH_LADDER_BASE_EXT2, new WorldPoint(2546, 10143, 0), "Enable magic protection then climb down the ladder.", protectMagic); moveToDagCave1.addDialogSteps("Climb Down."); moveToDagCave2 = new ObjectStep(questHelper, ObjectID.DAGEXP_LADDER1, new WorldPoint(1808, 4405, 3), @@ -200,7 +200,7 @@ public void setupSteps() "Keep current protection and continue through the cave.", protectMelee); moveToDagCave12 = new ObjectStep(questHelper, ObjectID.DAGEXP_LADDER21, new WorldPoint(1890, 4407, 1), "Keep current protection and continue through the cave.", protectMelee); - moveToDagKings = new ObjectStep(questHelper, 3831, new WorldPoint(1911, 4367, 0), + moveToDagKings = new ObjectStep(questHelper, ObjectID.DAGEXP_BOSSROOMLADDER_DOWN, new WorldPoint(1911, 4367, 0), "Enter the Kings' lair.", protectMelee); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/fremennik/FremennikElite.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/fremennik/FremennikElite.java index 18e07a6cbac..43b00dee037 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/fremennik/FremennikElite.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/fremennik/FremennikElite.java @@ -50,11 +50,11 @@ import net.runelite.api.Prayer; import net.runelite.api.QuestState; import net.runelite.api.Skill; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.SpriteID; import net.runelite.api.gameval.VarPlayerID; import java.util.ArrayList; @@ -264,9 +264,9 @@ protected void setupZones() public void setupSteps() { - rellRooftop = new ObjectStep(this, 14946, new WorldPoint(2625, 3677, 0), + rellRooftop = new ObjectStep(this, ObjectID.ROOFTOPS_RELLEKKA_WALLCLIMB, new WorldPoint(2625, 3677, 0), "Complete a lap of the Rellekka Rooftop course."); - dragonAmulet = new ObjectStep(this, 21303, new WorldPoint(2344, 3811, 0), + dragonAmulet = new ObjectStep(this, ObjectID.IZNOT_CLAY_FORGE, new WorldPoint(2344, 3811, 0), "Smelt a dragonstone amulet on the clay forge."); dragonAmulet.addIcon(ItemID.UNSTRUNG_DRAGONSTONE_AMULET); moveToPirates = new NpcStep(this, NpcID.LUNAR_FREMENNIK_PIRATE_BY_PIRATESHIP, new WorldPoint(2620, 3693, 0), @@ -287,9 +287,9 @@ public void setupSteps() "Speak with Maria Gunnars to travel to Neitiznot."); - moveToGodWarsSM = new ObjectStep(this, 26419, new WorldPoint(2919, 3747, 0), + moveToGodWarsSM = new ObjectStep(this, ObjectID.GODWARS_ENTRANCE_MULTI, new WorldPoint(2919, 3747, 0), "Go down the hole. Bring a rope if this is your first time entering.", combatGear, food); - moveToGodWarsGWD = new ObjectStep(this, 26419, new WorldPoint(2919, 3747, 0), + moveToGodWarsGWD = new ObjectStep(this, ObjectID.GODWARS_ENTRANCE_MULTI, new WorldPoint(2919, 3747, 0), "Go down the hole. Bring a rope if this is your first time entering.", combatGear, food); godwarsGenerals = new NpcStep(this, NpcID.GODWARS_ARMADYL_AVATAR, new WorldPoint(2832, 5301, 2), "Get kills for a faction then kill its respective general.", true); @@ -308,17 +308,17 @@ public void setupSteps() moveToWaterbirth.addDialogStep("What Jarvald is doing."); moveToWaterbirth.addDialogStep("Can I come?"); moveToWaterbirth.addDialogStep("YES"); - moveToDagCave = new ObjectStep(this, 8929, new WorldPoint(2521, 3740, 0), + moveToDagCave = new ObjectStep(this, ObjectID.DAGANNOTH_CAVEENTRANCE_ROCK, new WorldPoint(2521, 3740, 0), "Enter cave and pray melee. Make sure you are full stam and prayer before entering.", protectMelee); - dropPetRock = new ObjectStep(this, 8965, new WorldPoint(2490, 10162, 0), + dropPetRock = new ObjectStep(this, ObjectID.DAGANNOTH_PRESSURE_PAD_2, new WorldPoint(2490, 10162, 0), "Drop your pet rock on one pressure pad then stand on the other pad to open the gate.", petRock);// item on tile req? dropPetRock.addIcon(ItemID.VT_USELESS_ROCK); - dropPetRock.addTileMarker(new WorldPoint(2490, 10164, 0), SpriteID.SKILL_AGILITY); - moveToAxeSpot = new ObjectStep(this, 8945, new WorldPoint(2545, 10146, 0), + dropPetRock.addTileMarker(new WorldPoint(2490, 10164, 0), SpriteID.Staticons.AGILITY); + moveToAxeSpot = new ObjectStep(this, ObjectID.DAGANNOTH_DUGUPSOIL_2, new WorldPoint(2545, 10146, 0), "Continue onwards until you reach the barrier."); - throwAxe = new NpcStep(this, 2253, new WorldPoint(2543, 10143, 0), + throwAxe = new NpcStep(this, NpcID.DAGANNOTH_WEAK_DOOR_WEST, new WorldPoint(2543, 10143, 0), "Attack the Door-Support with a rune thrownaxe special attack. If done correctly the axe should ricochet and lower all 3 barriers.", thrownaxe.equipped(), specialAttackEnabled); - moveToDagCave1 = new ObjectStep(this, 10177, new WorldPoint(2546, 10143, 0), + moveToDagCave1 = new ObjectStep(this, ObjectID.DAGANNOTH_LADDER_BASE_EXT2, new WorldPoint(2546, 10143, 0), "Enable magic protection then climb down the ladder.", protectMagic); moveToDagCave1.addDialogSteps("Climb Down."); moveToDagCave2 = new ObjectStep(this, ObjectID.DAGEXP_LADDER1, new WorldPoint(1808, 4405, 3), @@ -345,7 +345,7 @@ public void setupSteps() "Continue through the cave.", protectMelee); moveToDagCave13 = new ObjectStep(this, ObjectID.DAGEXP_LADDER23, new WorldPoint(1957, 4371, 0), "Continue through the cave.", protectMelee); - moveToDagKings = new ObjectStep(this, 3831, new WorldPoint(1911, 4367, 0), + moveToDagKings = new ObjectStep(this, ObjectID.DAGEXP_BOSSROOMLADDER_DOWN, new WorldPoint(1911, 4367, 0), "Enter the Kings' lair.", protectMelee); dagKings = new NpcStep(this, NpcID.DAGCAVE_MELEE_BOSS, new WorldPoint(2913, 4449, 0), "Kill each of the Dagannoth Kings.", true, combatGear); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/fremennik/FremennikHard.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/fremennik/FremennikHard.java index 04758883fc0..616f6e2bcbb 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/fremennik/FremennikHard.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/fremennik/FremennikHard.java @@ -246,12 +246,12 @@ public void setupSteps() moveToJatizso.addDialogStep("Can you ferry me to Jatizso?"); moveToMine = new ObjectStep(this, ObjectID.FRISD_IZSO_MINE_ENTRANCE, new WorldPoint(2398, 3813, 0), "Go down the staircase."); - mineAddy = new ObjectStep(this, 11374, new WorldPoint(2402, 10189, 0), + mineAddy = new ObjectStep(this, ObjectID.ADAMANTITEROCK1, new WorldPoint(2402, 10189, 0), "Mine 5 Adamantite ores.", pickaxe); mineAddy.addIcon(ItemID.RUNE_PICKAXE); moveToMisc = new NpcStep(this, NpcID.VIKING_SAILOR, new WorldPoint(2630, 3692, 0), "Speak to the sailor to go to Miscellania."); - miscSupport = new ObjectStep(this, 15084, new WorldPoint(2527, 3849, 0), + miscSupport = new ObjectStep(this, ObjectID.MISC_HERB_MULTILOC, new WorldPoint(2527, 3849, 0), "Rake the herb and flax patch until 100% support.", true, rake); miscSupport.addAlternateObjects(15079); tpWaterbirth = new DetailedQuestStep(this, diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/fremennik/FremennikMedium.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/fremennik/FremennikMedium.java index 56490701a35..3da8361af4f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/fremennik/FremennikMedium.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/fremennik/FremennikMedium.java @@ -51,11 +51,11 @@ import net.runelite.api.Prayer; import net.runelite.api.QuestState; import net.runelite.api.Skill; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.SpriteID; import net.runelite.api.gameval.VarPlayerID; import java.util.ArrayList; @@ -308,14 +308,14 @@ public void setupSteps() enterBrineCave.addIcon(ItemID.SPADE); slayBrineRat = new NpcStep(this, NpcID.OLAF2_BRINE_RATS, new WorldPoint(2706, 10133, 0), "Kill a brine rat then roll the boulder and exit the cave..", true); - travelMisc = new ObjectStep(this, 29495, new WorldPoint(2744, 3719, 0), + travelMisc = new ObjectStep(this, ObjectID.FAIRYRING_MINORHUB, new WorldPoint(2744, 3719, 0), "Use a fairy ring and travel to (CIP).", fairyTaleII); - enterEaglesPeak = new ObjectStep(this, 19790, new WorldPoint(2329, 3495, 0), + enterEaglesPeak = new ObjectStep(this, ObjectID.EAGLEPEAK_ENTRANCE_CAVE_MULTI, new WorldPoint(2329, 3495, 0), "Enter the cave at the top of Eagles' Peak. Use fairy ring and travel to (AKQ), then head south.", rope); snowyHunter = new NpcStep(this, NpcID.EAGLEPEAK_EAGLE_TOPOLAR, new WorldPoint(2027, 4964, 3), "Use rope on the Polar Eagle to travel to the Snowy Hunter area.", rope.highlighted()); snowyHunter.addIcon(ItemID.ROPE); - exitIceCave = new ObjectStep(this, 19764, new WorldPoint(2706, 10205, 0), "Exit the cave."); + exitIceCave = new ObjectStep(this, ObjectID.EAGLEPEAK_ICE_CAVE_ENTRANCE, new WorldPoint(2706, 10205, 0), "Exit the cave."); snowyKnight0 = new NpcStep(this, NpcID.BUTTERFLY_SNOWY, new WorldPoint(2725, 3770, 0), "Catch a Snowy Knight at the Fremennik Hunter Area.", butterFlyNet.equipped()); snowyKnight1 = new NpcStep(this, NpcID.BUTTERFLY_SNOWY, new WorldPoint(2712, 3822, 1), @@ -341,21 +341,21 @@ public void setupSteps() moveToWaterbirth = new NpcStep(this, NpcID.VIKING_DAGGANOTH_CAVE_FERRYMAN_ISLAND, new WorldPoint(2620, 3686, 0), "Speak with Jarvald to travel to Waterbirth Island.", petRock, thrownaxe); moveToWaterbirth.addDialogSteps("What Jarvald is doing.", "Can I come?", "YES"); - moveToDagCave = new ObjectStep(this, 8929, new WorldPoint(2521, 3740, 0), + moveToDagCave = new ObjectStep(this, ObjectID.DAGANNOTH_CAVEENTRANCE_ROCK, new WorldPoint(2521, 3740, 0), "Enter the cave and pray melee. Make sure you are full stamina and prayer before entering.", protectMelee, thrownaxe, petRock, food, stamPot, prayerPot); - dropPetRock = new ObjectStep(this, 8965, new WorldPoint(2490, 10162, 0), + dropPetRock = new ObjectStep(this, ObjectID.DAGANNOTH_PRESSURE_PAD_2, new WorldPoint(2490, 10162, 0), "Drop your pet rock on one pressure pad then stand on the other pad to open the gate.", petRock);// item on tile req? dropPetRock.addIcon(ItemID.VT_USELESS_ROCK); - dropPetRock.addTileMarker(new WorldPoint(2490, 10164, 0), SpriteID.SKILL_AGILITY); - moveToAxeSpot = new ObjectStep(this, 8945, new WorldPoint(2545, 10146, 0), + dropPetRock.addTileMarker(new WorldPoint(2490, 10164, 0), SpriteID.Staticons.AGILITY); + moveToAxeSpot = new ObjectStep(this, ObjectID.DAGANNOTH_DUGUPSOIL_2, new WorldPoint(2545, 10146, 0), "Continue onwards until you reach the barrier.", thrownaxe); activateSpecial = new DetailedQuestStep(this, "Activate special attack with the rune thrownaxes equipped.", thrownaxe.equipped(), specialAttackEnabled); - throwAxe = new NpcStep(this, 2253, new WorldPoint(2543, 10143, 0), + throwAxe = new NpcStep(this, NpcID.DAGANNOTH_WEAK_DOOR_WEST, new WorldPoint(2543, 10143, 0), "Attack the Door-Support with a rune thrownaxe special attack. If done correctly the axe should ricochet" + " and lower all 3 barriers.", thrownaxe.equipped(), specialAttackEnabled); - moveToDagCave1 = new ObjectStep(this, 10177, new WorldPoint(2546, 10143, 0), + moveToDagCave1 = new ObjectStep(this, ObjectID.DAGANNOTH_LADDER_BASE_EXT2, new WorldPoint(2546, 10143, 0), "Enable magic protection then climb down the ladder.", protectMagic); moveToDagCave1.addDialogSteps("Climb Down."); moveToDagCave2 = new ObjectStep(this, ObjectID.DAGEXP_LADDER1, new WorldPoint(1808, 4405, 3), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/karamja/KaramjaEasy.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/karamja/KaramjaEasy.java index 507f4ba2b90..1f950a9da85 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/karamja/KaramjaEasy.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/karamja/KaramjaEasy.java @@ -125,15 +125,15 @@ protected void setupRequirements() seaweed = new ItemRequirement("Seaweed", ItemID.SEAWEED); notPickedBananas = new VarbitRequirement(VarbitID.ATJUN_EASY_BANANA, 4, Operation.LESS_EQUAL); - notSwungOnRope = new VarbitRequirement(3567, 0); - notMinedGold = new VarbitRequirement(3568, 0); - notGoneToSarim = new VarbitRequirement(3569, 0); - notGoneToArdougne = new VarbitRequirement(3570, 0); - notGoneToCairn = new VarbitRequirement(3571, 0); - notFished = new VarbitRequirement(3572, 0); + notSwungOnRope = new VarbitRequirement(VarbitID.ATJUN_EASY_SWING, 0); + notMinedGold = new VarbitRequirement(VarbitID.ATJUN_EASY_GOLD, 0); + notGoneToSarim = new VarbitRequirement(VarbitID.ATJUN_EASY_BOAT_SARIM, 0); + notGoneToArdougne = new VarbitRequirement(VarbitID.ATJUN_EASY_BOAT_ARDY, 0); + notGoneToCairn = new VarbitRequirement(VarbitID.ATJUN_EASY_CAIRN, 0); + notFished = new VarbitRequirement(VarbitID.ATJUN_EASY_FISHING, 0); notPickedUpSeaweed = new VarbitRequirement(VarbitID.ATJUN_EASY_SEAWEED, 4, Operation.LESS_EQUAL); - notEnteredFightCave = new VarbitRequirement(3574, 0); - notKilledJogre = new VarbitRequirement(3575, 0); + notEnteredFightCave = new VarbitRequirement(VarbitID.ATJUN_EASY_TZHAAR, 0); + notKilledJogre = new VarbitRequirement(VarbitID.ATJUN_EASY_JOGRE, 0); pickaxe = new ItemRequirement("Any pickaxe", ItemCollections.PICKAXES).showConditioned(notMinedGold).isNotConsumed(); coins = new ItemRequirement("Coins", ItemCollections.COINS).showConditioned(new Conditions(LogicType.OR, diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/karamja/KaramjaHard.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/karamja/KaramjaHard.java index 52ac01e77a9..0769ccd2a3d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/karamja/KaramjaHard.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/karamja/KaramjaHard.java @@ -149,16 +149,16 @@ public QuestStep loadStep() @Override protected void setupRequirements() { - notBecomeChampion = new VarbitRequirement(3600, 0); - notKilledZek = new VarbitRequirement(3601, 0); - notEatenWrap = new VarbitRequirement(3602, 0); - notCraftedNature = new VarbitRequirement(3603, 0); - notCookedKarambwan = new VarbitRequirement(3604, 0); - notKilledDeathwing = new VarbitRequirement(3605, 0); - notUsedShortcut = new VarbitRequirement(3606, 0); + notBecomeChampion = new VarbitRequirement(VarbitID.ATJUN_HARD_FIGHTPITS, 0); + notKilledZek = new VarbitRequirement(VarbitID.ATJUN_HARD_FIGHTCAVE, 0); + notEatenWrap = new VarbitRequirement(VarbitID.ATJUN_HARD_OOMLIE, 0); + notCraftedNature = new VarbitRequirement(VarbitID.ATJUN_HARD_NATURE, 0); + notCookedKarambwan = new VarbitRequirement(VarbitID.ATJUN_HARD_KARAMBWAN, 0); + notKilledDeathwing = new VarbitRequirement(VarbitID.ATJUN_HARD_DEATHWING, 0); + notUsedShortcut = new VarbitRequirement(VarbitID.ATJUN_HARD_XBOW, 0); notCollectedLeaves = new VarbitRequirement(VarbitID.ATJUN_HARD_PALM, 4, Operation.LESS_EQUAL); - notAssignedTask = new VarbitRequirement(3608, 0); - notKilledDragon = new VarbitRequirement(3609, 0); + notAssignedTask = new VarbitRequirement(VarbitID.ATJUN_HARD_DURADEL, 0); + notKilledDragon = new VarbitRequirement(VarbitID.ATJUN_HARD_DRAGON, 0); pickaxe = new ItemRequirement("Any pickaxe", ItemCollections.PICKAXES).showConditioned(notKilledDeathwing).isNotConsumed(); coins = new ItemRequirement("Coins", ItemCollections.COINS).showConditioned(notKilledDragon); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/karamja/KaramjaMedium.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/karamja/KaramjaMedium.java index 2ba9f9c7ed4..842347b4ee1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/karamja/KaramjaMedium.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/karamja/KaramjaMedium.java @@ -46,6 +46,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -168,25 +169,25 @@ public Map loadSteps() @Override protected void setupRequirements() { - notClaimedTicket = new VarbitRequirement(3579, 0); - notEnteredWall = new VarbitRequirement(3580, 0); - notEnteredCrandor = new VarbitRequirement(3581, 0); - notUsedCart = new VarbitRequirement(3582, 0); - notEarned100 = new VarbitRequirement(3583, 0); - notCookedSpider = new VarbitRequirement(3584, 0); - notMinedRedRopaz = new VarbitRequirement(3585, 0); - notCutTeak = new VarbitRequirement(3586, 0); - notCutMahog = new VarbitRequirement(3587, 0); - notCaughtKarambwan = new VarbitRequirement(3588, 0); - notExchangedGems = new VarbitRequirement(3589, 0); - notUsedGlider = new VarbitRequirement(3590, 0); - notGrownFruitTree = new VarbitRequirement(3591, 0); - notTrappedGraahk = new VarbitRequirement(3592, 0); - notCutVine = new VarbitRequirement(3593, 0); - notCrossedLava = new VarbitRequirement(3594, 0); - notClimbedStairs = new VarbitRequirement(3595, 0); - notTraveledToKhazard = new VarbitRequirement(3596, 0); - notCharteredFromShipyard = new VarbitRequirement(3597, 0); + notClaimedTicket = new VarbitRequirement(VarbitID.ATJUN_MED_AGILITY, 0); + notEnteredWall = new VarbitRequirement(VarbitID.ATJUN_MED_VOLCANO, 0); + notEnteredCrandor = new VarbitRequirement(VarbitID.ATJUN_MED_CRANDOR, 0); + notUsedCart = new VarbitRequirement(VarbitID.ATJUN_MED_CART, 0); + notEarned100 = new VarbitRequirement(VarbitID.ATJUN_MED_CLEANUP, 0); + notCookedSpider = new VarbitRequirement(VarbitID.ATJUN_MED_SPIDER, 0); + notMinedRedRopaz = new VarbitRequirement(VarbitID.ATJUN_MED_TOPAZ, 0); + notCutTeak = new VarbitRequirement(VarbitID.ATJUN_MED_TEAK, 0); + notCutMahog = new VarbitRequirement(VarbitID.ATJUN_MED_MAHOGANY, 0); + notCaughtKarambwan = new VarbitRequirement(VarbitID.ATJUN_MED_KARAMBWAN, 0); + notExchangedGems = new VarbitRequirement(VarbitID.ATJUN_MED_MACHETTE, 0); + notUsedGlider = new VarbitRequirement(VarbitID.ATJUN_MED_GLIDER, 0); + notGrownFruitTree = new VarbitRequirement(VarbitID.ATJUN_MED_FARMING, 0); + notTrappedGraahk = new VarbitRequirement(VarbitID.ATJUN_MED_GRAAHK, 0); + notCutVine = new VarbitRequirement(VarbitID.ATJUN_MED_SHILO_VINES, 0); + notCrossedLava = new VarbitRequirement(VarbitID.ATJUN_MED_SHILO_LAVA, 0); + notClimbedStairs = new VarbitRequirement(VarbitID.ATJUN_MED_SHILO_STAIRS, 0); + notTraveledToKhazard = new VarbitRequirement(VarbitID.ATJUN_MED_KHAZARD, 0); + notCharteredFromShipyard = new VarbitRequirement(VarbitID.ATJUN_MED_CHARTER, 0); pickaxe = new ItemRequirement("Any pickaxe", ItemCollections.PICKAXES) .showConditioned(new Conditions(LogicType.OR, notMinedRedRopaz, notEarned100)).isNotConsumed(); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/kourend/KourendEasy.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/kourend/KourendEasy.java index e1b5dedcfa0..64669b15045 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/kourend/KourendEasy.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/kourend/KourendEasy.java @@ -46,6 +46,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.gameval.VarPlayerID; import java.util.ArrayList; @@ -182,7 +183,7 @@ protected void setupRequirements() inCastleF1 = new ZoneRequirement(castleF1); inCastleF2 = new ZoneRequirement(castleF2); - houseInKourend = new VarbitRequirement(2187, 8); + houseInKourend = new VarbitRequirement(VarbitID.POH_HOUSE_LOCATION, 8); } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/kourend/KourendHard.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/kourend/KourendHard.java index 2bbbda764ab..f5532f0fdac 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/kourend/KourendHard.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/kourend/KourendHard.java @@ -233,7 +233,7 @@ public void setupSteps() // Smelt an adamantite bar enterForsakenTower = new DetailedQuestStep(this, new WorldPoint(1382, 3818, 0), "Enter the Forsaken Tower.", adamantiteOre, coal.quantity(6)); - smeltAddyBar = new ObjectStep(this, 34591, "Smelt an adamantite bar.", adamantiteOre, + smeltAddyBar = new ObjectStep(this, ObjectID.LOVAQUEST_TOWER_FURNACE, "Smelt an adamantite bar.", adamantiteOre, coal.quantity(6)); smeltAddyBar.addSubSteps(enterForsakenTower); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/kourend/KourendMedium.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/kourend/KourendMedium.java index fb8015b9596..ffe5a31eab8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/kourend/KourendMedium.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/kourend/KourendMedium.java @@ -213,7 +213,7 @@ protected void setupRequirements() // Zone requirements inMolchIsland = new ZoneRequirement(molchIsland); - hasBird = new VarbitRequirement(5983, 1); + hasBird = new VarbitRequirement(VarbitID.SETTINGS_BARBARIAN_POTION_MAKEX, 1); } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/lumbridgeanddraynor/LumbridgeEasy.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/lumbridgeanddraynor/LumbridgeEasy.java index f7adbd004e5..8898df2a500 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/lumbridgeanddraynor/LumbridgeEasy.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/lumbridgeanddraynor/LumbridgeEasy.java @@ -49,6 +49,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.gameval.VarPlayerID; import java.util.ArrayList; @@ -156,7 +157,7 @@ protected void setupRequirements() notIron = new VarplayerRequirement(VarPlayerID.LUMB_DRAY_ACHIEVEMENT_DIARY, false, 11); notEnterHAM = new VarplayerRequirement(VarPlayerID.LUMB_DRAY_ACHIEVEMENT_DIARY, false, 12); - addedRopeToHole = new VarbitRequirement(279, 1); + addedRopeToHole = new VarbitRequirement(VarbitID.SWAMP_CAVES_ROPED_ENTRANCE, 1); lightSource = new ItemRequirement("Light source", ItemCollections.LIGHT_SOURCES).showConditioned(notKillCaveBug).isNotConsumed(); rope = new ItemRequirement("Rope", ItemID.ROPE).showConditioned(notKillCaveBug); @@ -210,7 +211,7 @@ protected void setupZones() public void setupSteps() { - drayAgi = new ObjectStep(this, 11404, new WorldPoint(3103, 3279, 0), + drayAgi = new ObjectStep(this, ObjectID.ROOFTOPS_DRAYNOR_WALLCLIMB, new WorldPoint(3103, 3279, 0), "Complete a lap of the Draynor Rooftop Course."); moveToDraySewer = new ObjectStep(this, ObjectID.VAMPIRE_TRAP2, new WorldPoint(3118, 3244, 0), @@ -242,7 +243,7 @@ public void setupSteps() killCaveBug = new NpcStep(this, NpcID.SWAMP_CAVE_BUG, new WorldPoint(3151, 9574, 0), "Kill a Cave Bug.", true, combatGear, lightSource); - moveToWaterAltar = new ObjectStep(this, 34815, new WorldPoint(3185, 3165, 0), + moveToWaterAltar = new ObjectStep(this, ObjectID.WATERTEMPLE_RUINED, new WorldPoint(3185, 3165, 0), "Enter the water altar in Lumbridge Swamp.", waterAccessOrAbyss.highlighted(), runeEss); moveToWaterAltar.addIcon(ItemID.WATER_TALISMAN); waterRune = new ObjectStep(this, ObjectID.WATER_ALTAR, new WorldPoint(2716, 4836, 0), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/lumbridgeanddraynor/LumbridgeElite.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/lumbridgeanddraynor/LumbridgeElite.java index d18f7a27427..a1180503c94 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/lumbridgeanddraynor/LumbridgeElite.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/lumbridgeanddraynor/LumbridgeElite.java @@ -48,11 +48,11 @@ import net.runelite.client.plugins.microbot.questhelper.steps.emote.QuestEmote; import net.runelite.api.QuestState; import net.runelite.api.Skill; -import net.runelite.api.VarPlayer; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.gameval.VarPlayerID; import java.util.ArrayList; @@ -132,7 +132,7 @@ protected void setupRequirements() notWaterRunes = new VarplayerRequirement(VarPlayerID.LUMB_DRAY_ACHIEVEMENT_DIARY2, false, 8); notQCEmote = new VarplayerRequirement(VarPlayerID.LUMB_DRAY_ACHIEVEMENT_DIARY2, false, 9); - allQuests = new VarComparisonRequirement(VarType.VARP, VarPlayer.QUEST_POINTS, VarType.VARBIT, 1782, Operation.EQUAL, "All quests completed"); + allQuests = new VarComparisonRequirement(VarType.VARP, VarPlayerID.QP, VarType.VARBIT, VarbitID.QP_MAX, Operation.EQUAL, "All quests completed"); lockpick = new ItemRequirement("Lockpick", ItemID.LOCKPICK).showConditioned(notRichChest).isNotConsumed(); crossbow = new ItemRequirement("Crossbow", ItemCollections.CROSSBOWS).showConditioned(notMovario).isNotConsumed(); @@ -187,7 +187,7 @@ public void setupSteps() qcEmote = new EmoteStep(this, QuestEmote.SKILL_CAPE, new WorldPoint(3088, 3253, 0), "Perform the skill cape emote with the quest cape equipped.", qcCape.equipped()); - moveToWater = new ObjectStep(this, 34815, new WorldPoint(3185, 3165, 0), + moveToWater = new ObjectStep(this, ObjectID.WATERTEMPLE_RUINED, new WorldPoint(3185, 3165, 0), "Enter the water altar.", waterAccessOrAbyss.highlighted(), essence.quantity(28)); waterRunes = new ObjectStep(this, ObjectID.WATER_ALTAR, new WorldPoint(2716, 4836, 0), "Craft water runes.", essence.quantity(28)); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/lumbridgeanddraynor/LumbridgeHard.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/lumbridgeanddraynor/LumbridgeHard.java index 82b06a2a4f5..971e486b484 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/lumbridgeanddraynor/LumbridgeHard.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/lumbridgeanddraynor/LumbridgeHard.java @@ -256,7 +256,7 @@ public void setupSteps() waterRune, natureRune); unlockBonesToPeaches = new DetailedQuestStep(this, "Unlock bones to peaches from the Mage Training Arena."); - wakaToEdge = new ObjectStep(this, 12163, new WorldPoint(3242, 3237, 0), + wakaToEdge = new ObjectStep(this, ObjectID.CANOEING_CANOESTATION_LUMBRIDGE, new WorldPoint(3242, 3237, 0), "Use the canoe station in lumbridge to make a Waka and travel to Edgeville.", axe); smeltAmmy = new ObjectStep(this, ObjectID.FAI_FALADOR_FURNACE, new WorldPoint(3227, 3257, 0), @@ -274,7 +274,7 @@ public void setupSteps() moveToBasementForGloves = new ObjectStep(this, ObjectID.QIP_COOK_TRAPDOOR_OPEN, new WorldPoint(3209, 3216, 0), "Climb down the trapdoor in the Lumbridge Castle.", coins); - barrowsGloves = new ObjectStep(this, 12308, new WorldPoint(3219, 9623, 0), + barrowsGloves = new ObjectStep(this, ObjectID.HUNDRED_GOODCHEST, new WorldPoint(3219, 9623, 0), "Purchase the barrows gloves from the bank chest. Right click and select 'Buy-items'.", coins); // 12308 is mine and I only have FULL access, and the ELITE version wouldn't make sense here @@ -310,7 +310,7 @@ public void setupSteps() moveToCosmic.addIcon(ItemID.COSMIC_TALISMAN); cosmics = new ObjectStep(this, ObjectID.COSMIC_ALTAR, new WorldPoint(2142, 4833, 0), "Craft 56 cosmic runes.", essence); - belladonna = new ObjectStep(this, 7572, new WorldPoint(3087, 3355, 0), + belladonna = new ObjectStep(this, ObjectID.FARMING_BELLADONNA_PATCH, new WorldPoint(3087, 3355, 0), "Grow and pick some belladonna from the Draynor Manor farming patch. " + "If you're waiting for it to grow and want to complete further tasks, use the tick box on panel.", bellaSeed, rake, spade, gloves, seedDib); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/lumbridgeanddraynor/LumbridgeMedium.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/lumbridgeanddraynor/LumbridgeMedium.java index c9416a076a2..8d8fa99fb92 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/lumbridgeanddraynor/LumbridgeMedium.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/lumbridgeanddraynor/LumbridgeMedium.java @@ -211,7 +211,7 @@ public void setupSteps() grappleLum = new ObjectStep(this, ObjectID.XBOWS_RAFT_BR, new WorldPoint(3252, 3179, 0), "Grapple across the River Lum.", mithGrap.equipped(), crossbow.equipped()); - moveToLavaAltar = new ObjectStep(this, 34817, new WorldPoint(3313, 3255, 0), + moveToLavaAltar = new ObjectStep(this, ObjectID.FIRETEMPLE_RUINED, new WorldPoint(3313, 3255, 0), "Enter the fire altar north of Al Kharid.", fireAccess); craftLava = new ObjectStep(this, ObjectID.FIRE_ALTAR, new WorldPoint(2585, 4838, 0), "Use an earth talisman on the fire altar.", earthTali.highlighted(), essence, earthRune); @@ -252,7 +252,7 @@ public void setupSteps() "Catch an essence or eclectic impling in Puro-Puro.", true, butterflyNet, implingJar); puroImp.addAlternateNpcs(NpcID.II_IMPLING_TYPE_5_MAZE, NpcID.II_IMPLING_TYPE_6, NpcID.II_IMPLING_TYPE_6_MAZE); - wizardFairy = new ObjectStep(this, 29560, new WorldPoint(2412, 4434, 0), + wizardFairy = new ObjectStep(this, ObjectID.FAIRYRING_HOMEHUB, new WorldPoint(2412, 4434, 0), "Take the nearest fairy ring and travel to the Wizards' Tower (DIS).", fairyAccess.equipped()); claimReward = new NpcStep(this, NpcID.HATIUS_LUMBRIDGE_DIARY, new WorldPoint(3235, 3213, 0), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/morytania/MorytaniaEasy.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/morytania/MorytaniaEasy.java index 95e201568c1..8936535a4cb 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/morytania/MorytaniaEasy.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/morytania/MorytaniaEasy.java @@ -240,7 +240,7 @@ public void setupSteps() "Use the Hay sack on the Bronze Spear.", haySack.highlighted(), bronzeSpear.highlighted()); useWatermelonOnSack = new DetailedQuestStep(this, "Use the watermelon on the Hay Sack to make the Scarecrow.", scarecrowStep2.highlighted(), watermelon.highlighted()); - placeScarecrow = new ObjectStep(this, 7850, new WorldPoint(3602, 3526, 0), + placeScarecrow = new ObjectStep(this, ObjectID.FARMING_FLOWER_PATCH_4, new WorldPoint(3602, 3526, 0), "Place a scarecrow at the Morytania flower patch, West of Port Phasmatys.", scarecrow.highlighted()); placeScarecrow.addIcon(ItemID.SCARECROW_COMPLETE); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/morytania/MorytaniaElite.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/morytania/MorytaniaElite.java index 503a5077021..c1bf1c7c5c8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/morytania/MorytaniaElite.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/morytania/MorytaniaElite.java @@ -47,11 +47,11 @@ import net.runelite.client.plugins.microbot.questhelper.steps.*; import net.runelite.api.QuestState; import net.runelite.api.Skill; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.SpriteID; import net.runelite.api.gameval.VarPlayerID; import java.util.ArrayList; @@ -208,7 +208,7 @@ public void setupSteps() "Dig at the top of the mounds and search the Sarcophagi until you find the hidden tunnel. A spade can " + "be found in a shed at the entrance.", spade, barrowsSet, food); // equipped doesn't work, it's highlighted as long as it's in inventory. - barrowsChest = new ObjectStep(this, 20973, new WorldPoint(3552, 9696, 0), + barrowsChest = new ObjectStep(this, ObjectID.BARROWS_STONE_CHEST, new WorldPoint(3552, 9696, 0), "Loot the chest wearing a complete set of barrows gear.", barrowsSet.equipped()); cremateShade = new ObjectStep(this, ObjectID.TEMPLE_PYRE, new WorldPoint(3500, 3266, 0), @@ -219,7 +219,7 @@ public void setupSteps() bareHandShark = new NpcStep(this, NpcID._0_54_49_MEMBERFISH, new WorldPoint(3479, 3189, 0), "Bare hand fish a shark in Burgh de Rott."); - moveToSlayer2 = new ObjectStep(this, 2114, new WorldPoint(3436, 3538, 0), + moveToSlayer2 = new ObjectStep(this, ObjectID.SLAYER_STAIRS_LV1, new WorldPoint(3436, 3538, 0), "Climb the stairs or the Spikey chains in the Slayer tower to ascend to the higher level.", combatGear, food); moveToSlayer3 = new ObjectStep(this, ObjectID.SLAYER_STAIRS_LV2, new WorldPoint(3415, 3541, 1), @@ -233,10 +233,10 @@ public void setupSteps() craftBlackDhideBody = new DetailedQuestStep(this, "Craft a black dragon hide body.", blackLeather.quantity(3).highlighted(), needle.highlighted(), thread); - fertilizeHerb = new ObjectStep(this, 8153, new WorldPoint(3606, 3530, 0), + fertilizeHerb = new ObjectStep(this, ObjectID.FARMING_HERB_PATCH_4, new WorldPoint(3606, 3530, 0), "Cast Fertile Soil on the herb patch in Morytania.", lunarBook, earthRune.quantity(15), astralRune.quantity(3), natureRune.quantity(2)); - fertilizeHerb.addIcon(SpriteID.SPELL_FERTILE_SOIL); + fertilizeHerb.addIcon(SpriteID.LunarMagicOn.FERTILE_SOIL); claimReward = new NpcStep(this, NpcID.LESABRE_MORT_DIARY, new WorldPoint(3464, 3480, 0), "Talk to Le-Sabre near Canifis to claim your reward!"); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/morytania/MorytaniaHard.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/morytania/MorytaniaHard.java index 00dc4d6c06b..69f5acf42b3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/morytania/MorytaniaHard.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/morytania/MorytaniaHard.java @@ -267,7 +267,7 @@ public void setupSteps() moveToUpstairs = new ObjectStep(this, ObjectID.SLAYERTOWER_SC_CHAINBOTTOM, new WorldPoint(3422, 3550, 0), "Climb up the chain to get to the second floor of the slayer tower."); - advancedSpikes = new ObjectStep(this, 16537, new WorldPoint(3447, 3576, 1), + advancedSpikes = new ObjectStep(this, ObjectID.SLAYERTOWER_SC_CHAINBOTTOM, new WorldPoint(3447, 3576, 1), "Climb the advanced spike chain. Go down and back up if you rip your hands as you climb."); moveToCaptHorror = new ObjectStep(this, ObjectID.FEVER_GANGPLANK, new WorldPoint(3710, 3496, 0), @@ -289,7 +289,7 @@ public void setupSteps() moveToIsland = new ObjectStep(this, ObjectID.HARMLESS_BLACK_SPIRAL_STAIRS, new WorldPoint(3830, 9463, 0), "Climb the staircase in the north east of the Cave Horror dungeon."); burnMaho = new ItemStep(this, "Burn mahogany logs on the island.", tinderbox.highlighted(), mahoLogs.highlighted()); - chopMaho = new ObjectStep(this, 9034, new WorldPoint(3826, 3056, 0), + chopMaho = new ObjectStep(this, ObjectID.MAHOGANYTREE, new WorldPoint(3826, 3056, 0), "Chop mahogany logs on the island.", axe, tinderbox); moveToCaptMelon = new ObjectStep(this, ObjectID.FEVER_GANGPLANK, new WorldPoint(3710, 3496, 0), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/varrock/VarrockEasy.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/varrock/VarrockEasy.java index d7278e52d88..d05692f96ab 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/varrock/VarrockEasy.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/varrock/VarrockEasy.java @@ -236,10 +236,10 @@ public void setupSteps() "Get more kudos from either quests, miniquests, or turning in fossils."); kudos = new NpcStep(this, NpcID.CURATOR, new WorldPoint(3258, 3449, 0), "Speak to Curator Haig Halen.", notMoreKudos); - moveToEarthRune = new ObjectStep(this, 34816, new WorldPoint(3306, 3474, 0), + moveToEarthRune = new ObjectStep(this, ObjectID.EARTHTEMPLE_RUINED, new WorldPoint(3306, 3474, 0), "Travel to the earth altar or go through the abyss.", earthTali.highlighted(), essence); moveToEarthRune.addIcon(ItemID.EARTH_TALISMAN); - earthRune = new ObjectStep(this, 34763, new WorldPoint(2658, 4841, 0), + earthRune = new ObjectStep(this, ObjectID.EARTH_ALTAR, new WorldPoint(2658, 4841, 0), "Craft an earth rune.", essence); trout = new NpcStep(this, NpcID._0_48_53_FRESHFISH, new WorldPoint(3106, 3428, 0), "Fish a trout in the River Lum at Barbarian Village.", flyRod, feathers); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/varrock/VarrockElite.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/varrock/VarrockElite.java index 89dcf2f8272..d1bb7789463 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/varrock/VarrockElite.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/varrock/VarrockElite.java @@ -180,7 +180,7 @@ public void setupSteps() "Move to the west Varrock bank."); superCombat = new ItemStep(this, "Create a super combat potion.", sAtk4.highlighted(), sStr4.highlighted(), sDef4.highlighted(), torstol.highlighted()); - moveToLumb = new ObjectStep(this, 2618, new WorldPoint(3308, 3492, 0), + moveToLumb = new ObjectStep(this, ObjectID.GERTRUDEFENCE, new WorldPoint(3308, 3492, 0), "Climb the fence to enter the lumber yard.", natureRune.quantity(20), astralRune.quantity(40), earthRune.quantity(300), coins.quantity(21000), mahoganyLog.quantity(20)); plankMake = new DetailedQuestStep(this, "Cast plank make until you've made 20 mahogany planks.", @@ -189,9 +189,9 @@ public void setupSteps() "Enter the cooking guild.", cookingGuild.equipped()); summerPie = new ObjectStep(this, ObjectID.FAI_VARROCK_RANGE, new WorldPoint(3146, 3453, 0), "Cook the summer pie.", rawPie); - moveToEarthRune = new ObjectStep(this, 34816, new WorldPoint(3306, 3474, 0), + moveToEarthRune = new ObjectStep(this, ObjectID.EARTHTEMPLE_RUINED, new WorldPoint(3306, 3474, 0), "Travel to the earth altar or go through the abyss.", earthTali, essence.quantity(25)); - earthRune100 = new ObjectStep(this, 34763, new WorldPoint(2658, 4841, 0), + earthRune100 = new ObjectStep(this, ObjectID.EARTH_ALTAR, new WorldPoint(2658, 4841, 0), "Craft the earth runes.", essence.quantity(25)); moveToAnvil = new DetailedQuestStep(this, new WorldPoint(3188, 3426, 0), "Go to the anvil beside the west Varrock bank.", runeBar, feather, hammer); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/varrock/VarrockHard.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/varrock/VarrockHard.java index 9996fe6bf68..51fa2e254ec 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/varrock/VarrockHard.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/varrock/VarrockHard.java @@ -200,9 +200,9 @@ protected void setupRequirements() ancientBook = new SpellbookRequirement(Spellbook.ANCIENT); - yewNotChecked = new VarbitRequirement(4771, 45); - yewChecked = new VarbitRequirement(4771, 46); - yewStump = new VarbitRequirement(4771, 47); + yewNotChecked = new VarbitRequirement(VarbitID.FARMING_TRANSMIT_A, 45); + yewChecked = new VarbitRequirement(VarbitID.FARMING_TRANSMIT_A, 46); + yewStump = new VarbitRequirement(VarbitID.FARMING_TRANSMIT_A, 47); botSceptre = new ItemRequirement("Bottom of sceptre", ItemID.SOS_HALF_SCEPTRE2).showConditioned(notSkullSceptre); topSceptre = new ItemRequirement("Top of sceptre", ItemID.SOS_HALF_SCEPTRE1).showConditioned(notSkullSceptre); @@ -331,10 +331,10 @@ public void setupSteps() "Speak with Orlando."); getKudos = new DetailedQuestStep(this, "Complete more quests and tasks for kudos. " + "Check out the kudos wiki page for more details."); - wakkaEdge = new ObjectStep(this, 12166, new WorldPoint(3131, 3510, 0), + wakkaEdge = new ObjectStep(this, ObjectID.CANOEING_CANOESTATION_EDGEVILLE, new WorldPoint(3131, 3510, 0), "Make a Waka at the canoe station in Edgeville.", axe); paddewwaTP = new DetailedQuestStep(this, "Cast teleport to Paddewwa.", ancientBook, lawRune.quantity(2), airRune.quantity(1), fireRune.quantity(1)); - cutYew = new ObjectStep(this, 10823, new WorldPoint(3249, 3473, 0), + cutYew = new ObjectStep(this, ObjectID.DEADMAN_YEWTREE, new WorldPoint(3249, 3473, 0), "Cut a yew tree until you get a log.", axe); goUp1 = new ObjectStep(this, ObjectID.VARROCK_SPIRALSTAIRS_TALLER, new WorldPoint(3259, 3488, 0), "Climb to the top of the Varrock Church.", yewLog, tinderBox); @@ -351,15 +351,15 @@ public void setupSteps() fancyStone = new NpcStep(this, NpcID.POH_ESTATE_AGENT, new WorldPoint(3240, 3475, 0), "Talk to the estate agent to redecorate your house to fancy stone.", coins.quantity(25000)); fancyStone.addDialogStep("Can you redecorate my house please?"); - growYew = new ObjectStep(this, 8513, new WorldPoint(3229, 3459, 0), + growYew = new ObjectStep(this, ObjectID.YEW_TREE_FULLYGROWN_2, new WorldPoint(3229, 3459, 0), "Grow and check the health of a yew tree in front of Varrock palace. " + "Afterwards, dig up the stump to get the yew roots. " + "If you're waiting for it to grow and want to complete further tasks, use the tick box on panel.", yewSap, rake, spade); - chopYew = new ObjectStep(this, 8513, new WorldPoint(3229, 3459, 0), + chopYew = new ObjectStep(this, ObjectID.YEW_TREE_FULLYGROWN_2, new WorldPoint(3229, 3459, 0), "Chop the yew tree that you grew in front of Varrock palace. Afterwards, dig up the stump to get the Yew " + "roots.", axe, spade); - digUpYewRoots = new ObjectStep(this, 8514, new WorldPoint(3229, 3459, 0), + digUpYewRoots = new ObjectStep(this, ObjectID.YEW_TREE_STUMP, new WorldPoint(3229, 3459, 0), "Dig up the stump to get the Yew roots.", spade); moveToUpstairs = new ObjectStep(this, ObjectID.VARROCK_SPIRALSTAIRS, new WorldPoint(3219, 3497, 0), "Climb the stairs in the back of the Varrock palace."); @@ -367,7 +367,7 @@ public void setupSteps() "Pray at altar with Smite active.", smiteActive); moveToEdge = new ObjectStep(this, ObjectID.TRAPDOOR_OPEN, new WorldPoint(3097, 3468, 0), "Enter the Edgeville dungeon."); - obsPipe = new ObjectStep(this, 16511, new WorldPoint(3150, 9906, 0), + obsPipe = new ObjectStep(this, ObjectID.VARROCK_DUNGEON_PIPE_SC, new WorldPoint(3150, 9906, 0), "Climb through the pipe shortcut near Vannaka."); claimReward = new NpcStep(this, NpcID.TOBY_VARROCK_DIARY, new WorldPoint(3225, 3415, 0), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/varrock/VarrockMedium.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/varrock/VarrockMedium.java index 7544c7c92fa..fd66e8f4e94 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/varrock/VarrockMedium.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/varrock/VarrockMedium.java @@ -51,6 +51,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.gameval.VarPlayerID; import java.util.ArrayList; @@ -167,15 +168,15 @@ protected void setupRequirements() notBalloon = new VarplayerRequirement(VarPlayerID.VARROCK_ACHIEVEMENT_DIARY, false, 27); notVarrAgi = new VarplayerRequirement(VarPlayerID.VARROCK_ACHIEVEMENT_DIARY, false, 28); - notFlap = new VarbitRequirement(2309, 1); - notSlap = new VarbitRequirement(2310, 1); - notIdea = new VarbitRequirement(2311, 1); - notStamp = new VarbitRequirement(2312, 1); + notFlap = new VarbitRequirement(VarbitID.SOS_EMOTE_FLAP, 1); + notSlap = new VarbitRequirement(VarbitID.SOS_EMOTE_DOH, 1); + notIdea = new VarbitRequirement(VarbitID.SOS_EMOTE_IDEA, 1); + notStamp = new VarbitRequirement(VarbitID.SOS_EMOTE_STAMP, 1); normalBook = new SpellbookRequirement(Spellbook.NORMAL); - notVarrBalloon = new VarbitRequirement(2872, 0); - notVarrBalloon2 = new VarbitRequirement(2872, 1); + notVarrBalloon = new VarbitRequirement(VarbitID.ZEP_MULTI_VARR, 0); + notVarrBalloon2 = new VarbitRequirement(VarbitID.ZEP_MULTI_VARR, 1); coins = new ItemRequirement("Coins", ItemCollections.COINS).showConditioned(new Conditions(LogicType.OR, notApothStr, notCatColour, notMaho20)); limpRoot = new ItemRequirement("Limpwurt root", ItemID.LIMPWURT_ROOT).showConditioned(notApothStr); @@ -233,7 +234,7 @@ public void setupSteps() "Check your bank if you own a cat/kitten and either store them in the POH Menagerie or shoo them. Then speak with Gertrude for a new kitten.", coins.quantity(100), ringOfCharos.equipped()); colourCat.addDialogSteps("Do you have any more kittens?", "[Charm] I'm quite fussy over cats - can I pick my own?"); - geSpirit = new ObjectStep(this, 1295, new WorldPoint(3185, 3510, 0), + geSpirit = new ObjectStep(this, ObjectID.SPIRITTREE_SMALL, new WorldPoint(3185, 3510, 0), "Use the spirit tree in the Grand Exchange."); moveToStronghold = new ObjectStep(this, ObjectID.SOS_DUNG_ENT_OPEN, new WorldPoint(3081, 3420, 0), @@ -259,7 +260,7 @@ public void setupSteps() //TODO find a better way to check for slayer task vannaka = new NpcStep(this, NpcID.SLAYER_MASTER_3, new WorldPoint(3146, 9913, 0), "Get a task from Vannaka."); - tolna = new ObjectStep(this, 13968, new WorldPoint(3310, 3452, 0), + tolna = new ObjectStep(this, ObjectID.SOULBANE_FALLOFF2_ROPE_MULTI, new WorldPoint(3310, 3452, 0), "Enter the Tolna dungeon."); tpDigsite = new DetailedQuestStep(this, "Rub the digsite pendant and select the 'Digsite' teleport.", @@ -268,7 +269,7 @@ public void setupSteps() maho20 = new NpcStep(this, NpcID.POH_SAWMILL_OPP, new WorldPoint(3302, 3492, 0), "Make 20 mahogany planks at the sawmill in ONE run.", mahoLog.quantity(20), coins.quantity(30000)); - balloon = new ObjectStep(this, 19143, new WorldPoint(3297, 3482, 0), + balloon = new ObjectStep(this, ObjectID.ZEP_MULTI_BASKET_VARR, new WorldPoint(3297, 3482, 0), "Use the basket east of Varrock to fly to any available destination.", willowLog1); moveToEntrana = new NpcStep(this, NpcID.SHIPMONK1_C, new WorldPoint(3048, 3236, 0), "Speak with a monk to travel to Entrana.", true, willowLog11); @@ -276,7 +277,7 @@ public void setupSteps() talkToAug = new NpcStep(this, NpcID.ZEP_PICCARD, new WorldPoint(2810, 3356, 0), "Speak with Augustine and travel to Varrock.", willowLog11); - whiteFruit = new ObjectStep(this, 9209, new WorldPoint(3230, 3475, 0), + whiteFruit = new ObjectStep(this, ObjectID.GARDEN_WHITE_TREE_PATCH, new WorldPoint(3230, 3475, 0), "Pick a white tree fruit at Varrock Castle."); varrAgi = new ObjectStep(this, ObjectID.ROOFTOPS_VARROCK_WALLCLIMB, new WorldPoint(3221, 3414, 0), "Complete a lap of the Varrock rooftop course."); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/westernprovinces/WesternMedium.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/westernprovinces/WesternMedium.java index 754ce2a4e80..b87bae14cd1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/westernprovinces/WesternMedium.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/westernprovinces/WesternMedium.java @@ -279,7 +279,7 @@ public void setupSteps() agiShortcut = new ObjectStep(this, ObjectID.GNOME_STRONGHOLD_SC_ROCK_TOP, new WorldPoint(2487, 3515, 0), "Take the agility shortcut from the Grand Tree to Otto's Grotto."); - moveToEagle = new ObjectStep(this, 19790, new WorldPoint(2329, 3495, 0), + moveToEagle = new ObjectStep(this, ObjectID.EAGLEPEAK_ENTRANCE_CAVE_MULTI, new WorldPoint(2329, 3495, 0), "Enter the cave at the top of Eagles' Peak. " + "You can use a fairy ring to (AKQ), then head south to get there easily.", rope); eagleFeldip = new NpcStep(this, NpcID.EAGLEPEAK_EAGLE_TOJUNGLE, new WorldPoint(2027, 4964, 3), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/wilderness/WildernessEasy.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/wilderness/WildernessEasy.java index 53846a4d43f..2a139a97e84 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/wilderness/WildernessEasy.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/achievementdiaries/wilderness/WildernessEasy.java @@ -50,6 +50,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.gameval.VarPlayerID; import java.util.ArrayList; @@ -151,7 +152,7 @@ protected void setupRequirements() notEnterAbyss = new VarplayerRequirement(VarPlayerID.WILDERNESS_ACHIEVEMENT_DIARY, false, 11); notEquipTeamCape = new VarplayerRequirement(VarPlayerID.WILDERNESS_ACHIEVEMENT_DIARY, false, 12); - firstTimeAbyss = new VarbitRequirement(626, 1); + firstTimeAbyss = new VarbitRequirement(VarbitID.RCU_ABYSSAL_WARNING, 1); normalBook = new SpellbookRequirement(Spellbook.NORMAL); chaosAccess = new ItemRequirement("Access to the Chaos altar", @@ -204,7 +205,7 @@ public void setupSteps() equipTeamCape = new DetailedQuestStep(this, "Equip a team cape. If you already have one on, re-equip it.", teamCape.equipped()); - chaosTemple = new ObjectStep(this, 34822, new WorldPoint(3060, 3591, 0), + chaosTemple = new ObjectStep(this, ObjectID.CHAOSTEMPLE_RUINED, new WorldPoint(3060, 3591, 0), "Enter the chaos altar north of Edgeville with a chaos talisman/tiara, or enter it through the Abyss."); chaosTemple.addIcon(ItemID.CHAOS_TALISMAN); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/barbariantraining/BarbarianTraining.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/barbariantraining/BarbarianTraining.java index 55ab7657130..236a4060673 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/barbariantraining/BarbarianTraining.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/barbariantraining/BarbarianTraining.java @@ -41,7 +41,6 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.player.SkillRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.quest.QuestRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.runelite.RuneliteRequirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicType; import net.runelite.client.plugins.microbot.questhelper.requirements.widget.WidgetTextRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; @@ -157,7 +156,7 @@ public Map loadSteps() firemakingSteps.setLockingCondition(finishedFiremaking); pyreSteps = new ConditionalStep(this, talkToOttoAboutPyre); - pyreSteps.addStep(LogicHelper.and(sacrificedRemains), talkToOttoAfterPyre); + pyreSteps.addStep(and(sacrificedRemains), talkToOttoAfterPyre); pyreSteps.addStep(and(taskedWithPyre, chewedBones.alsoCheckBank(questBank)), useLogOnPyre); pyreSteps.addStep(and(taskedWithPyre, chewedBonesNearby), pickupChewedBones); pyreSteps.addStep(and(taskedWithPyre, inAncientCavernArrivalRoom), enterWhirlpool); @@ -179,14 +178,14 @@ public Map loadSteps() spearAndHastaeSteps.setLockingCondition(finishedHasta); ConditionalStep allSteps = new ConditionalStep(this, fishingSteps); - allSteps.addStep(LogicHelper.nor(finishedFishing), fishingSteps); - allSteps.addStep(LogicHelper.nor(finishedHerblore), herbloreSteps); - allSteps.addStep(LogicHelper.nor(finishedHarpoon), harpoonSteps); - allSteps.addStep(LogicHelper.nor(finishedSeedPlanting), seedSteps); - allSteps.addStep(LogicHelper.nor(finishedPotSmashing), potSmashingSteps); - allSteps.addStep(LogicHelper.nor(finishedFiremaking), firemakingSteps); + allSteps.addStep(nor(finishedFishing), fishingSteps); + allSteps.addStep(nor(finishedHerblore), herbloreSteps); + allSteps.addStep(nor(finishedHarpoon), harpoonSteps); + allSteps.addStep(nor(finishedSeedPlanting), seedSteps); + allSteps.addStep(nor(finishedPotSmashing), potSmashingSteps); + allSteps.addStep(nor(finishedFiremaking), firemakingSteps); allSteps.addStep(nand(finishedSpear, finishedHasta), spearAndHastaeSteps); - allSteps.addStep(LogicHelper.nor(finishedPyre), pyreSteps); + allSteps.addStep(nor(finishedPyre), pyreSteps); allSteps.addDialogSteps("Let's talk about my training.", "I seek more knowledge."); allSteps.setCheckAllChildStepsOnListenerCall(true); @@ -667,7 +666,8 @@ public List getItemRequirements() bow, oakLogs, tinderbox, axe, feathers, knife, hammer, bronzeBar.quantity(2), logs.quantity(3), - attackPotion, roe); + attackPotion, roe, + antifireShield, combatGear); } @Override @@ -676,6 +676,12 @@ public List getItemRecommended() return Arrays.asList(gamesNecklace.quantity(5), catherbyTeleport); } + @Override + public List getCombatRequirements() + { + return Collections.singletonList("Mithril Dragon (level 304)"); + } + @Override public List getNotes() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/curseoftheemptylord/CurseOfTheEmptyLord.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/curseoftheemptylord/CurseOfTheEmptyLord.java index fa4876ad22f..8880cc50aae 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/curseoftheemptylord/CurseOfTheEmptyLord.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/curseoftheemptylord/CurseOfTheEmptyLord.java @@ -43,13 +43,13 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; import java.util.*; public class CurseOfTheEmptyLord extends BasicQuestHelper { - private final int PATH_VARBIT = 815; private int currentPath = 0; //Items Required @@ -105,7 +105,7 @@ public void onVarbitChanged(VarbitChanged varbitChanged) { if (currentPath == 0) { - int newPath = client.getVarbitValue(PATH_VARBIT); + int newPath = client.getVarbitValue(VarbitID.SECRET_GHOST_RANDOMISER); if (newPath != 0) { currentPath = newPath; @@ -122,26 +122,26 @@ protected void setupRequirements() ghostspeakItems = new ItemRequirement("Ghostspeak amulet or Morytania legs 2 or better", ItemID.AMULET_OF_GHOSTSPEAK, 1, true).isNotConsumed(); ghostspeakItems.addAlternates(ItemID.MORYTANIA_LEGS_MEDIUM, ItemID.MORYTANIA_LEGS_HARD, ItemID.MORYTANIA_LEGS_ELITE); - knife = new ItemRequirement("Knife", ItemID.KNIFE).showConditioned(new VarbitRequirement(PATH_VARBIT, 3)).isNotConsumed(); + knife = new ItemRequirement("Knife", ItemID.KNIFE).showConditioned(new VarbitRequirement(VarbitID.SECRET_GHOST_RANDOMISER, 3)).isNotConsumed(); } public void setupConditions() { - talkedToValdez = new VarbitRequirement(816, 1); - talkedToRennard = new VarbitRequirement(817, 1); - talkedToKharrim = new VarbitRequirement(818, 1); - talkedToLennissa = new VarbitRequirement(819, 1); - talkedToDhalak = new VarbitRequirement(820, 1); - talkedToViggora = new VarbitRequirement(821, 1); + talkedToValdez = new VarbitRequirement(VarbitID.SECRET_GHOST1_BACKSTORY, 1); + talkedToRennard = new VarbitRequirement(VarbitID.SECRET_GHOST2_BACKSTORY, 1); + talkedToKharrim = new VarbitRequirement(VarbitID.SECRET_GHOST3_BACKSTORY, 1); + talkedToLennissa = new VarbitRequirement(VarbitID.SECRET_GHOST4_BACKSTORY, 1); + talkedToDhalak = new VarbitRequirement(VarbitID.SECRET_GHOST5_BACKSTORY, 1); + talkedToViggora = new VarbitRequirement(VarbitID.SECRET_GHOST6_BACKSTORY, 1); inEdgevilleDungeon = new ZoneRequirement(edgevilleDungeon); inRoguesCastle = new ZoneRequirement(roguesCastleFirstFloor); inSlayerTower = new ZoneRequirement(slayerTowerFirstFloor); inEdgevilleMonastery = new ZoneRequirement(edgevilleMonastery); inPartyRoom = new ZoneRequirement(partyRoom); - onPath1 = new VarbitRequirement(PATH_VARBIT, 1); - onPath2 = new VarbitRequirement(PATH_VARBIT, 2); - onPath3 = new VarbitRequirement(PATH_VARBIT, 3); + onPath1 = new VarbitRequirement(VarbitID.SECRET_GHOST_RANDOMISER, 1); + onPath2 = new VarbitRequirement(VarbitID.SECRET_GHOST_RANDOMISER, 2); + onPath3 = new VarbitRequirement(VarbitID.SECRET_GHOST_RANDOMISER, 3); } @Override @@ -156,7 +156,7 @@ protected void setupZones() public void setupSteps() { - int pathID = client.getVarbitValue(PATH_VARBIT); + int pathID = client.getVarbitValue(VarbitID.SECRET_GHOST_RANDOMISER); talkToValdez = new NpcStep(this, NpcID.SECRET_GHOST_EXPLORER, new WorldPoint(2556, 3445, 0), "Talk to the Mysterious Ghost outside Glarial's Tomb.", ghostspeakItems, ringOfVis); talkToValdez.addDialogStep("Tell me your story"); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/daddyshome/DaddysHome.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/daddyshome/DaddysHome.java index 736bba75696..f13bddc1830 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/daddyshome/DaddysHome.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/daddyshome/DaddysHome.java @@ -27,93 +27,127 @@ import net.runelite.client.plugins.microbot.questhelper.collections.ItemCollections; import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; -import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.or; +import net.runelite.client.plugins.microbot.questhelper.requirements.util.Operation; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.widget.WidgetHighlight; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; +import net.runelite.api.gameval.InterfaceID; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; - -import java.util.*; +import net.runelite.api.gameval.VarbitID; public class DaddysHome extends BasicQuestHelper { - //Items Required - ItemRequirement plank10, nails20, bolt5, hammer, saw, waxwoodLog3, waxwoodPlank3, bolt2, - bolt3, nails2, nails4, plank, plank3, plank2; - - //Items Recommended - ItemRequirement lumberyardTeleport, varrockTeleport3; - - Requirement removedChair, removedTable, removedTable2, removedStool, removedStool2, removedCampbed, - removedCarpet, repairedCampbed, repairedCarpet, repairedStool, repairedTable, repairedChair, - repairedStool2, repairedTable2; - - //NPC Steps - DetailedQuestStep talkToMarlo, talkToYarlo, talkToYarloAgain, talkToOperator, talkToYarloOnceMore, talkToMarloToFinish; - - //Object/items Steps - DetailedQuestStep removeChair, removeCarpet, removeStool, removeStool2, removeTable, - removeTable2, removeCampbed, searchCrate, buildChair, buildCarpet, buildStool, - buildStool2, buildTable, buildTable2, buildCampbed; - - @Override - public Map loadSteps() - { - initializeRequirements(); - setupConditions(); - setupSteps(); - Map steps = new HashMap<>(); - - steps.put(0, talkToMarlo); - steps.put(1, talkToYarlo); - - ConditionalStep removeItems = new ConditionalStep(this, removeCampbed); - removeItems.addStep(new Conditions(removedCampbed, removedCarpet, removedStool, removedTable, removedChair, removedStool2, removedTable2), talkToYarloAgain); - removeItems.addStep(new Conditions(removedCampbed, removedCarpet, removedStool, removedTable, removedChair, removedStool2), removeTable2); - removeItems.addStep(new Conditions(removedCampbed, removedCarpet, removedStool, removedTable, removedChair), removeStool2); - removeItems.addStep(new Conditions(removedCampbed, removedCarpet, removedStool, removedTable), removeChair); - removeItems.addStep(new Conditions(removedCampbed, removedCarpet, removedStool), removeTable); - removeItems.addStep(new Conditions(removedCampbed, removedCarpet), removeStool); - removeItems.addStep(removedCampbed, removeCarpet); - - steps.put(2, removeItems); - steps.put(3, talkToYarloAgain); - steps.put(4, talkToYarloAgain); - - ConditionalStep repairFurniture = new ConditionalStep(this, buildCarpet); - repairFurniture.addStep(new Conditions(repairedCarpet, repairedStool, repairedTable, repairedChair, repairedStool2, repairedTable2, repairedCampbed), talkToYarloOnceMore); - repairFurniture.addStep(new Conditions(repairedCarpet, repairedStool, repairedTable, repairedChair, repairedStool2, repairedTable2, waxwoodPlank3), buildCampbed); - repairFurniture.addStep(new Conditions(repairedCarpet, repairedStool, repairedTable, repairedChair, repairedStool2, repairedTable2, waxwoodLog3), talkToOperator); - repairFurniture.addStep(new Conditions(repairedCarpet, repairedStool, repairedTable, repairedChair, repairedStool2, repairedTable2), searchCrate); - repairFurniture.addStep(new Conditions(repairedCarpet, repairedStool, repairedTable, repairedChair, repairedStool2), buildTable2); - repairFurniture.addStep(new Conditions(repairedCarpet, repairedStool, repairedTable, repairedChair), buildStool2); - repairFurniture.addStep(new Conditions(repairedCarpet, repairedStool, repairedTable), buildChair); - repairFurniture.addStep(new Conditions(repairedCarpet, repairedStool), buildTable); - repairFurniture.addStep(new Conditions(repairedCarpet), buildStool); - - steps.put(5, repairFurniture); - steps.put(6, repairFurniture); - steps.put(7, repairFurniture); - steps.put(8, repairFurniture); - steps.put(9, repairFurniture); - - steps.put(10, talkToMarloToFinish); - steps.put(11, talkToMarloToFinish); - steps.put(12, talkToMarloToFinish); - - return steps; - } + // Required items + ItemRequirement plank10; + ItemRequirement nails20; + ItemRequirement bolt5; + ItemRequirement saw; + ItemRequirement hammer; + + // Recommended items + ItemRequirement lumberyardTeleport; + ItemRequirement varrockTeleport3; + + // Miscellaneous requirements + ItemRequirement waxwoodLog3; + ItemRequirement waxwoodPlank3; + ItemRequirement bolt2; + ItemRequirement bolt3; + ItemRequirement nails2; + ItemRequirement nails4; + ItemRequirement plank; + ItemRequirement plank3; + ItemRequirement plank2; + + VarbitRequirement needToRemoveCampbed; + VarbitRequirement needToRemoveCarpet; + VarbitRequirement needToRemoveStool; + VarbitRequirement needToRemoveTable; + VarbitRequirement needToRemoveChair; + VarbitRequirement needToRemoveStool2; + VarbitRequirement needToRemoveTable2; + Conditions needToRemoveAnyFurniture; + + VarbitRequirement needToBuildCarpet; + VarbitRequirement needToBuildStool; + VarbitRequirement needToBuildTable; + VarbitRequirement needToBuildChair; + VarbitRequirement needToBuildStool2; + VarbitRequirement needToBuildTable2; + Conditions needToBuildSimpleFurniture; + + VarbitRequirement needToBuildCampbed; + + // Steps + NpcStep talkToMarlo; + + NpcStep talkToYarlo; + + ObjectStep removeCampbed; + ObjectStep removeCarpet; + ObjectStep removeStool; + ObjectStep removeTable; + ObjectStep removeChair; + ObjectStep removeStool2; + ObjectStep removeTable2; + NpcStep talkToYarloAfterRemovingFurniture; + ConditionalStep removeFurniture; + + ObjectStep buildCarpet; + ObjectStep buildStool; + ObjectStep buildTable; + ObjectStep buildChair; + ObjectStep buildStool2; + ObjectStep buildTable2; + ConditionalStep buildSimpleFurniture; + + ObjectStep searchCrate; + NpcStep talkToOperator; + ObjectStep buildCampbed; + + NpcStep talkToYarloAfterBuildingFurniture; + + NpcStep talkToMarloToFinish; @Override protected void setupRequirements() { + needToRemoveCampbed = new VarbitRequirement(VarbitID.DADDYSHOME_BED, 2, Operation.LESS); + needToRemoveCarpet = new VarbitRequirement(VarbitID.DADDYSHOME_CARPET, 2, Operation.LESS); + needToRemoveStool = new VarbitRequirement(VarbitID.DADDYSHOME_STOOL_2, 2, Operation.LESS); + needToRemoveTable = new VarbitRequirement(VarbitID.DADDYSHOME_TABLE_2, 2, Operation.LESS); + needToRemoveChair = new VarbitRequirement(VarbitID.DADDYSHOME_CHAIR, 2, Operation.LESS); + needToRemoveStool2 = new VarbitRequirement(VarbitID.DADDYSHOME_STOOL_1, 2, Operation.LESS); + needToRemoveTable2 = new VarbitRequirement(VarbitID.DADDYSHOME_TABLE_1, 2, Operation.LESS); + needToRemoveAnyFurniture = or(needToRemoveCampbed, needToRemoveCarpet, needToRemoveStool, needToRemoveTable, needToRemoveChair, needToRemoveStool2); + + needToBuildCarpet = new VarbitRequirement(VarbitID.DADDYSHOME_CARPET, 3, Operation.LESS); + needToBuildStool = new VarbitRequirement(VarbitID.DADDYSHOME_STOOL_2, 3, Operation.LESS); + needToBuildTable = new VarbitRequirement(VarbitID.DADDYSHOME_TABLE_2, 3, Operation.LESS); + needToBuildChair = new VarbitRequirement(VarbitID.DADDYSHOME_CHAIR, 3, Operation.LESS); + needToBuildStool2 = new VarbitRequirement(VarbitID.DADDYSHOME_STOOL_1, 3, Operation.LESS); + needToBuildTable2 = new VarbitRequirement(VarbitID.DADDYSHOME_TABLE_1, 3, Operation.LESS); + needToBuildSimpleFurniture = or(needToBuildCarpet, needToBuildStool, needToBuildTable, needToBuildChair, needToBuildStool2, needToBuildTable2); + + needToBuildCampbed = new VarbitRequirement(VarbitID.DADDYSHOME_BED, 3, Operation.LESS); + plank10 = new ItemRequirement("Plank", ItemID.WOODPLANK, 10); bolt5 = new ItemRequirement("Bolt of cloth", ItemID.CLOTH, 5); nails20 = new ItemRequirement("Nails (bring more in case you fail with some)", ItemCollections.NAILS, 14); @@ -133,89 +167,140 @@ protected void setupRequirements() varrockTeleport3 = new ItemRequirement("Varrock Teleports", ItemID.POH_TABLET_VARROCKTELEPORT, 3); } - public void setupConditions() + public void setupSteps() { + talkToMarlo = new NpcStep(this, NpcID.CON_CONTRACTOR_VARROCK_1OP, new WorldPoint(3241, 3471, 0), "Talk to Marlo in north-east Varrock."); + talkToMarlo.addAlternateNpcs(NpcID.CON_CONTRACTOR_VARROCK_2OP); + talkToMarlo.addDialogSteps("What kind of favour do you want me to do?", "Tell me more about the job.", "Tell me where he lives, and I'll do the job."); - removedCampbed = new VarbitRequirement(10568, 2); - removedCarpet = new VarbitRequirement(10569, 2); - removedStool = new VarbitRequirement(10564, 2); - - removedTable = new VarbitRequirement(10567, 2); - removedChair = new VarbitRequirement(10565, 2); - removedStool2 = new VarbitRequirement(10563, 2); - removedTable2 = new VarbitRequirement(10566, 2); + talkToYarlo = new NpcStep(this, NpcID.DADDYSHOME_DADDY, new WorldPoint(3240, 3395, 0), "Talk to Old Man Yarlo in south-east Varrock, west of Aubury's Rune Shop."); + + removeCampbed = new ObjectStep(this, ObjectID.DADDYSHOME_BED, new WorldPoint(3242, 3398, 0), "Remove the campbed."); + removeCarpet = new ObjectStep(this, ObjectID.DADDYSHOME_CARPET_MIDDLE, new WorldPoint(3239, 3395, 0), "Right-click remove the rotten carpet."); + removeStool = new ObjectStep(this, ObjectID.DADDYSHOME_STOOL_2, new WorldPoint(3239, 3394, 0), "Demolish the broken stool."); + removeTable = new ObjectStep(this, ObjectID.DADDYSHOME_TABLE_2, new WorldPoint(3240, 3394, 0), "Demolish the broken table."); + removeChair = new ObjectStep(this, ObjectID.DADDYSHOME_CHAIR, new WorldPoint(3241, 3393, 0), "Demolish the broken chair."); + removeStool2 = new ObjectStep(this, ObjectID.DADDYSHOME_STOOL_1, new WorldPoint(3244, 3394, 0), "Demolish the other broken stool."); + removeTable2 = new ObjectStep(this, ObjectID.DADDYSHOME_TABLE_1, new WorldPoint(3245, 3394, 0), "Demolish the other broken table."); + + talkToYarloAfterRemovingFurniture = new NpcStep(this, NpcID.DADDYSHOME_DADDY, new WorldPoint(3240, 3395, 0), "Talk to Old Man Yarlo again after removing all the broken furniture."); + talkToYarloAfterRemovingFurniture.addDialogStep("Skip Yarlo's lecture. He'll offer it later if you like."); + + removeFurniture = new ConditionalStep(this, removeTable2, "Remove the broken furniture in Old Man Yarlo's house."); + removeFurniture.addStep(needToRemoveCampbed, removeCampbed); + removeFurniture.addStep(needToRemoveCarpet, removeCarpet); + removeFurniture.addStep(needToRemoveStool, removeStool); + removeFurniture.addStep(needToRemoveTable, removeTable); + removeFurniture.addStep(needToRemoveChair, removeChair); + removeFurniture.addStep(needToRemoveStool2, removeStool2); + + var highlightFirstOption = new WidgetHighlight(InterfaceID.PohFurnitureCreation._01); + buildCarpet = new ObjectStep(this, ObjectID.DADDYSHOME_CARPET_MIDDLE, new WorldPoint(3239, 3395, 0), "Right-click build the carpet.", bolt3, saw, hammer); + buildCarpet.addWidgetHighlight(highlightFirstOption); + buildStool = new ObjectStep(this, ObjectID.DADDYSHOME_STOOL_2, new WorldPoint(3239, 3394, 0), "Build the stool.", plank, nails2, saw, hammer); + buildStool.addWidgetHighlight(highlightFirstOption); + buildTable = new ObjectStep(this, ObjectID.DADDYSHOME_TABLE_2, new WorldPoint(3240, 3394, 0), "Build the table.", plank3, nails4, saw, hammer); + buildTable.addWidgetHighlight(highlightFirstOption); + buildChair = new ObjectStep(this, ObjectID.DADDYSHOME_CHAIR, new WorldPoint(3241, 3393, 0), "Build the chair.", plank2, nails2, saw, hammer); + buildChair.addWidgetHighlight(highlightFirstOption); + buildStool2 = new ObjectStep(this, ObjectID.DADDYSHOME_STOOL_1, new WorldPoint(3244, 3394, 0), "Build the other stool.", plank, nails2, saw, hammer); + buildStool2.addWidgetHighlight(highlightFirstOption); + buildTable2 = new ObjectStep(this, ObjectID.DADDYSHOME_TABLE_1, new WorldPoint(3245, 3394, 0), "Build the other table.", plank3, nails4, saw, hammer); + buildTable2.addWidgetHighlight(highlightFirstOption); + + buildSimpleFurniture = new ConditionalStep(this, buildTable2, "Rebuild the furniture in Old Man Yarlo's house."); + buildSimpleFurniture.addStep(needToBuildCarpet, buildCarpet); + buildSimpleFurniture.addStep(needToBuildStool, buildStool); + buildSimpleFurniture.addStep(needToBuildTable, buildTable); + buildSimpleFurniture.addStep(needToBuildChair, buildChair); + buildSimpleFurniture.addStep(needToBuildStool2, buildStool2); + + searchCrate = new ObjectStep(this, ObjectID.DADDYSHOME_CRATES, new WorldPoint(3243, 3398, 0), "Search the crates in Old Man Yarlo's house for waxwood logs."); + + talkToOperator = new NpcStep(this, NpcID.POH_SAWMILL_OPP, new WorldPoint(3302, 3492, 0), "Talk to the Sawmill operator north-east of Varrock to make waxwood planks.", waxwoodLog3); + talkToOperator.addDialogStep("I need some waxwood planks for Old Man Yarlo."); + talkToOperator.addTeleport(lumberyardTeleport); + buildCampbed = new ObjectStep(this, ObjectID.DADDYSHOME_BED, new WorldPoint(3242, 3398, 0), "Build the waxwood bed in Old Man Yarlo's house.", waxwoodPlank3, bolt2, hammer, saw); + buildCampbed.addWidgetHighlight(highlightFirstOption); + buildCampbed.addTeleport(varrockTeleport3.quantity(1)); - repairedCampbed = new VarbitRequirement(10568, 3); - repairedCarpet = new VarbitRequirement(10569, 3); - repairedStool = new VarbitRequirement(10564, 3); + talkToYarloAfterBuildingFurniture = new NpcStep(this, NpcID.DADDYSHOME_DADDY, new WorldPoint(3240, 3395, 0), "Talk to Old Man Yarlo again after rebuilding the furniture."); - repairedTable = new VarbitRequirement(10567, 3); - repairedChair = new VarbitRequirement(10565, 3); - repairedStool2 = new VarbitRequirement(10563, 3); - repairedTable2 = new VarbitRequirement(10566, 3); + talkToMarloToFinish = new NpcStep(this, NpcID.CON_CONTRACTOR_VARROCK_1OP, new WorldPoint(3241, 3471, 0), "Talk to Marlo in north-east Varrock to complete the quest."); + talkToMarloToFinish.addAlternateNpcs(NpcID.CON_CONTRACTOR_VARROCK_2OP); + talkToMarloToFinish.addDialogStep("Yeah, what have you got for me?"); } - public void setupSteps() + @Override + public Map loadSteps() { - talkToMarlo = new NpcStep(this, NpcID.CON_CONTRACTOR_VARROCK_1OP, new WorldPoint(3241, 3471, 0), "Talk to Marlo in north east Varrock."); - ((NpcStep) talkToMarlo).addAlternateNpcs(NpcID.CON_CONTRACTOR_VARROCK_2OP); - talkToMarlo.addDialogSteps("What kind of favour do you want me to do?", "Tell me more about the job.", "Tell me where he lives, and I'll do the job."); - talkToYarlo = new NpcStep(this, NpcID.DADDYSHOME_DADDY, new WorldPoint(3240, 3395, 0), "Talk to Old Man Yarlo in south Varrock."); - talkToYarloAgain = new NpcStep(this, NpcID.DADDYSHOME_DADDY, new WorldPoint(3240, 3395, 0), "Talk to Old Man Yarlo in south Varrock again."); - talkToYarloAgain.addDialogStep("Skip Yarlo's lecture. He'll offer it later if you like."); - talkToYarloOnceMore = new NpcStep(this, NpcID.DADDYSHOME_DADDY, new WorldPoint(3240, 3395, 0), "Talk to Old Man Yarlo in south Varrock."); + initializeRequirements(); + setupSteps(); - talkToMarloToFinish = new NpcStep(this, NpcID.CON_CONTRACTOR_VARROCK_1OP, new WorldPoint(3241, 3471, 0), "Talk to Marlo in north east Varrock to complete the quest."); - ((NpcStep) talkToMarloToFinish).addAlternateNpcs(NpcID.CON_CONTRACTOR_VARROCK_2OP); - talkToMarloToFinish.addDialogStep("Yeah, what have you got for me?"); + var steps = new HashMap(); - removeCampbed = new ObjectStep(this, ObjectID.DADDYSHOME_BED, new WorldPoint(3242, 3398, 0), "Remove the broken items in the house."); - removeCarpet = new ObjectStep(this, ObjectID.DADDYSHOME_CARPET_MIDDLE, new WorldPoint(3239, 3395, 0), "Remove the broken items in the house."); - removeStool = new ObjectStep(this, ObjectID.DADDYSHOME_STOOL_2, new WorldPoint(3239, 3394, 0), "Remove the broken items in the house."); - removeTable = new ObjectStep(this, ObjectID.DADDYSHOME_TABLE_2, new WorldPoint(3240, 3394, 0), "Remove the broken items in the house."); - removeChair = new ObjectStep(this, ObjectID.DADDYSHOME_CHAIR, new WorldPoint(3241, 3393, 0), "Remove the broken items in the house."); - removeTable2 = new ObjectStep(this, ObjectID.DADDYSHOME_TABLE_1, new WorldPoint(3245, 3394, 0), "Remove the broken items in the house."); - removeStool2 = new ObjectStep(this, ObjectID.DADDYSHOME_STOOL_1, new WorldPoint(3244, 3394, 0), "Remove the broken items in the house."); + steps.put(0, talkToMarlo); + steps.put(1, talkToYarlo); - removeCampbed.addSubSteps(removeCarpet, removeStool, removeTable, removeChair, removeTable2, removeStool2); + var cRemoveFurniture = new ConditionalStep(this, talkToYarloAfterRemovingFurniture); + cRemoveFurniture.addStep(needToRemoveAnyFurniture, removeFurniture); + steps.put(2, cRemoveFurniture); - searchCrate = new ObjectStep(this, ObjectID.DADDYSHOME_CRATES, new WorldPoint(3243, 3398, 0), "Search the crates in Yarlo's house for waxwood logs."); + steps.put(3, talkToYarloAfterRemovingFurniture); + steps.put(4, talkToYarloAfterRemovingFurniture); - talkToOperator = new NpcStep(this, NpcID.POH_SAWMILL_OPP, new WorldPoint(3302, 3492, 0), "Talk to the Sawmill Operator north east of Varrock to make waxwood planks.", waxwoodLog3); - talkToOperator.addDialogStep("I need some waxwood planks for Old Man Yarlo."); - buildCampbed = new ObjectStep(this, ObjectID.DADDYSHOME_BED, new WorldPoint(3242, 3398, 0), "Build the waxwood bed in the house.", waxwoodPlank3, bolt2, hammer, saw); - - buildCarpet = new ObjectStep(this, ObjectID.DADDYSHOME_CARPET_MIDDLE, new WorldPoint(3239, 3395, 0), "Build the items in the house.", bolt3, saw, hammer); - buildStool = new ObjectStep(this, ObjectID.DADDYSHOME_STOOL_2, new WorldPoint(3239, 3394, 0), "Build the items in the house.", plank, nails2, saw, hammer); - buildTable = new ObjectStep(this, ObjectID.DADDYSHOME_TABLE_2, new WorldPoint(3240, 3394, 0), "Build the items in the house.", plank3, nails4, saw, hammer); - buildChair = new ObjectStep(this, ObjectID.DADDYSHOME_CHAIR, new WorldPoint(3241, 3393, 0), "Build the items in the house.", plank2, nails2, saw, hammer); - buildTable2 = new ObjectStep(this, ObjectID.DADDYSHOME_TABLE_1, new WorldPoint(3245, 3394, 0), "Build the items in the house.", plank3, nails4, saw, hammer); - buildStool2 = new ObjectStep(this, ObjectID.DADDYSHOME_STOOL_1, new WorldPoint(3244, 3394, 0), "Build the items in the house.", plank, nails2, saw, hammer); - buildCarpet.addSubSteps(buildStool, buildTable, buildChair, buildTable2, buildStool2); + var cRepairFurniture = new ConditionalStep(this, talkToYarloAfterBuildingFurniture); + cRepairFurniture.addStep(needToBuildSimpleFurniture, buildSimpleFurniture); + cRepairFurniture.addStep(and(needToBuildCampbed, waxwoodPlank3.alsoCheckBank(questBank)), buildCampbed); + cRepairFurniture.addStep(and(needToBuildCampbed, waxwoodLog3.alsoCheckBank(questBank)), talkToOperator); + cRepairFurniture.addStep(needToBuildCampbed, searchCrate); + + steps.put(5, cRepairFurniture); + steps.put(6, cRepairFurniture); + steps.put(7, cRepairFurniture); // unreachable? + steps.put(8, cRepairFurniture); // unreachable? + steps.put(9, cRepairFurniture); // unreachable? + + steps.put(10, talkToMarloToFinish); + steps.put(11, talkToMarloToFinish); // unreachable? + steps.put(12, talkToMarloToFinish); + + return steps; } @Override public List getItemRequirements() { - return Arrays.asList(plank10, nails20, bolt5, saw, hammer); + return List.of( + plank10, + nails20, + bolt5, + saw, + hammer + ); } @Override public List getItemRecommended() { - return Arrays.asList(lumberyardTeleport, varrockTeleport3); + return List.of( + lumberyardTeleport, + varrockTeleport3 + ); } @Override public List getExperienceRewards() { - return Collections.singletonList(new ExperienceReward(Skill.CONSTRUCTION, 400)); + return List.of( + new ExperienceReward(Skill.CONSTRUCTION, 400) + ); } @Override public List getItemRewards() { - return Arrays.asList( + return List.of( new ItemReward("Planks", ItemID.WOODPLANK, 25), new ItemReward("Oak Planks", ItemID.PLANK_OAK, 10), new ItemReward("Mithril Nails", ItemID.NAILS_MITHRIL, 50), @@ -223,14 +308,34 @@ public List getItemRewards() new ItemReward("Bolt of Cloth", ItemID.CLOTH, 8), new ItemReward("House Teleport Tablets", ItemID.POH_TABLET_TELEPORTTOHOUSE, 5), new ItemReward("Falador Teleport Tablet", ItemID.POH_TABLET_FALADORTELEPORT, 1), - new ItemReward("POH in Rimmington or 1,000 Coins", ItemID.COINS, 1)); + new ItemReward("POH in Rimmington or 1,000 Coins", ItemID.COINS, 1) + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); - allSteps.add(new PanelDetails("Helping Yarlo & Marlo", Arrays.asList(talkToMarlo, talkToYarlo, removeCampbed, talkToYarloAgain, buildCarpet, searchCrate, talkToOperator, buildCampbed, talkToYarloOnceMore, talkToMarloToFinish), plank10, nails20, bolt5, hammer, saw)); - return allSteps; + var sections = new ArrayList(); + + sections.add(new PanelDetails("Helping Yarlo & Marlo", List.of( + talkToMarlo, + talkToYarlo, + removeFurniture, + talkToYarloAfterRemovingFurniture, + buildSimpleFurniture, + searchCrate, + talkToOperator, + buildCampbed, + talkToYarloAfterBuildingFurniture, + talkToMarloToFinish + ), List.of( + plank10, + nails20, + bolt5, + hammer, + saw + ))); + + return sections; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/enchantedkey/EnchantedKeyDigStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/enchantedkey/EnchantedKeyDigStep.java index 39db869d834..834e7eafca1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/enchantedkey/EnchantedKeyDigStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/enchantedkey/EnchantedKeyDigStep.java @@ -38,6 +38,7 @@ import net.runelite.api.events.ChatMessage; import net.runelite.api.events.VarbitChanged; import net.runelite.api.gameval.ItemID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; import net.runelite.client.game.ItemManager; import net.runelite.client.ui.overlay.OverlayUtil; @@ -120,7 +121,7 @@ public void onVarbitChanged(VarbitChanged varbitChanged) public void resetState() { setWorldPoint(null); - int locationStates = client.getVarbitValue(1391); + int locationStates = client.getVarbitValue(VarbitID.MAKINGHISTORY_LOCSTATUS); Set locations = Arrays.stream(EnchantedKeyDigLocation.values()).filter(p -> ((locationStates >> p.getBit()) & 1) == 0) .collect(Collectors.toSet()); if (enchantedKeySolver != null) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/familypest/FamilyPest.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/familypest/FamilyPest.java index 885c5bfc1b7..82db2ecd9ca 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/familypest/FamilyPest.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/familypest/FamilyPest.java @@ -45,6 +45,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -123,9 +124,9 @@ public void setupConditions() { upJollyBoar = new ZoneRequirement(upstairsJollyBoar); - talkedToCaleb = new VarbitRequirement(5348, 1); - talkedToAvan = new VarbitRequirement(5349, 1); - talkedToJohnathon = new VarbitRequirement(5350, 1); + talkedToCaleb = new VarbitRequirement(VarbitID.FAMILY_QUEST_CALEB, 1); + talkedToAvan = new VarbitRequirement(VarbitID.FAMILY_QUEST_AVAN, 1); + talkedToJohnathon = new VarbitRequirement(VarbitID.FAMILY_QUEST_JOHNATHON, 1); } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/hopespearswill/HopespearsWill.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/hopespearswill/HopespearsWill.java index 3219882398d..5a3f56e05ea 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/hopespearswill/HopespearsWill.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/hopespearswill/HopespearsWill.java @@ -38,7 +38,6 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.player.SkillRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.quest.QuestRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.util.ItemSlots; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicType; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.widget.WidgetTextRequirement; @@ -52,6 +51,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -113,11 +113,11 @@ public Map loadSteps() defeatGoblins.addStep(nor(hasStrongbonesBones), sayNameStrongbones); ConditionalStep buryBones = new ConditionalStep(this, goToYubiusk); - buryBones.addStep(LogicHelper.nor(snotheadBuried), burySnothead); - buryBones.addStep(LogicHelper.nor(snailfeetBuried), burySnailfeet); - buryBones.addStep(LogicHelper.nor(mosschinBuried), buryMosschin); - buryBones.addStep(LogicHelper.nor(redeyesBuried), buryRedeyes); - buryBones.addStep(LogicHelper.nor(strongbonesBuried), buryStrongbones); + buryBones.addStep(nor(snotheadBuried), burySnothead); + buryBones.addStep(nor(snailfeetBuried), burySnailfeet); + buryBones.addStep(nor(mosschinBuried), buryMosschin); + buryBones.addStep(nor(redeyesBuried), buryRedeyes); + buryBones.addStep(nor(strongbonesBuried), buryStrongbones); ConditionalStep finishQuest = new ConditionalStep(this, goToGoblinCaveAfterStart); finishQuest.addStep(new Conditions(inYubiusk, hasAllBones), buryBones); @@ -168,7 +168,7 @@ protected void setupRequirements() inGoblinCave = new ZoneRequirement(goblinCave); nothingEquipped = new NoItemRequirement("No items equipped", ItemSlots.ANY_EQUIPPED); goblinWidgetActive = new WidgetTextRequirement(739, 2, 1, "Select Your Goblin"); - isAGoblin = new VarbitRequirement(13612, 1); + isAGoblin = new VarbitRequirement(VarbitID.LOTG_PLAYER_IS_A_GOBLIN, 1); inGoblinTemple = new ZoneRequirement(goblinTemple); isInCrypt = new ZoneRequirement(crypt); inYubiusk = new ZoneRequirement(yubiusk); @@ -179,11 +179,11 @@ protected void setupRequirements() redeyesAlive = new NpcRequirement("Redeyes", NpcID.LOTG_GOBLIN_SKELETON_HIGH_PRIEST4); strongbonesAlive = new NpcRequirement("Strongbones", NpcID.LOTG_GOBLIN_SKELETON_HIGH_PRIEST5); - snotheadBuried = new VarbitRequirement(13620, 1); - snailfeetBuried = new VarbitRequirement(13621, 1); - mosschinBuried = new VarbitRequirement(13622, 1); - redeyesBuried = new VarbitRequirement(13623, 1); - strongbonesBuried = new VarbitRequirement(13624, 1); + snotheadBuried = new VarbitRequirement(VarbitID.HOPESPEAR_PRIEST_1, 1); + snailfeetBuried = new VarbitRequirement(VarbitID.HOPESPEAR_PRIEST_2, 1); + mosschinBuried = new VarbitRequirement(VarbitID.HOPESPEAR_PRIEST_3, 1); + redeyesBuried = new VarbitRequirement(VarbitID.HOPESPEAR_PRIEST_4, 1); + strongbonesBuried = new VarbitRequirement(VarbitID.HOPESPEAR_PRIEST_5, 1); hasSnotheadBones = new Conditions(LogicType.OR, snotheadBones, snotheadBuried); hasSnailfeetBones = new Conditions(LogicType.OR, snailfeetBones, snailfeetBuried); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/lairoftarnrazorlor/TarnRoute.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/lairoftarnrazorlor/TarnRoute.java index db538577b9d..98e3576b6bc 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/lairoftarnrazorlor/TarnRoute.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/lairoftarnrazorlor/TarnRoute.java @@ -42,11 +42,11 @@ import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; import net.runelite.api.Prayer; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.SpriteID; import net.runelite.api.gameval.VarbitID; import java.util.Arrays; @@ -267,10 +267,10 @@ public void setupSteps() searchWall2Room6 = new ObjectStep(questHelper, ObjectID.LOTR_TRAP_SPEAR_WALL_LVL1, new WorldPoint(3154, 4605, 1), "Follow the path to the east."); goThroughRoom6 = new ObjectStep(questHelper, ObjectID.LOTR_RUINS_DOOR_28A, new WorldPoint(3176, 4598, 1), "Follow the path to the east. Avoid the walls which will occasionally stick out and knock you down, marked with a skull."); - goThroughRoom6.addTileMarker(new WorldPoint(3162, 4600, 1), SpriteID.PLAYER_KILLER_SKULL); - goThroughRoom6.addTileMarker(new WorldPoint(3164, 4600, 1), SpriteID.PLAYER_KILLER_SKULL); - goThroughRoom6.addTileMarker(new WorldPoint(3171, 4600, 1), SpriteID.PLAYER_KILLER_SKULL); - goThroughRoom6.addTileMarker(new WorldPoint(3173, 4600, 1), SpriteID.PLAYER_KILLER_SKULL); + goThroughRoom6.addTileMarker(new WorldPoint(3162, 4600, 1), SpriteID.HEADICONS_PK); + goThroughRoom6.addTileMarker(new WorldPoint(3164, 4600, 1), SpriteID.HEADICONS_PK); + goThroughRoom6.addTileMarker(new WorldPoint(3171, 4600, 1), SpriteID.HEADICONS_PK); + goThroughRoom6.addTileMarker(new WorldPoint(3173, 4600, 1), SpriteID.HEADICONS_PK); goThroughRoom6.addSubSteps(searchWallRoom6, searchWall2Room6); goThroughRoom7 = new ObjectStep(questHelper, ObjectID.LOTR_RUINS_STAIRS_LVL1, new WorldPoint(3193, 4598, 1), "Activate Protect from Magic and jump across the pillars. Go down the stairs.", protectFromMagic); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/skippyandthemogres/SkippyAndTheMogres.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/skippyandthemogres/SkippyAndTheMogres.java index b6ec25093df..483b4f8f426 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/skippyandthemogres/SkippyAndTheMogres.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/skippyandthemogres/SkippyAndTheMogres.java @@ -123,7 +123,7 @@ public List getUnlockRewards() { return Arrays.asList( new UnlockReward("Ability to kill Mogres"), - new UnlockReward("Ability to recieve Mogres as a Slayer task")); + new UnlockReward("Ability to receive Mogres as a Slayer task")); } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/thegeneralsshadow/TheGeneralsShadow.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/thegeneralsshadow/TheGeneralsShadow.java index 88d6b5cda7d..d5796b4ee26 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/thegeneralsshadow/TheGeneralsShadow.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/thegeneralsshadow/TheGeneralsShadow.java @@ -51,6 +51,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -164,11 +165,11 @@ public void setupConditions() inBouncerCave = new ZoneRequirement(bouncerCave); hasNote = sinSeersNote; - givenNote = new VarbitRequirement(3335, 2); - talkedToGnomeScout = new VarbitRequirement(3332, 1); - talkedToFaladorScout = new VarbitRequirement(3333, 1); - talkedToShantayScout = new VarbitRequirement(3334, 1); - talkedToKaramjaScout = new VarbitRequirement(3331, 1); + givenNote = new VarbitRequirement(VarbitID.SHADOW_MAJ_SEER, 2); + talkedToGnomeScout = new VarbitRequirement(VarbitID.SHADOW_MAJ_SCOUT2, 1); + talkedToFaladorScout = new VarbitRequirement(VarbitID.SHADOW_MAJ_SCOUT3, 1); + talkedToShantayScout = new VarbitRequirement(VarbitID.SHADOW_MAJ_SCOUT4, 1); + talkedToKaramjaScout = new VarbitRequirement(VarbitID.SHADOW_MAJ_SCOUT1, 1); // 3336 0->2 attempted to bribe Seer // 3335 0->1 given money to Seer diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/themagearenaii/MageArenaBossStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/themagearenaii/MageArenaBossStep.java index da59db179ab..ea706a9128c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/themagearenaii/MageArenaBossStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/themagearenaii/MageArenaBossStep.java @@ -39,6 +39,7 @@ import net.runelite.api.events.ChatMessage; import net.runelite.api.events.VarbitChanged; import net.runelite.api.gameval.ItemID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; import net.runelite.client.game.ItemManager; import net.runelite.client.ui.overlay.OverlayUtil; @@ -82,8 +83,6 @@ public class MageArenaBossStep extends DetailedQuestStep int currentVar = 0; - final int BOSS_MOVING_TIMER_VARBIT = 6062; - public MageArenaBossStep(QuestHelper questHelper, ItemRequirement staff, String bossName, String abilityDetail, ItemRequirement... requirements) { @@ -151,7 +150,7 @@ else if (digLocations.size() < 1) public void onVarbitChanged(VarbitChanged varbitChanged) { super.onVarbitChanged(varbitChanged); - int newState = client.getVarbitValue(BOSS_MOVING_TIMER_VARBIT); + int newState = client.getVarbitValue(VarbitID.MA2_TIMER_REMAINING); // If the position of the bosses changes, reset if (newState > currentVar) @@ -254,7 +253,7 @@ public void update(final String message) public void startUp() { super.startUp(); - currentVar = client.getVarbitValue(BOSS_MOVING_TIMER_VARBIT); + currentVar = client.getVarbitValue(VarbitID.MA2_TIMER_REMAINING); Set locations = Arrays.stream(MageArenaSpawnLocation.values()) .collect(Collectors.toSet()); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/themagearenaii/TheMageArenaII.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/themagearenaii/TheMageArenaII.java index 1af94ccd9af..66082620962 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/themagearenaii/TheMageArenaII.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/themagearenaii/TheMageArenaII.java @@ -46,6 +46,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -141,9 +142,9 @@ public void setupConditions() { inCavern = new ZoneRequirement(cavern); - givenHand = new VarbitRequirement(6063, 1); - givenRoots = new VarbitRequirement(6064, 1); - givenHeart = new VarbitRequirement(6065, 1); + givenHand = new VarbitRequirement(VarbitID.MA2_SARADOMIN_COMPONENT, 1); + givenRoots = new VarbitRequirement(VarbitID.MA2_GUTHIX_COMPONENT, 1); + givenHeart = new VarbitRequirement(VarbitID.MA2_ZAMORAK_COMPONENT, 1); // Handed in hand: // 6066, 6063 0->1 // 6066 varies 0->7 (3 bits) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/valetotems/ValeTotems.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/valetotems/ValeTotems.java new file mode 100644 index 00000000000..411e998c0b1 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/miniquests/valetotems/ValeTotems.java @@ -0,0 +1,333 @@ +/* + * Copyright (c) 2025, pajlada + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.plugins.microbot.questhelper.helpers.miniquests.valetotems; + +import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; +import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; +import net.runelite.client.plugins.microbot.questhelper.questinfo.QuestHelperQuest; +import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; +import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.player.SkillRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.quest.QuestRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.or; +import net.runelite.client.plugins.microbot.questhelper.requirements.util.Operation; +import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; +import net.runelite.client.plugins.microbot.questhelper.rewards.UnlockReward; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.widget.WidgetHighlight; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import net.runelite.api.QuestState; +import net.runelite.api.Skill; +import net.runelite.api.coords.WorldPoint; +import net.runelite.api.gameval.ItemID; +import net.runelite.api.gameval.NpcID; +import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; + +/** + * The quest guide for the "Vale Totems" OSRS quest + */ +public class ValeTotems extends BasicQuestHelper +{ + // Item requirements + ItemRequirement knife; + ItemRequirement oneOakLog; + ItemRequirement fourDecorativeItems; + ItemRequirement threeDecorativeItems; + ItemRequirement twoDecorativeItems; + ItemRequirement oneDecorativeItem; + + // Miscellaneous requirements + VarbitRequirement needToBuildTotem; + VarbitRequirement isTotemBaseBuilt; + + VarbitRequirement needToCarveAnimals; + + Conditions isBuffaloNearby; + Conditions isJaguarNearby; + Conditions isEagleNearby; + Conditions isSnakeNearby; + Conditions isScorpionNearby; + + Conditions missingBuffaloCarve; + Conditions missingJaguarCarve; + Conditions missingEagleCarve; + Conditions missingSnakeCarve; + Conditions missingScorpionCarve; + + VarbitRequirement isDoneCarving; + + VarbitRequirement needToDecorate; + + VarbitRequirement oneShieldAdded; + VarbitRequirement twoShieldsAdded; + VarbitRequirement threeShieldsAdded; + VarbitRequirement isDoneDecorating; + + // Steps + NpcStep startQuest; + + ObjectStep buildTotemBase; + + ObjectStep carveAnimalsYouSee; + ConditionalStep carveTotem; + NpcStep talkToIsadoraAfterCarvingTotem; + ConditionalStep decorateTotem; + ObjectStep decorateTotemFourShields; + NpcStep talkToIsadoraAfterDecoratingTotem; + ConditionalStep carveAndDecorateTotem; + + QuestStep claimOffering; + + QuestStep finishQuest; + NpcStep talkToIsadoraToLearnAboutCarving; + + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + steps.put(0, startQuest); + steps.put(10, startQuest); + steps.put(20, startQuest); + steps.put(30, carveAndDecorateTotem); + steps.put(40, talkToIsadoraAfterDecoratingTotem); + steps.put(50, claimOffering); + steps.put(60, finishQuest); + + return steps; + } + + @Override + protected void setupRequirements() + { + knife = new ItemRequirement("Knife", ItemID.KNIFE); + knife.setTooltip("There's a knife upstairs in the General Store south of the miniquest start point"); + oneOakLog = new ItemRequirement("Oak log", ItemID.OAK_LOGS, 1); + oneOakLog.setTooltip("You can also use Willow, Maple, Yew, Magic, or Redwood logs, but it needs to match the decorative items you're bringing."); + + var possibleDecorativeItems = List.of(ItemID.OAK_SHIELD, ItemID.UNSTRUNG_OAK_LONGBOW, ItemID.OAK_LONGBOW, ItemID.UNSTRUNG_OAK_SHORTBOW, ItemID.OAK_SHORTBOW); + + fourDecorativeItems = new ItemRequirement("Oak shield/longbow/shortbow", possibleDecorativeItems, 4); + fourDecorativeItems.setTooltip("You can also use Willow, Maple, Yew, Magic, or Redwood decorative items, but it needs to match the logs you used to build the totem."); + threeDecorativeItems = new ItemRequirement("Oak shield/longbow/shortbow", possibleDecorativeItems, 3); + threeDecorativeItems.setTooltip("You can also use Willow, Maple, Yew, Magic, or Redwood decorative items, but it needs to match the logs you used to build the totem."); + twoDecorativeItems = new ItemRequirement("Oak shield/longbow/shortbow", possibleDecorativeItems, 2); + twoDecorativeItems.setTooltip("You can also use Willow, Maple, Yew, Magic, or Redwood decorative items, but it needs to match the logs you used to build the totem."); + oneDecorativeItem = new ItemRequirement("Oak shield/longbow/shortbow", possibleDecorativeItems, 1); + oneDecorativeItem.setTooltip("You can also use Willow, Maple, Yew, Magic, or Redwood decorative items, but it needs to match the logs you used to build the totem."); + + needToBuildTotem = new VarbitRequirement(VarbitID.ENT_TOTEMS_BROKEN_CHAT, 1); + isTotemBaseBuilt = new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_BASE, 1); + + isBuffaloNearby = or( + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_ANIMAL_1, 1), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_ANIMAL_2, 1), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_ANIMAL_3, 1) + ); + isJaguarNearby = or( + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_ANIMAL_1, 2), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_ANIMAL_2, 2), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_ANIMAL_3, 2) + ); + isEagleNearby = or( + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_ANIMAL_1, 3), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_ANIMAL_2, 3), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_ANIMAL_3, 3) + ); + isSnakeNearby = or( + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_ANIMAL_1, 4), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_ANIMAL_2, 4), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_ANIMAL_3, 4) + ); + isScorpionNearby = or( + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_ANIMAL_1, 5), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_ANIMAL_2, 5), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_ANIMAL_3, 5) + ); + + missingBuffaloCarve = and( + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_LOW, 10, Operation.NOT_EQUAL), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_MID, 10, Operation.NOT_EQUAL), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_TOP, 10, Operation.NOT_EQUAL) + ); + + missingJaguarCarve = and( + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_LOW, 11, Operation.NOT_EQUAL), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_MID, 11, Operation.NOT_EQUAL), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_TOP, 11, Operation.NOT_EQUAL) + ); + + missingEagleCarve = and( + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_LOW, 12, Operation.NOT_EQUAL), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_MID, 12, Operation.NOT_EQUAL), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_TOP, 12, Operation.NOT_EQUAL) + ); + + missingSnakeCarve = and( + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_LOW, 13, Operation.NOT_EQUAL), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_MID, 13, Operation.NOT_EQUAL), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_TOP, 13, Operation.NOT_EQUAL) + ); + + missingScorpionCarve = and( + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_LOW, 14, Operation.NOT_EQUAL), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_MID, 14, Operation.NOT_EQUAL), + new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_TOP, 14, Operation.NOT_EQUAL) + ); + + isDoneCarving = new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_BASE_CARVED, 1); + + needToCarveAnimals = new VarbitRequirement(VarbitID.ENT_TOTEMS_CARVE_CHAT, 1); + needToDecorate = new VarbitRequirement(VarbitID.ENT_TOTEMS_DECORATE_CHAT, 1); + + oneShieldAdded = new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_DECORATIONS, 1); + twoShieldsAdded = new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_DECORATIONS, 2); + threeShieldsAdded = new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_DECORATIONS, 3); + isDoneDecorating = new VarbitRequirement(VarbitID.ENT_TOTEMS_SITE_1_DECORATIONS, 4); + } + + public void setupSteps() + { + startQuest = new NpcStep(this, new int[]{NpcID.ENT_TOTEMS_INTRO_RANULPH, NpcID.ENT_TOTEMS_INTRO_RANULPH_1OP, NpcID.ENT_TOTEMS_INTRO_RANULPH_2OP, NpcID.ENT_TOTEMS_INTRO_RANULPH_CS,}, new WorldPoint(1365, 3366, 0), "Talk to Ranulph in the west part of Auburnvale to start the quest."); + startQuest.addDialogStep("Yes."); + + buildTotemBase = new ObjectStep(this, ObjectID.ENT_TOTEMS_BASE_NONE, new WorldPoint(1370, 3375, 0), "Build the totem site.", knife, oneOakLog); + + talkToIsadoraToLearnAboutCarving = new NpcStep(this, NpcID.ENT_TOTEMS_INTRO_CHILD_VIS, new WorldPoint(1366, 3369, 0), "Talk to Isadora to learn about carving."); + talkToIsadoraAfterCarvingTotem = new NpcStep(this, NpcID.ENT_TOTEMS_INTRO_CHILD_VIS, new WorldPoint(1366, 3369, 0), "Return to Isadora after carving the spirit animals into the totem."); + + var carveBuffalo = new ObjectStep(this, ObjectID.ENT_TOTEMS_SITE_1_BASE, new WorldPoint(1370, 3375, 0), "Carve a Buffalo into the totem base."); + carveBuffalo.addWidgetHighlight(WidgetHighlight.createMultiskillByName("Buffalo")); + + var carveJaguar = new ObjectStep(this, ObjectID.ENT_TOTEMS_SITE_1_BASE, new WorldPoint(1370, 3375, 0), "Carve a Jaguar into the totem base."); + carveJaguar.addWidgetHighlight(WidgetHighlight.createMultiskillByName("Jaguar")); + + var carveEagle = new ObjectStep(this, ObjectID.ENT_TOTEMS_SITE_1_BASE, new WorldPoint(1370, 3375, 0), "Carve a Eagle into the totem base."); + carveEagle.addWidgetHighlight(WidgetHighlight.createMultiskillByName("Eagle")); + + var carveSnake = new ObjectStep(this, ObjectID.ENT_TOTEMS_SITE_1_BASE, new WorldPoint(1370, 3375, 0), "Carve a Snake into the totem base."); + carveSnake.addWidgetHighlight(WidgetHighlight.createMultiskillByName("Snake")); + + var carveScorpion = new ObjectStep(this, ObjectID.ENT_TOTEMS_SITE_1_BASE, new WorldPoint(1370, 3375, 0), "Carve a Scorpion into the totem base."); + carveScorpion.addWidgetHighlight(WidgetHighlight.createMultiskillByName("Scorpion")); + + // fallback step in case our detection fails + carveAnimalsYouSee = new ObjectStep(this, ObjectID.ENT_TOTEMS_SITE_1_BASE, new WorldPoint(1370, 3375, 0), "Carve spirit animals you see into the totem."); + carveAnimalsYouSee.addSubSteps(carveBuffalo, carveJaguar, carveEagle, carveSnake, carveScorpion); + + carveTotem = new ConditionalStep(this, carveAnimalsYouSee); + carveTotem.addStep(and(isBuffaloNearby, missingBuffaloCarve), carveBuffalo); + carveTotem.addStep(and(isJaguarNearby, missingJaguarCarve), carveJaguar); + carveTotem.addStep(and(isEagleNearby, missingEagleCarve), carveEagle); + carveTotem.addStep(and(isSnakeNearby, missingSnakeCarve), carveSnake); + carveTotem.addStep(and(isScorpionNearby, missingScorpionCarve), carveScorpion); + + var decorateTotemOneShield = new ObjectStep(this, ObjectID.ENT_TOTEMS_SITE_1_BASE, new WorldPoint(1370, 3375, 0), "Decorate the totem with one decorative item (shield, longbow, or shortbow) of the same wood type you used to build/carve the totem.", oneDecorativeItem); + var decorateTotemTwoShields = new ObjectStep(this, ObjectID.ENT_TOTEMS_SITE_1_BASE, new WorldPoint(1370, 3375, 0), "Decorate the totem with two decorative items (shield, longbow, or shortbow) of the same wood type you used to build/carve the totem.", twoDecorativeItems); + var decorateTotemThreeShields = new ObjectStep(this, ObjectID.ENT_TOTEMS_SITE_1_BASE, new WorldPoint(1370, 3375, 0), "Decorate the totem with three decorative items (shield, longbow, or shortbow) of the same wood type you used to build/carve the totem.", threeDecorativeItems); + decorateTotemFourShields = new ObjectStep(this, ObjectID.ENT_TOTEMS_SITE_1_BASE, new WorldPoint(1370, 3375, 0), "Decorate the totem with four decorative items (shield, longbow, or shortbow) of the same wood type you used to build/carve the totem.", fourDecorativeItems); + decorateTotemFourShields.addSubSteps(decorateTotemOneShield, decorateTotemTwoShields, decorateTotemThreeShields); + talkToIsadoraAfterDecoratingTotem = new NpcStep(this, NpcID.ENT_TOTEMS_INTRO_CHILD_VIS, new WorldPoint(1366, 3369, 0), "Return to Isadora to talk after decorating the totem."); + decorateTotem = new ConditionalStep(this, decorateTotemFourShields); + decorateTotem.addStep(oneShieldAdded, decorateTotemThreeShields); + decorateTotem.addStep(twoShieldsAdded, decorateTotemTwoShields); + decorateTotem.addStep(threeShieldsAdded, decorateTotemOneShield); + + carveAndDecorateTotem = new ConditionalStep(this, startQuest); + carveAndDecorateTotem.addStep(isDoneDecorating, talkToIsadoraAfterDecoratingTotem); + carveAndDecorateTotem.addStep(needToDecorate, decorateTotem); + carveAndDecorateTotem.addStep(isDoneCarving, talkToIsadoraAfterCarvingTotem); + carveAndDecorateTotem.addStep(needToCarveAnimals, carveTotem); + carveAndDecorateTotem.addStep(isTotemBaseBuilt, talkToIsadoraToLearnAboutCarving); + carveAndDecorateTotem.addStep(needToBuildTotem, buildTotemBase); + + claimOffering = new ObjectStep(this, ObjectID.ENT_TOTEMS_OFFERINGS_B, new WorldPoint(1370, 3374, 0), "Claim the offering the Ent left next to your totem."); + finishQuest = new NpcStep(this, NpcID.ENT_TOTEMS_INTRO_CHILD_VIS, new WorldPoint(1366, 3369, 0), "Return to Isadora to finish the quest."); + } + + @Override + public List getItemRequirements() + { + return List.of( + knife, + oneOakLog, + fourDecorativeItems + ); + } + + @Override + public List getGeneralRequirements() + { + return List.of( + new QuestRequirement(QuestHelperQuest.CHILDREN_OF_THE_SUN, QuestState.FINISHED), + new SkillRequirement(Skill.FLETCHING, 20) + ); + } + + @Override + public List getUnlockRewards() + { + return List.of( + new UnlockReward("Unlocks the Auburnvale fletching minigame") + ); + } + + @Override + public List getPanels() + { + var panels = new ArrayList(); + + panels.add(new PanelDetails("Repair the totem", List.of( + startQuest, + buildTotemBase, + talkToIsadoraToLearnAboutCarving, + carveAnimalsYouSee, + talkToIsadoraAfterCarvingTotem, + decorateTotemFourShields, + talkToIsadoraAfterDecoratingTotem, + claimOffering, + finishQuest + ), List.of( + knife, + oneOakLog, + fourDecorativeItems + ))); + + return panels; + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/allneededitems/AllNeededItems.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/allneededitems/AllNeededItems.java index f6786e5f4f3..568f13f0e1b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/allneededitems/AllNeededItems.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/allneededitems/AllNeededItems.java @@ -30,7 +30,7 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; -import net.runelite.api.SpriteID; +import net.runelite.api.gameval.SpriteID; import java.util.*; @@ -49,7 +49,7 @@ public QuestStep loadStep() " need without running this helper if you activate it in the Quest Helper settings.", new ArrayList<>(reqs.values())); step1.hideRequirements = true; step1.considerBankForItemHighlight = true; - step1.iconToUseForNeededItems = SpriteID.TAB_QUESTS; + step1.iconToUseForNeededItems = SpriteID.SideiconsInterface.QUESTS; step1.setBackgroundWorldTooltipText("Highlighted due to the config setting 'Highlight missing items' in Quest Helper."); return step1; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingHandler.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingHandler.java index ec9f23dad18..ca5117cb143 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingHandler.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingHandler.java @@ -25,7 +25,7 @@ package net.runelite.client.plugins.microbot.questhelper.helpers.mischelpers.farmruns; import net.runelite.api.Client; -import net.runelite.api.Varbits; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.config.ConfigManager; import net.runelite.client.plugins.timetracking.TimeTrackingConfig; import net.runelite.client.plugins.timetracking.farming.Produce; @@ -99,7 +99,7 @@ public CropState predictPatch(FarmingPatch patch, String profile) int stages = state.getStages(); int tickrate = state.getTickRate(); - boolean botanist = client.getVarbitValue(Varbits.LEAGUE_RELIC_5) == 1; + boolean botanist = client.getVarbitValue(VarbitID.LEAGUE_RELIC_SELECTION_4) == 1; if (botanist) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingPatch.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingPatch.java index 01c49e4e82b..9d635f7c69c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingPatch.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingPatch.java @@ -53,22 +53,22 @@ public class FarmingPatch @Getter private final Shape patchArea; - FarmingPatch(String name, @Varbit int varbit, PatchImplementation implementation, WorldPoint location) + public FarmingPatch(String name, @Varbit int varbit, PatchImplementation implementation, WorldPoint location) { this(name, varbit, implementation, location, new Polygon(), -1); } - FarmingPatch(String name, @Varbit int varbit, PatchImplementation implementation, WorldPoint location, Shape patchArea) + public FarmingPatch(String name, @Varbit int varbit, PatchImplementation implementation, WorldPoint location, Shape patchArea) { this(name, varbit, implementation, location, patchArea, -1, -1); } - FarmingPatch(String name, @Varbit int varbit, PatchImplementation implementation, WorldPoint location, Shape patchArea, int farmer) + public FarmingPatch(String name, @Varbit int varbit, PatchImplementation implementation, WorldPoint location, Shape patchArea, int farmer) { this(name, varbit, implementation, location, patchArea, farmer, -1); } - FarmingPatch(String name, @Varbit int varbit, PatchImplementation implementation, WorldPoint location, Shape patchArea, int farmer, int patchNumber) + public FarmingPatch(String name, @Varbit int varbit, PatchImplementation implementation, WorldPoint location, Shape patchArea, int farmer, int patchNumber) { this.name = name; this.varbit = varbit; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingRegion.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingRegion.java index 76bd405804b..9091fa01d10 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingRegion.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingRegion.java @@ -24,22 +24,16 @@ */ package net.runelite.client.plugins.microbot.questhelper.helpers.mischelpers.farmruns; -import java.util.Collections; -import java.util.HashSet; import lombok.Getter; import net.runelite.api.coords.WorldPoint; -import java.util.Set; -import org.jetbrains.annotations.NotNull; - @Getter -public class FarmingRegion implements Comparable +public class FarmingRegion { private final String name; private final int regionID; private final boolean definite; private final FarmingPatch[] patches; - private final Set regionIDs; FarmingRegion(String name, int regionID, boolean definite, FarmingPatch... patches) { @@ -47,56 +41,21 @@ public class FarmingRegion implements Comparable this.regionID = regionID; this.definite = definite; this.patches = patches; - this.regionIDs = Set.of(regionID); for (FarmingPatch p : patches) { p.setRegion(this); } } - FarmingRegion(String name, int regionID, boolean definite, Set regionIDs, FarmingPatch... patches) - { - this.name = name; - this.regionID = regionID; - this.definite = definite; - this.patches = patches; - - Set allRegionIds = new HashSet<>(regionIDs); - allRegionIds.add(regionID); - this.regionIDs = Collections.unmodifiableSet(allRegionIds); - - for (FarmingPatch p : patches) - { - p.setRegion(this); - } - } - - /** - * Check if the given WorldPoint is within this farming region - * Checks if the point's regionID is in this region's regionIDs set - * - * @param loc The WorldPoint to check - * @return true if the point is within this farming region - */ public boolean isInBounds(WorldPoint loc) { - return regionIDs.contains(loc.getRegionID()); + return true; } @Override public String toString() { - String sb = "FarmingRegion{name='" + name + '\'' + - ", regionID=" + regionID + - ", definite=" + definite + - ", patches=" + patches.length + - '}'; - return sb; + return name; } +} - @Override - public int compareTo(@NotNull FarmingRegion o) - { - return Integer.compare(regionID, o.getRegionID()); - } -} \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingUtils.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingUtils.java index 53ce93e3ff6..71b8dcf22f2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingUtils.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingUtils.java @@ -30,7 +30,7 @@ import java.util.ArrayList; import java.util.List; import net.runelite.api.Client; -import net.runelite.api.ItemID; +import net.runelite.api.gameval.ItemID; import net.runelite.client.config.ConfigManager; import net.runelite.client.game.ItemManager; import net.runelite.client.util.Text; @@ -170,9 +170,11 @@ default ItemRequirement getProtectionItemRequirement(ItemManager itemManager) public enum TreeSapling implements PlantableItem { - OAK(ItemID.OAK_SAPLING, ItemID.TOMATOES5, 1), WILLOW(ItemID.WILLOW_SAPLING, ItemID.APPLES5, 1), - MAPLE(ItemID.MAPLE_SAPLING, ItemID.ORANGES5, 1), YEW(ItemID.YEW_SAPLING, ItemID.CACTUS_SPINE, 10), - MAGIC(ItemID.MAGIC_SAPLING, ItemID.COCONUT, 25); + OAK(ItemID.PLANTPOT_OAK_SAPLING, ItemID.BASKET_TOMATO_5, 1), + WILLOW(ItemID.PLANTPOT_WILLOW_SAPLING, ItemID.BASKET_APPLE_5, 1), + MAPLE(ItemID.PLANTPOT_MAPLE_SAPLING, ItemID.BASKET_ORANGE_5, 1), + YEW(ItemID.PLANTPOT_YEW_SAPLING, ItemID.CACTUS_SPINE, 10), + MAGIC(ItemID.PLANTPOT_MAGIC_TREE_SAPLING, ItemID.COCONUT, 25); final int treeSaplingID; final int protectionItemId; @@ -218,10 +220,14 @@ public ConfigEnum getDefault() public enum FruitTreeSapling implements PlantableItem { - APPLE(ItemID.APPLE_SAPLING, ItemID.SWEETCORN, 9), BANANA(ItemID.BANANA_SAPLING, ItemID.APPLES5, 4), - ORANGE(ItemID.ORANGE_SAPLING, ItemID.STRAWBERRIES5, 3), CURRY(ItemID.CURRY_SAPLING, ItemID.BANANAS5, 5), - PINEAPPLE(ItemID.PINEAPPLE_SAPLING, ItemID.WATERMELON, 10), PAPAYA(ItemID.PAPAYA_SAPLING, ItemID.PINEAPPLE, 10), - PALM(ItemID.PALM_SAPLING, ItemID.PAPAYA_FRUIT, 15), DRAGONFRUIT(ItemID.DRAGONFRUIT_SAPLING, ItemID.COCONUT, 15); + APPLE(ItemID.PLANTPOT_APPLE_SAPLING, ItemID.SWEETCORN, 9), + BANANA(ItemID.PLANTPOT_BANANA_SAPLING, ItemID.BASKET_APPLE_5, 4), + ORANGE(ItemID.PLANTPOT_ORANGE_SAPLING, ItemID.BASKET_STRAWBERRY_5, 3), + CURRY(ItemID.PLANTPOT_CURRY_SAPLING, ItemID.BASKET_BANANA_5, 5), + PINEAPPLE(ItemID.PLANTPOT_PINEAPPLE_SAPLING, ItemID.WATERMELON, 10), + PAPAYA(ItemID.PLANTPOT_PAPAYA_SAPLING, ItemID.PINEAPPLE, 10), + PALM(ItemID.PLANTPOT_PALM_SAPLING, ItemID.PAPAYA, 15), + DRAGONFRUIT(ItemID.PLANTPOT_DRAGONFRUIT_SAPLING, ItemID.COCONUT, 15); final int fruitTreeSaplingId; final int protectionItemId; @@ -267,8 +273,8 @@ public ConfigEnum getDefault() public enum HardwoodTreeSapling implements PlantableItem { - TEAK(ItemID.TEAK_SAPLING, ItemID.LIMPWURT_ROOT, 15), - MAHOGANY(ItemID.MAHOGANY_SAPLING, ItemID.YANILLIAN_HOPS, 25); + TEAK(ItemID.PLANTPOT_TEAK_SAPLING, ItemID.LIMPWURT_ROOT, 15), + MAHOGANY(ItemID.PLANTPOT_MAHOGANY_SAPLING, ItemID.YANILLIAN_HOPS, 25); final int hardwoodTreeSaplingId; final int protectionItemId; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingWorld.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingWorld.java index 16b508decbf..b12ef26b41f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingWorld.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/FarmingWorld.java @@ -29,13 +29,13 @@ import com.google.common.collect.Multimap; import com.google.common.collect.Multimaps; import com.google.inject.Singleton; -import java.awt.Polygon; import lombok.Getter; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.VarbitID; import net.runelite.client.plugins.timetracking.Tab; +import java.awt.*; import java.util.*; import java.util.stream.Collectors; @@ -49,9 +49,9 @@ public class FarmingWorld private Map> tabs = new HashMap<>(); private final Comparator tabSorter = Comparator - .comparing(FarmingPatch::getImplementation) - .thenComparing((FarmingPatch p) -> p.getRegion().getName()) - .thenComparing(FarmingPatch::getName); + .comparing(FarmingPatch::getImplementation) + .thenComparing((FarmingPatch p) -> p.getRegion().getName()) + .thenComparing(FarmingPatch::getName); @Getter private final FarmingRegion farmingGuildRegion; @@ -60,120 +60,116 @@ public class FarmingWorld { // Some of these patches get updated in multiple regions. // It may be worth it to add a specialization for these patches - add(new FarmingRegion("Al Kharid", 13106, false, Set.of(13105, 13362), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.CACTUS, new WorldPoint(3317, 3203, 0), - new Polygon( - new int[]{3315, 3315, 3316, 3316}, - new int[]{3202, 3203, 3203, 3202}, - 4 - ), - NpcID.FARMING_GARDENER_CACTUS) - )); - - add(new FarmingRegion("Aldarin", 5421, false, Set.of(5165, 5166, 5422, 5677, 5678), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HOPS, new WorldPoint(1366, 2941, 0), - new Polygon( - new int[]{1363, 1363, 1366, 1366}, - new int[]{2937, 2940, 2940, 2937}, - 4 - ), - NpcID.FARMING_GARDENER_HOPS_5) - )); - - add(new FarmingRegion("Ardougne", 10290, false, Set.of(10546), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.BUSH, new WorldPoint(2616, 3226, 0), - new Polygon( - new int[]{2617, 2617, 2618, 2618}, - new int[]{3225, 3226, 3226, 3225}, - 4 - ), - NpcID.FARMING_GARDENER_BUSH_4) - )); + add(new FarmingRegion("Al Kharid", 13106, false, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.CACTUS, new WorldPoint(3317, 3203, 0), new Polygon( + new int[]{3315, 3315, 3316, 3316}, + new int[]{3202, 3203, 3203, 3202}, + 4 + ), NpcID.FARMING_GARDENER_CACTUS) + ), 13362, 13105); + + add(new FarmingRegion("Aldarin", 5421, false, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HOPS, new WorldPoint(1366, 2941, 0), + new Polygon( + new int[]{1363, 1363, 1366, 1366}, + new int[]{2937, 2940, 2940, 2937}, + 4 + ), NpcID.FARMING_GARDENER_HOPS_5) + ), 5165, 5166, 5422, 5677, 5678); + + add(new FarmingRegion("Ardougne", 10290, false, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.BUSH, new WorldPoint(2616, 3226, 0), + new Polygon( + new int[]{2617, 2617, 2618, 2618}, + new int[]{3225, 3226, 3226, 3225}, + 4 + ), NpcID.FARMING_GARDENER_BUSH_4) + ), 10546); add(new FarmingRegion("Ardougne", 10548, false, - new FarmingPatch("North", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.ALLOTMENT, new WorldPoint(2672, 3379, 0), - new Polygon( - new int[]{2662, 2662, 2671, 2671, 2663, 2663}, - new int[]{3377, 3379, 3379, 3378, 3378, 3377}, - 6 - ), - NpcID.KRAGEN, 0), - new FarmingPatch("South", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.ALLOTMENT, new WorldPoint(2672, 3371, 0), - new Polygon( - new int[]{2662, 2662, 2663, 2663, 2671, 2671}, - new int[]{3370, 3372, 3372, 3371, 3371, 3370}, - 6 - ), - NpcID.KRAGEN, 1), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.FLOWER, new WorldPoint(2668, 3375, 0), - new Polygon( - new int[]{2666, 2666, 2667, 2667}, - new int[]{3374, 3375, 3375, 3374}, - 4) - ), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_D, PatchImplementation.HERB, new WorldPoint(2672, 3375, 0), - new Polygon( - new int[]{2670, 2670, 2671, 2671}, - new int[]{3374, 3375, 3375, 3374}, - 4 - )), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_E, PatchImplementation.COMPOST, new WorldPoint(2662, 3375, 0)) - )); - - add(new FarmingRegion("Avium Savannah", 6702, true, Set.of(6446), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HARDWOOD_TREE, new WorldPoint(1685, 2971, 0), - new Polygon( - new int[]{1686, 1686, 1688, 1688}, - new int[]{2971, 2973, 2973, 2971}, - 4 - ), - NpcID.FROG_QUEST_MARCELLUS) - )); - - add(new FarmingRegion("Brimhaven", 11058, false, Set.of(11057), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.FRUIT_TREE, new WorldPoint(2766, 3213, 0), - new Polygon( - new int[]{2764, 2764, 2765, 2765}, - new int[]{3212, 3213, 3213, 3212}, - 4 - ), - NpcID.GARTH), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.SPIRIT_TREE, new WorldPoint(2800, 3202, 0), - new Polygon( - new int[]{2801, 2801, 2803, 2803}, - new int[]{3202, 3204, 3204, 3202}, - 4 - ), - NpcID.FARMING_GARDENER_SPIRIT_TREE_3) - )); - - add(new FarmingRegion("Catherby", 11062, false, Set.of(11061, 11318, 11317), - new FarmingPatch("North", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.ALLOTMENT, new WorldPoint(2814, 3466, 0), - new Polygon( - new int[]{2805, 2805, 2814, 2814, 2806, 2806}, - new int[]{3466, 3468, 3468, 3467, 3467, 3466}, - 6 - ), - NpcID.DANTAERA, 0), - new FarmingPatch("South", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.ALLOTMENT, new WorldPoint(2815, 3460, 0), - new Polygon( - new int[]{2805, 2805, 2806, 2806, 2814, 2814}, - new int[]{3459, 3461, 3461, 3460, 3460, 3459}, - 6 - ), - NpcID.DANTAERA, 1), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.FLOWER, new WorldPoint(2810, 3465, 0), - new Polygon( - new int[]{2809, 2809, 2810, 2810}, - new int[]{3463, 3464, 3464, 3463}, - 4 - )), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_D, PatchImplementation.HERB, new WorldPoint(2815, 3464, 0), - new Polygon( - new int[]{2813, 2813, 2814, 2814}, - new int[]{3463, 3464, 3464, 3463}, - 4 - )), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_E, PatchImplementation.COMPOST, new WorldPoint(2805, 3464, 0)) + new FarmingPatch("North", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.ALLOTMENT, new WorldPoint(2672, 3379, 0), + new Polygon( + new int[]{2662, 2662, 2671, 2671, 2663, 2663}, + new int[]{3377, 3379, 3379, 3378, 3378, 3377}, + 6 + ), + NpcID.KRAGEN, 0), + new FarmingPatch("South", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.ALLOTMENT, new WorldPoint(2672, 3371, 0), + new Polygon( + new int[]{2662, 2662, 2663, 2663, 2671, 2671}, + new int[]{3370, 3372, 3372, 3371, 3371, 3370}, + 6 + ), + NpcID.KRAGEN, 1), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.FLOWER, new WorldPoint(2668, 3375, 0), + new Polygon( + new int[]{2666, 2666, 2667, 2667}, + new int[]{3374, 3375, 3375, 3374}, + 4) + ), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_D, PatchImplementation.HERB, new WorldPoint(2672, 3375, 0), + new Polygon( + new int[]{2670, 2670, 2671, 2671}, + new int[]{3374, 3375, 3375, 3374}, + 4 + )), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_E, PatchImplementation.COMPOST, new WorldPoint(2662, 3375, 0)) + )); + + add(new FarmingRegion("Avium Savannah", 6702, true, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HARDWOOD_TREE, new WorldPoint(1685, 2971, 0), + new Polygon( + new int[]{1686, 1686, 1688, 1688}, + new int[]{2971, 2973, 2973, 2971}, + 4 + ), + NpcID.FROG_QUEST_MARCELLUS) + ), 6446); + + add(new FarmingRegion("Brimhaven", 11058, false, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.FRUIT_TREE, new WorldPoint(2766, 3213, 0), + new Polygon( + new int[]{2764, 2764, 2765, 2765}, + new int[]{3212, 3213, 3213, 3212}, + 4 + ), + NpcID.GARTH), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.SPIRIT_TREE, new WorldPoint(2800, 3202, 0), + new Polygon( + new int[]{2801, 2801, 2803, 2803}, + new int[]{3202, 3204, 3204, 3202}, + 4 + ), + NpcID.FARMING_GARDENER_SPIRIT_TREE_3) + ), 11057); + + add(new FarmingRegion("Catherby", 11062, false, + new FarmingPatch("North", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.ALLOTMENT, new WorldPoint(2814, 3466, 0), + new Polygon( + new int[]{2805, 2805, 2814, 2814, 2806, 2806}, + new int[]{3466, 3468, 3468, 3467, 3467, 3466}, + 6 + ), + NpcID.DANTAERA, 0), + new FarmingPatch("South", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.ALLOTMENT, new WorldPoint(2815, 3460, 0), + new Polygon( + new int[]{2805, 2805, 2806, 2806, 2814, 2814}, + new int[]{3459, 3461, 3461, 3460, 3460, 3459}, + 6 + ), + NpcID.DANTAERA, 1), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.FLOWER, new WorldPoint(2810, 3465, 0), + new Polygon( + new int[]{2809, 2809, 2810, 2810}, + new int[]{3463, 3464, 3464, 3463}, + 4 + )), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_D, PatchImplementation.HERB, new WorldPoint(2815, 3464, 0), + new Polygon( + new int[]{2813, 2813, 2814, 2814}, + new int[]{3463, 3464, 3464, 3463}, + 4 + )), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_E, PatchImplementation.COMPOST, new WorldPoint(2805, 3464, 0)) ) { @Override @@ -186,15 +182,15 @@ public boolean isInBounds(WorldPoint loc) } return true; } - }); + }, 11061, 11318, 11317); add(new FarmingRegion("Catherby", 11317, false, - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.FRUIT_TREE, new WorldPoint(2860, 3432, 0), - new Polygon( - new int[]{2860, 2860, 2861, 2861}, - new int[]{3433, 3434, 3434, 3433}, - 4 - ), - NpcID.FARMING_GARDENER_FRUIT_4) + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.FRUIT_TREE, new WorldPoint(2860, 3432, 0), + new Polygon( + new int[]{2860, 2860, 2861, 2861}, + new int[]{3433, 3434, 3434, 3433}, + 4 + ), + NpcID.FARMING_GARDENER_FRUIT_4) ) { //The fruit tree patch is always sent when upstairs in 11317 @@ -205,119 +201,120 @@ public boolean isInBounds(WorldPoint loc) } }); - add(new FarmingRegion("Civitas illa Fortis", 6192, false, Set.of(6447, 6448, 6449, 6191, 6193), - new FarmingPatch("North", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.ALLOTMENT, new WorldPoint(1586, 3102, 0), - new Polygon( - new int[]{1581, 1581, 1585, 1585, 1582, 1582}, - new int[]{3098, 3103, 3103, 3102, 3102, 3098}, - 6 - ), - NpcID.FORTIS_GARDENER, 0), - new FarmingPatch("South", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.ALLOTMENT, new WorldPoint(1591, 3098, 0), - new Polygon( - new int[]{1585, 1585, 1589, 1589, 1590, 1590}, - new int[]{3094, 3095, 3095, 3098, 3098, 3094}, - 6 - ), - NpcID.FORTIS_GARDENER, 1), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.FLOWER, new WorldPoint(1587, 3099, 0), - new Polygon( - new int[]{1585, 1585, 1586, 1586}, - new int[]{3098, 3099, 3099, 3098}, - 4 - )), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_D, PatchImplementation.HERB, new WorldPoint(1581, 3094, 0), - new Polygon( - new int[]{1581, 1581, 1582, 1582}, - new int[]{3094, 3095, 3095, 3094}, - 4 - )), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_E, PatchImplementation.COMPOST, new WorldPoint(1587, 3103, 0)) - )); + add(new FarmingRegion("Civitas illa Fortis", 6192, false, + new FarmingPatch("North", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.ALLOTMENT, new WorldPoint(1586, 3102, 0), + new Polygon( + new int[]{1581, 1581, 1585, 1585, 1582, 1582}, + new int[]{3098, 3103, 3103, 3102, 3102, 3098}, + 6 + ), + NpcID.FORTIS_GARDENER, 0), + new FarmingPatch("South", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.ALLOTMENT, new WorldPoint(1591, 3098, 0), + new Polygon( + new int[]{1585, 1585, 1589, 1589, 1590, 1590}, + new int[]{3094, 3095, 3095, 3098, 3098, 3094}, + 6 + ), + NpcID.FORTIS_GARDENER, 1), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.FLOWER, new WorldPoint(1587, 3099, 0), + new Polygon( + new int[]{1585, 1585, 1586, 1586}, + new int[]{3098, 3099, 3099, 3098}, + 4 + )), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_D, PatchImplementation.HERB, new WorldPoint(1581, 3094, 0), + new Polygon( + new int[]{1581, 1581, 1582, 1582}, + new int[]{3094, 3095, 3095, 3094}, + 4 + )), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_E, PatchImplementation.COMPOST, new WorldPoint(1587, 3103, 0)) + ), 6447, 6448, 6449, 6191, 6193); add(new FarmingRegion("Champions' Guild", 12596, true, - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.BUSH, new WorldPoint(3181, 3356, 0), - new Polygon( - new int[]{3181, 3181, 3182, 3182}, - new int[]{3357, 3358, 3358, 3357}, - 4 - ), - NpcID.FARMING_GARDENER_BUSH_1) + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.BUSH, new WorldPoint(3181, 3356, 0), + new Polygon( + new int[]{3181, 3181, 3182, 3182}, + new int[]{3357, 3358, 3358, 3357}, + 4 + ), + NpcID.FARMING_GARDENER_BUSH_1) )); add(new FarmingRegion("Draynor Manor", 12340, false, - new FarmingPatch("Belladonna", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.BELLADONNA, new WorldPoint(3088, 3355, 0), - new Polygon( - new int[]{3086, 3086, 3087, 3087}, - new int[]{3354, 3355, 3355, 3354}, - 4 - )) - )); - - add(new FarmingRegion("Entrana", 11060, false, Set.of(11316), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HOPS, new WorldPoint(2812, 3334, 0), - new Polygon( - new int[]{2809, 2809, 2812, 2812}, - new int[]{3335, 3338, 3338, 3335}, - 4 - ), - NpcID.FRANCIS) - )); + new FarmingPatch("Belladonna", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.BELLADONNA, new WorldPoint(3088, 3355, 0), + new Polygon( + new int[]{3086, 3086, 3087, 3087}, + new int[]{3354, 3355, 3355, 3354}, + 4 + )) + )); + + add(new FarmingRegion("Entrana", 11060, false, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HOPS, new WorldPoint(2812, 3334, 0), + new Polygon( + new int[]{2809, 2809, 2812, 2812}, + new int[]{3335, 3338, 3338, 3335}, + 4 + ), + NpcID.FRANCIS) + ), 11316); add(new FarmingRegion("Etceteria", 10300, false, - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.BUSH, new WorldPoint(2592, 3862, 0), - new Polygon( - new int[]{2591, 2591, 2592, 2592}, - new int[]{3863, 3864, 3864, 3863}, - 4 - ), - NpcID.FARMING_GARDENER_BUSH_3), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.SPIRIT_TREE, new WorldPoint(2613, 3856, 0), - new Polygon( - new int[]{2612, 2612, 2614, 2614}, - new int[]{3857, 3859, 3859, 3857}, - 4 - ), - NpcID.FARMING_GARDENER_SPIRIT_TREE_2) - )); + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.BUSH, new WorldPoint(2592, 3862, 0), + new Polygon( + new int[]{2591, 2591, 2592, 2592}, + new int[]{3863, 3864, 3864, 3863}, + 4 + ), + NpcID.FARMING_GARDENER_BUSH_3), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.SPIRIT_TREE, new WorldPoint(2613, 3856, 0), + new Polygon( + new int[]{2612, 2612, 2614, 2614}, + new int[]{3857, 3859, 3859, 3857}, + 4 + ), + NpcID.FARMING_GARDENER_SPIRIT_TREE_2) + )); + + add(new FarmingRegion("Falador", 11828, false, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.TREE, new WorldPoint(3004, 3371, 0), + new Polygon( + new int[]{3003, 3003, 3005, 3005}, + new int[]{3372, 3374, 3374, 3372}, + 4 + ), + NpcID.FARMING_GARDENER_TREE_2) + ), 12084); - add(new FarmingRegion("Falador", 11828, false, Set.of(12084), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.TREE, new WorldPoint(3004, 3371, 0), - new Polygon( - new int[]{3003, 3003, 3005, 3005}, - new int[]{3372, 3374, 3374, 3372}, - 4 - ), - NpcID.FARMING_GARDENER_TREE_2) - )); add(new FarmingRegion("Falador", 12083, false, - new FarmingPatch("North West", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.ALLOTMENT, new WorldPoint(3052, 3307, 0), - new Polygon( - new int[]{3050, 3050, 3054, 3054, 3051, 3051}, - new int[]{3307, 3312, 3312, 3311, 3311, 3307}, - 6 - ), - NpcID.ELSTAN, 0), - new FarmingPatch("South East", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.ALLOTMENT, new WorldPoint(3055, 3305, 0), - new Polygon( - new int[]{3055, 3055, 3058, 3058, 3059, 3059}, - new int[]{3303, 3304, 3304, 3308, 3308, 3303}, - 6 - ), - NpcID.ELSTAN, 1), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.FLOWER, new WorldPoint(3053, 3307, 0), - new Polygon( - new int[]{3054, 3054, 3055, 3055}, - new int[]{3307, 3308, 3308, 3307}, - 4 - )), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_D, PatchImplementation.HERB, new WorldPoint(3057, 3311, 0), - new Polygon( - new int[]{3058, 3058, 3059, 3059}, - new int[]{3311, 3312, 3312, 3311}, - 4 - )), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_E, PatchImplementation.COMPOST, new WorldPoint(3056, 3311, 0)) + new FarmingPatch("North West", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.ALLOTMENT, new WorldPoint(3052, 3307, 0), + new Polygon( + new int[]{3050, 3050, 3054, 3054, 3051, 3051}, + new int[]{3307, 3312, 3312, 3311, 3311, 3307}, + 6 + ), + NpcID.ELSTAN, 0), + new FarmingPatch("South East", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.ALLOTMENT, new WorldPoint(3055, 3305, 0), + new Polygon( + new int[]{3055, 3055, 3058, 3058, 3059, 3059}, + new int[]{3303, 3304, 3304, 3308, 3308, 3303}, + 6 + ), + NpcID.ELSTAN, 1), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.FLOWER, new WorldPoint(3053, 3307, 0), + new Polygon( + new int[]{3054, 3054, 3055, 3055}, + new int[]{3307, 3308, 3308, 3307}, + 4 + )), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_D, PatchImplementation.HERB, new WorldPoint(3057, 3311, 0), + new Polygon( + new int[]{3058, 3058, 3059, 3059}, + new int[]{3311, 3312, 3312, 3311}, + 4 + )), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_E, PatchImplementation.COMPOST, new WorldPoint(3056, 3311, 0)) ) { @Override @@ -328,28 +325,28 @@ public boolean isInBounds(WorldPoint loc) } }); - add(new FarmingRegion("Fossil Island", 14651, false, Set.of(14907, 14908, 15164, 14652, 14906, 14650, 15162, 15163), - new FarmingPatch("East", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HARDWOOD_TREE, new WorldPoint(3713, 3835, 0), - new Polygon( - new int[]{3714, 3714, 3716, 3716}, - new int[]{3834, 3836, 3836, 3834}, - 4 - ), - NpcID.FOSSIL_SQUIRREL_GARDENER1), - new FarmingPatch("Middle", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.HARDWOOD_TREE, new WorldPoint(3708, 3835, 0), - new Polygon( - new int[]{3707, 3707, 3709, 3709}, - new int[]{3832, 3834, 3834, 3832}, - 4 - ), - NpcID.FOSSIL_SQUIRREL_GARDENER2), - new FarmingPatch("West", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.HARDWOOD_TREE, new WorldPoint(3701, 3836, 0), - new Polygon( - new int[]{3701, 3701, 3703, 3703}, - new int[]{3836, 3838, 3838, 3836}, - 4 - ), - NpcID.FOSSIL_SQUIRREL_GARDENER3) + add(new FarmingRegion("Fossil Island", 14651, false, + new FarmingPatch("East", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HARDWOOD_TREE, new WorldPoint(3713, 3835, 0), + new Polygon( + new int[]{3714, 3714, 3716, 3716}, + new int[]{3834, 3836, 3836, 3834}, + 4 + ), + NpcID.FOSSIL_SQUIRREL_GARDENER1), + new FarmingPatch("Middle", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.HARDWOOD_TREE, new WorldPoint(3708, 3835, 0), + new Polygon( + new int[]{3707, 3707, 3709, 3709}, + new int[]{3832, 3834, 3834, 3832}, + 4 + ), + NpcID.FOSSIL_SQUIRREL_GARDENER2), + new FarmingPatch("West", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.HARDWOOD_TREE, new WorldPoint(3701, 3836, 0), + new Polygon( + new int[]{3701, 3701, 3703, 3703}, + new int[]{3836, 3838, 3838, 3836}, + 4 + ), + NpcID.FOSSIL_SQUIRREL_GARDENER3) ) { @Override @@ -366,194 +363,200 @@ public boolean isInBounds(WorldPoint loc) //East and west ladders to rope bridge if ((loc.getX() == 3729 || loc.getX() == 3728 || loc.getX() == 3747 || loc.getX() == 3746) - && loc.getY() <= 3832 && loc.getY() >= 3830) + && loc.getY() <= 3832 && loc.getY() >= 3830) { return false; } return loc.getPlane() == 0; } - }); + }, 14907, 14908, 15164, 14652, 14906, 14650, 15162, 15163); add(new FarmingRegion("Seaweed", 15008, false, - new FarmingPatch("North", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.SEAWEED, new WorldPoint(3733, 10272, 1), - new Polygon( - new int[]{3733, 3733, 3734, 3734}, - new int[]{10273, 10274, 10274, 10273}, - 4 - ), - NpcID.FOSSIL_GARDENER_UNDERWATER, 0), - new FarmingPatch("South", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.SEAWEED, new WorldPoint(3733, 10269, 1), - new Polygon( - new int[]{3733, 3733, 3734, 3734}, - new int[]{10267, 10268, 10268, 10267}, - 4 - ), - NpcID.FOSSIL_GARDENER_UNDERWATER, 1) - )); - - add(new FarmingRegion("Gnome Stronghold", 9781, true, Set.of(9782, 9526, 9525), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.TREE, new WorldPoint(2437, 3417, 0), - new Polygon( - new int[]{2437, 2437, 2435, 2435}, - new int[]{3416, 3414, 3414, 3416}, - 4 - ), - NpcID.FARMING_GARDENER_TREE_GNOME), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.FRUIT_TREE, new WorldPoint(2475, 3447, 0), - new Polygon( - new int[]{2475, 2475, 2476, 2476}, - new int[]{3445, 3446, 3446, 3445}, - 4 - ), - NpcID.FARMING_GARDENER_FRUIT_1) - )); + new FarmingPatch("North", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.SEAWEED, new WorldPoint(3733, 10272, 1), + new Polygon( + new int[]{3733, 3733, 3734, 3734}, + new int[]{10273, 10274, 10274, 10273}, + 4 + ), + NpcID.FOSSIL_GARDENER_UNDERWATER, 0), + new FarmingPatch("South", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.SEAWEED, new WorldPoint(3733, 10269, 1), + new Polygon( + new int[]{3733, 3733, 3734, 3734}, + new int[]{10267, 10268, 10268, 10267}, + 4 + ), + NpcID.FOSSIL_GARDENER_UNDERWATER, 1) + )); + + add(new FarmingRegion("Gnome Stronghold", 9781, true, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.TREE, new WorldPoint(2437, 3417, 0), + new Polygon( + new int[]{2437, 2437, 2435, 2435}, + new int[]{3416, 3414, 3414, 3416}, + 4 + ), + NpcID.FARMING_GARDENER_TREE_GNOME), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.FRUIT_TREE, new WorldPoint(2475, 3447, 0), + new Polygon( + new int[]{2475, 2475, 2476, 2476}, + new int[]{3445, 3446, 3446, 3445}, + 4 + ), + NpcID.FARMING_GARDENER_FRUIT_1) + ), 9782, 9526, 9525); add(new FarmingRegion("Harmony", 15148, false, - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.ALLOTMENT, new WorldPoint(3795, 2838, 0), - new Polygon( - new int[]{3794, 3794}, - new int[]{2833, 2838}, - 2 - )), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.HERB, new WorldPoint(3790, 3839, 0), - new Polygon( - new int[]{3789, 3789, 3790, 3790}, - new int[]{2837, 2838, 2838, 2837}, - 4 - )) - )); - - add(new FarmingRegion("Kourend", 6967, false, Set.of(6711), - new FarmingPatch("North East", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.ALLOTMENT, new WorldPoint(1739, 3553, 0), - new Polygon( - new int[]{1733, 1733, 1739, 1739, 1738, 1738}, - new int[]{3558, 3559, 3559, 3554, 3554, 3558}, - 6 - ), - NpcID.HOSIDIUS_ALLOTMENT_GARDENER, 0), - new FarmingPatch("South West", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.ALLOTMENT, new WorldPoint(1735, 3552, 0), - new Polygon( - new int[]{1730, 1730, 1731, 1731, 1735, 1735}, - new int[]{3550, 3555, 3555, 3551, 3551, 3550}, - 6 - ), - NpcID.HOSIDIUS_ALLOTMENT_GARDENER, 1), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.FLOWER, new WorldPoint(1735, 3553, 0), - new Polygon( - new int[]{1734, 1734, 1735, 1734}, - new int[]{3554, 3555, 3555, 1734}, - 4 - )), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_D, PatchImplementation.HERB, new WorldPoint(1739, 3552, 0), - new Polygon( - new int[]{1738, 1738, 1739, 1739}, - new int[]{3550, 3551, 3551, 3550}, - 4 - )), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_E, PatchImplementation.COMPOST, new WorldPoint(1730, 3557, 0)), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_F, PatchImplementation.SPIRIT_TREE, new WorldPoint(1695, 3543, 0), - new Polygon( - new int[]{1692, 1692, 1694, 1694}, - new int[]{3541, 3543, 3543, 3541}, - 4 - ), - NpcID.FARMING_GARDENER_SPIRIT_TREE_4) - )); - - /* - Not implemented - */ + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.ALLOTMENT, new WorldPoint(3795, 2838, 0), + new Polygon( + new int[]{3794, 3794}, + new int[]{2833, 2838}, + 2 + )), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.HERB, new WorldPoint(3790, 3839, 0), + new Polygon( + new int[]{3789, 3789, 3790, 3790}, + new int[]{2837, 2838, 2838, 2837}, + 4 + )) + )); + + add(new FarmingRegion("Kourend", 6967, false, + new FarmingPatch("North East", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.ALLOTMENT, new WorldPoint(1739, 3553, 0), + new Polygon( + new int[]{1733, 1733, 1739, 1739, 1738, 1738}, + new int[]{3558, 3559, 3559, 3554, 3554, 3558}, + 6 + ), + NpcID.HOSIDIUS_ALLOTMENT_GARDENER, 0), + new FarmingPatch("South West", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.ALLOTMENT, new WorldPoint(1735, 3552, 0), + new Polygon( + new int[]{1730, 1730, 1731, 1731, 1735, 1735}, + new int[]{3550, 3555, 3555, 3551, 3551, 3550}, + 6 + ), + NpcID.HOSIDIUS_ALLOTMENT_GARDENER, 1), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.FLOWER, new WorldPoint(1735, 3553, 0), + new Polygon( + new int[]{1734, 1734, 1735, 1734}, + new int[]{3554, 3555, 3555, 1734}, + 4 + )), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_D, PatchImplementation.HERB, new WorldPoint(1739, 3552, 0), + new Polygon( + new int[]{1738, 1738, 1739, 1739}, + new int[]{3550, 3551, 3551, 3550}, + 4 + )), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_E, PatchImplementation.COMPOST, new WorldPoint(1730, 3557, 0)), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_F, PatchImplementation.SPIRIT_TREE, new WorldPoint(1695, 3543, 0), + new Polygon( + new int[]{1692, 1692, 1694, 1694}, + new int[]{3541, 3543, 3543, 3541}, + 4 + ), + NpcID.FARMING_GARDENER_SPIRIT_TREE_4) + ), 6711); add(new FarmingRegion("Kourend", 7223, false, - new FarmingPatch("East 1", VarbitID.FARMING_TRANSMIT_A1, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), - new FarmingPatch("East 2", VarbitID.FARMING_TRANSMIT_A2, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), - new FarmingPatch("East 3", VarbitID.FARMING_TRANSMIT_B1, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), - new FarmingPatch("East 4", VarbitID.FARMING_TRANSMIT_B2, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), - new FarmingPatch("East 5", VarbitID.FARMING_TRANSMIT_C1, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), - new FarmingPatch("East 6", VarbitID.FARMING_TRANSMIT_C2, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), - new FarmingPatch("West 1", VarbitID.FARMING_TRANSMIT_D1, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), - new FarmingPatch("West 2", VarbitID.FARMING_TRANSMIT_D2, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), - new FarmingPatch("West 3", VarbitID.FARMING_TRANSMIT_E1, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), - new FarmingPatch("West 4", VarbitID.FARMING_TRANSMIT_E2, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), - new FarmingPatch("West 5", VarbitID.FARMING_TRANSMIT_F1, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), - new FarmingPatch("West 6", VarbitID.FARMING_TRANSMIT_F2, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)) - )); - - add(new FarmingRegion("Lletya", 9265, false, Set.of(11103), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.FRUIT_TREE, new WorldPoint(2345, 3162, 0), - new Polygon( - new int[]{2346, 2346, 2347, 2347}, - new int[]{3161, 3162, 3162, 3161}, - 4 - ), - NpcID.FARMING_GARDENER_FRUIT_TREE_5) - )); + new FarmingPatch("East 1", VarbitID.FARMING_TRANSMIT_A1, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), + new FarmingPatch("East 2", VarbitID.FARMING_TRANSMIT_A2, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), + new FarmingPatch("East 3", VarbitID.FARMING_TRANSMIT_B1, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), + new FarmingPatch("East 4", VarbitID.FARMING_TRANSMIT_B2, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), + new FarmingPatch("East 5", VarbitID.FARMING_TRANSMIT_C1, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), + new FarmingPatch("East 6", VarbitID.FARMING_TRANSMIT_C2, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), + new FarmingPatch("West 1", VarbitID.FARMING_TRANSMIT_D1, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), + new FarmingPatch("West 2", VarbitID.FARMING_TRANSMIT_D2, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), + new FarmingPatch("West 3", VarbitID.FARMING_TRANSMIT_E1, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), + new FarmingPatch("West 4", VarbitID.FARMING_TRANSMIT_E2, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), + new FarmingPatch("West 5", VarbitID.FARMING_TRANSMIT_F1, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)), + new FarmingPatch("West 6", VarbitID.FARMING_TRANSMIT_F2, PatchImplementation.GRAPES, new WorldPoint(-1, -1, 0)) + )); + + add(new FarmingRegion("Lletya", 9265, false, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.FRUIT_TREE, new WorldPoint(2345, 3162, 0), + new Polygon( + new int[]{2346, 2346, 2347, 2347}, + new int[]{3161, 3162, 3162, 3161}, + 4 + ), + NpcID.FARMING_GARDENER_FRUIT_TREE_5) + ), 11103); add(new FarmingRegion("Lumbridge", 12851, false, - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HOPS, new WorldPoint(3232, 3317, 0), - new Polygon( - new int[]{3227, 3227, 3231, 3231}, - new int[]{3313, 3317, 3317, 3313}, - 4 - ), - NpcID.FARMING_GARDENER_HOPS_3) - )); - add(new FarmingRegion("Lumbridge", 12594, false, Set.of(12850), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.TREE, new WorldPoint(3195, 3230, 0), - new Polygon( - new int[]{3192, 3192, 3194, 3194}, - new int[]{3230, 3232, 3232, 3230}, - 4 - ), - NpcID.FARMING_GARDENER_TREE_4) - )); - - add(new FarmingRegion("Morytania", 13622, false, Set.of(13878), - new FarmingPatch("Mushroom", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.MUSHROOM, new WorldPoint(3451, 3474, 0), - new Polygon( - new int[]{3451, 3451, 3452, 3452}, - new int[]{3472, 3473, 3473, 3472}, - 4 - )) - )); - add(new FarmingRegion("Morytania", 14391, false, Set.of(14390), - new FarmingPatch("North West", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.ALLOTMENT, new WorldPoint(3597, 3524, 0), - new Polygon( - new int[]{3597, 3597, 3601, 3601, 3598, 3598}, - new int[]{3525, 3530, 3530, 3529, 3529, 3525}, - 6 - ), - NpcID.LYRA, 0), - new FarmingPatch("South East", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.ALLOTMENT, new WorldPoint(3601, 3522, 0), - new Polygon( - new int[]{3602, 3602, 3605, 3605, 3606, 3606}, - new int[]{3521, 3522, 3522, 3526, 3526, 3521}, - 6 - ), - NpcID.LYRA, 1), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.FLOWER, new WorldPoint(3601, 3524, 0), - new Polygon( - new int[]{3601, 3601, 3602, 3602}, - new int[]{3225, 3226, 3226, 3225}, - 4 - ) - ), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_D, PatchImplementation.HERB, new WorldPoint(3605, 3528, 0), - new Polygon( - new int[]{3605, 3605, 3606, 3606}, - new int[]{3529, 3530, 3530, 3529}, - 4 - )), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_E, PatchImplementation.COMPOST, new WorldPoint(3609, 3522, 0)) + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HOPS, new WorldPoint(3232, 3317, 0), + new Polygon( + new int[]{3227, 3227, 3231, 3231}, + new int[]{3313, 3317, 3317, 3313}, + 4 + ), + NpcID.FARMING_GARDENER_HOPS_3) + )); + add(new FarmingRegion("Lumbridge", 12594, false, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.TREE, new WorldPoint(3195, 3230, 0), + new Polygon( + new int[]{3192, 3192, 3194, 3194}, + new int[]{3230, 3232, 3232, 3230}, + 4 + ), + NpcID.FARMING_GARDENER_TREE_4) + ), 12850); + + add(new FarmingRegion("Morytania", 13622, false, + new FarmingPatch("Mushroom", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.MUSHROOM, new WorldPoint(3451, 3474, 0), + new Polygon( + new int[]{3451, 3451, 3452, 3452}, + new int[]{3472, 3473, 3473, 3472}, + 4 + )) + ), 13878); + add(new FarmingRegion("Morytania", 14391, false, + new FarmingPatch("North West", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.ALLOTMENT, new WorldPoint(3597, 3524, 0), + new Polygon( + new int[]{3597, 3597, 3601, 3601, 3598, 3598}, + new int[]{3525, 3530, 3530, 3529, 3529, 3525}, + 6 + ), + NpcID.LYRA, 0), + new FarmingPatch("South East", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.ALLOTMENT, new WorldPoint(3601, 3522, 0), + new Polygon( + new int[]{3602, 3602, 3605, 3605, 3606, 3606}, + new int[]{3521, 3522, 3522, 3526, 3526, 3521}, + 6 + ), + NpcID.LYRA, 1), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.FLOWER, new WorldPoint(3601, 3524, 0), + new Polygon( + new int[]{3601, 3601, 3602, 3602}, + new int[]{3225, 3226, 3226, 3225}, + 4 + ) + ), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_D, PatchImplementation.HERB, new WorldPoint(3605, 3528, 0), + new Polygon( + new int[]{3605, 3605, 3606, 3606}, + new int[]{3529, 3530, 3530, 3529}, + 4 + )), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_E, PatchImplementation.COMPOST, new WorldPoint(3609, 3522, 0)) + ), 14390); + + add(new FarmingRegion("Nemus Retreat", 5427, false, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.TREE, new WorldPoint(1365, 3319, 0), + new Polygon( + new int[]{1365, 1365, 1367, 1367}, + new int[]{3320, 3322, 3322, 3320}, + 4 + ), + NpcID.FARMING_GARDENER_TREE_7) )); - add(new FarmingRegion("Port Sarim", 12082, false, Set.of(12083), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.SPIRIT_TREE, new WorldPoint(3059, 3257, 0), - new Polygon( - new int[]{3059, 3059, 3061, 3061}, - new int[]{3257, 3259, 3259, 3257}, - 4 - ), - NpcID.FARMING_GARDENER_SPIRIT_TREE_1) + add(new FarmingRegion("Port Sarim", 12082, false, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.SPIRIT_TREE, new WorldPoint(3059, 3257, 0), + new Polygon( + new int[]{3059, 3059, 3061, 3061}, + new int[]{3257, 3259, 3259, 3257}, + 4 + ), + NpcID.FARMING_GARDENER_SPIRIT_TREE_1) ) { @Override @@ -561,221 +564,222 @@ public boolean isInBounds(WorldPoint loc) { return loc.getY() < 3272; } - }); - - add(new FarmingRegion("Rimmington", 11570, false, Set.of(11826), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.BUSH, new WorldPoint(2940, 3223, 0), - new Polygon( - new int[]{2940, 2940, 2941, 2941}, - new int[]{3221, 3222, 3222, 3221}, - 4 - ), - NpcID.FARMING_GARDENER_BUSH_2) - )); - - add(new FarmingRegion("Seers' Village", 10551, false, Set.of(10550), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HOPS, new WorldPoint(2669, 3522, 0), - new Polygon( - new int[]{2664, 2664, 2669, 2669}, - new int[]{3523, 3528, 3528, 3523}, - 4 - ), - NpcID.FARMING_GARDENER_HOPS_4) - )); + }, 12083); + + add(new FarmingRegion("Rimmington", 11570, false, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.BUSH, new WorldPoint(2940, 3223, 0), + new Polygon( + new int[]{2940, 2940, 2941, 2941}, + new int[]{3221, 3222, 3222, 3221}, + 4 + ), + NpcID.FARMING_GARDENER_BUSH_2) + ), 11826); + + add(new FarmingRegion("Seers' Village", 10551, false, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HOPS, new WorldPoint(2669, 3522, 0), + new Polygon( + new int[]{2664, 2664, 2669, 2669}, + new int[]{3523, 3528, 3528, 3523}, + 4 + ), + NpcID.FARMING_GARDENER_HOPS_4) + ), 10550); add(new FarmingRegion("Tai Bwo Wannai", 11056, false, - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.CALQUAT, new WorldPoint(2796, 3103, 0), - new Polygon( - new int[]{2795, 2795, 2797, 2797}, - new int[]{3100, 3102, 3102, 3100}, - 4 - ), - NpcID.FARMING_GARDENER_CALQUAT) - )); - - add(new FarmingRegion("Taverley", 11573, false, Set.of(11829), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.TREE, new WorldPoint(2936, 3440, 0), - new Polygon( - new int[]{2935, 2935, 2937, 2937}, - new int[]{3437, 3439, 3439, 3437}, - 4 - ), - NpcID.FARMING_GARDENER_TREE_1) - )); - - add(new FarmingRegion("Tree Gnome Village", 9777, true, Set.of(10033), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.FRUIT_TREE, new WorldPoint(2488, 3180, 0), - new Polygon( - new int[]{2489, 2489, 2490, 2490}, - new int[]{3179, 3180, 3180, 3179}, - 4 - ), - NpcID.FARMING_GARDENER_FRUIT_2) - )); + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.CALQUAT, new WorldPoint(2796, 3103, 0), + new Polygon( + new int[]{2795, 2795, 2797, 2797}, + new int[]{3100, 3102, 3102, 3100}, + 4 + ), + NpcID.FARMING_GARDENER_CALQUAT) + )); + + add(new FarmingRegion("Taverley", 11573, false, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.TREE, new WorldPoint(2936, 3440, 0), + new Polygon( + new int[]{2935, 2935, 2937, 2937}, + new int[]{3437, 3439, 3439, 3437}, + 4 + ), + NpcID.FARMING_GARDENER_TREE_1) + ), 11829); + + add(new FarmingRegion("Tree Gnome Village", 9777, true, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.FRUIT_TREE, new WorldPoint(2488, 3180, 0), + new Polygon( + new int[]{2489, 2489, 2490, 2490}, + new int[]{3179, 3180, 3180, 3179}, + 4 + ), + NpcID.FARMING_GARDENER_FRUIT_2) + ), 10033); add(new FarmingRegion("Troll Stronghold", 11321, true, - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HERB, new WorldPoint(2827, 3693, 0), - new Polygon( - new int[]{2826, 2826, 2827, 2827}, - new int[]{3694, 3695, 3695, 3694}, - 4 - )) - )); - - add(new FarmingRegion("Varrock", 12854, false, Set.of(12853), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.TREE, new WorldPoint(3229, 3457, 0), - new Polygon( - new int[]{3228, 3228, 3230, 3230}, - new int[]{3458, 3460, 3460, 3458}, - 4 - ), - NpcID.FARMING_GARDENER_TREE_3_02) - )); + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HERB, new WorldPoint(2827, 3693, 0), + new Polygon( + new int[]{2826, 2826, 2827, 2827}, + new int[]{3694, 3695, 3695, 3694}, + 4 + )) + )); + + add(new FarmingRegion("Varrock", 12854, false, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.TREE, new WorldPoint(3229, 3457, 0), + new Polygon( + new int[]{3228, 3228, 3230, 3230}, + new int[]{3458, 3460, 3460, 3458}, + 4 + ), + NpcID.FARMING_GARDENER_TREE_3_02) + ), 12853); add(new FarmingRegion("Yanille", 10288, false, - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HOPS, new WorldPoint(2573, 3106, 0), - new Polygon( - new int[]{2574, 2574, 2577, 2577}, - new int[]{3103, 3106, 3106, 3103}, - 4 - ), - NpcID.FARMING_GARDENER_HOPS_1) + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HOPS, new WorldPoint(2573, 3106, 0), + new Polygon( + new int[]{2574, 2574, 2577, 2577}, + new int[]{3103, 3106, 3106, 3103}, + 4 + ), + NpcID.FARMING_GARDENER_HOPS_1) )); add(new FarmingRegion("Weiss", 11325, false, - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HERB, new WorldPoint(2849, 3933, 0), - new Polygon( - new int[]{2848, 2848, 2849, 2849}, - new int[]{3934, 3935, 3935, 3934}, - 4 - )) + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.HERB, new WorldPoint(2849, 3933, 0), + new Polygon( + new int[]{2848, 2848, 2849, 2849}, + new int[]{3934, 3935, 3935, 3934}, + 4 + )) )); add(new FarmingRegion("Farming Guild", 5021, true, - new FarmingPatch("Hespori", VarbitID.FARMING_TRANSMIT_J, PatchImplementation.HESPORI, new WorldPoint(1246, 10085, 0), - new Polygon( - new int[]{1246, 1248, 1248, 1246}, - new int[]{10086, 10088, 10088, 10086}, - 4 - )) + new FarmingPatch("Hespori", VarbitID.FARMING_TRANSMIT_J, PatchImplementation.HESPORI, new WorldPoint(1246, 10085, 0), + new Polygon( + new int[]{1246, 1248, 1248, 1246}, + new int[]{10086, 10088, 10088, 10086}, + 4 + )) )); //Full 3x3 region area centered on farming guild - add(farmingGuildRegion = new FarmingRegion("Farming Guild", 4922, true, Set.of(5177, 5178, 5179, 4921, 4923, 4665, 4666, 4667), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_G, PatchImplementation.TREE, new WorldPoint(1233, 3734, 0), - new Polygon( - new int[]{1231, 1231, 1233, 1233}, - new int[]{3735, 3737, 3737, 3735}, - 4 - ), - NpcID.FARMING_GARDENER_FARMGUILD_T2), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_E, PatchImplementation.HERB, new WorldPoint(1238, 3728, 0), - new Polygon( - new int[]{1238, 1238, 1239, 1239}, - new int[]{3726, 3727, 3727, 3726}, - 4 - )), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.BUSH, new WorldPoint(1261, 3732, 0), - new Polygon( - new int[]{1260, 1260, 1261, 1261}, - new int[]{3733, 3734, 3734, 3733}, - 4 - ), - NpcID.FARMING_GARDENER_FARMGUILD_T1, 3), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_H, PatchImplementation.FLOWER, new WorldPoint(1261, 3727, 0), - new Polygon( - new int[]{1260, 1260, 1261, 1261}, - new int[]{3725, 3726, 3726, 3725}, - 4 - )), - new FarmingPatch("North", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.ALLOTMENT, new WorldPoint(1266, 3732, 0), - new Polygon( - new int[]{1267, 1267, 1268, 1268, 1272, 1272}, - new int[]{3732, 3736, 3736, 3733, 3733, 3732}, - 6 - ), - NpcID.FARMING_GARDENER_FARMGUILD_T1, 1), - new FarmingPatch("South", VarbitID.FARMING_TRANSMIT_D, PatchImplementation.ALLOTMENT, new WorldPoint(1266, 3727, 0), - new Polygon( - new int[]{1267, 1267, 1272, 1272, 1268, 1268}, - new int[]{3723, 3727, 3727, 3726, 3726, 3723}, - 6 - ), - NpcID.FARMING_GARDENER_FARMGUILD_T1, 2), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_N, PatchImplementation.BIG_COMPOST, new WorldPoint(1271, 3729, 0)), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_F, PatchImplementation.CACTUS, new WorldPoint(1264, 3746, 0), - new Polygon( - new int[]{1264, 1264, 1265, 1265}, - new int[]{3747, 3748, 3748, 3747}, - 4 - ), - NpcID.FARMING_GARDENER_FARMGUILD_T1, 0), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.SPIRIT_TREE, new WorldPoint(1251, 3749, 0), - new Polygon( - new int[]{1252, 1252, 1254, 1254}, - new int[]{3749, 3751, 3751, 3749}, - 4 - ), - NpcID.FARMING_GARDENER_SPIRIT_TREE_5), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_K, PatchImplementation.FRUIT_TREE, new WorldPoint(1243, 3757, 0), - new Polygon( - new int[]{1242, 1242, 1243, 1243}, - new int[]{3758, 3759, 3758, 3758}, - 4 - ), - NpcID.FARMING_GARDENER_FARMGUILD_T3), - new FarmingPatch("Anima", VarbitID.FARMING_TRANSMIT_M, PatchImplementation.ANIMA, new WorldPoint(1233, 3725, 0), - new Polygon( - new int[]{1231, 1231, 1233, 1233}, - new int[]{3722, 3724, 3724, 3722}, - 4 - )), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_L, PatchImplementation.CELASTRUS, new WorldPoint(1245, 3752, 0), - new Polygon( - new int[]{1243, 1243, 1245, 1245}, - new int[]{3749, 3751, 3751, 3749}, - 4 - ), - NpcID.FARMING_GARDENER_FARMGUILD_CELASTRUS), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_I, PatchImplementation.REDWOOD, new WorldPoint(1233, 3752, 0), - new Polygon( - new int[]{1225, 1225, 1232, 1232}, - new int[]{3751, 3758, 3758, 3751}, - 4 - ), - NpcID.FARMING_GARDENER_FARMGUILD_REDWOOD) - )); + add(farmingGuildRegion = new FarmingRegion("Farming Guild", 4922, true, + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_G, PatchImplementation.TREE, new WorldPoint(1233, 3734, 0), + new Polygon( + new int[]{1231, 1231, 1233, 1233}, + new int[]{3735, 3737, 3737, 3735}, + 4 + ), + NpcID.FARMING_GARDENER_FARMGUILD_T2), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_E, PatchImplementation.HERB, new WorldPoint(1238, 3728, 0), + new Polygon( + new int[]{1238, 1238, 1239, 1239}, + new int[]{3726, 3727, 3727, 3726}, + 4 + )), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.BUSH, new WorldPoint(1261, 3732, 0), + new Polygon( + new int[]{1260, 1260, 1261, 1261}, + new int[]{3733, 3734, 3734, 3733}, + 4 + ), + NpcID.FARMING_GARDENER_FARMGUILD_T1, 3), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_H, PatchImplementation.FLOWER, new WorldPoint(1261, 3727, 0), + new Polygon( + new int[]{1260, 1260, 1261, 1261}, + new int[]{3725, 3726, 3726, 3725}, + 4 + )), + new FarmingPatch("North", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.ALLOTMENT, new WorldPoint(1266, 3732, 0), + new Polygon( + new int[]{1267, 1267, 1268, 1268, 1272, 1272}, + new int[]{3732, 3736, 3736, 3733, 3733, 3732}, + 6 + ), + NpcID.FARMING_GARDENER_FARMGUILD_T1, 1), + new FarmingPatch("South", VarbitID.FARMING_TRANSMIT_D, PatchImplementation.ALLOTMENT, new WorldPoint(1266, 3727, 0), + new Polygon( + new int[]{1267, 1267, 1272, 1272, 1268, 1268}, + new int[]{3723, 3727, 3727, 3726, 3726, 3723}, + 6 + ), + NpcID.FARMING_GARDENER_FARMGUILD_T1, 2), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_N, PatchImplementation.BIG_COMPOST, new WorldPoint(1271, 3729, 0)), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_F, PatchImplementation.CACTUS, new WorldPoint(1264, 3746, 0), + new Polygon( + new int[]{1264, 1264, 1265, 1265}, + new int[]{3747, 3748, 3748, 3747}, + 4 + ), + NpcID.FARMING_GARDENER_FARMGUILD_T1, 0), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.SPIRIT_TREE, new WorldPoint(1251, 3749, 0), + new Polygon( + new int[]{1252, 1252, 1254, 1254}, + new int[]{3749, 3751, 3751, 3749}, + 4 + ), + NpcID.FARMING_GARDENER_SPIRIT_TREE_5), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_K, PatchImplementation.FRUIT_TREE, new WorldPoint(1243, 3757, 0), + new Polygon( + new int[]{1242, 1242, 1243, 1243}, + new int[]{3758, 3759, 3758, 3758}, + 4 + ), + NpcID.FARMING_GARDENER_FARMGUILD_T3), + new FarmingPatch("Anima", VarbitID.FARMING_TRANSMIT_M, PatchImplementation.ANIMA, new WorldPoint(1233, 3725, 0), + new Polygon( + new int[]{1231, 1231, 1233, 1233}, + new int[]{3722, 3724, 3724, 3722}, + 4 + )), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_L, PatchImplementation.CELASTRUS, new WorldPoint(1245, 3752, 0), + new Polygon( + new int[]{1243, 1243, 1245, 1245}, + new int[]{3749, 3751, 3751, 3749}, + 4 + ), + NpcID.FARMING_GARDENER_FARMGUILD_CELASTRUS), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_I, PatchImplementation.REDWOOD, new WorldPoint(1233, 3752, 0), + new Polygon( + new int[]{1225, 1225, 1232, 1232}, + new int[]{3751, 3758, 3758, 3751}, + 4 + ), + NpcID.FARMING_GARDENER_FARMGUILD_REDWOOD) + ), 5177, 5178, 5179, 4921, 4923, 4665, 4666, 4667); //All of Prifddinas, and all of Prifddinas Underground - add(new FarmingRegion("Prifddinas", 13151, false, Set.of(12895, 12894, 13150, 12994, 12993, 12737, 12738, 12126, 12127, 13250), - new FarmingPatch("North", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.ALLOTMENT, new WorldPoint(3293, 6105, 0), - new Polygon( - new int[]{3288, 3288, 3293, 3293, 3289, 3289}, - new int[]{6101, 6104, 6104, 6103, 6103, 6101}, - 6 - ), - NpcID.PRIF_GARDENER, 0), - new FarmingPatch("South", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.ALLOTMENT, new WorldPoint(3294, 6096, 0), - new Polygon( - new int[]{3288, 3288, 3289, 3289, 3293, 3293}, - new int[]{6095, 6098, 6098, 6096, 6096, 6095}, - 6 - ), - NpcID.PRIF_GARDENER, 1), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.FLOWER, new WorldPoint(3294, 6100, 0), - new Polygon( - new int[]{3292, 3292, 3293, 3293}, - new int[]{6099, 6100, 6100, 6099}, - 4 - )), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_E, PatchImplementation.CRYSTAL_TREE, new WorldPoint(3291, 6117, 0), - new Polygon( - new int[]{3291, 3291, 3292, 3292}, - new int[]{6118, 6119, 6119, 6118}, - 4 - )), - new FarmingPatch("", VarbitID.FARMING_TRANSMIT_D, PatchImplementation.COMPOST, new WorldPoint(3288, 6100, 0)) - )); + add(new FarmingRegion("Prifddinas", 13151, false, + new FarmingPatch("North", VarbitID.FARMING_TRANSMIT_A, PatchImplementation.ALLOTMENT, new WorldPoint(3293, 6105, 0), + new Polygon( + new int[]{3288, 3288, 3293, 3293, 3289, 3289}, + new int[]{6101, 6104, 6104, 6103, 6103, 6101}, + 6 + ), + NpcID.PRIF_GARDENER, 0), + new FarmingPatch("South", VarbitID.FARMING_TRANSMIT_B, PatchImplementation.ALLOTMENT, new WorldPoint(3294, 6096, 0), + new Polygon( + new int[]{3288, 3288, 3289, 3289, 3293, 3293}, + new int[]{6095, 6098, 6098, 6096, 6096, 6095}, + 6 + ), + NpcID.PRIF_GARDENER, 1), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_C, PatchImplementation.FLOWER, new WorldPoint(3294, 6100, 0), + new Polygon( + new int[]{3292, 3292, 3293, 3293}, + new int[]{6099, 6100, 6100, 6099}, + 4 + )), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_E, PatchImplementation.CRYSTAL_TREE, new WorldPoint(3291, 6117, 0), + new Polygon( + new int[]{3291, 3291, 3292, 3292}, + new int[]{6118, 6119, 6119, 6118}, + 4 + )), + new FarmingPatch("", VarbitID.FARMING_TRANSMIT_D, PatchImplementation.COMPOST, new WorldPoint(3288, 6100, 0)) + ), 12895, 12894, 13150, + /* Underground */ 12994, 12993, 12737, 12738, 12126, 12127, 13250); // Finalize this.regions = Multimaps.unmodifiableMultimap(this.regions); @@ -787,25 +791,25 @@ public boolean isInBounds(WorldPoint loc) this.tabs = Collections.unmodifiableMap(umtabs); } - private void add(FarmingRegion r) + private void add(FarmingRegion r, int... extraRegions) { regions.put(r.getRegionID(), r); - for (int er : r.getRegionIDs()) + for (int er : extraRegions) { regions.put(er, r); } for (FarmingPatch p : r.getPatches()) { tabs - .computeIfAbsent(p.getImplementation().getTab(), k -> new TreeSet<>(tabSorter)) - .add(p); + .computeIfAbsent(p.getImplementation().getTab(), k -> new TreeSet<>(tabSorter)) + .add(p); } } Collection getRegionsForLocation(WorldPoint location) { return this.regions.get(location.getRegionID()).stream() - .filter(region -> region.isInBounds(location)) - .collect(Collectors.toSet()); + .filter(region -> region.isInBounds(location)) + .collect(Collectors.toSet()); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/HerbRun.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/HerbRun.java index 626945c67d8..ff682773477 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/HerbRun.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/HerbRun.java @@ -26,12 +26,12 @@ import net.runelite.client.plugins.microbot.questhelper.QuestHelperConfig; import net.runelite.client.plugins.microbot.questhelper.collections.ItemCollections; +import net.runelite.client.plugins.microbot.questhelper.config.ConfigKeys; import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.ComplexStateQuestHelper; import net.runelite.client.plugins.microbot.questhelper.questinfo.HelperConfig; import net.runelite.client.plugins.microbot.questhelper.questinfo.QuestHelperQuest; import net.runelite.client.plugins.microbot.questhelper.requirements.ManualRequirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirements; @@ -40,13 +40,9 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.runelite.RuneliteRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicType; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; -import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; -import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; -import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; -import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.*; import net.runelite.api.QuestState; import net.runelite.api.Skill; -import net.runelite.api.Varbits; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; import net.runelite.api.gameval.ItemID; @@ -60,30 +56,110 @@ import javax.inject.Inject; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.nor; + public class HerbRun extends ComplexStateQuestHelper { - // TODO: Updating setId and setName in ItemRequirement @Inject private FarmingWorld farmingWorld; private FarmingHandler farmingHandler; - DetailedQuestStep waitForHerbs, ardougnePatch, catherbyPatch, faladorPatch, farmingGuildPatch, harmonyPatch, morytaniaPatch, trollStrongholdPatch, weissPatch, hosidiusPatch, varlamorePatch; - - DetailedQuestStep ardougnePlant, catherbyPlant, faladorPlant, farmingGuildPlant, harmonyPlant, morytaniaPlant, trollStrongholdPlant, weissPlant, hosidiusPlant, varlamorePlant; - ItemRequirement spade, dibber, rake, seed, compost; - ItemRequirement ectophial, magicSec, explorerRing2, ardyCloak2, xericsTalisman, catherbyTeleport, trollheimTeleport, icyBasalt, stonyBasalt, farmingGuildTeleport, hosidiusHouseTeleport, hunterWhistle; - ItemRequirement gracefulHood, gracefulTop, gracefulLegs, gracefulGloves, gracefulBoots, gracefulCape, gracefulOutfit; - ItemRequirement farmingHat, farmingTop, farmingLegs, farmingBoots, farmersOutfit; - - Requirement accessToHarmony, accessToWeiss, accessToTrollStronghold, accessToFarmingGuildPatch, accessToVarlamore; - - ManualRequirement ardougneEmpty, catherbyEmpty, faladorEmpty, farmingGuildEmpty, harmonyEmpty, morytaniaEmpty, trollStrongholdEmpty, weissEmpty, hosidiusEmpty, varlamoreEmpty; - ManualRequirement ardougneReady, catherbyReady, faladorReady, farmingGuildReady, harmonyReady, morytaniaReady, trollStrongholdReady, weissReady, hosidiusReady, varlamoreReady; - - private enum Seed { + // Required items + ItemRequirement spade; + ItemRequirement dibber; + ItemRequirement rake; + ItemRequirement seed; + + // Recommended items + ItemRequirement compost; + ItemRequirement ectophial; + ItemRequirement magicSec; + ItemRequirement explorerRing2; + ItemRequirement ardyCloak2; + ItemRequirement xericsTalisman; + ItemRequirement catherbyTeleport; + ItemRequirement trollheimTeleport; + ItemRequirement icyBasalt; + ItemRequirement stonyBasalt; + ItemRequirement farmingGuildTeleport; + ItemRequirement hosidiusHouseTeleport; + ItemRequirement hunterWhistle; + ItemRequirement harmonyTeleport; + ItemRequirement gracefulHood; + ItemRequirement gracefulTop; + ItemRequirement gracefulLegs; + ItemRequirement gracefulGloves; + ItemRequirement gracefulBoots; + ItemRequirement gracefulCape; + ItemRequirement gracefulOutfit; + ItemRequirement farmingHat; + ItemRequirement farmingTop; + ItemRequirement farmingLegs; + ItemRequirement farmingBoots; + ItemRequirement farmersOutfit; + + // Miscellaneous requirements + QuestRequirement accessToHarmony; + QuestRequirement accessToWeiss; + QuestRequirement accessToTrollStronghold; + SkillRequirement accessToFarmingGuildPatch; + QuestRequirement accessToVarlamore; + RuneliteRequirement unlockedBarbarianPlanting; + + ManualRequirement ardougneEmpty; + ManualRequirement catherbyEmpty; + ManualRequirement faladorEmpty; + ManualRequirement farmingGuildEmpty; + ManualRequirement harmonyEmpty; + ManualRequirement morytaniaEmpty; + ManualRequirement trollStrongholdEmpty; + ManualRequirement weissEmpty; + ManualRequirement hosidiusEmpty; + ManualRequirement varlamoreEmpty; + ManualRequirement ardougneReady; + ManualRequirement catherbyReady; + ManualRequirement faladorReady; + ManualRequirement farmingGuildReady; + ManualRequirement harmonyReady; + ManualRequirement morytaniaReady; + ManualRequirement trollStrongholdReady; + ManualRequirement weissReady; + ManualRequirement hosidiusReady; + ManualRequirement varlamoreReady; + + // Steps + ReorderableConditionalStep steps; + DetailedQuestStep waitForHerbs; + ObjectStep ardougnePatch; + ObjectStep catherbyPatch; + ObjectStep faladorPatch; + ObjectStep farmingGuildPatch; + ObjectStep harmonyPatch; + ObjectStep morytaniaPatch; + ObjectStep trollStrongholdPatch; + ObjectStep weissPatch; + ObjectStep hosidiusPatch; + ObjectStep varlamorePatch; + ObjectStep ardougnePlant; + ObjectStep catherbyPlant; + ObjectStep faladorPlant; + ObjectStep farmingGuildPlant; + ObjectStep harmonyPlant; + ObjectStep morytaniaPlant; + ObjectStep trollStrongholdPlant; + ObjectStep weissPlant; + ObjectStep hosidiusPlant; + ObjectStep varlamorePlant; + + // Sidebar panels + List allSteps; + + private enum Seed + { GUAM(ItemID.GUAM_SEED), MARRENTILL(ItemID.MARRENTILL_SEED), TARROMIN(ItemID.TARROMIN_SEED), HARRALANDER(ItemID.HARRALANDER_SEED), RANARR(ItemID.RANARR_SEED), TOADFLAX(ItemID.TOADFLAX_SEED), IRIT(ItemID.IRIT_SEED), AVANTOE(ItemID.AVANTOE_SEED), KWUARM(ItemID.KWUARM_SEED), SNAPDRAGON(ItemID.SNAPDRAGON_SEED), HUASCA(ItemID.HUASCA_SEED), CADANTINE(ItemID.CADANTINE_SEED), LATANDYME(ItemID.LANTADYME_SEED), @@ -97,58 +173,18 @@ private enum Seed { } } - private enum GracefulOrFarming { + private enum GracefulOrFarming + { NONE(), GRACEFUL(), - FARMING(); + FARMING() } private final String HERB_SEEDS = "herbSeeds"; private final String GRACEFUL_OR_FARMING = "gracefulOrFarming"; @Override - public QuestStep loadStep() - { - farmingHandler = new FarmingHandler(client, configManager); - initializeRequirements(); - setupConditions(); - setupSteps(); - - ConditionalStep steps = new ConditionalStep(this, waitForHerbs, spade, dibber, rake, seed, magicSec, farmersOutfit, gracefulOutfit); - steps.addStep(faladorReady, faladorPatch); - steps.addStep(faladorEmpty, faladorPlant); - - steps.addStep(ardougneReady, ardougnePatch); - steps.addStep(ardougneEmpty, ardougnePlant); - - steps.addStep(catherbyReady, catherbyPatch); - steps.addStep(catherbyEmpty, catherbyPlant); - - steps.addStep(morytaniaReady, morytaniaPatch); - steps.addStep(morytaniaEmpty, morytaniaPlant); - - steps.addStep(hosidiusReady, hosidiusPatch); - steps.addStep(hosidiusEmpty, hosidiusPlant); - - steps.addStep(new Conditions(accessToTrollStronghold, trollStrongholdReady), trollStrongholdPatch); - steps.addStep(new Conditions(accessToTrollStronghold, trollStrongholdEmpty), trollStrongholdPlant); - - steps.addStep(new Conditions(accessToWeiss, weissReady), weissPatch); - steps.addStep(new Conditions(accessToWeiss, weissEmpty), weissPlant); - - steps.addStep(new Conditions(accessToFarmingGuildPatch, farmingGuildReady), farmingGuildPatch); - steps.addStep(new Conditions(accessToFarmingGuildPatch, farmingGuildEmpty), farmingGuildPlant); - - steps.addStep(new Conditions(accessToHarmony, harmonyReady), harmonyPatch); - steps.addStep(new Conditions(accessToHarmony, harmonyEmpty), harmonyPlant); - - steps.addStep(new Conditions(accessToVarlamore, varlamoreReady), varlamorePatch); - steps.addStep(new Conditions(accessToVarlamore, varlamoreEmpty), varlamorePlant); - - return steps; - } - - public void setupConditions() + protected void setupRequirements() { ardougneReady = new ManualRequirement(); catherbyReady = new ManualRequirement(); @@ -171,11 +207,7 @@ public void setupConditions() weissEmpty = new ManualRequirement(); hosidiusEmpty = new ManualRequirement(); varlamoreEmpty = new ManualRequirement(); - } - @Override - protected void setupRequirements() - { accessToFarmingGuildPatch = new SkillRequirement(Skill.FARMING, 65); accessToHarmony = new QuestRequirement(QuestHelperQuest.MORYTANIA_ELITE, QuestState.FINISHED); @@ -183,13 +215,15 @@ protected void setupRequirements() accessToTrollStronghold = new QuestRequirement(QuestHelperQuest.MY_ARMS_BIG_ADVENTURE, QuestState.FINISHED); accessToVarlamore = new QuestRequirement(QuestHelperQuest.CHILDREN_OF_THE_SUN, QuestState.FINISHED); + unlockedBarbarianPlanting = new RuneliteRequirement(configManager, ConfigKeys.BARBARIAN_TRAINING_FINISHED_SEED_PLANTING.getKey()); + spade = new ItemRequirement("Spade", ItemID.SPADE); - dibber = new ItemRequirement("Seed dibber", ItemID.DIBBER); + dibber = new ItemRequirement("Seed dibber", ItemID.DIBBER).hideConditioned(unlockedBarbarianPlanting); rake = new ItemRequirement("Rake", ItemID.RAKE).hideConditioned(new VarbitRequirement(VarbitID.FARMING_BLOCKWEEDS, 2)); seed = new ItemRequirement("Seeds of your choice", ItemID.GUAM_SEED); - String seedName = configManager.getRSProfileConfiguration(QuestHelperConfig.QUEST_BACKGROUND_GROUP, HERB_SEEDS); + var seedName = configManager.getRSProfileConfiguration(QuestHelperConfig.QUEST_BACKGROUND_GROUP, HERB_SEEDS); if (seedName != null) { @@ -219,17 +253,17 @@ protected void setupRequirements() hosidiusHouseTeleport = new ItemRequirement("Teleport to Hosidius House", ItemID.NZONE_TELETAB_KOUREND); hosidiusHouseTeleport.addAlternates(ItemID.XERIC_TALISMAN); - ItemRequirement catherbyRunes = new ItemRequirements("Catherby teleport runes", new ItemRequirement("Law rune", - ItemID.LAWRUNE), new ItemRequirement("Air rune", ItemID.AIRRUNE, 5)); - ItemRequirement catherbyTablet = new ItemRequirement("Catherby tablet", ItemID.LUNAR_TABLET_CATHERBY_TELEPORT); + var catherbyRunes = new ItemRequirements("Catherby teleport runes", new ItemRequirement("Law rune", + ItemID.LAWRUNE), new ItemRequirement("Air rune", ItemID.AIRRUNE, 5)); + var catherbyTablet = new ItemRequirement("Catherby tablet", ItemID.LUNAR_TABLET_CATHERBY_TELEPORT); catherbyTeleport = new ItemRequirements(LogicType.OR, "Catherby teleport", catherbyRunes, catherbyTablet); - ItemRequirement trollheimRunes = new ItemRequirements("Trollheim teleport runes", new ItemRequirement("Law rune", - ItemID.LAWRUNE, 2), new ItemRequirement("Fire rune", ItemID.FIRERUNE, 2)); - ItemRequirement trollheimTablet = new ItemRequirement("Trollheim tablet", ItemID.NZONE_TELETAB_TROLLHEIM); + var trollheimRunes = new ItemRequirements("Trollheim teleport runes", new ItemRequirement("Law rune", + ItemID.LAWRUNE, 2), new ItemRequirement("Fire rune", ItemID.FIRERUNE, 2)); + var trollheimTablet = new ItemRequirement("Trollheim tablet", ItemID.NZONE_TELETAB_TROLLHEIM); trollheimTeleport = new ItemRequirements(LogicType.OR, "Trollheim teleport", trollheimRunes, trollheimTablet) - .hideConditioned(new QuestRequirement(QuestHelperQuest.MAKING_FRIENDS_WITH_MY_ARM, QuestState.FINISHED)); + .hideConditioned(new QuestRequirement(QuestHelperQuest.MAKING_FRIENDS_WITH_MY_ARM, QuestState.FINISHED)); icyBasalt = new ItemRequirement("Icy basalt", ItemID.WEISS_TELEPORT_BASALT).showConditioned(new QuestRequirement(QuestHelperQuest.MAKING_FRIENDS_WITH_MY_ARM, QuestState.FINISHED)); stonyBasalt = new ItemRequirement("Stony basalt", ItemID.STRONGHOLD_TELEPORT_BASALT).showConditioned(new QuestRequirement(QuestHelperQuest.MAKING_FRIENDS_WITH_MY_ARM, QuestState.FINISHED)); @@ -239,55 +273,57 @@ protected void setupRequirements() farmingGuildTeleport.addAlternates(ItemCollections.SKILLS_NECKLACES); farmingGuildTeleport.addAlternates(ItemCollections.FAIRY_STAFF); + harmonyTeleport = new ItemRequirement("Harmony Teleport", ItemID.TELETAB_HARMONY); + hunterWhistle = new ItemRequirement("Quetzal whistle", ItemID.HG_QUETZALWHISTLE_PERFECTED).showConditioned(accessToVarlamore); hunterWhistle.addAlternates(ItemID.HG_QUETZALWHISTLE_BASIC); hunterWhistle.addAlternates(ItemID.HG_QUETZALWHISTLE_ENHANCED); gracefulHood = new ItemRequirement( - "Graceful hood", ItemCollections.GRACEFUL_HOOD, 1 ,true).isNotConsumed(); + "Graceful hood", ItemCollections.GRACEFUL_HOOD, 1, true).isNotConsumed(); gracefulTop = new ItemRequirement( - "Graceful top", ItemCollections.GRACEFUL_TOP, 1, true).isNotConsumed(); + "Graceful top", ItemCollections.GRACEFUL_TOP, 1, true).isNotConsumed(); gracefulLegs = new ItemRequirement( - "Graceful legs", ItemCollections.GRACEFUL_LEGS, 1, true).isNotConsumed(); + "Graceful legs", ItemCollections.GRACEFUL_LEGS, 1, true).isNotConsumed(); gracefulCape = new ItemRequirement( - "Graceful cape", ItemCollections.GRACEFUL_CAPE, 1, true).isNotConsumed(); + "Graceful cape", ItemCollections.GRACEFUL_CAPE, 1, true).isNotConsumed(); gracefulGloves = new ItemRequirement( - "Graceful gloves", ItemCollections.GRACEFUL_GLOVES, 1, true).isNotConsumed(); + "Graceful gloves", ItemCollections.GRACEFUL_GLOVES, 1, true).isNotConsumed(); gracefulBoots = new ItemRequirement( - "Graceful boots", ItemCollections.GRACEFUL_BOOTS, 1, true).isNotConsumed(); + "Graceful boots", ItemCollections.GRACEFUL_BOOTS, 1, true).isNotConsumed(); gracefulBoots.addAlternates(ItemID.IKOV_BOOTSOFLIGHTNESS); gracefulOutfit = new ItemRequirements( - "Graceful outfit (equipped)", - gracefulHood, gracefulTop, gracefulLegs, gracefulGloves, gracefulBoots, gracefulCape + "Graceful outfit (equipped)", + gracefulHood, gracefulTop, gracefulLegs, gracefulGloves, gracefulBoots, gracefulCape ).isNotConsumed().showConditioned(new RuneliteRequirement(configManager, GRACEFUL_OR_FARMING, GracefulOrFarming.GRACEFUL.name())); farmingHat = new ItemRequirement( - "Farmer's strawhat", ItemID.TITHE_REWARD_HAT_MALE, 1 ,true).isNotConsumed(); + "Farmer's strawhat", ItemID.TITHE_REWARD_HAT_MALE, 1, true).isNotConsumed(); farmingHat.addAlternates(ItemID.TITHE_REWARD_HAT_FEMALE, ItemID.TITHE_REWARD_HAT_MALE_DUMMY, ItemID.TITHE_REWARD_HAT_FEMALE_DUMMY); farmingTop = new ItemRequirement( - "Farmer's top", ItemID.TITHE_REWARD_TORSO_MALE, 1, true).isNotConsumed(); + "Farmer's top", ItemID.TITHE_REWARD_TORSO_MALE, 1, true).isNotConsumed(); farmingTop.addAlternates(ItemID.TITHE_REWARD_TORSO_FEMALE); farmingLegs = new ItemRequirement( - "Farmer's boro trousers", ItemID.TITHE_REWARD_LEGS_MALE, 1, true).isNotConsumed(); + "Farmer's boro trousers", ItemID.TITHE_REWARD_LEGS_MALE, 1, true).isNotConsumed(); farmingLegs.addAlternates(ItemID.TITHE_REWARD_LEGS_FEMALE); farmingBoots = new ItemRequirement( - "Graceful cape", ItemID.TITHE_REWARD_FEET_MALE, 1, true).isNotConsumed(); + "Graceful cape", ItemID.TITHE_REWARD_FEET_MALE, 1, true).isNotConsumed(); farmingBoots.addAlternates(ItemID.TITHE_REWARD_FEET_FEMALE); farmersOutfit = new ItemRequirements( - "Farmer's outfit (equipped)", - farmingHat, farmingTop, farmingLegs, farmingBoots + "Farmer's outfit (equipped)", + farmingHat, farmingTop, farmingLegs, farmingBoots ).isNotConsumed().showConditioned(new RuneliteRequirement(configManager, GRACEFUL_OR_FARMING, GracefulOrFarming.FARMING.name())); } @@ -308,7 +344,7 @@ public void setupSteps() morytaniaPatch = new ObjectStep(this, ObjectID.FARMING_HERB_PATCH_4, new WorldPoint(3605, 3529, 0), "Harvest your herbs from the Morytania patch.", ectophial); trollStrongholdPatch = new ObjectStep(this, ObjectID.MYARM_HERBPATCH, new WorldPoint(2826, 3694, 0), "Harvest your herbs from the Troll Stronghold patch.", - trollheimTeleport, stonyBasalt); + trollheimTeleport, stonyBasalt); trollStrongholdPatch.conditionToHideInSidebar(new Conditions(LogicType.NOR, accessToTrollStronghold)); weissPatch = new ObjectStep(this, ObjectID.MY2ARM_HERBPATCH, new WorldPoint(2848, 3934, 0), "Harvest your herbs from the Weiss patch.", icyBasalt); weissPatch.conditionToHideInSidebar(new Conditions(LogicType.NOR, accessToWeiss)); @@ -330,7 +366,7 @@ public void setupSteps() hosidiusPlant = new ObjectStep(this, ObjectID.FARMING_HERB_PATCH_6, new WorldPoint(1738, 3550, 0), "Plant your seeds into the Hosidius patch.", hosidiusHouseTeleport); hosidiusPlant.addIcon(ItemID.RANARR_SEED); - hosidiusPlant.addSubSteps(hosidiusPlant); + hosidiusPatch.addSubSteps(hosidiusPlant); farmingGuildPlant = new ObjectStep(this, ObjectID.FARMING_HERB_PATCH_7, new WorldPoint(1238, 3726, 0), "Plant your seeds into the Farming Guild patch.", farmingGuildTeleport); farmingGuildPlant.conditionToHideInSidebar(new Conditions(LogicType.NOR, accessToFarmingGuildPatch)); @@ -347,7 +383,7 @@ public void setupSteps() morytaniaPatch.addSubSteps(morytaniaPlant); trollStrongholdPlant = new ObjectStep(this, ObjectID.MYARM_HERBPATCH, new WorldPoint(2826, 3694, 0), "Plant your seeds into the Troll Stronghold patch.", - trollheimTeleport, stonyBasalt); + trollheimTeleport, stonyBasalt); trollStrongholdPlant.conditionToHideInSidebar(new Conditions(LogicType.NOR, accessToTrollStronghold)); trollStrongholdPlant.addIcon(ItemID.RANARR_SEED); trollStrongholdPatch.addSubSteps(trollStrongholdPlant); @@ -363,6 +399,48 @@ public void setupSteps() varlamorePatch.addSubSteps(varlamorePlant); } + @Override + public QuestStep loadStep() + { + farmingHandler = new FarmingHandler(client, configManager); + initializeRequirements(); + setupSteps(); + prepopulateSidebarPanels(); + + steps = new ReorderableConditionalStep(this, waitForHerbs, spade, dibber, rake, seed, magicSec, farmersOutfit, gracefulOutfit); + steps.addStep(faladorReady, faladorPatch); + steps.addStep(faladorEmpty, faladorPlant); + + steps.addStep(ardougneReady, ardougnePatch); + steps.addStep(ardougneEmpty, ardougnePlant); + + steps.addStep(catherbyReady, catherbyPatch); + steps.addStep(catherbyEmpty, catherbyPlant); + + steps.addStep(morytaniaReady, morytaniaPatch); + steps.addStep(morytaniaEmpty, morytaniaPlant); + + steps.addStep(hosidiusReady, hosidiusPatch); + steps.addStep(hosidiusEmpty, hosidiusPlant); + + steps.addStep(new Conditions(accessToTrollStronghold, trollStrongholdReady), trollStrongholdPatch); + steps.addStep(new Conditions(accessToTrollStronghold, trollStrongholdEmpty), trollStrongholdPlant); + + steps.addStep(new Conditions(accessToWeiss, weissReady), weissPatch); + steps.addStep(new Conditions(accessToWeiss, weissEmpty), weissPlant); + + steps.addStep(new Conditions(accessToFarmingGuildPatch, farmingGuildReady), farmingGuildPatch); + steps.addStep(new Conditions(accessToFarmingGuildPatch, farmingGuildEmpty), farmingGuildPlant); + + steps.addStep(new Conditions(accessToHarmony, harmonyReady), harmonyPatch); + steps.addStep(new Conditions(accessToHarmony, harmonyEmpty), harmonyPlant); + + steps.addStep(new Conditions(accessToVarlamore, varlamoreReady), varlamorePatch); + steps.addStep(new Conditions(accessToVarlamore, varlamoreEmpty), varlamorePlant); + + return steps; + } + @Subscribe public void onConfigChanged(ConfigChanged event) { @@ -379,8 +457,7 @@ public void onConfigChanged(ConfigChanged event) seed.setId(selectedSeed.seedID); seed.setName(Text.titleCase(selectedSeed) + " seed"); questHelperPlugin.refreshBank(); - } - catch (IllegalArgumentException err) + } catch (IllegalArgumentException err) { questHelperPlugin.getConfigManager().setConfiguration(QuestHelperConfig.QUEST_BACKGROUND_GROUP, HERB_SEEDS, Seed.GUAM); } @@ -423,7 +500,7 @@ public void onGameTick(GameTick event) case "Farming Guild": farmingGuildReady.setShouldPass(isHarvestable); farmingGuildEmpty.setShouldPass(isPlantable); - if(!accessToFarmingGuildPatch.check(client)) + if (!accessToFarmingGuildPatch.check(client)) { seedsNeeded--; } @@ -447,7 +524,7 @@ public void onGameTick(GameTick event) case "Troll Stronghold": trollStrongholdReady.setShouldPass(isHarvestable); trollStrongholdEmpty.setShouldPass(isPlantable); - if(!accessToTrollStronghold.check(client)) + if (!accessToTrollStronghold.check(client)) { seedsNeeded--; } @@ -455,7 +532,7 @@ public void onGameTick(GameTick event) case "Weiss": weissReady.setShouldPass(isHarvestable); weissEmpty.setShouldPass(isPlantable); - if(!accessToWeiss.check(client)) + if (!accessToWeiss.check(client)) { seedsNeeded--; } @@ -463,7 +540,7 @@ public void onGameTick(GameTick event) case "Civitas illa Fortis": varlamoreReady.setShouldPass(isHarvestable); varlamoreEmpty.setShouldPass(isPlantable); - if(!accessToVarlamore.check(client)) + if (!accessToVarlamore.check(client)) { seedsNeeded--; } @@ -483,7 +560,8 @@ public List getItemRequirements() @Override public List getItemRecommended() { - return Arrays.asList(compost, ectophial, magicSec, explorerRing2, ardyCloak2, xericsTalisman, hosidiusHouseTeleport, catherbyTeleport, trollheimTeleport, icyBasalt, stonyBasalt, farmingGuildTeleport, hunterWhistle, gracefulOutfit, farmersOutfit); + return Arrays.asList(compost, ectophial, magicSec, explorerRing2, ardyCloak2, xericsTalisman, hosidiusHouseTeleport, catherbyTeleport, + trollheimTeleport, icyBasalt, stonyBasalt, farmingGuildTeleport, hunterWhistle, harmonyTeleport, gracefulOutfit, farmersOutfit); } @Override @@ -494,14 +572,24 @@ public List getConfigs() return Arrays.asList(seedsConfig, outfitConfig); } + private void prepopulateSidebarPanels() + { + allSteps = new ArrayList<>(); + allSteps.add(new PanelDetails("Farming Guild", Collections.singletonList(farmingGuildPatch)).withId(0)); + allSteps.add(new PanelDetails("Falador", Collections.singletonList(faladorPatch)).withId(1)); + allSteps.add(new PanelDetails("Ardougne", Collections.singletonList(ardougnePatch)).withId(2)); + allSteps.add(new PanelDetails("Catherby", Collections.singletonList(catherbyPatch)).withId(3)); + allSteps.add(new PanelDetails("Morytania", Collections.singletonList(morytaniaPatch)).withId(4)); + allSteps.add(new PanelDetails("Hosidius", Collections.singletonList(hosidiusPatch)).withId(5)); + allSteps.add(new PanelDetails("Varlamore", Collections.singletonList(varlamorePatch)).withId(6)); + allSteps.add(new PanelDetails("Troll Stronghold", Collections.singletonList(trollStrongholdPatch)).withId(7)); + allSteps.add(new PanelDetails("Weiss", Collections.singletonList(weissPatch)).withId(8)); + allSteps.add(new PanelDetails("Harmony Island", Collections.singletonList(harmonyPatch)).withId(9).withHideCondition(nor(accessToHarmony))); + } + @Override public List getPanels() { - List allSteps = new ArrayList<>(); - allSteps.add(new PanelDetails("Farm run", Arrays.asList(faladorPatch, ardougnePatch, catherbyPatch, morytaniaPatch, hosidiusPatch, - trollStrongholdPatch, weissPatch, farmingGuildPatch, harmonyPatch, varlamorePatch), Arrays.asList(spade, dibber, rake, seed, magicSec), - Arrays.asList(compost, ectophial, explorerRing2, ardyCloak2, xericsTalisman, catherbyTeleport, trollheimTeleport, icyBasalt, stonyBasalt, farmingGuildTeleport, hunterWhistle, gracefulOutfit, farmersOutfit))); - return allSteps; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/PatchImplementation.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/PatchImplementation.java index 7adf89fc00b..c880df851a7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/PatchImplementation.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/PatchImplementation.java @@ -2278,7 +2278,7 @@ PatchState forVarbitValue(int value) if (value == 20) { // Spirit Tree[Travel,Talk-to,Inspect,Guide,Clear] 8355 - return new PatchState(Produce.SPIRIT_TREE, CropState.HARVESTABLE, 12); + return new PatchState(Produce.SPIRIT_TREE, CropState.GROWING, 12); } if (value >= 21 && value <= 31) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/TreeRun.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/TreeRun.java index f8e4b6adb29..6c78b35125e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/TreeRun.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/farmruns/TreeRun.java @@ -89,16 +89,17 @@ public class TreeRun extends ComplexStateQuestHelper // Trees DetailedQuestStep farmingGuildTreePatchCheckHealth, lumbridgeTreePatchCheckHealth, faladorTreePatchCheckHealth, taverleyTreePatchCheckHealth, varrockTreePatchCheckHealth, - gnomeStrongholdTreePatchCheckHealth; + gnomeStrongholdTreePatchCheckHealth, nemusRetreatTreePatchCheckHealth; DetailedQuestStep farmingGuildTreePatchPlant, lumbridgeTreePatchPlant, faladorTreePatchPlant, taverleyTreePatchPlant, - varrockTreePatchPlant, gnomeStrongholdTreePatchPlant; + varrockTreePatchPlant, gnomeStrongholdTreePatchPlant, nemusRetreatTreePatchPlant; DetailedQuestStep lumbridgeTreePatchClear, faladorTreePatchClear, taverleyTreePatchClear, varrockTreePatchClear, - gnomeStrongholdTreePatchClear, farmingGuildTreePatchClear; + gnomeStrongholdTreePatchClear, farmingGuildTreePatchClear, nemusRetreatTreePatchClear; DetailedQuestStep lumbridgeTreePatchDig, faladorTreePatchDig, taverleyTreePatchDig, varrockTreePatchDig, - gnomeStrongholdTreePatchDig, farmingGuildTreePatchDig; + gnomeStrongholdTreePatchDig, farmingGuildTreePatchDig, nemusRetreatTreePatchDig; - DetailedQuestStep farmingGuildTreePayForProtection, lumbridgeTreeProtect, faladorTreeProtect, taverleyTreeProtect, varrockTreeProtect, strongholdTreeProtect; + DetailedQuestStep farmingGuildTreePayForProtection, lumbridgeTreeProtect, faladorTreeProtect, taverleyTreeProtect, + varrockTreeProtect, strongholdTreeProtect, nemusRetreatTreeProtect; // Fruit Trees DetailedQuestStep farmingGuildFruitTreePatchCheckHealth, gnomeStrongholdFruitTreePatchCheckHealth, gnomeVillageFruitTreePatchCheckHealth, @@ -129,7 +130,7 @@ public class TreeRun extends ComplexStateQuestHelper // Teleport Items // TODO: Add these... - ItemRequirement farmingGuildTeleport, crystalTeleport, catherbyTeleport, varrockTeleport, lumbridgeTeleport, faladorTeleport, fossilIslandTeleport; + ItemRequirement farmingGuildTeleport, crystalTeleport, catherbyTeleport, varrockTeleport, lumbridgeTeleport, faladorTeleport, fossilIslandTeleport, nemusRetreatTeleport; // Graceful Set ItemRequirement gracefulHood, gracefulTop, gracefulLegs, gracefulGloves, gracefulBoots, gracefulCape, gracefulOutfit; @@ -138,18 +139,18 @@ public class TreeRun extends ComplexStateQuestHelper ItemRequirement farmingHat, farmingTop, farmingLegs, farmingBoots, farmersOutfit; // Access Requirements - Requirement accessToFarmingGuildTreePatch, accessToFarmingGuildFruitTreePatch, accessToLletya, accessToFossilIsland, accessToSavannah; + Requirement accessToFarmingGuildTreePatch, accessToFarmingGuildFruitTreePatch, accessToLletya, accessToFossilIsland, accessToSavannah, accessToVarlamore; Requirement payingForRemoval, payingForProtection, usingCompostorNothing; - PatchStates faladorStates, lumbridgeStates, farmingGuildTreeStates, taverleyStates, varrockStates, gnomeStrongholdTreeStates; + PatchStates faladorStates, lumbridgeStates, farmingGuildTreeStates, taverleyStates, varrockStates, gnomeStrongholdTreeStates, nemusRetreatStates; PatchStates gnomeStrongholdFruitStates, gnomeVillageStates, brimhavenStates, catherbyStates, lletyaStates, farmingGuildFruitStates; PatchStates eastHardwoodStates, middleHardwoodStates, westHardwoodStates, savannahStates; ConditionalStep farmingGuildStep, lumbridgeStep, varrockStep, faladorStep, taverleyStep, strongholdStep, villageStep, lletyaStep, - catherbyStep, brimhavenStep, fossilIslandStep, savannahStep; + catherbyStep, brimhavenStep, fossilIslandStep, savannahStep, nemusRetreatStep; private final String PAY_OR_CUT = "payOrCutTree"; private final String PAY_OR_COMPOST = "payOrCompostTree"; @@ -305,6 +306,15 @@ public QuestStep loadStep() steps.addStep(and(accessToSavannah, nor(savannahStates.getIsGrowing())), savannahStep.withId(11)); + nemusRetreatStep = new ConditionalStep(this, nemusRetreatTreePatchCheckHealth); + nemusRetreatStep.addStep(nemusRetreatStates.getIsUnchecked(), nemusRetreatTreePatchCheckHealth); + nemusRetreatStep.addStep(nemusRetreatStates.getIsEmpty(), nemusRetreatTreePatchPlant); + nemusRetreatStep.addStep(nemusRetreatStates.getIsHarvestable(), nemusRetreatTreePatchClear); + nemusRetreatStep.addStep(nemusRetreatStates.getIsStump(), nemusRetreatTreePatchDig); + nemusRetreatStep.addStep(nor(usingCompostorNothing, nemusRetreatStates.getIsProtected()), nemusRetreatTreeProtect); + + steps.addStep(and(accessToVarlamore, nor(nemusRetreatStates.getIsGrowing())), nemusRetreatStep.withId(12)); + return steps; } @@ -323,6 +333,7 @@ private void setupConditions() new SkillRequirement(Skill.FARMING, 85) ); accessToSavannah = new QuestRequirement(QuestHelperQuest.THE_RIBBITING_TALE_OF_A_LILY_PAD_LABOUR_DISPUTE, QuestState.FINISHED); + accessToVarlamore = new QuestRequirement(QuestHelperQuest.CHILDREN_OF_THE_SUN, QuestState.FINISHED); // Trees lumbridgeStates = new PatchStates("Lumbridge"); @@ -331,6 +342,7 @@ private void setupConditions() varrockStates = new PatchStates("Varrock"); gnomeStrongholdTreeStates = new PatchStates("Gnome Stronghold"); farmingGuildTreeStates = new PatchStates("Farming Guild", accessToFarmingGuildTreePatch); + nemusRetreatStates = new PatchStates("Nemus Retreat", accessToVarlamore); // Fruit trees catherbyStates = new PatchStates("Catherby"); @@ -403,7 +415,8 @@ public void setupRequirements() faladorTeleport = new ItemRequirement("Falador teleport", ItemCollections.RING_OF_WEALTHS); faladorTeleport.addAlternates(ItemID.POH_TABLET_FALADORTELEPORT); fossilIslandTeleport = new ItemRequirement("Teleport to Fossil Island", ItemCollections.DIGSITE_PENDANTS); - + nemusRetreatTeleport = new ItemRequirement("Nemus Retreat Teleport", ItemID.PENDANT_OF_ATES); + nemusRetreatTeleport.addAlternates(ItemCollections.FAIRY_STAFF); // Graceful and Farming Outfit gracefulHood = new ItemRequirement( @@ -483,6 +496,10 @@ private void setupSteps() "Speak to Rosie to clear the patch."); farmingGuildTreePatchClear.addDialogSteps("Would you chop my tree down for me?","I can't be bothered - I'd rather pay you to do it.", "Here's 200 Coins - chop my tree down please.", "Yes."); + nemusRetreatTreePatchClear = new NpcStep(this, NpcID.FARMING_GARDENER_TREE_7, new WorldPoint(1367, 3322, 0), + "Speak to Aub to clear the patch."); + nemusRetreatTreePatchClear.addDialogSteps("Would you chop my tree down for me?","I can't be bothered - I'd rather pay you to do it.", "Here's 200 Coins - chop my tree down please.", "Yes."); + lumbridgeTreeProtect = new NpcStep(this, NpcID.FARMING_GARDENER_TREE_4, new WorldPoint(3193, 3231, 0), "Speak to Fayeth to protect the patch."); lumbridgeTreeProtect.addDialogSteps("Would you chop my tree down for me?","I can't be bothered - I'd rather pay you to do it.", "Here's 200 Coins - chop my tree down please.", "Yes."); @@ -507,6 +524,10 @@ private void setupSteps() "Speak to Rosie to protect the patch."); farmingGuildTreePayForProtection.addDialogSteps("Would you chop my tree down for me?","I can't be bothered - I'd rather pay you to do it.", "Here's 200 Coins - chop my tree down please.", "Yes."); + nemusRetreatTreeProtect = new NpcStep(this, NpcID.FARMING_GARDENER_TREE_7, new WorldPoint(1367, 3322, 0), + "Speak to Aub to protect the patch."); + nemusRetreatTreeProtect.addDialogSteps("Would you chop my tree down for me?","I can't be bothered - I'd rather pay you to do it.", "Here's 200 Coins - chop my tree down please.", "Yes."); + // Tree Patch Steps lumbridgeTreePatchCheckHealth = new ObjectStep(this, ObjectID.FARMING_TREE_PATCH_4, new WorldPoint(3193, 3231, 0), "Check the health of the tree planted in Lumbridge."); @@ -530,6 +551,11 @@ private void setupSteps() farmingGuildTreePatchCheckHealth.conditionToHideInSidebar(new Conditions(LogicType.NOR, accessToFarmingGuildTreePatch)); farmingGuildTreePatchCheckHealth.addTeleport(farmingGuildTeleport); + nemusRetreatTreePatchCheckHealth = new ObjectStep(this, ObjectID.FARMING_TREE_PATCH_7, new WorldPoint(1367, 3322, 0), + "Check the health of the tree planted at the Nemus Retreat"); + nemusRetreatTreePatchCheckHealth.conditionToHideInSidebar(new Conditions(LogicType.NOR, accessToVarlamore)); + nemusRetreatTreePatchCheckHealth.addTeleport(nemusRetreatTeleport); + // Tree Plant Steps lumbridgeTreePatchPlant = new ObjectStep(this, ObjectID.FARMING_TREE_PATCH_4, new WorldPoint(3193, 3231, 0), "Plant your sapling in the Lumbridge patch.", treeSapling); @@ -562,6 +588,12 @@ private void setupSteps() farmingGuildTreePatchPlant.addIcon(treeSapling.getId()); farmingGuildTreePatchCheckHealth.addSubSteps(farmingGuildTreePatchPlant); + nemusRetreatTreePatchPlant = new ObjectStep(this, ObjectID.FARMING_TREE_PATCH_7, new WorldPoint(1367, 3322, 0), + "Plant your sapling in the Nemus Retreat tree patch.", treeSapling); + nemusRetreatTreePatchPlant.conditionToHideInSidebar(new Conditions(LogicType.NOR, accessToVarlamore)); + nemusRetreatTreePatchPlant.addIcon(treeSapling.getId()); + nemusRetreatTreePatchCheckHealth.addSubSteps(nemusRetreatTreePatchPlant); + // Dig lumbridgeTreePatchDig = new ObjectStep(this, ObjectID.FARMING_TREE_PATCH_4, new WorldPoint(3193, 3231, 0), "Dig up the tree stump in Lumbridge."); @@ -575,13 +607,16 @@ private void setupSteps() "Dig up the tree stump in the Tree Gnome Stronghold."); farmingGuildTreePatchDig = new ObjectStep(this, ObjectID.FARMING_TREE_PATCH_6, new WorldPoint(1232, 3736, 0), "Dig up the tree stump in the Farming Guild tree patch."); + nemusRetreatTreePatchDig = new ObjectStep(this, ObjectID.FARMING_TREE_PATCH_7, new WorldPoint(1367, 3322, 0), + "Dig up the tree stump in the Nemus Retreat tree patch."); faladorTreePatchClear.addSubSteps(faladorTreePatchDig, faladorTreeProtect); taverleyTreePatchClear.addSubSteps(taverleyTreePatchDig, taverleyTreeProtect); varrockTreePatchClear.addSubSteps(varrockTreePatchDig, varrockTreeProtect); gnomeStrongholdTreePatchClear.addSubSteps(gnomeStrongholdTreePatchDig, strongholdTreeProtect); lumbridgeTreePatchClear.addSubSteps(lumbridgeTreePatchDig, lumbridgeTreeProtect); - farmingGuildTreePatchClear.addSubSteps(farmingGuildTreePatchDig, farmingGuildTreePatchDig); + farmingGuildTreePatchClear.addSubSteps(farmingGuildTreePatchDig, farmingGuildTreePayForProtection); + nemusRetreatTreePatchClear.addSubSteps(nemusRetreatTreePatchDig, nemusRetreatTreeProtect); // Fruit Tree Steps gnomeStrongholdFruitTreePatchCheckHealth = new ObjectStep(this, ObjectID.FARMING_FRUIT_TREE_PATCH_1, new WorldPoint(2476, 3446, 0), @@ -786,7 +821,7 @@ public void onGameTick(GameTick event) allProtectionItemFruitTree.setQuantity(protectionItemFruitTree.getQuantity()); allProtectionItemHardwood.setQuantity(protectionItemHardwood.getQuantity()); handleTreePatches(PatchImplementation.TREE, - List.of(farmingGuildTreeStates, varrockStates, faladorStates, taverleyStates, lumbridgeStates, gnomeStrongholdTreeStates), + List.of(farmingGuildTreeStates, varrockStates, faladorStates, taverleyStates, lumbridgeStates, gnomeStrongholdTreeStates, nemusRetreatStates), farmingWorld.getTabs().get(Tab.TREE), allTreeSaplings, allProtectionItemTree); handleTreePatches(PatchImplementation.FRUIT_TREE, List.of(farmingGuildFruitStates, brimhavenStates, catherbyStates, gnomeStrongholdFruitStates, gnomeVillageStates, lletyaStates), @@ -949,6 +984,11 @@ public List getPanels() PanelDetails savannahPanel = new PanelDetails("Avium Savannah", Arrays.asList(savannahCheckHealth, savannahClear, savannahPlant)).withId(11); savannahPanel.setLockingStep(savannahStep); allSteps.add(savannahPanel); + + PanelDetails nemusRetreatPanel = new PanelDetails("Nemus Retreat", Arrays.asList(nemusRetreatTreePatchCheckHealth, nemusRetreatTreePatchClear, nemusRetreatTreePatchPlant)).withId(12); + nemusRetreatPanel.setLockingStep(nemusRetreatStep); + allSteps.add(nemusRetreatPanel); + return allSteps; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/knightswaves/KnightWaves.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/knightswaves/KnightWaves.java index 63eb3625ab9..6ab3754e78b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/knightswaves/KnightWaves.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/knightswaves/KnightWaves.java @@ -43,11 +43,12 @@ import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; import net.runelite.api.QuestState; import net.runelite.api.Skill; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.SpriteID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -103,7 +104,7 @@ protected void setupRequirements() food = new ItemRequirement("Food", ItemCollections.GOOD_EATING_FOOD, 25); potions = new ItemRequirement("Attack and strength potions for boost", -1, -1); - talkedToSquire = new VarbitRequirement(3908, 1); + talkedToSquire = new VarbitRequirement(VarbitID.KR_WAVE_INSTR, 1); } public void setupSteps() @@ -135,7 +136,7 @@ public void setupSteps() NpcID.KR_CAM_KAY, NpcID.KR_CAM_KAY_JAIL, NpcID.KR_KNIGHT7, NpcID.KR_CAM_LANCELOT, NpcID.KR_KNIGHT8); ((NpcStep) killKnights).addSafeSpots(new WorldPoint(2752, 3511, 2)); - ((NpcStep) killKnights).addTileMarker(new WorldPoint(2753, 3510, 2), SpriteID.MAP_ICON_HELMET_SHOP); + ((NpcStep) killKnights).addTileMarker(new WorldPoint(2753, 3510, 2), SpriteID.Mapfunction.HELMET_SHOP); killKnightsSteps = new ConditionalStep(this, goToFloor1, "Defeat the 8 Knights of the Round Table in the room" + " on top of Camelot. It's recommended to flinch the knights on one of the dummies around the room, and " + diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/strongholdofsecurity/StrongholdOfSecurity.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/strongholdofsecurity/StrongholdOfSecurity.java index 11318f981a1..c32c524cda8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/strongholdofsecurity/StrongholdOfSecurity.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/mischelpers/strongholdofsecurity/StrongholdOfSecurity.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2023, Okke234 + * Copyright (c) 2025, pajlada * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,39 +29,33 @@ import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.player.CombatLevelRequirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicType; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.or; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; import net.runelite.client.plugins.microbot.questhelper.rewards.UnlockReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; - -import java.util.*; +import net.runelite.api.gameval.VarbitID; public class StrongholdOfSecurity extends BasicQuestHelper { - Requirement canSkipWar, canSkipFamine, canSkipPestilence, - notUsedCountCheck, nearCountCheck, inFloorWar, inFloorFamine, inFloorPestilence, inFloorDeath, - inStartRoomWar, inStartRoomFamine, inStartRoomPestilence, - notFlap, notSlap, notIdea, notStamp, hasFlap, hasSlap, hasIdea, hasStamp; - - ItemRequirement food; - Zone countCheck, floorWar, floorFamine, floorPestilence, floorDeath, startRoomWar, startRoomFamine, startRoomPestilence; - - QuestStep talkToCountCheck, enterStronghold, usePortalWar, usePortalFamine, usePortalPestilence; - - DetailedQuestStep openChestWar, openChestFamine, openChestPestilence, openChestDeath, - enterFloorFamine, enterFloorPestilence, enterFloorDeath; - - String[] answers = { + static final String[] CORRECT_ANSWERS = { "No.", "Me.", "Nobody.", @@ -82,67 +77,95 @@ public class StrongholdOfSecurity extends BasicQuestHelper "Don't share your information and report the player.", "Set up two-factor authentication with my email provider.", "No, you should never allow anyone to level your account.", + "No, you should never allow anyone to use your account.", "Authenticator and two-step login on my registered email.", "No way! You'll just take my gold for your own! Reported!", "Don't type in my password backwards and report the player.", "Don't give them the information and send an 'Abuse report'.", "Don't tell them anything and click the 'Report Abuse' button.", "Politely tell them no and then use the 'Report Abuse' button.", + "Politely tell them no, then use the 'Report Abuse' button.", "Don't give out your password to anyone. Not even close friends.", "Do not visit the website and report the player who messaged you.", "Report the stream as a scam. Real Jagex streams have a 'verified' mark.", - "Two-factor authentication on yuor account and your registered email.", - "Nope, you're tricking me into going somewhere dangerous." + "Two-factor authentication on your account and your registered email.", + "Nope, you're tricking me into going somewhere dangerous.", + "It's never used on other websites or accounts.", }; - int[] cbLevels = {26, 51, 76}; + static final int CB_LEVEL_SKIP_WAR = 26; + static final int CB_LEVEL_SKIP_FAMINE = 51; + static final int CB_LEVEL_SKIP_PESTILENCE = 76; - @Override - public Map loadSteps() - { - initializeRequirements(); - setupConditions(); - setupSteps(); - Map steps = new HashMap<>(); - - ConditionalStep goEnterStronghold = new ConditionalStep(this, enterStronghold); - goEnterStronghold.addStep(new Conditions(nearCountCheck, notUsedCountCheck), talkToCountCheck); - goEnterStronghold.addStep(new Conditions(new Conditions(LogicType.OR, canSkipWar, hasFlap), - inFloorWar, inStartRoomWar), usePortalWar); - goEnterStronghold.addStep(new Conditions(notFlap, inFloorWar), openChestWar); - goEnterStronghold.addStep(new Conditions(notStamp, inFloorWar), enterFloorFamine); - - goEnterStronghold.addStep(new Conditions(new Conditions(LogicType.OR, canSkipFamine, hasSlap), - inFloorFamine, inStartRoomFamine), usePortalFamine); - goEnterStronghold.addStep(new Conditions(notSlap, inFloorFamine), openChestFamine); - goEnterStronghold.addStep(new Conditions(notStamp, inFloorFamine), enterFloorPestilence); - - goEnterStronghold.addStep(new Conditions(new Conditions(LogicType.OR, canSkipPestilence, hasIdea), - inFloorPestilence, inStartRoomPestilence), usePortalPestilence); - goEnterStronghold.addStep(new Conditions(notIdea, inFloorPestilence), openChestPestilence); - goEnterStronghold.addStep(new Conditions(notStamp, inFloorPestilence), enterFloorDeath); - - goEnterStronghold.addStep(new Conditions(notStamp, inFloorDeath), openChestDeath); + // Recommended items + ItemRequirement food; - //TODO: Highlight warning confirmation when climbing down ladder - //TODO: Auto start when entering or when teleporting with Count Check? + // Miscellaneous requirements + Requirement canSkipWar; + Requirement canSkipFamine; + Requirement canSkipPestilence; + Requirement notUsedCountCheck; + Requirement nearCountCheck; + Requirement inFloorWar; + Requirement inFloorFamine; + Requirement inFloorPestilence; + Requirement inFloorDeath; + Requirement inStartRoomWar; + Requirement inStartRoomFamine; + Requirement inStartRoomPestilence; + Requirement notFlap; + Requirement notSlap; + Requirement notIdea; + Requirement notStamp; + Requirement hasFlap; + Requirement hasSlap; + Requirement hasIdea; + Requirement hasStamp; + + // Zones + Zone countCheck; + Zone floorWar; + Zone floorFamine; + Zone floorPestilence; + Zone floorDeath; + Zone startRoomWar; + Zone startRoomFamine; + Zone startRoomPestilence; + + // Steps + QuestStep talkToCountCheck; + QuestStep enterStronghold; + QuestStep usePortalWar; + QuestStep usePortalFamine; + QuestStep usePortalPestilence; + DetailedQuestStep openChestWar; + DetailedQuestStep openChestFamine; + DetailedQuestStep openChestPestilence; + DetailedQuestStep openChestDeath; + DetailedQuestStep enterFloorFamine; + DetailedQuestStep enterFloorPestilence; + DetailedQuestStep enterFloorDeath; - steps.put(0, goEnterStronghold); + @Override + protected void setupZones() + { + countCheck = new Zone(new WorldPoint(3120, 3275, 0), new WorldPoint(3267, 3135, 0)); + floorWar = new Zone(new WorldPoint(1855, 5248, 0), new WorldPoint(1920, 5184, 0)); + floorFamine = new Zone(new WorldPoint(1983, 5248, 0), new WorldPoint(2048, 5184, 0)); + floorPestilence = new Zone(new WorldPoint(2111, 5310, 0), new WorldPoint(2176, 5248, 0)); + floorDeath = new Zone(new WorldPoint(2304, 5248, 0), new WorldPoint(2367, 5184, 0)); + startRoomWar = new Zone(new WorldPoint(1855, 5246, 0), new WorldPoint(1866, 5239, 0)); + startRoomFamine = new Zone(new WorldPoint(2040, 5245, 0), new WorldPoint(2046, 5240, 0)); + startRoomPestilence = new Zone(new WorldPoint(2117, 5258, 0), new WorldPoint(2133, 5251, 0)); - return steps; } @Override protected void setupRequirements() { - food = new ItemRequirement("Food", ItemCollections.GOOD_EATING_FOOD, -1); - } - - public void setupConditions() - { - canSkipWar = new CombatLevelRequirement(cbLevels[0]); - canSkipFamine = new CombatLevelRequirement(cbLevels[1]); - canSkipPestilence = new CombatLevelRequirement(cbLevels[2]); + canSkipWar = new CombatLevelRequirement(CB_LEVEL_SKIP_WAR); + canSkipFamine = new CombatLevelRequirement(CB_LEVEL_SKIP_FAMINE); + canSkipPestilence = new CombatLevelRequirement(CB_LEVEL_SKIP_PESTILENCE); nearCountCheck = new ZoneRequirement(countCheck); inFloorWar = new ZoneRequirement(floorWar); @@ -153,34 +176,22 @@ public void setupConditions() inStartRoomFamine = new ZoneRequirement(startRoomFamine); inStartRoomPestilence = new ZoneRequirement(startRoomPestilence); - notUsedCountCheck = new VarbitRequirement(5371, 0); - notFlap = new VarbitRequirement(2309, 0); - notSlap = new VarbitRequirement(2310, 0); - notIdea = new VarbitRequirement(2311, 0); - notStamp = new VarbitRequirement(2312, 0); - hasFlap = new VarbitRequirement(2309, 1); - hasSlap = new VarbitRequirement(2310, 1); - hasIdea = new VarbitRequirement(2311, 1); - hasStamp = new VarbitRequirement(2312, 1); - } - - @Override - protected void setupZones() - { - countCheck = new Zone(new WorldPoint(3120, 3275, 0), new WorldPoint(3267, 3135, 0)); - floorWar = new Zone(new WorldPoint(1855, 5248, 0), new WorldPoint(1920, 5184, 0)); - floorFamine = new Zone(new WorldPoint(1983, 5248, 0), new WorldPoint(2048, 5184, 0)); - floorPestilence = new Zone(new WorldPoint(2111, 5310, 0), new WorldPoint(2176, 5248, 0)); - floorDeath = new Zone(new WorldPoint(2304, 5248, 0), new WorldPoint(2367, 5184, 0)); - startRoomWar = new Zone(new WorldPoint(1855, 5246, 0), new WorldPoint(1866, 5239, 0)); - startRoomFamine = new Zone(new WorldPoint(2040, 5245, 0), new WorldPoint(2046, 5240, 0)); - startRoomPestilence = new Zone(new WorldPoint(2117, 5258, 0), new WorldPoint(2133, 5251, 0)); + notUsedCountCheck = new VarbitRequirement(VarbitID.SOS_TELEPORTED_BY_COUNT, 0); + notFlap = new VarbitRequirement(VarbitID.SOS_EMOTE_FLAP, 0); + notSlap = new VarbitRequirement(VarbitID.SOS_EMOTE_DOH, 0); + notIdea = new VarbitRequirement(VarbitID.SOS_EMOTE_IDEA, 0); + notStamp = new VarbitRequirement(VarbitID.SOS_EMOTE_STAMP, 0); + hasFlap = new VarbitRequirement(VarbitID.SOS_EMOTE_FLAP, 1); + hasSlap = new VarbitRequirement(VarbitID.SOS_EMOTE_DOH, 1); + hasIdea = new VarbitRequirement(VarbitID.SOS_EMOTE_IDEA, 1); + hasStamp = new VarbitRequirement(VarbitID.SOS_EMOTE_STAMP, 1); + food = new ItemRequirement("Food", ItemCollections.GOOD_EATING_FOOD, -1); } public void setupSteps() { - List pathFromStartToChest1 = Arrays.asList( + var pathFromStartToChest1 = List.of( new WorldPoint(1859, 5243, 0), new WorldPoint(1859, 5232, 0), new WorldPoint(1864, 5227, 0), @@ -194,7 +205,7 @@ public void setupSteps() new WorldPoint(1905, 5228, 0) ); - List pathFromStartToChest2 = Arrays.asList( + var pathFromStartToChest2 = List.of( new WorldPoint(2042, 5245, 0), new WorldPoint(2034, 5244, 0), new WorldPoint(2033, 5239, 0), @@ -215,7 +226,7 @@ public void setupSteps() new WorldPoint(2020, 5227, 0) ); - List pathFromStartToChest3 = Arrays.asList( + var pathFromStartToChest3 = List.of( new WorldPoint(2123, 5252, 0), new WorldPoint(2132, 5256, 0), new WorldPoint(2132, 5261, 0), @@ -229,7 +240,7 @@ public void setupSteps() new WorldPoint(2147, 5291, 0) ); - List pathFromStartToChest4 = Arrays.asList( + var pathFromStartToChest4 = List.of( new WorldPoint(2358, 5215, 0), new WorldPoint(2356, 5216, 0), new WorldPoint(2355, 5224, 0), @@ -251,22 +262,22 @@ public void setupSteps() talkToCountCheck.addDialogStep("Yes"); enterStronghold = new ObjectStep(this, ObjectID.SOS_DUNG_ENT_OPEN, new WorldPoint(3081, 3420, 0), - "Climb down the entrance to the Stronghold of Security."); + "Climb down the entrance to the Stronghold of Security in Barbarian Village, west of Varrock."); enterFloorFamine = new ObjectStep(this, ObjectID.SOS_WAR_LADD_DOWN, new WorldPoint(1902, 5222, 0), "Go to the 2nd floor of the stronghold."); enterFloorFamine.setLinePoints(pathFromStartToChest1); enterFloorFamine.setHideMinimapLines(true); - enterFloorFamine.addDialogSteps(answers); + enterFloorFamine.addDialogSteps(CORRECT_ANSWERS); enterFloorPestilence = new ObjectStep(this, ObjectID.SOS_FAM_LADD_DOWN, new WorldPoint(2026, 5218, 0), "Go to the 3rd floor of the stronghold."); enterFloorPestilence.setLinePoints(pathFromStartToChest2); enterFloorPestilence.setHideMinimapLines(true); - enterFloorPestilence.addDialogSteps(answers); + enterFloorPestilence.addDialogSteps(CORRECT_ANSWERS); enterFloorDeath = new ObjectStep(this, ObjectID.SOS_PEST_LADD_DOWN, new WorldPoint(2148, 5284, 0), "Go to the 4th floor of the stronghold."); enterFloorDeath.setLinePoints(pathFromStartToChest3); enterFloorDeath.setHideMinimapLines(true); - enterFloorDeath.addDialogSteps(answers); + enterFloorDeath.addDialogSteps(CORRECT_ANSWERS); usePortalWar = new ObjectStep(this, ObjectID.SOS_WAR_PORTAL, new WorldPoint(1863, 5238, 0), "Enter the portal."); @@ -279,55 +290,107 @@ public void setupSteps() new WorldPoint(1907, 5222, 0), "Claim 2k coins and the Flap emote."); openChestWar.setLinePoints(pathFromStartToChest1); openChestWar.setHideMinimapLines(true); - openChestWar.addDialogSteps(answers); + openChestWar.addDialogSteps(CORRECT_ANSWERS); openChestFamine = new ObjectStep(this, ObjectID.SOS_FAM_SACK, new WorldPoint(2021, 5216, 0), "Claim 3k coins and the Slap Head emote."); openChestFamine.setLinePoints(pathFromStartToChest2); openChestFamine.setHideMinimapLines(true); - openChestFamine.addDialogSteps(answers); + openChestFamine.addDialogSteps(CORRECT_ANSWERS); + openChestFamine.addSubSteps(enterFloorFamine, usePortalWar); openChestPestilence = new ObjectStep(this, ObjectID.SOS_PEST_CHEST, new WorldPoint(2144, 5280, 0), "Claim 5k coins and the Idea emote."); openChestPestilence.setLinePoints(pathFromStartToChest3); openChestPestilence.setHideMinimapLines(true); - openChestPestilence.addDialogSteps(answers); + openChestPestilence.addDialogSteps(CORRECT_ANSWERS); + openChestPestilence.addSubSteps(enterFloorPestilence, usePortalFamine); openChestDeath = new ObjectStep(this, ObjectID.SOS_DEATH_PRAM, new WorldPoint(2344, 5214, 0), "Claim Fancy boots or Fighting boots, and the Stamp emote."); openChestDeath.setLinePoints(pathFromStartToChest4); openChestDeath.setHideMinimapLines(true); - openChestDeath.addDialogSteps(answers); + openChestDeath.addDialogSteps(CORRECT_ANSWERS); + openChestDeath.addSubSteps(enterFloorDeath, usePortalPestilence); } @Override - public List getItemRecommended() + public Map loadSteps() { - return Collections.singletonList(food); + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + var goEnterStronghold = new ConditionalStep(this, enterStronghold); + goEnterStronghold.addStep(and(nearCountCheck, notUsedCountCheck), talkToCountCheck); + goEnterStronghold.addStep(and(or(canSkipWar, hasFlap), + inFloorWar, inStartRoomWar), usePortalWar); + goEnterStronghold.addStep(and(notFlap, inFloorWar), openChestWar); + goEnterStronghold.addStep(and(notStamp, inFloorWar), enterFloorFamine); + + goEnterStronghold.addStep(and(or(canSkipFamine, hasSlap), + inFloorFamine, inStartRoomFamine), usePortalFamine); + goEnterStronghold.addStep(and(notSlap, inFloorFamine), openChestFamine); + goEnterStronghold.addStep(and(notStamp, inFloorFamine), enterFloorPestilence); + + goEnterStronghold.addStep(and(or(canSkipPestilence, hasIdea), + inFloorPestilence, inStartRoomPestilence), usePortalPestilence); + goEnterStronghold.addStep(and(notIdea, inFloorPestilence), openChestPestilence); + goEnterStronghold.addStep(and(notStamp, inFloorPestilence), enterFloorDeath); + + goEnterStronghold.addStep(and(notStamp, inFloorDeath), openChestDeath); + + //TODO: Highlight warning confirmation when climbing down ladder + //TODO: Auto start when entering or when teleporting with Count Check? + + steps.put(0, goEnterStronghold); + + return steps; } @Override - public List getUnlockRewards() + public List getItemRecommended() { - return Collections.singletonList(new UnlockReward("Flap, Slap Head, Idea and Stamp emotes.")); + return List.of( + food + ); } public List getItemRewards() { - return Arrays.asList( + return List.of( new ItemReward("Coins", ItemID.COINS, 10000), - new ItemReward("Fancy or Fighting boots", ItemID.SOS_BOOTS, 1)); + new ItemReward("Fancy or Fighting boots", ItemID.SOS_BOOTS, 1) + ); + } + + @Override + public List getUnlockRewards() + { + return List.of( + new UnlockReward("Flap, Slap Head, Idea and Stamp emotes.") + ); } - // Maybe a little unnecessary... @Override public List getPanels() { - List allSteps = new ArrayList<>(); + var steps = new ArrayList(); + + steps.add(new PanelDetails("Entering the stronghold", List.of( + talkToCountCheck, + enterStronghold + ))); + steps.add(new PanelDetails("Claiming coins", List.of( + openChestWar, + openChestFamine, + openChestPestilence + ))); + steps.add(new PanelDetails("Claiming boots", List.of( + openChestDeath + ))); - allSteps.add(new PanelDetails("Entering the stronghold", Arrays.asList(talkToCountCheck, enterStronghold))); - allSteps.add(new PanelDetails("Claiming coins", Arrays.asList(openChestWar, openChestFamine, openChestPestilence))); - allSteps.add(new PanelDetails("Claiming boots", Collections.singletonList(openChestDeath))); - return allSteps; + return steps; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/akingdomdivided/AKingdomDivided.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/akingdomdivided/AKingdomDivided.java index e66a5fa4222..69c94ad223d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/akingdomdivided/AKingdomDivided.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/akingdomdivided/AKingdomDivided.java @@ -54,6 +54,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -472,7 +473,7 @@ protected void setupRequirements() public void setupConditions() { - hasTalkedToTomasLowry = new VarbitRequirement(12302, 1); + hasTalkedToTomasLowry = new VarbitRequirement(VarbitID.AKD_TOMAS_LIE, 1); inArceuusLibraryHistoricalArchive = new ZoneRequirement(arceuusLibraryHistoricalArchive); judgeOfYamaNearby = new NpcCondition(NpcID.AKD_JUDGE_OF_YAMA_COMBAT); hasBluishKey = new ItemRequirements(bluishKey); @@ -480,7 +481,7 @@ public void setupConditions() inCouncillorsHouseF2 = new ZoneRequirement(councillorsHouseF2); inCouncillorsHouseF3 = new ZoneRequirement(councillorsHouseF3); hasReceipt = new ItemRequirements(receipt); - hasInspectedReceipt = new VarbitRequirement(12298, 1); + hasInspectedReceipt = new VarbitRequirement(VarbitID.AKD_HUGHES_RECEIPT, 1); inPanelZone = new ZoneRequirement(panelArea1, panelArea2); assassinNearby = new NpcCondition(NpcID.AKD_SETTLEMENT_RUINS_ASSASSIN); hasColdKey = new ItemRequirements(coldKey); @@ -501,35 +502,35 @@ public void setupConditions() inLookoutF2 = new ZoneRequirement(lookoutF2); inLookoutF3 = new ZoneRequirement(lookoutF3); inShayzienPrison = new ZoneRequirement(shayzienPrison); - helpingPisc0 = new VarbitRequirement(12318, 0); - helpingArceuus0 = new VarbitRequirement(12319, 0); - helpingLova0 = new VarbitRequirement(12320, 0); - helpingHosidius0 = new VarbitRequirement(12321, 0); - helpingShayzien0 = new VarbitRequirement(12322, 0); - helpingLova2 = new VarbitRequirement(12320, 2); - helpingLova4 = new VarbitRequirement(12320, 4); - helpingLova6 = new VarbitRequirement(12320, 6); - helpingLova8 = new VarbitRequirement(12320, 8); - helpingLova10 = new VarbitRequirement(12320, 10); - helpingLova12 = new VarbitRequirement(12320, 12); - helpingLova14 = new VarbitRequirement(12320, 14); - helpingArceuus2 = new VarbitRequirement(12319, 2); - helpingArceuus4 = new VarbitRequirement(12319, 4); - helpingArceuus6 = new VarbitRequirement(12319, 6); - helpingArceuus8 = new VarbitRequirement(12319, 8); - helpingArceuus10 = new VarbitRequirement(12319, 10); - helpingHosidius2 = new VarbitRequirement(12321, 2); - helpingHosidius4 = new VarbitRequirement(12321, 4); - helpingHosidius6 = new VarbitRequirement(12321, 6); - helpingHosidius8 = new VarbitRequirement(12321, 8); - helpingPisc2 = new VarbitRequirement(12318, 2); - helpingPisc4 = new VarbitRequirement(12318, 4); - helpingPisc6 = new VarbitRequirement(12318, 6); - helpingPisc8 = new VarbitRequirement(12318, 8); - helpingPisc10 = new VarbitRequirement(12318, 10); - helpingShayzien2 = new VarbitRequirement(12322, 2); - helpingShayzien4 = new VarbitRequirement(12322, 4); - helpingShayzien6 = new VarbitRequirement(12322, 6); + helpingPisc0 = new VarbitRequirement(VarbitID.AKD_PISCARILIUS_HELPED, 0); + helpingArceuus0 = new VarbitRequirement(VarbitID.AKD_ARCEUUS_HELPED, 0); + helpingLova0 = new VarbitRequirement(VarbitID.AKD_LOVAKENGJ_HELPED, 0); + helpingHosidius0 = new VarbitRequirement(VarbitID.AKD_HOSIDIUS_HELPED, 0); + helpingShayzien0 = new VarbitRequirement(VarbitID.AKD_SHAYZIEN_HELPED, 0); + helpingLova2 = new VarbitRequirement(VarbitID.AKD_LOVAKENGJ_HELPED, 2); + helpingLova4 = new VarbitRequirement(VarbitID.AKD_LOVAKENGJ_HELPED, 4); + helpingLova6 = new VarbitRequirement(VarbitID.AKD_LOVAKENGJ_HELPED, 6); + helpingLova8 = new VarbitRequirement(VarbitID.AKD_LOVAKENGJ_HELPED, 8); + helpingLova10 = new VarbitRequirement(VarbitID.AKD_LOVAKENGJ_HELPED, 10); + helpingLova12 = new VarbitRequirement(VarbitID.AKD_LOVAKENGJ_HELPED, 12); + helpingLova14 = new VarbitRequirement(VarbitID.AKD_LOVAKENGJ_HELPED, 14); + helpingArceuus2 = new VarbitRequirement(VarbitID.AKD_ARCEUUS_HELPED, 2); + helpingArceuus4 = new VarbitRequirement(VarbitID.AKD_ARCEUUS_HELPED, 4); + helpingArceuus6 = new VarbitRequirement(VarbitID.AKD_ARCEUUS_HELPED, 6); + helpingArceuus8 = new VarbitRequirement(VarbitID.AKD_ARCEUUS_HELPED, 8); + helpingArceuus10 = new VarbitRequirement(VarbitID.AKD_ARCEUUS_HELPED, 10); + helpingHosidius2 = new VarbitRequirement(VarbitID.AKD_HOSIDIUS_HELPED, 2); + helpingHosidius4 = new VarbitRequirement(VarbitID.AKD_HOSIDIUS_HELPED, 4); + helpingHosidius6 = new VarbitRequirement(VarbitID.AKD_HOSIDIUS_HELPED, 6); + helpingHosidius8 = new VarbitRequirement(VarbitID.AKD_HOSIDIUS_HELPED, 8); + helpingPisc2 = new VarbitRequirement(VarbitID.AKD_PISCARILIUS_HELPED, 2); + helpingPisc4 = new VarbitRequirement(VarbitID.AKD_PISCARILIUS_HELPED, 4); + helpingPisc6 = new VarbitRequirement(VarbitID.AKD_PISCARILIUS_HELPED, 6); + helpingPisc8 = new VarbitRequirement(VarbitID.AKD_PISCARILIUS_HELPED, 8); + helpingPisc10 = new VarbitRequirement(VarbitID.AKD_PISCARILIUS_HELPED, 10); + helpingShayzien2 = new VarbitRequirement(VarbitID.AKD_SHAYZIEN_HELPED, 2); + helpingShayzien4 = new VarbitRequirement(VarbitID.AKD_SHAYZIEN_HELPED, 4); + helpingShayzien6 = new VarbitRequirement(VarbitID.AKD_SHAYZIEN_HELPED, 6); inMountKaruulm = new ZoneRequirement(mountKaruulm); hasSulphurPotion = new ItemRequirements(sulphurPotion); barbarianWarlordNearby = new NpcCondition(NpcID.AKD_BARBARIAN_WARLORD); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/akingdomdivided/StatuePuzzle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/akingdomdivided/StatuePuzzle.java index 94e02b416a2..63686dbc531 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/akingdomdivided/StatuePuzzle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/akingdomdivided/StatuePuzzle.java @@ -39,6 +39,7 @@ import net.runelite.api.events.GameTick; import net.runelite.api.gameval.InterfaceID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.widgets.Widget; import net.runelite.client.eventbus.Subscribe; @@ -197,10 +198,10 @@ public void setupConditions() { inLeglessFaunF1 = new ZoneRequirement(leglessFaunF1); statueStates = new Requirement[]{ - new VarbitRequirement(12306, 0), - new VarbitRequirement(12307, 0), - new VarbitRequirement(12308, 0), - new VarbitRequirement(12309, 0) + new VarbitRequirement(VarbitID.AKD_PISCARILIUS_STATUE_1, 0), + new VarbitRequirement(VarbitID.AKD_PISCARILIUS_STATUE_2, 0), + new VarbitRequirement(VarbitID.AKD_PISCARILIUS_STATUE_3, 0), + new VarbitRequirement(VarbitID.AKD_PISCARILIUS_STATUE_4, 0) }; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/anothersliceofham/AnotherSliceOfHam.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/anothersliceofham/AnotherSliceOfHam.java index 367059bb5fc..5ec622022ac 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/anothersliceofham/AnotherSliceOfHam.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/anothersliceofham/AnotherSliceOfHam.java @@ -220,12 +220,12 @@ public void setupConditions() dug5 = new VarbitRequirement(VarbitID.SLICE_ARTIFACT_5, 1, Operation.GREATER_EQUAL); dug6 = new VarbitRequirement(VarbitID.SLICE_ARTIFACT_6, 1, Operation.GREATER_EQUAL); - handedIn1 = new VarbitRequirement(3551, 2); - handedIn2 = new VarbitRequirement(3552, 2); - handedIn3 = new VarbitRequirement(3553, 2); - handedIn4 = new VarbitRequirement(3554, 2); - handedIn5 = new VarbitRequirement(3555, 2); - handedIn6 = new VarbitRequirement(3556, 2); + handedIn1 = new VarbitRequirement(VarbitID.SLICE_ARTIFACT_1, 2); + handedIn2 = new VarbitRequirement(VarbitID.SLICE_ARTIFACT_2, 2); + handedIn3 = new VarbitRequirement(VarbitID.SLICE_ARTIFACT_3, 2); + handedIn4 = new VarbitRequirement(VarbitID.SLICE_ARTIFACT_4, 2); + handedIn5 = new VarbitRequirement(VarbitID.SLICE_ARTIFACT_5, 2); + handedIn6 = new VarbitRequirement(VarbitID.SLICE_ARTIFACT_6, 2); cleaned1 = new Conditions(LogicType.OR, handedIn1, armourShard); cleaned2 = new Conditions(LogicType.OR, handedIn2, shieldFragment); @@ -236,12 +236,12 @@ public void setupConditions() cleanedAll = new Conditions(cleaned1, cleaned2, cleaned3, cleaned4, cleaned5, cleaned6); - zanikFollowing = new Conditions(LogicType.OR, new VarbitRequirement(3557, 0), + zanikFollowing = new Conditions(LogicType.OR, new VarbitRequirement(VarbitID.SLICE_ZANIK_AT_DIG, 0), new NpcInteractingRequirement(NpcID.SLICE_ZANIK_FOLLOWER)); // 3564 = 1, searjents etc - atCrate = new VarbitRequirement(3558, 1); + atCrate = new VarbitRequirement(VarbitID.SLICE_HIDING, 1); guardsPassed = new NpcCondition(NpcID.SLICE_HAM_GUARD, new WorldPoint(2397, 5551, 0)); guardEngaged = new Conditions(LogicType.OR, new NpcInteractingWithNpcRequirement(NpcID.SLICE_SERGEANT_MOSSFISTS, "Guard"), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/aporcineofinterest/APorcineOfInterest.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/aporcineofinterest/APorcineOfInterest.java index c8734b17ddc..9deed8869ec 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/aporcineofinterest/APorcineOfInterest.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/aporcineofinterest/APorcineOfInterest.java @@ -101,7 +101,7 @@ protected void setupRequirements() rope.setHighlightInInventory(true); slashItem = new ItemRequirement("A knife or slash weapon", ItemID.KNIFE).isNotConsumed(); - slashItem.setTooltip("Except abyssal whip, abyssal tentacle, or dragon claws."); + slashItem.setTooltip("Except abyssal whip, abyssal tentacle, noxious halberd, or dragon claws."); reinforcedGoggles = new ItemRequirement("Reinforced goggles", ItemID.SLAYER_REINFORCED_GOGGLES, 1, true).isNotConsumed(); reinforcedGoggles.setTooltip("You can get another pair from Spria"); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/asoulsbane/ASoulsBane.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/asoulsbane/ASoulsBane.java index 39266a979f1..c1628783625 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/asoulsbane/ASoulsBane.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/asoulsbane/ASoulsBane.java @@ -46,6 +46,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -146,12 +147,12 @@ protected void setupRequirements() public void setupConditions() { - ropeUsed = new VarbitRequirement(2032, 1); + ropeUsed = new VarbitRequirement(VarbitID.SOULBANE_RIFTROPE_PRES, 1); hasWeapon = new ItemRequirements(LogicType.OR, "", angerBattleaxe, angerMace, angerSpear, angerSword); - hasSword = new VarbitRequirement(2029, 1); - hasSpear = new VarbitRequirement(2029, 2); - hasMace = new VarbitRequirement(2029, 3); - hasBattleaxe = new VarbitRequirement(2029, 4); + hasSword = new VarbitRequirement(VarbitID.SOULBANE_ANGER_WEAPONMULTI, 1); + hasSpear = new VarbitRequirement(VarbitID.SOULBANE_ANGER_WEAPONMULTI, 2); + hasMace = new VarbitRequirement(VarbitID.SOULBANE_ANGER_WEAPONMULTI, 3); + hasBattleaxe = new VarbitRequirement(VarbitID.SOULBANE_ANGER_WEAPONMULTI, 4); inAngerRoom = new ZoneRequirement(rageRoom); inFearRoom = new ZoneRequirement(fearRoom); @@ -160,16 +161,16 @@ public void setupConditions() inHopeRoom = new ZoneRequirement(hopeRoom); inTolnaRoom = new ZoneRequirement(tolnaRoom); - watchedTolnaLeavingCutscene = new VarbitRequirement(2560, 1); + watchedTolnaLeavingCutscene = new VarbitRequirement(VarbitID.SOULBANE_WATCHEDCUTSCENE, 1); - inHole0 = new VarbitRequirement(2012, 0); - inHole1 = new VarbitRequirement(2012, 1); - inHole2 = new VarbitRequirement(2012, 2); - inHole3 = new VarbitRequirement(2012, 3); - inHole4 = new VarbitRequirement(2012, 4); - inHole5 = new VarbitRequirement(2012, 5); + inHole0 = new VarbitRequirement(VarbitID.SOULBANE_FEAR_ENEMYDOOR, 0); + inHole1 = new VarbitRequirement(VarbitID.SOULBANE_FEAR_ENEMYDOOR, 1); + inHole2 = new VarbitRequirement(VarbitID.SOULBANE_FEAR_ENEMYDOOR, 2); + inHole3 = new VarbitRequirement(VarbitID.SOULBANE_FEAR_ENEMYDOOR, 3); + inHole4 = new VarbitRequirement(VarbitID.SOULBANE_FEAR_ENEMYDOOR, 4); + inHole5 = new VarbitRequirement(VarbitID.SOULBANE_FEAR_ENEMYDOOR, 5); - reaperNearby = new VarbitRequirement(2035, 1); + reaperNearby = new VarbitRequirement(VarbitID.SOULBANE_FEAR_MONSPRES, 1); } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/atailoftwocats/ATailOfTwoCats.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/atailoftwocats/ATailOfTwoCats.java index 58a860c7493..e5f243f36e4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/atailoftwocats/ATailOfTwoCats.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/atailoftwocats/ATailOfTwoCats.java @@ -167,15 +167,15 @@ public void setupConditions() { bobNearby = new NpcRequirement("Bob nearby", NpcID.DEATH_GROWNCAT_BLACK_VIS); - rakedPatch = new VarbitRequirement(1033, 3); + rakedPatch = new VarbitRequirement(VarbitID.TWOCATS_CHORES_TIDYGARDEN, 3); plantedSeed = new VarbitRequirement(VarbitID.TWOCATS_CHORES_TIDYGARDEN, 4, Operation.GREATER_EQUAL); - grownPotatoes = new VarbitRequirement(1033, 8); - madeBed = new VarbitRequirement(1029, 1); - placedLogs = new VarbitRequirement(1030, 1); - litLogs = new VarbitRequirement(1030, 2); - placedCake = new VarbitRequirement(1031, 3); - placedMilk = new VarbitRequirement(1031, 4); - usedShears = new VarbitRequirement(1032, 8); + grownPotatoes = new VarbitRequirement(VarbitID.TWOCATS_CHORES_TIDYGARDEN, 8); + madeBed = new VarbitRequirement(VarbitID.TWOCATS_CHORES_TIDYHOUSE, 1); + placedLogs = new VarbitRequirement(VarbitID.TWOCATS_CHORES_WARMHUMAN, 1); + litLogs = new VarbitRequirement(VarbitID.TWOCATS_CHORES_WARMHUMAN, 2); + placedCake = new VarbitRequirement(VarbitID.TWOCATS_CHORES_FEEDHUMAN, 3); + placedMilk = new VarbitRequirement(VarbitID.TWOCATS_CHORES_FEEDHUMAN, 4); + usedShears = new VarbitRequirement(VarbitID.TWOCATS_CHORES_TIDYHUMAN, 8); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/atfirstlight/AtFirstLight.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/atfirstlight/AtFirstLight.java index 6063bf7c5f1..5b5f9991b98 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/atfirstlight/AtFirstLight.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/atfirstlight/AtFirstLight.java @@ -47,6 +47,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -188,14 +189,14 @@ protected void setupRequirements() private void setupConditions() { inGuild = new ZoneRequirement(guild); - gotMouse = new VarbitRequirement(9843, 1); - usedMouse = new VarbitRequirement(9839, 1); - checkedBed = new VarbitRequirement(9837, 1); + gotMouse = new VarbitRequirement(VarbitID.AFL_MOUSETAKEN, 1); + usedMouse = new VarbitRequirement(VarbitID.AFL_CATDISTRACT, 1); + checkedBed = new VarbitRequirement(VarbitID.AFL_BEDCHECK, 1); // 9842 0->1, received pelt once - equipmentUsable = new VarbitRequirement(9840, 1); - repairedEquipment = new VarbitRequirement(9840, 2); - handedInReport = new VarbitRequirement(9836, 1); + equipmentUsable = new VarbitRequirement(VarbitID.AFL_HOUSETRAPPED, 1); + repairedEquipment = new VarbitRequirement(VarbitID.AFL_HOUSETRAPPED, 2); + handedInReport = new VarbitRequirement(VarbitID.AFL_REPORT, 1); foxsReport = new ItemRequirement("Fox's report", ItemID.AFL_REPORT).hideConditioned(handedInReport); hadReport = or(foxsReport, handedInReport); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/belowicemountain/BelowIceMountain.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/belowicemountain/BelowIceMountain.java index 04b1900be91..031d004f24e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/belowicemountain/BelowIceMountain.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/belowicemountain/BelowIceMountain.java @@ -45,17 +45,12 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; public class BelowIceMountain extends BasicQuestHelper { - // varbit 12065 tracks checkal line? - // varbit 12062 -> 1 after learning flex - private static final int VARBIT_CHECKAL_LINE = 12065; - private static final int VARBIT_MARLEY_LINE = 12064; - private static final int VARBIT_BURNTOF_LINE = 12066; - //Items Required ItemRequirement cookedMeat, bread, knife, coins, knifeHighlight, breadHighlight, steakSandwich, beerHighlight; @@ -149,21 +144,21 @@ protected void setupRequirements() public void setupConditions() { - needFlex = new VarbitRequirement(VARBIT_CHECKAL_LINE, 5); - leftFlexBeforeLearning = new VarbitRequirement(VARBIT_CHECKAL_LINE, 10); - haveFlex = new VarbitRequirement(VARBIT_CHECKAL_LINE, 15); - recruitedCheckal = new VarbitRequirement(VARBIT_CHECKAL_LINE, 40); + needFlex = new VarbitRequirement(VarbitID.BIM_CHECKAL, 5); + leftFlexBeforeLearning = new VarbitRequirement(VarbitID.BIM_CHECKAL, 10); + haveFlex = new VarbitRequirement(VarbitID.BIM_CHECKAL, 15); + recruitedCheckal = new VarbitRequirement(VarbitID.BIM_CHECKAL, 40); - needRecipe = new VarbitRequirement(VARBIT_MARLEY_LINE, 5); - haveRecipe = new VarbitRequirement(VARBIT_MARLEY_LINE, 10); + needRecipe = new VarbitRequirement(VarbitID.BIM_MARLEY, 5); + haveRecipe = new VarbitRequirement(VarbitID.BIM_MARLEY, 10); haveIngredients = new ItemRequirements(cookedMeat, bread, knife); - fedMarley = new VarbitRequirement(VARBIT_MARLEY_LINE, 35); - recruitedMarley = new VarbitRequirement(VARBIT_MARLEY_LINE, 40); + fedMarley = new VarbitRequirement(VarbitID.BIM_MARLEY, 35); + recruitedMarley = new VarbitRequirement(VarbitID.BIM_MARLEY, 40); - needBeer = new VarbitRequirement(VARBIT_BURNTOF_LINE, 5); - gaveBeer = new VarbitRequirement(VARBIT_BURNTOF_LINE, 10); - needRPS = new VarbitRequirement(VARBIT_BURNTOF_LINE, 15); - recruitedBurntof = new VarbitRequirement(VARBIT_BURNTOF_LINE, 40); + needBeer = new VarbitRequirement(VarbitID.BIM_BURNTOF, 5); + gaveBeer = new VarbitRequirement(VarbitID.BIM_BURNTOF, 10); + needRPS = new VarbitRequirement(VarbitID.BIM_BURNTOF, 15); + recruitedBurntof = new VarbitRequirement(VarbitID.BIM_BURNTOF, 40); inDungeon = new NpcRequirement("Ancient Guardian", 10654); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/beneathcursedsands/BeneathCursedSands.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/beneathcursedsands/BeneathCursedSands.java index 7b36aedc0ea..98ab41b096c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/beneathcursedsands/BeneathCursedSands.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/beneathcursedsands/BeneathCursedSands.java @@ -343,7 +343,7 @@ public void setupConditions() hasReadStoneTablet = new VarbitRequirement(VarbitID.BCS_FOUND_MOULD, 2, Operation.GREATER_EQUAL); isRotatingScarab = new WidgetModelRequirement(750, 3, -1); - scarabRotatedDownwards = new VarbitRequirement(13849, 15); + scarabRotatedDownwards = new VarbitRequirement(VarbitID.BCS_EMBLEM_ROTATION, 15); scarabRotationQuickestRight = new VarbitRequirement(VarbitID.BCS_EMBLEM_ROTATION, 15, Operation.GREATER_EQUAL); firstLeverPulled = new ObjectCondition(ObjectID.BCS_TOMB_LEVER_ON, new WorldPoint(3439, 9225, 0)); @@ -352,14 +352,14 @@ public void setupConditions() shouldDestroyShadowRift = new NpcCondition(NpcID.BCS_CHAMPION_RIFT); inChemistryPuzzle = new WidgetModelRequirement(751, 3, -1); - chemistryValveLeftStepZero = new VarbitRequirement(13863, 0); - chemistryValveLeftStepOne = new VarbitRequirement(13863, 3); - chemistryValveLeftStepTwo = new VarbitRequirement(13863, 6); - chemistryValveLeftStepThree = new VarbitRequirement(13863, 9); - chemistryValveMiddleAtMaximum = new VarbitRequirement(13864, 45); - chemistryValveMiddleNearMax = new VarbitRequirement(13864, 42); - chemistryValveRightAtMaximum = new VarbitRequirement(13865, 45); - chemistryValveRightNearMax = new VarbitRequirement(13865, 42); + chemistryValveLeftStepZero = new VarbitRequirement(VarbitID.BCS_BURNER_1, 0); + chemistryValveLeftStepOne = new VarbitRequirement(VarbitID.BCS_BURNER_1, 3); + chemistryValveLeftStepTwo = new VarbitRequirement(VarbitID.BCS_BURNER_1, 6); + chemistryValveLeftStepThree = new VarbitRequirement(VarbitID.BCS_BURNER_1, 9); + chemistryValveMiddleAtMaximum = new VarbitRequirement(VarbitID.BCS_BURNER_2, 45); + chemistryValveMiddleNearMax = new VarbitRequirement(VarbitID.BCS_BURNER_2, 42); + chemistryValveRightAtMaximum = new VarbitRequirement(VarbitID.BCS_BURNER_3, 45); + chemistryValveRightNearMax = new VarbitRequirement(VarbitID.BCS_BURNER_3, 42); shouldFightMenaphiteShadow = new NpcCondition(NpcID.BCS_MENAPHITE_AKH_SHADOW); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/beneathcursedsands/TombRiddle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/beneathcursedsands/TombRiddle.java index ec3f327401c..9685ae86a35 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/beneathcursedsands/TombRiddle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/beneathcursedsands/TombRiddle.java @@ -14,6 +14,7 @@ import net.runelite.api.gameval.InterfaceID; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.widgets.Widget; import net.runelite.client.eventbus.EventBus; import net.runelite.client.eventbus.Subscribe; @@ -93,10 +94,10 @@ protected void updateSteps() return; } - int currentNorthernEmblem = client.getVarbitValue(13862); - int currentCentreNorthEmblem = client.getVarbitValue(13861); - int currentCentreSouthEmblem = client.getVarbitValue(13860); - int currentSouthernEmblem = client.getVarbitValue(13859); + int currentNorthernEmblem = client.getVarbitValue(VarbitID.BCS_URN_4); + int currentCentreNorthEmblem = client.getVarbitValue(VarbitID.BCS_URN_3); + int currentCentreSouthEmblem = client.getVarbitValue(VarbitID.BCS_URN_2); + int currentSouthernEmblem = client.getVarbitValue(VarbitID.BCS_URN_1); if (currentNorthernEmblem != northernEmblem) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/betweenarock/BetweenARock.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/betweenarock/BetweenARock.java index c06dc596e2c..7ae78ddcd02 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/betweenarock/BetweenARock.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/betweenarock/BetweenARock.java @@ -50,6 +50,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -250,10 +251,10 @@ public void setupConditions() inDwarvenMine = new ZoneRequirement(dwarvenMine); inKhorvakRoom = new ZoneRequirement(khorvakRoom); - hasUsedGoldBar = new VarbitRequirement(301, 1); - shotGoldCannonball = new VarbitRequirement(313, 1); + hasUsedGoldBar = new VarbitRequirement(VarbitID.DWARFROCK_GOLD_CANNONBALL, 1); + shotGoldCannonball = new VarbitRequirement(VarbitID.DWARFROCK_FIRED_GOLD_CANNONBALL, 1); hasCannonball = new Conditions(LogicType.OR, goldCannonball, shotGoldCannonball); - hasSolvedSchematic = new VarbitRequirement(305, 1); + hasSolvedSchematic = new VarbitRequirement(VarbitID.DWARFROCK_SCHEMATICS_SOLVED, 1); inRealm = new ZoneRequirement(realm); avatarNearby = new Conditions(LogicType.OR, new NpcCondition(NpcID.DWARF_ROCK_AVATAR_MAGE), new NpcCondition(NpcID.DWARF_ROCK_AVATAR_MAGE_GREEN), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/biohazard/Biohazard.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/biohazard/Biohazard.java index 5a9a8ffaef5..599a40d6947 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/biohazard/Biohazard.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/biohazard/Biohazard.java @@ -31,139 +31,184 @@ import net.runelite.client.plugins.microbot.questhelper.questinfo.QuestHelperQuest; import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; -import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.ObjectCondition; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirements; import net.runelite.client.plugins.microbot.questhelper.requirements.quest.QuestRequirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicType; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.not; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.or; +import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.rewards.UnlockReward; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ItemStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.widget.WidgetHighlight; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.QuestState; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; - -import java.util.*; +import net.runelite.api.gameval.VarbitID; public class Biohazard extends BasicQuestHelper { - //Items Required - ItemRequirement gasMask, birdFeed, birdCage, rottenApple, medicalGown, key, distillator, plagueSample, ethenea, liquidHoney, sulphuricBroline, - touchPaper, priestGownTop, priestGownBottom, priestGownBottomEquipped, priestGownTopEquipped, medicalGownEquipped, - birdCageHighlighted; - - //Items Recommended - ItemRequirement teleportVarrock, teleportArdougne, teleportRimmington, coins; - - Requirement inMournerBackyard, inWestArdougne, inMournerBuilding, upstairsInMournerBuilding, inVarrockSouthEast, - hasPriestSet, isUpstairsArdougneCastle, hasChemicals; - - QuestStep talkToElena, talkToJerico, getBirdFeed, getBirdFeed2, getPigeonCage, investigateWatchtower, clickPigeonCage, talkToOmartAgain, - talkToOmartToReturnToWest, talkToKilron, enterBackyardOfHeadquarters, pickupRottenApple, useRottenAppleOnCauldron, searchSarahsCupboard, - searchSarahsCupboard2, enterMournerHeadquarters, goUpstairsInMournerBuilding, killMourner, searchCrateForDistillator, - goBackDownstairsInMournersHeadquarters, talkToElenaWithDistillator, talkToTheChemist, goToVarrock, vinciVarrock, chancyVarrock, hopsVarrock, - talkToAsyff, talkToGuidor, returnToElenaAfterSampling, informTheKing, informTheKingGoUpstairs; - + // Required items + ItemRequirement gasMask; + + // Recommended items + ItemRequirement teleportVarrock; + ItemRequirement teleportArdougne; + ItemRequirement teleportRimmington; + ItemRequirement coins; + + // Mid-quest requirements + ItemRequirement birdFeed; + ItemRequirement birdCage; + ItemRequirement rottenApple; + ItemRequirement medicalGown; + ItemRequirement key; + ItemRequirement distillator; + ItemRequirement plagueSample; + ItemRequirement ethenea; + ItemRequirement liquidHoney; + ItemRequirement sulphuricBroline; + ItemRequirement touchPaper; + ItemRequirement coinsForPriestSet; + ItemRequirement priestGownTop; + ItemRequirement priestGownBottom; + ItemRequirement priestGownBottomEquipped; + ItemRequirement priestGownTopEquipped; + ItemRequirement medicalGownEquipped; + ItemRequirement birdCageHighlighted; + + // Zones + Zone westArdougne1; + Zone westArdougne2; + Zone westArdougne3; + Zone mournerBackyard; + Zone mournerBuilding1; + Zone mournerBuilding2; + Zone mournersBuildingUpstairs; + Zone varrockSouthEast; + Zone upstairsArdougneCastle; + + // Miscellaneous requirements + ZoneRequirement inWestArdougne; + ZoneRequirement inMournerBackyard; + + ZoneRequirement inMournerBuilding; + ZoneRequirement upstairsInMournerBuilding; + + ZoneRequirement inVarrockSouthEast; + ZoneRequirement isUpstairsArdougneCastle; + + VarbitRequirement hasNotReceivedFreePriestGownSet; + ItemRequirements hasPriestSet; + Conditions hasChemicals; + + // Steps + NpcStep talkToElena; + + NpcStep talkToJerico; + + ObjectStep getBirdFeed; + ItemStep getPigeonCage; + ObjectStep investigateWatchtower; + + DetailedQuestStep clickPigeonCage; + + NpcStep talkToOmartToEnterWestArdougne; + + NpcStep talkToKilron; + ObjectStep enterBackyardOfHeadquarters; + ItemStep pickupRottenApple; + DetailedQuestStep useRottenAppleOnCauldron; + + ObjectStep exitBackyardOfHeadquarters; + ObjectStep searchSarahsCupboard; + ObjectStep enterMournerHeadquarters; + ObjectStep goUpstairsInMournerBuilding; + NpcStep killMourner; + ObjectStep searchCrateForDistillator; + + ObjectStep goBackDownstairsInMournersHeadquarters; + NpcStep talkToElenaWithDistillator; + + NpcStep talkToTheChemist; + + DetailedQuestStep goToVarrock; GiveIngredientsToHelpersStep giveChemicals; + NpcStep vinciVarrock; + NpcStep chancyVarrock; + NpcStep hopsVarrock; + NpcStep talkToAsyff; + NpcStep talkToAsyffBuy; + NpcStep talkToGuidor; + + NpcStep returnToElenaAfterSampling; - //Zones - Zone westArdougne1, westArdougne2, westArdougne3, mournerBackyard, mournerBuilding1, mournerBuilding2, mournersBuildingUpstairs, varrockSouthEast, upstairsArdougneCastle; + NpcStep informTheKing; + ObjectStep informTheKingGoUpstairs; @Override - public Map loadSteps() + protected void setupZones() { - initializeRequirements(); - setupConditions(); - setupSteps(); - Map steps = new HashMap<>(); - - steps.put(0, talkToElena); - - steps.put(1, talkToJerico); - - ConditionalStep prepareADistraction = new ConditionalStep(this, getBirdFeed); - prepareADistraction.addStep(new Conditions(birdCage, birdFeed), investigateWatchtower); - prepareADistraction.addStep(birdFeed, getPigeonCage); - prepareADistraction.addStep(new ObjectCondition(ObjectID.JERICOSCUPBOARDOPEN), getBirdFeed2); - steps.put(2, prepareADistraction); - - ConditionalStep causeADistraction = new ConditionalStep(this, getPigeonCage); - causeADistraction.addStep(birdCage, clickPigeonCage); - steps.put(3, causeADistraction); - - steps.put(4, talkToOmartAgain); - - ConditionalStep poisonFood = new ConditionalStep(this, talkToOmartToReturnToWest); - poisonFood.addStep(new Conditions(inMournerBackyard, rottenApple), useRottenAppleOnCauldron); - poisonFood.addStep(inMournerBackyard, pickupRottenApple); - poisonFood.addStep(inWestArdougne, enterBackyardOfHeadquarters); - - steps.put(5, poisonFood); - - ConditionalStep infiltrateMourners = new ConditionalStep(this, talkToOmartToReturnToWest); - infiltrateMourners.addStep(new Conditions(key, upstairsInMournerBuilding), searchCrateForDistillator); - infiltrateMourners.addStep(upstairsInMournerBuilding, killMourner); - infiltrateMourners.addStep(inMournerBuilding, goUpstairsInMournerBuilding); - infiltrateMourners.addStep(new Conditions(inWestArdougne, medicalGown), enterMournerHeadquarters); - infiltrateMourners.addStep(new Conditions(inWestArdougne, new ObjectCondition(ObjectID.BIONURSESCUPBOARDOPEN)), searchSarahsCupboard2); - infiltrateMourners.addStep(inWestArdougne, searchSarahsCupboard); - - steps.put(6, infiltrateMourners); - - ConditionalStep returnToElenaWithDistillator = new ConditionalStep(this, talkToOmartToReturnToWest); - returnToElenaWithDistillator.addStep(new Conditions(upstairsInMournerBuilding, distillator), goBackDownstairsInMournersHeadquarters); - returnToElenaWithDistillator.addStep(new Conditions(distillator, inWestArdougne), talkToKilron); - returnToElenaWithDistillator.addStep(distillator, talkToElenaWithDistillator); - - returnToElenaWithDistillator.addStep(new Conditions(key, upstairsInMournerBuilding), searchCrateForDistillator); - returnToElenaWithDistillator.addStep(upstairsInMournerBuilding, killMourner); - returnToElenaWithDistillator.addStep(inMournerBuilding, goUpstairsInMournerBuilding); - returnToElenaWithDistillator.addStep(new Conditions(inWestArdougne, medicalGown), enterMournerHeadquarters); - returnToElenaWithDistillator.addStep(new Conditions(inWestArdougne, new ObjectCondition(ObjectID.BIONURSESCUPBOARDOPEN)), searchSarahsCupboard2); - returnToElenaWithDistillator.addStep(inWestArdougne, searchSarahsCupboard); - - steps.put(7, returnToElenaWithDistillator); - - steps.put(10, talkToTheChemist); - - ConditionalStep smuggleInChemicals = new ConditionalStep(this, goToVarrock); - smuggleInChemicals.addStep(new Conditions(inVarrockSouthEast, liquidHoney, ethenea, sulphuricBroline, hasPriestSet), talkToGuidor); - smuggleInChemicals.addStep(new Conditions(inVarrockSouthEast, liquidHoney, ethenea, sulphuricBroline), talkToAsyff); - smuggleInChemicals.addStep(new Conditions(inVarrockSouthEast, liquidHoney, ethenea), hopsVarrock); - smuggleInChemicals.addStep(new Conditions(inVarrockSouthEast, liquidHoney), vinciVarrock); - smuggleInChemicals.addStep(inVarrockSouthEast, chancyVarrock); - smuggleInChemicals.addStep(hasChemicals, giveChemicals); - - steps.put(12, smuggleInChemicals); - - steps.put(14, returnToElenaAfterSampling); - - ConditionalStep talkToTheKing = new ConditionalStep(this, informTheKingGoUpstairs); - talkToTheKing.addStep(isUpstairsArdougneCastle, informTheKing); - - steps.put(15, talkToTheKing); - // Finishing gives: 72: 0->17, 71: 0->4117, 70: 0->1 - return steps; + mournerBackyard = new Zone(new WorldPoint(2542, 3328, 0), new WorldPoint(2555, 3333, 0)); + westArdougne1 = new Zone(new WorldPoint(2460, 3279, 0), new WorldPoint(2556, 3334, 2)); + westArdougne2 = new Zone(new WorldPoint(2434, 3305, 0), new WorldPoint(2464, 3323, 2)); + westArdougne3 = new Zone(new WorldPoint(2510, 3265, 0), new WorldPoint(2556, 3280, 2)); + mournerBuilding1 = new Zone(new WorldPoint(2547, 3321, 0), new WorldPoint(2555, 3327, 0)); + mournerBuilding2 = new Zone(new WorldPoint(2542, 3324, 0), new WorldPoint(2546, 3327, 0)); + mournersBuildingUpstairs = new Zone(new WorldPoint(2542, 3321, 1), new WorldPoint(2555, 3327, 1)); + varrockSouthEast = new Zone(new WorldPoint(3265, 3376, 0), new WorldPoint(3287, 3407, 1)); + upstairsArdougneCastle = new Zone(new WorldPoint(2570, 3283, 1), new WorldPoint(2590, 3310, 1)); } @Override protected void setupRequirements() { + inWestArdougne = new ZoneRequirement(westArdougne1, westArdougne2, westArdougne3); + inMournerBackyard = new ZoneRequirement(mournerBackyard); + + inMournerBuilding = new ZoneRequirement(mournerBuilding1, mournerBuilding2); + upstairsInMournerBuilding = new ZoneRequirement(mournersBuildingUpstairs); + + inVarrockSouthEast = new ZoneRequirement(varrockSouthEast); + isUpstairsArdougneCastle = new ZoneRequirement(upstairsArdougneCastle); + gasMask = new ItemRequirement("Gas mask", ItemID.GASMASK, 1, true).isNotConsumed(); gasMask.setTooltip("You can get another from the cupboard in Edmond's house west of Elena's house."); - birdCage = new ItemRequirement("Pigeon cage", ItemID.PIGEONS); - birdCageHighlighted = new ItemRequirement("Pigeon cage", ItemID.PIGEONS); - birdCageHighlighted.setHighlightInInventory(true); + + teleportVarrock = new ItemRequirement("Teleport to Varrock", ItemID.POH_TABLET_VARROCKTELEPORT); + teleportArdougne = new ItemRequirement("Teleport to Ardougne", ItemID.POH_TABLET_ARDOUGNETELEPORT, 3); + teleportRimmington = new ItemRequirement("Teleport to Rimmington", ItemID.NZONE_TELETAB_RIMMINGTON); + coins = new ItemRequirement("Coins", ItemCollections.COINS, 30); + coins.setTooltip("For travelling from Ardougne to Rimmington."); + + coinsForPriestSet = new ItemRequirement("Coins", ItemCollections.COINS, 12); + coinsForPriestSet.setTooltip("For buying the Priest Gown set"); + birdFeed = new ItemRequirement("Bird feed", ItemID.BIRDFEED); + birdCage = new ItemRequirement("Pigeon cage", ItemID.PIGEONS); + birdCageHighlighted = birdCage.highlighted(); + rottenApple = new ItemRequirement("Rotten apple", ItemID.ROTTENAPPLES); rottenApple.setHighlightInInventory(true); medicalGown = new ItemRequirement("Medical gown", ItemID.DOCTOR_GOWN).isNotConsumed(); - medicalGownEquipped = new ItemRequirement("Medical gown", ItemID.DOCTOR_GOWN, 1, true); + medicalGownEquipped = medicalGown.equipped(); key = new ItemRequirement("Key", ItemID.MOURNERKEYTW); distillator = new ItemRequirement("Distillator", ItemID.DISTILLATOR); plagueSample = new ItemRequirement("Plague sample", ItemID.PLAGUESAMPLE); @@ -176,42 +221,17 @@ protected void setupRequirements() sulphuricBroline.setTooltip("You can get another from Elena in East Ardougne."); touchPaper = new ItemRequirement("Touch paper", ItemID.TOUCH_PAPER); touchPaper.setTooltip("You can get more from the Chemist in Rimmington."); + priestGownBottom = new ItemRequirement("Priest gown (bottom)", ItemID.PRIEST_ROBE).isNotConsumed(); priestGownTop = new ItemRequirement("Priest gown (top)", ItemID.PRIEST_GOWN).isNotConsumed(); priestGownBottomEquipped = priestGownBottom.equipped(); priestGownTopEquipped = priestGownTop.equipped(); - teleportVarrock = new ItemRequirement("Teleport to Varrock", ItemID.POH_TABLET_VARROCKTELEPORT); - teleportArdougne = new ItemRequirement("Teleport to Ardougne", ItemID.POH_TABLET_ARDOUGNETELEPORT, 3); - teleportRimmington = new ItemRequirement("Teleport to Rimmington", ItemID.NZONE_TELETAB_RIMMINGTON); - coins = new ItemRequirement("Coins", ItemCollections.COINS, 30); - } - @Override - protected void setupZones() - { - mournerBackyard = new Zone(new WorldPoint(2542, 3328, 0), new WorldPoint(2555, 3333, 0)); - westArdougne1 = new Zone(new WorldPoint(2460, 3279, 0), new WorldPoint(2556, 3334, 2)); - westArdougne2 = new Zone(new WorldPoint(2434, 3305, 0), new WorldPoint(2464, 3323, 2)); - westArdougne3 = new Zone(new WorldPoint(2510, 3265, 0), new WorldPoint(2556, 3280, 2)); - mournerBuilding1 = new Zone(new WorldPoint(2547, 3321, 0), new WorldPoint(2555, 3327, 0)); - mournerBuilding2 = new Zone(new WorldPoint(2542, 3324, 0), new WorldPoint(2546, 3327, 0)); - mournersBuildingUpstairs = new Zone(new WorldPoint(2542, 3321, 1), new WorldPoint(2555, 3327, 1)); - varrockSouthEast = new Zone(new WorldPoint(3265, 3376, 0), new WorldPoint(3287, 3407, 1)); - upstairsArdougneCastle = new Zone(new WorldPoint(2570, 3283, 1), new WorldPoint(2590, 3310, 1)); - } + hasChemicals = or(ethenea, liquidHoney, sulphuricBroline); - public void setupConditions() - { - inWestArdougne = new ZoneRequirement(westArdougne1, westArdougne2, westArdougne3); - inMournerBackyard = new ZoneRequirement(mournerBackyard); + hasNotReceivedFreePriestGownSet = new VarbitRequirement(VarbitID.BIOHAZARD_FREE_CLOTHES, 0); - inMournerBuilding = new ZoneRequirement(mournerBuilding1, mournerBuilding2); - upstairsInMournerBuilding = new ZoneRequirement(mournersBuildingUpstairs); - - hasChemicals = new Conditions(LogicType.OR, ethenea, liquidHoney, sulphuricBroline); - inVarrockSouthEast = new ZoneRequirement(varrockSouthEast); hasPriestSet = new ItemRequirements(priestGownBottom, priestGownTop); - isUpstairsArdougneCastle = new ZoneRequirement(upstairsArdougneCastle); } public void setupSteps() @@ -221,45 +241,42 @@ public void setupSteps() talkToJerico = new NpcStep(this, NpcID.JERICO, new WorldPoint(2612, 3324, 0), "Talk to Jerico in his house south of the northern Ardougne bank"); - getBirdFeed = new ObjectStep(this, ObjectID.JERICOSCUPBOARDSHUT, new WorldPoint(2612, 3326, 0), "Get birdfeed from the cupboard in Jerico's house."); - getBirdFeed2 = new ObjectStep(this, ObjectID.JERICOSCUPBOARDOPEN, new WorldPoint(2612, 3326, 0), "Get birdfeed from the cupboard in Jerico's house."); - - getBirdFeed.addSubSteps(getBirdFeed2); + getBirdFeed = new ObjectStep(this, ObjectID.JERICOSCUPBOARDSHUT, new WorldPoint(2612, 3326, 0), "Get bird feed from the cupboard in Jerico's house."); + getBirdFeed.addAlternateObjects(ObjectID.JERICOSCUPBOARDOPEN); - getPigeonCage = new DetailedQuestStep(this, new WorldPoint(2618, 3325, 0), "Get a pigeon cage from behind Jerico's house.", birdCage, birdFeed); + getPigeonCage = new ItemStep(this, new WorldPoint(2618, 3325, 0), "Get a pigeon cage from behind Jerico's house.", birdCage); investigateWatchtower = new ObjectStep(this, ObjectID.BIOWATCHTOWER_OP, new WorldPoint(2562, 3301, 0), "Investigate the watchtower near the entrance to West Ardougne.", birdFeed, birdCage); clickPigeonCage = new DetailedQuestStep(this, new WorldPoint(2562, 3300, 0), "Open the Pigeon cage next to the watchtower.", birdCageHighlighted); - talkToOmartAgain = new NpcStep(this, NpcID.OMART_VIS, new WorldPoint(2559, 3266, 0), "Talk to Omart to enter West Ardougne.", gasMask); - talkToOmartAgain.addDialogStep("Okay, lets do it."); - talkToOmartToReturnToWest = new NpcStep(this, NpcID.OMART_VIS, new WorldPoint(2559, 3266, 0), "Talk to Omart to return to West Ardougne"); - talkToOmartToReturnToWest.addDialogStep("Okay, lets do it."); - talkToOmartAgain.addSubSteps(talkToOmartToReturnToWest); + talkToOmartToEnterWestArdougne = new NpcStep(this, NpcID.OMART_VIS, new WorldPoint(2559, 3266, 0), "Talk to Omart, south of the watchtower, to enter West Ardougne.", gasMask); + talkToOmartToEnterWestArdougne.addDialogStep("Okay, lets do it."); + talkToOmartToEnterWestArdougne.addDialogStep("Okay, let's do it."); enterBackyardOfHeadquarters = new ObjectStep(this, ObjectID.MOURNERSTEWFENCE, new WorldPoint(2541, 3331, 0), "Squeeze through the fence to enter the Mourner's Headquarters yard in the north east of West Ardougne."); - pickupRottenApple = new DetailedQuestStep(this, new WorldPoint(2549, 3332, 0), "Pick up the rotten apple in the yard.", rottenApple); + pickupRottenApple = new ItemStep(this, new WorldPoint(2549, 3332, 0), "Pick up the rotten apple in the yard.", rottenApple); useRottenAppleOnCauldron = new ObjectStep(this, ObjectID.MOURNERCAULDRON, new WorldPoint(2543, 3332, 0), "Use the rotten apple on the cauldron.", rottenApple); useRottenAppleOnCauldron.addIcon(ItemID.ROTTENAPPLES); - searchSarahsCupboard = new ObjectStep(this, ObjectID.BIONURSESCUPBOARDSHUT, new WorldPoint(2518, 3276, 0), "Search the cupboard in Sarah's house south-west of the West Ardougne church."); - searchSarahsCupboard2 = new ObjectStep(this, ObjectID.BIONURSESCUPBOARDOPEN, new WorldPoint(2518, 3276, 0), "Search the cupboard in Sarah's house south-west of the West Ardougne church."); - searchSarahsCupboard.addSubSteps(searchSarahsCupboard2); + exitBackyardOfHeadquarters = new ObjectStep(this, ObjectID.MOURNERSTEWFENCE, new WorldPoint(2541, 3331, 0), "Search the cupboard in Sarah's house south-west of the West Ardougne church for a disguise."); + searchSarahsCupboard = new ObjectStep(this, ObjectID.BIONURSESCUPBOARDSHUT, new WorldPoint(2518, 3276, 0), "Search the cupboard in Sarah's house south-west of the West Ardougne church for a disguise."); + searchSarahsCupboard.addAlternateObjects(ObjectID.BIONURSESCUPBOARDOPEN); + searchSarahsCupboard.addSubSteps(exitBackyardOfHeadquarters); enterMournerHeadquarters = new ObjectStep(this, ObjectID.MOURNERSTEWDOOR, new WorldPoint(2551, 3320, 0), "Enter the Mourners' Headquarters whilst wearing the medical gown.", medicalGownEquipped); - goUpstairsInMournerBuilding = new ObjectStep(this, ObjectID.SPIRALSTAIRS, new WorldPoint(2543, 3325, 0), "Go upstairs and kill the mourner there."); + goUpstairsInMournerBuilding = new ObjectStep(this, ObjectID.SPIRALSTAIRS, new WorldPoint(2543, 3325, 0), "Go upstairs and kill the mourner."); killMourner = new NpcStep(this, NpcID.MOURNERSTEW2_VIS, new WorldPoint(2549, 3325, 1), "Kill the mourner here for a key to the caged area."); goUpstairsInMournerBuilding.addSubSteps(killMourner); searchCrateForDistillator = new ObjectStep(this, ObjectID.MOURNERCRATEUP, new WorldPoint(2554, 3327, 1), "Search the crate in the caged area for Elena's Distillator."); - goBackDownstairsInMournersHeadquarters = new ObjectStep(this, ObjectID.SPIRALSTAIRSTOP, new WorldPoint(2543, 3325, 1), "Return to Elena. Go back downstairs or teleport out."); + goBackDownstairsInMournersHeadquarters = new ObjectStep(this, ObjectID.SPIRALSTAIRSTOP, new WorldPoint(2543, 3325, 1), "Return to Elena. Go back downstairs or teleport out.", distillator); - talkToKilron = new NpcStep(this, NpcID.KILRON_VIS, new WorldPoint(2556, 3266, 0), "Return to Elena. Talk to Kilron to return back to East Ardougne."); + talkToKilron = new NpcStep(this, NpcID.KILRON_VIS, new WorldPoint(2556, 3266, 0), "Return to Elena. Talk to Kilron south-east of the West Ardougne church to return back to East Ardougne.", distillator); talkToKilron.addDialogStep("Yes I do."); - talkToElenaWithDistillator = new NpcStep(this, NpcID.ELENA2_VIS, new WorldPoint(2592, 3336, 0), "Return to Elena."); + talkToElenaWithDistillator = new NpcStep(this, NpcID.ELENA2_VIS, new WorldPoint(2592, 3336, 0), "Return to Elena.", distillator); talkToElenaWithDistillator.addSubSteps(goBackDownstairsInMournersHeadquarters, talkToKilron); talkToTheChemist = new NpcStep(this, NpcID.CHEMIST, new WorldPoint(2933, 3210, 0), @@ -275,6 +292,11 @@ public void setupSteps() talkToAsyff = new NpcStep(this, NpcID.TAILORP, new WorldPoint(3277, 3397, 0), "Talk to Asyff to get a free priest gown. You can only get the free set once."); talkToAsyff.addDialogStep("Do you have a spare Priest Gown?"); + talkToAsyffBuy = new NpcStep(this, NpcID.TAILORP, new WorldPoint(3277, 3397, 0), "Talk to Asyff and buy a priest gown set.", coinsForPriestSet); + talkToAsyffBuy.addDialogStep("Okay, let's see what you've got then."); + talkToAsyffBuy.addWidgetHighlight(WidgetHighlight.createShopItemHighlight(ItemID.PRIEST_GOWN)); + talkToAsyffBuy.addWidgetHighlight(WidgetHighlight.createShopItemHighlight(ItemID.PRIEST_ROBE)); + talkToAsyff.addSubSteps(talkToAsyffBuy); talkToGuidor = new NpcStep(this, NpcID.GUIDOR, new WorldPoint(3284, 3382, 0), "Talk to Guidor in his house to the south.", @@ -289,31 +311,106 @@ public void setupSteps() informTheKing.addSubSteps(informTheKingGoUpstairs); } + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + steps.put(0, talkToElena); + + steps.put(1, talkToJerico); + + var prepareADistraction = new ConditionalStep(this, investigateWatchtower); + prepareADistraction.addStep(not(birdFeed), getBirdFeed); + prepareADistraction.addStep(not(birdCage), getPigeonCage); + steps.put(2, prepareADistraction); + + var causeADistraction = new ConditionalStep(this, getPigeonCage); + causeADistraction.addStep(birdCage, clickPigeonCage); + steps.put(3, causeADistraction); + + steps.put(4, talkToOmartToEnterWestArdougne); + + var poisonFood = new ConditionalStep(this, talkToOmartToEnterWestArdougne); + poisonFood.addStep(and(inMournerBackyard, rottenApple), useRottenAppleOnCauldron); + poisonFood.addStep(inMournerBackyard, pickupRottenApple); + poisonFood.addStep(inWestArdougne, enterBackyardOfHeadquarters); + + steps.put(5, poisonFood); + + var infiltrateMourners = new ConditionalStep(this, talkToOmartToEnterWestArdougne); + infiltrateMourners.addStep(inMournerBackyard, exitBackyardOfHeadquarters); + infiltrateMourners.addStep(and(key, upstairsInMournerBuilding), searchCrateForDistillator); + infiltrateMourners.addStep(upstairsInMournerBuilding, killMourner); + infiltrateMourners.addStep(inMournerBuilding, goUpstairsInMournerBuilding); + infiltrateMourners.addStep(and(inWestArdougne, medicalGown), enterMournerHeadquarters); + infiltrateMourners.addStep(inWestArdougne, searchSarahsCupboard); + + steps.put(6, infiltrateMourners); + + var returnToElenaWithDistillator = new ConditionalStep(this, talkToOmartToEnterWestArdougne); + returnToElenaWithDistillator.addStep(and(upstairsInMournerBuilding, distillator), goBackDownstairsInMournersHeadquarters); + returnToElenaWithDistillator.addStep(and(distillator, inWestArdougne), talkToKilron); + returnToElenaWithDistillator.addStep(distillator, talkToElenaWithDistillator); + + returnToElenaWithDistillator.addStep(and(key, upstairsInMournerBuilding), searchCrateForDistillator); + returnToElenaWithDistillator.addStep(upstairsInMournerBuilding, killMourner); + returnToElenaWithDistillator.addStep(inMournerBuilding, goUpstairsInMournerBuilding); + returnToElenaWithDistillator.addStep(and(inWestArdougne, medicalGown), enterMournerHeadquarters); + returnToElenaWithDistillator.addStep(inWestArdougne, searchSarahsCupboard); + + steps.put(7, returnToElenaWithDistillator); + + steps.put(10, talkToTheChemist); + + var smuggleInChemicals = new ConditionalStep(this, goToVarrock); + smuggleInChemicals.addStep(and(inVarrockSouthEast, liquidHoney, ethenea, sulphuricBroline, hasPriestSet), talkToGuidor); + smuggleInChemicals.addStep(and(inVarrockSouthEast, liquidHoney, ethenea, sulphuricBroline, hasNotReceivedFreePriestGownSet), talkToAsyff); + smuggleInChemicals.addStep(and(inVarrockSouthEast, liquidHoney, ethenea, sulphuricBroline), talkToAsyffBuy); + smuggleInChemicals.addStep(and(inVarrockSouthEast, liquidHoney, ethenea), hopsVarrock); + smuggleInChemicals.addStep(and(inVarrockSouthEast, liquidHoney), vinciVarrock); + smuggleInChemicals.addStep(inVarrockSouthEast, chancyVarrock); + smuggleInChemicals.addStep(hasChemicals, giveChemicals); + steps.put(12, smuggleInChemicals); + + steps.put(14, returnToElenaAfterSampling); + + var talkToTheKing = new ConditionalStep(this, informTheKingGoUpstairs); + talkToTheKing.addStep(isUpstairsArdougneCastle, informTheKing); + + steps.put(15, talkToTheKing); + + return steps; + } + @Override public List getCombatRequirements() { - ArrayList reqs = new ArrayList<>(); - reqs.add("Mourner (level 13)"); - return reqs; + return List.of( + "Mourner (level 13)" + ); } @Override public List getItemRequirements() { - ArrayList reqs = new ArrayList<>(); - reqs.add(gasMask); - return reqs; + return List.of( + gasMask + ); } @Override public List getItemRecommended() { - ArrayList reqs = new ArrayList<>(); - reqs.add(teleportArdougne); - reqs.add(teleportRimmington); - reqs.add(teleportVarrock); - reqs.add(coins); - return reqs; + return List.of( + teleportArdougne, + teleportRimmington, + teleportVarrock, + coins + ); } @Override @@ -325,27 +422,62 @@ public QuestPointReward getQuestPointReward() @Override public List getExperienceRewards() { - return Collections.singletonList(new ExperienceReward(Skill.THIEVING, 1250)); + return List.of( + new ExperienceReward(Skill.THIEVING, 1250) + ); + } + + @Override + public List getUnlockRewards() + { + return List.of( + new UnlockReward("Full West Ardougne Access"), + new UnlockReward("Combat Training Camp Access") + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); - allSteps.add(new PanelDetails("Start the quest", Collections.singletonList(talkToElena), gasMask)); - allSteps.add(new PanelDetails("Getting back into West Ardougne", - Arrays.asList(talkToJerico, getBirdFeed, getPigeonCage, investigateWatchtower, clickPigeonCage, talkToOmartAgain))); - allSteps.add(new PanelDetails("Getting the Distillator", - enterBackyardOfHeadquarters, pickupRottenApple, useRottenAppleOnCauldron, searchSarahsCupboard, - enterMournerHeadquarters, goUpstairsInMournerBuilding, searchCrateForDistillator, talkToElenaWithDistillator)); + List sections = new ArrayList<>(); + + sections.add(new PanelDetails("Start the quest", List.of( + talkToElena + ), List.of( + gasMask + ))); + + sections.add(new PanelDetails("Getting back into West Ardougne", List.of( + talkToJerico, + getBirdFeed, + getPigeonCage, + investigateWatchtower, + clickPigeonCage, + talkToOmartToEnterWestArdougne + ))); + + sections.add(new PanelDetails("Getting the Distillator", List.of( + enterBackyardOfHeadquarters, + pickupRottenApple, + useRottenAppleOnCauldron, + searchSarahsCupboard, + enterMournerHeadquarters, + goUpstairsInMournerBuilding, + searchCrateForDistillator, + talkToElenaWithDistillator + ))); List testingSteps = QuestUtil.toArrayList(talkToTheChemist); testingSteps.addAll(giveChemicals.getDisplaySteps()); testingSteps.addAll(Arrays.asList(goToVarrock, talkToAsyff, talkToGuidor)); - allSteps.add(new PanelDetails("Testing the plague sample", testingSteps, plagueSample, liquidHoney, ethenea, sulphuricBroline, touchPaper)); + sections.add(new PanelDetails("Testing the plague sample", testingSteps, plagueSample, liquidHoney, ethenea, sulphuricBroline, touchPaper)); + + sections.add(new PanelDetails("Revealing the truth", List.of( + returnToElenaAfterSampling, + informTheKing + ))); - allSteps.add(new PanelDetails("Revealing the truth", returnToElenaAfterSampling, informTheKing)); - return allSteps; + return sections; } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/bonevoyage/BoneVoyage.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/bonevoyage/BoneVoyage.java index 5c6eefca4df..90b3cefaca5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/bonevoyage/BoneVoyage.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/bonevoyage/BoneVoyage.java @@ -279,9 +279,8 @@ public List getItemRecommended() @Override public List getGeneralRequirements() { - final int KUDOS_VARBIT = 3637; ArrayList req = new ArrayList<>(); - req.add(new VarbitRequirement(KUDOS_VARBIT, Operation.GREATER_EQUAL, 100, "100 Kudos")); + req.add(new VarbitRequirement(VarbitID.VM_KUDOS, Operation.GREATER_EQUAL, 100, "100 Kudos")); req.add(new QuestRequirement(QuestHelperQuest.THE_DIG_SITE, QuestState.FINISHED)); return req; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/cabinfever/CabinFever.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/cabinfever/CabinFever.java index fc811f4e24e..d153697408b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/cabinfever/CabinFever.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/cabinfever/CabinFever.java @@ -49,6 +49,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -411,38 +412,38 @@ public void setupConditions() onEnemySail = new ZoneRequirement(enemySail); onEnemyBoat = new ZoneRequirement(enemyBoatF0, enemyBoatF1, enemyBoatF2, enemySail); - hasSetSail = new VarbitRequirement(1741, 1); + hasSetSail = new VarbitRequirement(VarbitID.FEVER_CANNON, 1); - addedFuse = new VarbitRequirement(1756, 2); + addedFuse = new VarbitRequirement(VarbitID.FEVER_GUNPOWDER_BARREL, 2); hasFuseOrAdded = new Conditions(LogicType.OR, fuse1, addedFuse); - explodedBarrel = new VarbitRequirement(1756, 1); + explodedBarrel = new VarbitRequirement(VarbitID.FEVER_GUNPOWDER_BARREL, 1); // 1740 1 if swinging - planked1 = new VarbitRequirement(1751, 1); - planked2 = new VarbitRequirement(1757, 1); - planked3 = new VarbitRequirement(1758, 1); - pasted1 = new VarbitRequirement(1751, 2); - pasted2 = new VarbitRequirement(1757, 2); - pasted3 = new VarbitRequirement(1758, 2); + planked1 = new VarbitRequirement(VarbitID.FEVER_HOLE_1, 1); + planked2 = new VarbitRequirement(VarbitID.FEVER_HOLE_2, 1); + planked3 = new VarbitRequirement(VarbitID.FEVER_HOLE_3, 1); + pasted1 = new VarbitRequirement(VarbitID.FEVER_HOLE_1, 2); + pasted2 = new VarbitRequirement(VarbitID.FEVER_HOLE_2, 2); + pasted3 = new VarbitRequirement(VarbitID.FEVER_HOLE_3, 2); - hasPlanked1 = new VarbitRequirement(1759, 1); - hasPlanked2 = new VarbitRequirement(1759, 2); - hasPlanked3 = new VarbitRequirement(1759, 3); + hasPlanked1 = new VarbitRequirement(VarbitID.FEVER_HOLES_PATCHED, 1); + hasPlanked2 = new VarbitRequirement(VarbitID.FEVER_HOLES_PATCHED, 2); + hasPlanked3 = new VarbitRequirement(VarbitID.FEVER_HOLES_PATCHED, 3); - hasRepaired1 = new VarbitRequirement(1760, 1); - hasRepaired2 = new VarbitRequirement(1760, 2); - hasRepaired3 = new VarbitRequirement(1760, 3); + hasRepaired1 = new VarbitRequirement(VarbitID.FEVER_HOLES_PROOFED, 1); + hasRepaired2 = new VarbitRequirement(VarbitID.FEVER_HOLES_PROOFED, 2); + hasRepaired3 = new VarbitRequirement(VarbitID.FEVER_HOLES_PROOFED, 3); - lootedAll = new Conditions(new VarbitRequirement(1753, 1), new VarbitRequirement(1754, 1), new VarbitRequirement(1755, 1)); + lootedAll = new Conditions(new VarbitRequirement(VarbitID.FEVER_CRATE, 1), new VarbitRequirement(VarbitID.FEVER_CHEST, 1), new VarbitRequirement(VarbitID.FEVER_BARREL, 1)); - cannonBroken = new VarbitRequirement(1741, 1); - addedPowder = new VarbitRequirement(1742, 1); - usedRamrod = new VarbitRequirement(1743, 1); - usedCanister = new VarbitRequirement(1744, 2); - usedBalls = new VarbitRequirement(1744, 1); - usedFuse = new VarbitRequirement(1741, 3); - firedCannon = new VarbitRequirement(1746, 1); + cannonBroken = new VarbitRequirement(VarbitID.FEVER_CANNON, 1); + addedPowder = new VarbitRequirement(VarbitID.FEVER_CANNON_POWDER, 1); + usedRamrod = new VarbitRequirement(VarbitID.FEVER_CANNON_TAMP, 1); + usedCanister = new VarbitRequirement(VarbitID.FEVER_CANNON_AMMO, 2); + usedBalls = new VarbitRequirement(VarbitID.FEVER_CANNON_AMMO, 1); + usedFuse = new VarbitRequirement(VarbitID.FEVER_CANNON, 3); + firedCannon = new VarbitRequirement(VarbitID.FEVER_CANNON_CLEAN, 1); // SHOTS CAN FAIL @@ -452,7 +453,7 @@ public void setupConditions() // Third succesful shot: // 1750 2->3 - canisterInWrong = new VarbitRequirement(1747, 1); + canisterInWrong = new VarbitRequirement(VarbitID.FEVER_CANNON_GONNA_BLOW, 1); // 1752 = num plunder stashed } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/childrenofthesun/ChildrenOfTheSun.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/childrenofthesun/ChildrenOfTheSun.java index 9c28e33328c..8b1e3003ad0 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/childrenofthesun/ChildrenOfTheSun.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/childrenofthesun/ChildrenOfTheSun.java @@ -27,94 +27,94 @@ import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.npc.NpcRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; import net.runelite.client.plugins.microbot.questhelper.rewards.UnlockReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.MultiNpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.PuzzleWrapperStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; - -import java.util.*; - -import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; +import net.runelite.api.gameval.VarbitID; public class ChildrenOfTheSun extends BasicQuestHelper { - DetailedQuestStep talkToAlina, followGuard, attemptToEnterHouse, talkToTobyn, - reportBackToTobyn, goUpVarrockF0ToF1, goUpVarrockF1toF2, finishQuest; - - PuzzleWrapperStep followGuardPuzzleWrapper, markGuard1, markGuard2, markGuard3, markGuard4, unmarkWrongGuard1, unmarkWrongGuard2, unmarkWrongGuard3, unmarkWrongGuard4, - unmarkWrongGuard5, unmarkWrongGuard6; + final int GUARD_1_CHANGE_VARBIT = VarbitID.VMQ1_GUARD_1; + final int GUARD_2_CHANGE_VARBIT = VarbitID.VMQ1_GUARD_2; + final int GUARD_3_CHANGE_VARBIT = VarbitID.VMQ1_GUARD_3; + final int GUARD_4_CHANGE_VARBIT = VarbitID.VMQ1_GUARD_4; + final int WRONG_GUARD_1_CHANGE_VARBIT = VarbitID.VMQ1_GUARD_5; + final int WRONG_GUARD_2_CHANGE_VARBIT = VarbitID.VMQ1_GUARD_6; + final int WRONG_GUARD_3_CHANGE_VARBIT = VarbitID.VMQ1_GUARD_7; + final int WRONG_GUARD_4_CHANGE_VARBIT = VarbitID.VMQ1_GUARD_8; + final int WRONG_GUARD_5_CHANGE_VARBIT = VarbitID.VMQ1_GUARD_9; + final int WRONG_GUARD_6_CHANGE_VARBIT = VarbitID.VMQ1_GUARD_10; - Zone castleF1, castleF2; + // Zones + Zone castleF1; + Zone castleF2; - Requirement isFollowing, markedGuard1, markedGuard2, markedGuard3, markedGuard4, markedWrongGuard1, - markedWrongGuard2, markedWrongGuard3, markedWrongGuard4, markedWrongGuard5, markedWrongGuard6, inCastleF1, inCastleF2; + // Miscellaneous requirements + Requirement isFollowing; + Requirement markedGuard1; + Requirement markedGuard2; + Requirement markedGuard3; + Requirement markedGuard4; + Requirement markedWrongGuard1; + Requirement markedWrongGuard2; + Requirement markedWrongGuard3; + Requirement markedWrongGuard4; + Requirement markedWrongGuard5; + Requirement markedWrongGuard6; + Requirement inCastleF1; + Requirement inCastleF2; - final int GUARD_1_CHANGE_VARBIT = 9633; - final int GUARD_2_CHANGE_VARBIT = 9634; - final int GUARD_3_CHANGE_VARBIT = 9635; - final int GUARD_4_CHANGE_VARBIT = 9636; - final int WRONG_GUARD_1_CHANGE_VARBIT = 9637; - final int WRONG_GUARD_2_CHANGE_VARBIT = 9640; - final int WRONG_GUARD_3_CHANGE_VARBIT = 9641; - final int WRONG_GUARD_4_CHANGE_VARBIT = 9642; - final int WRONG_GUARD_5_CHANGE_VARBIT = 9643; - final int WRONG_GUARD_6_CHANGE_VARBIT = 9644; + // Steps + DetailedQuestStep talkToAlina; + DetailedQuestStep followGuard; + DetailedQuestStep attemptToEnterHouse; + DetailedQuestStep talkToTobyn; + DetailedQuestStep reportBackToTobyn; + DetailedQuestStep goUpVarrockF0ToF1; + DetailedQuestStep goUpVarrockF1toF2; + DetailedQuestStep finishQuest; + PuzzleWrapperStep followGuardPuzzleWrapper; + PuzzleWrapperStep markGuard1; + PuzzleWrapperStep markGuard2; + PuzzleWrapperStep markGuard3; + PuzzleWrapperStep markGuard4; + PuzzleWrapperStep unmarkOneOfTheGuards; + PuzzleWrapperStep unmarkWrongGuard1; + PuzzleWrapperStep unmarkWrongGuard2; + PuzzleWrapperStep unmarkWrongGuard3; + PuzzleWrapperStep unmarkWrongGuard4; + PuzzleWrapperStep unmarkWrongGuard5; + PuzzleWrapperStep unmarkWrongGuard6; @Override - public Map loadSteps() + protected void setupZones() { - initializeRequirements(); - setupConditions(); - setupSteps(); - Map steps = new HashMap<>(); - - // Before start, 9646 0->1, talked a bit to Alina - steps.put(0, talkToAlina); - steps.put(2, talkToAlina); - steps.put(4, talkToAlina); - ConditionalStep goFollowGuard = new ConditionalStep(this, talkToAlina); - goFollowGuard.addStep(isFollowing, followGuardPuzzleWrapper); - steps.put(6, goFollowGuard); - steps.put(8, attemptToEnterHouse); - steps.put(10, talkToTobyn); - ConditionalStep markGuards = new ConditionalStep(this, markGuard1); - markGuards.addStep(markedWrongGuard1, unmarkWrongGuard1); - markGuards.addStep(markedWrongGuard2, unmarkWrongGuard2); - markGuards.addStep(markedWrongGuard3, unmarkWrongGuard3); - markGuards.addStep(markedWrongGuard4, unmarkWrongGuard4); - markGuards.addStep(markedWrongGuard5, unmarkWrongGuard5); - markGuards.addStep(markedWrongGuard6, unmarkWrongGuard6); - markGuards.addStep(and(markedGuard1, markedGuard2, markedGuard3, markedGuard4), reportBackToTobyn); - markGuards.addStep(and(markedGuard1, markedGuard2, markedGuard4), markGuard3); - markGuards.addStep(and(markedGuard1, markedGuard2), markGuard4); - markGuards.addStep(markedGuard1, markGuard2); - steps.put(12, markGuards); - steps.put(14, reportBackToTobyn); - ConditionalStep goFinishQuest = new ConditionalStep(this, goUpVarrockF0ToF1); - goFinishQuest.addStep(inCastleF2, finishQuest); - goFinishQuest.addStep(inCastleF1, goUpVarrockF1toF2); - steps.put(16, goFinishQuest); - steps.put(18, goFinishQuest); - steps.put(20, goFinishQuest); - steps.put(22, goFinishQuest); - return steps; + castleF1 = new Zone(new WorldPoint(3199, 3465, 1), new WorldPoint(3227, 3500, 1)); + castleF2 = new Zone(new WorldPoint(3199, 3465, 2), new WorldPoint(3227, 3500, 2)); } @Override protected void setupRequirements() - { - - } - - public void setupConditions() { isFollowing = new NpcRequirement("Guard", NpcID.VMQ1_BAG_GUARD); markedGuard1 = new VarbitRequirement(GUARD_1_CHANGE_VARBIT, 2); @@ -129,8 +129,6 @@ public void setupConditions() markedWrongGuard5 = new VarbitRequirement(WRONG_GUARD_5_CHANGE_VARBIT, 2); markedWrongGuard6 = new VarbitRequirement(WRONG_GUARD_6_CHANGE_VARBIT, 2); - castleF1 = new Zone(new WorldPoint(3199, 3465, 1), new WorldPoint(3227, 3500, 1)); - castleF2 = new Zone(new WorldPoint(3199, 3465, 2), new WorldPoint(3227, 3500, 2)); inCastleF1 = new ZoneRequirement(castleF1); inCastleF2 = new ZoneRequirement(castleF2); } @@ -173,17 +171,17 @@ public void setupSteps() ); followGuardPuzzleWrapper = new PuzzleWrapperStep(this, followGuard, "Follow the guard, keeping out of sight whilst also not letting them get too far away."); - final int BASE_GUARD_ID = 6923; + final int BASE_GUARD_ID = NpcID.VMQ1_GUARD_1; attemptToEnterHouse = new ObjectStep(this, ObjectID.VMQ1_BANDIT_DOOR, new WorldPoint(3259, 3400, 0), "Attempt to enter the house in the south-east of Varrock, north of the Zamorak Temple, and watch the cutscene."); talkToTobyn = new NpcStep(this, NpcID.VMQ1_GUARD_SERGEANT_VIS, new WorldPoint(3211, 3437, 0), "Talk to Sergeant Tobyn in Varrock Square."); markGuard1 = new PuzzleWrapperStep(this, new MultiNpcStep(this, NpcID.VMQ1_GUARD_1_UNMARKED, new WorldPoint(3208, 3422, 0), - "Mark the guard outside Aris's tent.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), + "Mark the guard outside Aris's tent.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), "Mark the suspect guards."); markGuard2 = new PuzzleWrapperStep(this, new MultiNpcStep(this, NpcID.VMQ1_GUARD_2_UNMARKED, new WorldPoint(3221, 3430, 0), - "Mark the guard south east of Benny's news stand, who isn't wearing a helmet and has long hair.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), + "Mark the guard south east of Benny's news stand, who isn't wearing a helmet and has long hair.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), "Mark the suspect guards.").withNoHelpHiddenInSidebar(true); markGuard3 = new PuzzleWrapperStep(this, new MultiNpcStep(this, NpcID.VMQ1_GUARD_3_UNMARKED, new WorldPoint(3246, 3429, 0), @@ -194,31 +192,44 @@ public void setupSteps() "Mark the guard leaning on the north wall of Lowe's Archery Emporium, east of the square.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), "Mark the suspect guards.").withNoHelpHiddenInSidebar(true); + var realUnmarkOneOfTheGuards = new DetailedQuestStep(this, "One of the guards is incorrectly marked, unmark the one as indicated by the overlay."); + unmarkWrongGuard1 = new PuzzleWrapperStep(this, new MultiNpcStep(this, NpcID.VMQ1_GUARD_5_MARKED, new WorldPoint(3227, 3424, 0), - "Unmark the guard east of ELiza.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), + "Unmark the guard east of Eliza.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), "Mark the suspect guards."); unmarkWrongGuard2 = new PuzzleWrapperStep(this, new MultiNpcStep(this, NpcID.VMQ1_GUARD_6_MARKED, new WorldPoint(3218, 3424, 0), - "Unmark the guard next to Eliza.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), + "Unmark the guard next to Eliza.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), "Mark the suspect guards."); unmarkWrongGuard3 = new PuzzleWrapperStep(this, new MultiNpcStep(this, NpcID.VMQ1_GUARD_7_MARKED, new WorldPoint(3230, 3430, 0), - "Unmark the guard roaming south of Horvik.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), + "Unmark the guard roaming south of Horvik.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), "Mark the suspect guards."); unmarkWrongGuard4 = new PuzzleWrapperStep(this, new MultiNpcStep(this, NpcID.VMQ1_GUARD_8_MARKED, new WorldPoint(3206, 3431, 0), - "Unmark the guard outside Zaff's Superior Staffs.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), + "Unmark the guard outside Zaff's Superior Staffs.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), "Mark the suspect guards."); unmarkWrongGuard5 = new PuzzleWrapperStep(this, new MultiNpcStep(this, NpcID.VMQ1_GUARD_9_MARKED, new WorldPoint(3239, 3433, 0), - "Unmark the guard next to the small fountain east of Horvik.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), + "Unmark the guard next to the small fountain east of Horvik.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), "Mark the suspect guards."); unmarkWrongGuard6 = new PuzzleWrapperStep(this, new MultiNpcStep(this, NpcID.VMQ1_GUARD_10_MARKED, new WorldPoint(3218, 3433, 0), - "Unmark the guard next to Baraek.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), + "Unmark the guard next to Baraek.", GUARD_1_CHANGE_VARBIT, BASE_GUARD_ID), "Mark the suspect guards."); + realUnmarkOneOfTheGuards.addSubSteps( + unmarkWrongGuard1, + unmarkWrongGuard2, + unmarkWrongGuard3, + unmarkWrongGuard4, + unmarkWrongGuard5, + unmarkWrongGuard6 + ); + + unmarkOneOfTheGuards = realUnmarkOneOfTheGuards.puzzleWrapStep(true); + reportBackToTobyn = new NpcStep(this, NpcID.VMQ1_GUARD_SERGEANT_VIS, new WorldPoint(3211, 3437, 0), "Report back to Sergeant Tobyn."); goUpVarrockF0ToF1 = new ObjectStep(this, ObjectID.FAI_VARROCK_STAIRS_TALLER_NEW_FIX, new WorldPoint(3212, 3474, 0), @@ -228,18 +239,64 @@ public void setupSteps() finishQuest = new NpcStep(this, NpcID.VMQ1_GUARD_SERGEANT_VIS, new WorldPoint(3202, 3473, 2), "Talk to Tobyn on the Varrock Castle's roof to finish the quest."); finishQuest.addSubSteps(goUpVarrockF1toF2, goUpVarrockF0ToF1); - } - @Override - public List getItemRequirements() - { - return null; + // Upon finishing the quest: + // [2025-08-05T22:15:32Z 385] varbit VMQ1_QUESTCOMPLETE_TYPE (9645) 0 -> 2 + // [2025-08-05T22:15:32Z 385] varbit VMQ2_FIRST_TRAVEL (9652) 0 -> 1 + // + // When talking to Regulus Cento after finishing the quest: + // [2025-08-06T09:20:25Z 306] varbit VMQ2_FIRST_TRAVEL (9652) 1 -> 2 + // Dialogue option is: "Let's do it!" + // + // After traveling: + // [2025-08-06T09:21:47Z 442] varbit VARLAMORE_VISITED (9650) 0 -> 1 + // [2025-08-06T09:21:47Z 442] varbit VMQ2_FIRST_TRAVEL (9652) 2 -> 3 + // + // When landing, you're put in a conversation with Regulus. + // When finishing that conversation: + // [2025-08-06T09:22:54Z 554] varbit VMQ2_FIRST_TRAVEL (9652) 3 -> 4 + } @Override - public List getItemRecommended() + public Map loadSteps() { - return null; + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + // Before start, 9646 0->1, talked a bit to Alina + steps.put(0, talkToAlina); + steps.put(2, talkToAlina); + steps.put(4, talkToAlina); + var goFollowGuard = new ConditionalStep(this, talkToAlina); + goFollowGuard.addStep(isFollowing, followGuardPuzzleWrapper); + steps.put(6, goFollowGuard); + steps.put(8, attemptToEnterHouse); + steps.put(10, talkToTobyn); + var markGuards = new ConditionalStep(this, markGuard1); + markGuards.addStep(markedWrongGuard1, unmarkWrongGuard1); + markGuards.addStep(markedWrongGuard2, unmarkWrongGuard2); + markGuards.addStep(markedWrongGuard3, unmarkWrongGuard3); + markGuards.addStep(markedWrongGuard4, unmarkWrongGuard4); + markGuards.addStep(markedWrongGuard5, unmarkWrongGuard5); + markGuards.addStep(markedWrongGuard6, unmarkWrongGuard6); + markGuards.addStep(and(markedGuard1, markedGuard2, markedGuard3, markedGuard4), reportBackToTobyn); + markGuards.addStep(and(markedGuard1, markedGuard2, markedGuard4), markGuard3); + markGuards.addStep(and(markedGuard1, markedGuard2), markGuard4); + markGuards.addStep(markedGuard1, markGuard2); + steps.put(12, markGuards); + steps.put(14, reportBackToTobyn); + var goFinishQuest = new ConditionalStep(this, goUpVarrockF0ToF1); + goFinishQuest.addStep(inCastleF2, finishQuest); + goFinishQuest.addStep(inCastleF1, goUpVarrockF1toF2); + steps.put(16, goFinishQuest); + steps.put(18, goFinishQuest); + steps.put(20, goFinishQuest); + steps.put(22, goFinishQuest); + + return steps; } @Override @@ -259,9 +316,22 @@ public List getUnlockRewards() @Override public List getPanels() { - List allSteps = new ArrayList<>(); - allSteps.add(new PanelDetails("Intrigue", Arrays.asList(talkToAlina, followGuardPuzzleWrapper, - attemptToEnterHouse, talkToTobyn, markGuard1, markGuard2, markGuard4, markGuard3, reportBackToTobyn, finishQuest))); + var allSteps = new ArrayList(); + + allSteps.add(new PanelDetails("Intrigue", List.of( + talkToAlina, + followGuardPuzzleWrapper, + attemptToEnterHouse, + talkToTobyn, + markGuard1, + markGuard2, + markGuard4, + markGuard3, + unmarkOneOfTheGuards, + reportBackToTobyn, + finishQuest + ))); + return allSteps; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/clientofkourend/ClientOfKourend.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/clientofkourend/ClientOfKourend.java index c0feee85135..b235536b897 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/clientofkourend/ClientOfKourend.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/clientofkourend/ClientOfKourend.java @@ -29,98 +29,83 @@ import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; import net.runelite.client.plugins.microbot.questhelper.questinfo.QuestHelperQuest; import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.quest.QuestRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; +import net.runelite.client.plugins.microbot.questhelper.rewards.UnlockReward; import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.QuestState; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; - -import java.util.*; +import net.runelite.api.gameval.VarbitID; public class ClientOfKourend extends BasicQuestHelper { - //Items Required + // Required items ItemRequirement feather; - - //Items Recommended - ItemRequirement gamesNecklace; - - //Other items used - ItemRequirement enchantedScroll, enchantedQuill, mysteriousOrb; - - Requirement talkedToLeenz, talkedToHorace, talkedToJennifer, talkedToMunty, talkedToRegath; - - QuestStep talkToVeos, useFeatherOnScroll, talkToLeenz, talkToHorace, talkToJennifer, talkToMunty, talkToRegath, returnToVeos, goToAltar, finishQuest; - - @Override - public Map loadSteps() - { - initializeRequirements(); - setupConditions(); - setupSteps(); - Map steps = new HashMap<>(); - - steps.put(0, talkToVeos); - - ConditionalStep makeEnchantedQuill = new ConditionalStep(this, talkToVeos); - makeEnchantedQuill.addStep(new Conditions(enchantedQuill, talkedToLeenz, talkedToRegath, talkedToMunty, talkedToJennifer), talkToHorace); - makeEnchantedQuill.addStep(new Conditions(enchantedQuill, talkedToLeenz, talkedToRegath, talkedToMunty), talkToJennifer); - makeEnchantedQuill.addStep(new Conditions(enchantedQuill, talkedToLeenz, talkedToRegath), talkToMunty); - makeEnchantedQuill.addStep(new Conditions(enchantedQuill, talkedToLeenz), talkToRegath); - makeEnchantedQuill.addStep(new Conditions(enchantedQuill), talkToLeenz); - makeEnchantedQuill.addStep(enchantedScroll, useFeatherOnScroll); - steps.put(1, makeEnchantedQuill); - - steps.put(2, returnToVeos); - ConditionalStep takeOrbToAltar = new ConditionalStep(this, returnToVeos); - takeOrbToAltar.addStep(mysteriousOrb, goToAltar); + // Recommended items + ItemRequirement gamesNecklace; + ItemRequirement coinsForMinecart; - steps.put(3, returnToVeos); + // Miscellaneus requirements + ItemRequirement enchantedScroll; + ItemRequirement enchantedQuill; + ItemRequirement mysteriousOrb; + VarbitRequirement talkedToLeenz; + VarbitRequirement talkedToHorace; + VarbitRequirement talkedToJennifer; + VarbitRequirement talkedToMunty; + VarbitRequirement talkedToRegath; - steps.put(4, takeOrbToAltar); + // Steps + QuestStep talkToVeos; + QuestStep useFeatherOnScroll; + QuestStep talkToLeenz; + QuestStep talkToHorace; + QuestStep talkToJennifer; + QuestStep talkToMunty; + QuestStep talkToRegath; + QuestStep returnToVeos; + QuestStep goToAltar; + QuestStep finishQuest; - steps.put(5, finishQuest); - steps.put(6, finishQuest); - - return steps; - } @Override protected void setupRequirements() { + talkedToLeenz = new VarbitRequirement(VarbitID.VEOS_PISCARILIUS, 1); + talkedToRegath = new VarbitRequirement(VarbitID.VEOS_ARCEUUS, 1); + talkedToMunty = new VarbitRequirement(VarbitID.VEOS_LOVAKENGJ, 1); + talkedToJennifer = new VarbitRequirement(VarbitID.VEOS_SHAYZIEN, 1); + talkedToHorace = new VarbitRequirement(VarbitID.VEOS_HOSIDIUS, 1); + feather = new ItemRequirement("Feather", ItemID.FEATHER); feather.setTooltip("Can be purchased from Gerrant's Fishy Business in Port Sarim."); feather.addAlternates(ItemID.HUNTING_POLAR_FEATHER, ItemID.HUNTING_WOODLAND_FEATHER, ItemID.HUNTING_JUNGLE_FEATHER, ItemID.HUNTING_DESERT_FEATHER, ItemID.HUNTING_EAGLE_FEATHER, ItemID.HUNTING_STRIPY_BIRD_FEATHER); feather.setHighlightInInventory(true); gamesNecklace = new ItemRequirement("Games necklace", ItemCollections.GAMES_NECKLACES); + coinsForMinecart = new ItemRequirement("Coins", ItemCollections.COINS, 100); + coinsForMinecart.setTooltip("For travel with the Lovakengj Minecart Network."); enchantedScroll = new ItemRequirement("Enchanted scroll", ItemID.VEOS_SCROLL); - enchantedScroll.setHighlightInInventory(true); mysteriousOrb = new ItemRequirement("Mysterious orb", ItemID.VEOS_ORB); mysteriousOrb.setHighlightInInventory(true); enchantedQuill = new ItemRequirement("Enchanted quill", ItemID.VEOS_QUILL); } - public void setupConditions() - { - talkedToLeenz = new VarbitRequirement(5620, 1); - talkedToRegath = new VarbitRequirement(5621, 1); - talkedToMunty = new VarbitRequirement(5622, 1); - talkedToJennifer = new VarbitRequirement(5623, 1); - talkedToHorace = new VarbitRequirement(5624, 1); - } - public void setupSteps() { talkToVeos = new NpcStep(this, NpcID.VEOS_VIS_AMULET, new WorldPoint(1824, 3690, 0), @@ -130,54 +115,92 @@ public void setupSteps() talkToVeos.addDialogStep("Have you got any quests for me?"); talkToVeos.addDialogStep("Let's talk about your client..."); talkToVeos.addDialogStep("I've lost something you've given me."); + talkToVeos.addDialogStep("Yes."); - useFeatherOnScroll = new DetailedQuestStep(this, "Use a feather on the Enchanted Scroll.", feather, enchantedScroll); + useFeatherOnScroll = new DetailedQuestStep(this, "Use a feather on the Enchanted Scroll.", feather, enchantedScroll.highlighted()); - talkToLeenz = new NpcStep(this, NpcID.PISCARILIUS_GENERALSTORE_KEEPER, new WorldPoint(1807, 3726, 0), "Talk to Leenz in Port Piscarilius general store.", enchantedQuill); + talkToLeenz = new NpcStep(this, NpcID.PISCARILIUS_GENERALSTORE_KEEPER, new WorldPoint(1807, 3726, 0), "Talk to Leenz in Port Piscarilius general store.", enchantedScroll, enchantedQuill); talkToLeenz.addDialogStep("Can I ask you about Port Piscarilius?"); talkToLeenz.addDialogStep("What is there to do in Port Piscarilius?"); - talkToHorace = new NpcStep(this, NpcID.HOSIDIUS_GENERALSTORE, new WorldPoint(1774, 3589, 0), "Talk to Horace in the Hosidius general store.", enchantedQuill); + talkToHorace = new NpcStep(this, NpcID.HOSIDIUS_GENERALSTORE, new WorldPoint(1774, 3589, 0), "Talk to Horace in the Hosidius general store. You can take the Lovakengj Minecart Network to Hosidius South.", enchantedScroll, enchantedQuill); talkToHorace.addDialogStep("Can I ask you about Hosidius?"); talkToHorace.addDialogStep("What is there to do in Hosidius?"); - talkToJennifer = new NpcStep(this, NpcID.SHAYZIEN_GENERALSTORE, new WorldPoint(1518, 3586, 0), "Talk to Jennifer in Shayzien general store.", enchantedQuill); + talkToJennifer = new NpcStep(this, NpcID.SHAYZIEN_GENERALSTORE, new WorldPoint(1518, 3586, 0), "Talk to Jennifer in Shayzien general store. You can run west towards the bank and use the Lovakengj Minecart Network to Shayzien East.", enchantedScroll, enchantedQuill); talkToJennifer.addDialogStep("Can I ask you about Shayzien?"); talkToJennifer.addDialogStep("What is there to do in Shayzien?"); - talkToMunty = new NpcStep(this, NpcID.LOVAKENGJ_GENERALSTORE, new WorldPoint(1551, 3752, 0), "Talk to Munty in Lovakengj general store.", enchantedQuill); + talkToMunty = new NpcStep(this, NpcID.LOVAKENGJ_GENERALSTORE, new WorldPoint(1551, 3752, 0), "Talk to Munty in Lovakengj general store. You can run south towards Kingstown and use the Lovakengj Minecart Network to Lovakengj.", enchantedScroll, enchantedQuill); talkToMunty.addDialogStep("Can I ask you about Lovakengj?"); talkToMunty.addDialogStep("What is there to do in Lovakengj?"); - talkToRegath = new NpcStep(this, NpcID.ARCEUUS_GENERALSTORE, new WorldPoint(1720, 3724, 0), "Talk to Regath in Arceuus general store.", enchantedQuill); + talkToRegath = new NpcStep(this, NpcID.ARCEUUS_GENERALSTORE, new WorldPoint(1720, 3724, 0), "Talk to Regath in Arceuus general store.", enchantedScroll, enchantedQuill); talkToRegath.addDialogStep("Can I ask you about Arceuus?"); talkToRegath.addDialogStep("What is there to do in Arceuus?"); returnToVeos = new NpcStep(this, NpcID.VEOS_VIS_AMULET, new WorldPoint(1824, 3690, 0), "Return to Veos on Piscarilius docks."); returnToVeos.addDialogStep("Let's talk about your client..."); returnToVeos.addDialogStep("I've lost something you've given me."); - goToAltar = new DetailedQuestStep(this, new WorldPoint(1712, 3883, 0), "Activate the mysterious orb at the Dark Altar. You can either run there through Arceuus, teleport to Wintertodt with the Games Necklace and run south, or teleport straight there on the Arceuus spellbook.", mysteriousOrb); + goToAltar = new DetailedQuestStep(this, new WorldPoint(1712, 3883, 0), "Activate the mysterious orb at the Dark Altar. You can either run there through Arceuus, teleport to Wintertodt with the Games Necklace and run south, teleport straight there on the Arceuus spellbook, or use the Lovakengj Minecart Network to travel to Arceuus.", mysteriousOrb); - finishQuest = new NpcStep(this, NpcID.VEOS_VIS_AMULET, new WorldPoint(1824, 3690, 0), "Return to Veos on Piscarilius docks."); + finishQuest = new NpcStep(this, NpcID.VEOS_VIS_AMULET, new WorldPoint(1824, 3690, 0), "Return to Veos on Piscarilius docks. You can take the Lovakengj Minecart Network from Arceuus to Port Piscarilius and run south-east."); finishQuest.addDialogStep("Let's talk about your client..."); } @Override - public List getItemRequirements() + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + steps.put(0, talkToVeos); + + var makeEnchantedQuill = new ConditionalStep(this, talkToVeos); + makeEnchantedQuill.addStep(and(enchantedScroll, enchantedQuill, talkedToLeenz, talkedToRegath, talkedToMunty, talkedToJennifer), talkToHorace); + makeEnchantedQuill.addStep(and(enchantedScroll, enchantedQuill, talkedToLeenz, talkedToRegath, talkedToMunty), talkToJennifer); + makeEnchantedQuill.addStep(and(enchantedScroll, enchantedQuill, talkedToLeenz, talkedToRegath), talkToMunty); + makeEnchantedQuill.addStep(and(enchantedScroll, enchantedQuill, talkedToLeenz), talkToRegath); + makeEnchantedQuill.addStep(and(enchantedScroll, enchantedQuill), talkToLeenz); + makeEnchantedQuill.addStep(enchantedScroll, useFeatherOnScroll); + steps.put(1, makeEnchantedQuill); + + steps.put(2, returnToVeos); + + var takeOrbToAltar = new ConditionalStep(this, returnToVeos); + takeOrbToAltar.addStep(mysteriousOrb, goToAltar); + + steps.put(3, returnToVeos); + + steps.put(4, takeOrbToAltar); + + steps.put(5, finishQuest); + steps.put(6, finishQuest); + + return steps; + } + + @Override + public List getGeneralRequirements() { - ArrayList reqs = new ArrayList<>(); - reqs.add(feather); - return reqs; + return List.of( + new QuestRequirement(QuestHelperQuest.X_MARKS_THE_SPOT, QuestState.FINISHED) + ); } - + @Override - public List getItemRecommended() + public List getItemRequirements() { - return Arrays.asList(gamesNecklace); + return List.of( + feather + ); } - + @Override - public List getGeneralRequirements() + public List getItemRecommended() { - List reqs = new ArrayList<>(); - reqs.add(new QuestRequirement(QuestHelperQuest.X_MARKS_THE_SPOT, QuestState.FINISHED)); - return reqs; + return List.of( + gamesNecklace, + coinsForMinecart + ); } @Override @@ -189,19 +212,46 @@ public QuestPointReward getQuestPointReward() @Override public List getItemRewards() { - return Arrays.asList( - new ItemReward("500 Experience Lamps (Any Skill)", ItemID.THOSF_REWARD_LAMP, 2), //4447 Placeholder until confirmed. - new ItemReward("Kharedst's Memoirs", ItemID.VEOS_KHAREDSTS_MEMOIRS, 1)); + return List.of( + new ItemReward("500 Experience Lamps (Any Skill)", ItemID.THOSF_REWARD_LAMP, 2), //4447 Placeholder until confirmed. + new ItemReward("Kharedst's Memoirs", ItemID.VEOS_KHAREDSTS_MEMOIRS, 1) + ); + } + + @Override + public List getUnlockRewards() + { + return List.of( + new UnlockReward("Ability to use the Kourend Castle Teleport spell") + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); + var sections = new ArrayList(); + + sections.add(new PanelDetails("Starting off", List.of( + talkToVeos, + useFeatherOnScroll + ), List.of( + feather + ))); + + sections.add(new PanelDetails("Learn about Kourend", List.of( + talkToLeenz, + talkToRegath, + talkToMunty, + talkToJennifer, + talkToHorace, + returnToVeos + ))); + + sections.add(new PanelDetails("The Dark Altar", List.of( + goToAltar, + finishQuest + ))); - allSteps.add(new PanelDetails("Starting off", Arrays.asList(talkToVeos, useFeatherOnScroll), feather)); - allSteps.add(new PanelDetails("Learn about Kourend", Arrays.asList(talkToLeenz, talkToRegath, talkToMunty, talkToJennifer, talkToHorace, returnToVeos))); - allSteps.add(new PanelDetails("The Dark Altar", Arrays.asList(goToAltar, finishQuest))); - return allSteps; + return sections; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/clocktower/ClockTower.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/clocktower/ClockTower.java index b0afaea4ad9..2ff138277c3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/clocktower/ClockTower.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/clocktower/ClockTower.java @@ -34,6 +34,10 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.ObjectCondition; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.nor; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.not; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.or; import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicType; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarplayerRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.widget.WidgetTextRequirement; @@ -41,116 +45,119 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ItemStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.InterfaceID; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; -import java.util.*; - public class ClockTower extends BasicQuestHelper { - ItemRequirement bucketOfWater, noteAboutWater, staminaPotions, ardougneCloak, redCog, blueCog, blackCog, whiteCog, ratPoison; - - Zone basement, firstFloor, secondFloor, groundFloor, secretPath, secretPath2, secretPath3, secretPath4, - secretPath5, secretPath6, cell; - - Requirement inBasement, inGroundFloor, inFirstFloor, inSecondFloor, inSecretPath, inCell, startedQuestDuringSession, - synced, firstLeverDown, pulledFirstLeverUp, secondLeverUp, poisonedRats, placedRedCog, placedBlueCog, placedWhiteCog, - placedBlackCog; - - QuestStep talkToKojo, syncStep; - - QuestStep enterBasement, pickUpRedCog, climbToGroundFloorFromBasement, redCogOnRedSpindle; - - QuestStep goToLadderCedric, pushWall, climbCellLadder, pickUpBlueCog, climbToFirstFloor, blueCogOnBlueSpindle; - - QuestStep climbFromFirstFloorToGround, pickupBlackCog, blackCogOnBlackSpindle; - - QuestStep northWesternDoor, pickUpRatPoison, pullFirstLever, ratPoisonFood, westernGate, pickUpWhiteCog, climbWhiteLadder, - climbToSecondFloor, whiteCogOnWhiteSpindle, climbFromSecondFloorToFirst; - - QuestStep kojoReward; - - ConditionalStep getRedCog, getBlueCog, getBlackCog, getWhiteCog; - - ConditionalStep goToBasementForRed, goToBasementForBlue, goToBasementForBlack, goToBasementForWhite, - goToFirstFloorWithBlueCog, goToGroundFloorWithRedCog, goToBasementWithBlackCog, goToSecondFloorWithWhiteCog, - goFinishQuest; - - - @Override - public Map loadSteps() - { - initializeRequirements(); - setupConditions(); - setupSteps(); - - Map steps = new HashMap<>(); - - ConditionalStep goStart = new ConditionalStep(this, talkToKojo); - // This is so we can lock the startedQuestDuringSession to true, so we don't need to ask to sync after - goStart.addStep(startedQuestDuringSession, talkToKojo); - - steps.put(0, talkToKojo); - - getRedCog = new ConditionalStep(this, goToBasementForRed); - getRedCog.addStep(redCog, goToGroundFloorWithRedCog); - getRedCog.addStep(inBasement, pickUpRedCog); - - getBlueCog = new ConditionalStep(this, goToBasementForBlue); - getBlueCog.addStep(blueCog, goToFirstFloorWithBlueCog); - getBlueCog.addStep(inCell, pickUpBlueCog); - getBlueCog.addStep(inSecretPath, pushWall); - - getBlackCog = new ConditionalStep(this, goToBasementForBlack); - getBlackCog.addStep(blackCog, goToBasementWithBlackCog); - getBlackCog.addStep(inBasement, pickupBlackCog); - - getWhiteCog = new ConditionalStep(this, goToBasementForWhite); - getWhiteCog.addStep(new Conditions(whiteCog, inBasement), climbWhiteLadder); - getWhiteCog.addStep(new Conditions(whiteCog), goToSecondFloorWithWhiteCog); - getWhiteCog.addStep(new Conditions(inBasement, pulledFirstLeverUp, poisonedRats), pickUpWhiteCog); - getWhiteCog.addStep(new Conditions(inBasement, ratPoison, pulledFirstLeverUp), ratPoisonFood); - getWhiteCog.addStep(new Conditions(inBasement, ratPoison), pullFirstLever); - getWhiteCog.addStep(inBasement, pickUpRatPoison); - - ConditionalStep doQuest = new ConditionalStep(this, syncStep); - doQuest.addStep(new Conditions(placedRedCog, placedBlueCog, placedBlackCog, placedWhiteCog, synced), goFinishQuest); - doQuest.addStep(new Conditions(placedRedCog, placedBlueCog, placedBlackCog, synced), getWhiteCog); - doQuest.addStep(new Conditions(placedRedCog, placedBlueCog, synced), getBlackCog); - doQuest.addStep(new Conditions(placedRedCog, synced), getBlueCog); - doQuest.addStep(synced, getRedCog); - steps.put(1, doQuest); - steps.put(2, doQuest); - steps.put(3, doQuest); - steps.put(4, doQuest); - steps.put(5, goFinishQuest); - steps.put(6, goFinishQuest); - steps.put(7, goFinishQuest); - - return steps; - } - - @Override - protected void setupRequirements() - { - bucketOfWater = new ItemRequirement("Bucket of Water or a pair of ice gloves or smiths gloves(i)", ItemID.BUCKET_WATER); - bucketOfWater.addAlternates(ItemID.ICE_GLOVES, ItemID.SMITHING_UNIFORM_GLOVES_ICE); - bucketOfWater.setTooltip("There is a bucket spawn next to the well east of the Clocktower. You can fill it on" + - " the well"); - noteAboutWater = new ItemRequirement("There's a bucket and a well and just next to brother cedric for the black cog", -1, -1); - staminaPotions = new ItemRequirement("Stamina Potions", ItemCollections.STAMINA_POTIONS); - ardougneCloak = new ItemRequirement("Ardougne Cloak to teleport to monastery", ItemID.ARDY_CAPE_EASY); - ardougneCloak.addAlternates(ItemID.ARDY_CAPE_MEDIUM, ItemID.ARDY_CAPE_HARD, ItemID.ARDY_CAPE_ELITE); - redCog = new ItemRequirement("Red Cog", ItemID.REDCOG); - blueCog = new ItemRequirement("Blue Cog", ItemID.BLUECOG); - whiteCog = new ItemRequirement("White Cog", ItemID.WHITECOG); - blackCog = new ItemRequirement("Black Cog", ItemID.BLACKCOG); - ratPoison = new ItemRequirement("Rat Poison", ItemID.RAT_POISON); - } + // Required items + ItemRequirement bucketOfWater; + + // Recommended items + ItemRequirement staminaPotions; + ItemRequirement ardougneCloak; + + // Zones + Zone basement; + Zone firstFloor; + Zone secondFloor; + Zone groundFloor; + Zone secretPath; + Zone secretPath2; + Zone secretPath3; + Zone secretPath4; + Zone secretPath5; + Zone secretPath6; + Zone cell; + + // Miscellaneous requirements + ItemRequirement emptyBucket; + ItemRequirement noteAboutWater; + ItemRequirement redCog; + ItemRequirement blueCog; + ItemRequirement blackCog; + ItemRequirement whiteCog; + ItemRequirement ratPoison; + + ZoneRequirement inBasement; + ZoneRequirement inGroundFloor; + ZoneRequirement inFirstFloor; + ZoneRequirement inSecondFloor; + ZoneRequirement inSecretPath; + ZoneRequirement inCell; + Requirement startedQuestDuringSession; + Requirement synced; + ObjectCondition firstLeverDown; + ObjectCondition pulledFirstLeverUp; + ObjectCondition secondLeverUp; + ChatMessageRequirement poisonedRats; + Requirement placedRedCog; + Requirement placedBlueCog; + Requirement placedWhiteCog; + Requirement placedBlackCog; + + // Steps + NpcStep talkToKojo; + QuestStep syncStep; + + ObjectStep enterBasement; + DetailedQuestStep pickUpRedCog; + ObjectStep climbToGroundFloorFromBasement; + ObjectStep redCogOnRedSpindle; + + ItemStep getBucket; + ObjectStep fillBucket; + ObjectStep goToLadderCedric; + ObjectStep pushWall; + ObjectStep climbCellLadder; + DetailedQuestStep pickUpBlueCog; + ObjectStep climbToFirstFloor; + ObjectStep blueCogOnBlueSpindle; + + ObjectStep climbFromFirstFloorToGround; + DetailedQuestStep pickupBlackCog; + ObjectStep blackCogOnBlackSpindle; + + ObjectStep northWesternDoor; + DetailedQuestStep pickUpRatPoison; + ObjectStep pullFirstLever; + ObjectStep ratPoisonFood; + ObjectStep westernGate; + DetailedQuestStep pickUpWhiteCog; + ObjectStep climbWhiteLadder; + ObjectStep climbToSecondFloor; + ObjectStep whiteCogOnWhiteSpindle; + ObjectStep climbFromSecondFloorToFirst; + + NpcStep finishQuest; + + ConditionalStep getRedCog; + ConditionalStep getBlueCog; + ConditionalStep getBlackCog; + ConditionalStep getWhiteCog; + + ConditionalStep goToBasementForRed; + ConditionalStep goToBasementForBlue; + ConditionalStep goToBasementForBlack; + ConditionalStep goToBasementForWhite; + ConditionalStep goToFirstFloorWithBlueCog; + ConditionalStep goToGroundFloorWithRedCog; + ConditionalStep goToBasementWithBlackCog; + ConditionalStep goToSecondFloorWithWhiteCog; + ConditionalStep goFinishQuest; @Override protected void setupZones() @@ -168,7 +175,8 @@ protected void setupZones() cell = new Zone(new WorldPoint(2571, 9630, 0), new WorldPoint(2575, 9633, 0)); } - public void setupConditions() + @Override + protected void setupRequirements() { inSecondFloor = new ZoneRequirement(secondFloor); inFirstFloor = new ZoneRequirement(firstFloor); @@ -205,13 +213,29 @@ public void setupConditions() new WidgetTextRequirement(InterfaceID.Questjournal.TEXTLAYER, true, "I have successfully placed the White Cog on its spindle"), new ChatMessageRequirement(inSecondFloor, "The cog fits perfectly.") ); + + bucketOfWater = new ItemRequirement("Bucket of Water or a pair of ice gloves or smiths gloves(i)", ItemID.BUCKET_WATER); + bucketOfWater.addAlternates(ItemID.ICE_GLOVES, ItemID.SMITHING_UNIFORM_GLOVES_ICE); + bucketOfWater.setTooltip("There is a bucket spawn next to the well east of the Clock Tower. You can fill it on the well"); + + emptyBucket = new ItemRequirement("Bucket", ItemID.BUCKET_EMPTY); + + noteAboutWater = new ItemRequirement("There's a bucket and a well and just next to brother cedric for the black cog", -1, -1); + staminaPotions = new ItemRequirement("Stamina Potions", ItemCollections.STAMINA_POTIONS); + ardougneCloak = new ItemRequirement("Ardougne Cloak to teleport to monastery", ItemID.ARDY_CAPE_EASY); + ardougneCloak.addAlternates(ItemID.ARDY_CAPE_MEDIUM, ItemID.ARDY_CAPE_HARD, ItemID.ARDY_CAPE_ELITE); + redCog = new ItemRequirement("Red Cog", ItemID.REDCOG); + blueCog = new ItemRequirement("Blue Cog", ItemID.BLUECOG); + whiteCog = new ItemRequirement("White Cog", ItemID.WHITECOG); + blackCog = new ItemRequirement("Black Cog", ItemID.BLACKCOG); + ratPoison = new ItemRequirement("Rat Poison", ItemID.RAT_POISON); } public void setupSteps() { // TODO: Need to determine to what degree PuzzleWrapperStep should be used in this quest - talkToKojo = new NpcStep(this, NpcID.BROTHER_KOJO, new WorldPoint(2570, 3245, 0), "Talk to Brother Kojo at the clock tower."); - talkToKojo.addDialogStep("OK old monk, what can I do?"); + talkToKojo = new NpcStep(this, NpcID.BROTHER_KOJO, new WorldPoint(2570, 3245, 0), "Talk to Brother Kojo in the Clock Tower to start the quest."); + talkToKojo.addDialogStep("Yes."); syncStep = new DetailedQuestStep(this, "Open your Quest Journal to sync your current state."); @@ -221,24 +245,26 @@ public void setupSteps() "Use the red cog on the red spindle.", redCog.highlighted()); redCogOnRedSpindle.addIcon(ItemID.REDCOG); + getBucket = new ItemStep(this, new WorldPoint(2616, 3255, 0), "Get the bucket next to Brother Cedric, north of the monastery, and fill it up on the well next to it for the Black cog step. If you have other plans for the black cog, you can ignore this step by going down the nearby ladder.", emptyBucket); + fillBucket = new ObjectStep(this, ObjectID.WELL, new WorldPoint(2612, 3254, 0), "Get the bucket next to Brother Cedric, north of the monastery, and fill it up on the well next to it for the Black cog step. If you have other plans for the black cog, you can ignore this step by going down the nearby ladder.", emptyBucket); + + getBucket.addSubSteps(fillBucket); + goToLadderCedric = new ObjectStep(this, ObjectID.LADDER_CELLAR, new WorldPoint(2621, 3261, 0), ""); - pushWall = new ObjectStep(this, ObjectID.SECRETDOOR2, new WorldPoint(2575, 9631, 0), "Follow the tunnel and " + - "push the wall at the end."); + pushWall = new ObjectStep(this, ObjectID.SECRETDOOR2, new WorldPoint(2575, 9631, 0), "Follow the tunnel and push the wall at the end."); pickUpBlueCog = new DetailedQuestStep(this, new WorldPoint(2574, 9633, 0), "Pick up the blue cog.", blueCog); climbCellLadder = new ObjectStep(this, ObjectID.LADDER_FROM_CELLAR, new WorldPoint(2572, 9631, 0), ""); blueCogOnBlueSpindle = new ObjectStep(this, ObjectID.BROKECLOCKPOLE_BLUE, new WorldPoint(2569, 3240, 1), "Use the blue cog on the blue spindle.", blueCog.highlighted()); blueCogOnBlueSpindle.addIcon(ItemID.BLUECOG); - pickupBlackCog = new DetailedQuestStep(this, new WorldPoint(2613, 9639, 0), "Enter the north east door, and " + - "pick up the black cog with a bucket of water, alternatively you can equip ice gloves or smith gloves(i).", bucketOfWater, blackCog); + pickupBlackCog = new DetailedQuestStep(this, new WorldPoint(2613, 9639, 0), "Enter the north east door, and pick up the black cog with a bucket of water, alternatively you can equip ice gloves or smith gloves(i).", bucketOfWater, blackCog); blackCogOnBlackSpindle = new ObjectStep(this, ObjectID.BROKECLOCKPOLE_BLACK, new WorldPoint(2570, 9642, 0), "", blackCog.highlighted()); blackCogOnBlackSpindle.addIcon(ItemID.BLACKCOG); northWesternDoor = new ObjectStep(this, ObjectID.POORDOOR, new WorldPoint(2575, 9651, 0), "Go through the north-western door."); - pickUpRatPoison = new DetailedQuestStep(this, new WorldPoint(2564, 9662, 0), "Pick up the rat poison in the " + - "north west of the dungeon.", ratPoison); + pickUpRatPoison = new DetailedQuestStep(this, new WorldPoint(2564, 9662, 0), "Pick up the rat poison in the north west of the dungeon.", ratPoison); pullFirstLever = new ObjectStep(this, ObjectID.CTLEVERA, new WorldPoint(2591, 9661, 0), "Pull the marked lever up."); ratPoisonFood = new ObjectStep(this, ObjectID.CTFOODTROUGH, new WorldPoint(2587, 9654, 0), @@ -250,7 +276,6 @@ public void setupSteps() whiteCogOnWhiteSpindle = new ObjectStep(this, ObjectID.BROKECLOCKPOLE_WHITE, new WorldPoint(2567, 3241, 2), "", whiteCog.highlighted()); whiteCogOnWhiteSpindle.addIcon(ItemID.WHITECOG); - kojoReward = new NpcStep(this, NpcID.BROTHER_KOJO, new WorldPoint(2570, 3245, 0), "Talk to Brother Kojo for your reward."); enterBasement = new ObjectStep(this, ObjectID.LADDER_CELLAR, new WorldPoint(2566, 3242, 0), ""); climbFromFirstFloorToGround = new ObjectStep(this, ObjectID.SPIRALSTAIRSMIDDLE, new WorldPoint(2573, 3241, 1), ""); @@ -262,80 +287,136 @@ public void setupSteps() climbToSecondFloor = new ObjectStep(this, ObjectID.SPIRALSTAIRSMIDDLE, new WorldPoint(2573, 3241, 1), ""); climbToSecondFloor.addDialogStep("Climb up the stairs."); - ConditionalStep goToBasementSteps = new ConditionalStep(this, enterBasement); + var goToBasementSteps = new ConditionalStep(this, enterBasement); goToBasementSteps.addStep(inSecondFloor, climbFromSecondFloorToFirst); goToBasementSteps.addStep(inFirstFloor, climbFromFirstFloorToGround); - goToBasementSteps.addStep(new Conditions(LogicType.OR, inSecretPath, inCell), climbCellLadder); + goToBasementSteps.addStep(or(inSecretPath, inCell), climbCellLadder); - ConditionalStep goToCellSteps = new ConditionalStep(this, goToLadderCedric); + var goToCellSteps = new ConditionalStep(this, goToLadderCedric); goToCellSteps.addStep(inBasement, climbToGroundFloorFromBasement); goToCellSteps.addStep(inSecondFloor, climbFromSecondFloorToFirst); goToCellSteps.addStep(inFirstFloor, climbFromFirstFloorToGround); - ConditionalStep goToGroundFloor = new ConditionalStep(this, new DetailedQuestStep(this, "")); - goToGroundFloor.addStep(new Conditions(LogicType.OR, inSecretPath, inCell), climbCellLadder); + var goToGroundFloor = new ConditionalStep(this, new DetailedQuestStep(this, "")); + goToGroundFloor.addStep(or(inSecretPath, inCell), climbCellLadder); goToGroundFloor.addStep(inBasement, climbToGroundFloorFromBasement); goToGroundFloor.addStep(inSecondFloor, climbFromSecondFloorToFirst); goToGroundFloor.addStep(inFirstFloor, climbFromFirstFloorToGround); - ConditionalStep goToFirstFloor = new ConditionalStep(this, climbToFirstFloor); - goToFirstFloor.addStep(new Conditions(LogicType.OR, inSecretPath, inCell), climbCellLadder); + var goToFirstFloor = new ConditionalStep(this, climbToFirstFloor); + goToFirstFloor.addStep(or(inSecretPath, inCell), climbCellLadder); goToFirstFloor.addStep(inBasement, climbToGroundFloorFromBasement); goToFirstFloor.addStep(inSecondFloor, climbFromSecondFloorToFirst); - ConditionalStep goToSecondFloor = new ConditionalStep(this, climbToFirstFloor); - goToSecondFloor.addStep(new Conditions(LogicType.OR, inSecretPath, inCell), climbCellLadder); + var goToSecondFloor = new ConditionalStep(this, climbToFirstFloor); + goToSecondFloor.addStep(or(inSecretPath, inCell), climbCellLadder); goToSecondFloor.addStep(inBasement, climbToGroundFloorFromBasement); goToSecondFloor.addStep(inFirstFloor, climbToSecondFloor); - goToBasementForRed = new ConditionalStep(this, goToBasementSteps, "Enter the clocktower's basement for the " + - "red cog."); - goToBasementForBlue = new ConditionalStep(this, goToCellSteps, "Climb down the ladder to the east of the " + - "Clocktower, next to Brother Cedric."); - goToBasementForWhite = new ConditionalStep(this, goToBasementSteps, "Enter the clocktower's basement for the " + - "white cog."); - goToBasementForBlack = new ConditionalStep(this, goToBasementSteps, "Enter the clocktower's basement for the " + - "black cog."); - - goToFirstFloorWithBlueCog = new ConditionalStep(this, goToFirstFloor, - "Place the blue cog on the peg on the first floor."); + goToBasementForRed = new ConditionalStep(this, goToBasementSteps, "Enter the Clock Tower basement for the red cog."); + goToBasementForBlue = new ConditionalStep(this, goToCellSteps, "Climb down the ladder to the east of the Clock Tower, next to Brother Cedric."); + goToBasementForWhite = new ConditionalStep(this, goToBasementSteps, "Enter the Clock Tower basement for the white cog."); + goToBasementForBlack = new ConditionalStep(this, goToBasementSteps, "Enter the Clock Tower basement for the black cog.", bucketOfWater); + + goToFirstFloorWithBlueCog = new ConditionalStep(this, goToFirstFloor, "Place the blue cog on the peg on the first floor."); goToFirstFloorWithBlueCog.addStep(inFirstFloor, blueCogOnBlueSpindle); goToGroundFloorWithRedCog = goToGroundFloor.copy(); goToGroundFloorWithRedCog.setText("Place the red cog on the peg on the ground floor."); goToGroundFloorWithRedCog.addStep(null, redCogOnRedSpindle); - goToBasementWithBlackCog = new ConditionalStep(this, goToBasementSteps, - "Place the black cog on the peg in the basement."); - goToBasementWithBlackCog.addStep(new Conditions(inBasement, new Conditions(LogicType.NOR, inSecretPath, inCell)), + goToBasementWithBlackCog = new ConditionalStep(this, goToBasementSteps, "Place the black cog on the peg in the basement."); + goToBasementWithBlackCog.addStep(and(inBasement, nor(inSecretPath, inCell)), blackCogOnBlackSpindle); - goToSecondFloorWithWhiteCog = new ConditionalStep(this, goToSecondFloor, - "Place the white cog on the peg on the second floor."); + goToSecondFloorWithWhiteCog = new ConditionalStep(this, goToSecondFloor, "Place the white cog on the peg on the second floor."); goToSecondFloorWithWhiteCog.addStep(inSecondFloor, whiteCogOnWhiteSpindle); goToSecondFloorWithWhiteCog.addSubSteps(climbWhiteLadder); + finishQuest = new NpcStep(this, NpcID.BROTHER_KOJO, new WorldPoint(2570, 3245, 0), ""); + goFinishQuest = goToGroundFloor.copy(); - goFinishQuest.setText("Talk to Kojo for your reward."); - goFinishQuest.addStep(null, kojoReward); + goFinishQuest.setText("Talk to Brother Kojo in the Clock Tower for your reward."); + goFinishQuest.addStep(null, finishQuest); + } + + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + var goStart = new ConditionalStep(this, talkToKojo); + // This is so we can lock the startedQuestDuringSession to true, so we don't need to ask to sync after + goStart.addStep(startedQuestDuringSession, talkToKojo); + + steps.put(0, talkToKojo); + + getRedCog = new ConditionalStep(this, goToBasementForRed); + getRedCog.addStep(redCog, goToGroundFloorWithRedCog); + getRedCog.addStep(inBasement, pickUpRedCog); + + getBlueCog = new ConditionalStep(this, goToBasementForBlue); + getBlueCog.addStep(blueCog, goToFirstFloorWithBlueCog); + getBlueCog.addStep(inCell, pickUpBlueCog); + getBlueCog.addStep(inSecretPath, pushWall); + getBlueCog.addStep(and(not(bucketOfWater), emptyBucket, not(placedBlackCog)), fillBucket); + getBlueCog.addStep(and(not(bucketOfWater), not(placedBlackCog)), getBucket); + + getBlackCog = new ConditionalStep(this, goToBasementForBlack); + getBlackCog.addStep(blackCog, goToBasementWithBlackCog); + getBlackCog.addStep(inBasement, pickupBlackCog); + + getWhiteCog = new ConditionalStep(this, goToBasementForWhite); + getWhiteCog.addStep(and(whiteCog, inBasement), climbWhiteLadder); + getWhiteCog.addStep(and(whiteCog), goToSecondFloorWithWhiteCog); + getWhiteCog.addStep(and(inBasement, pulledFirstLeverUp, poisonedRats), pickUpWhiteCog); + getWhiteCog.addStep(and(inBasement, ratPoison, pulledFirstLeverUp), ratPoisonFood); + getWhiteCog.addStep(and(inBasement, ratPoison), pullFirstLever); + getWhiteCog.addStep(inBasement, pickUpRatPoison); + + var doQuest = new ConditionalStep(this, syncStep); + doQuest.addStep(and(placedRedCog, placedBlueCog, placedBlackCog, placedWhiteCog, synced), goFinishQuest); + doQuest.addStep(and(placedRedCog, placedBlueCog, placedBlackCog, synced), getWhiteCog); + doQuest.addStep(and(placedRedCog, placedBlueCog, synced), getBlackCog); + doQuest.addStep(and(placedRedCog, synced), getBlueCog); + doQuest.addStep(synced, getRedCog); + steps.put(1, doQuest); + steps.put(2, doQuest); + steps.put(3, doQuest); + steps.put(4, doQuest); + steps.put(5, goFinishQuest); + steps.put(6, goFinishQuest); + steps.put(7, goFinishQuest); + + return steps; } @Override public List getItemRequirements() { - return Collections.singletonList(bucketOfWater); + return List.of( + bucketOfWater + ); } - @Override - public List getItemRecommended() - { - return Arrays.asList(staminaPotions, ardougneCloak); - } + @Override + public List getItemRecommended() + { + return List.of( + staminaPotions, + ardougneCloak + ); + } @Override public List getCombatRequirements() { - return Collections.singletonList("Able to survive a hit or 2 from an Ogre (level 53)"); + return List.of( + "Able to survive a hit or 2 from an Ogre (level 53)" + ); } @Override @@ -347,36 +428,59 @@ public QuestPointReward getQuestPointReward() @Override public List getItemRewards() { - return Collections.singletonList(new ItemReward("Coins", ItemID.COINS, 500)); + return List.of( + new ItemReward("Coins", ItemID.COINS, 500) + ); } @Override public List getPanels() { - ArrayList allSteps = new ArrayList<>(); - - PanelDetails gettingStarted = new PanelDetails("Getting Started", new ArrayList<>(Collections.singletonList(talkToKojo))); - allSteps.add(gettingStarted); - - PanelDetails redCog = new PanelDetails("Obtaining the red cog", new ArrayList<>(Arrays.asList(goToBasementForRed, - pickUpRedCog, goToGroundFloorWithRedCog))); - allSteps.add(redCog); - PanelDetails blueCog = new PanelDetails("Obtaining the blue cog", - new ArrayList<>(Arrays.asList(goToBasementForBlue, pushWall, pickUpBlueCog, goToFirstFloorWithBlueCog)), - noteAboutWater); - allSteps.add(blueCog); - PanelDetails blackCog = new PanelDetails("Obtaining the black cog", - new ArrayList<>(Arrays.asList(goToBasementForBlack, pickupBlackCog, goToBasementWithBlackCog)), - bucketOfWater); - allSteps.add(blackCog); - PanelDetails whiteCog = new PanelDetails("Obtaining the white cog", - new ArrayList<>(Arrays.asList(goToBasementForWhite, pickUpRatPoison, pullFirstLever, - ratPoisonFood, westernGate, pickUpWhiteCog, goToSecondFloorWithWhiteCog))); - allSteps.add(whiteCog); - PanelDetails finishingOff = new PanelDetails("Finishing off", - new ArrayList<>(Collections.singletonList(goFinishQuest))); - allSteps.add(finishingOff); - - return allSteps; + var sections = new ArrayList(); + + sections.add(new PanelDetails("Getting Started", List.of( + talkToKojo, + syncStep + ))); + + sections.add(new PanelDetails("Obtaining the red cog", List.of( + goToBasementForRed, + pickUpRedCog, + goToGroundFloorWithRedCog + ))); + + sections.add(new PanelDetails("Obtaining the blue cog", List.of( + getBucket, + goToBasementForBlue, + pushWall, + pickUpBlueCog, + goToFirstFloorWithBlueCog + ), List.of( + noteAboutWater + ))); + + sections.add(new PanelDetails("Obtaining the black cog", List.of( + goToBasementForBlack, + pickupBlackCog, + goToBasementWithBlackCog + ), List.of( + bucketOfWater + ))); + + sections.add(new PanelDetails("Obtaining the white cog", List.of( + goToBasementForWhite, + pickUpRatPoison, + pullFirstLever, + ratPoisonFood, + westernGate, + pickUpWhiteCog, + goToSecondFloorWithWhiteCog + ))); + + sections.add(new PanelDetails("Finishing off", List.of( + goFinishQuest + ))); + + return sections; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/coldwar/ColdWar.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/coldwar/ColdWar.java index e3ad3fe090a..ce54b25dd75 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/coldwar/ColdWar.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/coldwar/ColdWar.java @@ -240,13 +240,13 @@ protected void setupZones() public void setupConditions() { isOnIceberg = new ZoneRequirement(onIceberg); - birdHideBuilt = new VarbitRequirement(3294, 1); + birdHideBuilt = new VarbitRequirement(VarbitID.PENG_MULTI_HIDE, 1); tableNearby = new Conditions(LogicType.OR, new ObjectCondition(ObjectID.POH_CLOCKMAKING_3), new ObjectCondition(ObjectID.POH_CLOCKMAKING_4)); - isPenguin = new VarbitRequirement(3306, 1); + isPenguin = new VarbitRequirement(VarbitID.PENG_TRANSMOG, 1); isInPenguinPen = new ZoneRequirement(inPenguinPen, inPenguinPen2); - isEmoting = new VarbitRequirement(3308, 1); + isEmoting = new VarbitRequirement(VarbitID.PENG_DOING_GREETING, 1); isAtZoo = new ZoneRequirement(atZoo); isAtLumbridgeSheepFarm = new ZoneRequirement(atLumbridgeSheepFarm); isInAgilityStart = new ZoneRequirement(inAgilityStart); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/cooksassistant/CooksAssistant.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/cooksassistant/CooksAssistant.java index 005813cdf04..30c33d4aabf 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/cooksassistant/CooksAssistant.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/cooksassistant/CooksAssistant.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, Trevor + * Copyright (c) 2025, pajlada * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,112 +28,128 @@ import net.runelite.client.plugins.microbot.questhelper.collections.ItemCollections; import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; -import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.nor; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.or; +import net.runelite.client.plugins.microbot.questhelper.requirements.npc.DialogRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; import net.runelite.client.plugins.microbot.questhelper.rewards.UnlockReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ItemStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.widget.WidgetHighlight; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; - -import java.util.*; +import net.runelite.api.gameval.VarbitID; public class CooksAssistant extends BasicQuestHelper { - //Items Required - ItemRequirement egg, milk, flour, bucket, pot, coins, grain; + // Required items + ItemRequirement egg; + ItemRequirement milk; + ItemRequirement flour; + ItemRequirement bucket; + ItemRequirement pot; + ItemRequirement coins; + ItemRequirement grain; - Requirement controlsUsed; + // Zones + Zone millSecond; + Zone millThird; - QuestStep getEgg, getWheat, milkCow, climbLadderOne, climbLadderTwoUp, climbLadderTwoDown, climbLadderThree, fillHopper, - operateControls, collectFlour, finishQuest; + // Miscellaneous requirements + DialogRequirement hasTurnedInMilk; + DialogRequirement hasTurnedInFlour; + DialogRequirement hasTurnedInEgg; + DialogRequirement hasTurnedInEverything; - NpcStep getPot, getBucket; + VarbitRequirement controlsUsed; - Zone millSecond, millThird; + ZoneRequirement inMillSecond; + ZoneRequirement inMillThird; - Requirement inMillSecond, inMillThird; + // Steps + NpcStep getBucket; + NpcStep getPot; + ObjectStep milkCow; + ItemStep getEgg; + ObjectStep getWheat; + ObjectStep climbLadderOne; + ObjectStep fillHopper; + ObjectStep operateControls; + ObjectStep climbLadderThree; + ObjectStep collectFlour; + ObjectStep climbLadderTwoUp; + ObjectStep climbLadderTwoDown; + NpcStep finishQuest; @Override - public Map loadSteps() + protected void setupZones() { - initializeRequirements(); - setupConditions(); - setupSteps(); - - Map steps = new HashMap<>(); - ConditionalStep doQuest = new ConditionalStep(this, getBucket); - doQuest.addStep(new Conditions(milk, flour, egg), finishQuest); - doQuest.addStep(new Conditions(milk, pot, egg, controlsUsed, inMillThird), climbLadderThree); - doQuest.addStep(new Conditions(milk, pot, egg, controlsUsed, inMillSecond), climbLadderTwoDown); - doQuest.addStep(new Conditions(milk, pot, egg, controlsUsed), collectFlour); - doQuest.addStep(new Conditions(milk, pot, egg, grain, inMillThird), fillHopper); - doQuest.addStep(new Conditions(milk, pot, egg, inMillThird), operateControls); - doQuest.addStep(new Conditions(milk, pot, egg, grain, inMillSecond), climbLadderTwoUp); - doQuest.addStep(new Conditions(milk, pot, egg, grain), climbLadderOne); - doQuest.addStep(new Conditions(milk, pot, egg), getWheat); - doQuest.addStep(new Conditions(milk, pot), getEgg); - doQuest.addStep(new Conditions(bucket, pot), milkCow); - doQuest.addStep(bucket, getPot); - - steps.put(0, doQuest); - steps.put(1, doQuest); - - return steps; + millSecond = new Zone(new WorldPoint(3162, 3311, 1), new WorldPoint(3171, 3302, 1)); + millThird = new Zone(new WorldPoint(3162, 3311, 2), new WorldPoint(3171, 3302, 2)); } @Override protected void setupRequirements() { + hasTurnedInMilk = new DialogRequirement("Here's a bucket of milk."); + hasTurnedInFlour = new DialogRequirement("Here's a pot of flour."); + hasTurnedInEgg = new DialogRequirement("Here's a fresh egg."); + hasTurnedInEverything = new DialogRequirement("You've brought me everything I need! I am saved!"); + egg = new ItemRequirement("Egg", ItemID.EGG); + egg.setConditionToHide(or(hasTurnedInEgg, hasTurnedInEverything)); egg.canBeObtainedDuringQuest(); milk = new ItemRequirement("Bucket of milk", ItemID.BUCKET_MILK); + milk.setConditionToHide(or(hasTurnedInMilk, hasTurnedInEverything)); milk.canBeObtainedDuringQuest(); flour = new ItemRequirement("Pot of flour", ItemID.POT_FLOUR); + flour.setConditionToHide(or(hasTurnedInFlour, hasTurnedInEverything)); flour.canBeObtainedDuringQuest(); bucket = new ItemRequirement("Bucket", ItemID.BUCKET_EMPTY); pot = new ItemRequirement("Pot", ItemID.POT_EMPTY); - coins = new ItemRequirement("Coins", ItemCollections.COINS); + coins = new ItemRequirement("Coins", ItemCollections.COINS, 3); coins.setTooltip("Necessary if you do not have a pot / bucket"); grain = new ItemRequirement("Grain", ItemID.GRAIN); - controlsUsed = new VarbitRequirement(4920, 1); - } + controlsUsed = new VarbitRequirement(VarbitID.MILL_FLOUR, 1); - @Override - protected void setupZones() - { - millSecond = new Zone(new WorldPoint(3162, 3311, 1), new WorldPoint(3171, 3302, 1)); - millThird = new Zone(new WorldPoint(3162, 3311, 2), new WorldPoint(3171, 3302, 2)); - } - - public void setupConditions() - { inMillSecond = new ZoneRequirement(millSecond); inMillThird = new ZoneRequirement(millThird); } public void setupSteps() { + var lumbridgeShopkeepers = new int[]{ + NpcID.GENERALSHOPKEEPER1, + NpcID.GENERALASSISTANT1, + }; + + getBucket = new NpcStep(this, lumbridgeShopkeepers, new WorldPoint(3212, 3246, 0), + "Purchase a bucket from the Lumbridge General Store.", coins.quantity(2)); + getBucket.addWidgetHighlight(WidgetHighlight.createShopItemHighlight(ItemID.BUCKET_EMPTY)); + + getPot = new NpcStep(this, lumbridgeShopkeepers, new WorldPoint(3212, 3246, 0), + "Purchase a pot from the Lumbridge General Store.", coins.quantity(1)); + getPot.addWidgetHighlight(WidgetHighlight.createShopItemHighlight(ItemID.POT_EMPTY)); + getEgg = new ItemStep(this, new WorldPoint(3177, 3296, 0), "Grab an egg from the farm north of Lumbridge.", egg); - getBucket = new NpcStep(this, NpcID.GENERALSHOPKEEPER1, new WorldPoint(3212, 3246, 0), - "Purchase a bucket from the Lumbridge General Store.", coins.quantity(3)); - getBucket.addWidgetHighlightWithItemIdRequirement(300, 16, ItemID.BUCKET_EMPTY, true); - getBucket.addAlternateNpcs(NpcID.GENERALASSISTANT1); - getPot = new NpcStep(this, NpcID.GENERALSHOPKEEPER1, new WorldPoint(3212, 3246, 0), - "Purchase a pot from the Lumbridge General Store.", coins.quantity(3)); - getPot.addAlternateNpcs(NpcID.GENERALASSISTANT1); - milkCow = new ObjectStep(this, ObjectID.FAT_COW, new WorldPoint(3254, 3272, 0), - "Milk the cow north-east of Lumbridge.", bucket); getWheat = new ObjectStep(this, ObjectID.FAI_VARROCK_WHEAT_CORNER, new WorldPoint(3161, 3292, 0), "Pick some wheat north of Lumbridge."); climbLadderOne = new ObjectStep(this, ObjectID.QIP_COOK_LADDER, new WorldPoint(3164, 3307, 0), @@ -155,26 +172,67 @@ public void setupSteps() collectFlour = new ObjectStep(this, ObjectID.MILLBASE_FLOUR, new WorldPoint(3166, 3306, 0), "Collect the flour in the bin.", pot.highlighted()); collectFlour.addIcon(ItemID.POT_EMPTY); - finishQuest = new NpcStep(this, NpcID.POH_SERVANT_COOK_WOMAN, new WorldPoint(3206, 3214, 0), + + milkCow = new ObjectStep(this, ObjectID.FAT_COW, new WorldPoint(3172, 3317, 0), + "Milk the dairy cow north of Lumbridge.", bucket); + + finishQuest = new NpcStep(this, NpcID.COOK, new WorldPoint(3206, 3214, 0), "Give the Cook in Lumbridge Castle's kitchen the required items to finish the quest.", egg, milk, flour); + finishQuest.addAlternateNpcs(NpcID.POH_SERVANT_COOK_WOMAN); finishQuest.addDialogSteps("What's wrong?", "Can I help?", "Yes."); } + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + + var getFlour = new ConditionalStep(this, getPot); + getFlour.addStep(and(pot, controlsUsed, inMillThird), climbLadderThree); + getFlour.addStep(and(pot, controlsUsed, inMillSecond), climbLadderTwoDown); + getFlour.addStep(and(pot, controlsUsed), collectFlour); + getFlour.addStep(and(pot, grain, inMillThird), fillHopper); + getFlour.addStep(and(pot, inMillThird), operateControls); + getFlour.addStep(and(pot, grain, inMillSecond), climbLadderTwoUp); + getFlour.addStep(and(pot, grain), climbLadderOne); + getFlour.addStep(and(pot), getWheat); + + var doQuest = new ConditionalStep(this, finishQuest); + doQuest.addStep(hasTurnedInEverything, finishQuest); + doQuest.addStep(nor(milk, bucket, hasTurnedInMilk), getBucket); + doQuest.addStep(nor(flour, pot, hasTurnedInFlour), getPot); + doQuest.addStep(nor(egg, hasTurnedInEgg), getEgg); + doQuest.addStep(nor(flour, hasTurnedInFlour), getFlour); + doQuest.addStep(nor(milk, hasTurnedInMilk), milkCow); + + steps.put(0, doQuest); + steps.put(1, doQuest); + + return steps; + } + + @Override public List getItemRequirements() { - ArrayList reqs = new ArrayList<>(); - reqs.add(egg); - reqs.add(flour); - reqs.add(milk); - return reqs; + return List.of( + egg, + flour, + milk + ); } @Override public List getItemRecommended() { - return Collections.singletonList(coins); + return List.of( + coins + ); } @Override @@ -186,26 +244,60 @@ public QuestPointReward getQuestPointReward() @Override public List getExperienceRewards() { - return Collections.singletonList(new ExperienceReward(Skill.COOKING, 300)); + return List.of( + new ExperienceReward(Skill.COOKING, 300) + ); } @Override public List getUnlockRewards() { - return Collections.singletonList(new UnlockReward("Permission to use The Cook's range.")); + return List.of( + new UnlockReward("Permission to use The Cook's range.") + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); - allSteps.add(new PanelDetails("Starting off", Arrays.asList(getBucket, getPot), coins.quantity(3))); - allSteps.add(new PanelDetails("Getting the Milk", Collections.singletonList(milkCow), bucket)); - allSteps.add(new PanelDetails("Getting the Egg", Collections.singletonList(getEgg))); - allSteps.add(new PanelDetails("Getting the Flour", Arrays.asList(getWheat, climbLadderOne, fillHopper, - operateControls, climbLadderThree, collectFlour), pot)); - allSteps.add(new PanelDetails("Finishing up", Collections.singletonList(finishQuest), egg, flour, milk)); - - return allSteps; + var steps = new ArrayList(); + + steps.add(new PanelDetails("Starting off", List.of( + getBucket, + getPot + ), List.of( + coins + ))); + + steps.add(new PanelDetails("Getting the Egg", List.of( + getEgg + ))); + + steps.add(new PanelDetails("Getting the Flour", List.of( + getWheat, + climbLadderOne, + fillHopper, + operateControls, + climbLadderThree, + collectFlour + ), List.of( + pot + ))); + + steps.add(new PanelDetails("Getting the Milk", List.of( + milkCow + ), List.of( + bucket + ))); + + steps.add(new PanelDetails("Finishing up", List.of( + finishQuest + ), List.of( + egg, + flour, + milk + ))); + + return steps; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/creatureoffenkenstrain/CreatureOfFenkenstrain.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/creatureoffenkenstrain/CreatureOfFenkenstrain.java index 7bdd85c071d..4fdea31910f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/creatureoffenkenstrain/CreatureOfFenkenstrain.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/creatureoffenkenstrain/CreatureOfFenkenstrain.java @@ -51,6 +51,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -198,15 +199,15 @@ public void setupConditions() inCanifisBar = new ZoneRequirement(barZone); inCastleFloor0 = new ZoneRequirement(castleZoneFloor0); inCastleFloor1 = new ZoneRequirement(castleZoneFloor1); - putStarOnGrave = new VarbitRequirement(192, 1); + putStarOnGrave = new VarbitRequirement(VarbitID.FENK_COFFIN, 1); hasMarbleAmulet = new Conditions(LogicType.OR, marbleAmulet, putStarOnGrave); hasObsidianAmulet = new Conditions(LogicType.OR, obsidianAmulet, putStarOnGrave); hasStarAmulet = new Conditions(LogicType.OR, starAmulet, putStarOnGrave); - followingGardenerForHead = new VarbitRequirement(185, 1); + followingGardenerForHead = new VarbitRequirement(VarbitID.FENK_GARDENER_DIRECTIONS, 1); hasDecapitatedHeadWithBrain = new Conditions(LogicType.OR, decapitatedHeadWithBrain, - new VarbitRequirement(189, 1) + new VarbitRequirement(VarbitID.FENK_HEAD, 1) ); inExperiementCave = new ZoneRequirement(experimentCave); @@ -214,29 +215,29 @@ public void setupConditions() hasCavernKey = new Conditions(LogicType.OR, cavernKey, - new VarbitRequirement(199, 1) + new VarbitRequirement(VarbitID.FENK_UNLOCKED_CAVERN, 1) ); keyNearby = new ItemOnTileRequirement(cavernKey); hasTorso = new Conditions(LogicType.OR, torso, - new VarbitRequirement(188, 1) + new VarbitRequirement(VarbitID.FENK_TORSO, 1) ); hasLegs = new Conditions(LogicType.OR, legs, - new VarbitRequirement(187, 1) + new VarbitRequirement(VarbitID.FENK_LEGS, 1) ); hasArm = new Conditions(LogicType.OR, arms, - new VarbitRequirement(186, 1) + new VarbitRequirement(VarbitID.FENK_ARMS, 1) ); // Needle given, 190 = 1 // Thread given, 191 0->5 - usedShedKey = new VarbitRequirement(200, 1); + usedShedKey = new VarbitRequirement(VarbitID.FENK_UNLOCKED_SHED, 1); inCastleTower = new ZoneRequirement(castleTower); - usedTowerKey = new VarbitRequirement(198, 1); + usedTowerKey = new VarbitRequirement(VarbitID.FENK_UNLOCKED_TOWER, 1); inMonsterTower = new ZoneRequirement(monsterTower); } @@ -271,7 +272,7 @@ public void setupSteps() "Go back to the ground floor."); talkToGardenerForHead = new NpcStep(this, NpcID.FENK_GARDENER, new WorldPoint(3548, 3562, 0), - "Talk to the Gardener Ghost.", ghostSpeakAmulet.equipped()); + "Talk to the Gardener Ghost while wearing your Ghostspeak amulet.", ghostSpeakAmulet.equipped()); talkToGardenerForHead.addDialogStep("What happened to your head?"); goToHeadGrave = new DigStep(this, new WorldPoint(3608, 3490, 0), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/darknessofhallowvale/DarknessOfHallowvale.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/darknessofhallowvale/DarknessOfHallowvale.java index afaed7485ed..da1e26a2e14 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/darknessofhallowvale/DarknessOfHallowvale.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/darknessofhallowvale/DarknessOfHallowvale.java @@ -268,12 +268,12 @@ public void setupConditions() inVanstromFight = new Conditions(onDrakanWalls, new InInstanceRequirement()); inLab = new ZoneRequirement(lab); - pushedBoat = new VarbitRequirement(2587, 1); - knockedDownBoard = new VarbitRequirement(2589, 1); + pushedBoat = new VarbitRequirement(VarbitID.MYQ3_SEA_BOAT_VISIBLE, 1); + knockedDownBoard = new VarbitRequirement(VarbitID.MYQ3_WALL_FLOORBOARDS_DOWN, 1); - pathDoorOpen = new VarbitRequirement(2578, 1); + pathDoorOpen = new VarbitRequirement(VarbitID.MYQ3_AGIL_GHETTO_LOCKED_DOOR, 1); - fixedLadder = new VarbitRequirement(2598, 2); + fixedLadder = new VarbitRequirement(VarbitID.MYQ3_AGIL_LADDERTOP_WALL, 2); wallPressed = new VarbitRequirement(VarbitID.MYQ3_HIDEOUT_TRAPDOOR, 1, Operation.GREATER_EQUAL); searchedRockySurface = new Conditions(true, new WidgetTextRequirement(229, 1, "a mechanical click.")); @@ -282,11 +282,11 @@ public void setupConditions() cutPortrait = new VarbitRequirement(VarbitID.MYQ3_STATUE_KEY_PAINTING_STATE, 1, Operation.GREATER_EQUAL); - handedInSketches = new VarbitRequirement(2575, 1); - tapestryCut = new VarbitRequirement(2594, 1); - keyPlaced = new VarbitRequirement(2596, 1); + handedInSketches = new VarbitRequirement(VarbitID.MYQ3_SKETCHES_GIVEN, 1); + tapestryCut = new VarbitRequirement(VarbitID.MYQ3_TAPESTRY_STATE, 1); + keyPlaced = new VarbitRequirement(VarbitID.MYQ3_STATUE_STATE, 1); - searchedRuneCase = new VarbitRequirement(2584, 1); + searchedRuneCase = new VarbitRequirement(VarbitID.MYQ3_RUNECASE_SEARCHED, 1); hasTeleGrabRunesOrSearchedCase = new Conditions(LogicType.OR, searchedRuneCase, new ItemRequirements(lawRune, airRune)); // Repaired boat, 2585 = 1 diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deathontheisle/DeathOnTheIsle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deathontheisle/DeathOnTheIsle.java index 86efc717ba6..11d230e48c6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deathontheisle/DeathOnTheIsle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deathontheisle/DeathOnTheIsle.java @@ -307,11 +307,11 @@ protected void setupRequirements() drinkingFlask = new ItemRequirement("Drinking flask", ItemID.DOTI_FLASK); shippingContract = new ItemRequirement("Shipping contract", ItemID.DOTI_CONTRACT); - handedOverCluesToGuards = new VarbitRequirement(11233, 1); + handedOverCluesToGuards = new VarbitRequirement(VarbitID.DOTI_GIVEN_ITEMS, 1); /// Zones inButlerCostumeHouse = new ZoneRequirement(butlerCostumeHouse1, butlerCostumeHouse2, butlerCostumeHouse3, butlerCostumeHouse4); - inVilla = new VarbitRequirement(14283, 5); + inVilla = new VarbitRequirement(VarbitID.HOLDING_INVENTORY_LOCATION, 5); aroundVilla = new ZoneRequirement(villaOutsideTheatre1, villaOutsideTheatre2); outsideVillaByLooseRocks = new ZoneRequirement( villaPlatueOnTheWayToTheatre @@ -323,46 +323,46 @@ protected void setupRequirements() inTheatreCellar = new ZoneRequirement(theatreCellar); /// States - introducedYourselfToConstantinius = new VarbitRequirement(11214, 1); - introducedYourselfToCozyac = new VarbitRequirement(11212, 1); - introducedYourselfToPavo = new VarbitRequirement(11213, 1); - introducedYourselfToXocotla = new VarbitRequirement(11211, 1); - - investigatedJug = new VarbitRequirement(11218, 1); - investigatedSmallBoxInSouthRoom = new VarbitRequirement(11221, 1); - investigatedBrokenStoolInSouthRoom = new VarbitRequirement(11222, 1); - investigatedWineStorageInEastRoom = new VarbitRequirement(11220, 1); - investigatedBrokenPotteryInEastRoom = new VarbitRequirement(11219, 1); - investigatedLiviusInEastRoom = new VarbitRequirement(11223, 1); - - investigatedConstantinius = new VarbitRequirement(11227, 1); - investigatedCozyac = new VarbitRequirement(11225, 1); - investigatedPavo = new VarbitRequirement(11226, 1); - investigatedXocotla = new VarbitRequirement(11224, 1); - interrogatedPatziAndAdala = new VarbitRequirement(11234, 1); - - // pickpocketedAdala = new VarbitRequirement(11228, 1); - // pickpocketedCozyac = new VarbitRequirement(11216, 1); - // pickpocketedPavo = new VarbitRequirement(11217, 1); - // pickpocketedXocotla = new VarbitRequirement(11215, 1); - - inspectedWineLabels = new VarbitRequirement(11236, 1); - inspectedThreateningNote = new VarbitRequirement(11237, 1); - inspectedDrinkingFlask = new VarbitRequirement(11235, 1); - inspectedShippingContract = new VarbitRequirement(11238, 1); - - interrogatedConstantiniusAgain = new VarbitRequirement(11244, 1); - interrogatedXocotlaAgain = new VarbitRequirement(11245, 1); - interrogatedCozyacAgain = new VarbitRequirement(11243, 1); - interrogatedPavoAgain = new VarbitRequirement(11246, 1); - - talkedtoGuardsAtTheatre = new VarbitRequirement(11249, 1); - - searchedCrateNextToStairs = new VarbitRequirement(11251, 1); - searchedBookshelf = new VarbitRequirement(11250, 1); - searchedCostumeRack = new VarbitRequirement(11252, 1); - - trapSprung = new VarbitRequirement(11258, 2); + introducedYourselfToConstantinius = new VarbitRequirement(VarbitID.DOTI_MET_CONSTANTINIUS, 1); + introducedYourselfToCozyac = new VarbitRequirement(VarbitID.DOTI_MET_COZYAC, 1); + introducedYourselfToPavo = new VarbitRequirement(VarbitID.DOTI_MET_PAVO, 1); + introducedYourselfToXocotla = new VarbitRequirement(VarbitID.DOTI_MET_XOCOTLA, 1); + + investigatedJug = new VarbitRequirement(VarbitID.DOTI_CLUE1, 1); + investigatedSmallBoxInSouthRoom = new VarbitRequirement(VarbitID.DOTI_CLUE4, 1); + investigatedBrokenStoolInSouthRoom = new VarbitRequirement(VarbitID.DOTI_CLUE5, 1); + investigatedWineStorageInEastRoom = new VarbitRequirement(VarbitID.DOTI_CLUE3, 1); + investigatedBrokenPotteryInEastRoom = new VarbitRequirement(VarbitID.DOTI_CLUE2, 1); + investigatedLiviusInEastRoom = new VarbitRequirement(VarbitID.DOTI_BODYCHECK, 1); + + investigatedConstantinius = new VarbitRequirement(VarbitID.DOTI_INVESTIGATED_CONSTANTINIUS, 1); + investigatedCozyac = new VarbitRequirement(VarbitID.DOTI_INVESTIGATED_COZYAC, 1); + investigatedPavo = new VarbitRequirement(VarbitID.DOTI_INVESTIGATED_PAVO, 1); + investigatedXocotla = new VarbitRequirement(VarbitID.DOTI_INVESTIGATED_XOCOTLA, 1); + interrogatedPatziAndAdala = new VarbitRequirement(VarbitID.DOTI_INVESTIGATED_PATZI, 1); + + // pickpocketedAdala = new VarbitRequirement(VarbitID.DOTI_PICKPOCKET_ADALA, 1); + // pickpocketedCozyac = new VarbitRequirement(VarbitID.DOTI_PICKPOCKET_COZYAC, 1); + // pickpocketedPavo = new VarbitRequirement(VarbitID.DOTI_PICKPOCKET_PAVO, 1); + // pickpocketedXocotla = new VarbitRequirement(VarbitID.DOTI_PICKPOCKET_XOCOTLA, 1); + + inspectedWineLabels = new VarbitRequirement(VarbitID.DOTI_INVESTIGATED_LABELS, 1); + inspectedThreateningNote = new VarbitRequirement(VarbitID.DOTI_INVESTIGATED_LETTER, 1); + inspectedDrinkingFlask = new VarbitRequirement(VarbitID.DOTI_INVESTIGATED_FLASK, 1); + inspectedShippingContract = new VarbitRequirement(VarbitID.DOTI_INVESTIGATED_CONTRACT, 1); + + interrogatedConstantiniusAgain = new VarbitRequirement(VarbitID.DOTI_QUESTIONED_CONSTANTINIUS, 1); + interrogatedXocotlaAgain = new VarbitRequirement(VarbitID.DOTI_QUESTIONED_XOCOTLA, 1); + interrogatedCozyacAgain = new VarbitRequirement(VarbitID.DOTI_QUESTIONED_COZYAC, 1); + interrogatedPavoAgain = new VarbitRequirement(VarbitID.DOTI_QUESTIONED_PAVO, 1); + + talkedtoGuardsAtTheatre = new VarbitRequirement(VarbitID.DOTI_BACKSTAGE_INTRO, 1); + + searchedCrateNextToStairs = new VarbitRequirement(VarbitID.DOTI_POISON_CLUE, 1); + searchedBookshelf = new VarbitRequirement(VarbitID.DOTI_BOOKSHELF_CLUE, 1); + searchedCostumeRack = new VarbitRequirement(VarbitID.DOTI_CLOTHING_CLUE, 1); + + trapSprung = new VarbitRequirement(VarbitID.DOTI_FINAL_FIGHT, 2); trapFailed = new VarbitRequirement(VarbitID.DOTI_FINAL_FIGHT, 3, Operation.GREATER_EQUAL); naiatliDowned = new VarbitRequirement(VarbitID.DOTI_FINAL_FIGHT, 6, Operation.GREATER_EQUAL); } @@ -582,22 +582,22 @@ public void setupSteps() var talkToCostumerAboutActors = talkToCostumerAgain.copy(); talkToCostumerAboutActors.addDialogStep("What can you tell me about the actors?"); talkToCostumerAgain.addSubSteps(talkToCostumerAboutActors); - var talkedAboutActors = new VarbitRequirement(11253, 1); + var talkedAboutActors = new VarbitRequirement(VarbitID.DOTI_ACTORS_CHAT, 1); var talkToCostumerAboutPoison = talkToCostumerAgain.copy(); talkToCostumerAboutPoison.addDialogStep("What's the crate of poison for?"); talkToCostumerAgain.addSubSteps(talkToCostumerAboutPoison); - var talkedAboutPoison = new VarbitRequirement(11255, 1); + var talkedAboutPoison = new VarbitRequirement(VarbitID.DOTI_POISON_CHAT, 1); var talkToCostumerAboutStainedCostume = talkToCostumerAgain.copy(); talkToCostumerAboutStainedCostume.addDialogStep("It seems one of the costumes has a stain on it."); talkToCostumerAgain.addSubSteps(talkToCostumerAboutStainedCostume); - var talkedAboutStainedCostume = new VarbitRequirement(11256, 1); + var talkedAboutStainedCostume = new VarbitRequirement(VarbitID.DOTI_CLOTHING_CHAT, 1); var talkToCostumerAboutHiddenPassage = talkToCostumerAgain.copy(); talkToCostumerAboutHiddenPassage.addDialogStep("Did you know there was a hidden passage in here?"); talkToCostumerAgain.addSubSteps(talkToCostumerAboutHiddenPassage); - // var talkedAboutHiddenPassage = new VarbitRequirement(11254, 1); + // var talkedAboutHiddenPassage = new VarbitRequirement(VarbitID.DOTI_BOOKSHELF_CHAT, 1); investigateTheatreCellar = new ConditionalStep(this, talkToCostumerAboutHiddenPassage); investigateTheatreCellar.addStep(not(inVilla), returnToButlerAndHeadInside); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deathtothedorgeshuun/DeathToTheDorgeshuun.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deathtothedorgeshuun/DeathToTheDorgeshuun.java index ccbf0c639f3..5201ed0f257 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deathtothedorgeshuun/DeathToTheDorgeshuun.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deathtothedorgeshuun/DeathToTheDorgeshuun.java @@ -51,6 +51,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.gameval.VarPlayerID; import java.util.*; @@ -252,33 +253,33 @@ public void setupConditions() inMill = new ZoneRequirement(mill1, mill2); - talkedToDuke = new VarbitRequirement(2259, 1); - talkedToAereck = new VarbitRequirement(2260, 1); - talkedToGoblins = new VarbitRequirement(2261, 1); - talkedToWoman = new VarbitRequirement(2262, 1); - goneOutside = new VarbitRequirement(2263, 1); + talkedToDuke = new VarbitRequirement(VarbitID.DTTD_TOUR_DUKE, 1); + talkedToAereck = new VarbitRequirement(VarbitID.DTTD_TOUR_PRIEST, 1); + talkedToGoblins = new VarbitRequirement(VarbitID.DTTD_TOUR_GOBLINS, 1); + talkedToWoman = new VarbitRequirement(VarbitID.DTTD_TOUR_CITIZENS, 1); + goneOutside = new VarbitRequirement(VarbitID.DTTD_TOUR_SUN, 1); zanikIsFollowing = new VarplayerRequirement(VarPlayerID.FOLLOWER_NPC, List.of(NpcID.DTTD_ZANIK_FOLLOWER, NpcID.DTTD_ZANIK_FOLLOWER_HAM), 16); - talkedToShopkeeper = new VarbitRequirement(2265, 1); - heardSpeaker = new VarbitRequirement(2268, 1); - talkedToJohn = new VarbitRequirement(2269, 1); + talkedToShopkeeper = new VarbitRequirement(VarbitID.DTTD_TOUR_SHOP, 1); + heardSpeaker = new VarbitRequirement(VarbitID.DTTD_TOUR_HAM_DEACON, 1); + talkedToJohn = new VarbitRequirement(VarbitID.DTTD_TOUR_HAM_JOHANHUS, 1); - killedGuard1 = new VarbitRequirement(2275, 1); - killedGuard2 = new VarbitRequirement(2277, 1); - killedGuard3 = new VarbitRequirement(2278, 1); - killedGuard4 = new VarbitRequirement(2280, 1); - killedGuard5 = new VarbitRequirement(2282, 1); + killedGuard1 = new VarbitRequirement(VarbitID.DTTD_GUARD_1_DEAD, 1); + killedGuard2 = new VarbitRequirement(VarbitID.DTTD_GUARD_2_DEAD, 1); + killedGuard3 = new VarbitRequirement(VarbitID.DTTD_GUARD_3_DEAD, 1); + killedGuard4 = new VarbitRequirement(VarbitID.DTTD_GUARD_4_DEAD, 1); + killedGuard5 = new VarbitRequirement(VarbitID.DTTD_GUARD_5_DEAD, 1); isDisguisedZanikFollowing = new NpcInteractingRequirement(NpcID.DTTD_ZANIK_FOLLOWER_HAM); zanikWaitingFor4 = new Conditions(new Conditions(LogicType.NOR, isDisguisedZanikFollowing), new NpcCondition(NpcID.DTTD_ZANIK_FOLLOWER_HAM, new Zone(new WorldPoint(2575, 5195, 0), new WorldPoint(2576, 5195, 0)))); zanikWaitingFor5 = new Conditions(new Conditions(LogicType.NOR, isDisguisedZanikFollowing), new NpcCondition(NpcID.DTTD_ZANIK_FOLLOWER_HAM, new Zone(new WorldPoint(2577, 5199, 0), new WorldPoint(2577, 5200, 0)))); - zanikPickedUp = new VarbitRequirement(2271, 0); + zanikPickedUp = new VarbitRequirement(VarbitID.DTTD_ZANIK_CORPSE, 0); - ropeAddedToHole = new VarbitRequirement(279, 1); - minedRocks = new VarbitRequirement(538, 1); + ropeAddedToHole = new VarbitRequirement(VarbitID.SWAMP_CAVES_ROPED_ENTRANCE, 1); + minedRocks = new VarbitRequirement(VarbitID.LOST_TRIBE_HOLE_2_DUG, 1); - killedGuards = new VarbitRequirement(2283, 3); + killedGuards = new VarbitRequirement(VarbitID.DTTD_MILL_GUARDS_DEAD, 3); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/defenderofvarrock/DefenderOfVarrock.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/defenderofvarrock/DefenderOfVarrock.java index 646a2e11595..d68ef380415 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/defenderofvarrock/DefenderOfVarrock.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/defenderofvarrock/DefenderOfVarrock.java @@ -35,7 +35,6 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.item.TeleportItemRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.player.SkillRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.quest.QuestRequirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.util.Operation; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarplayerRequirement; @@ -93,13 +92,13 @@ public Map loadSteps() steps.put(2, talkToElias); ConditionalStep searchWithElias = new ConditionalStep(this, inspectTrapdoor); - searchWithElias.addStep(LogicHelper.nor(inspectedPlant1), inspectPlant); - searchWithElias.addStep(LogicHelper.nor(inspectedRock1), inspectRock); - searchWithElias.addStep(LogicHelper.nor(inspectedPlant2), inspectPlant2); - searchWithElias.addStep(LogicHelper.nor(inspectedBush1), inspectBush1); - searchWithElias.addStep(LogicHelper.nor(inspectedBush2), inspectBush2); - searchWithElias.addStep(LogicHelper.nor(inspectedBush3), inspectBush3); - searchWithElias.addStep(LogicHelper.nor(inspectedTrapdoor), inspectTrapdoor); + searchWithElias.addStep(nor(inspectedPlant1), inspectPlant); + searchWithElias.addStep(nor(inspectedRock1), inspectRock); + searchWithElias.addStep(nor(inspectedPlant2), inspectPlant2); + searchWithElias.addStep(nor(inspectedBush1), inspectBush1); + searchWithElias.addStep(nor(inspectedBush2), inspectBush2); + searchWithElias.addStep(nor(inspectedBush3), inspectBush3); + searchWithElias.addStep(nor(inspectedTrapdoor), inspectTrapdoor); ConditionalStep findBase = new ConditionalStep(this, talkToElias); findBase.addStep(eliasFollowing, searchWithElias); @@ -186,22 +185,22 @@ public Map loadSteps() // 9667 = page of census ConditionalStep talkToCandidates = new ConditionalStep(this, talkToHalen); - talkToCandidates.addStep(and(LogicHelper.nor(talkedToRoald), inVarrockInvasion), talkToRoald); - talkToCandidates.addStep(LogicHelper.nor(talkedToRoald), talkToRoaldOutsideInstance); + talkToCandidates.addStep(and(nor(talkedToRoald), inVarrockInvasion), talkToRoald); + talkToCandidates.addStep(nor(talkedToRoald), talkToRoaldOutsideInstance); - talkToCandidates.addStep(and(LogicHelper.nor(talkedToAeonisig), inVarrockInvasion), talkToAeonisig); - talkToCandidates.addStep(LogicHelper.nor(talkedToAeonisig), talkToAeonisigOutsideInstance); + talkToCandidates.addStep(and(nor(talkedToAeonisig), inVarrockInvasion), talkToAeonisig); + talkToCandidates.addStep(nor(talkedToAeonisig), talkToAeonisigOutsideInstance); - talkToCandidates.addStep(and(LogicHelper.nor(talkedToPrysin), inVarrockInvasion), talkToPrysin); - talkToCandidates.addStep(LogicHelper.nor(talkedToPrysin), talkToPrysinOutsideInstance); + talkToCandidates.addStep(and(nor(talkedToPrysin), inVarrockInvasion), talkToPrysin); + talkToCandidates.addStep(nor(talkedToPrysin), talkToPrysinOutsideInstance); - talkToCandidates.addStep(and(LogicHelper.nor(talkedToRomeo), inVarrockInvasion), talkToRomeoFromInstance); - talkToCandidates.addStep(LogicHelper.nor(talkedToRomeo), talkToRomeo); + talkToCandidates.addStep(and(nor(talkedToRomeo), inVarrockInvasion), talkToRomeoFromInstance); + talkToCandidates.addStep(nor(talkedToRomeo), talkToRomeo); - talkToCandidates.addStep(and(LogicHelper.nor(talkedToHorvik), inVarrockInvasion), talkToHorvikFromInstance); - talkToCandidates.addStep(LogicHelper.nor(talkedToHorvik), talkToHorvik); + talkToCandidates.addStep(and(nor(talkedToHorvik), inVarrockInvasion), talkToHorvikFromInstance); + talkToCandidates.addStep(nor(talkedToHorvik), talkToHorvik); - talkToCandidates.addStep(and(LogicHelper.nor(talkedToHalen), inVarrockInvasion), talkToHalenFromInstance); + talkToCandidates.addStep(and(nor(talkedToHalen), inVarrockInvasion), talkToHalenFromInstance); steps.put(46, talkToCandidates); ConditionalStep goTalkToDim = new ConditionalStep(this, talkToDimintheis); @@ -261,13 +260,13 @@ public void setupConditions() // 9655 4->6 // 9659 0->1 - inspectedPlant1 = new VarbitRequirement(9659, 1); - inspectedRock1 = new VarbitRequirement(9660, 1); - inspectedPlant2 = new VarbitRequirement(9661, 1); - inspectedBush1 = new VarbitRequirement(9662, 1); - inspectedBush2 = new VarbitRequirement(9663, 1); - inspectedBush3 = new VarbitRequirement(9664, 1); - inspectedTrapdoor = new VarbitRequirement(9665, 1); + inspectedPlant1 = new VarbitRequirement(VarbitID.DOV_HUNTING_TRAIL_1, 1); + inspectedRock1 = new VarbitRequirement(VarbitID.DOV_HUNTING_TRAIL_2, 1); + inspectedPlant2 = new VarbitRequirement(VarbitID.DOV_HUNTING_TRAIL_3, 1); + inspectedBush1 = new VarbitRequirement(VarbitID.DOV_HUNTING_TRAIL_4, 1); + inspectedBush2 = new VarbitRequirement(VarbitID.DOV_HUNTING_TRAIL_5, 1); + inspectedBush3 = new VarbitRequirement(VarbitID.DOV_HUNTING_TRAIL_6, 1); + inspectedTrapdoor = new VarbitRequirement(VarbitID.SETTINGS_DISABLE_TOOLTIP_IN_INTERFACE, 1); inDungeon = new ZoneRequirement(new Zone(14151)); redMistNearby = new ObjectCondition(ObjectID.DOV_RED_MIST); @@ -279,13 +278,13 @@ public void setupConditions() inCastleF1Invasion = new ZoneRequirement(castleF1Invasion); inCastleF2Invasion = new ZoneRequirement(castleF2Invasion); - talkedToRoald = new VarbitRequirement(9669, 1); - talkedToAeonisig = new VarbitRequirement(9670, 1); - talkedToPrysin = new VarbitRequirement(9671, 1); - talkedToHorvik = new VarbitRequirement(9672, 1); - talkedToRomeo = new VarbitRequirement(9673, 1); + talkedToRoald = new VarbitRequirement(VarbitID.DOV_SHIELD_ROALD, 1); + talkedToAeonisig = new VarbitRequirement(VarbitID.DOV_SHIELD_AEONISIG, 1); + talkedToPrysin = new VarbitRequirement(VarbitID.DOV_SHIELD_PRYSIN, 1); + talkedToHorvik = new VarbitRequirement(VarbitID.DOV_SHIELD_HORVIK, 1); + talkedToRomeo = new VarbitRequirement(VarbitID.DOV_SHIELD_ROMEO, 1); // NOTE: Missing 74/75? - talkedToHalen = new VarbitRequirement(9676, 1); + talkedToHalen = new VarbitRequirement(VarbitID.DOV_SHIELD_HAIG, 1); givenShield = new VarbitRequirement(VarbitID.DOV, 50, Operation.GREATER_EQUAL); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/demonslayer/DemonSlayer.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/demonslayer/DemonSlayer.java index aa68bec0a35..3cb2d378ff2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/demonslayer/DemonSlayer.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/demonslayer/DemonSlayer.java @@ -43,6 +43,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -148,11 +149,11 @@ public void setupConditions() inVarrockSewer = new ZoneRequirement(varrockSewer); inTowerFloor1 = new ZoneRequirement(towerFloor1); // 2568 going to 2 means you've taken the key, thus the key won't be there to be picked up should the key be deleted - hasPouredWaterIntoDrain = new VarbitRequirement(2568, 1); - obtainedSilverlight = new VarbitRequirement(2567, 1); + hasPouredWaterIntoDrain = new VarbitRequirement(VarbitID.DELRITH_DRAIN_KEY, 1); + obtainedSilverlight = new VarbitRequirement(VarbitID.DELRITH_SILVERLIGHT_CASE, 1); delrithNearby = new NpcCondition(NpcID.DELRITH); delrithWeakenedNearby = new NpcCondition(NpcID.DELRITH_WEAKENED); - inInstance = new VarbitRequirement(2569, 1); + inInstance = new VarbitRequirement(VarbitID.DELRITH_SEEN_SUMMONING_CUTSCENE, 1); } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasure/DesertTreasure.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasure/DesertTreasure.java index 32901db71fe..6bf30876cfc 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasure/DesertTreasure.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasure/DesertTreasure.java @@ -202,11 +202,11 @@ protected void setupRequirements() { coins650 = new ItemRequirement("Coins", ItemCollections.COINS, 650); magicLogs12 = new ItemRequirement("Magic logs (can be noted)", ItemID.MAGIC_LOGS, 12); - magicLogs12.addAlternates(NullItemID.NULL_1514); + magicLogs12.addAlternates(ItemID.Cert.MAGIC_LOGS); steelBars6 = new ItemRequirement("Steel bar (can be noted)", ItemID.STEEL_BAR, 6); - steelBars6.addAlternates(NullItemID.NULL_2354); + steelBars6.addAlternates(ItemID.Cert.STEEL_BAR); moltenGlass6 = new ItemRequirement("Molten glass (can be noted)", ItemID.MOLTEN_GLASS, 6); - moltenGlass6.addAlternates(NullItemID.NULL_1776); + moltenGlass6.addAlternates(ItemID.Cert.MOLTEN_GLASS); ashes = new ItemRequirement("Ashes", ItemID.ASHES); charcoal = new ItemRequirement("Charcoal", ItemID.CHARCOAL); bloodRune = new ItemRequirement("Blood rune", ItemID.BLOODRUNE); @@ -344,22 +344,22 @@ protected void setupZones() public void setupConditions() { // Given all items, 392 = 1; - killedDamis = new VarbitRequirement(383, 5); + killedDamis = new VarbitRequirement(VarbitID.FD_SHADOWWARRIOR_QUEST, 5); hadSmokeDiamond = new Conditions(true, smokeDiamond); gotIceDiamond = new Conditions(true, iceDiamond); - gotBloodDiamond = new VarbitRequirement(373, 4); + gotBloodDiamond = new VarbitRequirement(VarbitID.FDVW_SUBQUEST, 4); inSmokeDungeon = new ZoneRequirement(smokeDungeon); inFareedRoom = new ZoneRequirement(fareedRoom); - litTorch1 = new VarbitRequirement(360, 1); - litTorch2 = new VarbitRequirement(361, 1); - litTorch3 = new VarbitRequirement(363, 1); - litTorch4 = new VarbitRequirement(362, 1); - unlockedFareedDoor = new VarbitRequirement(386, 1); - killedFareed = new VarbitRequirement(376, 1); - talkedToRasolo = new VarbitRequirement(383, 2); + litTorch1 = new VarbitRequirement(VarbitID.FD_TORCH_COUNT1, 1); + litTorch2 = new VarbitRequirement(VarbitID.FD_TORCH_COUNT2, 1); + litTorch3 = new VarbitRequirement(VarbitID.FD_TORCH_COUNT4, 1); + litTorch4 = new VarbitRequirement(VarbitID.FD_TORCH_COUNT3, 1); + unlockedFareedDoor = new VarbitRequirement(VarbitID.FD_FIREWARGATE, 1); + killedFareed = new VarbitRequirement(VarbitID.FD_KILLED_FIREWARRIOR, 1); + talkedToRasolo = new VarbitRequirement(VarbitID.FD_SHADOWWARRIOR_QUEST, 2); gotRing = new VarbitRequirement(VarbitID.FD_SHADOWWARRIOR_QUEST, 3, Operation.GREATER_EQUAL); - unlockedCrossChest = new VarbitRequirement(384, 1); + unlockedCrossChest = new VarbitRequirement(VarbitID.FD_BANDITCHEST_DISARMED, 1); inShadowDungeon = new ZoneRequirement(shadowDungeon); @@ -367,35 +367,35 @@ public void setupConditions() damis2Nearby = new NpcInteractingRequirement(NpcID.FD_DAMIS_TOUGHER); // 385 0->1, in Damis spawn area? - talkedToMalak = new VarbitRequirement(373, 1); - askedAboutKillingDessous = new VarbitRequirement(373, 2); + talkedToMalak = new VarbitRequirement(VarbitID.FDVW_SUBQUEST, 1); + askedAboutKillingDessous = new VarbitRequirement(VarbitID.FDVW_SUBQUEST, 2); inDraynorSewer = new ZoneRequirement(draynorSewer); dessousNearby = new NpcCondition(NpcID.BLOODDIAMOND_VAMPIREWARRIOR); - killedDessous = new VarbitRequirement(373, 3); + killedDessous = new VarbitRequirement(VarbitID.FDVW_SUBQUEST, 3); - gaveCake = new VarbitRequirement(382, 1); + gaveCake = new VarbitRequirement(VarbitID.FD_ICEWARRIOR_SUBQUEST, 1); talkedToTrollChild = new VarbitRequirement(VarbitID.FD_ICEWARRIOR_SUBQUEST, 2, Operation.GREATER_EQUAL); // Killed kamil also results in 377 0->1 killedKamil = new VarbitRequirement(VarbitID.FD_ICEWARRIOR_SUBQUEST, 3, Operation.GREATER_EQUAL); - freedTrolls = new VarbitRequirement(382, 4); - gotIceDiamond = new VarbitRequirement(382, 5); + freedTrolls = new VarbitRequirement(VarbitID.FD_ICEWARRIOR_SUBQUEST, 4); + gotIceDiamond = new VarbitRequirement(VarbitID.FD_ICEWARRIOR_SUBQUEST, 5); - killedTrolls = new VarbitRequirement(378, 5); + killedTrolls = new VarbitRequirement(VarbitID.FD_ICEWARRIOR_TROLLSKILLED, 5); inTrollArea = new ZoneRequirement(trollArea); inPath = new ZoneRequirement(path1, path2); onIcePath = new ZoneRequirement(icePath); onIceBridge = new ZoneRequirement(iceBridge); - smashedIce1 = new VarbitRequirement(380, 1); + smashedIce1 = new VarbitRequirement(VarbitID.FD_ICEWARRIOR_DADFREE, 1); - placedSmoke = new VarbitRequirement(387, 1); - placedShadow = new VarbitRequirement(388, 1); - placedIce = new VarbitRequirement(389, 1); - placedBlood = new VarbitRequirement(390, 1); + placedSmoke = new VarbitRequirement(VarbitID.FD_COLUMN_FIRE, 1); + placedShadow = new VarbitRequirement(VarbitID.FD_COLUMN_SHADOW, 1); + placedIce = new VarbitRequirement(VarbitID.FD_COLUMN_ICE, 1); + placedBlood = new VarbitRequirement(VarbitID.FD_COLUMN_BLOOD, 1); inFloor1 = new ZoneRequirement(floor1); inFloor2 = new ZoneRequirement(floor2); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/DesertTreasureII.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/DesertTreasureII.java index 078746c6a70..621262fca34 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/DesertTreasureII.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/DesertTreasureII.java @@ -427,28 +427,28 @@ public void setupConditions() inGolemRoom = new ZoneRequirement(golemRoom); inFinalRoom = new ZoneRequirement(finalRoom); - inspectedPlaque = new VarbitRequirement(15105, 1); - inspectedStatueNE = new VarbitRequirement(15106, 1); - inspectedStatueSE = new VarbitRequirement(15107, 1); - inspectedStatueSW = new VarbitRequirement(15108, 1); - inspectedStatueNW = new VarbitRequirement(15109, 1); + inspectedPlaque = new VarbitRequirement(VarbitID.DT2_VAULT_PLAQUE, 1); + inspectedStatueNE = new VarbitRequirement(VarbitID.DT2_VAULT_STATUE_VARDORVIS, 1); + inspectedStatueSE = new VarbitRequirement(VarbitID.DT2_VAULT_STATUE_PERSERIYA, 1); + inspectedStatueSW = new VarbitRequirement(VarbitID.DT2_VAULT_STATUE_SUCELLUS, 1); + inspectedStatueNW = new VarbitRequirement(VarbitID.DT2_VAULT_STATUE_WHISPERER, 1); // 12139 0->1 (cutscene specific ID) // VarPlayer 3575 3840 -> 7936 inspectedGolem = new VarbitRequirement(QuestVarbits.QUEST_DESERT_TREASURE_II.getId(), 30, Operation.GREATER_EQUAL); // TODO: FIX CHECK FOR INSPECTED ALTAR, THOUGHT IT WAS 15111 BUT IT WASN'T - inspectedAltar = new VarbitRequirement(15109, 1); + inspectedAltar = new VarbitRequirement(VarbitID.DT2_VAULT_STATUE_WHISPERER, 1); // CAST BLOOD BARRAGE // 15116 0->4 // 15119 0->1 - smokeBeenCast = new VarbitRequirement(15117, 1); - shadowBeenCast = new VarbitRequirement(15118, 1); - bloodBeenCast = new VarbitRequirement(15119, 1); - iceBeenCast = new VarbitRequirement(15120, 1); + smokeBeenCast = new VarbitRequirement(VarbitID.DT2_WAR_ROOM_SMOKE_TOTEM, 1); + shadowBeenCast = new VarbitRequirement(VarbitID.DT2_WAR_ROOM_SHADOW_TOTEM, 1); + bloodBeenCast = new VarbitRequirement(VarbitID.DT2_WAR_ROOM_BLOOD_TOTEM, 1); + iceBeenCast = new VarbitRequirement(VarbitID.DT2_WAR_ROOM_ICE_TOTEM, 1); - castAllSpells = new VarbitRequirement(15116, 15); + castAllSpells = new VarbitRequirement(VarbitID.DT2_WAR_ROOM_ALTAR, 15); inPuzzle = new WidgetTextRequirement(838, 10, "One cell per row!"); @@ -521,10 +521,10 @@ public void setupConditions() // 14862 86->88 // 15129 0->1 - cellUnlocked = new VarbitRequirement(15124, 1); + cellUnlocked = new VarbitRequirement(VarbitID.DT2_HIDEOUT_GATE_UNLOCKED, 1); // Left cell, 88->90 - itemsRetrieved = new VarbitRequirement(14283, 0); + itemsRetrieved = new VarbitRequirement(VarbitID.HOLDING_INVENTORY_LOCATION, 0); // Stranger cutscene // 4606 0->3 // 12139 0->1 diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/PerseriyaSteps.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/PerseriyaSteps.java index 6c7317db9d6..419bf9c8b98 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/PerseriyaSteps.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/PerseriyaSteps.java @@ -38,7 +38,6 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.player.PrayerRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.player.SpellbookRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.util.ItemSlots; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicType; import net.runelite.client.plugins.microbot.questhelper.requirements.util.Operation; import net.runelite.client.plugins.microbot.questhelper.requirements.util.Spellbook; @@ -47,11 +46,11 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.steps.*; import net.runelite.api.Prayer; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.SpriteID; import net.runelite.api.gameval.VarbitID; import java.util.Arrays; @@ -63,8 +62,6 @@ public class PerseriyaSteps extends ConditionalStep { ItemRequirement eyeTeleport, facemask; - final int PERSERIYA_VARBIT = 15128; - DetailedQuestStep enterWizardBasement, enterPortalToTempleOfTheEye, killDemons, hopOverSteppingStone, talkToPersten, enterPassage1, enterPathfinderRoom; @@ -375,11 +372,11 @@ protected void setupConditions() // 13095 0->100 // 5934 0->1->2->3->4??? - defeatedDemons = new VarbitRequirement(PERSERIYA_VARBIT, 8, Operation.GREATER_EQUAL); + defeatedDemons = new VarbitRequirement(VarbitID.DT2_SCAR, 8, Operation.GREATER_EQUAL); - attemptedToBoardBoat = new VarbitRequirement(PERSERIYA_VARBIT, 10, Operation.GREATER_EQUAL); + attemptedToBoardBoat = new VarbitRequirement(VarbitID.DT2_SCAR, 10, Operation.GREATER_EQUAL); // 12139 1->0 after boat attempt - talkedToPersten = new VarbitRequirement(PERSERIYA_VARBIT, 14, Operation.GREATER_EQUAL); + talkedToPersten = new VarbitRequirement(VarbitID.DT2_SCAR, 14, Operation.GREATER_EQUAL); // In room 1 // 15128 14->16 @@ -394,12 +391,12 @@ protected void setupConditions() onPath5 = new ZoneRequirement(path5); onPath6 = new ZoneRequirement(path6); - destroyedTether = new VarbitRequirement(15258, 1); + destroyedTether = new VarbitRequirement(VarbitID.DT2_SCAR_MAZE_CHALLENGE_1_DONE, 1); isNearCatalystRoom = new ZoneRequirement(nearCatalystRoom1, nearCatalystRoom2); inCatalystRoom = new ZoneRequirement(catalystRoom); - completedCatalystRoom = new VarbitRequirement(15259, 1); + completedCatalystRoom = new VarbitRequirement(VarbitID.DT2_SCAR_MAZE_CHALLENGE_2_DONE, 1); isNearGrowthRoom = new ZoneRequirement(nearGrowth1, nearGrowth2); // On login to main area, 12164 0->1 // 13989 0->1 @@ -428,24 +425,24 @@ protected void setupConditions() // 202 inGrowthRoom = new ZoneRequirement(growthRoom); - repairedGrowths = new VarbitRequirement(15210, 4); - solvedGrowthRoom = new VarbitRequirement(15260, 1); + repairedGrowths = new VarbitRequirement(VarbitID.DT2_SCAR_MAZE_LIGHTS, 4); + solvedGrowthRoom = new VarbitRequirement(VarbitID.DT2_SCAR_MAZE_CHALLENGE_3_DONE, 1); // Entered boat room, 15261 0->1 inBoatRoom1 = new ZoneRequirement(boatRoom1); // TODO: Verify if order is random for this stuff, and thus variable needs to consider some shift based on area?h haveReadTablet = new Conditions(LogicType.OR, - new VarbitRequirement(PERSERIYA_VARBIT, 18), - new VarbitRequirement(PERSERIYA_VARBIT, 26), - new VarbitRequirement(PERSERIYA_VARBIT, 34) + new VarbitRequirement(VarbitID.DT2_SCAR, 18), + new VarbitRequirement(VarbitID.DT2_SCAR, 26), + new VarbitRequirement(VarbitID.DT2_SCAR, 34) ); // 18->20, burned ship // 15128 20->22, talked to Persten // Attempted to enter room 2, 22->24 - completedRoom1 = new VarbitRequirement(PERSERIYA_VARBIT, 20, Operation.GREATER_EQUAL); - talkedToPerstenAfterRoom1 = new VarbitRequirement(PERSERIYA_VARBIT, 22, Operation.GREATER_EQUAL); + completedRoom1 = new VarbitRequirement(VarbitID.DT2_SCAR, 20, Operation.GREATER_EQUAL); + talkedToPerstenAfterRoom1 = new VarbitRequirement(VarbitID.DT2_SCAR, 22, Operation.GREATER_EQUAL); // Room 2 inAxonRoom = new ZoneRequirement(axonRoom1, axonRoom2, axonRoom3); @@ -456,7 +453,7 @@ protected void setupConditions() waterAxonPresent = new NpcRequirement(NpcID.DT2_SCAR_MAZE_3_PATHING_NPC, "Abyssal Axon (Water)"); fireAxonPresent = new NpcRequirement(NpcID.DT2_SCAR_MAZE_3_PATHING_NPC, "Abyssal Axon (Fire)"); natureAxonPresent = new NpcRequirement(NpcID.DT2_SCAR_MAZE_3_PATHING_NPC, "Abyssal Axon (Nature)"); - completedAxonRoom = new VarbitRequirement(15258, 1); + completedAxonRoom = new VarbitRequirement(VarbitID.DT2_SCAR_MAZE_CHALLENGE_1_DONE, 1); nothingInHands = and(new NoItemRequirement("Weapon", ItemSlots.WEAPON), new NoItemRequirement("Shield", ItemSlots.SHIELD)); @@ -472,14 +469,14 @@ protected void setupConditions() dustNerveBroken = new ObjectCondition(ObjectID.DT2_SCAR_MAZE_3_COMBINATION_ENDING_DUST, new WorldPoint(1784, 6433, 0)); steamNerveBroken = new ObjectCondition(ObjectID.DT2_SCAR_MAZE_3_COMBINATION_ENDING_STEAM, new WorldPoint(1783, 6430, 0)); - completedNerveRoom = new VarbitRequirement(15259, 1); + completedNerveRoom = new VarbitRequirement(VarbitID.DT2_SCAR_MAZE_CHALLENGE_2_DONE, 1); inNervePassage = new ZoneRequirement(nervePassage); impsNearby = new NpcRequirement("Scarred imp", NpcID.DT2_SCAR_MAZE_3_LINK_NPC); - completedSummoningRoom = new VarbitRequirement(15260, 1); + completedSummoningRoom = new VarbitRequirement(VarbitID.DT2_SCAR_MAZE_CHALLENGE_3_DONE, 1); // Entered boat room, 15261 0->1. Seems to indicate 'teleport to boat room if they leave' - shouldReadTablet1 = new VarbitRequirement(PERSERIYA_VARBIT, 16); - shouldReadTablet2 = new VarbitRequirement(PERSERIYA_VARBIT, 24); - shouldReadTablet3 = new VarbitRequirement(PERSERIYA_VARBIT, 32); + shouldReadTablet1 = new VarbitRequirement(VarbitID.DT2_SCAR, 16); + shouldReadTablet2 = new VarbitRequirement(VarbitID.DT2_SCAR, 24); + shouldReadTablet3 = new VarbitRequirement(VarbitID.DT2_SCAR, 32); // 15128 26->28 burnt second boat // 15260 1->0 // 15259 1->0 @@ -487,8 +484,8 @@ protected void setupConditions() // 15261 0->1 // PERSTEN 2 = 28 - completedRoom2 = new VarbitRequirement(PERSERIYA_VARBIT, 28, Operation.GREATER_EQUAL); - talkedToPerstenAfterRoom2 = new VarbitRequirement(PERSERIYA_VARBIT, 30, Operation.GREATER_EQUAL); + completedRoom2 = new VarbitRequirement(VarbitID.DT2_SCAR, 28, Operation.GREATER_EQUAL); + talkedToPerstenAfterRoom2 = new VarbitRequirement(VarbitID.DT2_SCAR, 30, Operation.GREATER_EQUAL); // ENTER ROOM 3 // 15212 0->1 @@ -513,18 +510,18 @@ protected void setupConditions() inLeechRoom = new ZoneRequirement(leechRoom); inBoatRoom3 = new ZoneRequirement(boatRoom3); - solvedMemoryRoom = new VarbitRequirement(15258, 1); - solvedTreeRoom = new VarbitRequirement(15260, 1); - solvedLeechRoom = new VarbitRequirement(15259, 1); + solvedMemoryRoom = new VarbitRequirement(VarbitID.DT2_SCAR_MAZE_CHALLENGE_1_DONE, 1); + solvedTreeRoom = new VarbitRequirement(VarbitID.DT2_SCAR_MAZE_CHALLENGE_3_DONE, 1); + solvedLeechRoom = new VarbitRequirement(VarbitID.DT2_SCAR_MAZE_CHALLENGE_2_DONE, 1); protectFromMagic = new PrayerRequirement("Protect from Magic", Prayer.PROTECT_FROM_MAGIC); inSwRoom3 = new ZoneRequirement(swRoom3P1, swRoom3P2, swRoom3P3, swRoom3P4, swRoom3P5); - repairedGrowthRoom3 = new VarbitRequirement(15210, 4); - repairedCrimsonVeins = new VarbitRequirement(15219, 3); + repairedGrowthRoom3 = new VarbitRequirement(VarbitID.DT2_SCAR_MAZE_LIGHTS, 4); + repairedCrimsonVeins = new VarbitRequirement(VarbitID.DT2_SCAR_MAZE_2_RED_BLOOD_COUNT, 3); - completedRoom3 = new VarbitRequirement(PERSERIYA_VARBIT, 36, Operation.GREATER_EQUAL); + completedRoom3 = new VarbitRequirement(VarbitID.DT2_SCAR, 36, Operation.GREATER_EQUAL); - readyToFightLeviathan = new VarbitRequirement(PERSERIYA_VARBIT, 38, Operation.GREATER_EQUAL); + readyToFightLeviathan = new VarbitRequirement(VarbitID.DT2_SCAR, 38, Operation.GREATER_EQUAL); inLeviathanArea = new ZoneRequirement(leviathanArea); // Killed leviathan @@ -534,10 +531,10 @@ protected void setupConditions() // 1683 12215->-1 // 12401 1->0 (healthbar?) - defeatedLeviathan = new VarbitRequirement(PERSERIYA_VARBIT, 42, Operation.GREATER_EQUAL); + defeatedLeviathan = new VarbitRequirement(VarbitID.DT2_SCAR, 42, Operation.GREATER_EQUAL); inNELeviathanArea = new ZoneRequirement(neLeviathanArea); - perstenAtShip = new VarbitRequirement(PERSERIYA_VARBIT, 44, Operation.GREATER_EQUAL); - perstenLeft = new VarbitRequirement(PERSERIYA_VARBIT, 46, Operation.GREATER_EQUAL); + perstenAtShip = new VarbitRequirement(VarbitID.DT2_SCAR, 44, Operation.GREATER_EQUAL); + perstenLeft = new VarbitRequirement(VarbitID.DT2_SCAR, 46, Operation.GREATER_EQUAL); // Searched debris // 15128 46->48 @@ -550,7 +547,7 @@ protected void setupConditions() // Obtain medallion again, resets // Seemed to cap at 10 - foundPerseriyasMedallion = new VarbitRequirement(PERSERIYA_VARBIT, 48, Operation.GREATER_EQUAL); + foundPerseriyasMedallion = new VarbitRequirement(VarbitID.DT2_SCAR, 48, Operation.GREATER_EQUAL); } protected void setupSteps() @@ -621,7 +618,7 @@ protected void setupSteps() DetailedQuestStep doPath1RealStep = new DetailedQuestStep(getQuestHelper(), new WorldPoint(2197, 6444, 0), "Move the nearest pathfinder from the north, and follow it within a 3x3 area until the next pathfinder."); - doPath1RealStep.addTileMarker(new WorldPoint(2195, 6451, 0), SpriteID.RS2_SWORD_POINTED_LEFT); + doPath1RealStep.addTileMarker(new WorldPoint(2195, 6451, 0), SpriteID.Sworddecor.LEFT); doPath1RealStep.setLinePoints(Arrays.asList( new WorldPoint(2195, 6450, 0), new WorldPoint(2195, 6444, 0), @@ -632,7 +629,7 @@ protected void setupSteps() DetailedQuestStep doPath2RealStep = new DetailedQuestStep(getQuestHelper(), new WorldPoint(2202, 6442, 0), "Move the next pathfinder from the west, and step off when safe to the south pathfinder."); - doPath2RealStep.addTileMarker(new WorldPoint(2197, 6444, 0), SpriteID.RS2_SWORD_POINTED_LEFT); + doPath2RealStep.addTileMarker(new WorldPoint(2197, 6444, 0), SpriteID.Sworddecor.LEFT); doPath2RealStep.setLinePoints(Arrays.asList( new WorldPoint(2199, 6444, 0), new WorldPoint(2202, 6444, 0), @@ -643,7 +640,7 @@ protected void setupSteps() DetailedQuestStep doPath3RealStep = new DetailedQuestStep(getQuestHelper(), new WorldPoint(2198, 6438, 0), "Move the next pathbreaker from the north, and step off when safe to the west pathbreaker."); - doPath3RealStep.addTileMarker(new WorldPoint(2202, 6442, 0), SpriteID.RS2_SWORD_POINTED_LEFT); + doPath3RealStep.addTileMarker(new WorldPoint(2202, 6442, 0), SpriteID.Sworddecor.LEFT); doPath3RealStep.setLinePoints(Arrays.asList( new WorldPoint(2202, 6440, 0), new WorldPoint(2201, 6439, 0), @@ -654,7 +651,7 @@ protected void setupSteps() DetailedQuestStep doPath4RealStep = new DetailedQuestStep(getQuestHelper(), new WorldPoint(2196, 6435, 0), "Move the next pathbreaker from the west, and step off when safe to the south-west pathbreaker."); - doPath4RealStep.addTileMarker(new WorldPoint(2198, 6438, 0), SpriteID.RS2_SWORD_POINTED_LEFT); + doPath4RealStep.addTileMarker(new WorldPoint(2198, 6438, 0), SpriteID.Sworddecor.LEFT); doPath4RealStep.setLinePoints(Arrays.asList( new WorldPoint(2197, 6438, 0), new WorldPoint(2196, 6435, 0) @@ -663,7 +660,7 @@ protected void setupSteps() DetailedQuestStep doPath5RealStep = new DetailedQuestStep(getQuestHelper(), new WorldPoint(2207, 6436, 0), "Move the next pathbreaker from the east, and step off when safe to the east pathbreaker."); - doPath5RealStep.addTileMarker(new WorldPoint(2196, 6435, 0), SpriteID.RS2_SWORD_POINTED_LEFT); + doPath5RealStep.addTileMarker(new WorldPoint(2196, 6435, 0), SpriteID.Sworddecor.LEFT); doPath5RealStep.setLinePoints(Arrays.asList( new WorldPoint(2196, 6435, 0), new WorldPoint(2207, 6436, 0) @@ -672,7 +669,7 @@ protected void setupSteps() DetailedQuestStep doPath6RealStep = new ObjectStep(getQuestHelper(), ObjectID.DT2_SCAR_MAZE_ELECTRIC_FINISH, new WorldPoint(2210, 6433, 0), "Move the next pathbreaker from the south, and step off to destroy the abyssal tether."); - doPath6RealStep.addTileMarker(new WorldPoint(2207, 6436, 0), SpriteID.RS2_SWORD_POINTED_LEFT); + doPath6RealStep.addTileMarker(new WorldPoint(2207, 6436, 0), SpriteID.Sworddecor.LEFT); doPath6RealStep.setLinePoints(Arrays.asList( new WorldPoint(2207, 6436, 0), new WorldPoint(2207, 6433, 0), @@ -736,7 +733,7 @@ protected void setupSteps() // [9816, 9672, 9777] NpcStep hitCosmicAxonRealStep = new NpcStep(getQuestHelper(), NpcID.DT2_SCAR_MAZE_3_PATHING_NPC, "Abyssal Axon (Cosmic)", new WorldPoint(1743, 6421, 0), "Hit the Cosmic Axon towards the Cosmic terminal. Avoid the lightning strikes."); - hitCosmicAxonRealStep.addTileMarker(new WorldPoint(1746, 6414, 0), SpriteID.QUESTS_PAGE_ICON_BLUE_QUESTS); + hitCosmicAxonRealStep.addTileMarker(new WorldPoint(1746, 6414, 0), SpriteID.AchievementDiaryIcons.BLUE_QUESTS); hitCosmicAxonRealStep.setLinePoints(Arrays.asList( // Cosmic Axon new WorldPoint(1749, 6419, 0), @@ -748,7 +745,7 @@ protected void setupSteps() // [553, 573, 542] NpcStep hitFireAxonRealStep = new NpcStep(getQuestHelper(), NpcID.DT2_SCAR_MAZE_3_PATHING_NPC, "Abyssal Axon (Fire)", new WorldPoint(1743, 6421, 0), "Hit the Fire Axon towards the Fire terminal. Avoid the lightning strikes."); - hitFireAxonRealStep.addTileMarker(new WorldPoint(1748, 6426, 0), SpriteID.QUESTS_PAGE_ICON_BLUE_QUESTS); + hitFireAxonRealStep.addTileMarker(new WorldPoint(1748, 6426, 0), SpriteID.AchievementDiaryIcons.BLUE_QUESTS); hitFireAxonRealStep.setLinePoints(Arrays.asList( new WorldPoint(1744, 6413, 0), new WorldPoint(1744, 6421, 0), @@ -763,7 +760,7 @@ protected void setupSteps() // [20013, 19904, 20126] NpcStep hitNatureAxonRealStep = new NpcStep(getQuestHelper(), NpcID.DT2_SCAR_MAZE_3_PATHING_NPC, "Abyssal Axon (Nature)", new WorldPoint(1743, 6421, 0), "Hit the Nature Axon towards the Nature terminal. Avoid the lightning strikes."); - hitNatureAxonRealStep.addTileMarker(new WorldPoint(1733, 6426, 0), SpriteID.QUESTS_PAGE_ICON_BLUE_QUESTS); + hitNatureAxonRealStep.addTileMarker(new WorldPoint(1733, 6426, 0), SpriteID.AchievementDiaryIcons.BLUE_QUESTS); hitNatureAxonRealStep.setLinePoints(Arrays.asList( new WorldPoint(1743, 6424, 0), new WorldPoint(1740, 6424, 0), @@ -776,7 +773,7 @@ protected void setupSteps() // [-25047, -25024, -25058] NpcStep hitWaterAxonRealStep = new NpcStep(getQuestHelper(), NpcID.DT2_SCAR_MAZE_3_PATHING_NPC, "Abyssal Axon (Water)", new WorldPoint(1743, 6421, 0), "Hit the Water Axon towards the Water terminal. Avoid the lightning strikes."); - hitWaterAxonRealStep.addTileMarker(new WorldPoint(1736, 6414, 0), SpriteID.QUESTS_PAGE_ICON_BLUE_QUESTS); + hitWaterAxonRealStep.addTileMarker(new WorldPoint(1736, 6414, 0), SpriteID.AchievementDiaryIcons.BLUE_QUESTS); hitWaterAxonRealStep.setLinePoints(Arrays.asList( new WorldPoint(1735, 6422, 0), new WorldPoint(1743, 6422, 0), @@ -827,17 +824,17 @@ protected void setupSteps() repairNerve.addStep(and(lavaNerveBroken, lavaNerve), repairLavaNerve); repairNerve.addStep(and(lavaNerveBroken, fireNerve, earthNerve), makeLavaNerve); repairNerve.addStep(and(lavaNerveBroken, fireNerve), getEarthNerve); - repairNerve.addStep(LogicHelper.and(lavaNerveBroken), getFireNerve); + repairNerve.addStep(and(lavaNerveBroken), getFireNerve); repairNerve.addStep(and(dustNerveBroken, dustNerve), repairDustNerve); repairNerve.addStep(and(dustNerveBroken, airNerve, earthNerve), makeDustNerve); repairNerve.addStep(and(dustNerveBroken, airNerve), getEarthNerve); - repairNerve.addStep(LogicHelper.and(dustNerveBroken), getAirNerve); + repairNerve.addStep(and(dustNerveBroken), getAirNerve); repairNerve.addStep(and(smokeNerveBroken, smokeNerve), repairSmokeNerve); repairNerve.addStep(and(smokeNerveBroken, fireNerve, airNerve), makeSmokeNerve); repairNerve.addStep(and(smokeNerveBroken, fireNerve), getAirNerve); - repairNerve.addStep(LogicHelper.and(smokeNerveBroken), getFireNerve); + repairNerve.addStep(and(smokeNerveBroken), getFireNerve); repairNerve.addStep(and(steamNerve), repairSteamNerve); repairNerve.addStep(and(waterNerve, fireNerve), makeSteamNerve); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/SucellusSteps.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/SucellusSteps.java index 69c3dc66ba6..8cdb45d52a5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/SucellusSteps.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/SucellusSteps.java @@ -32,7 +32,6 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemOnTileRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.util.Operation; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.widget.WidgetTextRequirement; @@ -91,9 +90,9 @@ public SucellusSteps(QuestHelper questHelper, QuestStep defaultStep) addStep(and(oddKeyDoorUnlocked, or(inDukeBossArena, inDukeEntrance)), talkToAssassinAfterDuke); addStep(and(oddKey, or(inDukeBossArena, inDukeEntrance)), enterRoomWestOfDuke); addStep(and(inDukeEntrance, killedDuke), retrieveKeyFromDoor); - addStep(LogicHelper.and(oddKeyNearby), pickUpOddKey); - addStep(LogicHelper.and(inDukeBossArena), defeatDuke); - addStep(LogicHelper.and(inDukeEntrance), enterDukeBossArea); + addStep(and(oddKeyNearby), pickUpOddKey); + addStep(and(inDukeBossArena), defeatDuke); + addStep(and(inDukeEntrance), enterDukeBossArea); addStep(and(inPrisonF2, dukeArenaUnlocked), enterDukeArena); addStep(and(inPrisonF2, defeatedJhallan), talkToAssassinAfterJhallanFight); addStep(and(inPrisonF2, inJhallanFight), survive3Mins); @@ -272,7 +271,7 @@ protected void setupConditions() gotGear = new VarbitRequirement(VarbitID.DT2_GHORROCK, 50, Operation.GREATER_EQUAL); talkedToAssassinWithGear = new VarbitRequirement(VarbitID.DT2_GHORROCK, 52, Operation.GREATER_EQUAL); - unlockedSECrevice = new VarbitRequirement(15177, 1); + unlockedSECrevice = new VarbitRequirement(VarbitID.DT2_GHORROCK_SHORTCUT_1, 1); inJhallanFight = new VarbitRequirement(VarbitID.DT2_GHORROCK, 54, Operation.GREATER_EQUAL); defeatedJhallan = new VarbitRequirement(VarbitID.DT2_GHORROCK, 56, Operation.GREATER_EQUAL); @@ -288,7 +287,7 @@ protected void setupConditions() // Global state 70->72 oddKeyNearby = new ItemOnTileRequirement(oddKey); - oddKeyDoorUnlocked = new VarbitRequirement(15179, 1); + oddKeyDoorUnlocked = new VarbitRequirement(VarbitID.DT2_GHORROCK_ASYLUM_GATE, 1); talkedToAssassinAfterDuke = new VarbitRequirement(VarbitID.DT2_GHORROCK, 66, Operation.GREATER_EQUAL); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/VardorvisSteps.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/VardorvisSteps.java index 3a217ec3e51..12acb7918c1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/VardorvisSteps.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/VardorvisSteps.java @@ -67,7 +67,7 @@ public class VardorvisSteps extends ConditionalStep inAnyStranglewood, inVardorvisArea, unlockedShortcut, defeatedVardorvis, templeKeyNearby, kasondeAggressive, givenKasondeKey, defeatedKasonde, kasondeRevealedMedallion, gotVardorvisMedallion, inVault; ItemRequirement potionNote, strangePotion, freezes, berry, herb, unfinishedSerum, serumWithHerb, stranglerSerum, templeKey, - vardorvisMedallion; + vardorvisMedallion, food; Zone stranglewood, towerDefenseRoom, stranglewoodPyramidRoom, vardorvisArea, vault; QuestBank questBank; @@ -139,6 +139,7 @@ protected void setupItemRequirements() potionNote = new ItemRequirement("Potion note", ItemID.DT2_KASONDE_NOTE); strangePotion = new ItemRequirement("Strange potion", ItemID.DT2_KASONDE_POTION); + food = new ItemRequirement("Bring high healing food to tank the infected.", -1); freezes = new ItemRequirement("Freezing spells STRONGLY recommended + reasonable mage accuracy", -1); berry = new ItemRequirement("Argian berries", ItemID.DT2_STRANGLEWOOD_BERRIES); berry.setTooltip("You can get another from the south-west corner of The Stranglewood"); @@ -193,10 +194,10 @@ protected void setupConditions() toldAboutHerbAndBerry = new VarbitRequirement(VarbitID.DT2_STRANGLEWOOD, 24, Operation.GREATER_EQUAL); // 15136 0->2 taken herb // 15125 24->26, herb taken - herbTaken = new VarbitRequirement(15136, 2); + herbTaken = new VarbitRequirement(VarbitID.DT2_STRANGLEWOOD_INGREDIENT_1, 2); // 15125 26->28, picked berry // 15137, 0->1 berry taken - berryTaken = new VarbitRequirement(15137, 1); + berryTaken = new VarbitRequirement(VarbitID.DT2_STRANGLEWOOD_INGREDIENT_2, 1); // 15125 28->30->32 when entering pyramid inStranglewoodPyramidRoom = new ZoneRequirement(stranglewoodPyramidRoom); @@ -249,6 +250,7 @@ protected void setupSteps() defendKasonde = new DetailedQuestStep(getQuestHelper(), "Defend Kasonde! Read the sidebar for more details."); defendKasonde.addRecommended(freezes); + defendKasonde.addRecommended(food); defendKasondeSidebar.addSubSteps(defendKasonde); // TODO: Get actual coordinate and ladder ID! diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/WhispererSteps.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/WhispererSteps.java index 308ebbe29c3..12199953d69 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/WhispererSteps.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deserttreasureii/WhispererSteps.java @@ -37,7 +37,6 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.location.TileIsLoadedRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.player.FreeInventorySlotRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.runelite.RuneliteRequirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicType; import net.runelite.client.plugins.microbot.questhelper.requirements.util.Operation; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; @@ -137,7 +136,7 @@ public WhispererSteps(QuestHelper questHelper, QuestStep defaultStep, QuestBank lockedDoorSteps.addStep(and(inEastShadowRealm, blueShadowKey), activateBlackstoneFragment3); lockedDoorSteps.addStep(and(inLassarShadowRealm, basicShadowTorchSchematic), activateBlackstoneFragment); lockedDoorSteps.addStep(and(basicShadowTorchSchematic), bringKetlaTheBasicTorchSchematic); - lockedDoorSteps.addStep(and(inFurnaceHouse, LogicHelper.nor(givenTorchSchematic)), takeShadowTorchSchematic); + lockedDoorSteps.addStep(and(inFurnaceHouse, nor(givenTorchSchematic)), takeShadowTorchSchematic); lockedDoorSteps.addStep(and(inLassarShadowRealm, hadPurpleKey, blockerPlacedAtDoor), unlockDoor); lockedDoorSteps.addStep(and(hadPurpleKey, blockerPlacedAtDoor), enterSciencePuddle); lockedDoorSteps.addStep(and(hadPurpleKey, blockerNearby), retrieveShadowBlocker); @@ -145,12 +144,12 @@ public WhispererSteps(QuestHelper questHelper, QuestStep defaultStep, QuestBank lockedDoorSteps.addStep(and(hadPurpleKey, shadowBlocker, inStartingRoom), useTeleporterToScienceDistrict); lockedDoorSteps.addStep(and(hadPurpleKey, shadowBlocker), placeBlockerInFurnaceBuilding); lockedDoorSteps.addStep(and(hadPurpleKey, inStartingRoom), useTeleporterToKetla); - lockedDoorSteps.addStep(LogicHelper.and(hadPurpleKey), claimShadowBlocker); + lockedDoorSteps.addStep(and(hadPurpleKey), claimShadowBlocker); ConditionalStep blueKeySteps = new ConditionalStep(getQuestHelper(), claimRevitalisingIdol); blueKeySteps.addStep(and(inLassarShadowRealm, destroyedTentacles2), activateBlackstoneFragment3); blueKeySteps.addStep(and(inLassar, destroyedTentacles2), getBlueShadowKeyRealRealm); - blueKeySteps.addStep(LogicHelper.and(inLassarShadowRealm), destroyTentacles2); + blueKeySteps.addStep(and(inLassarShadowRealm), destroyTentacles2); blueKeySteps.addStep(and(idolPlaced, basicShadowTorch), enterResidentialPuddleAgain); blueKeySteps.addStep(and(idolNearby, basicShadowTorch, activatedTeleporter7), pickUpIdol); blueKeySteps.addStep(and(revitalisingIdol, basicShadowTorch, activatedTeleporter7), placeIdol); @@ -183,7 +182,7 @@ public WhispererSteps(QuestHelper questHelper, QuestStep defaultStep, QuestBank ConditionalStep getPerfectedSchematicSteps = new ConditionalStep(getQuestHelper(), placeBlockerWhiteChest); getPerfectedSchematicSteps.addStep(and(inLassarShadowRealm, braziersLit), openFinalChest); getPerfectedSchematicSteps.addStep(and(inLassarShadowRealm, lowSanity, idolShadowRealmFullNearby), restoreSanity); - getPerfectedSchematicSteps.addStep(LogicHelper.and(inLassarShadowRealm), lightBraziers); + getPerfectedSchematicSteps.addStep(and(inLassarShadowRealm), lightBraziers); getPerfectedSchematicSteps.addStep(and(placedBlockerWhiteChest, placedAnimaWhiteChest, placedIdolWhiteChest), enterPlazaPuddle2); getPerfectedSchematicSteps.addStep(and(placedBlockerWhiteChest, placedAnimaWhiteChest), placeIdolWhiteChest); getPerfectedSchematicSteps.addStep(placedBlockerWhiteChest, placeAnimaWhiteChest); @@ -191,7 +190,7 @@ public WhispererSteps(QuestHelper questHelper, QuestStep defaultStep, QuestBank ConditionalStep silentChoirSteps = new ConditionalStep(getQuestHelper(), enterPuddleNearPub); silentChoirSteps.addStep(and(inPubShadowRealm, touchedPubRemnant), activateBlackstoneFragment8); - silentChoirSteps.addStep(LogicHelper.and(inDrainF0), inspectPillar); + silentChoirSteps.addStep(and(inDrainF0), inspectPillar); silentChoirSteps.addStep(and(inDrainF1, iconUsed), goDownDrainLadder); silentChoirSteps.addStep(and(inDrainF1, strangeIcon), useIconInDrain); silentChoirSteps.addStep(and(inLassar, touchedPubRemnant, or(strangeIcon, iconUsed)), enterDrain); @@ -225,7 +224,7 @@ public WhispererSteps(QuestHelper questHelper, QuestStep defaultStep, QuestBank addStep(and(inLassar, unlockedPerfectShadowTorch), claimPerfectShadowTorch); // NOTE: I was not told to do this addStep(and(inCamdozaal, unlockedPerfectShadowTorch), descendDownRopeFight); - addStep(LogicHelper.and(unlockedPerfectShadowTorch), enterRuinsOfCamdozaalFight); + addStep(and(unlockedPerfectShadowTorch), enterRuinsOfCamdozaalFight); addStep(and(inLassar, escapedVision), talkToKetlaAfterVision); addStep(inVision, talkToMe); @@ -268,7 +267,7 @@ public WhispererSteps(QuestHelper questHelper, QuestStep defaultStep, QuestBank addStep(and(inLassar, activatedTeleporter1, activatedTeleporter2, activatedTeleporter3), takeShadowBlockerSchematic); addStep(and(inLassar, activatedTeleporter1, activatedTeleporter2), activateTeleporter3); addStep(and(inLassar, activatedTeleporter1), activateTeleporter2); - addStep(LogicHelper.and(inLassar), activateTeleporter1); + addStep(and(inLassar), activateTeleporter1); addStep(and(inCamdozaal, ropeAttached), descendDownRope); addStep(and(inCamdozaal, talkedToPrescott, veryLongRope), attachRope); addStep(and(inCamdozaal, talkedToRamarno), talkToPrescott); @@ -373,34 +372,32 @@ protected void setupConditions() inResidentialDistrict = new ZoneRequirement(residentialDistrict); inEastShadowRealm = new ZoneRequirement(eastShadowRealm); - int WHISPERER_VARBIT = 15126; - // Varbit is for learning about the area from the previous quest talkedToRamarno = new VarbitRequirement(VarbitID.CAMDOZAAL_RAMARNO_INTRO, 2, Operation.GREATER_EQUAL); - talkedToPrescott = new VarbitRequirement(WHISPERER_VARBIT, 4, Operation.GREATER_EQUAL); - ropeAttached = new VarbitRequirement(WHISPERER_VARBIT, 6, Operation.GREATER_EQUAL); + talkedToPrescott = new VarbitRequirement(VarbitID.DT2_LASSAR, 4, Operation.GREATER_EQUAL); + ropeAttached = new VarbitRequirement(VarbitID.DT2_LASSAR, 6, Operation.GREATER_EQUAL); // Entered undercity: // 15064 0->100 // 15126 6->8 // 14862 78->80 // varplayer 3575 36691712 -> 36699904 - activatedTeleporter1 = new VarbitRequirement(15088, 1); - activatedTeleporter2 = new VarbitRequirement(15089, 1); - activatedTeleporter3 = new VarbitRequirement(15091, 1); - activatedTeleporter4 = new VarbitRequirement(15092, 1); - activatedTeleporter5 = new VarbitRequirement(15093, 1); - activatedTeleporter6 = new VarbitRequirement(15090, 1); - activatedTeleporter7 = new VarbitRequirement(15094, 1); + activatedTeleporter1 = new VarbitRequirement(VarbitID.DT2_LASSAR_TELEPORTER_PALACE, 1); + activatedTeleporter2 = new VarbitRequirement(VarbitID.DT2_LASSAR_TELEPORTER_PLAZA, 1); + activatedTeleporter3 = new VarbitRequirement(VarbitID.DT2_LASSAR_TELEPORTER_SCIENCE_NORTH, 1); + activatedTeleporter4 = new VarbitRequirement(VarbitID.DT2_LASSAR_TELEPORTER_SCIENCE_SOUTH, 1); + activatedTeleporter5 = new VarbitRequirement(VarbitID.DT2_LASSAR_TELEPORTER_RESIDENTIAL_WEST, 1); + activatedTeleporter6 = new VarbitRequirement(VarbitID.DT2_LASSAR_TELEPORTER_CATHEDRAL, 1); + activatedTeleporter7 = new VarbitRequirement(VarbitID.DT2_LASSAR_TELEPORTER_RESIDENTIAL_EAST, 1); - passedOutAtCathedral = new VarbitRequirement(WHISPERER_VARBIT, 10, Operation.GREATER_EQUAL); + passedOutAtCathedral = new VarbitRequirement(VarbitID.DT2_LASSAR, 10, Operation.GREATER_EQUAL); // 10->12, ketla wants to see the ring // 12->14, fragment is now safe // 14->16, tried to give me fragment - finishedTalkingToKetla = new VarbitRequirement(WHISPERER_VARBIT, 16, Operation.GREATER_EQUAL); - givenShadowBlockerSchematic = new VarbitRequirement(15082, 1); + finishedTalkingToKetla = new VarbitRequirement(VarbitID.DT2_LASSAR, 16, Operation.GREATER_EQUAL); + givenShadowBlockerSchematic = new VarbitRequirement(VarbitID.DT2_LASSAR_SHADOW_BLOCKER_SCHEMATIC, 1); // Entered science puddle // 15162 0->1 (probably just 'is in shadow realm'?) // 15163 0->3->13->14->15->16->17...100, ticks up to 100 @@ -460,7 +457,7 @@ protected void setupConditions() // 15126 18->20 // Unsure when 16->18 happened - givenTorchSchematic = new VarbitRequirement(15085, 1); + givenTorchSchematic = new VarbitRequirement(VarbitID.DT2_LASSAR_SHADOW_TORCH_T1_SCHEMATIC, 1); ObjectCondition realWorldTentacleExists = new ObjectCondition(ObjectID.DT2_LASSAR_BARRIER_NORMAL_T1, new Zone(new WorldPoint(2673, 6413, 0), @@ -484,7 +481,7 @@ protected void setupConditions() realWorldTentacleExists) ); - givenIdolSchematic = new VarbitRequirement(15083, 1); + givenIdolSchematic = new VarbitRequirement(VarbitID.DT2_LASSAR_REVITALISING_IDOL_SCHEMATIC, 1); idolPlaced = new ObjectCondition(ObjectID.DT2_LASSAR_REVITALISING_IDOL_NORMAL, new Zone(new WorldPoint(2685, 6414, 0), new WorldPoint(2700, 6427, 0))); @@ -537,7 +534,7 @@ protected void setupConditions() // Picked up superior schematics // 15126 20->22 - givenSuperiorTorchSchematic = new VarbitRequirement(15086, 1); + givenSuperiorTorchSchematic = new VarbitRequirement(VarbitID.DT2_LASSAR_SHADOW_TORCH_T2_SCHEMATIC, 1); // 22->24 destroyedTentacles3 = new Conditions( @@ -547,7 +544,7 @@ protected void setupConditions() // Anima portal real world block: // 48207, new W(2578, y=6398, 0) Shadow Realm: ObjectID.DT2_LASSAR_BARRIER_SHADOW_T2 - givenAnimaPortalSchematic = new VarbitRequirement(15084, 1); + givenAnimaPortalSchematic = new VarbitRequirement(VarbitID.DT2_LASSAR_ANIMA_PORTAL_SCHEMATIC, 1); /* Tentacle 4 */ Conditions withinRangeOfTentacle4 = new Conditions( @@ -602,13 +599,13 @@ protected void setupConditions() )); // Schematic got - obtainedPerfectedSchematic = new VarbitRequirement(WHISPERER_VARBIT, 26, Operation.GREATER_EQUAL); + obtainedPerfectedSchematic = new VarbitRequirement(VarbitID.DT2_LASSAR, 26, Operation.GREATER_EQUAL); // 15126 24->26 - perfectSchematicGiven = new VarbitRequirement(WHISPERER_VARBIT, 28, Operation.GREATER_EQUAL); + perfectSchematicGiven = new VarbitRequirement(VarbitID.DT2_LASSAR, 28, Operation.GREATER_EQUAL); - learntAboutSilentChoir = new VarbitRequirement(WHISPERER_VARBIT, 30, Operation.GREATER_EQUAL); + learntAboutSilentChoir = new VarbitRequirement(VarbitID.DT2_LASSAR, 30, Operation.GREATER_EQUAL); - touchedPubRemnant = new VarbitRequirement(WHISPERER_VARBIT, 32, Operation.GREATER_EQUAL); + touchedPubRemnant = new VarbitRequirement(VarbitID.DT2_LASSAR, 32, Operation.GREATER_EQUAL); /* Tentacle 5 */ Conditions withinRangeOfTentacle5 = new Conditions( @@ -694,13 +691,13 @@ protected void setupConditions() // 32->34, maybe when made idol? - iconUsed = new VarbitRequirement(WHISPERER_VARBIT, 36, Operation.GREATER_EQUAL); + iconUsed = new VarbitRequirement(VarbitID.DT2_LASSAR, 36, Operation.GREATER_EQUAL); // animation 2757, fade-in - escapedVision = new VarbitRequirement(WHISPERER_VARBIT, 38, Operation.GREATER_EQUAL); + escapedVision = new VarbitRequirement(VarbitID.DT2_LASSAR, 38, Operation.GREATER_EQUAL); // 38->40, unlocked shadow torch - unlockedPerfectShadowTorch = new VarbitRequirement(15087, 1); + unlockedPerfectShadowTorch = new VarbitRequirement(VarbitID.DT2_LASSAR_SHADOW_TORCH_T3_SCHEMATIC, 1); Conditions withinRangeOfCathedralTentacle = new Conditions( or( @@ -724,7 +721,7 @@ protected void setupConditions() ); // 14862 80->82 - enteredCathedral = new VarbitRequirement(WHISPERER_VARBIT, 42, Operation.GREATER_EQUAL); + enteredCathedral = new VarbitRequirement(VarbitID.DT2_LASSAR, 42, Operation.GREATER_EQUAL); // Killed Whisperer: // 15064 0->100 (insanity?) @@ -732,7 +729,7 @@ protected void setupConditions() // 15126 42->44 // 14862 82->84 // - killedWhisperer = new VarbitRequirement(WHISPERER_VARBIT, 44, Operation.GREATER_EQUAL); + killedWhisperer = new VarbitRequirement(VarbitID.DT2_LASSAR, 44, Operation.GREATER_EQUAL); // Obtained medallion // 15126 44->46 // 14862 84->86 diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deviousminds/DeviousMinds.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deviousminds/DeviousMinds.java index 7100b81635a..6e675842bfa 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deviousminds/DeviousMinds.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/deviousminds/DeviousMinds.java @@ -112,9 +112,9 @@ public Map loadSteps() protected void setupRequirements() { //Recommended - fallyTele = new ItemRequirement("Falador Teleports", ItemID.POH_TABLET_FALADORTELEPORT); - lumberTele = new ItemRequirement("Lumberyard Teleports", ItemID.TELEPORTSCROLL_LUMBERYARD); - glory = new ItemRequirement("Amulet of Glory", ItemCollections.AMULET_OF_GLORIES); + fallyTele = new ItemRequirement("Falador Teleports", ItemID.POH_TABLET_FALADORTELEPORT, 2); + lumberTele = new ItemRequirement("Lumberyard Teleports", ItemID.TELEPORTSCROLL_LUMBERYARD, 3); + glory = new ItemRequirement("Amulet of Glory (Teleports to Port Sarim and Edgeville)", ItemCollections.AMULET_OF_GLORIES); //Required mith2h = new ItemRequirement("Mithril 2h Sword", ItemID.MITHRIL_2H_SWORD); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/dragonslayer/DragonSlayer.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/dragonslayer/DragonSlayer.java index cc31d5e3835..d5e7af0effb 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/dragonslayer/DragonSlayer.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/dragonslayer/DragonSlayer.java @@ -48,6 +48,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.gameval.VarPlayerID; import java.util.*; @@ -286,7 +287,7 @@ public void setupConditions() askedAboutShip = new VarplayerRequirement(VarPlayerID.DRAGONQUESTVAR, false, 14); askedAboutShield = new VarplayerRequirement(VarPlayerID.DRAGONQUESTVAR, false, 15); askedAllQuestions = new Conditions(askedAboutShip, askedAboutShield, askedAboutMelzar, askedAboutThalzar, askedAboutLozar); - askedOracleAboutMap = new VarbitRequirement(1832, 1); + askedOracleAboutMap = new VarbitRequirement(VarbitID.DRAGONSLAYER_SECRET_TOLD, 1); inDwarvenMines = new ZoneRequirement(dwarvenMines); silkUsed = new VarplayerRequirement(VarPlayerID.DRAGONQUESTVAR, true, 17); unfiredBowlUsed = new VarplayerRequirement(VarPlayerID.DRAGONQUESTVAR, true, 18); @@ -319,11 +320,11 @@ public void setupConditions() onShipDeck = new ZoneRequirement(shipDeck); inShipHull = new ZoneRequirement(shipHull); - hasBoughtBoat = new VarplayerRequirement(176, 3); + hasBoughtBoat = new VarplayerRequirement(VarPlayerID.DRAGONQUEST, 3); - hasRepairedHullOnce = new VarbitRequirement(1835, 1); - hasRepairedHullTwice = new VarbitRequirement(1836, 1); - fullyRepairedHull = new VarbitRequirement(1837, 1); + hasRepairedHullOnce = new VarbitRequirement(VarbitID.DRAGONSLAYER_SHIP_ONETHIRD_FIXED, 1); + hasRepairedHullTwice = new VarbitRequirement(VarbitID.DRAGONSLAYER_SHIP_TWOTHIRD_FIXED, 1); + fullyRepairedHull = new VarbitRequirement(VarbitID.DRAGONSLAYER_SHIP_FULLYFIXED, 1); onCrandorSurface = new ZoneRequirement(crandorSurface); inCrandorUnderground = new ZoneRequirement(crandorUnderground); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/dragonslayerii/DragonSlayerII.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/dragonslayerii/DragonSlayerII.java index 802fbf18baf..1f69bafc3d0 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/dragonslayerii/DragonSlayerII.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/dragonslayerii/DragonSlayerII.java @@ -626,43 +626,43 @@ public void setupConditions() emptyInv24 = new FreeInventorySlotRequirement(24); - hadMap1 = new Conditions(LogicType.OR, map1, new VarbitRequirement(6116, 1)); - hadMap2 = new Conditions(LogicType.OR, map2, new VarbitRequirement(6117, 1)); - hadMap3 = new Conditions(LogicType.OR, map3, new VarbitRequirement(6118, 1)); - hadMap4 = new Conditions(LogicType.OR, map4, new VarbitRequirement(6119, 1)); - hadMap5 = new Conditions(LogicType.OR, map5, new VarbitRequirement(6120, 1)); + hadMap1 = new Conditions(LogicType.OR, map1, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_A1, 1)); + hadMap2 = new Conditions(LogicType.OR, map2, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_A3, 1)); + hadMap3 = new Conditions(LogicType.OR, map3, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_A4, 1)); + hadMap4 = new Conditions(LogicType.OR, map4, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_A6, 1)); + hadMap5 = new Conditions(LogicType.OR, map5, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_B1, 1)); hadChest1MapPieces = new Conditions(hadMap1, hadMap2, hadMap3, hadMap4, hadMap5); - hadMap6 = new Conditions(LogicType.OR, map6, new VarbitRequirement(6121, 1)); - hadMap7 = new Conditions(LogicType.OR, map7, new VarbitRequirement(6122, 1)); - hadMap8 = new Conditions(LogicType.OR, map8, new VarbitRequirement(6123, 1)); + hadMap6 = new Conditions(LogicType.OR, map6, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_B2, 1)); + hadMap7 = new Conditions(LogicType.OR, map7, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_B4, 1)); + hadMap8 = new Conditions(LogicType.OR, map8, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_B5, 1)); hadChest2MapPieces = new Conditions(hadMap6, hadMap7, hadMap8); - hadMap9 = new Conditions(LogicType.OR, map9, new VarbitRequirement(6124, 1)); - hadMap10 = new Conditions(LogicType.OR, map10, new VarbitRequirement(6125, 1)); - hadMap11 = new Conditions(LogicType.OR, map11, new VarbitRequirement(6126, 1)); - hadMap12 = new Conditions(LogicType.OR, map12, new VarbitRequirement(6127, 1)); + hadMap9 = new Conditions(LogicType.OR, map9, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_C1, 1)); + hadMap10 = new Conditions(LogicType.OR, map10, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_C3, 1)); + hadMap11 = new Conditions(LogicType.OR, map11, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_C4, 1)); + hadMap12 = new Conditions(LogicType.OR, map12, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_C5, 1)); hadFungiMapPieces = new Conditions(hadMap9, hadMap10, hadMap11, hadMap12); - hadMap13 = new Conditions(LogicType.OR, map13, new VarbitRequirement(6128, 1)); - hadMap14 = new Conditions(LogicType.OR, map14, new VarbitRequirement(6129, 1)); - hadMap15 = new Conditions(LogicType.OR, map15, new VarbitRequirement(6130, 1)); - hadMap16 = new Conditions(LogicType.OR, map16, new VarbitRequirement(6131, 1)); - hadMap17 = new Conditions(LogicType.OR, map17, new VarbitRequirement(6132, 1)); - hadMap18 = new Conditions(LogicType.OR, map18, new VarbitRequirement(6133, 1)); - hadMap19 = new Conditions(LogicType.OR, map19, new VarbitRequirement(6134, 1)); + hadMap13 = new Conditions(LogicType.OR, map13, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_D2, 1)); + hadMap14 = new Conditions(LogicType.OR, map14, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_D4, 1)); + hadMap15 = new Conditions(LogicType.OR, map15, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_D5, 1)); + hadMap16 = new Conditions(LogicType.OR, map16, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_D6, 1)); + hadMap17 = new Conditions(LogicType.OR, map17, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_E1, 1)); + hadMap18 = new Conditions(LogicType.OR, map18, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_E2, 1)); + hadMap19 = new Conditions(LogicType.OR, map19, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_E3, 1)); hadBriarMapPieces = new Conditions(hadMap13, hadMap14, hadMap15, hadMap16, hadMap17, hadMap18, hadMap19); - hadMap20 = new Conditions(LogicType.OR, map20, new VarbitRequirement(6135, 1)); - hadMap21 = new Conditions(LogicType.OR, map21, new VarbitRequirement(6136, 1)); - hadMap22 = new Conditions(LogicType.OR, map22, new VarbitRequirement(6137, 1)); - hadMap23 = new Conditions(LogicType.OR, map23, new VarbitRequirement(6138, 1)); - hadMap24 = new Conditions(LogicType.OR, map24, new VarbitRequirement(6138, 1)); + hadMap20 = new Conditions(LogicType.OR, map20, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_E5, 1)); + hadMap21 = new Conditions(LogicType.OR, map21, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_F2, 1)); + hadMap22 = new Conditions(LogicType.OR, map22, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_F4, 1)); + hadMap23 = new Conditions(LogicType.OR, map23, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_F5, 1)); + hadMap24 = new Conditions(LogicType.OR, map24, new VarbitRequirement(VarbitID.FOSSIL_MAP_PIECE_F5, 1)); hadMushtreeMapPieces = new Conditions(hadMap20, hadMap21, hadMap22, hadMap23, hadMap24); inMapPuzzle = new WidgetModelRequirement(305, 1, 35060); - litBrazier = new VarbitRequirement(2430, 1); + litBrazier = new VarbitRequirement(VarbitID.LUNAR_BRAZIER_LIT, 1); hasTheKourendKeyPiece = new VarbitRequirement(VarbitID.DS2_ZEAH, 35, Operation.GREATER_EQUAL); hasTheKaramjaKeyPiece = new VarbitRequirement(VarbitID.DS2_KARAM, 20, Operation.GREATER_EQUAL); @@ -702,11 +702,11 @@ public void setupConditions() // West dragon lit, 6109 = 1 // North dragon lit, 6110 = 1 // East dragon lit, 6111 = 1 - litFurnace = new Conditions(new VarbitRequirement(6109, 1), new VarbitRequirement(6110, 1), new VarbitRequirement(6111, 1)); + litFurnace = new Conditions(new VarbitRequirement(VarbitID.DS2_DRAGON_HEAD_WEST, 1), new VarbitRequirement(VarbitID.DS2_DRAGON_HEAD_NORTH, 1), new VarbitRequirement(VarbitID.DS2_DRAGON_HEAD_EAST, 1)); - recruitedBrundt = new VarbitRequirement(6114, 1); - recruitedAmik = new VarbitRequirement(6115, 1); - recruitedLathas = new VarbitRequirement(6113, 1); + recruitedBrundt = new VarbitRequirement(VarbitID.DS2_BRUNDT, 1); + recruitedAmik = new VarbitRequirement(VarbitID.DS2_AMIK, 1); + recruitedLathas = new VarbitRequirement(VarbitID.DS2_LATHAS, 1); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/dreammentor/DreamMentor.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/dreammentor/DreamMentor.java index 0298592c0bf..f44e6092f5a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/dreammentor/DreamMentor.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/dreammentor/DreamMentor.java @@ -230,11 +230,11 @@ public void setupConditions() lookingAtBank = new WidgetTextRequirement(260, 41, "Cyrisus's Bank"); gotItems = new CyrisusBankConditional(); - cyrisusDressed = new VarbitRequirement(3623, 100); + cyrisusDressed = new VarbitRequirement(VarbitID.DREAM_ARMAMENT, 100); - litBrazier = new VarbitRequirement(2430, 1); + litBrazier = new VarbitRequirement(VarbitID.LUNAR_BRAZIER_LIT, 1); - unlockedDream = new VarbitRequirement(3625, 1); + unlockedDream = new VarbitRequirement(VarbitID.DREAM_CUTSCENE_SEEN, 1); inadaquacyNearby = new NpcCondition(NpcID.DREAM_INADEQUACY); everlastingNearby = new NpcCondition(NpcID.DREAM_EVERLASTING); untouchableNearby = new NpcCondition(NpcID.DREAM_UNTOUCHABLE); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/dwarfcannon/DwarfCannon.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/dwarfcannon/DwarfCannon.java index c376a56f05b..8c2869f0d92 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/dwarfcannon/DwarfCannon.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/dwarfcannon/DwarfCannon.java @@ -1,98 +1,147 @@ +/* + * Copyright (c) 2020, Zoinkwiz + * Copyright (c) 2025, pajlada + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package net.runelite.client.plugins.microbot.questhelper.helpers.quests.dwarfcannon; import net.runelite.client.plugins.microbot.questhelper.collections.ItemCollections; import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; -import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.not; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.widget.WidgetPresenceRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; import net.runelite.client.plugins.microbot.questhelper.rewards.UnlockReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.PuzzleWrapperStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.WidgetStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; +import net.runelite.api.gameval.InterfaceID; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; - -import java.util.*; +import net.runelite.api.gameval.VarbitID; public class DwarfCannon extends BasicQuestHelper { - //Items Recommended - ItemRequirement staminas, teleToAsg, teleToKand; - - //Items Required - ItemRequirement hammer, railing, dwarfRemains, toolkit, cannonballMould, nulodionsNotes; - - Requirement upTower1, upTower2, inCave, bar1, bar2, bar3, bar4, bar5, bar6, nearLawgof, springFixed, safetyFixed, cannonFixed; - - QuestStep talkToCaptainLawgof, talkToCaptainLawgof2, gotoTower, goToTower2, talkToCaptainLawgof3, gotoCave, inspectRailings1, inspectRailings2, - inspectRailings3, inspectRailings4, inspectRailings5, inspectRailings6, getRemainsStep, downTower, downTower2, searchCrates, - talkToCaptainLawgof4, useToolkit, talkToCaptainLawgof5, talkToNulodion, talkToCaptainLawgof6; - - //Zones - Zone cave, tower1, tower2, lawgofArea; + // Required items + ItemRequirement hammer; + + // Recommended items + ItemRequirement staminas; + ItemRequirement teleToAsg; + ItemRequirement teleToKand; + + // Zones + Zone cave; + Zone tower1; + Zone tower2; + + // Miscellaneous requirements + ItemRequirement railing; + ItemRequirement dwarfRemains; + ItemRequirement toolkit; + ItemRequirement cannonballMould; + ItemRequirement nulodionsNotes; + + ZoneRequirement upTower1; + ZoneRequirement upTower2; + ZoneRequirement inCave; + VarbitRequirement bar1; + VarbitRequirement bar2; + VarbitRequirement bar3; + VarbitRequirement bar4; + VarbitRequirement bar5; + VarbitRequirement bar6; + Conditions allBarsFixed; + + WidgetPresenceRequirement isPuzzleOpen; + VarbitRequirement toothedToolSelected; + VarbitRequirement pliersSelected; + VarbitRequirement hookSelected; + VarbitRequirement springFixed; + VarbitRequirement safetyFixed; + + // Steps + NpcStep talkToCaptainLawgof; + + NpcStep getRailings; + ObjectStep inspectRailings1; + ObjectStep inspectRailings2; + ObjectStep inspectRailings3; + ObjectStep inspectRailings4; + ObjectStep inspectRailings5; + ObjectStep inspectRailings6; + ConditionalStep cInspectRailings; + NpcStep talkToCaptainLawgof2; + + ObjectStep gotoTower; + ObjectStep goToTower2; + NpcStep talkToCaptainLawgof3; + ObjectStep getRemainsStep; + ObjectStep downTower; + ObjectStep downTower2; + + ObjectStep gotoCave; + ObjectStep searchCrates; + ObjectStep exitCave; + NpcStep talkToCaptainLawgof4; + + PuzzleWrapperStep pwFixMulticannon; + NpcStep talkToCaptainLawgof5; + + NpcStep talkToNulodion; + NpcStep talkToCaptainLawgof6; @Override - public Map loadSteps() + protected void setupZones() { - initializeRequirements(); - setupConditions(); - setupSteps(); - Map steps = new HashMap<>(); - - //Start - steps.put(0, talkToCaptainLawgof); - - //Repair Bars - ConditionalStep fixedRailings = new ConditionalStep(this, inspectRailings1); - fixedRailings.addStep(new Conditions(bar6), talkToCaptainLawgof2); - fixedRailings.addStep(new Conditions(hammer, railing, bar5), inspectRailings6); - fixedRailings.addStep(new Conditions(hammer, railing, bar4), inspectRailings5); - fixedRailings.addStep(new Conditions(hammer, railing, bar3), inspectRailings4); - fixedRailings.addStep(new Conditions(hammer, railing, bar2), inspectRailings3); - fixedRailings.addStep(new Conditions(hammer, railing, bar1), inspectRailings2); - - steps.put(1, fixedRailings); - - //Go to tower, get remains, come back - ConditionalStep getRemains = new ConditionalStep(this, gotoTower); - getRemains.addStep(new Conditions(dwarfRemains, nearLawgof), talkToCaptainLawgof3); - getRemains.addStep(new Conditions(dwarfRemains, upTower1), downTower2); - getRemains.addStep(new Conditions(dwarfRemains, upTower2), downTower); - getRemains.addStep(upTower2, getRemainsStep); - getRemains.addStep(upTower1, goToTower2); - steps.put(2, getRemains); - steps.put(3, getRemains); - - //Go to the cave, find Lollk, return and fix cannon - ConditionalStep findLollk = new ConditionalStep(this, gotoCave); - findLollk.addStep(inCave, searchCrates); - steps.put(4, findLollk); - steps.put(5, findLollk); - - steps.put(6, talkToCaptainLawgof4); - - steps.put(7, useToolkit); - steps.put(8, talkToCaptainLawgof5); - - //Ammo mould and back - ConditionalStep captainLawgofFinal = new ConditionalStep(this, talkToNulodion); - captainLawgofFinal.addStep(new Conditions(nulodionsNotes, cannonballMould), talkToCaptainLawgof6); - steps.put(9, captainLawgofFinal); - steps.put(10, captainLawgofFinal); - - return steps; + cave = new Zone(new WorldPoint(2557, 9790, 0), new WorldPoint(2624, 9859, 0)); + tower1 = new Zone(new WorldPoint(2568, 3439, 1), new WorldPoint(2572, 3445, 1)); + tower2 = new Zone(new WorldPoint(2566, 3445, 2), new WorldPoint(2572, 3441, 2)); } @Override protected void setupRequirements() { + hammer = new ItemRequirement("Hammer", ItemCollections.HAMMER).isNotConsumed().canBeObtainedDuringQuest(); + hammer.setTooltip("Can be found in the small building east of Captain Lawgof."); + staminas = new ItemRequirement("Stamina Potions", ItemCollections.STAMINA_POTIONS); teleToAsg = new ItemRequirement("Teleport to Falador, Amulet of Glory, or Combat Bracelet", ItemID.POH_TABLET_FALADORTELEPORT); @@ -103,65 +152,64 @@ protected void setupRequirements() teleToKand.addAlternates(ItemCollections.SKILLS_NECKLACES); teleToKand.addAlternates(ItemID.POH_TABLET_ARDOUGNETELEPORT); - hammer = new ItemRequirement("Hammer", ItemCollections.HAMMER).isNotConsumed(); railing = new ItemRequirement("Railing", ItemID.MCANNONRAILING1_OBJ); railing.setTooltip("You can get more from Captain Lawgof"); toolkit = new ItemRequirement("Toolkit", ItemID.MCANNONTOOLKIT); toolkit.setHighlightInInventory(true); dwarfRemains = new ItemRequirement("Dwarf Remains", ItemID.MCANNONREMAINS); - cannonballMould = new ItemRequirement("Cannonball Mould", ItemID.AMMO_MOULD); - nulodionsNotes = new ItemRequirement("Nulodion's Notes", ItemID.NULODIONS_NOTES); - } + cannonballMould = new ItemRequirement("Ammo mould", ItemID.AMMO_MOULD); + nulodionsNotes = new ItemRequirement("Nulodion's notes", ItemID.NULODIONS_NOTES); + + bar1 = new VarbitRequirement(VarbitID.MCANNON_RAILING1_FIXED, 1); + bar2 = new VarbitRequirement(VarbitID.MCANNON_RAILING2_FIXED, 1); + bar3 = new VarbitRequirement(VarbitID.MCANNON_RAILING3_FIXED, 1); + bar4 = new VarbitRequirement(VarbitID.MCANNON_RAILING4_FIXED, 1); + bar5 = new VarbitRequirement(VarbitID.MCANNON_RAILING5_FIXED, 1); + bar6 = new VarbitRequirement(VarbitID.MCANNON_RAILING6_FIXED, 1); + + allBarsFixed = and(bar1, bar2, bar3, bar4, bar5, bar6); + + isPuzzleOpen = new WidgetPresenceRequirement(InterfaceID.McannonInterface.ROOT_RECT0); + + toothedToolSelected = new VarbitRequirement(VarbitID.MCANNONMULTI_TOOL1, 1); + pliersSelected = new VarbitRequirement(VarbitID.MCANNONMULTI_TOOL2, 1); + hookSelected = new VarbitRequirement(VarbitID.MCANNONMULTI_TOOL3, 1); + + springFixed = new VarbitRequirement(VarbitID.MCANNON_SPRING_SET, 1); + safetyFixed = new VarbitRequirement(VarbitID.MCANNON_SAFETY_ON, 1); - public void setupConditions() - { - //Varbits - bar1 = new VarbitRequirement(2240, 1); - bar2 = new VarbitRequirement(2241, 1); - bar3 = new VarbitRequirement(2242, 1); - bar4 = new VarbitRequirement(2243, 1); - bar5 = new VarbitRequirement(2244, 1); - bar6 = new VarbitRequirement(2245, 1); - //All Complete varbit 2246 - - springFixed = new VarbitRequirement(2239, 1); - safetyFixed = new VarbitRequirement(2238, 1); - cannonFixed = new VarbitRequirement(2235, 1); - - //Zones upTower1 = new ZoneRequirement(tower1); upTower2 = new ZoneRequirement(tower2); inCave = new ZoneRequirement(cave); - nearLawgof = new ZoneRequirement(lawgofArea); - - } - - @Override - protected void setupZones() - { - cave = new Zone(new WorldPoint(2557, 9790, 0), new WorldPoint(2624, 9859, 0)); - tower1 = new Zone(new WorldPoint(2568, 3439, 1), new WorldPoint(2572, 3445, 1)); - tower2 = new Zone(new WorldPoint(2566, 3445, 2), new WorldPoint(2572, 3441, 2)); - lawgofArea = new Zone(new WorldPoint(2551, 3477, 0), new WorldPoint(2595, 3434, 0)); } public void setupSteps() { talkToCaptainLawgof = new NpcStep(this, NpcID.LAWGOF2, new WorldPoint(2567, 3460, 0), "Talk to Captain Lawgof near the Coal Truck Mining Site (north of Fishing Guild, West of McGrubor's Wood)."); - talkToCaptainLawgof.addDialogStep("Sure, I'd be honoured to join."); - - //Fix the 6 bent railings, these railings don't have different IDs from the normal railings - inspectRailings1 = new ObjectStep(this, ObjectID.MCANNON_RAILING1_MULTILOC, new WorldPoint(2555, 3479, 0), "Inspect the 6 damaged railings around the camp to fix them.", hammer, railing); - inspectRailings2 = new ObjectStep(this, ObjectID.MCANNON_RAILING2_MULTILOC, new WorldPoint(2557, 3468, 0), "Inspect the railings to fix them.", hammer, railing); - inspectRailings3 = new ObjectStep(this, ObjectID.MCANNON_RAILING3_MULTILOC, new WorldPoint(2559, 3458, 0), "Inspect the railings to fix them.", hammer, railing); - inspectRailings4 = new ObjectStep(this, ObjectID.MCANNON_RAILING4_MULTILOC, new WorldPoint(2563, 3457, 0), "Inspect the railings to fix them.", hammer, railing); - inspectRailings5 = new ObjectStep(this, ObjectID.MCANNON_RAILING5_MULTILOC, new WorldPoint(2573, 3457, 0), "Inspect the railings to fix them.", hammer, railing); - inspectRailings6 = new ObjectStep(this, ObjectID.MCANNON_RAILING6_MULTILOC, new WorldPoint(2577, 3457, 0), "Inspect the railings to fix them.", hammer, railing); - inspectRailings1.addSubSteps(inspectRailings2, inspectRailings3, inspectRailings4, inspectRailings5, inspectRailings6); + talkToCaptainLawgof.addDialogStep("Yes."); + + // Fix the 6 bent railings, these railings don't have different IDs from the normal railings + getRailings = new NpcStep(this, NpcID.LAWGOF2, new WorldPoint(2567, 3460, 0), "Talk to Captain Lawgof to get more railings.", hammer, railing); + + inspectRailings1 = new ObjectStep(this, ObjectID.MCANNON_RAILING1_MULTILOC, new WorldPoint(2555, 3479, 0), "", hammer, railing); + inspectRailings2 = new ObjectStep(this, ObjectID.MCANNON_RAILING2_MULTILOC, new WorldPoint(2557, 3468, 0), "", hammer, railing); + inspectRailings3 = new ObjectStep(this, ObjectID.MCANNON_RAILING3_MULTILOC, new WorldPoint(2559, 3458, 0), "", hammer, railing); + inspectRailings4 = new ObjectStep(this, ObjectID.MCANNON_RAILING4_MULTILOC, new WorldPoint(2563, 3457, 0), "", hammer, railing); + inspectRailings5 = new ObjectStep(this, ObjectID.MCANNON_RAILING5_MULTILOC, new WorldPoint(2573, 3457, 0), "", hammer, railing); + inspectRailings6 = new ObjectStep(this, ObjectID.MCANNON_RAILING6_MULTILOC, new WorldPoint(2577, 3457, 0), "", hammer, railing); + + cInspectRailings = new ConditionalStep(this, getRailings, "Inspect the six damaged railings around the camp to fix them."); + cInspectRailings.addStep(and(railing, not(bar1)), inspectRailings1); + cInspectRailings.addStep(and(railing, not(bar2)), inspectRailings2); + cInspectRailings.addStep(and(railing, not(bar3)), inspectRailings3); + cInspectRailings.addStep(and(railing, not(bar4)), inspectRailings4); + cInspectRailings.addStep(and(railing, not(bar5)), inspectRailings5); + cInspectRailings.addStep(and(railing, not(bar6)), inspectRailings6); //Get dwarf remains - talkToCaptainLawgof2 = new NpcStep(this, NpcID.LAWGOF2, new WorldPoint(2567, 3460, 0), "Talk to Captain Lawgof again. Make sure to complete the entire dialogue."); - gotoTower = new ObjectStep(this, ObjectID.LADDER, new WorldPoint(2570, 3441, 0), "Go to the top floor of the tower south of Captain Lawgof and get the remains there."); + talkToCaptainLawgof2 = new NpcStep(this, NpcID.LAWGOF2, new WorldPoint(2567, 3460, 0), "Talk to Captain Lawgof after repairing the damaged railings."); + + gotoTower = new ObjectStep(this, ObjectID.LADDER, new WorldPoint(2570, 3441, 0), "Go to the top floor of the tower, south of Captain Lawgof, and get the remains there."); goToTower2 = new ObjectStep(this, ObjectID.MCANNONLADDER, new WorldPoint(2570, 3443, 1), "Go up the second ladder."); getRemainsStep = new ObjectStep(this, ObjectID.MCANNONREMAINS_MULTILOC, new WorldPoint(2567, 3444, 2), "Get the dwarf remains at the top of the tower."); @@ -172,35 +220,110 @@ public void setupSteps() talkToCaptainLawgof3 = new NpcStep(this, NpcID.LAWGOF2, new WorldPoint(2567, 3460, 0), "Return the remains to Captain Lawgof."); talkToCaptainLawgof3.addSubSteps(downTower, downTower2); - //Cave - gotoCave = new ObjectStep(this, ObjectID.MCANNONCAVE, new WorldPoint(2624, 3393, 0), "Go to the cave entrance east of the Fishing Guild door."); + // Find Lollk in the goblin cave + gotoCave = new ObjectStep(this, ObjectID.MCANNONCAVE, new WorldPoint(2622, 3392, 0), "Enter the goblin cave, east of the Fishing Guild entrance."); searchCrates = new ObjectStep(this, ObjectID.MCANNONCRATEBOY, new WorldPoint(2571, 9850, 0), "Search the crates in the north west corner to find Lollk."); + exitCave = new ObjectStep(this, ObjectID.MCANMUDPILE, new WorldPoint(2621, 9796, 0), "Exit the goblin cave and return to Captain Lawgof."); talkToCaptainLawgof4 = new NpcStep(this, NpcID.LAWGOF2, new WorldPoint(2567, 3460, 0), "Return to Captain Lawgof."); talkToCaptainLawgof4.addDialogStep("Okay, I'll see what I can do."); + talkToCaptainLawgof4.addSubSteps(exitCave); + + // Fix cannon + var actuallyUseToolkit = new ObjectStep(this, ObjectID.MCANNON_CANNON_MULTILOC, new WorldPoint(2563, 3462, 0), "", toolkit.highlighted()); + actuallyUseToolkit.addIcon(ItemID.MCANNONTOOLKIT); + + var clickHook = new WidgetStep(this, "Click the hook and use it on the spring.", InterfaceID.McannonInterface.MCANNON_TOOL3); + var clickSpring = new WidgetStep(this, "Click the hook and use it on the spring.", InterfaceID.McannonInterface.MCANNON_SPRING); + + var clickPliers = new WidgetStep(this, "Click the pliers and use it on the safety switch at the bottom.", InterfaceID.McannonInterface.MCANNON_TOOL2); + var clickSafety = new WidgetStep(this, "Click the pliers and use it on the safety switch at the bottom.", InterfaceID.McannonInterface.MCANNON_SAFETY); + + var clickToothedTool = new WidgetStep(this, "Click the toothed tool and use it on the gear at the bottom.", InterfaceID.McannonInterface.MCANNON_TOOL1); + var clickGear = new WidgetStep(this, "Click the toothed tool and use it on the gear at the bottom.", InterfaceID.McannonInterface.MCANNON_GEAR); - //Fix cannon - // TODO: Update this to highlight widgets as you progress, indicating what tool to use on what - useToolkit = new PuzzleWrapperStep(this, - new ObjectStep(this, ObjectID.MCANNON_CANNON_MULTILOC, new WorldPoint(2563, 3462, 0), - "Use the toolkit on the broken multicannon. Use the right tool on the spring, the middle tool on the Safety switch, and the left tool on the gear."), - new ObjectStep(this, ObjectID.MCANNON_CANNON_MULTILOC, new WorldPoint(2563, 3462, 0), "Use the toolkit on the broken multicannon.")); - useToolkit.addIcon(ItemID.MCANNONTOOLKIT); - talkToCaptainLawgof5 = new NpcStep(this, NpcID.LAWGOF2, new WorldPoint(2567, 3460, 0), "Talk to Captain Lawgof (There will be a short pause in dialogue. Both need to be completed.)."); + var fixCannon = new ConditionalStep(this, actuallyUseToolkit, "Use the toolkit on the broken multicannon, then use the highlighted tool on the highlighted part to fix it."); + fixCannon.addStep(and(isPuzzleOpen, safetyFixed, springFixed, toothedToolSelected), clickGear); + fixCannon.addStep(and(isPuzzleOpen, safetyFixed, springFixed), clickToothedTool); + fixCannon.addStep(and(isPuzzleOpen, not(safetyFixed), pliersSelected), clickSafety); + fixCannon.addStep(and(isPuzzleOpen, not(springFixed), hookSelected), clickSpring); + fixCannon.addStep(and(isPuzzleOpen, not(safetyFixed)), clickPliers); + fixCannon.addStep(and(isPuzzleOpen, not(springFixed)), clickHook); + + pwFixMulticannon = fixCannon.puzzleWrapStepWithDefaultText("Use the toolkit on the broken multicannon."); + pwFixMulticannon.addIcon(ItemID.MCANNONTOOLKIT); + talkToCaptainLawgof5 = new NpcStep(this, NpcID.LAWGOF2, new WorldPoint(2567, 3460, 0), "Talk to Captain Lawgof after repairing the multicannon."); talkToCaptainLawgof5.addDialogStep("Okay then, just for you!"); - //Cannonball mould - talkToNulodion = new NpcStep(this, NpcID.NULODION, new WorldPoint(3012, 3453, 0), "Go talk to Nulodion at the Dwarven Black Guard camp (north-east of Falador, South of Ice Mountain)."); - talkToCaptainLawgof6 = new NpcStep(this, NpcID.LAWGOF2, new WorldPoint(2567, 3460, 0), "Finally, return to Captain Lawgof with the ammo mould and Nulodion's Notes.", nulodionsNotes, cannonballMould); + // Get notes & mould from Nulodion + talkToNulodion = new NpcStep(this, NpcID.NULODION, new WorldPoint(3012, 3453, 0), "Talk to Nulodion at the Dwarven Black Guard camp, south of Ice Mountain."); + talkToCaptainLawgof6 = new NpcStep(this, NpcID.LAWGOF2, new WorldPoint(2567, 3460, 0), "Return to Captain Lawgof with the ammo mould and Nulodion's Notes.", nulodionsNotes, cannonballMould); + } + + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + // Start + steps.put(0, talkToCaptainLawgof); + + // Repair damaged railings + var fixRailings = new ConditionalStep(this, cInspectRailings); + fixRailings.addStep(allBarsFixed, talkToCaptainLawgof2); + fixRailings.addStep(not(railing), getRailings); + steps.put(1, fixRailings); + + // Go to tower, get remains, come back + var getRemains = new ConditionalStep(this, gotoTower); + getRemains.addStep(and(dwarfRemains, upTower1), downTower2); + getRemains.addStep(and(dwarfRemains, upTower2), downTower); + getRemains.addStep(dwarfRemains, talkToCaptainLawgof3); + getRemains.addStep(upTower2, getRemainsStep); + getRemains.addStep(upTower1, goToTower2); + steps.put(2, getRemains); + steps.put(3, getRemains); + + //Go to the cave, find Lollk, return and fix cannon + var findLollk = new ConditionalStep(this, gotoCave); + findLollk.addStep(inCave, searchCrates); + steps.put(4, findLollk); + steps.put(5, findLollk); + + var step6 = new ConditionalStep(this, talkToCaptainLawgof4); + step6.addStep(inCave, exitCave); + steps.put(6, step6); + + steps.put(7, pwFixMulticannon); + steps.put(8, talkToCaptainLawgof5); + + // Ammo mould and back + var captainLawgofFinal = new ConditionalStep(this, talkToNulodion); + captainLawgofFinal.addStep(and(nulodionsNotes, cannonballMould), talkToCaptainLawgof6); + steps.put(9, captainLawgofFinal); + steps.put(10, captainLawgofFinal); + + return steps; + } + + @Override + public List getItemRequirements() + { + return List.of( + hammer + ); } @Override public List getItemRecommended() { - ArrayList reqs = new ArrayList<>(); - reqs.add(staminas); - reqs.add(teleToAsg); - reqs.add(teleToKand); - return reqs; + return List.of( + staminas, + teleToAsg, + teleToKand + ); } @Override @@ -212,25 +335,52 @@ public QuestPointReward getQuestPointReward() @Override public List getExperienceRewards() { - return Collections.singletonList(new ExperienceReward(Skill.CRAFTING, 750)); + return List.of( + new ExperienceReward(Skill.CRAFTING, 750) + ); } @Override public List getUnlockRewards() { - return Arrays.asList( - new UnlockReward("Ability to purchase and use the Dwarf Multicannon."), - new UnlockReward("Ability to make cannonballs.")); + return List.of( + new UnlockReward("Ability to purchase and use the Dwarf Multicannon."), + new UnlockReward("Ability to make cannonballs.") + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); - allSteps.add(new PanelDetails("Starting off", Collections.singletonList(talkToCaptainLawgof))); - allSteps.add(new PanelDetails("Repair and Retrieval", Arrays.asList(inspectRailings1, talkToCaptainLawgof2, gotoTower, talkToCaptainLawgof3))); - allSteps.add(new PanelDetails("Find Lollk and Fix Cannon", Arrays.asList(gotoCave, searchCrates, talkToCaptainLawgof4, useToolkit, talkToCaptainLawgof5))); - allSteps.add(new PanelDetails("Get Ammo Mould", Arrays.asList(talkToNulodion, talkToCaptainLawgof6))); - return allSteps; + var sections = new ArrayList(); + + sections.add(new PanelDetails("Starting off", List.of( + talkToCaptainLawgof + ))); + + sections.add(new PanelDetails("Repair and Retrieval", List.of( + getRailings, + cInspectRailings, + talkToCaptainLawgof2, + gotoTower, + talkToCaptainLawgof3 + ), List.of( + hammer + ))); + + sections.add(new PanelDetails("Finding the lad", List.of( + gotoCave, + searchCrates, + talkToCaptainLawgof4, + pwFixMulticannon, + talkToCaptainLawgof5 + ))); + + sections.add(new PanelDetails("Get Ammo Mould", List.of( + talkToNulodion, + talkToCaptainLawgof6 + ))); + + return sections; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/eadgarsruse/EadgarsRuse.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/eadgarsruse/EadgarsRuse.java index 01cba1f2947..368da68aa6b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/eadgarsruse/EadgarsRuse.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/eadgarsruse/EadgarsRuse.java @@ -50,6 +50,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -337,7 +338,7 @@ public void setupConditions() onMountainPath = new ZoneRequirement(mountainPath1, mountainPath2, mountainPath3, mountainPath4, mountainPath5); inTrollArea1 = new ZoneRequirement(trollArea1); inPrison = new ZoneRequirement(prison); - freedEadgar = new VarbitRequirement(0, 1); + freedEadgar = new VarbitRequirement(VarbitID.TROLL_FREED_EADGAR, 1); hasCellKey2 = cellKey2; inStrongholdFloor1 = new ZoneRequirement(strongholdFloor1); inStrongholdFloor2 = new ZoneRequirement(strongholdFloor2); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/eaglespeak/EaglesPeak.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/eaglespeak/EaglesPeak.java index c2468155580..943ca9da5f7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/eaglespeak/EaglesPeak.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/eaglespeak/EaglesPeak.java @@ -46,6 +46,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -223,34 +224,34 @@ public void setupConditions() bronzeRoomPedestalUp = new ObjectCondition(ObjectID.EAGLEPEAK_NET_TRAP_ACTIVE); bronzeRoomPedestalLowered = new ObjectCondition(ObjectID.EAGLEPEAK_DUNGEON_PEDESTAL_PUZZLE3); inMainCavern = new ZoneRequirement(inMainCave); - spokenToNickolaus = new VarbitRequirement(3110, 3); - spokenOnceToAsyff = new VarbitRequirement(3110, 4); - spokenTwiceToAsyff = new VarbitRequirement(3110, 5); - winch1NotDone = new VarbitRequirement(3101, 0); - winch2NotDone = new VarbitRequirement(3102, 0); - winch3NotDone = new VarbitRequirement(3103, 0); - winch4NotDone = new VarbitRequirement(3104, 0); - hasSolvedBronze = new VarbitRequirement(3105, 0); - hasInspectedSilverPedestal = new VarbitRequirement(3099, 1); - hasInspectedRocks1 = new VarbitRequirement(3099, 2); - hasInspectedRocks2 = new VarbitRequirement(3099, 3); - hasInspectedOpening = new VarbitRequirement(3099, 4); - threatenedKebbit = new VarbitRequirement(3099, 5); + spokenToNickolaus = new VarbitRequirement(VarbitID.EAGLEPEAK_NICKOLAUS_CHAT, 3); + spokenOnceToAsyff = new VarbitRequirement(VarbitID.EAGLEPEAK_NICKOLAUS_CHAT, 4); + spokenTwiceToAsyff = new VarbitRequirement(VarbitID.EAGLEPEAK_NICKOLAUS_CHAT, 5); + winch1NotDone = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE3_WINCH1, 0); + winch2NotDone = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE3_WINCH2, 0); + winch3NotDone = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE3_WINCH3, 0); + winch4NotDone = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE3_WINCH4, 0); + hasSolvedBronze = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE3_NETTRAP, 0); + hasInspectedSilverPedestal = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE2_TRACKING, 1); + hasInspectedRocks1 = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE2_TRACKING, 2); + hasInspectedRocks2 = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE2_TRACKING, 3); + hasInspectedOpening = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE2_TRACKING, 4); + threatenedKebbit = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE2_TRACKING, 5); inSilverRoom = new ZoneRequirement(inSilverRoomZone); inGoldRoom = new ZoneRequirement(inGoldRoomZone1, inGoldRoomZone2); - lever1OriginalPosition = new VarbitRequirement(3092, 0); - lever1Pulled = new VarbitRequirement(3092, 1); - lever2Pulled = new VarbitRequirement(3093, 1); - lever3Pulled = new VarbitRequirement(3090, 1); - lever4Pulled = new VarbitRequirement(3091, 1); - bird1Moved = new VarbitRequirement(3098, 1); - bird2Moved = new VarbitRequirement(3097, 1); - bird3Moved = new VarbitRequirement(3095, 1); - bird4Moved = new VarbitRequirement(3094, 1); - bird5Moved = new VarbitRequirement(3096, 1); - hasInsertedBronzeFeather = new VarbitRequirement(3108, 1); - hasInsertedSilverFeather = new VarbitRequirement(3099, 6); - hasInsertedGoldFeather = new VarbitRequirement(3107, 1); + lever1OriginalPosition = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE1_GATE3, 0); + lever1Pulled = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE1_GATE3, 1); + lever2Pulled = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE1_GATE4, 1); + lever3Pulled = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE1_GATE1, 1); + lever4Pulled = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE1_GATE2, 1); + bird1Moved = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE1_MECHBIRD5, 1); + bird2Moved = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE1_MECHBIRD4, 1); + bird3Moved = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE1_MECHBIRD2, 1); + bird4Moved = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE1_MECHBIRD1, 1); + bird5Moved = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE1_MECHBIRD3, 1); + hasInsertedBronzeFeather = new VarbitRequirement(VarbitID.EAGLEPEAK_EAGLEDOOR_FEATHER3, 1); + hasInsertedSilverFeather = new VarbitRequirement(VarbitID.EAGLEPEAK_PUZZLE2_TRACKING, 6); + hasInsertedGoldFeather = new VarbitRequirement(VarbitID.EAGLEPEAK_EAGLEDOOR_FEATHER1, 1); silverFeatherNearby = new ItemOnTileRequirement(silverFeather); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/elementalworkshopi/ElementalWorkshopI.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/elementalworkshopi/ElementalWorkshopI.java index 2c4a0142ddb..837e251b2fc 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/elementalworkshopi/ElementalWorkshopI.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/elementalworkshopi/ElementalWorkshopI.java @@ -52,6 +52,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.gameval.VarPlayerID; import java.util.ArrayList; @@ -137,8 +138,9 @@ protected void setupRequirements() knife.setHighlightInInventory(true); pickaxe = new ItemRequirement("Any pickaxe", ItemCollections.PICKAXES).isNotConsumed(); needle = new ItemRequirement("Needle", ItemID.NEEDLE).isNotConsumed(); - needle.setTooltip("You can obtain this during the quest"); + needle.setTooltip("Costume needle cannot be used as a substitute. You can obtain this during the quest"); thread = new ItemRequirement("Thread", ItemID.THREAD); + thread.setTooltip("Costume needle cannot be used as a substitute."); leather = new ItemRequirement("Leather", ItemID.LEATHER); leather.setTooltip("You can obtain this during the quest"); @@ -220,19 +222,19 @@ public void setupConditions() inStairwell = new ZoneRequirement(stairwell); inWorkshop = new ZoneRequirement(workshop); - hasSlashedBook = new VarbitRequirement(2057, 1); + hasSlashedBook = new VarbitRequirement(VarbitID.ELEMENTAL_WORKSHOP_KEY, 1); hasReadBook = new VarplayerRequirement(VarPlayerID.ELEMENTAL_WORKSHOP_BITS, true, 1); enteredWall = new VarplayerRequirement(VarPlayerID.ELEMENTAL_WORKSHOP_BITS, true, 15); - foundLeather = new VarbitRequirement(2066, 1); - turnedValve1 = new VarbitRequirement(2059, 1); - turnedValve2 = new VarbitRequirement(2058, 1); - solvedWater = new VarbitRequirement(2060, 1); + foundLeather = new VarbitRequirement(VarbitID.ELEMENTAL_WORKSHOP_LEATHER, 1); + turnedValve1 = new VarbitRequirement(VarbitID.ELEMENTAL_WORKSHOP_GATE2, 1); + turnedValve2 = new VarbitRequirement(VarbitID.ELEMENTAL_WORKSHOP_GATE1, 1); + solvedWater = new VarbitRequirement(VarbitID.ELEMENTAL_WORKSHOP_SWITCH, 1); hasLeatherOrSearched = new Conditions(LogicType.OR, foundLeather, leather); - solvedAir = new VarbitRequirement(2063, 1); - fixedBellow = new VarbitRequirement(2061, 1); + solvedAir = new VarbitRequirement(VarbitID.ELEMENTAL_WORKSHOP_BELLOWS_SWITCH, 1); + fixedBellow = new VarbitRequirement(VarbitID.ELEMENTAL_WORKSHOP_BELLOWS, 1); - solvedFire = new VarbitRequirement(2062, 1); + solvedFire = new VarbitRequirement(VarbitID.ELEMENTAL_WORKSHOP_FIRE, 1); elementalOreNearby = new ItemOnTileRequirement(elementalOre); earthNearby = new NpcCondition(NpcID.ELEM1_QIP_EARTH_ELEMENTAL_ROCK_VERSION); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/elementalworkshopii/ElementalWorkshopII.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/elementalworkshopii/ElementalWorkshopII.java index 3ac4bc5e576..303cb7a12fe 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/elementalworkshopii/ElementalWorkshopII.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/elementalworkshopii/ElementalWorkshopII.java @@ -324,41 +324,41 @@ public void setupConditions() inPipePuzzle = new WidgetModelRequirement(262, 37, 18794); sortedPipes = new Conditions( new Conditions(LogicType.OR, - new VarbitRequirement(2646, 5), - new VarbitRequirement(2647, 5), - new VarbitRequirement(2648, 5) + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_EARTH_PIPE_1_STATE, 5), + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_EARTH_PIPE_2_STATE, 5), + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_EARTH_PIPE_3_STATE, 5) ), new Conditions(LogicType.OR, - new VarbitRequirement(2646, 6), - new VarbitRequirement(2647, 6), - new VarbitRequirement(2648, 6) + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_EARTH_PIPE_1_STATE, 6), + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_EARTH_PIPE_2_STATE, 6), + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_EARTH_PIPE_3_STATE, 6) ), new Conditions(LogicType.OR, - new VarbitRequirement(2646, 13), - new VarbitRequirement(2647, 13), - new VarbitRequirement(2648, 13) + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_EARTH_PIPE_1_STATE, 13), + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_EARTH_PIPE_2_STATE, 13), + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_EARTH_PIPE_3_STATE, 13) ) ); - repairedPipe = new VarbitRequirement(2650, 1); + repairedPipe = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_WATER_STATE, 1); hasSmallCog = new Conditions(LogicType.OR, smallCog, - new VarbitRequirement(2655, 1), - new VarbitRequirement(2656, 1), - new VarbitRequirement(2657, 1) + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_AIR_COG1, 1), + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_AIR_COG2, 1), + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_AIR_COG3, 1) ); hasMediumCog = new Conditions(LogicType.OR, mediumCog, - new VarbitRequirement(2655, 2), - new VarbitRequirement(2656, 2), - new VarbitRequirement(2657, 2) + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_AIR_COG1, 2), + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_AIR_COG2, 2), + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_AIR_COG3, 2) ); hasLargeCog = new Conditions(LogicType.OR, largeCog, - new VarbitRequirement(2655, 3), - new VarbitRequirement(2656, 3), - new VarbitRequirement(2657, 3) + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_AIR_COG1, 3), + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_AIR_COG2, 3), + new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_AIR_COG3, 3) ); hasPipe = new Conditions(LogicType.OR, repairedPipe, @@ -367,9 +367,9 @@ public void setupConditions() hasCogsAndPipe = new Conditions(hasSmallCog, hasMediumCog, hasLargeCog, hasPipe); - smallCogPlaced = new VarbitRequirement(2655, 1); - mediumCogPlaced = new VarbitRequirement(2656, 2); - largeCogPlaced = new VarbitRequirement(2657, 3); + smallCogPlaced = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_AIR_COG1, 1); + mediumCogPlaced = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_AIR_COG2, 2); + largeCogPlaced = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_AIR_COG3, 3); // This potentially relates to varbit 2664 // Small cog in crate 18614 @@ -377,41 +377,41 @@ public void setupConditions() // Medium cog in crate 18616 // Pipe in crate 18617 - placedBar = new VarbitRequirement(2643, 1); - barHotOnJig = new VarbitRequirement(2643, 2); - flatHotBarOnJig = new VarbitRequirement(2643, 3); - coolFlatBarOnJig = new VarbitRequirement(2643, 4); - airCoolFlatBarOnJig = new VarbitRequirement(2643, 5); - craneLowered = new VarbitRequirement(2645, 1); - craneRaised = new VarbitRequirement(2645, 0); - craneHoldingBar = new VarbitRequirement(2644, 2); - craneAboveLava = new VarbitRequirement(2645, 2); - craneInLava = new VarbitRequirement(2645, 3); - barOutsideLava = new VarbitRequirement(2642, 0); - barUnderPress = new VarbitRequirement(2642, 1); - barOutsideTank = new VarbitRequirement(2642, 2); - barInTunnel = new VarbitRequirement(2642, 3); - craneHoldingHotBar = new VarbitRequirement(2644, 3); - - tankClosed = new VarbitRequirement(2653, 0); - tankOpen = new VarbitRequirement(2653, 1); - grabberOut = new VarbitRequirement(2653, 2); - grabberInWithHotFlatBarDoorOpen = new VarbitRequirement(2653, 4); - grabberInWithHotFlatBarDoorClosed = new VarbitRequirement(2653, 3); - grabberOutWithHotFlatBarDoorOpen = new VarbitRequirement(2653, 5); - grabberInWithCoolFlatBarDoorClosed = new VarbitRequirement(2653, 6); - grabberInWithCoolFlatBarDoorOpened = new VarbitRequirement(2653, 7); - grabberOutWithCoolFlatBar = new VarbitRequirement(2653, 8); - waterInOpen = new VarbitRequirement(2651, 1); - waterInClosed = new VarbitRequirement(2651, 0); - waterOutClosed = new VarbitRequirement(2652, 0); - waterOutOpen = new VarbitRequirement(2652, 1); - waterInTank = new VarbitRequirement(2654, 1); - fanOff = new VarbitRequirement(2660, 0); - fanOn = new VarbitRequirement(2660, 1); - - primedBarPlaced = new VarbitRequirement(2662, 1); - mindBarPlaced = new VarbitRequirement(2662, 2); + placedBar = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_JIG_STATE, 1); + barHotOnJig = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_JIG_STATE, 2); + flatHotBarOnJig = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_JIG_STATE, 3); + coolFlatBarOnJig = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_JIG_STATE, 4); + airCoolFlatBarOnJig = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_JIG_STATE, 5); + craneLowered = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_FIRE_POS, 1); + craneRaised = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_FIRE_POS, 0); + craneHoldingBar = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_FIRE_STATE, 2); + craneAboveLava = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_FIRE_POS, 2); + craneInLava = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_FIRE_POS, 3); + barOutsideLava = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_JIG_POS, 0); + barUnderPress = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_JIG_POS, 1); + barOutsideTank = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_JIG_POS, 2); + barInTunnel = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_JIG_POS, 3); + craneHoldingHotBar = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_FIRE_STATE, 3); + + tankClosed = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_WATER_DOOR, 0); + tankOpen = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_WATER_DOOR, 1); + grabberOut = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_WATER_DOOR, 2); + grabberInWithHotFlatBarDoorOpen = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_WATER_DOOR, 4); + grabberInWithHotFlatBarDoorClosed = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_WATER_DOOR, 3); + grabberOutWithHotFlatBarDoorOpen = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_WATER_DOOR, 5); + grabberInWithCoolFlatBarDoorClosed = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_WATER_DOOR, 6); + grabberInWithCoolFlatBarDoorOpened = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_WATER_DOOR, 7); + grabberOutWithCoolFlatBar = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_WATER_DOOR, 8); + waterInOpen = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_WATER_VALVE_1, 1); + waterInClosed = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_WATER_VALVE_1, 0); + waterOutClosed = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_WATER_VALVE_2, 0); + waterOutOpen = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_WATER_VALVE_2, 1); + waterInTank = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_WATER_LEVEL, 1); + fanOff = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_AIR_FAN_STATE, 0); + fanOn = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_AIR_FAN_STATE, 1); + + primedBarPlaced = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_MIND_JIG, 1); + mindBarPlaced = new VarbitRequirement(VarbitID.ELEMENTAL_QUEST_2_MIND_JIG, 2); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enakhraslament/EnakhrasLament.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enakhraslament/EnakhrasLament.java index 2ad7f0d5977..e637dc28686 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enakhraslament/EnakhrasLament.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enakhraslament/EnakhrasLament.java @@ -55,123 +55,163 @@ public class EnakhrasLament extends BasicQuestHelper { - //Items Required - ItemRequirement pickaxe, chiselHighlighted, sandstone32, sandstone20, base, body, head, granite2, granite, leftArm, rightArm, leftLeg, - rightLeg, kSigil, rSigil, mSigil, zSigil, softClay, camelMould, camelHead, breadOrCake, fireSpellRunes, airSpellRunes, - mapleLog, log, oakLog, willowLog, coal, candle, air2, chaos, earth2, sandstone5, tinderbox, crumbleUndeadRunes, sandstone52, - airStaff, airRuneOrStaff, earthRuneOrStaff, earthStaff; - + // Required items + ItemRequirement pickaxe; + ItemRequirement chiselHighlighted; + ItemRequirement sandstone32; + ItemRequirement sandstone20; + ItemRequirement granite2; + ItemRequirement granite; + ItemRequirement softClay; + ItemRequirement breadOrCake; + ItemRequirement fireSpellRunes; + ItemRequirement airSpellRunes; + ItemRequirement mapleLog; + ItemRequirement log; + ItemRequirement oakLog; + ItemRequirement willowLog; + ItemRequirement coal; + ItemRequirement candle; + ItemRequirement air2; + ItemRequirement chaos; + ItemRequirement earth2; + ItemRequirement sandstone5; + ItemRequirement tinderbox; + ItemRequirement crumbleUndeadRunes; + ItemRequirement sandstone52; + ItemRequirement airStaff; + ItemRequirement airRuneOrStaff; + ItemRequirement earthRuneOrStaff; + ItemRequirement earthStaff; + + // Mid-quest requirements + ItemRequirement base; + ItemRequirement body; + ItemRequirement head; + ItemRequirement leftArm; + ItemRequirement rightArm; + ItemRequirement leftLeg; + ItemRequirement rightLeg; + ItemRequirement kSigil; + ItemRequirement rSigil; + ItemRequirement mSigil; + ItemRequirement zSigil; + ItemRequirement camelMould; + ItemRequirement camelHead; + + // Miscellaneous requirements SpellbookRequirement onNormals; - - Requirement hasPlacedBase, hasTalkedToLazimAfterBase, hasPlacedBody, chiseledStatue, canChooseHead, inTempleEntranceRoom, - inTempleGroundFloor, startedTemple, gottenLimbs, openedDoor1, openedDoor2, openedDoor3, openedDoor4, mPlaced, kPlaced, - rPlaced, zPlaced, goneUpstairs, hasGottenRightArm, hasGottenRightLeg, inCentreRoom, inPuzzleFloor, - fedBread, meltedFountain, cleanedFurnace, litBraziers, litLog, litOak, litWillow, litMaple, litCandle, litCoal, inNorthPuzzleRoom, - inTopRoom, inLastRoom, wallNeedsChisel, finishedWall, protectFromMelee; - - DetailedQuestStep talkToLazim, bringLazim32Sandstone, useChiselOn32Sandstone, placeBase, bringLazim20Sandstone, - useChiselOn20Sandstone, placeBody, talkToLazimToChooseHead, getGranite, craftHead, talkToLazimAboutBody, - chiselStatue, giveLazimHead, talkToLazimInTemple, enterTemple, enterTempleDownLadder, cutOffLimb, takeM, - talkToLazimForHead, enterDoor1, enterDoor2, enterDoor3, enterDoor4, enterKDoor, enterRDoor, enterMDoor, enterZDoor, - takeZ, takeK, takeR, useStoneHeadOnPedestal, useSoftClayOnPedestal, useChiselOnGranite, goUpToPuzzles, useBread, castAirSpell, - castFireSpell, useMapleLog, useOakLog, useLog, useWillowLog, useCoal, useCandle, passBarrier, goUpFromPuzzleRoom, castCrumbleUndead, - goDownToFinalRoom, protectThenTalk, repairWall, useChiselOnWall, talkToAkthankos; - - //Zones - Zone templeEntranceRoom, templeGroundFloor, centreRoom, puzzleFloor, northPuzzleRoom, topRoom, lastRoom; + VarbitRequirement hasPlacedBase; + VarbitRequirement hasTalkedToLazimAfterBase; + VarbitRequirement hasPlacedBody; + VarbitRequirement chiseledStatue; + VarbitRequirement canChooseHead; + ZoneRequirement inTempleEntranceRoom; + ZoneRequirement inTempleGroundFloor; + VarbitRequirement startedTemple; + VarbitRequirement gottenLimbs; + VarbitRequirement openedDoor1; + VarbitRequirement openedDoor2; + VarbitRequirement openedDoor3; + VarbitRequirement openedDoor4; + VarbitRequirement mPlaced; + VarbitRequirement kPlaced; + VarbitRequirement rPlaced; + VarbitRequirement zPlaced; + VarbitRequirement goneUpstairs; + VarbitRequirement hasGottenRightArm; + VarbitRequirement hasGottenRightLeg; + ZoneRequirement inCentreRoom; + ZoneRequirement inPuzzleFloor; + VarbitRequirement fedBread; + VarbitRequirement meltedFountain; + VarbitRequirement cleanedFurnace; + VarbitRequirement litBraziers; + VarbitRequirement litLog; + VarbitRequirement litOak; + VarbitRequirement litWillow; + VarbitRequirement litMaple; + VarbitRequirement litCandle; + VarbitRequirement litCoal; + ZoneRequirement inNorthPuzzleRoom; + ZoneRequirement inTopRoom; + ZoneRequirement inLastRoom; + VarbitRequirement wallNeedsChisel; + VarbitRequirement finishedWall; + PrayerRequirement protectFromMelee; + + // Steps + NpcStep talkToLazim; + NpcStep bringLazim32Sandstone; + DetailedQuestStep useChiselOn32Sandstone; + ObjectStep placeBase; + NpcStep bringLazim20Sandstone; + DetailedQuestStep useChiselOn20Sandstone; + ObjectStep placeBody; + NpcStep talkToLazimToChooseHead; + NpcStep getGranite; + DetailedQuestStep craftHead; + NpcStep talkToLazimAboutBody; + DetailedQuestStep chiselStatue; + NpcStep giveLazimHead; + NpcStep talkToLazimInTemple; + ObjectStep enterTemple; + ObjectStep enterTempleDownLadder; + ObjectStep cutOffLimb; + ObjectStep takeM; + NpcStep talkToLazimForHead; + ObjectStep enterDoor1; + ObjectStep enterDoor2; + ObjectStep enterDoor3; + ObjectStep enterDoor4; + ObjectStep enterKDoor; + ObjectStep enterRDoor; + ObjectStep enterMDoor; + ObjectStep enterZDoor; + ObjectStep takeZ; + ObjectStep takeK; + ObjectStep takeR; + ObjectStep useStoneHeadOnPedestal; + ObjectStep useSoftClayOnPedestal; + DetailedQuestStep useChiselOnGranite; + ObjectStep goUpToPuzzles; + NpcStep useBread; + NpcStep castAirSpell; + NpcStep castFireSpell; + ObjectStep useMapleLog; + ObjectStep useOakLog; + ObjectStep useLog; + ObjectStep useWillowLog; + ObjectStep useCoal; + ObjectStep useCandle; + ObjectStep passBarrier; + ObjectStep goUpFromPuzzleRoom; + NpcStep castCrumbleUndead; + ObjectStep goDownToFinalRoom; + NpcStep protectThenTalk; + ObjectStep repairWall; + ObjectStep useChiselOnWall; + NpcStep talkToAkthankos; + + // Zones + Zone templeEntranceRoom; + Zone templeGroundFloor; + Zone centreRoom; + Zone puzzleFloor; + Zone northPuzzleRoom; + Zone topRoom; + Zone lastRoom; @Override - public Map loadSteps() + protected void setupZones() { - initializeRequirements(); - setupConditions(); - setupSteps(); - Map steps = new HashMap<>(); - - steps.put(0, talkToLazim); - - ConditionalStep makeAndPlaceBase = new ConditionalStep(this, bringLazim32Sandstone); - makeAndPlaceBase.addStep(new Conditions(head, granite), giveLazimHead); - makeAndPlaceBase.addStep(new Conditions(granite2, canChooseHead), craftHead); - makeAndPlaceBase.addStep(canChooseHead, getGranite); - makeAndPlaceBase.addStep(chiseledStatue, talkToLazimToChooseHead); - makeAndPlaceBase.addStep(hasPlacedBody, chiselStatue); - makeAndPlaceBase.addStep(body, placeBody); - makeAndPlaceBase.addStep(sandstone20, useChiselOn20Sandstone); - makeAndPlaceBase.addStep(hasTalkedToLazimAfterBase, bringLazim20Sandstone); - makeAndPlaceBase.addStep(hasPlacedBase, talkToLazimAboutBody); - makeAndPlaceBase.addStep(base, placeBase); - makeAndPlaceBase.addStep(sandstone32, useChiselOn32Sandstone); - - steps.put(10, makeAndPlaceBase); - - ConditionalStep exploreBottomLayer = new ConditionalStep(this, enterTemple); - exploreBottomLayer.addStep(new Conditions(camelHead, inPuzzleFloor), useStoneHeadOnPedestal); - exploreBottomLayer.addStep(camelMould, useChiselOnGranite); - exploreBottomLayer.addStep(inPuzzleFloor, useSoftClayOnPedestal); - exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor, openedDoor1, openedDoor2, openedDoor3, openedDoor4), goUpToPuzzles); - exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor, openedDoor1, openedDoor2, openedDoor3, rSigil), enterDoor4); - exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor, openedDoor1, openedDoor2, openedDoor3), takeR); - exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor, openedDoor1, openedDoor2, kSigil), enterDoor3); - exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor, openedDoor1, openedDoor2), takeK); - // It's possible to skip the rest of this, but it skips some of the quest story and leaves doors locked after you finish, so this encourages players to explore - exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor, openedDoor1, zSigil), enterDoor2); - exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor, openedDoor1), takeZ); - exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor, mSigil), enterDoor1); - exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor), takeM); - exploreBottomLayer.addStep(new Conditions(startedTemple, inTempleGroundFloor), cutOffLimb); - exploreBottomLayer.addStep(inTempleGroundFloor, talkToLazimInTemple); - exploreBottomLayer.addStep(inTempleEntranceRoom, enterTempleDownLadder); - - steps.put(20, exploreBottomLayer); - - ConditionalStep puzzles = new ConditionalStep(this, enterTemple); - puzzles.addStep(new Conditions(fedBread, inPuzzleFloor, meltedFountain, cleanedFurnace, litLog, litOak, litWillow, litMaple, litCandle), useCoal); - puzzles.addStep(new Conditions(fedBread, inPuzzleFloor, meltedFountain, cleanedFurnace, litLog, litOak, litWillow, litMaple), useCandle); - puzzles.addStep(new Conditions(fedBread, inPuzzleFloor, meltedFountain, cleanedFurnace, litLog, litOak, litWillow), useMapleLog); - puzzles.addStep(new Conditions(fedBread, inPuzzleFloor, meltedFountain, cleanedFurnace, litLog, litOak), useWillowLog); - puzzles.addStep(new Conditions(fedBread, inPuzzleFloor, meltedFountain, cleanedFurnace, litLog), useOakLog); - puzzles.addStep(new Conditions(fedBread, inPuzzleFloor, meltedFountain, cleanedFurnace), useLog); - puzzles.addStep(new Conditions(fedBread, inPuzzleFloor, meltedFountain), castAirSpell); - puzzles.addStep(new Conditions(fedBread, inPuzzleFloor), castFireSpell); - puzzles.addStep(inPuzzleFloor, useBread); - puzzles.addStep(inTempleGroundFloor, goUpToPuzzles); - puzzles.addStep(inTempleEntranceRoom, enterTempleDownLadder); - - steps.put(30, puzzles); - - ConditionalStep topFloorPuzzle = new ConditionalStep(this, enterTemple); - topFloorPuzzle.addStep(inTopRoom, castCrumbleUndead); - topFloorPuzzle.addStep(inNorthPuzzleRoom, goUpFromPuzzleRoom); - topFloorPuzzle.addStep(inPuzzleFloor, passBarrier); - topFloorPuzzle.addStep(inTempleGroundFloor, goUpToPuzzles); - topFloorPuzzle.addStep(inTempleEntranceRoom, enterTempleDownLadder); - - steps.put(40, topFloorPuzzle); - - ConditionalStep protectMeleePuzzle = new ConditionalStep(this, enterTemple); - protectMeleePuzzle.addStep(inLastRoom, protectThenTalk); - protectMeleePuzzle.addStep(inTopRoom, goDownToFinalRoom); - protectMeleePuzzle.addStep(inNorthPuzzleRoom, goUpFromPuzzleRoom); - protectMeleePuzzle.addStep(inPuzzleFloor, passBarrier); - protectMeleePuzzle.addStep(inTempleGroundFloor, goUpToPuzzles); - protectMeleePuzzle.addStep(inTempleEntranceRoom, enterTempleDownLadder); - - steps.put(50, protectMeleePuzzle); - - ConditionalStep repairWallForAkthankos = new ConditionalStep(this, enterTemple); - repairWallForAkthankos.addStep(new Conditions(inLastRoom, wallNeedsChisel), useChiselOnWall); - repairWallForAkthankos.addStep(new Conditions(inLastRoom, finishedWall), talkToAkthankos); - repairWallForAkthankos.addStep(inLastRoom, repairWall); - repairWallForAkthankos.addStep(inTopRoom, goDownToFinalRoom); - repairWallForAkthankos.addStep(inNorthPuzzleRoom, goUpFromPuzzleRoom); - repairWallForAkthankos.addStep(inPuzzleFloor, passBarrier); - repairWallForAkthankos.addStep(inTempleGroundFloor, goUpToPuzzles); - repairWallForAkthankos.addStep(inTempleEntranceRoom, enterTempleDownLadder); - - steps.put(60, repairWallForAkthankos); - - return steps; + templeEntranceRoom = new Zone(new WorldPoint(3124, 9328, 1), new WorldPoint(3128, 9330, 1)); + templeGroundFloor = new Zone(new WorldPoint(3074, 9282, 0), new WorldPoint(3133, 9341, 0)); + centreRoom = new Zone(new WorldPoint(3098, 9306, 0), new WorldPoint(3110, 9318, 0)); + puzzleFloor = new Zone(new WorldPoint(3086, 9305, 1), new WorldPoint(3121, 9326, 1)); + northPuzzleRoom = new Zone(new WorldPoint(2095, 9319, 1), new WorldPoint(3112, 9335, 1)); + topRoom = new Zone(new WorldPoint(3097, 9299, 2), new WorldPoint(3113, 9334, 2)); + lastRoom = new Zone(new WorldPoint(3096, 9291, 1), new WorldPoint(3112, 9302, 1)); } @Override @@ -260,22 +300,7 @@ protected void setupRequirements() tinderbox = new ItemRequirement("Tinderbox", ItemID.TINDERBOX).isNotConsumed(); onNormals = new SpellbookRequirement(Spellbook.NORMAL); - } - @Override - protected void setupZones() - { - templeEntranceRoom = new Zone(new WorldPoint(3124, 9328, 1), new WorldPoint(3128, 9330, 1)); - templeGroundFloor = new Zone(new WorldPoint(3074, 9282, 0), new WorldPoint(3133, 9341, 0)); - centreRoom = new Zone(new WorldPoint(3098, 9306, 0), new WorldPoint(3110, 9318, 0)); - puzzleFloor = new Zone(new WorldPoint(3086, 9305, 1), new WorldPoint(3121, 9326, 1)); - northPuzzleRoom = new Zone(new WorldPoint(2095, 9319, 1), new WorldPoint(3112, 9335, 1)); - topRoom = new Zone(new WorldPoint(3097, 9299, 2), new WorldPoint(3113, 9334, 2)); - lastRoom = new Zone(new WorldPoint(3096, 9291, 1), new WorldPoint(3112, 9302, 1)); - } - - public void setupConditions() - { hasPlacedBase = new VarbitRequirement(VarbitID.ENAKH_STATUE_MULTIVAR, 1); hasPlacedBody = new VarbitRequirement(VarbitID.ENAKH_STATUE_MULTIVAR, 2); chiseledStatue = new VarbitRequirement(VarbitID.ENAKH_STATUE_MULTIVAR, 3); @@ -327,11 +352,15 @@ public void setupConditions() protectFromMelee = new PrayerRequirement("Protect from Melee", Prayer.PROTECT_FROM_MELEE); } + public void setupSteps() { - talkToLazim = new NpcStep(this, NpcID.ENAKH_LAZIM, new WorldPoint(3190, 2925, 0), "Before you begin, ensure that you have enough prayer points to use Protect from Melee for around five seconds (you will need this later in the temple). Talk to Lazim in the quarry south of the Bandit Camp.", pickaxe, onNormals); + talkToLazim = new NpcStep(this, NpcID.ENAKH_LAZIM, new WorldPoint(3190, 2925, 0), "Before you begin, ensure that you have enough prayer points to use" + + " Protect from Melee for around five seconds (you will need this later in the temple). Talk to Lazim in the quarry south of the Bandit Camp.", + pickaxe, onNormals); talkToLazim.addDialogSteps("Yes.", "Of course!"); - bringLazim32Sandstone = new NpcStep(this, NpcID.ENAKH_LAZIM, new WorldPoint(3190, 2925, 0), "Get 32kg of sandstone and give it to Lazim. This can be done in batches, and you can mine some nearby."); + bringLazim32Sandstone = new NpcStep(this, NpcID.ENAKH_LAZIM, new WorldPoint(3190, 2925, 0), "Get 32kg of sandstone and give it to Lazim. This can be " + + "done in batches, and you can mine some nearby."); bringLazim32Sandstone.addDialogStep("Okay, I'll get on with it."); bringLazim32Sandstone.addDialogStep("Yes, I have more stone."); bringLazim32Sandstone.addDialogStep("Here's a large 10 kg block."); @@ -343,7 +372,8 @@ public void setupSteps() talkToLazimAboutBody = new NpcStep(this, NpcID.ENAKH_LAZIM, new WorldPoint(3190, 2925, 0), "Talk to Lazim again."); talkToLazimAboutBody.addDialogStep("I'll do it right away!"); - bringLazim20Sandstone = new NpcStep(this, NpcID.ENAKH_LAZIM, new WorldPoint(3190, 2925, 0), "Get 20kg of sandstone and give it to Lazim. This can be done in batches, and you can mine some nearby."); + bringLazim20Sandstone = new NpcStep(this, NpcID.ENAKH_LAZIM, new WorldPoint(3190, 2925, 0), "Get 20kg of sandstone and give it to Lazim. This can be " + + "done in batches, and you can mine some nearby."); bringLazim20Sandstone.addDialogStep("I'll do it right away!"); bringLazim20Sandstone.addDialogStep("Yes, I have more stone."); bringLazim20Sandstone.addDialogStep("Here's a large 10 kg block."); @@ -353,23 +383,31 @@ public void setupSteps() useChiselOn20Sandstone = new DetailedQuestStep(this, "Use a chisel on the sandstone 20kg.", chiselHighlighted, sandstone20); placeBody = new ObjectStep(this, ObjectID.ENAKH_STATUE_EAST_MULTILOC, new WorldPoint(3190, 2926, 0), "Place the body on the sandstone base.", body); - talkToLazimToChooseHead = new NpcStep(this, NpcID.ENAKH_LAZIM, new WorldPoint(3190, 2925, 0), "Talk to Lazim and choose the head you'd like the statue to have."); + talkToLazimToChooseHead = new NpcStep(this, NpcID.ENAKH_LAZIM, new WorldPoint(3190, 2925, 0), "Talk to Lazim and choose the head you'd like the " + + "statue to have."); getGranite = new NpcStep(this, NpcID.ENAKH_LAZIM, new WorldPoint(3190, 2925, 0), "Get 2 x granite (5kg). You can mine some nearby.", granite2); // TODO: Change head highlight text based on choice - craftHead = new DetailedQuestStep(this, "Use a chisel on a piece of granite 5kg, and choose the head you decided on to craft.", chiselHighlighted, granite); + craftHead = new DetailedQuestStep(this, "Use a chisel on a piece of granite 5kg, and choose the head you decided on to craft.", chiselHighlighted, + granite); - chiselStatue = new ObjectStep(this, ObjectID.ENAKH_STATUE_EAST_MULTILOC, new WorldPoint(3190, 2926, 0), "Use a chisel on the headless statue.", chiselHighlighted); + chiselStatue = new ObjectStep(this, ObjectID.ENAKH_STATUE_EAST_MULTILOC, new WorldPoint(3190, 2926, 0), "Use a chisel on the headless statue.", + chiselHighlighted); chiselStatue.addIcon(ItemID.CHISEL); giveLazimHead = new NpcStep(this, NpcID.ENAKH_LAZIM, new WorldPoint(3190, 2925, 0), "Give Lazim the head.", head); - enterTemple = new ObjectStep(this, ObjectID.ENAKH_SECRET_BOULDER_MULTILOC_E, new WorldPoint(3194, 2925, 0), "Enter the temple south of the Bandit's Camp."); - enterTempleDownLadder = new ObjectStep(this, ObjectID.ENAKH_TEMPLE_LADDERDOWN, new WorldPoint(3127, 9329, 1), "Enter the temple south of the Bandit's Camp."); + enterTemple = new ObjectStep(this, ObjectID.ENAKH_SECRET_BOULDER_MULTILOC_E, new WorldPoint(3194, 2925, 0), "Enter the temple south of the Bandit's " + + "Camp."); + enterTempleDownLadder = new ObjectStep(this, ObjectID.ENAKH_TEMPLE_LADDERDOWN, new WorldPoint(3127, 9329, 1), "Enter the temple south of the Bandit's" + + " Camp."); talkToLazimInTemple = new NpcStep(this, NpcID.ENAKH_LAZIM, new WorldPoint(3127, 9324, 0), "Talk to Lazim in the temple."); - cutOffLimb = new ObjectStep(this, ObjectID.ENAKH_FALLEN_STATUE_EAST_MULTILOC, new WorldPoint(3130, 9326, 0), "Use a chisel on the fallen statue to get all its limbs.", chiselHighlighted); - cutOffLimb.addDialogSteps("Remove the statue's left arm", "Remove the statue's right arm", "Remove the statue's left leg", "Remove the statue's right leg"); + cutOffLimb = new ObjectStep(this, ObjectID.ENAKH_FALLEN_STATUE_EAST_MULTILOC, new WorldPoint(3130, 9326, 0), "Use a chisel on the fallen statue to " + + "get all its limbs.", chiselHighlighted); + cutOffLimb.addDialogSteps("Remove the statue's left arm", "Remove the statue's right arm", "Remove the statue's left leg", "Remove the statue's right" + + " leg"); + cutOffLimb.addIcon(ItemID.CHISEL); takeM = new ObjectStep(this, ObjectID.ENAKH_PEDESTAL_SIGIL_M, new WorldPoint(3128, 9319, 0), "Take the M sigil from the pedestal in the room."); takeZ = new ObjectStep(this, ObjectID.ENAKH_PEDESTAL_SIGIL_Z, new WorldPoint(3097, 9336, 0), "Take the Z sigil from the pedestal in the north room."); @@ -392,101 +430,199 @@ public void setupSteps() enterMDoor = new ObjectStep(this, ObjectID.ENAKH_DOOR_M_SIGIL, new WorldPoint(3097, 9312, 0), "Enter the door with an M.", mSigil); enterZDoor = new ObjectStep(this, ObjectID.ENAKH_DOOR_Z_SIGIL, new WorldPoint(3104, 9305, 0), "Enter the door with a Z.", zSigil); - goUpToPuzzles = new ObjectStep(this, ObjectID.ENAKH_TEMPLE_LADDERUP, new WorldPoint(3104, 9309, 0), "Open the central room's doors using the metal letters. Go up the ladder in the central room."); + goUpToPuzzles = new ObjectStep(this, ObjectID.ENAKH_TEMPLE_LADDERUP, new WorldPoint(3104, 9309, 0), "Open the central room's doors using the metal " + + "letters. Go up the ladder in the central room."); useSoftClayOnPedestal = new ObjectStep(this, ObjectID.ENAKH_PEDESTAL_MULTILOC, new WorldPoint(3104, 9312, 1), "Use soft clay on the pedestal.", softClay.highlighted()); useChiselOnGranite = new DetailedQuestStep(this, "Use a chisel on granite (5kg).", granite, chiselHighlighted); - useStoneHeadOnPedestal = new ObjectStep(this, ObjectID.ENAKH_PEDESTAL_MULTILOC, new WorldPoint(3104, 9312, 1), "Use the camel stone head on the pedestal.", camelHead); + useStoneHeadOnPedestal = new ObjectStep(this, ObjectID.ENAKH_PEDESTAL_MULTILOC, new WorldPoint(3104, 9312, 1), "Use the camel stone head on the " + + "pedestal.", camelHead); useStoneHeadOnPedestal.addIcon(ItemID.ENAKH_STONE_HEAD_AKTHANAKOS); - useBread = new NpcStep(this, NpcID.ENAKH_PENTYN, new WorldPoint(3091, 9324, 1), "Right-click use bread or cake on Pentyn.", breadOrCake.highlighted()); - castFireSpell = new NpcStep(this, NpcID.ENAKH_DUMMY_FOUNTAIN, new WorldPoint(3092, 9308, 1), "Cast a fire spell on the frozen fountain.", fireSpellRunes, onNormals); - castAirSpell = new NpcStep(this, NpcID.ENAKH_DUMMY_FURNACE, new WorldPoint(3116, 9323, 1), "Cast an air spell on the furnace.", airSpellRunes, onNormals); - useMapleLog = new ObjectStep(this, ObjectID.ENAKH_BRAZIER_4_MULTILOC, new WorldPoint(3114, 9309, 1), "Use a maple log on the north west brazier.", mapleLog); - useMapleLog.addIcon(ItemID.MAPLE_LOGS); + useBread = new NpcStep(this, NpcID.ENAKH_PENTYN, new WorldPoint(3091, 9324, 1), "Right-click use bread or cake on Pentyn.", breadOrCake.highlighted()); + castFireSpell = new NpcStep(this, NpcID.ENAKH_DUMMY_FOUNTAIN, new WorldPoint(3092, 9308, 1), "Cast a fire spell on the frozen fountain.", + fireSpellRunes, onNormals); + castAirSpell = new NpcStep(this, NpcID.ENAKH_DUMMY_FURNACE, new WorldPoint(3116, 9323, 1), "Cast an air spell on the furnace.", airSpellRunes, + onNormals); + + // Shadow Room Puzzle + useLog = new ObjectStep(this, ObjectID.ENAKH_BRAZIER_1_MULTILOC, new WorldPoint(3114, 9306, 1), "Use a normal log on the south west brazier.", log); + useLog.addIcon(ItemID.LOGS); useOakLog = new ObjectStep(this, ObjectID.ENAKH_BRAZIER_2_MULTILOC, new WorldPoint(3116, 9306, 1), "Use an oak log on the south brazier.", oakLog); useOakLog.addIcon(ItemID.OAK_LOGS); - useWillowLog = new ObjectStep(this, ObjectID.ENAKH_BRAZIER_1_MULTILOC, new WorldPoint(3114, 9306, 1), "Use a willow log on the south east brazier.", willowLog); + useWillowLog = new ObjectStep(this, ObjectID.ENAKH_BRAZIER_3_MULTILOC, new WorldPoint(3118, 9306, 1), "Use a willow log on the south east brazier.", + willowLog); useWillowLog.addIcon(ItemID.WILLOW_LOGS); - useLog = new ObjectStep(this, ObjectID.ENAKH_BRAZIER_3_MULTILOC, new WorldPoint(3118, 9306, 1), "Use a normal log on the south west brazier.", log); - useLog.addIcon(ItemID.LOGS); - useCoal = new ObjectStep(this, ObjectID.ENAKH_BRAZIER_6_MULTILOC, new WorldPoint(3118, 9309, 1), "Use coal on the north east brazier.", coal); - useCoal.addIcon(ItemID.COAL); + useMapleLog = new ObjectStep(this, ObjectID.ENAKH_BRAZIER_4_MULTILOC, new WorldPoint(3114, 9309, 1), "Use a maple log on the north west brazier.", + mapleLog); + useMapleLog.addIcon(ItemID.MAPLE_LOGS); useCandle = new ObjectStep(this, ObjectID.ENAKH_BRAZIER_5_MULTILOC, new WorldPoint(3116, 9309, 1), "Use a candle on the north brazier.", candle); useCandle.addIcon(ItemID.UNLIT_CANDLE); + useCoal = new ObjectStep(this, ObjectID.ENAKH_BRAZIER_6_MULTILOC, new WorldPoint(3118, 9309, 1), "Use coal on the north east brazier.", coal); + useCoal.addIcon(ItemID.COAL); passBarrier = new ObjectStep(this, ObjectID.ENAKH_MAGIC_WALL, new WorldPoint(3104, 9319, 1), "Pass through the magic barrier and go up the ladder."); goUpFromPuzzleRoom = new ObjectStep(this, ObjectID.ENAKH_TEMPLE_LADDERUP, new WorldPoint(3104, 9332, 1), "Go up the ladder."); passBarrier.addSubSteps(goUpFromPuzzleRoom); - castCrumbleUndead = new NpcStep(this, NpcID.ENAKH_BONEGUARD, new WorldPoint(3104, 9307, 2), "Cast crumble undead on the Boneguard.", earth2, airRuneOrStaff, chaos, onNormals); + castCrumbleUndead = new NpcStep(this, NpcID.ENAKH_BONEGUARD, new WorldPoint(3104, 9307, 2), "Cast crumble undead on the Boneguard.", earth2, + airRuneOrStaff, chaos, onNormals); - goDownToFinalRoom = new ObjectStep(this, ObjectID.ENAKH_TEMPLE_PILLAR_LADDER_TOP, new WorldPoint(3105, 9300, 2), "Climb down the stone ladder past the Boneguard."); + goDownToFinalRoom = new ObjectStep(this, ObjectID.ENAKH_TEMPLE_PILLAR_LADDER_TOP, new WorldPoint(3105, 9300, 2), "Climb down the stone ladder past " + + "the Boneguard."); protectThenTalk = new NpcStep(this, NpcID.ENAKH_AKTHANAKOS_BONEGUARD, new WorldPoint(3105, 9297, 1), "Put on Protect from Melee, then talk to the Boneguard.", protectFromMelee); - repairWall = new ObjectStep(this, ObjectID.ENAKH_LARGEWALL_L_MULTILOC, new WorldPoint(3107, 9291, 1), "Take sandstone from the nearby rubble, and use it to repair the south wall. For each piece added, use a chisel on the wall.", sandstone5); + repairWall = new ObjectStep(this, ObjectID.ENAKH_LARGEWALL_L_MULTILOC, new WorldPoint(3107, 9291, 1), "Take sandstone from the nearby rubble, and use" + + " it to repair the south wall. For each piece added, use a chisel on the wall.", sandstone5); repairWall.addDialogSteps("Of course, I'll help you out.", "Okay, I'll start building."); repairWall.addIcon(ItemID.ENAKH_SANDSTONE_MEDIUM); - useChiselOnWall = new ObjectStep(this, ObjectID.ENAKH_LARGEWALL_L_MULTILOC, new WorldPoint(3107, 9291, 1), "Use a chisel on the wall.", chiselHighlighted); + useChiselOnWall = new ObjectStep(this, ObjectID.ENAKH_LARGEWALL_L_MULTILOC, new WorldPoint(3107, 9291, 1), "Use a chisel on the wall.", + chiselHighlighted); useChiselOnWall.addDialogSteps("Of course, I'll help you out.", "Okay, I'll start building."); useChiselOnWall.addIcon(ItemID.CHISEL); repairWall.addSubSteps(useChiselOnWall); talkToAkthankos = new NpcStep(this, NpcID.ENAKH_AKTHANAKOS_BONEGUARD, new WorldPoint(3105, 9297, 1), "Talk to the Boneguard to finish the quest."); - ((NpcStep) talkToAkthankos).addAlternateNpcs(NpcID.ENAKH_AKTHANAKOS_FREED); + talkToAkthankos.addAlternateNpcs(NpcID.ENAKH_AKTHANAKOS_FREED); + + } + + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + steps.put(0, talkToLazim); + + ConditionalStep makeAndPlaceBase = new ConditionalStep(this, bringLazim32Sandstone); + makeAndPlaceBase.addStep(new Conditions(head, granite), giveLazimHead); + makeAndPlaceBase.addStep(new Conditions(granite2, canChooseHead), craftHead); + makeAndPlaceBase.addStep(canChooseHead, getGranite); + makeAndPlaceBase.addStep(chiseledStatue, talkToLazimToChooseHead); + makeAndPlaceBase.addStep(hasPlacedBody, chiselStatue); + makeAndPlaceBase.addStep(body, placeBody); + makeAndPlaceBase.addStep(sandstone20, useChiselOn20Sandstone); + makeAndPlaceBase.addStep(hasTalkedToLazimAfterBase, bringLazim20Sandstone); + makeAndPlaceBase.addStep(hasPlacedBase, talkToLazimAboutBody); + makeAndPlaceBase.addStep(base, placeBase); + makeAndPlaceBase.addStep(sandstone32, useChiselOn32Sandstone); + + steps.put(10, makeAndPlaceBase); + ConditionalStep exploreBottomLayer = new ConditionalStep(this, enterTemple); + exploreBottomLayer.addStep(new Conditions(camelHead, inPuzzleFloor), useStoneHeadOnPedestal); + exploreBottomLayer.addStep(camelMould, useChiselOnGranite); + exploreBottomLayer.addStep(inPuzzleFloor, useSoftClayOnPedestal); + exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor, openedDoor1, openedDoor2, openedDoor3, openedDoor4), goUpToPuzzles); + exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor, openedDoor1, openedDoor2, openedDoor3, rSigil), enterDoor4); + exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor, openedDoor1, openedDoor2, openedDoor3), takeR); + exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor, openedDoor1, openedDoor2, kSigil), enterDoor3); + exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor, openedDoor1, openedDoor2), takeK); + // It's possible to skip the rest of this, but it skips some of the quest story and leaves doors locked after you finish, so this encourages players + // to explore + exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor, openedDoor1, zSigil), enterDoor2); + exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor, openedDoor1), takeZ); + exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor, mSigil), enterDoor1); + exploreBottomLayer.addStep(new Conditions(gottenLimbs, inTempleGroundFloor), takeM); + exploreBottomLayer.addStep(new Conditions(startedTemple, inTempleGroundFloor), cutOffLimb); + exploreBottomLayer.addStep(inTempleGroundFloor, talkToLazimInTemple); + exploreBottomLayer.addStep(inTempleEntranceRoom, enterTempleDownLadder); + + steps.put(20, exploreBottomLayer); + + ConditionalStep puzzles = new ConditionalStep(this, enterTemple); + puzzles.addStep(new Conditions(fedBread, inPuzzleFloor, meltedFountain, cleanedFurnace, litLog, litOak, litWillow, litMaple, litCandle), useCoal); + puzzles.addStep(new Conditions(fedBread, inPuzzleFloor, meltedFountain, cleanedFurnace, litLog, litOak, litWillow, litMaple), useCandle); + puzzles.addStep(new Conditions(fedBread, inPuzzleFloor, meltedFountain, cleanedFurnace, litLog, litOak, litWillow), useMapleLog); + puzzles.addStep(new Conditions(fedBread, inPuzzleFloor, meltedFountain, cleanedFurnace, litLog, litOak), useWillowLog); + puzzles.addStep(new Conditions(fedBread, inPuzzleFloor, meltedFountain, cleanedFurnace, litLog), useOakLog); + puzzles.addStep(new Conditions(fedBread, inPuzzleFloor, meltedFountain, cleanedFurnace), useLog); + puzzles.addStep(new Conditions(fedBread, inPuzzleFloor, meltedFountain), castAirSpell); + puzzles.addStep(new Conditions(fedBread, inPuzzleFloor), castFireSpell); + puzzles.addStep(inPuzzleFloor, useBread); + puzzles.addStep(inTempleGroundFloor, goUpToPuzzles); + puzzles.addStep(inTempleEntranceRoom, enterTempleDownLadder); + + steps.put(30, puzzles); + + ConditionalStep topFloorPuzzle = new ConditionalStep(this, enterTemple); + topFloorPuzzle.addStep(inTopRoom, castCrumbleUndead); + topFloorPuzzle.addStep(inNorthPuzzleRoom, goUpFromPuzzleRoom); + topFloorPuzzle.addStep(inPuzzleFloor, passBarrier); + topFloorPuzzle.addStep(inTempleGroundFloor, goUpToPuzzles); + topFloorPuzzle.addStep(inTempleEntranceRoom, enterTempleDownLadder); + + steps.put(40, topFloorPuzzle); + + ConditionalStep protectMeleePuzzle = new ConditionalStep(this, enterTemple); + protectMeleePuzzle.addStep(inLastRoom, protectThenTalk); + protectMeleePuzzle.addStep(inTopRoom, goDownToFinalRoom); + protectMeleePuzzle.addStep(inNorthPuzzleRoom, goUpFromPuzzleRoom); + protectMeleePuzzle.addStep(inPuzzleFloor, passBarrier); + protectMeleePuzzle.addStep(inTempleGroundFloor, goUpToPuzzles); + protectMeleePuzzle.addStep(inTempleEntranceRoom, enterTempleDownLadder); + + steps.put(50, protectMeleePuzzle); + + ConditionalStep repairWallForAkthankos = new ConditionalStep(this, enterTemple); + repairWallForAkthankos.addStep(new Conditions(inLastRoom, wallNeedsChisel), useChiselOnWall); + repairWallForAkthankos.addStep(new Conditions(inLastRoom, finishedWall), talkToAkthankos); + repairWallForAkthankos.addStep(inLastRoom, repairWall); + repairWallForAkthankos.addStep(inTopRoom, goDownToFinalRoom); + repairWallForAkthankos.addStep(inNorthPuzzleRoom, goUpFromPuzzleRoom); + repairWallForAkthankos.addStep(inPuzzleFloor, passBarrier); + repairWallForAkthankos.addStep(inTempleGroundFloor, goUpToPuzzles); + repairWallForAkthankos.addStep(inTempleEntranceRoom, enterTempleDownLadder); + + steps.put(60, repairWallForAkthankos); + + return steps; } @Override public List getItemRequirements() { - ArrayList reqs = new ArrayList<>(); - reqs.add(pickaxe); - reqs.add(chiselHighlighted); - reqs.add(softClay); - reqs.add(breadOrCake); - reqs.add(tinderbox); - reqs.add(log); - reqs.add(oakLog); - reqs.add(willowLog); - reqs.add(mapleLog); - reqs.add(candle); - reqs.add(coal); - reqs.add(fireSpellRunes); - reqs.add(airSpellRunes); - reqs.add(crumbleUndeadRunes); - int miningLevel = client.getRealSkillLevel(Skill.MINING); - if (miningLevel < 45) - { - reqs.add(granite2); - } - if (miningLevel < 35) - { - reqs.add(sandstone52); - } - return reqs; + return List.of( + pickaxe, + chiselHighlighted, + softClay, + breadOrCake, + tinderbox, + log, + oakLog, + willowLog, + mapleLog, + candle, + coal, + fireSpellRunes, + airSpellRunes, + crumbleUndeadRunes, + granite2.hideConditioned(new SkillRequirement(Skill.MINING, 45)), + sandstone52.hideConditioned(new SkillRequirement(Skill.MINING, 35)) + ); } @Override public List getGeneralRecommended() { - ArrayList req = new ArrayList<>(); - req.add(onNormals); - return req; + return List.of(onNormals); } @Override public List getGeneralRequirements() { - ArrayList req = new ArrayList<>(); - req.add(new SkillRequirement(Skill.CRAFTING, 50)); - req.add(new SkillRequirement(Skill.FIREMAKING, 45, true)); - req.add(new SkillRequirement(Skill.PRAYER, 43)); - req.add(new SkillRequirement(Skill.MAGIC, 39)); - return req; + return List.of( + new SkillRequirement(Skill.CRAFTING, 50), + new SkillRequirement(Skill.FIREMAKING, 45, true), + new SkillRequirement(Skill.PRAYER, 43), + new SkillRequirement(Skill.MAGIC, 39) + ); } @Override @@ -498,31 +634,50 @@ public QuestPointReward getQuestPointReward() @Override public List getExperienceRewards() { - return Arrays.asList( - new ExperienceReward(Skill.CRAFTING, 7000), - new ExperienceReward(Skill.MINING, 7000), - new ExperienceReward(Skill.FIREMAKING, 7000), - new ExperienceReward(Skill.MAGIC, 7000)); + return List.of( + new ExperienceReward(Skill.CRAFTING, 7000), + new ExperienceReward(Skill.MINING, 7000), + new ExperienceReward(Skill.FIREMAKING, 7000), + new ExperienceReward(Skill.MAGIC, 7000) + ); } @Override public List getItemRewards() { - return Collections.singletonList(new ItemReward("Akthanakos's Camulet", ItemID.CAMULET, 1)); + return List.of( + new ItemReward("Akthanakos's Camulet", ItemID.CAMULET, 1) + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); - allSteps.add(new PanelDetails("Starting off", Collections.singletonList(talkToLazim))); - allSteps.add(new PanelDetails("Craft a statue", Arrays.asList(bringLazim32Sandstone, useChiselOn32Sandstone, placeBase, talkToLazimAboutBody, - bringLazim20Sandstone, useChiselOn20Sandstone, placeBody, chiselStatue, talkToLazimToChooseHead, getGranite, craftHead, giveLazimHead), - pickaxe, chiselHighlighted, softClay, breadOrCake, tinderbox, log, oakLog, willowLog, mapleLog, candle, coal, fireSpellRunes, airSpellRunes, earth2, air2, chaos)); - allSteps.add(new PanelDetails("Explore the ground floor", Arrays.asList(talkToLazimInTemple, cutOffLimb, takeM, enterDoor1, enterDoor2, enterMDoor, goUpToPuzzles))); - allSteps.add(new PanelDetails("Solve the puzzles", Arrays.asList(useSoftClayOnPedestal, useChiselOnGranite, useStoneHeadOnPedestal, useBread, castFireSpell, castAirSpell, - useLog, useOakLog, useWillowLog, useMapleLog, useCandle, useCoal))); - allSteps.add(new PanelDetails("Free Akthankos", Arrays.asList(passBarrier, goUpFromPuzzleRoom, castCrumbleUndead, goDownToFinalRoom, protectThenTalk, repairWall, talkToAkthankos))); + var allSteps = new ArrayList(); + + allSteps.add(new PanelDetails("Starting off", List.of( + talkToLazim + ))); + + allSteps.add(new PanelDetails("Craft a statue", List.of( + bringLazim32Sandstone, useChiselOn32Sandstone, placeBase, talkToLazimAboutBody, bringLazim20Sandstone, + useChiselOn20Sandstone, placeBody, chiselStatue, talkToLazimToChooseHead, getGranite, craftHead, giveLazimHead + ), List.of(pickaxe, chiselHighlighted, softClay, breadOrCake, tinderbox, log, oakLog, willowLog, mapleLog, candle, coal, fireSpellRunes, + airSpellRunes, earth2, air2, chaos + ))); + + allSteps.add(new PanelDetails("Explore the ground floor", List.of( + talkToLazimInTemple, cutOffLimb, takeM, enterDoor1, enterDoor2, enterMDoor, goUpToPuzzles + ))); + + allSteps.add(new PanelDetails("Solve the puzzles", List.of( + useSoftClayOnPedestal, useChiselOnGranite, useStoneHeadOnPedestal, useBread, castFireSpell, castAirSpell, + useLog, useOakLog, useWillowLog, useMapleLog, useCandle, useCoal + ))); + + allSteps.add(new PanelDetails("Free Akthankos", List.of( + passBarrier, goUpFromPuzzleRoom, castCrumbleUndead, goDownToFinalRoom, protectThenTalk, repairWall, talkToAkthankos + ))); return allSteps; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enlightenedjourney/BalloonFlightStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enlightenedjourney/BalloonFlightStep.java index f2cf4255912..a5186881d73 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enlightenedjourney/BalloonFlightStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enlightenedjourney/BalloonFlightStep.java @@ -35,6 +35,7 @@ import net.runelite.api.events.GameTick; import net.runelite.api.events.VarbitChanged; import net.runelite.api.gameval.NpcID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; import java.util.Arrays; @@ -92,9 +93,9 @@ protected void updateSteps() return; } - int section = client.getVarbitValue(2884); - int xPos = client.getVarbitValue(2882); - int yPos = client.getVarbitValue(2883); + int section = client.getVarbitValue(VarbitID.ZEP_IF_CURRENT_MAP); + int xPos = client.getVarbitValue(VarbitID.ZEP_IF_SCREEN_DIST); + int yPos = client.getVarbitValue(VarbitID.ZEP_IF_BALLOON_HEIGHT); if (sections.get(section) == null) return; // If we've gone to next section before updating the pos, return diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enlightenedjourney/EnlightenedJourney.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enlightenedjourney/EnlightenedJourney.java index fd0ac32ee90..823408f9057 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enlightenedjourney/EnlightenedJourney.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enlightenedjourney/EnlightenedJourney.java @@ -47,6 +47,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -153,7 +154,7 @@ public void setupConditions() onEntrana = new ZoneRequirement(entrana); hasSandbags = new Conditions(LogicType.OR, - new VarbitRequirement(2875, 1), + new VarbitRequirement(VarbitID.ZEP_SANDBAGS, 1), sandbag8); flying = new WidgetTextRequirement(471, 1, "Balloon Controls"); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enlightenedjourney/GiveAugusteItems.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enlightenedjourney/GiveAugusteItems.java index f62af3cafd1..b73e49cb8ed 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enlightenedjourney/GiveAugusteItems.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enlightenedjourney/GiveAugusteItems.java @@ -33,6 +33,7 @@ import net.runelite.api.events.GameTick; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; public class GiveAugusteItems extends NpcStep @@ -54,11 +55,11 @@ public GiveAugusteItems(QuestHelper questHelper) super(questHelper, NpcID.ZEP_PICCARD, new WorldPoint(2809, 3354, 0), "Give Auguste the sandbags, silk, dyes, and bowl.", sandbag8, silk10, redDye, yellowDye, bowl); - givenRedDye = new VarbitRequirement(2873, 1); - givenYellowDye = new VarbitRequirement(2874, 1); // 2879 = 1 as well, maybe both dyes done - givenSandbags = new VarbitRequirement(2875, 1); - givenSilk = new VarbitRequirement(2876, 1); - givenBowl = new VarbitRequirement(2877, 1); + givenRedDye = new VarbitRequirement(VarbitID.ZEP_RDYE, 1); + givenYellowDye = new VarbitRequirement(VarbitID.ZEP_YDYE, 1); // 2879 = 1 as well, maybe both dyes done + givenSandbags = new VarbitRequirement(VarbitID.ZEP_SANDBAGS, 1); + givenSilk = new VarbitRequirement(VarbitID.ZEP_SILK, 1); + givenBowl = new VarbitRequirement(VarbitID.ZEP_LOGS, 1); } @Subscribe diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enlightenedjourney/TaverleyBalloonFlight.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enlightenedjourney/TaverleyBalloonFlight.java index 3206b100304..a6b404b9432 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enlightenedjourney/TaverleyBalloonFlight.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/enlightenedjourney/TaverleyBalloonFlight.java @@ -29,6 +29,7 @@ import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; import net.runelite.client.plugins.microbot.questhelper.steps.WidgetStep; import net.runelite.api.events.VarbitChanged; +import net.runelite.api.gameval.VarbitID; import java.util.ArrayList; import java.util.Arrays; @@ -153,9 +154,9 @@ public void onVarbitChanged(VarbitChanged varbitChanged) protected void updateSteps() { - int section = client.getVarbitValue(2884) - 1; - int xPos = client.getVarbitValue(2882); - int yPos = client.getVarbitValue(2883); + int section = client.getVarbitValue(VarbitID.ZEP_IF_CURRENT_MAP) - 1; + int xPos = client.getVarbitValue(VarbitID.ZEP_IF_SCREEN_DIST); + int yPos = client.getVarbitValue(VarbitID.ZEP_IF_BALLOON_HEIGHT); // If we've gone to next section before updating the pos, return if (sections.get(section).size() <= xPos + 1) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/entertheabyss/EnterTheAbyss.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/entertheabyss/EnterTheAbyss.java index 43054a7ac47..43057442c17 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/entertheabyss/EnterTheAbyss.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/entertheabyss/EnterTheAbyss.java @@ -49,6 +49,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -118,11 +119,11 @@ public void setupConditions() { inWizardBasement = new ZoneRequirement(wizardBasement); - teleportedFromWizardsTower = new VarbitRequirement(2314, 1); - teleportedFromVarrock = new VarbitRequirement(2315, 1); - teleportedFromArdougne = new VarbitRequirement(2316, 1); - teleportedFromDistentor = new VarbitRequirement(2317, 1); - teleportedFromGnome = new VarbitRequirement(2318, 1); + teleportedFromWizardsTower = new VarbitRequirement(VarbitID.RCU_ESSENCESPOT_WIZARDSTOWER, 1); + teleportedFromVarrock = new VarbitRequirement(VarbitID.RCU_ESSENCESPOT_AUBURY, 1); + teleportedFromArdougne = new VarbitRequirement(VarbitID.RCU_ESSENCESPOT_CROMPERTY, 1); + teleportedFromDistentor = new VarbitRequirement(VarbitID.RCU_ESSENCESPOT_BRIMSTAIL, 1); + teleportedFromGnome = new VarbitRequirement(VarbitID.RCU_ESSENCESPOT_WIZARDSGUILD, 1); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ernestthechicken/ErnestTheChicken.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ernestthechicken/ErnestTheChicken.java index ecc5eb571c8..abcaa16ffe1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ernestthechicken/ErnestTheChicken.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ernestthechicken/ErnestTheChicken.java @@ -43,6 +43,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -158,18 +159,18 @@ public void setupConditions() inGroundFloor = new ZoneRequirement(manorGround1, secretRoom, manorGround3); inSecretRoom = new ZoneRequirement(secretRoom); killedFish = new ChatMessageRequirement("... then die and float to the surface."); - isLeverADown = new VarbitRequirement(1788, 1); - isLeverBDown = new VarbitRequirement(1789, 1); - isLeverCDown = new VarbitRequirement(1790, 1); - isLeverDDown = new VarbitRequirement(1791, 1); - isLeverEDown = new VarbitRequirement(1792, 1); - isLeverFDown = new VarbitRequirement(1793, 1); - isLeverAUp = new VarbitRequirement(1788, 0); - isLeverBUp = new VarbitRequirement(1789, 0); - isLeverCUp = new VarbitRequirement(1790, 0); - isLeverDUp = new VarbitRequirement(1791, 0); - isLeverEUp = new VarbitRequirement(1792, 0); - isLeverFUp = new VarbitRequirement(1793, 0); + isLeverADown = new VarbitRequirement(VarbitID.ERNESTLEVER_A, 1); + isLeverBDown = new VarbitRequirement(VarbitID.ERNESTLEVER_B, 1); + isLeverCDown = new VarbitRequirement(VarbitID.ERNESTLEVER_C, 1); + isLeverDDown = new VarbitRequirement(VarbitID.ERNESTLEVER_D, 1); + isLeverEDown = new VarbitRequirement(VarbitID.ERNESTLEVER_E, 1); + isLeverFDown = new VarbitRequirement(VarbitID.ERNESTLEVER_F, 1); + isLeverAUp = new VarbitRequirement(VarbitID.ERNESTLEVER_A, 0); + isLeverBUp = new VarbitRequirement(VarbitID.ERNESTLEVER_B, 0); + isLeverCUp = new VarbitRequirement(VarbitID.ERNESTLEVER_C, 0); + isLeverDUp = new VarbitRequirement(VarbitID.ERNESTLEVER_D, 0); + isLeverEUp = new VarbitRequirement(VarbitID.ERNESTLEVER_E, 0); + isLeverFUp = new VarbitRequirement(VarbitID.ERNESTLEVER_F, 0); inBasement = new ZoneRequirement(basement); inRoomCD = new ZoneRequirement(roomCD); inEmptyRoom = new ZoneRequirement(emptyRoom); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/fairytaleii/FairytaleII.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/fairytaleii/FairytaleII.java index ae99053d107..98c58c2ec3d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/fairytaleii/FairytaleII.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/fairytaleii/FairytaleII.java @@ -53,6 +53,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -214,9 +215,9 @@ public void setupConditions() // 2328 0->1 // 2329 0->2 - hasReadSign = new VarbitRequirement(2338, 4); + hasReadSign = new VarbitRequirement(VarbitID.FAIRY2_SIGN_READ, 4); - hasInvestigatedCertificate = new VarbitRequirement(2336, 1); + hasInvestigatedCertificate = new VarbitRequirement(VarbitID.FAIRY2_CERTIFICUTE_EXAMINED, 1); talkedToGodfather = new VarbitRequirement(QuestVarbits.QUEST_FAIRYTALE_II_CURE_A_QUEEN.getId(), 40, Operation.GREATER_EQUAL); addedFlowerCorrectly = new VarbitRequirement(QuestVarbits.QUEST_FAIRYTALE_II_CURE_A_QUEEN.getId(), 72, Operation.GREATER_EQUAL); @@ -225,7 +226,7 @@ public void setupConditions() // 2334? starflowerNearby = new NpcCondition(NpcID.FAIRY2_STARFLOWER_FULLGROWN); - pickedStarFlower = new VarbitRequirement(2330, 1); + pickedStarFlower = new VarbitRequirement(VarbitID.FAIRYRING_COSMIC_PLANE, 1); clawNearby = new ItemOnTileRequirement(gorakClaw); // 2327 1->2 when searched for certificate diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/fightarena/FightArena.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/fightarena/FightArena.java index 407447983d4..4376f9b050a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/fightarena/FightArena.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/fightarena/FightArena.java @@ -29,10 +29,10 @@ import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.NpcCondition; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirements; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; @@ -42,178 +42,224 @@ import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; -import java.util.*; - public class FightArena extends BasicQuestHelper { - //Items Required - ItemRequirement coins, khazardHelmet, khazardPlatebody, khazardHelmetEquipped, khazardPlatebodyEquipped, khaliBrew, cellKeys; + // Required items + ItemRequirement coins; - //Items Recommended + // Recommended items ItemRequirement combatGear; - Requirement hasKhazardArmour, inArena, inArenaWithOgre, inArenaWithScorpion, inArenaWithBouncer, inCell; - - QuestStep startQuest, searchChest, talkToGuard, buyKhaliBrew, giveKhaliBrew, getCellKeys, openCell, talkToSammy, killOgre, - talkToKhazard, talkToHengrad, talkToSammyForScorpion, killScorpion, talkToSammyForBouncer, killBouncer, leaveArena, endQuest; - - //Zones - Zone arena1, cell; - - @Override - public Map loadSteps() - { - initializeRequirements(); - setupConditions(); - setupSteps(); - - Map steps = new HashMap<>(); - steps.put(0, startQuest); - steps.put(1, searchChest); - - ConditionalStep talkToGuardSteps = new ConditionalStep(this, searchChest); - talkToGuardSteps.addStep(hasKhazardArmour, talkToGuard); - steps.put(2, talkToGuardSteps); - - ConditionalStep giveKhaliBrewSteps = new ConditionalStep(this, searchChest); - giveKhaliBrewSteps.addStep(new Conditions(hasKhazardArmour, khaliBrew), giveKhaliBrew); - giveKhaliBrewSteps.addStep(new Conditions(hasKhazardArmour), buyKhaliBrew); - steps.put(3, giveKhaliBrewSteps); + // Zones + Zone arena1; + Zone cell; - ConditionalStep openCellSteps = new ConditionalStep(this, searchChest); - // You don't need Khazard armour to open the cell, but unless zones are added for the prison, keep the armour - // requirement in case you leave the prison and lose the armour - openCellSteps.addStep(new Conditions(hasKhazardArmour, cellKeys), openCell); - openCellSteps.addStep(new Conditions(hasKhazardArmour), getCellKeys); - steps.put(4, openCellSteps); - steps.put(5, openCellSteps); + // Miscellaneous requirements + ItemRequirement khazardHelmet; + ItemRequirement khazardPlatebody; + ItemRequirement khazardHelmetEquipped; + ItemRequirement khazardPlatebodyEquipped; + ItemRequirement khaliBrew; + ItemRequirement cellKeys; - ConditionalStep killOgreSteps = new ConditionalStep(this, talkToSammy); - killOgreSteps.addStep(new Conditions(inArenaWithOgre), killOgre); - steps.put(6, killOgreSteps); + Requirement hasKhazardArmour; + Requirement inArena; + Requirement inArenaWithOgre; + Requirement inArenaWithScorpion; + Requirement inArenaWithBouncer; + Requirement inCell; - steps.put(7, talkToKhazard); // Step not actually seen, 6->8 when kill Ogre - steps.put(8, talkToKhazard); + // Steps + NpcStep startQuest; + ObjectStep searchChest; + NpcStep talkToGuard; + NpcStep buyKhaliBrew; + NpcStep giveKhaliBrew; + NpcStep getCellKeys; + ObjectStep openCell; + NpcStep talkToSammy; + NpcStep killOgre; + NpcStep talkToKhazard; + NpcStep talkToHengrad; + NpcStep talkToSammyForScorpion; + NpcStep killScorpion; + NpcStep talkToSammyForBouncer; + NpcStep killBouncer; + ObjectStep leaveArena; + NpcStep endQuest; - ConditionalStep inPrisonAndKillScorpionSteps = new ConditionalStep(this, talkToSammyForScorpion); - inPrisonAndKillScorpionSteps.addStep(inCell, talkToHengrad); - inPrisonAndKillScorpionSteps.addStep(new Conditions(inArenaWithScorpion), killScorpion); - steps.put(9, inPrisonAndKillScorpionSteps); - ConditionalStep killBouncerSteps = new ConditionalStep(this, talkToSammyForBouncer); - killBouncerSteps.addStep(new Conditions(inArenaWithBouncer), killBouncer); - steps.put(10, killBouncerSteps); - - ConditionalStep endQuestSteps = new ConditionalStep(this, endQuest); - endQuestSteps.addStep(inArena, leaveArena); - steps.put(11, endQuestSteps); - steps.put(12, endQuestSteps); - steps.put(13, endQuestSteps); - steps.put(14, endQuestSteps); - - return steps; + @Override + protected void setupZones() + { + arena1 = new Zone(new WorldPoint(2583, 3152, 0), new WorldPoint(2606, 3170, 0)); + cell = new Zone(new WorldPoint(2597, 3142, 0), new WorldPoint(2601, 3144, 0)); } @Override protected void setupRequirements() { + inCell = new ZoneRequirement(cell); + inArena = new ZoneRequirement(arena1); + inArenaWithOgre = and(inArena, new NpcCondition(NpcID.ARENA_OGRE, arena1)); + inArenaWithScorpion = and(inArena, new NpcCondition(NpcID.ARENA_SCORPION, arena1)); + inArenaWithBouncer = and(inArena, new NpcCondition(NpcID.ARENA_BOUNCER, arena1)); + coins = new ItemRequirement("Coins", ItemCollections.COINS, 5); + + combatGear = new ItemRequirement("Combat equipment and food (magic/ranged if you want to safe spot)", -1, -1).isNotConsumed(); + combatGear.setDisplayItemId(BankSlotIcons.getCombatGear()); + khazardHelmet = new ItemRequirement("Khazard helmet", ItemID.KHAZARD_HELMET); khazardPlatebody = new ItemRequirement("Khazard armour", ItemID.KHAZARD_PLATEMAIL); - khazardHelmetEquipped = new ItemRequirement("Khazard helmet", ItemID.KHAZARD_HELMET, 1, true); - khazardPlatebodyEquipped = new ItemRequirement("Khazard armour", ItemID.KHAZARD_PLATEMAIL, 1, true); + khazardHelmetEquipped = khazardHelmet.equipped(); + khazardPlatebodyEquipped = khazardPlatebody.equipped(); khaliBrew = new ItemRequirement("Khali brew", ItemID.KHALI_BREW); cellKeys = new ItemRequirement("Khazard cell keys", ItemID.KHAZARD_CELLKEYS); cellKeys.setHighlightInInventory(true); - combatGear = new ItemRequirement("Combat equipment and food (magic/ranged if you want to safe spot)", -1, -1).isNotConsumed(); - combatGear.setDisplayItemId(BankSlotIcons.getCombatGear()); - } - - @Override - protected void setupZones() - { - arena1 = new Zone(new WorldPoint(2583, 3152, 0), new WorldPoint(2606, 3170, 0)); - cell = new Zone(new WorldPoint(2597, 3142, 0), new WorldPoint(2601, 3144, 0)); - } - public void setupConditions() - { hasKhazardArmour = new ItemRequirements(khazardHelmet, khazardPlatebody); - inCell = new ZoneRequirement(cell); - inArena = new ZoneRequirement(arena1); - inArenaWithOgre = new Conditions(inArena, new NpcCondition(NpcID.ARENA_OGRE, arena1)); - inArenaWithScorpion = new Conditions(inArena, new NpcCondition(NpcID.ARENA_SCORPION, arena1)); - inArenaWithBouncer = new Conditions(inArena, new NpcCondition(NpcID.ARENA_BOUNCER, arena1)); } public void setupSteps() { - startQuest = new NpcStep(this, NpcID.LADY_SERVIL_VIS, new WorldPoint(2565, 3199, 0), - "Talk to Lady Servil, west-southwest of the Monastery south of Ardougne."); - startQuest.addDialogStep(2, "Can I help you?"); + startQuest = new NpcStep(this, NpcID.LADY_SERVIL_VIS, new WorldPoint(2565, 3199, 0), "Talk to Lady Servil, west-southwest of the Monastery south of Ardougne."); + startQuest.addDialogStep("Yes."); + searchChest = new ObjectStep(this, ObjectID.ARENA_GUARD_CHEST_SHUT, new WorldPoint(2613, 3189, 0), "Search the chest to the east for some Khazard armour."); - ((ObjectStep) searchChest).addAlternateObjects(ObjectID.ARENA_GUARD_CHEST_OPEN); - talkToGuard = new NpcStep(this, NpcID.ARENA_GUARD2, new WorldPoint(2615, 3143, 0), - "Equip Khazard armour, talk to the Khazard Guard in the southeast of the prison.", khazardHelmetEquipped, khazardPlatebodyEquipped); - buyKhaliBrew = new NpcStep(this, NpcID.KHAZARD_BARMAN, new WorldPoint(2567, 3140, 0), - "Buy Khali brew for 5 coins from the nearby bar to the west.", coins); - buyKhaliBrew.addDialogStep(2, "I'd like a Khali brew please."); - giveKhaliBrew = new NpcStep(this, NpcID.ARENA_GUARD2, new WorldPoint(2615, 3143, 0), - "Take the brew back to the Khazard Guard.", khazardHelmetEquipped, khazardPlatebodyEquipped, khaliBrew); + searchChest.addAlternateObjects(ObjectID.ARENA_GUARD_CHEST_OPEN); + + talkToGuard = new NpcStep(this, NpcID.ARENA_GUARD2, new WorldPoint(2615, 3143, 0), "Equip Khazard armour, talk to the Khazard Guard in the southeast of the prison.", khazardHelmetEquipped, khazardPlatebodyEquipped); + + buyKhaliBrew = new NpcStep(this, NpcID.KHAZARD_BARMAN, new WorldPoint(2567, 3140, 0), "Buy Khali brew from the nearby bar to the west for 5 coins.", coins); + buyKhaliBrew.addDialogStep("I'd like a Khali Brew please."); + + giveKhaliBrew = new NpcStep(this, NpcID.ARENA_GUARD2, new WorldPoint(2615, 3143, 0), "Take the brew back to the Khazard Guard.", khazardHelmetEquipped, khazardPlatebodyEquipped, khaliBrew); + getCellKeys = new NpcStep(this, NpcID.ARENA_GUARD2, new WorldPoint(2615, 3143, 0), "Get another set of keys from the Khazard Guard", khazardHelmetEquipped, khazardPlatebodyEquipped); openCell = new ObjectStep(this, ObjectID.ARENA_JEREMYDOOR, new WorldPoint(2617, 3167, 0), "Get ready to fight the monsters (all safespottable), starting with Khazard Ogre (level 63). Use the keys on Sammy's cell door to free him.", combatGear, cellKeys); openCell.addIcon(ItemID.KHAZARD_CELLKEYS); talkToSammy = new NpcStep(this, NpcID.SAMMY_SERVIL_VIS_NOOP, new WorldPoint(2602, 3153, 0), "Talk to Sammy, then fight the ogre."); - killOgre = new NpcStep(this, NpcID.ARENA_OGRE, new WorldPoint(2601, 3163, 0), - "Kill the Ogre. You can lure it behind a skeleton to safespot it.", combatGear); + + killOgre = new NpcStep(this, NpcID.ARENA_OGRE, new WorldPoint(2601, 3163, 0), "Kill the Ogre. You can lure it behind a skeleton to safespot it.", combatGear); killOgre.addSubSteps(talkToSammy); + killOgre.addSafeSpots(new WorldPoint(2598, 3162, 0)); + talkToKhazard = new NpcStep(this, NpcID.SHADOW_MAJ_KHAZARD, new WorldPoint(2605, 3153, 0), "Talk to General Khazard."); talkToHengrad = new NpcStep(this, NpcID.HENGRAD, new WorldPoint(2599, 3143, 0), "Talk to Hengrad."); talkToHengrad.addSubSteps(talkToKhazard); + talkToSammyForScorpion = new NpcStep(this, NpcID.SAMMY_SERVIL_VIS_NOOP, new WorldPoint(2602, 3153, 0), "Talk to Sammy, then fight the scorpion."); + killScorpion = new NpcStep(this, NpcID.ARENA_SCORPION, new WorldPoint(2601, 3163, 0), "Kill the Scorpion. You can lure it behind a skeleton to safespot it.", combatGear); + killScorpion.addSafeSpots(new WorldPoint(2598, 3162, 0)); killScorpion.addSubSteps(talkToSammyForScorpion); + talkToSammyForBouncer = new NpcStep(this, NpcID.SAMMY_SERVIL_VIS_NOOP, new WorldPoint(2602, 3153, 0), "Talk to Sammy, then fight Bouncer."); - killBouncer = new NpcStep(this, NpcID.ARENA_BOUNCER, new WorldPoint(2601, 3163, 0), - "Kill Bouncer. You can lure it behind a skeleton to safespot it. Warning: After Bouncer is killed, you will be unable to re-enter the arena.", combatGear); + + killBouncer = new NpcStep(this, NpcID.ARENA_BOUNCER, new WorldPoint(2601, 3163, 0), "Kill Bouncer. You can lure it behind a skeleton to safespot it. Warning: After Bouncer is killed, you will be unable to re-enter the arena.", combatGear); + killBouncer.addSafeSpots(new WorldPoint(2598, 3162, 0)); killBouncer.addSubSteps(talkToSammyForBouncer); - leaveArena = new ObjectStep(this, ObjectID.FIGHTARENA_DOOR2, new WorldPoint(2606, 3152, 0), - "Exit the arena (can ignore General Khazard). Warning: You will be unable to re-enter the arena."); + + leaveArena = new ObjectStep(this, ObjectID.FIGHTARENA_DOOR2, new WorldPoint(2606, 3152, 0), "Exit the arena (can ignore General Khazard). Warning: You will be unable to re-enter the arena."); + leaveArena.addDialogStep("Yes."); + endQuest = new NpcStep(this, NpcID.LADY_SERVIL_VIS, new WorldPoint(2565, 3199, 0), "Go back to Lady Servil to end the quest."); } + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + Map steps = new HashMap<>(); + steps.put(0, startQuest); + steps.put(1, searchChest); + + var talkToGuardSteps = new ConditionalStep(this, searchChest); + talkToGuardSteps.addStep(hasKhazardArmour, talkToGuard); + steps.put(2, talkToGuardSteps); + + var giveKhaliBrewSteps = new ConditionalStep(this, searchChest); + giveKhaliBrewSteps.addStep(and(hasKhazardArmour, khaliBrew), giveKhaliBrew); + giveKhaliBrewSteps.addStep(hasKhazardArmour, buyKhaliBrew); + steps.put(3, giveKhaliBrewSteps); + + var openCellSteps = new ConditionalStep(this, searchChest); + // You don't need Khazard armour to open the cell, but unless zones are added for the prison, keep the armour + // requirement in case you leave the prison and lose the armour + openCellSteps.addStep(and(hasKhazardArmour, cellKeys), openCell); + openCellSteps.addStep(hasKhazardArmour, getCellKeys); + steps.put(4, openCellSteps); + steps.put(5, openCellSteps); + + var killOgreSteps = new ConditionalStep(this, talkToSammy); + killOgreSteps.addStep(inArenaWithOgre, killOgre); + steps.put(6, killOgreSteps); + + steps.put(7, talkToKhazard); // Step not actually seen, 6->8 when kill Ogre + steps.put(8, talkToKhazard); + + var inPrisonAndKillScorpionSteps = new ConditionalStep(this, talkToSammyForScorpion); + inPrisonAndKillScorpionSteps.addStep(inCell, talkToHengrad); + inPrisonAndKillScorpionSteps.addStep(inArenaWithScorpion, killScorpion); + steps.put(9, inPrisonAndKillScorpionSteps); + + var killBouncerSteps = new ConditionalStep(this, talkToSammyForBouncer); + killBouncerSteps.addStep(inArenaWithBouncer, killBouncer); + steps.put(10, killBouncerSteps); + + var endQuestSteps = new ConditionalStep(this, endQuest); + endQuestSteps.addStep(inArena, leaveArena); + steps.put(11, endQuestSteps); + steps.put(12, endQuestSteps); + steps.put(13, endQuestSteps); + steps.put(14, endQuestSteps); + + return steps; + } + @Override public List getItemRequirements() { - return Collections.singletonList(coins); + return List.of( + coins + ); } @Override public List getItemRecommended() { - return Collections.singletonList(combatGear); + return List.of( + combatGear + ); } @Override public List getCombatRequirements() { - ArrayList reqs = new ArrayList<>(); - reqs.add("Khazard Scorpion (level 44) (safespottable)"); - reqs.add("Khazard Ogre (level 63) (safespottable)"); - reqs.add("Bouncer (level 137) (safespottable)"); - reqs.add("General Khazard (level 142) (safespottable) (optional)"); - return reqs; + return List.of( + "Khazard Scorpion (level 44) (safespottable)", + "Khazard Ogre (level 63) (safespottable)", + "Bouncer (level 137) (safespottable)", + "General Khazard (level 142) (safespottable) (optional)" + ); } @Override @@ -225,26 +271,52 @@ public QuestPointReward getQuestPointReward() @Override public List getExperienceRewards() { - return Arrays.asList( - new ExperienceReward(Skill.ATTACK, 12175), - new ExperienceReward(Skill.THIEVING, 2175)); + return List.of( + new ExperienceReward(Skill.ATTACK, 12175), + new ExperienceReward(Skill.THIEVING, 2175) + ); } @Override public List getItemRewards() { - return Arrays.asList( - new ItemReward("Coins", ItemID.COINS, 1000), - new ItemReward("Khazard Armor", ItemID.KHAZARD_PLATEMAIL, 1)); + return List.of( + new ItemReward("Coins", ItemID.COINS, 1000), + new ItemReward("Khazard Armor", ItemID.KHAZARD_PLATEMAIL, 1) + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); - allSteps.add(new PanelDetails("Start quest", Arrays.asList(startQuest, searchChest, talkToGuard, buyKhaliBrew, giveKhaliBrew), coins)); - allSteps.add(new PanelDetails("Fight!", Arrays.asList(getCellKeys, openCell, killOgre, talkToHengrad, killScorpion, killBouncer), combatGear)); - allSteps.add(new PanelDetails("Finish quest", Arrays.asList(leaveArena, endQuest))); - return allSteps; + var sections = new ArrayList(); + + sections.add(new PanelDetails("Start quest", List.of( + startQuest, + searchChest, + talkToGuard, + buyKhaliBrew, + giveKhaliBrew + ), List.of( + coins + ))); + + sections.add(new PanelDetails("Fight!", List.of( + getCellKeys, + openCell, + killOgre, + talkToHengrad, + killScorpion, + killBouncer + ), List.of( + combatGear + ))); + + sections.add(new PanelDetails("Finish quest", List.of( + leaveArena, + endQuest + ))); + + return sections; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/fishingcontest/FishingContest.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/fishingcontest/FishingContest.java index 3e1d4c0bf5a..1b47c2b9814 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/fishingcontest/FishingContest.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/fishingcontest/FishingContest.java @@ -37,7 +37,6 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirements; import net.runelite.client.plugins.microbot.questhelper.requirements.player.SkillRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.quest.QuestRequirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicType; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; @@ -55,6 +54,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -213,9 +213,9 @@ public void setupConditions() notInWoods = new Conditions(LogicType.NOR, inWoods); // 2051 0->1 also set for garlic in pipe - hasPutGarlicInPipe = new VarbitRequirement(2054, 1); - needsGarlic = and(LogicHelper.nor(hasPutGarlicInPipe), new ItemRequirements(LogicType.NOR, "", garlic)); - hasEverything = new Conditions(LogicHelper.nor(needsGarlic), redVineWorm, fishingRod); + hasPutGarlicInPipe = new VarbitRequirement(VarbitID.FISHINGCOMPO_STRANGER, 1); + needsGarlic = and(nor(hasPutGarlicInPipe), new ItemRequirements(LogicType.NOR, "", garlic)); + hasEverything = new Conditions(nor(needsGarlic), redVineWorm, fishingRod); enteredContestArea = new Conditions(hasEverything, onContestGrounds); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/forgettabletale/ForgettableTale.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/forgettabletale/ForgettableTale.java index d70a69b1d04..3c6629d3029 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/forgettabletale/ForgettableTale.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/forgettabletale/ForgettableTale.java @@ -420,11 +420,11 @@ public void setupConditions() // Part way through veldeban dialog, told about drunken dwarf: // 824 = 1 - givenBeerToDrunkenDwarf = new VarbitRequirement(838, 1); - rowdyDwarfMadeRequest = new VarbitRequirement(829, 1); - gotRowdySeed = new VarbitRequirement(826, 1); - gotGaussSeed = new VarbitRequirement(827, 1); - gotKhorvakSeed = new VarbitRequirement(828, 1); + givenBeerToDrunkenDwarf = new VarbitRequirement(VarbitID.FORGET_BEER_GIVEN, 1); + rowdyDwarfMadeRequest = new VarbitRequirement(VarbitID.FORGET_SEED2_TOLD, 1); + gotRowdySeed = new VarbitRequirement(VarbitID.FORGET_SEED2_GIVEN, 1); + gotGaussSeed = new VarbitRequirement(VarbitID.FORGET_SEED3_GIVEN, 1); + gotKhorvakSeed = new VarbitRequirement(VarbitID.FORGET_SEED4_GIVEN, 1); // 830 = 1, talked a bit to gauss // 831 = 1, asked about seed from khorvak @@ -440,13 +440,13 @@ public void setupConditions() keldaBrewed = new VarbitRequirement(VarbitID.BREWING_VAT_VARBIT_1, 71, Operation.GREATER_EQUAL); keldaInBarrel = new VarbitRequirement(VarbitID.BREWING_BARREL_VARBIT_1, 3, Operation.GREATER_EQUAL); - inPurple = new VarbitRequirement(578, 1); // Purple Pewter - inYellow = new VarbitRequirement(578, 2); // Yellow Fortune - inBlue = new VarbitRequirement(578, 3); // Blue Opal - inGreen = new VarbitRequirement(578, 4); // Green Gem - inWhite = new VarbitRequirement(578, 5); // White Chisel - inSilver = new VarbitRequirement(578, 6); // Silver Cog - inBrown = new VarbitRequirement(578, 7); // Brown Engine + inPurple = new VarbitRequirement(VarbitID.GIANTDWARF_CURRENT_COMPANY, 1); // Purple Pewter + inYellow = new VarbitRequirement(VarbitID.GIANTDWARF_CURRENT_COMPANY, 2); // Yellow Fortune + inBlue = new VarbitRequirement(VarbitID.GIANTDWARF_CURRENT_COMPANY, 3); // Blue Opal + inGreen = new VarbitRequirement(VarbitID.GIANTDWARF_CURRENT_COMPANY, 4); // Green Gem + inWhite = new VarbitRequirement(VarbitID.GIANTDWARF_CURRENT_COMPANY, 5); // White Chisel + inSilver = new VarbitRequirement(VarbitID.GIANTDWARF_CURRENT_COMPANY, 6); // Silver Cog + inBrown = new VarbitRequirement(VarbitID.GIANTDWARF_CURRENT_COMPANY, 7); // Brown Engine handsFree = new NoItemRequirement("No weapon equipped", ItemSlots.WEAPON); shieldFree = new NoItemRequirement("No shield equipped", ItemSlots.SHIELD); @@ -456,76 +456,76 @@ public void setupConditions() // 863 = 1, Searched box // - searchedBox1 = new VarbitRequirement(863, 1); + searchedBox1 = new VarbitRequirement(VarbitID.FORGET_START_EMPTIED, 1); // 862, 861 are number of green/yellow inPuzzle = new WidgetTextRequirement(248, 53, "Ok"); - donePuzzle1P1 = new VarbitRequirement(842, 2); - donePuzzle1P2 = new VarbitRequirement(844, 1); - searchedPuzzle1Box = new VarbitRequirement(864, 1); + donePuzzle1P1 = new VarbitRequirement(VarbitID.FORGET_IF1, 2); + donePuzzle1P2 = new VarbitRequirement(VarbitID.FORGET_IF3, 1); + searchedPuzzle1Box = new VarbitRequirement(VarbitID.FORGET_BOX1_EMPTIED, 1); // Puzzle 2 - donePuzzle2P1 = new VarbitRequirement(842, 1); - donePuzzle2P2 = new VarbitRequirement(843, 2); - donePuzzle2P3 = new VarbitRequirement(846, 1); - searchedPuzzle258Box = new VarbitRequirement(865, 1); + donePuzzle2P1 = new VarbitRequirement(VarbitID.FORGET_IF1, 1); + donePuzzle2P2 = new VarbitRequirement(VarbitID.FORGET_IF2, 2); + donePuzzle2P3 = new VarbitRequirement(VarbitID.FORGET_IF5, 1); + searchedPuzzle258Box = new VarbitRequirement(VarbitID.FORGET_BOX2_EMPTIED, 1); // Puzzle 3 - donePuzzle3P1 = new VarbitRequirement(842, 2); - donePuzzle3P2 = new VarbitRequirement(844, 2); - donePuzzle3P3 = new VarbitRequirement(847, 1); - donePuzzle3P4 = new VarbitRequirement(848, 1); + donePuzzle3P1 = new VarbitRequirement(VarbitID.FORGET_IF1, 2); + donePuzzle3P2 = new VarbitRequirement(VarbitID.FORGET_IF3, 2); + donePuzzle3P3 = new VarbitRequirement(VarbitID.FORGET_IF6, 1); + donePuzzle3P4 = new VarbitRequirement(VarbitID.FORGET_IF7, 1); // Puzzle 4 inRoom2PuzzleWidget = new WidgetTextRequirement(244, 73, "Ok"); - donePuzzle4P1 = new VarbitRequirement(842, 1); - donePuzzle4P2 = new VarbitRequirement(843, 2); - donePuzzle4P3 = new VarbitRequirement(846, 2); - searchedPuzzle147Box = new VarbitRequirement(864, 1); + donePuzzle4P1 = new VarbitRequirement(VarbitID.FORGET_IF1, 1); + donePuzzle4P2 = new VarbitRequirement(VarbitID.FORGET_IF2, 2); + donePuzzle4P3 = new VarbitRequirement(VarbitID.FORGET_IF5, 2); + searchedPuzzle147Box = new VarbitRequirement(VarbitID.FORGET_BOX1_EMPTIED, 1); // Puzzle 5 - donePuzzle5P1 = new VarbitRequirement(842, 2); - donePuzzle5P2 = new VarbitRequirement(844, 2); - donePuzzle5P3 = new VarbitRequirement(847, 1); - donePuzzle5P4 = new VarbitRequirement(852, 1); + donePuzzle5P1 = new VarbitRequirement(VarbitID.FORGET_IF1, 2); + donePuzzle5P2 = new VarbitRequirement(VarbitID.FORGET_IF3, 2); + donePuzzle5P3 = new VarbitRequirement(VarbitID.FORGET_IF6, 1); + donePuzzle5P4 = new VarbitRequirement(VarbitID.FORGET_IF11, 1); inPuzzle5Room = new ZoneRequirement(puzzle5Room); // Puzzle 6 - donePuzzle6P1 = new VarbitRequirement(842, 1); - donePuzzle6P2 = new VarbitRequirement(843, 1); - donePuzzle6P3 = new VarbitRequirement(845, 2); - donePuzzle6P4 = new VarbitRequirement(851, 1); - donePuzzle6P5 = new VarbitRequirement(853, 2); + donePuzzle6P1 = new VarbitRequirement(VarbitID.FORGET_IF1, 1); + donePuzzle6P2 = new VarbitRequirement(VarbitID.FORGET_IF2, 1); + donePuzzle6P3 = new VarbitRequirement(VarbitID.FORGET_IF4, 2); + donePuzzle6P4 = new VarbitRequirement(VarbitID.FORGET_IF10, 1); + donePuzzle6P5 = new VarbitRequirement(VarbitID.FORGET_IF12, 2); inLibrary = new ZoneRequirement(library); - readBook = new VarbitRequirement(833, 1); - readCrate1 = new VarbitRequirement(834, 1); - readCrate2 = new VarbitRequirement(835, 1); + readBook = new VarbitRequirement(VarbitID.FORGET_ROOM2_BOOKCASE, 1); + readCrate1 = new VarbitRequirement(VarbitID.FORGET_ROOM2_PAPER1, 1); + readCrate2 = new VarbitRequirement(VarbitID.FORGET_ROOM2_PAPER2, 1); // Puzzle 7 inRoom3PuzzleWidget = new WidgetTextRequirement(247, 108, "Ok"); - donePuzzle7P1 = new VarbitRequirement(842, 1); - donePuzzle7P2 = new VarbitRequirement(843, 1); - donePuzzle7P3 = new VarbitRequirement(845, 2); - donePuzzle7P4 = new VarbitRequirement(847, 2); + donePuzzle7P1 = new VarbitRequirement(VarbitID.FORGET_IF1, 1); + donePuzzle7P2 = new VarbitRequirement(VarbitID.FORGET_IF2, 1); + donePuzzle7P3 = new VarbitRequirement(VarbitID.FORGET_IF4, 2); + donePuzzle7P4 = new VarbitRequirement(VarbitID.FORGET_IF6, 2); // Puzzle 8 - donePuzzle8P1 = new VarbitRequirement(842, 2); - donePuzzle8P2 = new VarbitRequirement(844, 2); - donePuzzle8P3 = new VarbitRequirement(846, 2); - donePuzzle8P4 = new VarbitRequirement(848, 1); - donePuzzle8P5 = new VarbitRequirement(850, 1); - donePuzzle8P6 = new VarbitRequirement(853, 1); + donePuzzle8P1 = new VarbitRequirement(VarbitID.FORGET_IF1, 2); + donePuzzle8P2 = new VarbitRequirement(VarbitID.FORGET_IF3, 2); + donePuzzle8P3 = new VarbitRequirement(VarbitID.FORGET_IF5, 2); + donePuzzle8P4 = new VarbitRequirement(VarbitID.FORGET_IF7, 1); + donePuzzle8P5 = new VarbitRequirement(VarbitID.FORGET_IF9, 1); + donePuzzle8P6 = new VarbitRequirement(VarbitID.FORGET_IF12, 1); // Puzzle 9 - donePuzzle9P1 = new VarbitRequirement(842, 1); - donePuzzle9P2 = new VarbitRequirement(843, 1); - donePuzzle9P3 = new VarbitRequirement(845, 2); - donePuzzle9P4 = new VarbitRequirement(847, 1); - donePuzzle9P5 = new VarbitRequirement(849, 2); - donePuzzle9P6 = new VarbitRequirement(852, 1); - donePuzzle9P7 = new VarbitRequirement(855, 2); - donePuzzle9P8 = new VarbitRequirement(858, 2); + donePuzzle9P1 = new VarbitRequirement(VarbitID.FORGET_IF1, 1); + donePuzzle9P2 = new VarbitRequirement(VarbitID.FORGET_IF2, 1); + donePuzzle9P3 = new VarbitRequirement(VarbitID.FORGET_IF4, 2); + donePuzzle9P4 = new VarbitRequirement(VarbitID.FORGET_IF6, 1); + donePuzzle9P5 = new VarbitRequirement(VarbitID.FORGET_IF8, 2); + donePuzzle9P6 = new VarbitRequirement(VarbitID.FORGET_IF11, 1); + donePuzzle9P7 = new VarbitRequirement(VarbitID.FORGET_IF14, 2); + donePuzzle9P8 = new VarbitRequirement(VarbitID.FORGET_IF17, 2); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/gardenoftranquility/GardenOfTranquillity.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/gardenoftranquility/GardenOfTranquillity.java index 7ffb5f1422c..8a33e111406 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/gardenoftranquility/GardenOfTranquillity.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/gardenoftranquility/GardenOfTranquillity.java @@ -286,27 +286,27 @@ protected void setupRequirements() public void setupConditions() { - talkedToElstan = new VarbitRequirement(967, 1); + talkedToElstan = new VarbitRequirement(VarbitID.GARDEN_ELSTAN_VARBIT, 1); plantedMarigold = new VarbitRequirement(VarbitID.GARDEN_ELSTAN_VARBIT, 2, Operation.GREATER_EQUAL); - harvestedMarigold = new VarbitRequirement(967, 3); - givenMarigold = new VarbitRequirement(967, 4); + harvestedMarigold = new VarbitRequirement(VarbitID.GARDEN_ELSTAN_VARBIT, 3); + givenMarigold = new VarbitRequirement(VarbitID.GARDEN_ELSTAN_VARBIT, 4); - talkedToLyra = new VarbitRequirement(968, 1); + talkedToLyra = new VarbitRequirement(VarbitID.GARDEN_LYRA_VARBIT, 1); plantedOnions = new Conditions(LogicType.OR, - new VarbitRequirement(969, 1), // West patch - new VarbitRequirement(970, 1)); // East patch + new VarbitRequirement(VarbitID.GARDEN_PATCH_7_VARBIT, 1), // West patch + new VarbitRequirement(VarbitID.GARDEN_PATCH_8_VARBIT, 1)); // East patch // Planted onion, 4771 3->13 onionsGrown = new VarbitRequirement(VarbitID.GARDEN_LYRA_VARBIT, 2, Operation.GREATER_EQUAL); - talkedToLyraAgain = new VarbitRequirement(968, 3); - talkedToKragen = new VarbitRequirement(971, 1); + talkedToLyraAgain = new VarbitRequirement(VarbitID.GARDEN_LYRA_VARBIT, 3); + talkedToKragen = new VarbitRequirement(VarbitID.GARDEN_KRAGEN_VARBIT, 1); plantedCabbages = new Conditions(LogicType.OR, - new VarbitRequirement(974, 1), // North patch - new VarbitRequirement(975, 1)); // South patch + new VarbitRequirement(VarbitID.GARDEN_PATCH_5_VARBIT, 1), // North patch + new VarbitRequirement(VarbitID.GARDEN_PATCH_6_VARBIT, 1)); // South patch cabbagesGrown = new VarbitRequirement(VarbitID.GARDEN_KRAGEN_VARBIT, 2, Operation.GREATER_EQUAL); - talkedToKragenAgain = new VarbitRequirement(971, 3); + talkedToKragenAgain = new VarbitRequirement(VarbitID.GARDEN_KRAGEN_VARBIT, 3); - talkedToDantaera = new VarbitRequirement(976, 1); - cutShoot = new VarbitRequirement(976, 2); + talkedToDantaera = new VarbitRequirement(VarbitID.GARDEN_DANTAERA_VARBIT, 1); + cutShoot = new VarbitRequirement(VarbitID.GARDEN_DANTAERA_VARBIT, 2); hasPlantedShoot = new Conditions(whiteTreePot); hasWateredShoot = new Conditions(LogicType.OR, new VarbitRequirement(VarbitID.GARDEN_WHITE_TREE_VARBIT, 4, Operation.GREATER_EQUAL), @@ -314,12 +314,12 @@ public void setupConditions() whitetreeSapling); talkedToAlthric = new VarbitRequirement(VarbitID.GARDEN_ALTHRIC_VARBIT, 1, Operation.GREATER_EQUAL); - ringInWell = new VarbitRequirement(966, 1); + ringInWell = new VarbitRequirement(VarbitID.GARDEN_RING_IN_WELL_VARBIT, 1); canPickRoses = new Conditions(LogicType.OR, new VarbitRequirement(VarbitID.GARDEN_ALTHRIC_VARBIT, 2, Operation.GREATER_EQUAL), ringInWell ); - ringNotInWell = new VarbitRequirement(966, 0); + ringNotInWell = new VarbitRequirement(VarbitID.GARDEN_RING_IN_WELL_VARBIT, 0); hasRedRoseSeed = new Conditions(LogicType.OR, redRoseSeed, @@ -335,17 +335,17 @@ public void setupConditions() ); hasRoseSeeds = new Conditions(hasRedRoseSeed, hasWhiteRoseSeed, hasPinkRoseSeed); - talkedToBernald = new VarbitRequirement(988, 1); - usedCureOnVines = new VarbitRequirement(988, 2); - talkedToAlain = new VarbitRequirement(988, 3); - curedVine = new VarbitRequirement(988, 4); + talkedToBernald = new VarbitRequirement(VarbitID.GARDEN_BERNALD_VARBIT, 1); + usedCureOnVines = new VarbitRequirement(VarbitID.GARDEN_BERNALD_VARBIT, 2); + talkedToAlain = new VarbitRequirement(VarbitID.GARDEN_BERNALD_VARBIT, 3); + curedVine = new VarbitRequirement(VarbitID.GARDEN_BERNALD_VARBIT, 4); hasShards = runeShards; hasDust = runeDust; hasEnhancedCure = magicPlantCure; - gotVineSeeds = new VarbitRequirement(988, 5); + gotVineSeeds = new VarbitRequirement(VarbitID.GARDEN_BERNALD_VARBIT, 5); - notAddedCompost1 = new VarbitRequirement(984, 0); - notAddedCompost2 = new VarbitRequirement(986, 0); + notAddedCompost1 = new VarbitRequirement(VarbitID.GARDEN_ORCHIDS_PINK_VARBIT, 0); + notAddedCompost2 = new VarbitRequirement(VarbitID.GARDEN_ORCHIDS_YELLOW_VARBIT, 0); notPlantedDelphinium = new VarbitRequirement(VarbitID.GARDEN_DELPHINIUMS_VARBIT, 3, Operation.LESS_EQUAL); notPlantedYellowOrchid = new VarbitRequirement(VarbitID.GARDEN_ORCHIDS_YELLOW_VARBIT, 1, Operation.LESS_EQUAL); notPlantedPinkOrchid = new VarbitRequirement(VarbitID.GARDEN_ORCHIDS_PINK_VARBIT, 1, Operation.LESS_EQUAL); @@ -363,11 +363,11 @@ public void setupConditions() trolley, new NpcCondition(NpcID.GARDEN_TROLLEY_SARADOMIN)); - lumbridgeStatueOnTrolley = new VarbitRequirement(965, 2); - faladorStatueOnTrolley = new VarbitRequirement(965, 1); + lumbridgeStatueOnTrolley = new VarbitRequirement(VarbitID.GARDEN_TROLLEY_VARBIT, 2); + faladorStatueOnTrolley = new VarbitRequirement(VarbitID.GARDEN_TROLLEY_VARBIT, 1); - placedLumbridgeStatue = new VarbitRequirement(964, 2); - placedFaladorStatue = new VarbitRequirement(963, 2); + placedLumbridgeStatue = new VarbitRequirement(VarbitID.GARDEN_KING_STATUE_VARBIT, 2); + placedFaladorStatue = new VarbitRequirement(VarbitID.GARDEN_SARADOMIN_STATUE_VARBIT, 2); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/gertrudescat/GertrudesCat.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/gertrudescat/GertrudesCat.java index d7d7657e7d1..27dfc073545 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/gertrudescat/GertrudesCat.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/gertrudescat/GertrudesCat.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, Patyfatycake + * Copyright (c) 2025, pajlada * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,226 +28,209 @@ import net.runelite.client.plugins.microbot.questhelper.collections.ItemCollections; import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; +import net.runelite.client.plugins.microbot.questhelper.questinfo.QuestHelperQuest; import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirements; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicType; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; +import net.runelite.client.plugins.microbot.questhelper.requirements.quest.QuestRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; import net.runelite.client.plugins.microbot.questhelper.rewards.UnlockReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; -import java.util.*; - public class GertrudesCat extends BasicQuestHelper { - //Items Required - ItemRequirement bucketOfMilk, coins, seasonedSardine, sardine, doogleLeaves, milkHighlighted, - seasonedSardineHighlighted, kittenHighlighted; + // Required items + ItemRequirement bucketOfMilk; + ItemRequirement coins; + ItemRequirement sardineHighlighted; - ItemRequirement lumberyardTeleport, varrockTeleport; + // Miscellaneous requirements + ItemRequirement seasonedSardine; + ItemRequirement doogleLeaves; + ItemRequirement doogleLeavesHighlighted; + ItemRequirement bucketOfMilkHighlighted; + ItemRequirement seasonedSardineHighlighted; + ItemRequirement kitten; + ItemRequirement kittenHighlighted; - QuestStep talkToGertrude, talkToChildren, gertrudesCat, gertrudesCat2, searchNearbyCrates, - giveKittenToFluffy, finishQuest; + ZoneRequirement isUpstairsLumberyard; - QuestStep pickupDoogle, makeSeasonedSardine; + QuestRequirement hasGivenFluffsMilkAndSardine; - ConditionalStep giveMilkToCatSteps, giveSardineToCat; + ItemRequirement lumberyardTeleport; + ItemRequirement varrockTeleport; - Requirement isUpstairsLumberyard, hasFluffsKitten; + // Steps + NpcStep talkToGertrude; - @Override - public Map loadSteps() - { - initializeRequirements(); - setupConditions(); + DetailedQuestStep pickupDoogle; + DetailedQuestStep makeSeasonedSardine; + NpcStep talkToChildren; - return getSteps(); - } + ObjectStep climbLadder; + QuestStep gertrudesCat; + ConditionalStep cGiveMilkToCat; - private Map getSteps() - { - Map steps = new HashMap<>(); + ObjectStep climbLadder2; + NpcStep gertrudesCat2; + ConditionalStep cGiveSardineToCat; - steps.put(0, talkToGertrude = getTalkToGertrude()); + ObjectStep climbDownLadderStep; + ObjectStep climbUpLadderStep; + NpcStep searchNearbyCrates; + NpcStep giveKittenToFluffy; - talkToChildren = getTalkToChildren(); + NpcStep finishQuest; - ConditionalStep conditionalTalkToChildren = new ConditionalStep(this, pickupDoogle); - conditionalTalkToChildren.addStep(new ItemRequirements(LogicType.AND, "", sardine, doogleLeaves), makeSeasonedSardine); - conditionalTalkToChildren.addStep(seasonedSardine, talkToChildren); - steps.put(1, conditionalTalkToChildren); + @Override + protected void setupZones() + { + Zone zone = new Zone(new WorldPoint(3306, 3507, 12), new WorldPoint(3312, 3513, 1)); - steps.put(2, giveMilkToCatSteps = getGiveMilkToCat()); - steps.put(3, giveSardineToCat = getFeedCat()); - steps.put(4, findFluffsKitten()); - steps.put(5, finishQuest = returnToGertrude()); - return steps; + isUpstairsLumberyard = new ZoneRequirement(zone); } - private NpcStep returnToGertrude() + @Override + protected void setupRequirements() { - return new NpcStep(this, NpcID.GERTRUDE_QUEST, - new WorldPoint(3148, 3413, 0), "Return to Gertrude to complete the quest."); - } + hasGivenFluffsMilkAndSardine = new QuestRequirement(QuestHelperQuest.GERTRUDES_CAT, 4); - private QuestStep findFluffsKitten() - { - //Need to find to ways to hide arrow - searchNearbyCrates = new NpcStep(this, NpcID.KITTENS_MEW, new WorldPoint(3306, 3505, 0), - "Search for a kitten in the crates in the Lumberyard.", true); - ((NpcStep)(searchNearbyCrates)).setHideWorldArrow(true); - ObjectStep climbDownLadderStep = goDownLadderStep(); - ObjectStep climbUpLadderStep = getClimbLadder(); - ArrayList fluffsKittenRequirement = new ArrayList<>(); - fluffsKittenRequirement.add(new ItemRequirement("Fluffs' Kitten", ItemID.GERTRUDEKITTENS)); - climbUpLadderStep.addItemRequirements(fluffsKittenRequirement); - Conditions hasFluffsKittenUpstairs = new Conditions(hasFluffsKitten, isUpstairsLumberyard); - - kittenHighlighted = new ItemRequirement("Fluffs' Kitten", ItemID.GERTRUDEKITTENS); - kittenHighlighted.setHighlightInInventory(true); - - giveKittenToFluffy = getGertrudesCat(kittenHighlighted); - giveKittenToFluffy.setText("Return the kitten to Gertrude's cat."); - giveKittenToFluffy.addIcon(ItemID.GERTRUDEKITTENS); + bucketOfMilk = new ItemRequirement("Bucket of milk", ItemID.BUCKET_MILK).hideConditioned(hasGivenFluffsMilkAndSardine); + bucketOfMilkHighlighted = bucketOfMilk.highlighted(); - ConditionalStep conditionalKitten = new ConditionalStep(this, searchNearbyCrates); - conditionalKitten.addStep(hasFluffsKittenUpstairs, giveKittenToFluffy); - conditionalKitten.addStep(hasFluffsKitten, climbUpLadderStep); - conditionalKitten.addStep(isUpstairsLumberyard, climbDownLadderStep); + coins = new ItemRequirement("Coins", ItemCollections.COINS, 100); - searchNearbyCrates.addSubSteps(climbDownLadderStep); - giveKittenToFluffy.addSubSteps(climbUpLadderStep); + sardineHighlighted = new ItemRequirement("Raw Sardine", ItemID.RAW_SARDINE).highlighted().hideConditioned(hasGivenFluffsMilkAndSardine); - return conditionalKitten; - } + seasonedSardine = new ItemRequirement("Seasoned Sardine", ItemID.SEASONED_SARDINE).hideConditioned(hasGivenFluffsMilkAndSardine); + seasonedSardine.setTooltip("Can be created by using a sardine on Doogle leaves(South of Gertrudes House)"); + seasonedSardineHighlighted = seasonedSardine.highlighted(); - private ObjectStep goDownLadderStep() - { - return new ObjectStep(this, ObjectID.FAI_VARROCK_LADDERTOP, new WorldPoint(3310, 3509, 1), - "Climb down ladder in the Lumberyard."); + doogleLeaves = new ItemRequirement("Doogle Leaves", ItemID.DOOGLELEAVES); + doogleLeavesHighlighted = doogleLeaves.highlighted(); + + kitten = new ItemRequirement("Fluffs' Kitten", ItemID.GERTRUDEKITTENS); + kittenHighlighted = kitten.highlighted(); + + // Teleport recommendations + lumberyardTeleport = new ItemRequirement("Lumberyard teleport", ItemID.TELEPORTSCROLL_LUMBERYARD); + varrockTeleport = new ItemRequirement("Varrock teleports", ItemID.POH_TABLET_VARROCKTELEPORT, 2); } - private ConditionalStep getFeedCat() + public void setupSteps() { - gertrudesCat2 = getGertrudesCat(seasonedSardineHighlighted); - gertrudesCat2.addIcon(ItemID.SEASONED_SARDINE); - - ObjectStep climbLadder = new ObjectStep(this, ObjectID.FAI_VARROCK_LADDER, - new WorldPoint(3310, 3509, 0), "Climb up the ladder in the Lumberyard.", seasonedSardine); + talkToGertrude = new NpcStep(this, NpcID.GERTRUDE_QUEST, new WorldPoint(3148, 3413, 0), "Talk to Gertrude west of Varrock to start the quest."); + talkToGertrude.addDialogStep("Yes."); - ConditionalStep lumberyard = new ConditionalStep(this, climbLadder, "Use a seasoned sardine on Gertrude's cat upstairs in the Lumberyard north east of Varrock."); - lumberyard.addStep(isUpstairsLumberyard, gertrudesCat2); - gertrudesCat2.addSubSteps(climbLadder); + pickupDoogle = new DetailedQuestStep(this, "Pickup some Doogle Leaves south of Gertrude's house.", doogleLeaves, sardineHighlighted); + makeSeasonedSardine = new DetailedQuestStep(this, "Use your Doogle Leaves on the Sardine.", doogleLeavesHighlighted, sardineHighlighted); - return lumberyard; - } + talkToChildren = new NpcStep(this, NpcID.SHILOP, new WorldPoint(3222, 3435, 0), "Talk to Shilop or Wilough in the Varrock Square.", true, seasonedSardine, coins); + talkToChildren.addAlternateNpcs(NpcID.WILOUGH); + talkToChildren.addDialogSteps("What will make you tell me?", "Okay then, I'll pay."); - private ConditionalStep getGiveMilkToCat() - { - gertrudesCat = getGertrudesCat(milkHighlighted); + gertrudesCat = new NpcStep(this, NpcID.GERTRUDESCAT, new WorldPoint(3308, 3511, 1), "", bucketOfMilkHighlighted); gertrudesCat.addIcon(ItemID.BUCKET_MILK); - ObjectStep climbLadder = getClimbLadder(bucketOfMilk); + climbLadder = new ObjectStep(this, ObjectID.FAI_VARROCK_LADDER, new WorldPoint(3310, 3509, 0), "Climb up the ladder in the Lumberyard.", bucketOfMilk); - ConditionalStep giveMilkToCat = new ConditionalStep(this, climbLadder, "Use a bucket of milk on Gertrude's cat upstairs in the Lumberyard north east of Varrock.", seasonedSardine); - giveMilkToCat.addStep(isUpstairsLumberyard, gertrudesCat); + cGiveMilkToCat = new ConditionalStep(this, climbLadder, "Use a bucket of milk on Gertrude's cat upstairs in the Lumberyard north east of Varrock.", seasonedSardine); + cGiveMilkToCat.addStep(isUpstairsLumberyard, gertrudesCat); - return giveMilkToCat; - } + gertrudesCat2 = new NpcStep(this, NpcID.GERTRUDESCAT, new WorldPoint(3308, 3511, 1), "", seasonedSardineHighlighted); + gertrudesCat2.addIcon(ItemID.SEASONED_SARDINE); - private NpcStep getGertrudesCat(ItemRequirement... requirement) - { - return new NpcStep(this, NpcID.GERTRUDESCAT, - new WorldPoint(3308, 3511, 1), "", requirement); - } + climbLadder2 = new ObjectStep(this, ObjectID.FAI_VARROCK_LADDER, + new WorldPoint(3310, 3509, 0), "Climb up the ladder in the Lumberyard.", seasonedSardine); - private QuestStep getTalkToChildren() - { - pickupDoogle = new DetailedQuestStep(this, "Pickup some Doogle Leaves south of Gertrude's house.", new ItemRequirement("Doogle Leaves", ItemID.DOOGLELEAVES), sardine); - makeSeasonedSardine = new DetailedQuestStep(this, "Use your Doogle Leaves on the Sardine.", sardine, doogleLeaves); + cGiveSardineToCat = new ConditionalStep(this, climbLadder2, "Use a seasoned sardine on Gertrude's cat upstairs in the Lumberyard north east of Varrock."); + cGiveSardineToCat.addStep(isUpstairsLumberyard, gertrudesCat2); - NpcStep talkToChildren = new NpcStep(this, NpcID.SHILOP, - new WorldPoint(3222, 3435, 0), "Talk to Shilop or Wilough in the Varrock Square.", true, - seasonedSardine, coins); - talkToChildren.addAlternateNpcs(NpcID.WILOUGH); - talkToChildren.addDialogSteps("What will make you tell me?", "Okay then, I'll pay."); + //Need to find to ways to hide arrow + searchNearbyCrates = new NpcStep(this, NpcID.KITTENS_MEW, new WorldPoint(3306, 3505, 0), + "Search different crates downstairs in the Lumberyard until you find the kitten.", true, bucketOfMilk); + searchNearbyCrates.setHideWorldArrow(true); + climbDownLadderStep = new ObjectStep(this, ObjectID.FAI_VARROCK_LADDERTOP, new WorldPoint(3310, 3509, 1), "Climb down ladder in the Lumberyard."); + climbUpLadderStep = new ObjectStep(this, ObjectID.FAI_VARROCK_LADDER, new WorldPoint(3310, 3509, 0), "Climb up the ladder in the Lumberyard.", kitten); - return talkToChildren; - } - private QuestStep getTalkToGertrude() - { - NpcStep talkToGertrude = new NpcStep(this, NpcID.GERTRUDE_QUEST, - new WorldPoint(3148, 3413, 0), "Talk to Gertrude."); - talkToGertrude.addDialogStep("Yes."); - return talkToGertrude; + giveKittenToFluffy = new NpcStep(this, NpcID.GERTRUDESCAT, + new WorldPoint(3308, 3511, 1), "", kittenHighlighted); + giveKittenToFluffy.setText("Return the kitten to Gertrude's cat."); + giveKittenToFluffy.addIcon(ItemID.GERTRUDEKITTENS); + + + searchNearbyCrates.addSubSteps(climbDownLadderStep); + giveKittenToFluffy.addSubSteps(climbUpLadderStep); + + finishQuest = new NpcStep(this, NpcID.GERTRUDE_QUEST, + new WorldPoint(3148, 3413, 0), "Return to Gertrude east of Varrock to complete the quest."); } @Override - protected void setupRequirements() + public Map loadSteps() { - bucketOfMilk = new ItemRequirement("Bucket of milk", ItemID.BUCKET_MILK); - milkHighlighted = new ItemRequirement("Bucket of milk", ItemID.BUCKET_MILK); - milkHighlighted.setHighlightInInventory(true); - - coins = new ItemRequirement("Coins", ItemCollections.COINS, 100); + initializeRequirements(); + setupSteps(); - seasonedSardine = new ItemRequirement("Seasoned Sardine", ItemID.SEASONED_SARDINE); - seasonedSardine.setTooltip("Can be created by using a sardine on Doogle leaves(South of Gertrudes House)"); + var steps = new HashMap(); - seasonedSardineHighlighted = new ItemRequirement("Seasoned Sardine", ItemID.SEASONED_SARDINE); - seasonedSardineHighlighted.setTooltip("Can be created by using a sardine on Doogle leaves(South of Gertrudes House)"); - seasonedSardineHighlighted.setHighlightInInventory(true); + steps.put(0, talkToGertrude); - sardine = new ItemRequirement("Raw Sardine", ItemID.RAW_SARDINE); - sardine.setHighlightInInventory(true); - doogleLeaves = new ItemRequirement("Doogle Leaves", ItemID.DOOGLELEAVES); - doogleLeaves.setHighlightInInventory(true); + var cTalkToChildren = new ConditionalStep(this, pickupDoogle); + cTalkToChildren.addStep(and(sardineHighlighted, doogleLeaves), makeSeasonedSardine); + cTalkToChildren.addStep(seasonedSardine, talkToChildren); + steps.put(1, cTalkToChildren); - // Recommended items - lumberyardTeleport = new ItemRequirement("Lumberyard teleport", ItemID.TELEPORTSCROLL_LUMBERYARD); - varrockTeleport = new ItemRequirement("Varrock teleports", ItemID.POH_TABLET_VARROCKTELEPORT, 2); - } + steps.put(2, cGiveMilkToCat); - @Override - protected void setupZones() - { - Zone zone = new Zone(new WorldPoint(3306, 3507, 12), new WorldPoint(3312, 3513, 1)); + steps.put(3, cGiveSardineToCat); - isUpstairsLumberyard = new ZoneRequirement(zone); - } + var cFindFluffsKitten = new ConditionalStep(this, searchNearbyCrates); + cFindFluffsKitten.addStep(and(kitten, isUpstairsLumberyard), giveKittenToFluffy); + cFindFluffsKitten.addStep(kitten, climbUpLadderStep); + cFindFluffsKitten.addStep(isUpstairsLumberyard, climbDownLadderStep); + steps.put(4, cFindFluffsKitten); - private void setupConditions() - { - hasFluffsKitten = new ItemRequirements(new ItemRequirement("Fluffs' kitten", ItemID.GERTRUDEKITTENS)); - } + steps.put(5, finishQuest); - private ObjectStep getClimbLadder(ItemRequirement... itemRequirements) - { - return new ObjectStep(this, ObjectID.FAI_VARROCK_LADDER, - new WorldPoint(3310, 3509, 0), "Climb up the ladder in the Lumberyard.", itemRequirements); + return steps; } @Override public List getItemRequirements() { - return Arrays.asList(bucketOfMilk, coins, sardine); + return List.of( + bucketOfMilk, + coins, + sardineHighlighted + ); } @Override public List getItemRecommended() { - return Arrays.asList(varrockTeleport, lumberyardTeleport); + return List.of( + varrockTeleport, + lumberyardTeleport + ); } @Override @@ -258,42 +242,58 @@ public QuestPointReward getQuestPointReward() @Override public List getExperienceRewards() { - return Collections.singletonList(new ExperienceReward(Skill.COOKING, 1525)); + return List.of( + new ExperienceReward(Skill.COOKING, 1525) + ); } @Override public List getItemRewards() { - return Arrays.asList( - new ItemReward("A pet Kitten", ItemID.KITTENOBJECT, 1), - new ItemReward("Chocolate Cake", ItemID.CHOCOLATE_CAKE, 1), - new ItemReward("Stew", ItemID.STEW, 1)); + return List.of( + new ItemReward("A pet Kitten", ItemID.KITTENOBJECT, 1), + new ItemReward("Chocolate Cake", ItemID.CHOCOLATE_CAKE, 1), + new ItemReward("Stew", ItemID.STEW, 1) + ); } @Override public List getUnlockRewards() { - return Collections.singletonList(new UnlockReward("Ability to raise kittens.")); + return List.of( + new UnlockReward("Ability to raise kittens.") + ); } @Override public List getPanels() { - List steps = new ArrayList<>(); - - PanelDetails startingPanel = new PanelDetails("Starting out", - Arrays.asList(talkToGertrude, pickupDoogle, makeSeasonedSardine, talkToChildren), - sardine, coins); - steps.add(startingPanel); - - PanelDetails lumberYardPanel = new PanelDetails("The secret playground (Lumber Yard)", - Arrays.asList(giveMilkToCatSteps, giveSardineToCat, searchNearbyCrates, giveKittenToFluffy), - seasonedSardine, bucketOfMilk); - steps.add(lumberYardPanel); - - PanelDetails finishQuestPanel = new PanelDetails("Finish the quest", - Collections.singletonList(finishQuest)); - steps.add(finishQuestPanel); - return steps; + var sections = new ArrayList(); + + sections.add(new PanelDetails("Starting out", List.of( + talkToGertrude, + pickupDoogle, + makeSeasonedSardine, + talkToChildren + ), List.of( + sardineHighlighted, + coins + ))); + + sections.add(new PanelDetails("The secret playground (Lumber Yard)", List.of( + cGiveMilkToCat, + cGiveSardineToCat, + searchNearbyCrates, + giveKittenToFluffy + ), List.of( + seasonedSardine, + bucketOfMilk + ))); + + sections.add(new PanelDetails("Finish the quest", List.of( + finishQuest + ))); + + return sections; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ghostsahoy/GhostsAhoy.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ghostsahoy/GhostsAhoy.java index 81433db8a94..24254f091ce 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ghostsahoy/GhostsAhoy.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ghostsahoy/GhostsAhoy.java @@ -294,21 +294,21 @@ public void setupConditions() hasModelShip = modelShip.alsoCheckBank(questBank); hasRepairedShip = repairedShip.alsoCheckBank(questBank); hasCup = cup.alsoCheckBank(questBank); - hasBook = new Conditions(LogicType.OR, new VarbitRequirement(208, 1), book.alsoCheckBank(questBank)); - hasManual = new Conditions(LogicType.OR, new VarbitRequirement(206, 1), new VarbitRequirement(212, 8)); + hasBook = new Conditions(LogicType.OR, new VarbitRequirement(VarbitID.AHOY_GIVEN_BOOK, 1), book.alsoCheckBank(questBank)); + hasManual = new Conditions(LogicType.OR, new VarbitRequirement(VarbitID.AHOY_GIVEN_MANUAL, 1), new VarbitRequirement(VarbitID.AHOY_SUBQUEST_BOW, 8)); hasSheet = bedsheet.alsoCheckBank(questBank); hasEctoSheet = ectoSheets.alsoCheckBank(questBank); - hasMysticalRobes = new Conditions(LogicType.OR, new VarbitRequirement(207, 1), robes.alsoCheckBank(questBank)); + hasMysticalRobes = new Conditions(LogicType.OR, new VarbitRequirement(VarbitID.AHOY_GIVEN_ROBES, 1), robes.alsoCheckBank(questBank)); hasSignedOakBow = signedOakBow.alsoCheckBank(questBank); hasPetition = petition.alsoCheckBank(questBank); hasSignatures = new VarbitRequirement(VarbitID.AHOY_SIGNATURECOUNTER, 11, Operation.GREATER_EQUAL); givenPetitionToNecro = new VarbitRequirement(VarbitID.AHOY_SIGNATURECOUNTER, 31, Operation.GREATER_EQUAL); hadChestKey = new Conditions(LogicType.OR, chestKey, new VarbitRequirement(VarbitID.AHOY_SUBQUEST_TOYBOAT, 2, Operation.GREATER_EQUAL)); unlockedChest2 = new VarbitRequirement(VarbitID.AHOY_SUBQUEST_TOYBOAT, 3, Operation.GREATER_EQUAL); - doorUnlocked = new VarbitRequirement(213, 1); + doorUnlocked = new VarbitRequirement(VarbitID.AHOY_TEMPLEDOOR_UNLOCKED, 1); lobsterNearby = new NpcCondition(NpcID.GIANT_LOBSTER); - killedLobster = new VarbitRequirement(215, 1); + killedLobster = new VarbitRequirement(VarbitID.AHOY_KILLED_LOBSTER, 1); boneKeyNearby = new ItemOnTileRequirement(boneKey); hasBoneKey = new Conditions(LogicType.OR, boneKey, doorUnlocked); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/goblindiplomacy/GoblinDiplomacy.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/goblindiplomacy/GoblinDiplomacy.java index ff7ec363007..899c5a3926e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/goblindiplomacy/GoblinDiplomacy.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/goblindiplomacy/GoblinDiplomacy.java @@ -42,6 +42,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -127,9 +128,9 @@ protected void setupRequirements() public void setupConditions() { isUpstairs = new ZoneRequirement(upstairs); - hasUpstairsArmour = new VarbitRequirement(2381, 1); - hasWestArmour = new VarbitRequirement(2380, 1); - hasNorthArmour = new VarbitRequirement(2379, 1); + hasUpstairsArmour = new VarbitRequirement(VarbitID.GOBDIP_CRATE3_SEARCHED, 1); + hasWestArmour = new VarbitRequirement(VarbitID.GOBDIP_CRATE2_SEARCHED, 1); + hasNorthArmour = new VarbitRequirement(VarbitID.GOBDIP_CRATE1_SEARCHED, 1); } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/grimtales/GrimTales.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/grimtales/GrimTales.java index de73799fdce..80647e67bc4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/grimtales/GrimTales.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/grimtales/GrimTales.java @@ -226,8 +226,8 @@ public void setupConditions() inTowerBase = new ZoneRequirement(towerBase); inTowerUpstairs = new ZoneRequirement(towerUpstairs); - grimgnashAsleep = new VarbitRequirement(3717, 1); - givenFeather = new VarbitRequirement(3719, 1); + grimgnashAsleep = new VarbitRequirement(VarbitID.GRIM_GRIFFIN_ASLEEP, 1); + givenFeather = new VarbitRequirement(VarbitID.GRIM_GIVEN_FEATHER, 1); talkedToDrainOnce = new VarbitRequirement(VarbitID.GRIM_DWARFQUEST, 5, Operation.GREATER_EQUAL); beardDropped = new VarbitRequirement(VarbitID.GRIM_DWARFQUEST, 10, Operation.GREATER_EQUAL); @@ -235,17 +235,17 @@ public void setupConditions() talkedToMiazrqa = new VarbitRequirement(VarbitID.GRIM_DWARFQUEST, 20, Operation.GREATER_EQUAL); inPianoWidget = new WidgetModelRequirement(535, 1, 25890); - pressed1 = new VarbitRequirement(3697, 1); - pressed2 = new VarbitRequirement(3697, 2); - pressed3 = new VarbitRequirement(3697, 3); - pressed4 = new VarbitRequirement(3697, 4); - pressed5 = new VarbitRequirement(3697, 5); - pressed6 = new VarbitRequirement(3697, 6); - pressed7 = new VarbitRequirement(3697, 7); - pressed8 = new VarbitRequirement(3697, 8); + pressed1 = new VarbitRequirement(VarbitID.GRIM_PIANOTRACK, 1); + pressed2 = new VarbitRequirement(VarbitID.GRIM_PIANOTRACK, 2); + pressed3 = new VarbitRequirement(VarbitID.GRIM_PIANOTRACK, 3); + pressed4 = new VarbitRequirement(VarbitID.GRIM_PIANOTRACK, 4); + pressed5 = new VarbitRequirement(VarbitID.GRIM_PIANOTRACK, 5); + pressed6 = new VarbitRequirement(VarbitID.GRIM_PIANOTRACK, 6); + pressed7 = new VarbitRequirement(VarbitID.GRIM_PIANOTRACK, 7); + pressed8 = new VarbitRequirement(VarbitID.GRIM_PIANOTRACK, 8); - unlockedPiano = new VarbitRequirement(3698, 1); - searchedPiano = new VarbitRequirement(3716, 1); + unlockedPiano = new VarbitRequirement(VarbitID.GRIM_PIANO_USED, 1); + searchedPiano = new VarbitRequirement(VarbitID.GRIM_HEAD_FOUND, 1); inMouseRoom1 = new ZoneRequirement(mouseRoom1); inMouseRoom2 = new ZoneRequirement(mouseRoom2); @@ -257,19 +257,19 @@ public void setupConditions() inWrongMouse1 = new ZoneRequirement(wrongMouse1); inWrongMouse2 = new ZoneRequirement(wrongMouse2); - hasMiazrqasPendant = new VarbitRequirement(3721, 1); + hasMiazrqasPendant = new VarbitRequirement(VarbitID.GRIM_HAVE_PENDANT, 1); - givenPendant = new VarbitRequirement(3694, 25); + givenPendant = new VarbitRequirement(VarbitID.GRIM_DWARFQUEST, 25); - releasedRupert = new VarbitRequirement(3701, 1); + releasedRupert = new VarbitRequirement(VarbitID.GRIM_DWARF_VIS, 1); - plantedSeed = new VarbitRequirement(3714, 1); - wateredSeed = new VarbitRequirement(3714, 2); + plantedSeed = new VarbitRequirement(VarbitID.GRIM_STALK_STATE, 1); + wateredSeed = new VarbitRequirement(VarbitID.GRIM_STALK_STATE, 2); onCloud = new ZoneRequirement(cloud); - killedGlod = new VarbitRequirement(3715, 1); + killedGlod = new VarbitRequirement(VarbitID.GRIM_GIANT_DEAD, 1); - usedPotion = new VarbitRequirement(3714, 3); + usedPotion = new VarbitRequirement(VarbitID.GRIM_STALK_STATE, 3); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/hauntedmine/HauntedMine.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/hauntedmine/HauntedMine.java index be544306a41..fbfa2171631 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/hauntedmine/HauntedMine.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/hauntedmine/HauntedMine.java @@ -52,6 +52,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.gameval.VarPlayerID; import java.util.*; @@ -223,7 +224,7 @@ protected void setupZones() public void setupConditions() { - askedAboutKey = new VarbitRequirement(2397, 1); + askedAboutKey = new VarbitRequirement(VarbitID.HAUNTEDMINE_HEARDABOUTKEY, 1); inLevel1North = new ZoneRequirement(level1North); inLevel1South = new ZoneRequirement(level1South); inLevel2South = new ZoneRequirement(level2South); @@ -240,22 +241,22 @@ public void setupConditions() inCrystalEntrance = new ZoneRequirement(crystalEntrance); inCrystalOrCrystalEntranceRoom = new ZoneRequirement(crystalRoom1, crystalRoom2, crystalRoom3, crystalEntrance); - valveOpened = new VarbitRequirement(2393, 1); - valveOpen = new VarbitRequirement(2394, 1); + valveOpened = new VarbitRequirement(VarbitID.HAUNTEDMINE_LIFTPOWEREDONCE, 1); + valveOpen = new VarbitRequirement(VarbitID.HAUNTEDMINE_LIFTPOWEREDNOW, 1); hasKeyOrOpenedValve = new Conditions(LogicType.OR, zealotsKey, valveOpened); - leverAWrong = new VarbitRequirement(2385, 0); - leverBWrong = new VarbitRequirement(2386, 0); - leverCWrong = new VarbitRequirement(2387, 1); - leverDWrong = new VarbitRequirement(2388, 1); - leverEWrong = new VarbitRequirement(2389, 0); - leverFWrong = new VarbitRequirement(2390, 0); - leverGWrong = new VarbitRequirement(2391, 1); - leverHWrong = new VarbitRequirement(2392, 1); - - fungusInCart = new VarbitRequirement(2395, 1); - fungusOnOtherSide = new VarbitRequirement(2396, 1); + leverAWrong = new VarbitRequirement(VarbitID.HAUNTEDMINE_LEVER_B, 0); + leverBWrong = new VarbitRequirement(VarbitID.HAUNTEDMINE_LEVER_A, 0); + leverCWrong = new VarbitRequirement(VarbitID.HAUNTEDMINE_LEVER_C, 1); + leverDWrong = new VarbitRequirement(VarbitID.HAUNTEDMINE_LEVER_D, 1); + leverEWrong = new VarbitRequirement(VarbitID.HAUNTEDMINE_LEVER_E, 0); + leverFWrong = new VarbitRequirement(VarbitID.HAUNTEDMINE_LEVER_I, 0); + leverGWrong = new VarbitRequirement(VarbitID.HAUNTEDMINE_LEVER_J, 1); + leverHWrong = new VarbitRequirement(VarbitID.HAUNTEDMINE_LEVER_K, 1); + + fungusInCart = new VarbitRequirement(VarbitID.HAUNTEDMINE_BEGINCART_FUNGUS, 1); + fungusOnOtherSide = new VarbitRequirement(VarbitID.HAUNTEDMINE_ENDCART_FUNGUS, 1); daythNearby = new NpcHintArrowRequirement(NpcID.HAUNTEDMINE_BOSS_GHOST, NpcID.HAUNTEDMINE_BOSS_GHOST_FADED); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/hazeelcult/HazeelCult.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/hazeelcult/HazeelCult.java index 33cdab65993..93407d1a4d1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/hazeelcult/HazeelCult.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/hazeelcult/HazeelCult.java @@ -29,10 +29,10 @@ import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; import net.runelite.client.plugins.microbot.questhelper.questinfo.QuestVarPlayer; import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemOnTileRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicType; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.or; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarplayerRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; @@ -40,147 +40,134 @@ import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.MultiNpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; - -import java.util.*; - -import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.or; +import net.runelite.api.gameval.VarbitID; public class HazeelCult extends BasicQuestHelper { - //Items Recommended + // Recommended items ItemRequirement ardougneCloak; - ItemRequirement hazeelScroll, poison, carnilleanArmour, key, hazeelMark; - - Requirement inCultEntrance, inCultRoom, inManorBasement, inManorF1, inManorF2, canSearchChest, - talkedToCerilAfterPoison, armourNearby, sidedWithCeril, receivedMark, onStep7, givenAlomoneScroll, - givenArmour, hadArmour, butlerArrested; - - QuestStep talkToCeril, enterCave, talkToClivet, leaveCaveForValves; - - // Hazeel side - QuestStep getPoison, leaveCaveWithPoison, enterKitchen, usePoisonOnRange, leaveKitchen, talkToCerilAfterPoison, - enterCaveAfterPoison, talkToClivetAfterPoison, boardRaftAfterPoison, talkToAlomone, returnOnRaftAfterAlomone, leaveCaveAfterAlomone, - enterKitchenAfterButler, searchCrateForKey, leaveKitchenWithKey, goToF1WithKey, - climbLadderWithKey, searchChestForScroll, goF2ToF1WithScroll, goF1ToF0WithScroll, enterCaveWithScroll, - boardRaftWithScroll, giveAlomoneScroll; - - // Ceril side - QuestStep enterCaveAfterValvesForCeril, boardRaftToKill, talkToAlomoneToKill, killAlomone, retrieveArmourFromChest, returnOnRaftAfterKilling, - leaveCaveAfterKilling, talkToJonesAfterKilling, talkToCerilAfterKilling, goUpToCupboard, - searchCupboardForEvidence, talkToCerilToFinish; - - HazeelValves valveStepsCeril, valveStepsHazeel; - - //Zones - Zone cultEntrance, cultRoom, manorBasement, manorF1, manorF2; - - ConditionalStep cerilSteps, hazeel4GoPoisonSteps; + // Zones + Zone cultEntrance; + Zone cultRoom; + Zone manorBasement; + Zone manorF1; + Zone manorF2; + Zone manorF2LadderRoom; + + // Miscellaneous requirements + ItemRequirement hazeelScroll; + ItemRequirement poison; + ItemRequirement carnilleanArmour; + ItemRequirement key; + ItemRequirement hazeelMark; + + ZoneRequirement inCultEntrance; + ZoneRequirement inCultRoom; + ZoneRequirement inManorBasement; + ZoneRequirement inManorF1; + ZoneRequirement inManorF2; + ZoneRequirement inManorF2LadderRoom; VarbitRequirement alomoneAttackable; + VarbitRequirement givenAlomoneScroll; + VarbitRequirement givenArmour; + VarbitRequirement canSearchChest; + VarbitRequirement sidedWithCeril; + VarbitRequirement receivedMark; + VarbitRequirement talkedToCerilAfterPoison; + VarbitRequirement butlerArrested; + ItemOnTileRequirement armourNearby; + VarplayerRequirement onStep7; + Requirement hadArmour; + + // Steps + NpcStep talkToCeril; + ObjectStep enterCave; + NpcStep talkToClivet; + + // Ceril side steps + ObjectStep leaveCaveForValves; + HazeelValves valveStepsCeril; + ObjectStep enterCaveAfterValvesForCeril; + ObjectStep boardRaftToKill; + NpcStep talkToAlomoneToKill; + NpcStep killAlomone; + ObjectStep retrieveArmourFromChest; + ObjectStep returnOnRaftAfterKilling; + ObjectStep leaveCaveAfterKilling; + NpcStep talkToJonesAfterKilling; + NpcStep talkToCerilAfterKilling; + ObjectStep goUpToCupboard; + ObjectStep searchCupboardForEvidence; + NpcStep talkToCerilToFinish; + + // Hazeel side steps + NpcStep getPoison; + ObjectStep leaveCaveWithPoison; + ObjectStep enterKitchen; + ObjectStep usePoisonOnRange; + ObjectStep leaveKitchen; + NpcStep talkToCerilAfterPoison; + HazeelValves valveStepsHazeel; + ObjectStep enterCaveAfterPoison; + NpcStep talkToClivetAfterPoison; + ObjectStep boardRaftAfterPoison; + NpcStep talkToAlomone; + ObjectStep returnOnRaftAfterAlomone; + ObjectStep leaveCaveAfterAlomone; + ObjectStep enterKitchenAfterButler; + ObjectStep searchCrateForKey; + ObjectStep leaveKitchenWithKey; + ObjectStep goToF1WithKey; + ObjectStep knockOnWall; + ObjectStep climbLadderWithKey; + ObjectStep searchChestForScroll; + ObjectStep goF2ToF1WithScroll; + ObjectStep knockOnWallToExit; + ObjectStep goF1ToF0WithScroll; + ObjectStep enterCaveWithScroll; + ObjectStep boardRaftWithScroll; + NpcStep giveAlomoneScroll; @Override - public Map loadSteps() + protected void setupZones() { - // TODO: Should the valves section implement the PuzzleWrapper? - initializeRequirements(); - setupSteps(); - Map steps = new HashMap<>(); - - steps.put(0, talkToCeril); - - // Got poison first time, 14782 0->1 - // Have poison currently (10670 0->1, back to 0 if you talk to Clivet without poison) - // Is also for recieved the mark? - - ConditionalStep goTalkToClivet = new ConditionalStep(this, enterCave); - goTalkToClivet.addStep(inCultEntrance, talkToClivet); - steps.put(2, goTalkToClivet); - steps.put(3, goTalkToClivet); - - // Help Hazeel - hazeel4GoPoisonSteps = new ConditionalStep(this, enterKitchen); - // 14779 0->1 when used poison on range - hazeel4GoPoisonSteps.addStep(inManorBasement, usePoisonOnRange); - hazeel4GoPoisonSteps.addStep(inCultEntrance, leaveCaveWithPoison); - - // TODO: Verify if this is needed - ConditionalStep goTalkAfterPoison = new ConditionalStep(this, talkToCerilAfterPoison); - goTalkAfterPoison.addStep(inManorBasement, leaveKitchen); - - ConditionalStep goTalkToClivetAfterPoison = new ConditionalStep(this, goTalkAfterPoison); - // Probably don't actually need the mark but nice to ensure the player gets it - goTalkToClivetAfterPoison.addStep(new Conditions(inCultRoom, hazeelMark.alsoCheckBank(questBank)), talkToAlomone); - goTalkToClivetAfterPoison.addStep(new Conditions(inCultEntrance, valveStepsHazeel.solved, - hazeelMark.alsoCheckBank(questBank)), boardRaftAfterPoison); - goTalkToClivetAfterPoison.addStep(new Conditions(inCultEntrance, valveStepsHazeel.solved), talkToClivetAfterPoison); - goTalkToClivetAfterPoison.addStep(valveStepsHazeel.solved, enterCaveAfterPoison); - goTalkToClivetAfterPoison.addStep(talkedToCerilAfterPoison, valveStepsHazeel); - - Conditions hadScroll = new Conditions(LogicType.OR, hazeelScroll.alsoCheckBank(questBank), givenAlomoneScroll); - ConditionalStep goGetScroll = new ConditionalStep(this, enterKitchenAfterButler); - goGetScroll.addStep(new Conditions(inCultRoom, hadScroll), giveAlomoneScroll); - goGetScroll.addStep(new Conditions(inCultEntrance, hadScroll), boardRaftWithScroll); - goGetScroll.addStep(new Conditions(inManorF1, hadScroll), goF1ToF0WithScroll); - goGetScroll.addStep(new Conditions(inManorF2, hadScroll), goF2ToF1WithScroll); - goGetScroll.addStep(new Conditions(hadScroll), enterCaveWithScroll); - goGetScroll.addStep(new Conditions(inManorF2, key), searchChestForScroll); - goGetScroll.addStep(new Conditions(inManorF1, key), climbLadderWithKey); - goGetScroll.addStep(new Conditions(inManorBasement, key), leaveKitchenWithKey); - goGetScroll.addStep(new Conditions(key), goToF1WithKey); - goGetScroll.addStep(inManorBasement, searchCrateForKey); - goGetScroll.addStep(inCultEntrance, leaveCaveAfterAlomone); - goGetScroll.addStep(inCultRoom, returnOnRaftAfterAlomone); - - // Ceril side - cerilSteps = new ConditionalStep(this, valveStepsCeril); - cerilSteps.addStep(new Conditions(onStep7, butlerArrested), talkToCerilToFinish); - cerilSteps.addStep(new Conditions(onStep7, inManorF1), searchCupboardForEvidence); - cerilSteps.addStep(onStep7, goUpToCupboard); - cerilSteps.addStep(new Conditions(inCultEntrance, hadArmour), leaveCaveAfterKilling); - cerilSteps.addStep(new Conditions(inCultRoom, hadArmour), returnOnRaftAfterKilling); - cerilSteps.addStep(hadArmour, talkToCerilAfterKilling); - cerilSteps.addStep(new Conditions(inCultRoom, canSearchChest), retrieveArmourFromChest); - cerilSteps.addStep(new Conditions(inCultRoom, alomoneAttackable), killAlomone); - cerilSteps.addStep(new Conditions(inCultRoom), talkToAlomoneToKill); - cerilSteps.addStep(new Conditions(inCultEntrance, valveStepsCeril.solved), boardRaftToKill); - cerilSteps.addStep(valveStepsCeril.solved, enterCaveAfterValvesForCeril); - cerilSteps.addStep(inCultEntrance, leaveCaveForValves); - - // TODO: 14782 0->1 may occur to represent Hazeel - - // Told to make poison, 223 3->4 - // Sided with Ceril: - // 10670 1->0 occurs, - // 14769 0->1 and 223 3->4 - ConditionalStep step4 = new ConditionalStep(this, enterCave); - step4.addStep(sidedWithCeril, cerilSteps); - step4.addStep(poison, hazeel4GoPoisonSteps); - step4.addStep(inCultEntrance, getPoison); - steps.put(4, step4); - - // Assuming this can only be reached in Hazeel side, but may be wrong - steps.put(5, goTalkToClivetAfterPoison); - - ConditionalStep step6And7 = new ConditionalStep(this, goGetScroll); - step6And7.addStep(sidedWithCeril, cerilSteps); - steps.put(6, step6And7); - steps.put(7, step6And7); - - return steps; + cultEntrance = new Zone(new WorldPoint(2565, 9679, 0), new WorldPoint(2571, 9685, 0)); + cultRoom = new Zone(new WorldPoint(2600, 9666, 0), new WorldPoint(2615, 9693, 0)); + manorBasement = new Zone(new WorldPoint(2535, 9692, 0), new WorldPoint(2550, 9703, 0)); + manorF1 = new Zone(new WorldPoint(2564, 3267, 1), new WorldPoint(2576, 3275, 1)); + manorF2 = new Zone(new WorldPoint(2564, 3267, 2), new WorldPoint(2576, 3275, 2)); + manorF2LadderRoom = new Zone(new WorldPoint(2573, 3271, 1), new WorldPoint(2571, 3271, 1)); } @Override protected void setupRequirements() { - givenAlomoneScroll = new VarbitRequirement(14780, 1); - givenArmour = new VarbitRequirement(14772, 1); + givenAlomoneScroll = new VarbitRequirement(VarbitID.HAZEELCULT_GIVEN_SCROLL, 1); + givenArmour = new VarbitRequirement(VarbitID.HAZEELCULT_GIVEN_ARMOUR, 1); + alomoneAttackable = new VarbitRequirement(VarbitID.HAZEELCULT_ALOMONE_VIS, 1); + canSearchChest = new VarbitRequirement(VarbitID.HAZEELCULT_ALOMONE_VIS, 2); + sidedWithCeril = new VarbitRequirement(VarbitID.HAZEELCULT_CLIVET_LOCATION, 1); + receivedMark = new VarbitRequirement(VarbitID.HAZEELCULT_GIVEN_AMULET, 1); + talkedToCerilAfterPoison = new VarbitRequirement(VarbitID.HAZEELCULT_POISON_SUCCESS, 1); + butlerArrested = new VarbitRequirement(VarbitID.HAZEELCULT_JONES_CUTSCENE, 1); ardougneCloak = new ItemRequirement("Ardougne cloak for Monastery teleport", ItemID.ARDY_CAPE_EASY).isNotConsumed(); ardougneCloak.addAlternates(ItemID.ARDY_CAPE_MEDIUM, ItemID.ARDY_CAPE_HARD, ItemID.ARDY_CAPE_ELITE); @@ -197,28 +184,21 @@ protected void setupRequirements() inManorBasement = new ZoneRequirement(manorBasement); inManorF1 = new ZoneRequirement(manorF1); inManorF2 = new ZoneRequirement(manorF2); - - alomoneAttackable = new VarbitRequirement(14770, 1); - canSearchChest = new VarbitRequirement(14770, 2); + inManorF2LadderRoom = new ZoneRequirement(manorF2LadderRoom); // Got armour, 14778 0->1 hadArmour = or(givenArmour, carnilleanArmour.alsoCheckBank(questBank)); - talkedToCerilAfterPoison = new VarbitRequirement(14775, 1); // Talking to Ceril // 3679 -1 -> 71 armourNearby = new ItemOnTileRequirement(carnilleanArmour); - sidedWithCeril = new VarbitRequirement(14769, 1); - // Mark also could be 14776 - receivedMark = new VarbitRequirement(14777, 1); // 14779 1->2, asked to go talk to the butler onStep7 = new VarplayerRequirement(QuestVarPlayer.QUEST_HAZEEL_CULT.getId(), 7); // Butler found out // 14773 1 // 14774 1 - butlerArrested = new VarbitRequirement(14773, 1); /* Ceril var changes */ // Sided with Ceril @@ -235,34 +215,23 @@ protected void setupRequirements() // 14770 1->2 } - @Override - protected void setupZones() - { - cultEntrance = new Zone(new WorldPoint(2565, 9679, 0), new WorldPoint(2571, 9685, 0)); - cultRoom = new Zone(new WorldPoint(2600, 9666, 0), new WorldPoint(2615, 9693, 0)); - manorF1 = new Zone(new WorldPoint(2564, 3267, 1), new WorldPoint(2576, 3275, 1)); - manorF2 = new Zone(new WorldPoint(2564, 3267, 2), new WorldPoint(2576, 3275, 2)); - manorBasement = new Zone(new WorldPoint(2535, 9692, 0), new WorldPoint(2550, 9703, 0)); - } - public void setupSteps() { talkToCeril = new NpcStep(this, NpcID.SIR_CERIL_CARNILLEAN_VIS, new WorldPoint(2569, 3275, 0), "Talk to Ceril Carnillean in the south west of East Ardougne."); talkToCeril.addDialogSteps("What's wrong?", "Yes."); + enterCave = new ObjectStep(this, ObjectID.HAZEELCULTCAVE, new WorldPoint(2587, 3235, 0), - "Enter the cave south east of the Clock Tower."); + "Enter the cave south east of the Clock Tower entrance."); talkToClivet = new NpcStep(this, NpcID.CLIVET_HAZEEL_CULTIST_VIS, new WorldPoint(2569, 9682, 0), "Talk to Clivet. You can choose to either side with him or with the Carnilleans."); - talkToClivet.addDialogSteps("Alright, I've made my decision.", "I have no more questions.", "What do you mean?"); + talkToClivet.addDialogSteps("Alright, I've made my decision.", "Actually, I have no questions.", "I have no more questions.", "What do you mean?"); talkToClivet.addDialogChange("I won't help you.", "I won't help you. (side with Ceril)"); talkToClivet.addDialogChange("Alright, how do I do it?", "Alright, how do I do it? (side with Hazeel)"); talkToClivet.addDialogChange("I'll help you.", "I'll help you. (side with Hazeel)"); leaveCaveForValves = new ObjectStep(this, ObjectID.HAZEELCULTSTAIRS, new WorldPoint(2571, 9684, 0), "Go back to the surface."); - valveStepsHazeel = new HazeelValves(this); - valveStepsCeril = new HazeelValves(this); valveStepsCeril.addSubSteps(leaveCaveForValves); @@ -281,6 +250,8 @@ public void setupSteps() talkToCerilAfterPoison = new NpcStep(this, NpcID.SIR_CERIL_CARNILLEAN_VIS, new WorldPoint(2569, 3275, 0), "Talk to Ceril Carnillean to confirm the results of the poison."); + valveStepsHazeel = new HazeelValves(this); + enterCaveAfterPoison = new ObjectStep(this, ObjectID.HAZEELCULTCAVE, new WorldPoint(2587, 3235, 0), "Return to Clivet in the cave south of East Ardougne."); talkToClivetAfterPoison = new NpcStep(this, NpcID.CLIVET_HAZEEL_CULTIST_VIS, new WorldPoint(2569, 9682, 0), @@ -305,14 +276,23 @@ public void setupSteps() "Go back upstairs from the kitchen.", key); goToF1WithKey = new ObjectStep(this, ObjectID.CARNILLEAN_STAIRS, new WorldPoint(2569, 3269, 0), "Go upstairs in the house.", key); + + knockOnWall = new ObjectStep(this, ObjectID.CARNILLEANBOOKCASE_KNOCK, new WorldPoint(2572, 3270, 1), "Knock the wall to enter the hidden room."); + knockOnWall.addDialogStep("Yes."); + climbLadderWithKey = new ObjectStep(this, ObjectID.LADDER, new WorldPoint(2573, 3271, 1), "Knock the wall to enter the hidden room, then climb up the ladder.", key); climbLadderWithKey.addDialogStep("Yes."); + climbLadderWithKey.addSubSteps(knockOnWall); + searchChestForScroll = new ObjectStep(this, ObjectID.CARNILLEANSHUTCHEST, new WorldPoint(2571, 3269, 2), "Open the chest.", key.highlighted()); searchChestForScroll.addIcon(ItemID.CARNILLEANCHESTKEY); goF2ToF1WithScroll = new ObjectStep(this, ObjectID.LADDERTOP, new WorldPoint(2573, 3271, 2), "Return to Alomone with the scroll.", hazeelScroll); + + knockOnWallToExit = new ObjectStep(this, ObjectID.CARNILLEANBOOKCASE_KNOCK, new WorldPoint(2572, 3270, 1), "Return to Alomone with the scroll.", hazeelScroll); + goF1ToF0WithScroll = new ObjectStep(this, ObjectID.CARNILLEAN_STAIRSTOP, new WorldPoint(2569, 3269, 1), "Return to Alomone with the scroll.", hazeelScroll); enterCaveWithScroll = new ObjectStep(this, ObjectID.HAZEELCULTCAVE, new WorldPoint(2587, 3235, 0), @@ -320,9 +300,10 @@ public void setupSteps() boardRaftWithScroll = new ObjectStep(this, ObjectID.HAZEELSEWERRAFT, new WorldPoint(2568, 9679, 0), "Return to Alomone with the scroll. If the raft doesn't go to Alomone, repeat the prior valve steps first.", hazeelScroll); + giveAlomoneScroll = new NpcStep(this, NpcID.ALOMONE_HAZEEL_CULTIST_1OP, new WorldPoint(2607, 9673, 0), "Return to Alomone with the scroll.", hazeelScroll); - giveAlomoneScroll.addSubSteps(goF2ToF1WithScroll, goF1ToF0WithScroll, enterCaveWithScroll, boardRaftWithScroll); + giveAlomoneScroll.addSubSteps(goF2ToF1WithScroll, knockOnWallToExit, goF1ToF0WithScroll, enterCaveWithScroll, boardRaftWithScroll); // Ceril side enterCaveAfterValvesForCeril = new ObjectStep(this, ObjectID.HAZEELCULTCAVE, new WorldPoint(2587, 3235, 0), @@ -357,23 +338,122 @@ public void setupSteps() "Go upstairs in the house."); searchCupboardForEvidence = new ObjectStep(this, ObjectID.HAZEELCBSHUT, new WorldPoint(2574, 3267, 1), "Search the cupboard in the east room."); - ((ObjectStep) searchCupboardForEvidence).addAlternateObjects(ObjectID.HAZEELCBOPEN); + searchCupboardForEvidence.addAlternateObjects(ObjectID.HAZEELCBOPEN); searchCupboardForEvidence.addSubSteps(goUpToCupboard); talkToCerilToFinish = new NpcStep(this, NpcID.SIR_CERIL_CARNILLEAN_VIS, new WorldPoint(2569, 3275, 0), "Talk to Ceril to finish the quest."); } + @Override + public Map loadSteps() + { + // TODO: Should the valves section implement the PuzzleWrapper? + initializeRequirements(); + setupSteps(); + Map steps = new HashMap<>(); + + steps.put(0, talkToCeril); + + // Got poison first time, 14782 0->1 + // Have poison currently (10670 0->1, back to 0 if you talk to Clivet without poison) + // Is also for recieved the mark? + + var goTalkToClivet = new ConditionalStep(this, enterCave); + goTalkToClivet.addStep(inCultEntrance, talkToClivet); + steps.put(2, goTalkToClivet); + steps.put(3, goTalkToClivet); + + // Help Hazeel + var hazeel4GoPoisonSteps = new ConditionalStep(this, enterKitchen); + // 14779 0->1 when used poison on range + hazeel4GoPoisonSteps.addStep(inManorBasement, usePoisonOnRange); + hazeel4GoPoisonSteps.addStep(inCultEntrance, leaveCaveWithPoison); + + // TODO: Verify if this is needed + var goTalkAfterPoison = new ConditionalStep(this, talkToCerilAfterPoison); + goTalkAfterPoison.addStep(inManorBasement, leaveKitchen); + + var goTalkToClivetAfterPoison = new ConditionalStep(this, goTalkAfterPoison); + // Probably don't actually need the mark but nice to ensure the player gets it + goTalkToClivetAfterPoison.addStep(and(inCultRoom, hazeelMark.alsoCheckBank(questBank)), talkToAlomone); + goTalkToClivetAfterPoison.addStep(and(inCultEntrance, valveStepsHazeel.solved, hazeelMark.alsoCheckBank(questBank)), boardRaftAfterPoison); + goTalkToClivetAfterPoison.addStep(and(inCultEntrance, valveStepsHazeel.solved), talkToClivetAfterPoison); + goTalkToClivetAfterPoison.addStep(valveStepsHazeel.solved, enterCaveAfterPoison); + goTalkToClivetAfterPoison.addStep(talkedToCerilAfterPoison, valveStepsHazeel); + + var hadScroll = or(hazeelScroll.alsoCheckBank(questBank), givenAlomoneScroll); + var hazeelSteps = new ConditionalStep(this, enterKitchenAfterButler); + hazeelSteps.addStep(and(inCultRoom, hadScroll), giveAlomoneScroll); + hazeelSteps.addStep(and(inCultEntrance, hadScroll), boardRaftWithScroll); + hazeelSteps.addStep(and(inManorF1, hadScroll, inManorF2LadderRoom), knockOnWallToExit); + hazeelSteps.addStep(and(inManorF1, hadScroll), goF1ToF0WithScroll); + hazeelSteps.addStep(and(inManorF2, hadScroll), goF2ToF1WithScroll); + hazeelSteps.addStep(hadScroll, enterCaveWithScroll); + hazeelSteps.addStep(and(inManorF2, key), searchChestForScroll); + hazeelSteps.addStep(and(inManorF1, key, inManorF2LadderRoom), climbLadderWithKey); + hazeelSteps.addStep(and(inManorF1, key), knockOnWall); + hazeelSteps.addStep(and(inManorBasement, key), leaveKitchenWithKey); + hazeelSteps.addStep(key, goToF1WithKey); + hazeelSteps.addStep(inManorBasement, searchCrateForKey); + hazeelSteps.addStep(inCultEntrance, leaveCaveAfterAlomone); + hazeelSteps.addStep(inCultRoom, returnOnRaftAfterAlomone); + + // Ceril side + var cerilSteps = new ConditionalStep(this, valveStepsCeril); + cerilSteps.addStep(and(onStep7, butlerArrested), talkToCerilToFinish); + cerilSteps.addStep(and(onStep7, inManorF1), searchCupboardForEvidence); + cerilSteps.addStep(onStep7, goUpToCupboard); + cerilSteps.addStep(and(inCultEntrance, hadArmour), leaveCaveAfterKilling); + cerilSteps.addStep(and(inCultRoom, hadArmour), returnOnRaftAfterKilling); + cerilSteps.addStep(hadArmour, talkToCerilAfterKilling); + cerilSteps.addStep(and(inCultRoom, canSearchChest), retrieveArmourFromChest); + cerilSteps.addStep(and(inCultRoom, alomoneAttackable), killAlomone); + cerilSteps.addStep(and(inCultRoom), talkToAlomoneToKill); + cerilSteps.addStep(and(inCultEntrance, valveStepsCeril.solved), boardRaftToKill); + cerilSteps.addStep(valveStepsCeril.solved, enterCaveAfterValvesForCeril); + cerilSteps.addStep(inCultEntrance, leaveCaveForValves); + + // TODO: 14782 0->1 may occur to represent Hazeel + + // Told to make poison, 223 3->4 + // Sided with Ceril: + // 10670 1->0 occurs, + // 14769 0->1 and 223 3->4 + var step4 = new ConditionalStep(this, enterCave); + step4.addStep(sidedWithCeril, cerilSteps); + step4.addStep(poison, hazeel4GoPoisonSteps); + step4.addStep(inCultEntrance, getPoison); + steps.put(4, step4); + + // Assuming this can only be reached in Hazeel side, but may be wrong + steps.put(5, goTalkToClivetAfterPoison); + + var step6 = new ConditionalStep(this, hazeelSteps); + step6.addStep(sidedWithCeril, cerilSteps); + steps.put(6, step6); + + var step7 = new ConditionalStep(this, hazeelSteps); + step7.addStep(sidedWithCeril, cerilSteps); + steps.put(7, step7); + + return steps; + } + @Override public List getItemRecommended() { - return Collections.singletonList(ardougneCloak); + return List.of( + ardougneCloak + ); } @Override public List getCombatRequirements() { - return Collections.singletonList("Alomone (level 13) if taking Ceril's side"); + return List.of( + "Alomone (level 13) if taking Ceril's side" + ); } @Override @@ -385,13 +465,15 @@ public QuestPointReward getQuestPointReward() @Override public List getExperienceRewards() { - return Collections.singletonList(new ExperienceReward(Skill.THIEVING, 1500)); + return List.of( + new ExperienceReward(Skill.THIEVING, 1500) + ); } @Override public List getItemRewards() { - return Arrays.asList( + return List.of( new ItemReward("(2,005 if siding with Ceril) Coins", ItemID.COINS, 2000), new ItemReward("Hazeel's mark (if you sided with Hazeel)", ItemID.MARK_OF_HAZEEL), new ItemReward("Carnillean armour (if you sided with Ceril)", ItemID.CARNILLEAN_ARMOUR) @@ -401,31 +483,39 @@ public List getItemRewards() @Override public List getNotes() { - return Collections.singletonList("If you sided with Hazeel and are being guided to help Ceril, just click the" + - " box in the Ceril sidebar header to switch to Hazeel"); + return List.of( + "If you sided with Hazeel and are being guided to help Ceril, just click the box in the Ceril sidebar header to switch to Hazeel" + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); - allSteps.add(new PanelDetails("Starting off", Arrays.asList(talkToCeril, enterCave, talkToClivet))); + var sections = new ArrayList(); + + sections.add(new PanelDetails("Starting off", List.of( + talkToCeril, + enterCave, + talkToClivet + ))); - List cerilStepsSidebar = new ArrayList<>(Collections.singletonList(leaveCaveForValves)); + var cerilStepsSidebar = new ArrayList(Collections.singletonList(leaveCaveForValves)); cerilStepsSidebar.addAll(valveStepsCeril.getDisplaySteps()); cerilStepsSidebar.addAll(Arrays.asList(enterCaveAfterValvesForCeril, boardRaftToKill, talkToAlomoneToKill, killAlomone, retrieveArmourFromChest, talkToCerilAfterKilling, talkToJonesAfterKilling, searchCupboardForEvidence, talkToCerilToFinish)); PanelDetails cerilPanel = new PanelDetails("Siding with Ceril", cerilStepsSidebar); - allSteps.add(cerilPanel); + // TODO: add locking step to make it lockable? + sections.add(cerilPanel); - List hazeelSteps = new ArrayList<>(Arrays.asList(getPoison, leaveCaveWithPoison, enterKitchen, + var hazeelSteps = new ArrayList(Arrays.asList(getPoison, leaveCaveWithPoison, enterKitchen, usePoisonOnRange, leaveKitchen, talkToCerilAfterPoison)); hazeelSteps.addAll(valveStepsHazeel.getDisplaySteps()); hazeelSteps.addAll(Arrays.asList(talkToClivetAfterPoison, boardRaftAfterPoison, talkToAlomone, searchCrateForKey, leaveKitchenWithKey, goToF1WithKey, climbLadderWithKey, searchChestForScroll, giveAlomoneScroll)); - allSteps.add(new PanelDetails("Siding with Hazeel", hazeelSteps)); + // TODO: add locking step to make it lockable? + sections.add(new PanelDetails("Siding with Hazeel", hazeelSteps)); - return allSteps; + return sections; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/hazeelcult/HazeelValves.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/hazeelcult/HazeelValves.java index 455283ae789..0d4f349edb6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/hazeelcult/HazeelValves.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/hazeelcult/HazeelValves.java @@ -241,6 +241,7 @@ protected void setupSteps() turnValve1 = new ObjectStep(getQuestHelper(), ObjectID.SEWERVALVE1, new WorldPoint(2562, 3247, 0), "Turn the valve west of the Clocktower to the right."); turnValve1.addDialogStep("Turn it to the right."); + turnValve1.addSubSteps(catchState); turnValve2 = new ObjectStep(getQuestHelper(), ObjectID.SEWERVALVE2, new WorldPoint(2572, 3263, 0), "Turn the valve next to the Carnillean home to the right."); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/heroesquest/HeroesQuest.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/heroesquest/HeroesQuest.java index 6cbf9736fd4..a8a70fd1175 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/heroesquest/HeroesQuest.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/heroesquest/HeroesQuest.java @@ -296,7 +296,7 @@ public void setupConditions() gottenPapers = new VarplayerRequirement(VarPlayerID.HEROQUEST, 9, Operation.GREATER_EQUAL); enteredMansion = new VarplayerRequirement(VarPlayerID.HEROQUEST, 10, Operation.GREATER_EQUAL); talkedToGrip = new VarplayerRequirement(VarPlayerID.HEROQUEST, 11, Operation.GREATER_EQUAL); - unlockedCandlestickBlackArm = new VarplayerRequirement(188, 12); + unlockedCandlestickBlackArm = new VarplayerRequirement(VarPlayerID.HEROQUEST, 12); finishedBlackArm = new VarplayerRequirement(VarPlayerID.HEROQUEST, 13, Operation.GREATER_EQUAL); talkedToStraven = new VarplayerRequirement(VarPlayerID.HEROQUEST, 2, Operation.GREATER_EQUAL); talkedToAlfonse = new VarplayerRequirement(VarPlayerID.HEROQUEST, 3, Operation.GREATER_EQUAL); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/horrorfromthedeep/HorrorFromTheDeep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/horrorfromthedeep/HorrorFromTheDeep.java index 6e4e9b78283..2fd61bd18db 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/horrorfromthedeep/HorrorFromTheDeep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/horrorfromthedeep/HorrorFromTheDeep.java @@ -54,6 +54,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -188,22 +189,22 @@ public void setupConditions() inBasement = new ZoneRequirement(basement); inDagCave = new ZoneRequirement(dagCave); - repairedBridge1 = new VarbitRequirement(36, 1); - repairedBridge2 = new VarbitRequirement(37, 1); - gotKey = new VarbitRequirement(38, 1); + repairedBridge1 = new VarbitRequirement(VarbitID.HORRORBRIDGELEFT, 1); + repairedBridge2 = new VarbitRequirement(VarbitID.HORRORBRIDGERIGHT, 1); + gotKey = new VarbitRequirement(VarbitID.HORRORAGILITYKEY, 1); - usedTar = new VarbitRequirement(46, 1); - usedTinderbox = new VarbitRequirement(48, 1); - usedGlass = new VarbitRequirement(47, 1); + usedTar = new VarbitRequirement(VarbitID.HORRORTAR, 1); + usedTinderbox = new VarbitRequirement(VarbitID.HORRORLIGHT, 1); + usedGlass = new VarbitRequirement(VarbitID.HORRORGLASS, 1); - notUsedAirRune = new Conditions(LogicType.NOR, new VarbitRequirement(43, 1)); - notUsedWaterRune = new Conditions(LogicType.NOR, new VarbitRequirement(41, 1)); - notUsedEarthRune = new Conditions(LogicType.NOR, new VarbitRequirement(42, 1)); - notUsedFireRune = new Conditions(LogicType.NOR, new VarbitRequirement(40, 1)); - notUsedSword = new Conditions(LogicType.NOR, new VarbitRequirement(44, 1)); - notUsedArrow = new Conditions(LogicType.NOR, new VarbitRequirement(45, 1)); + notUsedAirRune = new Conditions(LogicType.NOR, new VarbitRequirement(VarbitID.HORRORAIR, 1)); + notUsedWaterRune = new Conditions(LogicType.NOR, new VarbitRequirement(VarbitID.HORRORWATER, 1)); + notUsedEarthRune = new Conditions(LogicType.NOR, new VarbitRequirement(VarbitID.HORROREARTH, 1)); + notUsedFireRune = new Conditions(LogicType.NOR, new VarbitRequirement(VarbitID.HORRORFIRE, 1)); + notUsedSword = new Conditions(LogicType.NOR, new VarbitRequirement(VarbitID.HORRORSWORD, 1)); + notUsedArrow = new Conditions(LogicType.NOR, new VarbitRequirement(VarbitID.HORRORARROW, 1)); - doorUnlocked = new VarbitRequirement(35, 1); + doorUnlocked = new VarbitRequirement(VarbitID.HORRORDOOR, 1); dagannothNearby = new NpcHintArrowRequirement(NpcID.HORROR_DAGANNOTH_JR4); motherNearby = new NpcHintArrowRequirement(NpcID.HORROR_DAGGANOTH_AIRA, NpcID.HORROR_DAGGANOTH_AIRB, NpcID.HORROR_DAGGANOTH_AIRC, NpcID.HORROR_DAGGANOTH_AIR, NpcID.HORROR_DAGGANOTH_WATER, diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/icthlarinslittlehelper/DoorPuzzleStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/icthlarinslittlehelper/DoorPuzzleStep.java index 1584be58e07..dbd7fa79a2b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/icthlarinslittlehelper/DoorPuzzleStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/icthlarinslittlehelper/DoorPuzzleStep.java @@ -29,6 +29,7 @@ import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; import net.runelite.api.events.GameTick; import net.runelite.api.gameval.InterfaceID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.widgets.Widget; import net.runelite.client.eventbus.Subscribe; @@ -89,10 +90,9 @@ public void onGameTick(GameTick event) private void updateSolvedPositionState() { - int START_VARBIT_ID = 420; for (int i = 0; i < 20; i++) { - currentState[i] = (1 + client.getVarbitValue(START_VARBIT_ID + i)) % 2; + currentState[i] = (1 + client.getVarbitValue(VarbitID.ICS_TILE1 + i)) % 2; } if (Arrays.equals(currentState, lastState)) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/icthlarinslittlehelper/IcthlarinsLittleHelper.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/icthlarinslittlehelper/IcthlarinsLittleHelper.java index c94483d0fbc..28a7d5e2312 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/icthlarinslittlehelper/IcthlarinsLittleHelper.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/icthlarinslittlehelper/IcthlarinsLittleHelper.java @@ -255,27 +255,27 @@ protected void setupRequirements() public void setupConditions() { puzzleOpen = new WidgetModelRequirement(147, 3, 6474); - givenToken = new VarbitRequirement(450, 1); + givenToken = new VarbitRequirement(VarbitID.ICS_GIVENSPHINXSTATUE, 1); - hasHetJar = new VarbitRequirement(397, 1); - hasCrondisJar = new VarbitRequirement(397, 4); + hasHetJar = new VarbitRequirement(VarbitID.ICS_LITTLE_JAR_MULTI, 1); + hasCrondisJar = new VarbitRequirement(VarbitID.ICS_LITTLE_JAR_MULTI, 4); // TODO: Verify varbit values for apmeken/scarabas - hasApmekenJar = new VarbitRequirement(397, 3); - hasScarabasJar = new VarbitRequirement(397, 2); + hasApmekenJar = new VarbitRequirement(VarbitID.ICS_LITTLE_JAR_MULTI, 3); + hasScarabasJar = new VarbitRequirement(VarbitID.ICS_LITTLE_JAR_MULTI, 2); killedGuardian = new VarbitRequirement(VarbitID.ICS_LITTLE_VAR, 11, Operation.GREATER_EQUAL); // picked up het, 404 = 1 // picked up apmeken, 405 = 1 - talkedToEmbalmer = new VarbitRequirement(399, 1); + talkedToEmbalmer = new VarbitRequirement(VarbitID.ICS_METEMBALMER, 1); - givenSalt = new VarbitRequirement(401, 1); - givenSap = new VarbitRequirement(402, 1); - givenLinen = new VarbitRequirement(403, 1); - givenEmbalmerAllItems = new VarbitRequirement(400, 7); + givenSalt = new VarbitRequirement(VarbitID.ICS_GOTSALT, 1); + givenSap = new VarbitRequirement(VarbitID.ICS_GOTSAP, 1); + givenLinen = new VarbitRequirement(VarbitID.ICS_GOTLINEN, 1); + givenEmbalmerAllItems = new VarbitRequirement(VarbitID.ICS_LITTLE_EMBALMER_MULTI, 7); - talkedToCarpenter = new VarbitRequirement(412, 1); - givenCarpenterLogs = new VarbitRequirement(398, 1); + talkedToCarpenter = new VarbitRequirement(VarbitID.ICS_METCARPENTER, 1); + givenCarpenterLogs = new VarbitRequirement(VarbitID.ICS_LITTLE_CARPENTER_MULTI, 1); possessedPriestNearby = new NpcCondition(NpcID.ICS_LITTLE_POSSESSEDPRIEST); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/impcatcher/ImpCatcher.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/impcatcher/ImpCatcher.java index cab9996122d..4c90a010256 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/impcatcher/ImpCatcher.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/impcatcher/ImpCatcher.java @@ -33,50 +33,53 @@ import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; -import java.util.*; - public class ImpCatcher extends BasicQuestHelper { - //Items Required - ItemRequirement blackBead, whiteBead, redBead, yellowBead; - - QuestStep moveToTower, climbTower, turnInQuest, collectBeads; - - Zone towerSecond, towerThird; - - ZoneRequirement inTowerSecond, inTowerThird; + // Required items + ItemRequirement blackBead; + ItemRequirement whiteBead; + ItemRequirement redBead; + ItemRequirement yellowBead; + + // Zones + Zone towerSecond; + Zone towerThird; + + // Miscellaneus requirements + ZoneRequirement inTowerSecond; + ZoneRequirement inTowerThird; + + // Steps + QuestStep moveToTower; + QuestStep climbUpF1; + QuestStep turnInQuest; + QuestStep collectBeads; @Override - public Map loadSteps() + protected void setupZones() { - initializeRequirements(); - setupSteps(); - - Map steps = new HashMap<>(); - - ConditionalStep doQuest = new ConditionalStep(this, collectBeads); - doQuest.addStep(new Conditions(blackBead,whiteBead,redBead,yellowBead, inTowerThird), turnInQuest); - doQuest.addStep(new Conditions(blackBead,whiteBead,redBead,yellowBead, inTowerSecond), climbTower); - doQuest.addStep(new Conditions(blackBead,whiteBead,redBead,yellowBead), moveToTower); - - steps.put(0, doQuest); - - steps.put(1, doQuest); - - return steps; + towerSecond = new Zone(new WorldPoint(3089, 3176, 1), new WorldPoint(3126, 3146, 1)); + towerThird = new Zone(new WorldPoint(3089, 3176, 2), new WorldPoint(3126, 3146, 2)); } - - @Override - protected void setupRequirements() { + protected void setupRequirements() + { blackBead = new ItemRequirement("Black bead", ItemID.BLACK_BEAD); whiteBead = new ItemRequirement("White bead", ItemID.WHITE_BEAD); redBead = new ItemRequirement("Red bead", ItemID.RED_BEAD); @@ -86,13 +89,16 @@ protected void setupRequirements() { inTowerThird = new ZoneRequirement(towerThird); } - public void setupSteps(){ + public void setupSteps() + { collectBeads = new DetailedQuestStep(this, "Collect one of each bead. You can kill imps for these beads, or buy them on the Grand Exchange.", blackBead, whiteBead, redBead, yellowBead); moveToTower = new ObjectStep(this, ObjectID.FAI_WIZTOWER_SPIRALSTAIRS, new WorldPoint(3103, 3159, 0), "Head to the Wizards' Tower and climb up the staircase with the required beads.", blackBead, whiteBead, redBead, yellowBead); - climbTower = new ObjectStep(this, ObjectID.FAI_WIZTOWER_SPIRALSTAIRS_MIDDLE, new WorldPoint(3103, 3159, 1), - "Climb the staircase again.", blackBead, whiteBead, redBead, yellowBead); + climbUpF1 = new ObjectStep(this, ObjectID.FAI_WIZTOWER_SPIRALSTAIRS_MIDDLE, new WorldPoint(3103, 3159, 1), + "Head to the Wizards' Tower and climb up the staircase with the required beads.", blackBead, whiteBead, redBead, yellowBead); + climbUpF1.addDialogStep("Up"); + moveToTower.addSubSteps(climbUpF1); turnInQuest = new NpcStep(this, NpcID.WIZARD_MIZGOG_QUEST, new WorldPoint(3103, 3163, 2), "Talk to Wizard Mizgog with the required beads to finish the quest.", blackBead, whiteBead, redBead, yellowBead); @@ -100,30 +106,34 @@ public void setupSteps(){ } @Override - protected void setupZones(){ - towerSecond = new Zone(new WorldPoint(3089, 3176, 1), new WorldPoint(3126, 3146, 1)); - towerThird = new Zone(new WorldPoint(3089, 3176, 2), new WorldPoint(3126, 3146, 2)); - } - - @Override - public List getItemRequirements() + public Map loadSteps() { - ArrayList reqs = new ArrayList<>(); - reqs.add(blackBead); - reqs.add(whiteBead); - reqs.add(redBead); - reqs.add(yellowBead); + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + var doQuest = new ConditionalStep(this, collectBeads); + doQuest.addStep(new Conditions(blackBead, whiteBead, redBead, yellowBead, inTowerThird), turnInQuest); + doQuest.addStep(new Conditions(blackBead, whiteBead, redBead, yellowBead, inTowerSecond), climbUpF1); + doQuest.addStep(new Conditions(blackBead, whiteBead, redBead, yellowBead), moveToTower); - return reqs; + steps.put(0, doQuest); + + steps.put(1, doQuest); + + return steps; } @Override - public List getPanels() + public List getItemRequirements() { - List allSteps = new ArrayList<>(); - allSteps.add(new PanelDetails("Bring Mizgog his beads", Arrays.asList(collectBeads, moveToTower, climbTower, turnInQuest), - blackBead, whiteBead, redBead, yellowBead)); - return allSteps; + return List.of( + blackBead, + whiteBead, + redBead, + yellowBead + ); } @Override @@ -135,18 +145,43 @@ public QuestPointReward getQuestPointReward() @Override public List getExperienceRewards() { - return Collections.singletonList(new ExperienceReward(Skill.MAGIC, 875)); + return List.of( + new ExperienceReward(Skill.MAGIC, 875) + ); } @Override public List getItemRewards() { - return Collections.singletonList(new ItemReward("An Amulet of Accuracy", ItemID.AMULET_OF_ACCURACY, 1)); + return List.of( + new ItemReward("An Amulet of Accuracy", ItemID.AMULET_OF_ACCURACY, 1) + ); } @Override public List getCombatRequirements() { - return Collections.singletonList("Imps (level 2) if you plan on collecting the beads yourself"); + return List.of( + "Imps (level 2) if you plan on collecting the beads yourself" + ); + } + + @Override + public List getPanels() + { + var steps = new ArrayList(); + + steps.add(new PanelDetails("Bring Mizgog his beads", List.of( + collectBeads, + moveToTower, + turnInQuest + ), List.of( + blackBead, + whiteBead, + redBead, + yellowBead + ))); + + return steps; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/inaidofthemyreque/FillBurghCrate.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/inaidofthemyreque/FillBurghCrate.java index f97298e4eb5..f672d0ff405 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/inaidofthemyreque/FillBurghCrate.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/inaidofthemyreque/FillBurghCrate.java @@ -30,6 +30,7 @@ import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; import net.runelite.api.events.GameTick; import net.runelite.api.gameval.ItemID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; import java.util.Arrays; @@ -66,9 +67,9 @@ public void onGameTick(GameTick event) protected void updateSteps() { - int numBronzeAxeNeeded = 10 - client.getVarbitValue(1991); - int numSnailOrMackerelNeeded = 10 - client.getVarbitValue(1992); - int numTinderboxNeeded = 3 - client.getVarbitValue(1993); + int numBronzeAxeNeeded = 10 - client.getVarbitValue(VarbitID.BURGH_AXES_CRATE); + int numSnailOrMackerelNeeded = 10 - client.getVarbitValue(VarbitID.BURGH_FOOD_CRATE); + int numTinderboxNeeded = 3 - client.getVarbitValue(VarbitID.BURGH_TINDERBOX_CRATE); tinderbox3.setQuantity(numTinderboxNeeded); bronzeAxe10.setQuantity(numBronzeAxeNeeded); @@ -77,7 +78,7 @@ protected void updateSteps() if (!decidedOnSnailOrMackerel && QuestHelperQuest.IN_AID_OF_THE_MYREQUE.getVar(client) >= 165) { decidedOnSnailOrMackerel = true; - if (client.getVarbitValue(1976) == 1) + if (client.getVarbitValue(VarbitID.BURGH_FOOD_TYPE) == 1) { this.setText("Fill the crate with 3 tinderboxes, 10 bronze axes, and 10 raw mackerel."); rawSnailsOrMackerel.setDisplayItemId(ItemID.RAW_MACKEREL); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/inaidofthemyreque/InAidOfTheMyreque.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/inaidofthemyreque/InAidOfTheMyreque.java index 20760887288..b1ceddc008a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/inaidofthemyreque/InAidOfTheMyreque.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/inaidofthemyreque/InAidOfTheMyreque.java @@ -364,24 +364,24 @@ public void setupConditions() // 1979, Cornelius is banker - filledCrate = new VarbitRequirement(1994, 938); - addedCoal = new VarbitRequirement(1980, 2); - litFurnace = new VarbitRequirement(1980, 3); + filledCrate = new VarbitRequirement(VarbitID.BURGH_CRATE_OVERSEER, 938); + addedCoal = new VarbitRequirement(VarbitID.BURGH_FURNACE_FIX, 2); + litFurnace = new VarbitRequirement(VarbitID.BURGH_FURNACE_FIX, 3); - talkedToGadderanks = new VarbitRequirement(1995, 1); - talkedToJuvinates = new VarbitRequirement(1997, 1); - talkedToWiskit = new VarbitRequirement(1996, 1); + talkedToGadderanks = new VarbitRequirement(VarbitID.GADDERANKS_BLOOD_TITHE_CHAT, 1); + talkedToJuvinates = new VarbitRequirement(VarbitID.JUVE_BLOOD_TITHE_CHAT, 1); + talkedToWiskit = new VarbitRequirement(VarbitID.VILLAGER_BLOOD_TITHE_CHAT, 1); - defeatedGadderanks = new VarbitRequirement(1999, 3); + defeatedGadderanks = new VarbitRequirement(VarbitID.JUVINATE_DEATHS, 3); veliafReturnedToBase = new VarbitRequirement(VarbitID.BLOOD_TITHE_VISIBLE, 3, Operation.GREATER_EQUAL); // 2001 = 1, travelling with ivan // 2003 = 1, Ivan has silver sickle // 2005 0-10 for food - libraryOpen = new VarbitRequirement(1982, 1); + libraryOpen = new VarbitRequirement(VarbitID.BURGH_TEMPLE_TRAPDOOR, 1); - boardsRemoved = new VarbitRequirement(1983, 1); + boardsRemoved = new VarbitRequirement(VarbitID.IVANDIS_TOMB_BOARDS, 1); // 1981 1->2 when talked to Gadderanks diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/insearchofknowledge/FeedingAimeri.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/insearchofknowledge/FeedingAimeri.java index 98e560392b8..1c0266a0171 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/insearchofknowledge/FeedingAimeri.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/insearchofknowledge/FeedingAimeri.java @@ -32,6 +32,7 @@ import net.runelite.api.events.GameTick; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; public class FeedingAimeri extends NpcStep @@ -54,7 +55,7 @@ public void onGameTick(GameTick event) protected void updateSteps() { - int numFoodUsed = client.getVarbitValue(8393); + int numFoodUsed = client.getVarbitValue(VarbitID.HOSDUN_AIMERI_STATUS); food5Highlighted.setQuantity(5 - numFoodUsed); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/insearchofknowledge/InSearchOfKnowledge.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/insearchofknowledge/InSearchOfKnowledge.java index d5fc9a58828..6ac52a1dbd7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/insearchofknowledge/InSearchOfKnowledge.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/insearchofknowledge/InSearchOfKnowledge.java @@ -43,6 +43,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -138,11 +139,11 @@ protected void setupZones() public void setupConditions() { inDungeon = new ZoneRequirement(dungeon); - fedAimeri = new VarbitRequirement(8393, 5); + fedAimeri = new VarbitRequirement(VarbitID.HOSDUN_AIMERI_STATUS, 5); - givenSunTome = new VarbitRequirement(8405, 1); - givenMoonTome = new VarbitRequirement(8404, 1); - givenTempleTome = new VarbitRequirement(8406, 1); + givenSunTome = new VarbitRequirement(VarbitID.HOSDUN_SUN_TOME_RETURNED, 1); + givenMoonTome = new VarbitRequirement(VarbitID.HOSDUN_MOON_TOME_RETURNED, 1); + givenTempleTome = new VarbitRequirement(VarbitID.HOSDUN_TEMPLE_TOME_RETURNED, 1); hadTempleTome = new Conditions(true, LogicType.OR, templeTome, @@ -154,9 +155,9 @@ public void setupConditions() sunTome, givenSunTome); - repairedSun = new VarbitRequirement(8399, 4); - repairedMoon = new VarbitRequirement(8400, 4); - repairedTemple = new VarbitRequirement(8401, 4); + repairedSun = new VarbitRequirement(VarbitID.HOSDUN_SUN_PAGES, 4); + repairedMoon = new VarbitRequirement(VarbitID.HOSDUN_MOON_PAGES, 4); + repairedTemple = new VarbitRequirement(VarbitID.HOSDUN_TEMPLE_PAGES, 4); repairedTomes = new Conditions(repairedSun, repairedMoon, repairedTemple); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/insearchofthemyreque/InSearchOfTheMyreque.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/insearchofthemyreque/InSearchOfTheMyreque.java index d6d3bcade99..2c90f767d9b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/insearchofthemyreque/InSearchOfTheMyreque.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/insearchofthemyreque/InSearchOfTheMyreque.java @@ -214,9 +214,9 @@ protected void setupZones() public void setupConditions() { hasEnoughPouch = druidPouch5; - repairedBridge1 = new VarbitRequirement(176, 1); - repairedBridge2 = new VarbitRequirement(177, 1); - repairedBridge3 = new VarbitRequirement(178, 1); + repairedBridge1 = new VarbitRequirement(VarbitID.BRIDGERUNG1, 1); + repairedBridge2 = new VarbitRequirement(VarbitID.BRIDGERUNG2, 1); + repairedBridge3 = new VarbitRequirement(VarbitID.BRIDGERUNG3, 1); onBridge = new ZoneRequirement(bridge); onEntranceIsland = new ZoneRequirement(entranceIsland); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/kingsransom/KingsRansom.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/kingsransom/KingsRansom.java index 765e159a5f7..a6431c945b8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/kingsransom/KingsRansom.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/kingsransom/KingsRansom.java @@ -49,6 +49,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -253,9 +254,9 @@ protected void setupZones() public void setupConditions() { - hasForm = new Conditions(LogicType.OR, addressForm, new VarbitRequirement(3890, 1)); - hasScrapPaper = new Conditions(LogicType.OR, scrapPaper, new VarbitRequirement(3891, 1)); - hasBlackHelm = new Conditions(LogicType.OR, blackHelm, new VarbitRequirement(3892, 1)); + hasForm = new Conditions(LogicType.OR, addressForm, new VarbitRequirement(VarbitID.KR_CLUE_FORM, 1)); + hasScrapPaper = new Conditions(LogicType.OR, scrapPaper, new VarbitRequirement(VarbitID.KR_CLUE_NOTE, 1)); + hasBlackHelm = new Conditions(LogicType.OR, blackHelm, new VarbitRequirement(VarbitID.KR_CLUE_ARMOUR, 1)); inUpstairsManor = new ZoneRequirement(upstairsManor); inDownstairsManor = new ZoneRequirement(downstairsManor, downstairsManor2); inTrialRoom = new ZoneRequirement(trialRoom); @@ -267,14 +268,14 @@ public void setupConditions() inSecretRoom = new ZoneRequirement(secretRoomFloor0); inFortressEntrance = new ZoneRequirement(mainEntrance1, mainEntrance2, mainEntrance3, mainEntrance4); - handlerInRoom = new VarbitRequirement(3907, 2); - butlerInRoom = new VarbitRequirement(3907, 3); - maidInRoom = new VarbitRequirement(3907, 5); + handlerInRoom = new VarbitRequirement(VarbitID.KR_COURT_WITNESS, 2); + butlerInRoom = new VarbitRequirement(VarbitID.KR_COURT_WITNESS, 3); + maidInRoom = new VarbitRequirement(VarbitID.KR_COURT_WITNESS, 5); - askedAboutThread = new VarbitRequirement(3900, 1); - askedAboutPoison = new VarbitRequirement(3912, 1); - askedAboutDagger = new VarbitRequirement(3913, 1); - askedAboutNight = new VarbitRequirement(3915, 1); + askedAboutThread = new VarbitRequirement(VarbitID.KR_COURT_THREAD, 1); + askedAboutPoison = new VarbitRequirement(VarbitID.KR_COURT_DOG_PROOF, 1); + askedAboutDagger = new VarbitRequirement(VarbitID.KR_COURT_BUTL_PROOF, 1); + askedAboutNight = new VarbitRequirement(VarbitID.KR_COURT_MAID_PROOF, 1); inPuzzle = new WidgetModelRequirement(588, 1, 27214); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/kingsransom/LockpickPuzzle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/kingsransom/LockpickPuzzle.java index db29cd8ff5f..43d813205ac 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/kingsransom/LockpickPuzzle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/kingsransom/LockpickPuzzle.java @@ -29,6 +29,7 @@ import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; import net.runelite.api.events.GameTick; import net.runelite.api.gameval.InterfaceID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.widgets.Widget; import net.runelite.client.eventbus.Subscribe; @@ -36,10 +37,19 @@ public class LockpickPuzzle extends QuestStep { - int[] TUMBLER_ANSWERS = new int[]{3894, 3895, 3896, 3897}; + int[] TUMBLER_ANSWERS = new int[]{ + VarbitID.KR_TUMB1_ANS, + VarbitID.KR_TUMB2_ANS, + VarbitID.KR_TUMB3_ANS, + VarbitID.KR_TUMB4_ANS + }; int[] TUMBLER_WIDGETS = new int[]{20, 21, 22, 23}; - int[] TUMBLER_CURRENT = new int[]{3901, 3902, 3903, 3904}; - int CURRENT_TUMBLER = 3905; + int[] TUMBLER_CURRENT = new int[]{ + VarbitID.KR_TUMB1_CURR_POS, + VarbitID.KR_TUMB2_CURR_POS, + VarbitID.KR_TUMB3_CURR_POS, + VarbitID.KR_TUMB4_CURR_POS + }; int UP_WIDGET = 12; int DOWN_WIDGET = 13; int TRY_LOCK = 14; @@ -105,7 +115,7 @@ private void updateSolvedPositionState() private void updateWidget(int widgetID, int currentVal, int answer) { - int currentTumbler = client.getVarbitValue(CURRENT_TUMBLER); + int currentTumbler = client.getVarbitValue(VarbitID.KR_TUMB_CURRENT); if (currentTumbler != widgetID + 1) { highlightChildID = TUMBLER_WIDGETS[widgetID]; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/BringLunarItems.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/BringLunarItems.java index 98e6720e33f..82c65aafe3c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/BringLunarItems.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/BringLunarItems.java @@ -9,6 +9,7 @@ import net.runelite.api.events.VarbitChanged; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; +import net.runelite.api.gameval.VarbitID; public class BringLunarItems extends NpcStep { @@ -41,14 +42,14 @@ public void setupConditions() sealOfPassage = new ItemRequirement("Seal of passage", ItemID.LUNAR_SEAL_OF_PASSAGE); sealOfPassage.setTooltip("You can get another from Brundt"); - handedInHelm = new VarbitRequirement(2436, 1); - handedInCape = new VarbitRequirement(2437, 1); - handedInAmulet = new VarbitRequirement(2438, 1); - handedInTorso = new VarbitRequirement(2439, 1); - handedInGloves = new VarbitRequirement(2441, 1); - handedInBoots = new VarbitRequirement(2440, 1); - handedInLegs = new VarbitRequirement(2442, 1); - handedInRing = new VarbitRequirement(2443, 1); + handedInHelm = new VarbitRequirement(VarbitID.LUNAR_PT2_ONEIRO_GIVEN_HELM, 1); + handedInCape = new VarbitRequirement(VarbitID.LUNAR_PT2_ONEIRO_GIVEN_CAPE, 1); + handedInAmulet = new VarbitRequirement(VarbitID.LUNAR_PT2_ONEIRO_GIVEN_AMULET, 1); + handedInTorso = new VarbitRequirement(VarbitID.LUNAR_PT2_ONEIRO_GIVEN_TORSO, 1); + handedInGloves = new VarbitRequirement(VarbitID.LUNAR_PT2_ONEIRO_GIVEN_BOOTS, 1); + handedInBoots = new VarbitRequirement(VarbitID.LUNAR_PT2_ONEIRO_GIVEN_GLOVES, 1); + handedInLegs = new VarbitRequirement(VarbitID.LUNAR_PT2_ONEIRO_GIVEN_TROUSERS, 1); + handedInRing = new VarbitRequirement(VarbitID.LUNAR_PT2_ONEIRO_GIVEN_RING, 1); } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/LunarDiplomacy.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/LunarDiplomacy.java index ac4bbbcb561..8faf75c80fd 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/LunarDiplomacy.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/LunarDiplomacy.java @@ -498,31 +498,31 @@ public void setupConditions() inFightArena = new ZoneRequirement(fightArena); - revealedPillar = new VarbitRequirement(2431, 2); - revealedCannon = new VarbitRequirement(2432, 2); - revealedCrate = new VarbitRequirement(2433, 2); - revealedChart = new VarbitRequirement(2434, 2); - revealedChest = new VarbitRequirement(2435, 2); + revealedPillar = new VarbitRequirement(VarbitID.LUNAR_QUEST_SYMBOLPRES1, 2); + revealedCannon = new VarbitRequirement(VarbitID.LUNAR_QUEST_SYMBOLPRES2, 2); + revealedCrate = new VarbitRequirement(VarbitID.LUNAR_QUEST_SYMBOLPRES3, 2); + revealedChart = new VarbitRequirement(VarbitID.LUNAR_QUEST_SYMBOLPRES4, 2); + revealedChest = new VarbitRequirement(VarbitID.LUNAR_QUEST_SYMBOLPRES5, 2); toothNearby = new ItemOnTileRequirement(suqahTooth); - talkedToSelene = new VarbitRequirement(2445, 1); - talkedToMeteora = new VarbitRequirement(2446, 1); - talkedToRimae = new VarbitRequirement(2447, 1); + talkedToSelene = new VarbitRequirement(VarbitID.LUNAR_MONK_RING_INTRO, 1); + talkedToMeteora = new VarbitRequirement(VarbitID.LUNAR_MONK_AMULET_INTRO, 1); + talkedToRimae = new VarbitRequirement(VarbitID.LUNAR_MONK_TANCLOTHES_INTRO, 1); tiaraNearby = new ItemOnTileRequirement(tiara); - hadHelm = new Conditions(LogicType.OR, helm.alsoCheckBank(questBank), new VarbitRequirement(2436, 1)); - hadCape = new Conditions(LogicType.OR, cape.alsoCheckBank(questBank), new VarbitRequirement(2437, 1)); - hadAmulet = new Conditions(LogicType.OR, amulet.alsoCheckBank(questBank), new VarbitRequirement(2438, 1)); - hadTorso = new Conditions(LogicType.OR, torso.alsoCheckBank(questBank), new VarbitRequirement(2439, 1)); - hadGloves = new Conditions(LogicType.OR, gloves.alsoCheckBank(questBank), new VarbitRequirement(2441, 1)); - hadBoots = new Conditions(LogicType.OR, boots.alsoCheckBank(questBank), new VarbitRequirement(2440, 1)); - hadLegs = new Conditions(LogicType.OR, legs.alsoCheckBank(questBank), new VarbitRequirement(2442, 1)); - hadRing = new Conditions(LogicType.OR, ring.alsoCheckBank(questBank), new VarbitRequirement(2443, 1)); + hadHelm = new Conditions(LogicType.OR, helm.alsoCheckBank(questBank), new VarbitRequirement(VarbitID.LUNAR_PT2_ONEIRO_GIVEN_HELM, 1)); + hadCape = new Conditions(LogicType.OR, cape.alsoCheckBank(questBank), new VarbitRequirement(VarbitID.LUNAR_PT2_ONEIRO_GIVEN_CAPE, 1)); + hadAmulet = new Conditions(LogicType.OR, amulet.alsoCheckBank(questBank), new VarbitRequirement(VarbitID.LUNAR_PT2_ONEIRO_GIVEN_AMULET, 1)); + hadTorso = new Conditions(LogicType.OR, torso.alsoCheckBank(questBank), new VarbitRequirement(VarbitID.LUNAR_PT2_ONEIRO_GIVEN_TORSO, 1)); + hadGloves = new Conditions(LogicType.OR, gloves.alsoCheckBank(questBank), new VarbitRequirement(VarbitID.LUNAR_PT2_ONEIRO_GIVEN_BOOTS, 1)); + hadBoots = new Conditions(LogicType.OR, boots.alsoCheckBank(questBank), new VarbitRequirement(VarbitID.LUNAR_PT2_ONEIRO_GIVEN_GLOVES, 1)); + hadLegs = new Conditions(LogicType.OR, legs.alsoCheckBank(questBank), new VarbitRequirement(VarbitID.LUNAR_PT2_ONEIRO_GIVEN_TROUSERS, 1)); + hadRing = new Conditions(LogicType.OR, ring.alsoCheckBank(questBank), new VarbitRequirement(VarbitID.LUNAR_PT2_ONEIRO_GIVEN_RING, 1)); hadClothes = new Conditions(hadBoots, hadTorso, hadGloves, hadLegs); - litBrazier = new VarbitRequirement(2430, 1); + litBrazier = new VarbitRequirement(VarbitID.LUNAR_BRAZIER_LIT, 1); inCentreOfDream = new ZoneRequirement(centreOfDream); inChanceDream = new ZoneRequirement(chanceDream); @@ -532,12 +532,12 @@ public void setupConditions() inRaceDream = new ZoneRequirement(raceDream); inMimicDream = new ZoneRequirement(mimicDream); - doingTreeChallenge = new VarbitRequirement(3184, 1); - startedRaceChallenge = new VarbitRequirement(2424, 1); + doingTreeChallenge = new VarbitRequirement(VarbitID.LUNAR_TREE_PLAYING, 1); + startedRaceChallenge = new VarbitRequirement(VarbitID.LUNAR_SKILL_INTRO, 1); - startedNumberChallenge = new VarbitRequirement(2416, 1); + startedNumberChallenge = new VarbitRequirement(VarbitID.LUNAR_NUM_INTRO, 1); - needToTalkAtMiddle = new VarbitRequirement(2429, 1); + needToTalkAtMiddle = new VarbitRequirement(VarbitID.LUNAR_SPOKEN_CENTRE, 1); finishedMimic = new VarbitRequirement(VarbitID.LUNAR_EMOTE_PROG, 5, Operation.GREATER_EQUAL); finishedNumbers = new VarbitRequirement(VarbitID.LUNAR_NUM_PROG, 6, Operation.GREATER_EQUAL); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/MemoryChallenge.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/MemoryChallenge.java index ec2d58d6302..ba0844af2b9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/MemoryChallenge.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/MemoryChallenge.java @@ -30,6 +30,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; import net.runelite.api.events.VarbitChanged; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; import java.util.ArrayList; @@ -122,10 +123,10 @@ public void checkNextTile(int wpsPos) private void setupPaths() { - int current1 = client.getVarbitValue(2412); - int current2 = client.getVarbitValue(2413); - int current3 = client.getVarbitValue(2414); - int current4 = client.getVarbitValue(2415); + int current1 = client.getVarbitValue(VarbitID.LUNAR_FLOOR_COL_A); + int current2 = client.getVarbitValue(VarbitID.LUNAR_FLOOR_COL_B); + int current3 = client.getVarbitValue(VarbitID.LUNAR_FLOOR_COL_C); + int current4 = client.getVarbitValue(VarbitID.LUNAR_FLOOR_COL_D); if (current1 == column1 && current2 == column2 && diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/MimicChallenge.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/MimicChallenge.java index 2229a4f0237..c6545aa5e50 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/MimicChallenge.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/MimicChallenge.java @@ -30,6 +30,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.VarbitChanged; import net.runelite.api.gameval.NpcID; +import net.runelite.api.gameval.VarbitID; import java.util.Arrays; import java.util.Collection; @@ -65,13 +66,13 @@ public void onVarbitChanged(VarbitChanged varbitChanged) @Override protected void updateSteps() { - if (client.getVarbitValue(2419) == 0) + if (client.getVarbitValue(VarbitID.LUNAR_EMOTE_CANMIMIC) == 0) { startUpStep(talk); return; } - switch (client.getVarbitValue(2420)) + switch (client.getVarbitValue(VarbitID.LUNAR_EMOTE_LOC)) { case 1: startUpStep(cry); @@ -96,7 +97,7 @@ protected void updateSteps() public void chooseStepBasedOnIfTalked(QuestStep emoteStep) { - if (client.getVarbitValue(2419) == 1) + if (client.getVarbitValue(VarbitID.LUNAR_EMOTE_CANMIMIC) == 1) { startUpStep(emoteStep); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/NumberChallenge.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/NumberChallenge.java index f03a56be50c..68750355f85 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/NumberChallenge.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/lunardiplomacy/NumberChallenge.java @@ -8,6 +8,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.VarbitChanged; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.Arrays; import java.util.Collection; @@ -60,7 +61,7 @@ public void onVarbitChanged(VarbitChanged varbitChanged) @Override protected void updateSteps() { - switch (client.getVarbitValue(2417)) + switch (client.getVarbitValue(VarbitID.LUNAR_NUM_CURSEQ)) { case 0: setupStepFromState(press7, press9); @@ -114,7 +115,7 @@ protected void updateSteps() private void setupStepFromState(QuestStep choice1, QuestStep choice2) { - if (client.getVarbitValue(2421) == 0) + if (client.getVarbitValue(VarbitID.LUNAR_PT3_NUM_SEQ_N) == 0) { startUpStep(choice1); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/makingfriendswithmyarm/MakingFriendsWithMyArm.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/makingfriendswithmyarm/MakingFriendsWithMyArm.java index 54df5d1c38d..27ec86a5990 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/makingfriendswithmyarm/MakingFriendsWithMyArm.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/makingfriendswithmyarm/MakingFriendsWithMyArm.java @@ -400,7 +400,7 @@ public void setupConditions() // 2098 200 -> 205 (SWAN SONG???) when WOM dies - pickedUpWom = new VarbitRequirement(6536, 0); + pickedUpWom = new VarbitRequirement(VarbitID.MY2ARM_CLIENT_COFFIN, 0); oddMushroomDied = new VarbitRequirement(VarbitID.MY2ARM_STATUS, 150, Operation.GREATER_EQUAL); defeatedBoss1 = new VarbitRequirement(VarbitID.MY2ARM_STATUS, 160, Operation.GREATER_EQUAL); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/makinghistory/MakingHistory.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/makinghistory/MakingHistory.java index a1296cd9ee8..2cb99b031cd 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/makinghistory/MakingHistory.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/makinghistory/MakingHistory.java @@ -183,18 +183,18 @@ protected void setupZones() public void setupConditions() { - talkedtoBlanin = new Conditions(LogicType.OR, new VarbitRequirement(1385, 1), new VarbitRequirement(1385, 2)); + talkedtoBlanin = new Conditions(LogicType.OR, new VarbitRequirement(VarbitID.MAKINGHISTORY_WARR_PROG, 1), new VarbitRequirement(VarbitID.MAKINGHISTORY_WARR_PROG, 2)); talkedToDron = new VarbitRequirement(VarbitID.MAKINGHISTORY_WARR_PROG, 3, Operation.GREATER_EQUAL); - talkedToDroalak = new Conditions(LogicType.OR, new VarbitRequirement(1386, 2), new VarbitRequirement(1386, 1)); - talkedToMelina = new Conditions(LogicType.OR, new VarbitRequirement(1386, 4), new VarbitRequirement(1386, 3)); - gotScroll = new VarbitRequirement(1386, 5); - handedInScroll = new VarbitRequirement(1386, 6); + talkedToDroalak = new Conditions(LogicType.OR, new VarbitRequirement(VarbitID.MAKINGHISTORY_GHOST_PROG, 2), new VarbitRequirement(VarbitID.MAKINGHISTORY_GHOST_PROG, 1)); + talkedToMelina = new Conditions(LogicType.OR, new VarbitRequirement(VarbitID.MAKINGHISTORY_GHOST_PROG, 4), new VarbitRequirement(VarbitID.MAKINGHISTORY_GHOST_PROG, 3)); + gotScroll = new VarbitRequirement(VarbitID.MAKINGHISTORY_GHOST_PROG, 5); + handedInScroll = new VarbitRequirement(VarbitID.MAKINGHISTORY_GHOST_PROG, 6); inCastle = new ZoneRequirement(castle); gotKey = new VarbitRequirement(VarbitID.MAKINGHISTORY_TRADER_PROG, 1, Operation.GREATER_EQUAL); gotChest = new VarbitRequirement(VarbitID.MAKINGHISTORY_TRADER_PROG, 2, Operation.GREATER_EQUAL); - handedInJournal = new VarbitRequirement(1384, 4); + handedInJournal = new VarbitRequirement(VarbitID.MAKINGHISTORY_TRADER_PROG, 4); handedInEverything = new Conditions(handedInJournal, handedInScroll, talkedToDron); finishedFrem = talkedToDron; finishedGhost = new Conditions(LogicType.OR, handedInScroll, gotScroll); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/meatandgreet/MeatAndGreet.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/meatandgreet/MeatAndGreet.java index 8b5b172095a..f0a540c7b98 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/meatandgreet/MeatAndGreet.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/meatandgreet/MeatAndGreet.java @@ -218,7 +218,7 @@ public void setupSteps() // enterWolfDenAndKillTheDireWolfAlpha killDireWolfAlpha = new NpcStep(this, NpcID.MAG_DIREWOLF, "Kill the Dire Wolf Alpha. Use Protect from Melee to avoid most damage. His pups deal ranged damage.", combatGear, food); // killed wolf: 11184 2->3 - var needToKillWolf = new VarbitRequirement(11184, 2); + var needToKillWolf = new VarbitRequirement(VarbitID.MAG_MEAT, 2); var exitWolfDen = new ObjectStep(this, ObjectID.DIREWOLF_CAVE_EXIT_INSTANCE, new WorldPoint(1488, 9502, 1), "Exit the wolf den, then head back to Alba in the farmhouse west of Civitas illa Fortis."); // 13092 0->100 // 13093 0->100 @@ -226,7 +226,7 @@ public void setupSteps() // 13095 0->100 returnToAlba = new NpcStep(this, NpcID.MAG_ALBA, new WorldPoint(1587, 3126, 0), "Return to Alba in the farmhouse west of Civitas illa Fortis to tell them about the Dire Wolf Alpha's demise."); returnToAlba.addSubSteps(exitWolfDen); - var needToReturnToAlba = new VarbitRequirement(11184, 3); + var needToReturnToAlba = new VarbitRequirement(VarbitID.MAG_MEAT, 3); // 11184 3->4 after returning to alba solveSupplyChainIssues = new ConditionalStep(this, returnToAlba); solveSupplyChainIssues.addStep(pinPadOpen, enterCodeWrapper); @@ -309,9 +309,9 @@ public void setupSteps() "Adjust number of spice portions to:" ); var meatCorrect = new VarbitRequirement(VarbitID.MAG_PORTIONS_MEAT, 4, Operation.EQUAL); - var saladCorrect = new VarbitRequirement(11186, 2); - var spiceCorrect = new VarbitRequirement(11187, 1); - var sauceCorrect = new VarbitRequirement(11188, 3); + var saladCorrect = new VarbitRequirement(VarbitID.MAG_PORTIONS_SALAD, 2); + var spiceCorrect = new VarbitRequirement(VarbitID.MAG_PORTIONS_SPICE, 1); + var sauceCorrect = new VarbitRequirement(VarbitID.MAG_PORTIONS_SAUCE, 3); var recipeStep = new ConditionalStep(this, adjustRecipe, "Configure the kebab recipe with Emelio."); // 11189 0->1 = received test kebab var giveExperimentalKebabToRenata = new NpcStep(this, NpcID.MAG_RENATA_VIS, new WorldPoint(1750, 3072, 0), "Talk to Renata to have them test your test kebab.", experimentalKebab); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/misthalinmystery/MisthalinMystery.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/misthalinmystery/MisthalinMystery.java index dfc4edfe626..414c9e5160a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/misthalinmystery/MisthalinMystery.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/misthalinmystery/MisthalinMystery.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, Zoinkwiz + * Copyright (c) 2025, pajlada * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,6 +29,7 @@ import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; import net.runelite.client.plugins.microbot.questhelper.requirements.util.Operation; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.widget.WidgetTextRequirement; @@ -36,21 +38,35 @@ import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.PuzzleWrapperStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.WidgetStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; +import net.runelite.api.gameval.InterfaceID; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; import net.runelite.api.gameval.VarbitID; -import java.util.*; - -import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; - public class MisthalinMystery extends BasicQuestHelper { - // Requirements + // Zones + Zone island; + Zone outside1; + Zone outside2; + Zone outside3; + Zone bossRoom; + + // Miscellaneous requirements ItemRequirement bucket; ItemRequirement manorKey; ItemRequirement knife; @@ -108,18 +124,25 @@ public class MisthalinMystery extends BasicQuestHelper ObjectStep observeThroughTree; ObjectStep takeNote2; DetailedQuestStep readNotes2; + + PuzzleWrapperStep pwPlayPiano; + ConditionalStep cPlayPiano; ObjectStep playPiano; WidgetStep playD; WidgetStep playE; WidgetStep playA; WidgetStep playDAgain; DetailedQuestStep restartPiano; - ObjectStep searchThePiano; + PuzzleWrapperStep searchThePiano; + ObjectStep returnOverBrokenWall; ObjectStep openEmeraldDoor; ObjectStep enterBandosGodswordRoomStep; ObjectStep takeNote3; DetailedQuestStep readNotes3; + + PuzzleWrapperStep pwSolveFireplacePuzzle; + ConditionalStep solveFireplacePuzzle; ObjectStep useKnifeOnFireplace; ObjectStep searchFireplace; WidgetStep clickSapphire; @@ -129,7 +152,8 @@ public class MisthalinMystery extends BasicQuestHelper WidgetStep clickOnyx; WidgetStep clickRuby; DetailedQuestStep restartGems; - ObjectStep searchFireplaceForSapphireKey; + PuzzleWrapperStep searchFireplaceForSapphireKey; + ObjectStep goThroughSapphireDoor; DetailedQuestStep reflectKnives; ObjectStep continueThroughSapphireDoor; @@ -139,162 +163,6 @@ public class MisthalinMystery extends BasicQuestHelper ObjectStep leaveSapphireRoom; NpcStep talkToMandy; - // Zones - Zone island; - Zone outside1; - Zone outside2; - Zone outside3; - Zone bossRoom; - - @Override - public Map loadSteps() - { - initializeRequirements(); - setupConditions(); - setupSteps(); - - var steps = new HashMap(); - - steps.put(0, talkToAbigale); - - steps.put(5, talkToAbigale); - - var investigatingTheBarrel = new ConditionalStep(this, takeTheBoat); - investigatingTheBarrel.addStep(new Conditions(onIsland, bucket), searchTheBarrel); - investigatingTheBarrel.addStep(onIsland, takeTheBucket); - steps.put(10, investigatingTheBarrel); - steps.put(15, investigatingTheBarrel); - - var emptyTheBarrel = new ConditionalStep(this, takeTheBoat); - emptyTheBarrel.addStep(new Conditions(onIsland, bucket), useBucketOnBarrel); - emptyTheBarrel.addStep(onIsland, takeTheBucket); - steps.put(20, emptyTheBarrel); - - var enterTheHouse = new ConditionalStep(this, takeTheBoat); - enterTheHouse.addStep(new Conditions(onIsland, manorKey), openManorDoor); - enterTheHouse.addStep(onIsland, searchTheBarrelForKey); - steps.put(25, enterTheHouse); - - var pinkDoor = new ConditionalStep(this, takeTheBoat); - pinkDoor.addStep(knife, tryToOpenPinkKnobDoor); - pinkDoor.addStep(onIsland, takeKnife); - steps.put(30, pinkDoor); - - var pickUpAndReadNotes1 = new ConditionalStep(this, takeTheBoat); - pickUpAndReadNotes1.addStep(new Conditions(onIsland, notes1), readNotes1); - pickUpAndReadNotes1.addStep(onIsland, takeNote1); - steps.put(35, pickUpAndReadNotes1); - - var cutPainting = new ConditionalStep(this, takeTheBoat); - cutPainting.addStep(new Conditions(onIsland, knife), useKnifeOnPainting); - cutPainting.addStep(onIsland, takeKnife); - steps.put(40, cutPainting); - - var enterRubyRoom = new ConditionalStep(this, takeTheBoat); - enterRubyRoom.addStep(new Conditions(onIsland, rubyKey), goThroughRubyDoor); - enterRubyRoom.addStep(onIsland, searchPainting); - steps.put(45, enterRubyRoom); - - var lightCandles = new ConditionalStep(this, takeTheBoat); - lightCandles.addStep(new Conditions(onIsland, tinderbox, litCandle1, litCandle2, litCandle3), lightCandle4); - lightCandles.addStep(new Conditions(onIsland, tinderbox, litCandle1, litCandle2), lightCandle3); - lightCandles.addStep(new Conditions(onIsland, tinderbox, litCandle1), lightCandle2); - lightCandles.addStep(new Conditions(onIsland, tinderbox), lightCandle1); - lightCandles.addStep(onIsland, takeTinderbox); - steps.put(50, lightCandles); - - var lightFuseOnBarrel = new ConditionalStep(this, takeTheBoat); - lightFuseOnBarrel.addStep(new Conditions(onIsland, tinderbox), lightBarrel); - lightFuseOnBarrel.addStep(onIsland, takeTinderbox); - steps.put(55, lightFuseOnBarrel); - steps.put(60, leaveExplosionRoom); - - var goToLacey = new ConditionalStep(this, takeTheBoat); - goToLacey.addStep(inOutsideArea, observeThroughTree); - goToLacey.addStep(onIsland, climbWall); - steps.put(65, goToLacey); - - var pickUpAndReadNotes2 = new ConditionalStep(this, takeTheBoat); - pickUpAndReadNotes2.addStep(notes2, readNotes2); - pickUpAndReadNotes2.addStep(inOutsideArea, takeNote2); - pickUpAndReadNotes2.addStep(onIsland, climbWall); - steps.put(70, pickUpAndReadNotes2); - - var playMusic = new ConditionalStep(this, takeTheBoat); - playMusic.addStep(playedA, playDAgain); - playMusic.addStep(playedE, playA); - playMusic.addStep(playedD, playE); - playMusic.addStep(new Conditions(playedAnyKey, inPianoWidget), restartPiano); - playMusic.addStep(inPianoWidget, playD); - playMusic.addStep(inOutsideArea, playPiano); - playMusic.addStep(onIsland, climbWall); - steps.put(75, playMusic); - - var openingTheEmeraldDoor = new ConditionalStep(this, takeTheBoat); - openingTheEmeraldDoor.addStep(new Conditions(inOutsideArea, emeraldKey), returnOverBrokenWall); - openingTheEmeraldDoor.addStep(inOutsideArea, searchThePiano); - openingTheEmeraldDoor.addStep(new Conditions(onIsland, emeraldKey), openEmeraldDoor); - openingTheEmeraldDoor.addStep(onIsland, climbWall); - steps.put(80, openingTheEmeraldDoor); - - var enterBandosGodswordRoom = new ConditionalStep(this, takeTheBoat); - enterBandosGodswordRoom.addStep(onIsland, enterBandosGodswordRoomStep); - steps.put(85, enterBandosGodswordRoom); - - var startPuzzle3 = new ConditionalStep(this, takeTheBoat); - startPuzzle3.addStep(new Conditions(onIsland, notes3), readNotes3); - startPuzzle3.addStep(onIsland, takeNote3); - steps.put(90, startPuzzle3); - - var openFireplace = new ConditionalStep(this, takeTheBoat); - openFireplace.addStep(new Conditions(onIsland, knife), useKnifeOnFireplace); - openFireplace.addStep(onIsland, takeKnife); - steps.put(95, openFireplace); - - var solveFireplacePuzzle = new ConditionalStep(this, takeTheBoat); - solveFireplacePuzzle.addStep(selectedOnyx, clickRuby); - solveFireplacePuzzle.addStep(selectedEmerald, clickOnyx); - solveFireplacePuzzle.addStep(selectedZenyte, clickEmerald); - solveFireplacePuzzle.addStep(selectedDiamond, clickZenyte); - solveFireplacePuzzle.addStep(selectedSaphire, clickDiamond); - solveFireplacePuzzle.addStep(selectAnyGem, restartGems); - solveFireplacePuzzle.addStep(inGemWidget, clickSapphire); - solveFireplacePuzzle.addStep(onIsland, searchFireplace); - steps.put(100, solveFireplacePuzzle); - - var openSapphireDoor = new ConditionalStep(this, takeTheBoat); - openSapphireDoor.addStep(new Conditions(onIsland, sapphireKey), goThroughSapphireDoor); - openSapphireDoor.addStep(onIsland, searchFireplaceForSapphireKey); - steps.put(105, openSapphireDoor); - - var goDoBoss = new ConditionalStep(this, takeTheBoat); - goDoBoss.addStep(inBossRoom, reflectKnives); - goDoBoss.addStep(onIsland, goThroughSapphireDoor); - steps.put(110, goDoBoss); - steps.put(111, goDoBoss); - - var watchRevealCutscene = new ConditionalStep(this, takeTheBoat); - watchRevealCutscene.addStep(inBossRoom, watchTheKillersReveal); - watchRevealCutscene.addStep(onIsland, continueThroughSapphireDoor); - steps.put(115, watchRevealCutscene); - - var goFightAbigale = new ConditionalStep(this, takeTheBoat); - goFightAbigale.addStep(new Conditions(inBossRoom, killersKnife), fightAbigale); - goFightAbigale.addStep(inBossRoom, pickUpKillersKnife); - goFightAbigale.addStep(onIsland, continueThroughSapphireDoor); - steps.put(120, goFightAbigale); - - var attemptToLeaveSapphireRoom = new ConditionalStep(this, takeTheBoat); - attemptToLeaveSapphireRoom.addStep(onIsland, leaveSapphireRoom); - steps.put(125, attemptToLeaveSapphireRoom); - - var finishTheQuest = new ConditionalStep(this, takeTheBoat); - finishTheQuest.addStep(onIsland, talkToMandy); - steps.put(130, finishTheQuest); - - return steps; - } - @Override protected void setupZones() { @@ -305,33 +173,30 @@ protected void setupZones() bossRoom = new Zone(new WorldPoint(1619, 4825, 0), new WorldPoint(1627, 4834, 0)); } - public void setupConditions() + @Override + protected void setupRequirements() { onIsland = new ZoneRequirement(island); inOutsideArea = new ZoneRequirement(outside1, outside2, outside3); inBossRoom = new ZoneRequirement(bossRoom); - litCandle1 = new VarbitRequirement(4042, 1); - litCandle2 = new VarbitRequirement(4041, 1); - litCandle3 = new VarbitRequirement(4039, 1); + litCandle1 = new VarbitRequirement(VarbitID.MISTMYST_CANDLE4, 1); + litCandle2 = new VarbitRequirement(VarbitID.MISTMYST_CANDLE3, 1); + litCandle3 = new VarbitRequirement(VarbitID.MISTMYST_CANDLE1, 1); - playedD = and(new VarbitRequirement(4044, 1), new VarbitRequirement(4049, 1)); - playedE = and(new VarbitRequirement(4045, 1), new VarbitRequirement(4049, 2)); - playedA = and(new VarbitRequirement(4046, 1), new VarbitRequirement(4049, 3)); + playedD = and(new VarbitRequirement(VarbitID.MISTMYST_PIANO_D1, 1), new VarbitRequirement(VarbitID.MISTMYST_PIANO_ATTEMPTS, 1)); + playedE = and(new VarbitRequirement(VarbitID.MISTMYST_PIANO_E, 1), new VarbitRequirement(VarbitID.MISTMYST_PIANO_ATTEMPTS, 2)); + playedA = and(new VarbitRequirement(VarbitID.MISTMYST_PIANO_A, 1), new VarbitRequirement(VarbitID.MISTMYST_PIANO_ATTEMPTS, 3)); playedAnyKey = new VarbitRequirement(VarbitID.MISTMYST_PIANO_ATTEMPTS, 1, Operation.GREATER_EQUAL); inPianoWidget = new WidgetTextRequirement(554, 20, "C"); inGemWidget = new WidgetTextRequirement(555, 1, 1, "Gemstone switch panel"); - selectedSaphire = and(new VarbitRequirement(4051, 1), new VarbitRequirement(4050, 1)); - selectedDiamond = and(new VarbitRequirement(4052, 1), new VarbitRequirement(4050, 2)); - selectedZenyte = and(new VarbitRequirement(4053, 1), new VarbitRequirement(4050, 3)); - selectedEmerald = and(new VarbitRequirement(4054, 1), new VarbitRequirement(4050, 4)); - selectedOnyx = and(new VarbitRequirement(4055, 1), new VarbitRequirement(4050, 5)); + selectedSaphire = and(new VarbitRequirement(VarbitID.MISTMYST_SAPPHIRE_SWITCHED, 1), new VarbitRequirement(VarbitID.MISTMYST_SWITCH_ATTEMPTS, 1)); + selectedDiamond = and(new VarbitRequirement(VarbitID.MISTMYST_DIAMOND_SWITCHED, 1), new VarbitRequirement(VarbitID.MISTMYST_SWITCH_ATTEMPTS, 2)); + selectedZenyte = and(new VarbitRequirement(VarbitID.MISTMYST_ZENYTE_SWITCHED, 1), new VarbitRequirement(VarbitID.MISTMYST_SWITCH_ATTEMPTS, 3)); + selectedEmerald = and(new VarbitRequirement(VarbitID.MISTMYST_EMERALD_SWITCHED, 1), new VarbitRequirement(VarbitID.MISTMYST_SWITCH_ATTEMPTS, 4)); + selectedOnyx = and(new VarbitRequirement(VarbitID.MISTMYST_ONYX_SWITCHED, 1), new VarbitRequirement(VarbitID.MISTMYST_SWITCH_ATTEMPTS, 5)); selectAnyGem = new VarbitRequirement(VarbitID.MISTMYST_SWITCH_ATTEMPTS, 1, Operation.GREATER_EQUAL); - } - @Override - protected void setupRequirements() - { bucket = new ItemRequirement("Bucket", ItemID.BUCKET_EMPTY); manorKey = new ItemRequirement("Manor key", ItemID.MISTMYST_FRONTDOOR_KEY); knife = new ItemRequirement("Knife", ItemID.KNIFE); @@ -363,7 +228,7 @@ public void setupSteps() tryToOpenPinkKnobDoor = new ObjectStep(this, ObjectID.MISTMYST_DOOR_REDTOPAZ, new WorldPoint(1635, 4838, 0), "Try to open the door with the pink handle."); takeNote1 = new ObjectStep(this, ObjectID.MISTMYST_CLUE_LIBRARY, new WorldPoint(1635, 4839, 0), "Pick up the note that appeared."); readNotes1 = new DetailedQuestStep(this, "Read the notes.", notes1.highlighted()); - useKnifeOnPainting = new ObjectStep(this, ObjectID.MISTMYST_PAINTING, new WorldPoint(1632, 4833, 0), "Use a knife on the marked painting.", knife); + useKnifeOnPainting = new ObjectStep(this, ObjectID.MISTMYST_PAINTING, new WorldPoint(1632, 4833, 0), "Use a knife on the marked painting.", knife.highlighted()); useKnifeOnPainting.addIcon(ItemID.KNIFE); searchPainting = new ObjectStep(this, ObjectID.MISTMYST_PAINTING, new WorldPoint(1632, 4833, 0), "Search the painting for a ruby key."); goThroughRubyDoor = new ObjectStep(this, ObjectID.MISTMYST_DOOR_RUBY, new WorldPoint(1640, 4828, 0), "Go through the door with the ruby handle.", rubyKey); @@ -389,15 +254,24 @@ public void setupSteps() takeNote2 = new ObjectStep(this, ObjectID.MISTMYST_CLUE_OUTSIDE, new WorldPoint(1632, 4850, 0), "Pick up the note that appeared by the fence."); readNotes2 = new DetailedQuestStep(this, "Read the notes.", notes2.highlighted()); - playPiano = new ObjectStep(this, ObjectID.MISTMYST_PIANO, new WorldPoint(1647, 4842, 0), "Play the piano in the room to the south."); - playD = new WidgetStep(this, "Play the D key.", 554, 21); - playE = new WidgetStep(this, "Play the E key.", 554, 22); - playA = new WidgetStep(this, "Play the A key.", 554, 25); - playDAgain = new WidgetStep(this, "Play the D key again.", 554, 21); + playPiano = new ObjectStep(this, ObjectID.MISTMYST_PIANO, new WorldPoint(1647, 4841, 0), ""); + playD = new WidgetStep(this, "Play the D key.", InterfaceID.MistmystPiano.LABEL_D1); + playE = new WidgetStep(this, "Play the E key.", InterfaceID.MistmystPiano.LABEL_E1); + playA = new WidgetStep(this, "Play the A key.", InterfaceID.MistmystPiano.LABEL_A2); + playDAgain = new WidgetStep(this, "Play the D key again.", InterfaceID.MistmystPiano.LABEL_D1); restartPiano = new DetailedQuestStep(this, "Unfortunately you've played an incorrect key. Restart."); playPiano.addSubSteps(restartPiano); - searchThePiano = new ObjectStep(this, ObjectID.MISTMYST_PIANO, new WorldPoint(1647, 4842, 0), "Right-click search the piano for the emerald key."); + cPlayPiano = new ConditionalStep(this, playPiano, "Play the piano in the room to the south for the emerald key."); + cPlayPiano.addStep(playedA, playDAgain); + cPlayPiano.addStep(playedE, playA); + cPlayPiano.addStep(playedD, playE); + cPlayPiano.addStep(and(playedAnyKey, inPianoWidget), restartPiano); + cPlayPiano.addStep(inPianoWidget, playD); + + pwPlayPiano = cPlayPiano.puzzleWrapStepWithDefaultText("Find the emerald key in the room to the south."); + + searchThePiano = new ObjectStep(this, ObjectID.MISTMYST_PIANO, new WorldPoint(1647, 4842, 0), "Right-click search the piano for the emerald key.").puzzleWrapStep(true); returnOverBrokenWall = new ObjectStep(this, ObjectID.MISTMYST_DESTRUCTABLE_WALL_CLIMBABLE, new WorldPoint(1648, 4829, 0), "Climb back over the damaged wall into the manor.", emeraldKey); @@ -408,13 +282,12 @@ public void setupSteps() takeNote3 = new ObjectStep(this, ObjectID.MISTMYST_CLUE_KITCHEN, new WorldPoint(1630, 4842, 0), "Pick up the note that appeared by the door."); readNotes3 = new DetailedQuestStep(this, "Read the notes.", notes3.highlighted()); - useKnifeOnFireplace = new ObjectStep(this, ObjectID.MISTMYST_FIREPLACE, new WorldPoint(1647, 4836, 0), "Use a knife on the unlit fireplace in the eastern room.", knife); + useKnifeOnFireplace = new ObjectStep(this, ObjectID.MISTMYST_FIREPLACE, new WorldPoint(1647, 4836, 0), "Use a knife on the unlit fireplace in the eastern room.", knife.highlighted()); useKnifeOnFireplace.addIcon(ItemID.KNIFE); - searchFireplace = new ObjectStep(this, ObjectID.MISTMYST_FIREPLACE, new WorldPoint(1647, 4836, 0), "Search the fireplace."); + searchFireplace = new ObjectStep(this, ObjectID.MISTMYST_FIREPLACE, new WorldPoint(1647, 4836, 0), ""); restartGems = new DetailedQuestStep(this, "You've clicked a gem in the wrong order. Try restarting."); - searchFireplace.addSubSteps(restartGems); clickSapphire = new WidgetStep(this, "Click the sapphire.", 555, 19); clickDiamond = new WidgetStep(this, "Click the diamond.", 555, 4); @@ -423,7 +296,21 @@ public void setupSteps() clickOnyx = new WidgetStep(this, "Click the onyx.", 555, 7); clickRuby = new WidgetStep(this, "Click the ruby.", 555, 15); - searchFireplaceForSapphireKey = new ObjectStep(this, ObjectID.MISTMYST_FIREPLACE, new WorldPoint(1647, 4836, 0), "Search the fireplace again for the sapphire key."); + searchFireplaceForSapphireKey = new ObjectStep(this, ObjectID.MISTMYST_FIREPLACE, new WorldPoint(1647, 4836, 0), "Search the fireplace again for the sapphire key.").puzzleWrapStep(true); + + solveFireplacePuzzle = new ConditionalStep(this, takeTheBoat, "Search the fireplace and solve the puzzle for the sapphire key."); + solveFireplacePuzzle.addStep(selectedOnyx, clickRuby); + solveFireplacePuzzle.addStep(selectedEmerald, clickOnyx); + solveFireplacePuzzle.addStep(selectedZenyte, clickEmerald); + solveFireplacePuzzle.addStep(selectedDiamond, clickZenyte); + solveFireplacePuzzle.addStep(selectedSaphire, clickDiamond); + solveFireplacePuzzle.addStep(selectAnyGem, restartGems); + solveFireplacePuzzle.addStep(inGemWidget, clickSapphire); + solveFireplacePuzzle.addStep(onIsland, searchFireplace); + + pwSolveFireplacePuzzle = solveFireplacePuzzle.puzzleWrapStepWithDefaultText("Find the sapphire key in the room to the east."); + pwSolveFireplacePuzzle.addSubSteps(searchFireplaceForSapphireKey); + goThroughSapphireDoor = new ObjectStep(this, ObjectID.MISTMYST_DOOR_SAPPHIRE, new WorldPoint(1628, 4829, 0), "Go through the sapphire door."); reflectKnives = new DetailedQuestStep(this, "This puzzle requires you to move the mirror to reflect the knives the murderer throws. You can tell which wardrobe the murderer will throw from by a black swirl that'll surround it."); @@ -446,6 +333,140 @@ public void setupSteps() "Talk to Mandy just outside the manor to complete the quest."); } + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + steps.put(0, talkToAbigale); + + steps.put(5, talkToAbigale); + + var investigatingTheBarrel = new ConditionalStep(this, takeTheBoat); + investigatingTheBarrel.addStep(and(onIsland, bucket), searchTheBarrel); + investigatingTheBarrel.addStep(onIsland, takeTheBucket); + steps.put(10, investigatingTheBarrel); + steps.put(15, investigatingTheBarrel); + + var emptyTheBarrel = new ConditionalStep(this, takeTheBoat); + emptyTheBarrel.addStep(and(onIsland, bucket), useBucketOnBarrel); + emptyTheBarrel.addStep(onIsland, takeTheBucket); + steps.put(20, emptyTheBarrel); + + var enterTheHouse = new ConditionalStep(this, takeTheBoat); + enterTheHouse.addStep(and(onIsland, manorKey), openManorDoor); + enterTheHouse.addStep(onIsland, searchTheBarrelForKey); + steps.put(25, enterTheHouse); + + var pinkDoor = new ConditionalStep(this, takeTheBoat); + pinkDoor.addStep(knife, tryToOpenPinkKnobDoor); + pinkDoor.addStep(onIsland, takeKnife); + steps.put(30, pinkDoor); + + var pickUpAndReadNotes1 = new ConditionalStep(this, takeTheBoat); + pickUpAndReadNotes1.addStep(and(onIsland, notes1), readNotes1); + pickUpAndReadNotes1.addStep(onIsland, takeNote1); + steps.put(35, pickUpAndReadNotes1); + + var cutPainting = new ConditionalStep(this, takeTheBoat); + cutPainting.addStep(and(onIsland, knife), useKnifeOnPainting); + cutPainting.addStep(onIsland, takeKnife); + steps.put(40, cutPainting); + + var enterRubyRoom = new ConditionalStep(this, takeTheBoat); + enterRubyRoom.addStep(and(onIsland, rubyKey), goThroughRubyDoor); + enterRubyRoom.addStep(onIsland, searchPainting); + steps.put(45, enterRubyRoom); + + var lightCandles = new ConditionalStep(this, takeTheBoat); + lightCandles.addStep(and(onIsland, tinderbox, litCandle1, litCandle2, litCandle3), lightCandle4); + lightCandles.addStep(and(onIsland, tinderbox, litCandle1, litCandle2), lightCandle3); + lightCandles.addStep(and(onIsland, tinderbox, litCandle1), lightCandle2); + lightCandles.addStep(and(onIsland, tinderbox), lightCandle1); + lightCandles.addStep(onIsland, takeTinderbox); + steps.put(50, lightCandles); + + var lightFuseOnBarrel = new ConditionalStep(this, takeTheBoat); + lightFuseOnBarrel.addStep(and(onIsland, tinderbox), lightBarrel); + lightFuseOnBarrel.addStep(onIsland, takeTinderbox); + steps.put(55, lightFuseOnBarrel); + steps.put(60, leaveExplosionRoom); + + var goToLacey = new ConditionalStep(this, takeTheBoat); + goToLacey.addStep(inOutsideArea, observeThroughTree); + goToLacey.addStep(onIsland, climbWall); + steps.put(65, goToLacey); + + var pickUpAndReadNotes2 = new ConditionalStep(this, takeTheBoat); + pickUpAndReadNotes2.addStep(notes2, readNotes2); + pickUpAndReadNotes2.addStep(inOutsideArea, takeNote2); + pickUpAndReadNotes2.addStep(onIsland, climbWall); + steps.put(70, pickUpAndReadNotes2); + + var playMusic = new ConditionalStep(this, takeTheBoat); + playMusic.addStep(inOutsideArea, pwPlayPiano); + playMusic.addStep(onIsland, climbWall); + steps.put(75, playMusic); + + var openingTheEmeraldDoor = new ConditionalStep(this, takeTheBoat); + openingTheEmeraldDoor.addStep(and(inOutsideArea, emeraldKey), returnOverBrokenWall); + openingTheEmeraldDoor.addStep(inOutsideArea, searchThePiano); + openingTheEmeraldDoor.addStep(and(onIsland, emeraldKey), openEmeraldDoor); + openingTheEmeraldDoor.addStep(onIsland, climbWall); + steps.put(80, openingTheEmeraldDoor); + + var enterBandosGodswordRoom = new ConditionalStep(this, takeTheBoat); + enterBandosGodswordRoom.addStep(onIsland, enterBandosGodswordRoomStep); + steps.put(85, enterBandosGodswordRoom); + + var startPuzzle3 = new ConditionalStep(this, takeTheBoat); + startPuzzle3.addStep(and(onIsland, notes3), readNotes3); + startPuzzle3.addStep(onIsland, takeNote3); + steps.put(90, startPuzzle3); + + var openFireplace = new ConditionalStep(this, takeTheBoat); + openFireplace.addStep(and(onIsland, knife), useKnifeOnFireplace); + openFireplace.addStep(onIsland, takeKnife); + steps.put(95, openFireplace); + + steps.put(100, pwSolveFireplacePuzzle); + + var openSapphireDoor = new ConditionalStep(this, takeTheBoat); + openSapphireDoor.addStep(and(onIsland, sapphireKey), goThroughSapphireDoor); + openSapphireDoor.addStep(onIsland, searchFireplaceForSapphireKey); + steps.put(105, openSapphireDoor); + + var goDoBoss = new ConditionalStep(this, takeTheBoat); + goDoBoss.addStep(inBossRoom, reflectKnives); + goDoBoss.addStep(onIsland, goThroughSapphireDoor); + steps.put(110, goDoBoss); + steps.put(111, goDoBoss); + + var watchRevealCutscene = new ConditionalStep(this, takeTheBoat); + watchRevealCutscene.addStep(inBossRoom, watchTheKillersReveal); + watchRevealCutscene.addStep(onIsland, continueThroughSapphireDoor); + steps.put(115, watchRevealCutscene); + + var goFightAbigale = new ConditionalStep(this, takeTheBoat); + goFightAbigale.addStep(and(inBossRoom, killersKnife), fightAbigale); + goFightAbigale.addStep(inBossRoom, pickUpKillersKnife); + goFightAbigale.addStep(onIsland, continueThroughSapphireDoor); + steps.put(120, goFightAbigale); + + var attemptToLeaveSapphireRoom = new ConditionalStep(this, takeTheBoat); + attemptToLeaveSapphireRoom.addStep(onIsland, leaveSapphireRoom); + steps.put(125, attemptToLeaveSapphireRoom); + + var finishTheQuest = new ConditionalStep(this, takeTheBoat); + finishTheQuest.addStep(onIsland, talkToMandy); + steps.put(130, finishTheQuest); + + return steps; + } + @Override public QuestPointReward getQuestPointReward() { @@ -473,17 +494,71 @@ public List getItemRewards() @Override public List getPanels() { - var allSteps = new ArrayList(); - - allSteps.add(new PanelDetails("Talk to Abigale", Collections.singletonList(talkToAbigale))); - allSteps.add(new PanelDetails("Enter the manor", Arrays.asList(takeTheBoat, takeTheBucket, searchTheBarrel, useBucketOnBarrel, searchTheBarrelForKey, openManorDoor))); - allSteps.add(new PanelDetails("Solve the first puzzle", Arrays.asList(takeKnife, tryToOpenPinkKnobDoor, takeNote1, readNotes1, useKnifeOnPainting, searchPainting, goThroughRubyDoor))); - allSteps.add(new PanelDetails("Solve the second puzzle", Arrays.asList(takeTinderbox, lightCandle1, lightBarrel, leaveExplosionRoom, climbWall))); - allSteps.add(new PanelDetails("Solve the third puzzle", Arrays.asList(observeThroughTree, takeNote2, readNotes2, playPiano, playD, playE, playA, playDAgain, searchThePiano))); - allSteps.add(new PanelDetails("Witness another murder", Arrays.asList(returnOverBrokenWall, openEmeraldDoor, enterBandosGodswordRoomStep))); - allSteps.add(new PanelDetails("Solve the fourth puzzle", Arrays.asList(takeNote3, readNotes3, useKnifeOnFireplace, searchFireplace, clickSapphire, clickDiamond, clickZenyte, clickEmerald, clickOnyx, clickRuby, searchFireplaceForSapphireKey))); - allSteps.add(new PanelDetails("Confront the killer", Arrays.asList(goThroughSapphireDoor, reflectKnives, watchTheKillersReveal, pickUpKillersKnife, fightAbigale, leaveSapphireRoom, talkToMandy))); - - return allSteps; + var steps = new ArrayList(); + + steps.add(new PanelDetails("Talk to Abigale", List.of( + talkToAbigale + ))); + + steps.add(new PanelDetails("Enter the manor", List.of( + takeTheBoat, + takeTheBucket, + searchTheBarrel, + useBucketOnBarrel, + searchTheBarrelForKey, + openManorDoor + ))); + + steps.add(new PanelDetails("Solve the first puzzle", List.of( + takeKnife, + tryToOpenPinkKnobDoor, + takeNote1, + readNotes1, + useKnifeOnPainting, + searchPainting, + goThroughRubyDoor + ))); + + steps.add(new PanelDetails("Solve the second puzzle", List.of( + takeTinderbox, + lightCandle1, + lightBarrel, + leaveExplosionRoom, + climbWall + ))); + + steps.add(new PanelDetails("Solve the third puzzle", List.of( + observeThroughTree, + takeNote2, + readNotes2, + pwPlayPiano, + searchThePiano + ))); + + steps.add(new PanelDetails("Witness another murder", List.of( + returnOverBrokenWall, + openEmeraldDoor, + enterBandosGodswordRoomStep + ))); + + steps.add(new PanelDetails("Solve the fourth puzzle", List.of( + takeNote3, + readNotes3, + useKnifeOnFireplace, + pwSolveFireplacePuzzle, + searchFireplaceForSapphireKey + ))); + + steps.add(new PanelDetails("Confront the killer", List.of( + goThroughSapphireDoor, + reflectKnives, + watchTheKillersReveal, + pickUpKillersKnife, + fightAbigale, + leaveSapphireRoom, + talkToMandy + ))); + + return steps; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monkeymadnessi/MonkeyMadnessI.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monkeymadnessi/MonkeyMadnessI.java index e1f41e132dd..2f030d47704 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monkeymadnessi/MonkeyMadnessI.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monkeymadnessi/MonkeyMadnessI.java @@ -52,7 +52,6 @@ import net.runelite.client.plugins.microbot.questhelper.util.QHObjectID; import net.runelite.api.Prayer; import net.runelite.api.QuestState; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.*; @@ -420,9 +419,9 @@ public void setupConditions() inThroneRoom = new ZoneRequirement(throne1, throne2, throne3, throne4); inJungleDemonRoom = new ZoneRequirement(jungleDemonRoom); - talkedToCaranock = new VarbitRequirement(122, 3); + talkedToCaranock = new VarbitRequirement(VarbitID.MM_CARANOCK, 3); - reportedBackToNarnode = new VarbitRequirement(121, 7); + reportedBackToNarnode = new VarbitRequirement(VarbitID.MM_NARNODE, 7); talkedToDaero = new VarbitRequirement(VarbitID.MM_DAERO, 1, Operation.GREATER_EQUAL); @@ -581,11 +580,11 @@ public void setupSteps() searchForDentures = new ObjectStep(this, ObjectID.MM_DENTURE_CRATE, new WorldPoint(2767, 2769, 0), "DO NOT WALK ON THE LIGHT FLOOR. Search the stacked crates for monkey dentures."); - searchForDentures.addTileMarker(new WorldPoint(2767, 2768, 0), SpriteID.PLAYER_KILLER_SKULL); - searchForDentures.addTileMarker(new WorldPoint(2766, 2768, 0), SpriteID.PLAYER_KILLER_SKULL); - searchForDentures.addTileMarker(new WorldPoint(2767, 2767, 0), SpriteID.PLAYER_KILLER_SKULL); - searchForDentures.addTileMarker(new WorldPoint(2766, 2767, 0), SpriteID.PLAYER_KILLER_SKULL); - searchForDentures.addTileMarker(new WorldPoint(2766, 2769, 0), SpriteID.PLAYER_KILLER_SKULL); + searchForDentures.addTileMarker(new WorldPoint(2767, 2768, 0), SpriteID.HEADICONS_PK); + searchForDentures.addTileMarker(new WorldPoint(2766, 2768, 0), SpriteID.HEADICONS_PK); + searchForDentures.addTileMarker(new WorldPoint(2767, 2767, 0), SpriteID.HEADICONS_PK); + searchForDentures.addTileMarker(new WorldPoint(2766, 2767, 0), SpriteID.HEADICONS_PK); + searchForDentures.addTileMarker(new WorldPoint(2766, 2769, 0), SpriteID.HEADICONS_PK); searchForDentures.addTileMarkers(new WorldPoint(2768, 2769, 0)); searchForDentures.addDialogStep("Yes"); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monkeymadnessii/AgilityDungeonSteps.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monkeymadnessii/AgilityDungeonSteps.java index 0ecc7da4833..0ba1c6e4191 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monkeymadnessii/AgilityDungeonSteps.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monkeymadnessii/AgilityDungeonSteps.java @@ -39,13 +39,15 @@ import net.runelite.api.ChatMessageType; import net.runelite.api.Player; import net.runelite.api.Prayer; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.ChatMessage; import net.runelite.api.events.GameTick; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.SpriteID; +import net.runelite.api.gameval.VarbitID; + import net.runelite.client.eventbus.Subscribe; import java.util.*; @@ -129,7 +131,7 @@ public void setupConditions() inKrukRoom = new ZoneRequirement(krukRoom); hasBronzeKey = bronzeKey; - openedShortcut = new VarbitRequirement(5029, 1); + openedShortcut = new VarbitRequirement(VarbitID.MM2_MAZE_RETURN, 1); path1SouthIsWrongChat = new ChatMessageRequirement( new ZoneRequirement(new Zone(new WorldPoint(2512, 9141, 1), new WorldPoint(2515, 9135, 1))), @@ -273,8 +275,8 @@ public void setupSteps() fightKruk = new NpcStep(getQuestHelper(), NpcID.MM2_KRUK_COMBAT, new WorldPoint(2535, 9213, 1), "Kill Kruk. He can be flinched on a corner in the room by keeping him on a north east tile to you."); - fightKruk.addTileMarker(new WorldPoint(2528, 9220, 1), SpriteID.RS2_SWORD_POINTED_LEFT); - fightKruk.addTileMarker(new WorldPoint(2529, 9221, 1), SpriteID.EQUIPMENT_SLOT_SHIELD); + fightKruk.addTileMarker(new WorldPoint(2528, 9220, 1), SpriteID.Sworddecor.LEFT); + fightKruk.addTileMarker(new WorldPoint(2529, 9221, 1), SpriteID.Wornicons.SHIELD); } private void updateSection1Route() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monkeymadnessii/MM2Sabotage.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monkeymadnessii/MM2Sabotage.java index d25a4acf734..5e3d4b5a8a5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monkeymadnessii/MM2Sabotage.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monkeymadnessii/MM2Sabotage.java @@ -36,11 +36,12 @@ import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.SpriteID; +import net.runelite.api.gameval.VarbitID; import java.util.Arrays; import java.util.List; @@ -144,14 +145,14 @@ public void setupConditions() // 10->14 // 14->46 // 46->62 - placedSatchel1 = new VarbitRequirement(5044, 1); - placedSatchel2 = new VarbitRequirement(5042, 1); - placedSatchel3 = new VarbitRequirement(5043, 1); - placedSatchel4 = new VarbitRequirement(5046, 1); - placedSatchel5 = new VarbitRequirement(5045, 1); - placedSatchel6 = new VarbitRequirement(5041, 1); + placedSatchel1 = new VarbitRequirement(VarbitID.MM2_PLATFORM_TARGET_4, 1); + placedSatchel2 = new VarbitRequirement(VarbitID.MM2_PLATFORM_TARGET_2, 1); + placedSatchel3 = new VarbitRequirement(VarbitID.MM2_PLATFORM_TARGET_3, 1); + placedSatchel4 = new VarbitRequirement(VarbitID.MM2_PLATFORM_TARGET_6, 1); + placedSatchel5 = new VarbitRequirement(VarbitID.MM2_PLATFORM_TARGET_5, 1); + placedSatchel6 = new VarbitRequirement(VarbitID.MM2_PLATFORM_TARGET_1, 1); - placedAllSatchels = new VarbitRequirement(5047, 63); + placedAllSatchels = new VarbitRequirement(VarbitID.MM2_PLATFORM_TARGETS, 63); } public void setupSteps() @@ -260,8 +261,8 @@ public void setupSteps() ); // Exclamation mark - placeSatchel3.addTileMarker(new WorldPoint(2069, 5413, 2), SpriteID.BOUNTY_HUNTER_TARGET_WEALTH_1_VERY_LOW); - placeSatchel3.addTileMarker(new WorldPoint(2069, 5421, 2), SpriteID.BOUNTY_HUNTER_TARGET_WEALTH_1_VERY_LOW); + placeSatchel3.addTileMarker(new WorldPoint(2069, 5413, 2), SpriteID.HeadiconsPkInterface.BOUNTY_HUNTER_TARGET_WEALTH_1_VERY_LOW); + placeSatchel3.addTileMarker(new WorldPoint(2069, 5421, 2), SpriteID.HeadiconsPkInterface.BOUNTY_HUNTER_TARGET_WEALTH_1_VERY_LOW); placeSatchel3.setHideMinimapLines(true); placeSatchel3.setLinePoints(pathToSatchel3); @@ -276,8 +277,8 @@ public void setupSteps() new WorldPoint(2066, 5431, 2), new WorldPoint(2072, 5431, 2) ); - goUpToSatchel4.addTileMarker(new WorldPoint(2069, 5421, 2), SpriteID.BOUNTY_HUNTER_TARGET_WEALTH_1_VERY_LOW); - goUpToSatchel4.addTileMarker(new WorldPoint(2066, 5413, 2), SpriteID.BOUNTY_HUNTER_TARGET_WEALTH_1_VERY_LOW); + goUpToSatchel4.addTileMarker(new WorldPoint(2069, 5421, 2), SpriteID.HeadiconsPkInterface.BOUNTY_HUNTER_TARGET_WEALTH_1_VERY_LOW); + goUpToSatchel4.addTileMarker(new WorldPoint(2066, 5413, 2), SpriteID.HeadiconsPkInterface.BOUNTY_HUNTER_TARGET_WEALTH_1_VERY_LOW); goUpToSatchel4.setHideMinimapLines(true); placeSatchel4 = new ObjectStep(getQuestHelper(), ObjectID.MM2_TARGET_F, new WorldPoint(2096, 5393, 3), "Place a satchel on the gas cylinder to the south.", filledSatchel1Highlighted); @@ -300,7 +301,7 @@ public void setupSteps() new WorldPoint(2085, 5409, 3), new WorldPoint(2067, 5407, 3) ); - placeSatchel5.addTileMarker(new WorldPoint(2069, 5413, 3), SpriteID.BOUNTY_HUNTER_TARGET_WEALTH_1_VERY_LOW); + placeSatchel5.addTileMarker(new WorldPoint(2069, 5413, 3), SpriteID.HeadiconsPkInterface.BOUNTY_HUNTER_TARGET_WEALTH_1_VERY_LOW); placeSatchel5.setHideMinimapLines(true); placeSatchel5.addIcon(ItemID.MM2_EXPLOSIVES_SATCHEL_FULL); goF2ToF1ForSatchel6 = new ObjectStep(getQuestHelper(), ObjectID.MM2_SHIPYARD_LADDER_TOP, new WorldPoint(2098, 5407, 3), "Go back to the bottom floor.", filledSatchel1); @@ -313,7 +314,7 @@ public void setupSteps() new WorldPoint(2085, 5409, 3), new WorldPoint(2067, 5407, 3) ); - goF2ToF1ForSatchel6.addTileMarker(new WorldPoint(2066, 5413, 3), SpriteID.BOUNTY_HUNTER_TARGET_WEALTH_1_VERY_LOW); + goF2ToF1ForSatchel6.addTileMarker(new WorldPoint(2066, 5413, 3), SpriteID.HeadiconsPkInterface.BOUNTY_HUNTER_TARGET_WEALTH_1_VERY_LOW); goF1ToF0ForSatchel6 = new ObjectStep(getQuestHelper(), ObjectID.MM2_SHIPYARD_LADDER_TOP, new WorldPoint(2098, 5408, 2), "Go back to the bottom floor.", filledSatchel1); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monkeymadnessii/MonkeyMadnessII.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monkeymadnessii/MonkeyMadnessII.java index f8fe2b7f8ec..c392a31ecf8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monkeymadnessii/MonkeyMadnessII.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monkeymadnessii/MonkeyMadnessII.java @@ -354,7 +354,7 @@ public void setupConditions() foundHandkerchief = new Conditions(LogicType.OR, new VarbitRequirement(VarbitID.MM2_FOUND_HANDKERCHIEF, 2, Operation.GREATER_EQUAL), handkerchief); talkedToAnita = new VarbitRequirement(VarbitID.MM2_ANTIAS_CLUE, 1, Operation.GREATER_EQUAL); openedCupboard = new Conditions(true, LogicType.OR, new WidgetTextRequirement(229, 1, "You turn the statue and hear a clicking sound in the room."), new ChatMessageRequirement("You have already activated the statue.")); - foundNote = new VarbitRequirement(5028, 1); + foundNote = new VarbitRequirement(VarbitID.MM2_FOUND_NOTE, 1); hasBrush = new Conditions(LogicType.OR, grapeBrush, brush); // Read note: @@ -369,15 +369,15 @@ public void setupConditions() kob2Nearby = new NpcCondition(NpcID.MM2_GENERAL_KOB_COMBAT); keef2Nearby = new NpcCondition(NpcID.MM2_CHIEFTAN_KEEF_COMBAT); - defeatedKob = new VarbitRequirement(5035, 1); - defeatedKeef = new VarbitRequirement(5034, 1); + defeatedKob = new VarbitRequirement(VarbitID.MM2_TROLL_DEFEATED, 1); + defeatedKeef = new VarbitRequirement(VarbitID.MM2_OGRE_DEFEATED, 1); // Killed Kruk, 5036 0->2 - smithInLocation1 = new VarbitRequirement(5040, 1); // TODO: Get location - smithInLocation2 = new VarbitRequirement(5040, 2); // TODO: Get location - smithInLocation3 = new VarbitRequirement(5040, 3); // TODO: Get location - smithInLocation4 = new VarbitRequirement(5040, 4); // Smith near rune store + smithInLocation1 = new VarbitRequirement(VarbitID.MM2_LE_SMITH_POS, 1); // TODO: Get location + smithInLocation2 = new VarbitRequirement(VarbitID.MM2_LE_SMITH_POS, 2); // TODO: Get location + smithInLocation3 = new VarbitRequirement(VarbitID.MM2_LE_SMITH_POS, 3); // TODO: Get location + smithInLocation4 = new VarbitRequirement(VarbitID.MM2_LE_SMITH_POS, 4); // Smith near rune store smithNearby = new NpcCondition(NpcID.MM2_LE_SMITH); @@ -395,7 +395,7 @@ public void setupConditions() // 5068 0->1 // 5069 1->2 - killedGorillas = new VarbitRequirement(5068, 3); + killedGorillas = new VarbitRequirement(VarbitID.MM2_BREACH_KC, 3); nieveFollowing = new NpcInteractingRequirement(NpcID.MM2_NIEVE_FOLLOWER); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monksfriend/MonksFriend.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monksfriend/MonksFriend.java index d169ff0390e..da62d0fa327 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monksfriend/MonksFriend.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/monksfriend/MonksFriend.java @@ -26,124 +26,150 @@ import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; -import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; -import java.util.*; - public class MonksFriend extends BasicQuestHelper { - //Items Required - ItemRequirement jugOfWater, log, blanket; + // Required items + ItemRequirement jugOfWater; + ItemRequirement log; - //Items Recommended + // Recommended items ItemRequirement ardougneCloak; - Requirement inDungeon; - - QuestStep talkToOmad, goDownLadder, grabBlanket, goUpLadder, returnToOmadWithBlanket, talkToOmadAgain, talkToCedric, talkToCedricWithJug, - continueTalkingToCedric, talkToCedricWithLog, finishQuest; - - //Zones + // Zones Zone dungeon; - @Override - public Map loadSteps() - { - initializeRequirements(); - setupConditions(); - setupSteps(); - Map steps = new HashMap<>(); + // Miscellaneous requirements + ItemRequirement blanket; - steps.put(0, talkToOmad); + ZoneRequirement inDungeon; - ConditionalStep getBlanket = new ConditionalStep(this, goDownLadder); - getBlanket.addStep(new Conditions(inDungeon, blanket.alsoCheckBank(questBank)), goUpLadder); - getBlanket.addStep(blanket.alsoCheckBank(questBank), returnToOmadWithBlanket); - getBlanket.addStep(inDungeon, grabBlanket); - - steps.put(10, getBlanket); + // Steps + NpcStep talkToOmad; + ObjectStep goDownLadder; + DetailedQuestStep grabBlanket; + ObjectStep goUpLadder; + NpcStep returnToOmadWithBlanket; + NpcStep talkToOmadAgain; + NpcStep talkToCedric; + NpcStep talkToCedricWithJug; + NpcStep continueTalkingToCedric; + NpcStep talkToCedricWithLog; + NpcStep finishQuest; - steps.put(20, talkToOmadAgain); - steps.put(30, talkToCedric); - steps.put(40, talkToCedricWithJug); - steps.put(50, continueTalkingToCedric); - steps.put(60, talkToCedricWithLog); - steps.put(70, finishQuest); - - return steps; + @Override + protected void setupZones() + { + dungeon = new Zone(new WorldPoint(2559, 9597, 0), new WorldPoint(2582, 9623, 0)); } @Override protected void setupRequirements() { + inDungeon = new ZoneRequirement(dungeon); + log = new ItemRequirement("Logs", ItemID.LOGS); jugOfWater = new ItemRequirement("Jug of Water", ItemID.JUG_WATER); blanket = new ItemRequirement("Child's blanket", ItemID.CHILDS_BLANKET); ardougneCloak = new ItemRequirement("Ardougne cloak 1 or higher for teleports to the monastery", ItemID.CERT_ARRAVCERTIFICATE).isNotConsumed(); } - @Override - protected void setupZones() - { - dungeon = new Zone(new WorldPoint(2559, 9597, 0), new WorldPoint(2582, 9623, 0)); - } - public void setupConditions() { - inDungeon = new ZoneRequirement(dungeon); } public void setupSteps() { - talkToOmad = new NpcStep(this, NpcID.BROTHER_OMAD, new WorldPoint(2607, 3211, 0), "Talk to Brother Omad in the monastery south of West Ardougne."); + talkToOmad = new NpcStep(this, NpcID.BROTHER_OMAD, new WorldPoint(2607, 3211, 0), "Talk to Brother Omad in the monastery south of East Ardougne."); talkToOmad.addDialogStep("Why can't you sleep, what's wrong?"); - talkToOmad.addDialogStep("Can I help at all?"); + talkToOmad.addDialogStep("Yes."); + goDownLadder = new ObjectStep(this, ObjectID.LADDER_OUTSIDE_TO_UNDERGROUND, new WorldPoint(2561, 3222, 0), "Go down the ladder in a circle of stones west of the monastery."); grabBlanket = new DetailedQuestStep(this, new WorldPoint(2570, 9604, 0), "Pick up the Child's blanket in the room to the south.", blanket); - goUpLadder = new ObjectStep(this, ObjectID.LADDER_FROM_CELLAR, new WorldPoint(2561, 9622, 0), "Go back up the ladder."); - returnToOmadWithBlanket = new NpcStep(this, NpcID.BROTHER_OMAD, new WorldPoint(2607, 3211, 0), "Bring the blanket back to Brother Omad.", blanket); + goUpLadder = new ObjectStep(this, ObjectID.LADDER_FROM_CELLAR, new WorldPoint(2561, 9622, 0), "Go back up the ladder.", blanket); + returnToOmadWithBlanket = new NpcStep(this, NpcID.BROTHER_OMAD, new WorldPoint(2607, 3211, 0), "Bring the blanket back to Brother Omad in the monastery.", blanket); + talkToOmadAgain = new NpcStep(this, NpcID.BROTHER_OMAD, new WorldPoint(2607, 3211, 0), "Talk to Brother Omad again."); talkToOmadAgain.addDialogStep("Is there anything else I can help with?"); talkToOmadAgain.addDialogStep("Who's Brother Cedric?"); talkToOmadAgain.addDialogStep("Where should I look?"); + talkToCedric = new NpcStep(this, NpcID.BROTHER_CEDRIC, new WorldPoint(2614, 3258, 0), "Talk to Brother Cedric north of the monastery."); + talkToCedricWithJug = new NpcStep(this, NpcID.BROTHER_CEDRIC, new WorldPoint(2614, 3258, 0), "Talk to Brother Cedric again.", jugOfWater); talkToCedricWithJug.addDialogStep("Yes, I'd be happy to!"); continueTalkingToCedric = new NpcStep(this, NpcID.BROTHER_CEDRIC, new WorldPoint(2614, 3258, 0), "Talk to Brother Cedric again."); continueTalkingToCedric.addDialogStep("Yes, I'd be happy to!"); talkToCedricWithJug.addSubSteps(continueTalkingToCedric); + talkToCedricWithLog = new NpcStep(this, NpcID.BROTHER_CEDRIC, new WorldPoint(2614, 3258, 0), "Talk to Brother Cedric once again with logs.", log); + finishQuest = new NpcStep(this, NpcID.BROTHER_OMAD, new WorldPoint(2607, 3211, 0), "Return to Brother Omad to finish the quest."); } + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + steps.put(0, talkToOmad); + + var getBlanket = new ConditionalStep(this, goDownLadder); + getBlanket.addStep(and(inDungeon, blanket.alsoCheckBank(questBank)), goUpLadder); + getBlanket.addStep(blanket.alsoCheckBank(questBank), returnToOmadWithBlanket); + getBlanket.addStep(inDungeon, grabBlanket); + + steps.put(10, getBlanket); + + steps.put(20, talkToOmadAgain); + steps.put(30, talkToCedric); + steps.put(40, talkToCedricWithJug); + steps.put(50, continueTalkingToCedric); + steps.put(60, talkToCedricWithLog); + steps.put(70, finishQuest); + + return steps; + } + @Override public List getItemRequirements() { - ArrayList reqs = new ArrayList<>(); - reqs.add(jugOfWater); - reqs.add(log); - return reqs; + return List.of( + jugOfWater, + log + ); } @Override public List getItemRecommended() { - ArrayList reqs = new ArrayList<>(); - reqs.add(ardougneCloak); - return reqs; + return List.of( + ardougneCloak + ); } @Override @@ -155,23 +181,46 @@ public QuestPointReward getQuestPointReward() @Override public List getExperienceRewards() { - return Collections.singletonList(new ExperienceReward(Skill.WOODCUTTING, 2000)); + return List.of( + new ExperienceReward(Skill.WOODCUTTING, 2000) + ); } @Override public List getItemRewards() { - return Collections.singletonList(new ItemReward("Law Runes", ItemID.LAWRUNE, 8)); + return List.of( + new ItemReward("Law Runes", ItemID.LAWRUNE, 8) + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); - allSteps.add(new PanelDetails("Starting off", Collections.singletonList(talkToOmad), jugOfWater, log)); - allSteps.add(new PanelDetails("Finding the blanket", Arrays.asList(goDownLadder, grabBlanket, goUpLadder, returnToOmadWithBlanket))); - allSteps.add(new PanelDetails("Help Cedric", Arrays.asList(talkToOmadAgain, talkToCedric, talkToCedricWithJug, talkToCedricWithLog, finishQuest))); - - return allSteps; + List sections = new ArrayList<>(); + + sections.add(new PanelDetails("Starting off", List.of( + talkToOmad + ), List.of( + jugOfWater, + log + ))); + + sections.add(new PanelDetails("Finding the blanket", List.of( + goDownLadder, + grabBlanket, + goUpLadder, + returnToOmadWithBlanket + ))); + + sections.add(new PanelDetails("Help Cedric", List.of( + talkToOmadAgain, + talkToCedric, + talkToCedricWithJug, + talkToCedricWithLog, + finishQuest + ))); + + return sections; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/mountaindaughter/MountainDaughter.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/mountaindaughter/MountainDaughter.java index b2b99ee099c..042b974fbdc 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/mountaindaughter/MountainDaughter.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/mountaindaughter/MountainDaughter.java @@ -43,11 +43,11 @@ import net.runelite.client.plugins.microbot.questhelper.rewards.UnlockReward; import net.runelite.client.plugins.microbot.questhelper.steps.*; import net.runelite.api.Skill; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.SpriteID; import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -214,23 +214,23 @@ private void loadConditions() onIsland3 = new Conditions(new ZoneRequirement(LAKE_ISLAND_3)); inTheCamp = new Conditions(new ZoneRequirement(CAMP_ZONE_1, CAMP_ZONE_2, CAMP_ZONE_3)); - askedAboutDiplomacy = new Conditions(new VarbitRequirement(262, 10)); - rubbedMudIntoTree = new Conditions(new VarbitRequirement(261, 1)); + askedAboutDiplomacy = new Conditions(new VarbitRequirement(VarbitID.MDAUGHTER_RELATIONS_VAR, 10)); + rubbedMudIntoTree = new Conditions(new VarbitRequirement(VarbitID.MDAUGHTER_MUD_VAR, 1)); VarbitRequirement askedAboutFood = new VarbitRequirement(VarbitID.MDAUGHTER_FOOD_VAR, 10, Operation.GREATER_EQUAL); - askedAboutFoodAndDiplomacy = new Conditions(new VarbitRequirement(262, 10), askedAboutFood); - spokenToSvidi = new Conditions(new VarbitRequirement(262, 20), askedAboutFood); - spokenToBrundt = new Conditions(new VarbitRequirement(262, 30), askedAboutFood); - minedRock = new Conditions(new VarbitRequirement(262, 40), askedAboutFood); - gottenGuarantee = new Conditions(new VarbitRequirement(262, 50), askedAboutFood); - givenGuaranteeToSvidi = new Conditions(new VarbitRequirement(262, 60), askedAboutFood); - finishedDiplomacy = new Conditions(new VarbitRequirement(266, 1)); - finishedFood = new VarbitRequirement(263, 20); + askedAboutFoodAndDiplomacy = new Conditions(new VarbitRequirement(VarbitID.MDAUGHTER_RELATIONS_VAR, 10), askedAboutFood); + spokenToSvidi = new Conditions(new VarbitRequirement(VarbitID.MDAUGHTER_RELATIONS_VAR, 20), askedAboutFood); + spokenToBrundt = new Conditions(new VarbitRequirement(VarbitID.MDAUGHTER_RELATIONS_VAR, 30), askedAboutFood); + minedRock = new Conditions(new VarbitRequirement(VarbitID.MDAUGHTER_RELATIONS_VAR, 40), askedAboutFood); + gottenGuarantee = new Conditions(new VarbitRequirement(VarbitID.MDAUGHTER_RELATIONS_VAR, 50), askedAboutFood); + givenGuaranteeToSvidi = new Conditions(new VarbitRequirement(VarbitID.MDAUGHTER_RELATIONS_VAR, 60), askedAboutFood); + finishedDiplomacy = new Conditions(new VarbitRequirement(VarbitID.MDAUGHTER_HAMAL_RELATIONS_DONE, 1)); + finishedFood = new VarbitRequirement(VarbitID.MDAUGHTER_FOOD_VAR, 20); finishedFoodAndDiplomacy = new Conditions(finishedDiplomacy, finishedFood); inKendalCave = new Conditions(new ZoneRequirement(KENDAL_CAVE)); fightableKendalNearby = new Conditions(new NpcHintArrowRequirement(NpcID.MDAUGHTER_BEARMAN_FIGHTER)); - hasBuried = new Conditions(new VarbitRequirement(273, 1)); + hasBuried = new Conditions(new VarbitRequirement(VarbitID.MDAUGHTER_BURIAL_STATE, 1)); } private void loadQuestSteps() @@ -343,8 +343,8 @@ private void loadQuestSteps() enterCave = new ObjectStep(this, ObjectID.MDAUGHTER_CAVEENTRANCE, new WorldPoint(2809, 3703, 0), "Cut through the trees north east of the lake and enter the cave there. Bring combat gear.", axe); - ((ObjectStep) enterCave).addTileMarker(new WorldPoint(2802, 3703, 0), SpriteID.COMBAT_STYLE_AXE_CHOP); - ((ObjectStep) enterCave).addTileMarker(new WorldPoint(2807, 3703, 0), SpriteID.COMBAT_STYLE_AXE_CHOP); + ((ObjectStep) enterCave).addTileMarker(new WorldPoint(2802, 3703, 0), SpriteID.Combaticons.AXE_CHOP); + ((ObjectStep) enterCave).addTileMarker(new WorldPoint(2807, 3703, 0), SpriteID.Combaticons.AXE_CHOP); talkToKendal = new NpcStep(this, NpcID.MDAUGHTER_BEARMAN, new WorldPoint(2788, 10081, 0), "Speak to the Kendal, then kill him."); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/mourningsendparti/MourningsEndPartI.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/mourningsendparti/MourningsEndPartI.java index bf182ba05a7..7a51cd2807f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/mourningsendparti/MourningsEndPartI.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/mourningsendparti/MourningsEndPartI.java @@ -294,16 +294,16 @@ public void setupConditions() releasedGnome = new VarbitRequirement(VarbitID.MOURNING_GNOME, 7, Operation.GREATER_EQUAL); repairedDevice = new VarbitRequirement(VarbitID.MOURNING_GNOME, 9, Operation.GREATER_EQUAL); - learntAboutToads = new VarbitRequirement(9155, 1); - redToadLoaded = new VarbitRequirement(804, 1); - greenToadLoaded = new VarbitRequirement(804, 2); - blueToadLoaded = new VarbitRequirement(804, 3); - yellowToadLoaded = new VarbitRequirement(804, 4); + learntAboutToads = new VarbitRequirement(VarbitID.MOURNING_DYE_CHAT, 1); + redToadLoaded = new VarbitRequirement(VarbitID.MOURNING_GUN_AMMO, 1); + greenToadLoaded = new VarbitRequirement(VarbitID.MOURNING_GUN_AMMO, 2); + blueToadLoaded = new VarbitRequirement(VarbitID.MOURNING_GUN_AMMO, 3); + yellowToadLoaded = new VarbitRequirement(VarbitID.MOURNING_GUN_AMMO, 4); - greenDyed = new VarbitRequirement(803, 1); - redDyed = new VarbitRequirement(801, 1); - yellowDyed = new VarbitRequirement(802, 1); - blueDyed = new VarbitRequirement(800, 1); + greenDyed = new VarbitRequirement(VarbitID.MOURNING_SHEEP_GREEN, 1); + redDyed = new VarbitRequirement(VarbitID.MOURNING_SHEEP_RED, 1); + yellowDyed = new VarbitRequirement(VarbitID.MOURNING_SHEEP_YELLOW, 1); + blueDyed = new VarbitRequirement(VarbitID.MOURNING_SHEEP_BLUE, 1); greenToadGot = new Conditions(LogicType.OR, greenToadLoaded, greenToad, greenDyed); redToadGot = new Conditions(LogicType.OR, redToadLoaded, redToad, redDyed); @@ -315,9 +315,9 @@ public void setupConditions() givenRottenApple = new VarbitRequirement(VarbitID.MOURNING_ELENA, 2, Operation.GREATER_EQUAL); receivedSieve = new VarbitRequirement(VarbitID.MOURNING_ELENA, 4, Operation.GREATER_EQUAL); - poisoned1 = new VarbitRequirement(806, 1); - poisoned2 = new VarbitRequirement(807, 1); - poisoned3 = new VarbitRequirement(808, 1); + poisoned1 = new VarbitRequirement(VarbitID.MOURNING_FOOD_POISON1, 1); + poisoned2 = new VarbitRequirement(VarbitID.MOURNING_FOOD_POISON2, 1); + poisoned3 = new VarbitRequirement(VarbitID.MOURNING_FOOD_POISON3, 1); twoPoisoned = new Conditions(LogicType.OR, new Conditions(poisoned1, poisoned2), new Conditions(poisoned1, poisoned3), new Conditions(poisoned2, poisoned3)); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/mourningsendpartii/MourningsEndPartII.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/mourningsendpartii/MourningsEndPartII.java index 887f8957fe9..c3d0a31772c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/mourningsendpartii/MourningsEndPartII.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/mourningsendpartii/MourningsEndPartII.java @@ -499,24 +499,24 @@ public void setupConditions() inDeathAltar = new ZoneRequirement(deathAltar); - dispenserEmpty = new VarbitRequirement(1106, 0); + dispenserEmpty = new VarbitRequirement(VarbitID.MOURNING_TEMPLE_MIRRORS_RESET_TRAY, 0); // 1108 yellow crystal in dispenser // 1107, blue crystal in dispenser - usedRope = new VarbitRequirement(1328, 1); + usedRope = new VarbitRequirement(VarbitID.MOURNING_TEMPLE_ROPE, 1); - knowToUseCrystal = new VarbitRequirement(1104, 1); + knowToUseCrystal = new VarbitRequirement(VarbitID.MOURNING_ARIANWYN_TOLD, 1); - solvedPuzzle1 = new VarbitRequirement(1113, 1); - solvedPuzzle2 = new VarbitRequirement(1114, 1); - solvedPuzzle3 = new VarbitRequirement(1116, 1); - solvedPuzzle4 = new VarbitRequirement(1115, 1); - solvedPuzzle5 = new VarbitRequirement(1117, 1); + solvedPuzzle1 = new VarbitRequirement(VarbitID.MOURNING_TEMPLE_PARTS_2, 1); + solvedPuzzle2 = new VarbitRequirement(VarbitID.MOURNING_TEMPLE_PARTS_3, 1); + solvedPuzzle3 = new VarbitRequirement(VarbitID.MOURNING_TEMPLE_PARTS_5, 1); + solvedPuzzle4 = new VarbitRequirement(VarbitID.MOURNING_TEMPLE_PARTS_4, 1); + solvedPuzzle5 = new VarbitRequirement(VarbitID.MOURNING_TEMPLE_PARTS_6, 1); - enteredDeathArea = new VarbitRequirement(1330, 1); + enteredDeathArea = new VarbitRequirement(VarbitID.MOURNING_LIGHT_DOOR_1_C_FIRST_TIME, 1); - receivedList = new VarbitRequirement(1327, 1); + receivedList = new VarbitRequirement(VarbitID.MOURNING_DWARF_STARTEDTASK, 1); final int RED = 1; final int YELLOW = 2; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/murdermystery/MurderMystery.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/murdermystery/MurderMystery.java index a0a0766a619..2d46420dabd 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/murdermystery/MurderMystery.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/murdermystery/MurderMystery.java @@ -31,6 +31,9 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.npc.DialogRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.runelite.RuneliteRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.not; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.or; import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicType; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarplayerRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.widget.WidgetTextRequirement; @@ -39,192 +42,260 @@ import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ItemStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; -import net.runelite.api.events.VarbitChanged; +import net.runelite.api.gameval.InterfaceID; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; -import net.runelite.client.eventbus.Subscribe; - -import java.util.*; +import net.runelite.api.gameval.VarPlayerID; public class MurderMystery extends BasicQuestHelper { - //Items Required - ItemRequirement pot, pungentPot, criminalsDaggerAny, criminalsDagger, criminalsDaggerFlour, criminalsThread, criminalsThread1, criminalsThread2, criminalsThread3, - twoFlypaper, potOfFlourHighlighted, flypaper, unknownPrint, silverNecklace, silverBook, silverBookFlour, silverNecklaceFlour, annaPrint, davidPrint, killersPrint, silverNeedle, - silverPot, silverNeedleFlour, silverPotFlour, elizabethPrint, frankPrint, criminalsDaggerHighlighted, criminalsDaggerFlourHighlighted, silverCup, silverCupFlour, silverBottle, - silverBottleFlour, bobPrint, carolPrint; - - RuneliteRequirement heardAboutPoisonSalesman, talkedToPoisonSalesman, hadThread, hadPot, hadKillerPrint; - - Requirement annaGuilty, bobGuilty, carolGuilty, davidGuilty, elizabethGuilty, frankGuilty, hasCriminalSilverItem, isUpstairs, - hasSuspectPrint, hasSilverItemFlour; - - Requirement talkedToAnna, talkedToBob, talkedToCarol, talkedToDavid, talkedToElizabeth, talkedToFrank, talkedToSuspect, pleaseWaitRequirement; - Requirement checkedAnna, checkedBob, checkedCarol, checkedDavid, checkedElizabeth, checkedFrank, checkedSuspect; - + // Required items + ItemRequirement pot; + + // Mid-quest requirements + ItemRequirement pungentPot; + ItemRequirement criminalsDaggerAny; + ItemRequirement criminalsDagger; + ItemRequirement criminalsDaggerFlour; + ItemRequirement criminalsThread; + ItemRequirement criminalsThread1; + ItemRequirement criminalsThread2; + ItemRequirement criminalsThread3; + ItemRequirement twoFlypaper; + ItemRequirement potOfFlourHighlighted; + ItemRequirement flypaper; + ItemRequirement unknownPrint; + ItemRequirement silverNecklace; + ItemRequirement silverBook; + ItemRequirement silverBookFlour; + ItemRequirement silverNecklaceFlour; + ItemRequirement annaPrint; + ItemRequirement davidPrint; + ItemRequirement killersPrint; + ItemRequirement silverNeedle; + ItemRequirement silverPot; + ItemRequirement silverNeedleFlour; + ItemRequirement silverPotFlour; + ItemRequirement elizabethPrint; + ItemRequirement frankPrint; + ItemRequirement criminalsDaggerHighlighted; + ItemRequirement criminalsDaggerFlourHighlighted; + ItemRequirement silverCup; + ItemRequirement silverCupFlour; + ItemRequirement silverBottle; + ItemRequirement silverBottleFlour; + ItemRequirement bobPrint; + ItemRequirement carolPrint; + + // Zones Zone upstairs; - QuestStep talkToGuard, talkToGossip, talkToPoisonSalesman, pickUpDagger, pickUpPungentPot, searchWindowForThread, fillPotWithFlour, useFlourOnDagger, - collectTwoFlypaper, useFlypaperOnDagger, searchAnnasBarrel, searchDavidsBarrel, searchFranksBarrel, searchElizabethsBarrel, - searchBobsBarrel, searchCarolsBarrel, remainingSteps, finishQuest; - - QuestStep useFlourOnNecklace, useFlourOnCup, useFlourOnBottle, useFlourOnBook, useFlourOnNeedle, useFlourOnPot; - QuestStep useFlypaperOnNecklace, useFlypaperOnCup, useFlypaperOnBottle, useFlypaperOnBook, useFlypaperOnNeedle, useFlypaperOnPot; - QuestStep collectFlypaper, fillPotWithFlourForSilver; - QuestStep compareAnna, compareBob, compareCarol, compareDavid, compareElizabeth, compareFrank; - QuestStep talkToAnna, talkToBob, talkToFrank, talkToDavid, talkToCarol, talkToElizabeth; - QuestStep searchAnna, searchBob, searchCarol, searchDavid, searchElizabeth, searchFrank; - - ConditionalStep useFlour, searchBarrel, useFlypaper, comparePrints, talkToSuspect, searchSuspectItem; - DetailedQuestStep useFlourSidebar, searchBarrelSidebar, useFlypaperSidebar, comparePrintsSidebar, talkToSuspectSidebar, searchSuspectItemSidebar; + // Miscellaneous requirements + RuneliteRequirement heardAboutPoisonSalesman; + RuneliteRequirement talkedToPoisonSalesman; + RuneliteRequirement talkedToPoisonSalesman2; + RuneliteRequirement hadThread; + RuneliteRequirement hadPot; + RuneliteRequirement hadKillerPrint; + + VarplayerRequirement annaGuilty; + VarplayerRequirement bobGuilty; + VarplayerRequirement carolGuilty; + VarplayerRequirement davidGuilty; + VarplayerRequirement elizabethGuilty; + VarplayerRequirement frankGuilty; + Conditions hasCriminalSilverItem; + ZoneRequirement isUpstairs; + Requirement hasSuspectPrint; + Requirement hasSilverItemFlour; + + Conditions talkedToAnna; + Conditions talkedToBob; + Conditions talkedToCarol; + Conditions talkedToDavid; + Conditions talkedToElizabeth; + Conditions talkedToFrank; + RuneliteRequirement talkedToSuspect; + WidgetTextRequirement pleaseWaitRequirement; + + Requirement checkedAnna; + Requirement checkedBob; + Requirement checkedCarol; + Requirement checkedDavid; + Requirement checkedElizabeth; + Requirement checkedFrank; + Requirement checkedSuspect; + + // Steps + QuestStep talkToGuard; + QuestStep talkToGossip; + QuestStep talkToPoisonSalesman; + QuestStep talkToPoisonSalesman2; + QuestStep pickUpDagger; + QuestStep pickUpPungentPot; + QuestStep searchWindowForThread; + QuestStep fillPotWithFlour; + QuestStep useFlourOnDagger; + QuestStep collectTwoFlypaper; + QuestStep useFlypaperOnDagger; + QuestStep searchAnnasBarrel; + QuestStep searchDavidsBarrel; + QuestStep searchFranksBarrel; + QuestStep searchElizabethsBarrel; + QuestStep searchBobsBarrel; + QuestStep searchCarolsBarrel; + QuestStep remainingSteps; + QuestStep finishQuest; + + QuestStep useFlourOnNecklace; + QuestStep useFlourOnCup; + QuestStep useFlourOnBottle; + QuestStep useFlourOnBook; + QuestStep useFlourOnNeedle; + QuestStep useFlourOnPot; + + QuestStep useFlypaperOnNecklace; + QuestStep useFlypaperOnCup; + QuestStep useFlypaperOnBottle; + QuestStep useFlypaperOnBook; + QuestStep useFlypaperOnNeedle; + QuestStep useFlypaperOnPot; + + QuestStep collectFlypaper; + QuestStep fillPotWithFlourForSilver; + + QuestStep compareAnna; + QuestStep compareBob; + QuestStep compareCarol; + QuestStep compareDavid; + QuestStep compareElizabeth; + QuestStep compareFrank; + + QuestStep talkToAnna; + QuestStep talkToBob; + QuestStep talkToFrank; + QuestStep talkToDavid; + QuestStep talkToCarol; + QuestStep talkToElizabeth; + + QuestStep searchAnna; + QuestStep searchBob; + QuestStep searchCarol; + QuestStep searchDavid; + QuestStep searchElizabeth; + QuestStep searchFrank; + + ConditionalStep useFlour; + ConditionalStep searchBarrel; + ConditionalStep useFlypaper; + ConditionalStep comparePrints; + ConditionalStep talkToSuspect; + ConditionalStep searchSuspectItem; @Override - public Map loadSteps() + protected void setupZones() { - initializeRequirements(); - setupZone(); - setupConditions(); - setupSteps(); - Map steps = new HashMap<>(); - - steps.put(0, talkToGuard); + upstairs = new Zone(new WorldPoint(2727, 3571, 1), new WorldPoint(2752, 3585, 1)); + } - Requirement doesntNeedMoreFlypaper = new Conditions(LogicType.OR, twoFlypaper, new Conditions(flypaper, unknownPrint)); + @Override + protected void setupRequirements() + { + pot = new ItemRequirement("Pot", ItemID.POT_EMPTY); - Conditions hadPotAndThread = new Conditions(hadThread, hadPot); + pungentPot = new ItemRequirement("Pungent pot", ItemID.MURDERPOT2); - ConditionalStep checkingPrintSteps = new ConditionalStep(this, pickUpDagger); - /* compare prints */ - checkingPrintSteps.addStep(new Conditions(unknownPrint, hasSuspectPrint), comparePrints); - checkingPrintSteps.addStep(new Conditions(unknownPrint, hasSilverItemFlour, flypaper), useFlypaper); - checkingPrintSteps.addStep(new Conditions(unknownPrint, hasCriminalSilverItem, flypaper, potOfFlourHighlighted), useFlour); - checkingPrintSteps.addStep(new Conditions(unknownPrint, hasCriminalSilverItem, flypaper), fillPotWithFlourForSilver); - checkingPrintSteps.addStep(new Conditions(unknownPrint, hasCriminalSilverItem), collectFlypaper); - /* Unknown print */ - checkingPrintSteps.addStep(new Conditions(criminalsDaggerFlour, hasCriminalSilverItem), useFlypaperOnDagger); - checkingPrintSteps.addStep(new Conditions(criminalsDaggerAny, hasCriminalSilverItem, potOfFlourHighlighted), useFlourOnDagger); - checkingPrintSteps.addStep(new Conditions(criminalsDaggerAny, doesntNeedMoreFlypaper, hasCriminalSilverItem), fillPotWithFlour); - checkingPrintSteps.addStep(new Conditions(criminalsDaggerAny, doesntNeedMoreFlypaper), searchBarrel); - checkingPrintSteps.addStep(new Conditions(criminalsDaggerAny), collectTwoFlypaper); - - ConditionalStep investigating = new ConditionalStep(this, searchWindowForThread); - investigating.addStep(new Conditions(hadPotAndThread, hadKillerPrint, checkedSuspect), finishQuest); - investigating.addStep(new Conditions(hadPotAndThread, hadKillerPrint, talkedToSuspect), searchSuspectItem); - investigating.addStep(new Conditions(hadPotAndThread, hadKillerPrint, talkedToPoisonSalesman), talkToSuspect); - investigating.addStep(new Conditions(hadPotAndThread, hadKillerPrint, heardAboutPoisonSalesman), talkToPoisonSalesman); - investigating.addStep(new Conditions(hadPotAndThread, hadKillerPrint), talkToGossip); - investigating.addStep(hadPotAndThread, checkingPrintSteps); /* Get dagger print */ - investigating.addStep(hadThread, pickUpPungentPot); + criminalsDaggerAny = new ItemRequirement("Criminal's dagger", ItemID.MURDERWEAPON); + criminalsDaggerAny.addAlternates(ItemID.MURDERWEAPONDUST, ItemID.MURDERFINGERPRINT); - steps.put(1, investigating); + criminalsDagger = new ItemRequirement("Criminal's dagger", ItemID.MURDERWEAPON); + criminalsDaggerHighlighted = new ItemRequirement("Criminal's dagger", ItemID.MURDERWEAPON); + criminalsDaggerHighlighted.setHighlightInInventory(true); - if (client.getVarpValue(195) > 0) updateSuspect(); + criminalsDaggerFlour = new ItemRequirement("Criminal's dagger", ItemID.MURDERWEAPONDUST); + criminalsDaggerFlourHighlighted = new ItemRequirement("Criminal's dagger", ItemID.MURDERWEAPONDUST); + criminalsDaggerFlourHighlighted.setHighlightInInventory(true); - return steps; - } + criminalsThread = new ItemRequirement("Criminal's thread", ItemID.MURDERTHREADR); + criminalsThread.addAlternates(ItemID.MURDERTHREADG, ItemID.MURDERTHREADB); + criminalsThread1 = new ItemRequirement("Criminal's thread", ItemID.MURDERTHREADR); + criminalsThread2 = new ItemRequirement("Criminal's thread", ItemID.MURDERTHREADG); + criminalsThread3 = new ItemRequirement("Criminal's thread", ItemID.MURDERTHREADB); + twoFlypaper = new ItemRequirement("Flypaper", ItemID.MURDERPAPER, 2); + flypaper = new ItemRequirement("Flypaper", ItemID.MURDERPAPER); + flypaper.setHighlightInInventory(true); + flypaper.setTooltip("You can get more from the sack in the shed on the west of the Sinclair Mansion"); + potOfFlourHighlighted = new ItemRequirement("Pot of flour", ItemID.POT_FLOUR); + potOfFlourHighlighted.setHighlightInInventory(true); + unknownPrint = new ItemRequirement("Unknown print", ItemID.MURDERFINGERPRINT1); - @Subscribe - public void onVarbitChanged(VarbitChanged varbitChanged) - { - if (varbitChanged.getVarpId() != 195) return; + /* Thread 1 item */ + bobPrint = new ItemRequirement("Bob's print", ItemID.MURDERFINGERPRINTB); + carolPrint = new ItemRequirement("Carol's print", ItemID.MURDERFINGERPRINTC); + silverCup = new ItemRequirement("Silver cup", ItemID.MURDERCUP); + silverCupFlour = new ItemRequirement("Silver cup", ItemID.MURDERCUPDUST); + silverBottle = new ItemRequirement("Silver bottle", ItemID.MURDERBOTTLE); + silverBottleFlour = new ItemRequirement("Silver bottle", ItemID.MURDERBOTTLEDUST); - updateSuspect(); - } + /* Thread 2 items */ + annaPrint = new ItemRequirement("Anna's print", ItemID.MURDERFINGERPRINTA); + davidPrint = new ItemRequirement("David's print", ItemID.MURDERFINGERPRINTD); + silverNecklace = new ItemRequirement("Silver necklace", ItemID.MURDERNECKLACE); + silverNecklaceFlour = new ItemRequirement("Silver necklace", ItemID.MURDERNECKLACEDUST); + silverBook = new ItemRequirement("Silver book", ItemID.MURDERBOOK); + silverBookFlour = new ItemRequirement("Silver book", ItemID.MURDERBOOKDUST); - private void updateSuspect() - { - // 5 for me - int suspect = client.getVarpValue(195); - if (suspect == 1) - { - useFlourSidebar.getText().set(0, useFlourOnNecklace.getText().get(0)); - searchBarrelSidebar.getText().set(0, searchAnnasBarrel.getText().get(0)); - useFlypaperSidebar.getText().set(0, useFlypaperOnNecklace.getText().get(0)); - comparePrintsSidebar.getText().set(0, compareAnna.getText().get(0)); - talkToSuspectSidebar.getText().set(0, talkToAnna.getText().get(0)); - searchSuspectItemSidebar.getText().set(0, searchAnna.getText().get(0)); - } - else if (suspect == 2) - { - useFlourSidebar.getText().set(0, useFlourOnCup.getText().get(0)); - searchBarrelSidebar.getText().set(0, searchBobsBarrel.getText().get(0)); - useFlypaperSidebar.getText().set(0, useFlypaperOnCup.getText().get(0)); - comparePrintsSidebar.getText().set(0, compareBob.getText().get(0)); - talkToSuspectSidebar.getText().set(0, talkToBob.getText().get(0)); - searchSuspectItemSidebar.getText().set(0, searchBob.getText().get(0)); - } - else if (suspect == 3) - { - useFlourSidebar.getText().set(0, useFlourOnBottle.getText().get(0)); - searchBarrelSidebar.getText().set(0, searchCarolsBarrel.getText().get(0)); - useFlypaperSidebar.getText().set(0, useFlypaperOnBottle.getText().get(0)); - comparePrintsSidebar.getText().set(0, compareCarol.getText().get(0)); - talkToSuspectSidebar.getText().set(0, talkToCarol.getText().get(0)); - searchSuspectItemSidebar.getText().set(0, searchCarol.getText().get(0)); - } - else if (suspect == 4) - { - useFlourSidebar.getText().set(0, useFlourOnBook.getText().get(0)); - searchBarrelSidebar.getText().set(0, searchDavidsBarrel.getText().get(0)); - useFlypaperSidebar.getText().set(0, useFlypaperOnBook.getText().get(0)); - comparePrintsSidebar.getText().set(0, compareDavid.getText().get(0)); - talkToSuspectSidebar.getText().set(0, talkToDavid.getText().get(0)); - searchSuspectItemSidebar.getText().set(0, searchDavid.getText().get(0)); - } - else if (suspect == 5) - { - useFlourSidebar.getText().set(0, useFlourOnNeedle.getText().get(0)); - searchBarrelSidebar.getText().set(0, searchElizabethsBarrel.getText().get(0)); - useFlypaperSidebar.getText().set(0, useFlypaperOnNeedle.getText().get(0)); - comparePrintsSidebar.getText().set(0, compareElizabeth.getText().get(0)); - talkToSuspectSidebar.getText().set(0, talkToElizabeth.getText().get(0)); - searchSuspectItemSidebar.getText().set(0, searchElizabeth.getText().get(0)); - } - else if (suspect == 6) - { - useFlourSidebar.getText().set(0, useFlourOnPot.getText().get(0)); - searchBarrelSidebar.getText().set(0, searchFranksBarrel.getText().get(0)); - useFlypaperSidebar.getText().set(0, useFlypaperOnPot.getText().get(0)); - comparePrintsSidebar.getText().set(0, compareFrank.getText().get(0)); - talkToSuspectSidebar.getText().set(0, talkToFrank.getText().get(0)); - searchSuspectItemSidebar.getText().set(0, searchFrank.getText().get(0)); - } - } + /* Thread 3 items */ + elizabethPrint = new ItemRequirement("Elizabeth's print", ItemID.MURDERFINGERPRINTE); + frankPrint = new ItemRequirement("Frank's print", ItemID.MURDERFINGERPRINTF); + silverNeedle = new ItemRequirement("Silver needle", ItemID.MURDERNEEDLE); + silverNeedleFlour = new ItemRequirement("Silver needle", ItemID.MURDERNEEDLEDUST); + silverPot = new ItemRequirement("Silver needle", ItemID.MURDERPOT); + silverPotFlour = new ItemRequirement("Silver needle", ItemID.MURDERPOTDUST); - public void setupZone() - { - upstairs = new Zone(new WorldPoint(2727, 3571, 1), new WorldPoint(2752, 3585, 1)); + killersPrint = new ItemRequirement("Killer's print", ItemID.MURDERFINGERPRINT); } public void setupConditions() { isUpstairs = new ZoneRequirement(upstairs); - hadThread = new RuneliteRequirement(getConfigManager(), "murdermysteryhadthread", criminalsThread.alsoCheckBank(questBank)); - hadPot = new RuneliteRequirement(getConfigManager(), "murdermysteryhadpot", pungentPot.alsoCheckBank(questBank)); - heardAboutPoisonSalesman = new RuneliteRequirement(getConfigManager(), "murdermysterytalkedtogossip", - new Conditions(true, new DialogRequirement( "Especially as I heard that the poison salesman in the Seers' village made a big sale to one of the family the other day.")) + hadThread = new RuneliteRequirement(configManager, "murdermysteryhadthread", criminalsThread.alsoCheckBank(questBank)); + hadPot = new RuneliteRequirement(configManager, "murdermysteryhadpot", pungentPot.alsoCheckBank(questBank)); + heardAboutPoisonSalesman = new RuneliteRequirement(configManager, "murdermysterytalkedtogossip", + new Conditions(true, new DialogRequirement("Especially as I heard that the poison salesman in the Seers' village made a big sale to one of the family the other day.")) ); - talkedToPoisonSalesman = new RuneliteRequirement(getConfigManager(), "murdermysterytalkedtopoisonsalesman", + talkedToPoisonSalesman = new RuneliteRequirement(configManager, "murdermysterytalkedtopoisonsalesman", new Conditions(true, LogicType.OR, - new DialogRequirement(questHelperPlugin.getPlayerStateManager().getPlayerName(), "Uh... no, it's ok.", false), + new DialogRequirement(questHelperPlugin.getPlayerStateManager().getPlayerName(), "Uh... no, it's ok.", false), new DialogRequirement("Anna, Bob, Carol, David, Elizabeth and Frank all bought a bottle! " + - "In fact they bought the last of my supplies!") - )); + "In fact they bought the last of my supplies!") + )); + talkedToPoisonSalesman2 = new RuneliteRequirement(configManager, "murdermysterytalkedtopoisonsalesmanpot", + new Conditions(true, new DialogRequirement("Yes... I suppose that could have happened...")) + ); - annaGuilty = new VarplayerRequirement(195, 1); - bobGuilty = new VarplayerRequirement(195, 2); - carolGuilty = new VarplayerRequirement(195, 3); - davidGuilty = new VarplayerRequirement(195, 4); - elizabethGuilty = new VarplayerRequirement(195, 5); - frankGuilty = new VarplayerRequirement(195, 6); + annaGuilty = new VarplayerRequirement(VarPlayerID.MURDERSUS, 1); + bobGuilty = new VarplayerRequirement(VarPlayerID.MURDERSUS, 2); + carolGuilty = new VarplayerRequirement(VarPlayerID.MURDERSUS, 3); + davidGuilty = new VarplayerRequirement(VarPlayerID.MURDERSUS, 4); + elizabethGuilty = new VarplayerRequirement(VarPlayerID.MURDERSUS, 5); + frankGuilty = new VarplayerRequirement(VarPlayerID.MURDERSUS, 6); - hasCriminalSilverItem = new Conditions( - LogicType.OR, + hasCriminalSilverItem = or( new Conditions(annaGuilty, silverNecklace), new Conditions(bobGuilty, silverCup), new Conditions(carolGuilty, silverBottle), @@ -233,8 +304,7 @@ public void setupConditions() new Conditions(frankGuilty, silverPot) ); - hasSuspectPrint = new Conditions( - LogicType.OR, + hasSuspectPrint = or( new Conditions(annaGuilty, annaPrint), new Conditions(bobGuilty, bobPrint), new Conditions(carolGuilty, carolPrint), @@ -243,18 +313,18 @@ public void setupConditions() new Conditions(frankGuilty, frankPrint) ); - hadKillerPrint = new RuneliteRequirement(getConfigManager(), "murdermysteryhadkillerprint", + hadKillerPrint = new RuneliteRequirement(configManager, "murdermysteryhadkillerprint", new Conditions(killersPrint) ); hasSilverItemFlour = new Conditions( LogicType.OR, - new Conditions(annaGuilty, silverNecklaceFlour), - new Conditions(bobGuilty, silverCupFlour), - new Conditions(carolGuilty, silverBottleFlour), - new Conditions(davidGuilty, silverBookFlour), - new Conditions(elizabethGuilty, silverNeedleFlour), - new Conditions(frankGuilty, silverPotFlour) + and(annaGuilty, silverNecklaceFlour), + and(bobGuilty, silverCupFlour), + and(carolGuilty, silverBottleFlour), + and(davidGuilty, silverBookFlour), + and(elizabethGuilty, silverNeedleFlour), + and(frankGuilty, silverPotFlour) ); // TODO: This currently can't be used as checks are on each tick, but the text change + removal can occur within a tick @@ -284,7 +354,7 @@ public void setupConditions() true, new DialogRequirement("Frank", "clean that family crest", false) ); - talkedToSuspect = new RuneliteRequirement(getConfigManager(), "murdermysterytalkedtosuspect", + talkedToSuspect = new RuneliteRequirement(configManager, "murdermysterytalkedtosuspect", new Conditions( LogicType.OR, new Conditions(annaGuilty, talkedToAnna), @@ -298,29 +368,29 @@ public void setupConditions() checkedAnna = new Conditions( true, - new WidgetTextRequirement(229, 1, "The compost is teeming with maggots.") + new WidgetTextRequirement(InterfaceID.Messagebox.TEXT, "The compost is teeming with maggots.") ); checkedBob = new Conditions( true, - new WidgetTextRequirement(229, 1, "The beehive buzzes with activity.") + new WidgetTextRequirement(InterfaceID.Messagebox.TEXT, "The beehive buzzes with activity.") ); checkedCarol = new Conditions( true, - new WidgetTextRequirement(229, 1, "The drain is totally blocked.") + new WidgetTextRequirement(InterfaceID.Messagebox.TEXT, "The drain is totally blocked.") ); checkedDavid = new Conditions( true, - new WidgetTextRequirement(229, 1, "few hundred spiders ready to hatch.") + new WidgetTextRequirement(InterfaceID.Messagebox.TEXT, "few hundred spiders ready to hatch.") ); checkedElizabeth = new Conditions( true, - new WidgetTextRequirement(229, 1, "The fountain is swarming") + new WidgetTextRequirement(InterfaceID.Messagebox.TEXT, "The fountain is swarming") ); checkedFrank = new Conditions( true, - new WidgetTextRequirement(229, 1, "crest but it is very dirty") + new WidgetTextRequirement(InterfaceID.Messagebox.TEXT, "crest but it is very dirty") ); - checkedSuspect = new RuneliteRequirement(getConfigManager(), "murdermysterydisprovedsuspect", + checkedSuspect = new RuneliteRequirement(configManager, "murdermysterydisprovedsuspect", new Conditions( LogicType.OR, checkedAnna, @@ -334,71 +404,64 @@ public void setupConditions() } @Override - protected void setupRequirements() + public Map loadSteps() { - pot = new ItemRequirement("Pot", ItemID.POT_EMPTY); - pungentPot = new ItemRequirement("Pungent pot", ItemID.MURDERPOT2); + initializeRequirements(); + setupConditions(); + setupSteps(); - criminalsDaggerAny = new ItemRequirement("Criminal's dagger", ItemID.MURDERWEAPON); - criminalsDaggerAny.addAlternates(ItemID.MURDERWEAPONDUST, ItemID.MURDERFINGERPRINT); + var steps = new HashMap(); - criminalsDagger = new ItemRequirement("Criminal's dagger", ItemID.MURDERWEAPON); - criminalsDaggerHighlighted = new ItemRequirement("Criminal's dagger", ItemID.MURDERWEAPON); - criminalsDaggerHighlighted.setHighlightInInventory(true); + steps.put(0, talkToGuard); - criminalsDaggerFlour = new ItemRequirement("Criminal's dagger", ItemID.MURDERWEAPONDUST); - criminalsDaggerFlourHighlighted = new ItemRequirement("Criminal's dagger", ItemID.MURDERWEAPONDUST); - criminalsDaggerFlourHighlighted.setHighlightInInventory(true); + var doesntNeedMoreFlypaper = new Conditions(LogicType.OR, twoFlypaper, and(flypaper, unknownPrint)); - criminalsThread = new ItemRequirement("Criminal's thread", ItemID.MURDERTHREADR); - criminalsThread.addAlternates(ItemID.MURDERTHREADG, ItemID.MURDERTHREADB); - criminalsThread1 = new ItemRequirement("Criminal's thread", ItemID.MURDERTHREADR); - criminalsThread2 = new ItemRequirement("Criminal's thread", ItemID.MURDERTHREADG); - criminalsThread3 = new ItemRequirement("Criminal's thread", ItemID.MURDERTHREADB); - twoFlypaper = new ItemRequirement("Flypaper", ItemID.MURDERPAPER, 2); - flypaper = new ItemRequirement("Flypaper", ItemID.MURDERPAPER); - flypaper.setHighlightInInventory(true); - flypaper.setTooltip("You can get more from the sack in the shed on the west of the Sinclair Mansion"); - potOfFlourHighlighted = new ItemRequirement("Pot of flour", ItemID.POT_FLOUR); - potOfFlourHighlighted.setHighlightInInventory(true); - unknownPrint = new ItemRequirement("Unknown print", ItemID.MURDERFINGERPRINT1); + var hadPotAndThread = and(hadThread, hadPot); - /* Thread 1 items */ - bobPrint = new ItemRequirement("Bob's print", ItemID.MURDERFINGERPRINTB); - carolPrint = new ItemRequirement("Carol's print", ItemID.MURDERFINGERPRINTC); - silverCup = new ItemRequirement("Silver cup", ItemID.MURDERCUP); - silverCupFlour = new ItemRequirement("Silver cup", ItemID.MURDERCUPDUST); - silverBottle = new ItemRequirement("Silver bottle", ItemID.MURDERBOTTLE); - silverBottleFlour = new ItemRequirement("Silver bottle", ItemID.MURDERBOTTLEDUST); - - /* Thread 2 items */ - annaPrint = new ItemRequirement("Anna's print", ItemID.MURDERFINGERPRINTA); - davidPrint = new ItemRequirement("David's print", ItemID.MURDERFINGERPRINTD); - silverNecklace = new ItemRequirement("Silver necklace", ItemID.MURDERNECKLACE); - silverNecklaceFlour = new ItemRequirement("Silver necklace", ItemID.MURDERNECKLACEDUST); - silverBook = new ItemRequirement("Silver book", ItemID.MURDERBOOK); - silverBookFlour = new ItemRequirement("Silver book", ItemID.MURDERBOOKDUST); + var checkingPrintSteps = new ConditionalStep(this, pickUpDagger); + /* compare prints */ + checkingPrintSteps.addStep(and(unknownPrint, hasSuspectPrint), comparePrints); + checkingPrintSteps.addStep(and(unknownPrint, hasSilverItemFlour, flypaper), useFlypaper); + checkingPrintSteps.addStep(and(unknownPrint, hasCriminalSilverItem, flypaper, potOfFlourHighlighted), useFlour); + checkingPrintSteps.addStep(and(unknownPrint, hasCriminalSilverItem, flypaper), fillPotWithFlourForSilver); + checkingPrintSteps.addStep(and(unknownPrint, hasCriminalSilverItem), collectFlypaper); + /* Unknown print */ + checkingPrintSteps.addStep(and(criminalsDaggerFlour, hasCriminalSilverItem), useFlypaperOnDagger); + checkingPrintSteps.addStep(and(criminalsDaggerAny, hasCriminalSilverItem, potOfFlourHighlighted), useFlourOnDagger); + checkingPrintSteps.addStep(and(criminalsDaggerAny, doesntNeedMoreFlypaper, hasCriminalSilverItem), fillPotWithFlour); + checkingPrintSteps.addStep(and(criminalsDaggerAny, doesntNeedMoreFlypaper), searchBarrel); + checkingPrintSteps.addStep(criminalsDaggerAny, collectTwoFlypaper); + + var investigating = new ConditionalStep(this, searchWindowForThread); + investigating.addStep(and(hadPotAndThread, hadKillerPrint, checkedSuspect), finishQuest); + investigating.addStep(and(hadPotAndThread, hadKillerPrint, talkedToSuspect), searchSuspectItem); + // If we've talked to the Poison Salesman through the "find customers" option, _AND_ through the "i found this pot....." option (but only if we have the pot still), + // then prompt the player to talk to the suspect + investigating.addStep(and(hadPotAndThread, hadKillerPrint, talkedToPoisonSalesman, or(talkedToPoisonSalesman2, not(pungentPot))), talkToSuspect); + investigating.addStep(and(hadPotAndThread, hadKillerPrint, talkedToPoisonSalesman2, not(talkedToPoisonSalesman)), talkToPoisonSalesman); + investigating.addStep(and(hadPotAndThread, hadKillerPrint, talkedToPoisonSalesman, not(talkedToPoisonSalesman2), pungentPot), talkToPoisonSalesman2); + investigating.addStep(and(hadPotAndThread, hadKillerPrint, heardAboutPoisonSalesman), talkToPoisonSalesman); + investigating.addStep(and(hadPotAndThread, hadKillerPrint), talkToGossip); + investigating.addStep(hadPotAndThread, checkingPrintSteps); /* Get dagger print */ + investigating.addStep(hadThread, pickUpPungentPot); - /* Thread 3 items */ - elizabethPrint = new ItemRequirement("Elizabeth's print", ItemID.MURDERFINGERPRINTE); - frankPrint = new ItemRequirement("Frank's print", ItemID.MURDERFINGERPRINTF); - silverNeedle = new ItemRequirement("Silver needle", ItemID.MURDERNEEDLE); - silverNeedleFlour = new ItemRequirement("Silver needle", ItemID.MURDERNEEDLEDUST); - silverPot = new ItemRequirement("Silver needle", ItemID.MURDERPOT); - silverPotFlour = new ItemRequirement("Silver needle", ItemID.MURDERPOTDUST); + steps.put(1, investigating); - killersPrint = new ItemRequirement("Killer's print", ItemID.MURDERFINGERPRINT); + return steps; } public void setupSteps() { talkToGuard = new NpcStep(this, NpcID.MURDERGUARD, new WorldPoint(2741, 3561, 0), "Talk to the Guard in the Sinclair Manor north of Camelot."); - talkToGuard.addDialogSteps("Yes.", "Sure, I'll help."); + talkToGuard.addDialogSteps("Yes."); - pickUpPungentPot = new DetailedQuestStep(this, new WorldPoint(2747, 3579, 0), "Enter the mansion and pick up the pungent pot inside the east room.", pungentPot); - pickUpDagger = new DetailedQuestStep(this, new WorldPoint(2746, 3578, 0), "Pick up the criminal's dagger.", criminalsDaggerAny); + pickUpPungentPot = new ItemStep(this, new WorldPoint(2747, 3579, 0), "Enter the mansion and pick up the pungent pot inside the east room.", pungentPot); + pickUpDagger = new ItemStep(this, new WorldPoint(2746, 3578, 0), "Pick up the criminal's dagger.", criminalsDaggerAny); searchWindowForThread = new ObjectStep(this, ObjectID.MURDERWINDOW, new WorldPoint(2748, 3577, 0), "Search the window for a clothing thread. The colour of the thread will match the killer's trousers.", criminalsThread); - fillPotWithFlour = new ObjectStep(this, ObjectID.FLOURBARREL, new WorldPoint(2733, 3582, 0), "Fill your pot with flour from the barrel in the mansion's kitchen.", pot); + var actuallyFillPotWithFlour = new ObjectStep(this, ObjectID.FLOURBARREL, new WorldPoint(2733, 3582, 0), "", pot); + var goDownstairs = new ObjectStep(this, ObjectID.MURDER_QIP_SPIRALSTAIRSTOP, new WorldPoint(2736, 3581, 1), "Head downstairs to the ground floor."); + fillPotWithFlour = new ConditionalStep(this, actuallyFillPotWithFlour, "Fill your pot with flour from the barrel in the mansion's kitchen."); + ((ConditionalStep) fillPotWithFlour).addStep(isUpstairs, goDownstairs); useFlourOnDagger = new DetailedQuestStep(this, "Use the pot of flour on the Criminal's dagger.", potOfFlourHighlighted, criminalsDaggerHighlighted); collectTwoFlypaper = new ObjectStep(this, ObjectID.MURDERSACKS, new WorldPoint(2731, 3582, 0), "Investigate the sacks in the shed for flypaper. Get 2 pieces.", twoFlypaper); collectTwoFlypaper.addDialogStep("Yes, it might be useful."); @@ -451,13 +514,16 @@ public void setupSteps() compareFrank = new DetailedQuestStep(this, "Use Frank's prints on the killer's print to compare them.", unknownPrint.highlighted(), frankPrint.highlighted()); talkToGossip = new NpcStep(this, NpcID.GOSSIPY_MAN, new WorldPoint(2741, 3557, 0), "Talk to Gossip, just south of the Sinclair Mansion."); - talkToGossip.addDialogStep(2, "Who do you think was responsible?"); + talkToGossip.addDialogStep("Who do you think was responsible?"); - talkToPoisonSalesman = new NpcStep(this, NpcID.POISON_SALESMAN, new WorldPoint(2694, 3493, 0), "Talk to the " + - "Poison Salesman in the Seers' Village pub."); + talkToPoisonSalesman = new NpcStep(this, NpcID.POISON_SALESMAN, new WorldPoint(2694, 3493, 0), "Talk to the Poison Salesman in the Seers' Village pub about his customers."); talkToPoisonSalesman.addDialogStep("Who did you sell Poison to at the house?"); talkToPoisonSalesman.addDialogStep("Talk about the Murder Mystery Quest"); + talkToPoisonSalesman2 = new NpcStep(this, NpcID.POISON_SALESMAN, new WorldPoint(2694, 3493, 0), "Talk to the Poison Salesman in the Seers' Village pub about the pungent pot.", pungentPot); + talkToPoisonSalesman2.addDialogStep("I have this pot I found at the murder scene..."); + talkToPoisonSalesman2.addDialogStep("Talk about the Murder Mystery Quest"); + talkToAnna = new NpcStep(this, NpcID.ANNA_SINCLAIR, new WorldPoint(2734, 3575, 0), "Talk to Anna in the mansion about what she used the poison for. Make sure to finish the dialog."); talkToBob = new NpcStep(this, NpcID.BOB_SINCLAIR, new WorldPoint(2748, 3559, 0), "Talk to Bob south of the mansion about what he used the poison for. Make sure to finish the dialog."); talkToFrank = new NpcStep(this, NpcID.FRANK_SINCLAIR, new WorldPoint(2742, 3577, 0), "Talk to Frank in the mansion about what he used the poison for. Make sure to finish the dialog."); @@ -471,7 +537,7 @@ public void setupSteps() searchBob = new ObjectStep(this, ObjectID.MURDERHIVE, new WorldPoint(2730, 3559, 0), "Search the beehive south west of the mansion. If a dialog box doesn't come up, go back to Bob to ask about poison, and COMPLETE THE DIALOG."); searchCarol = new ObjectStep(this, ObjectID.MURDERDRAIN, new WorldPoint(2736, 3573, 0), "Search the drain south of the mansion. If a dialog box doesn't come up, go back to Carol to ask about poison, and COMPLETE THE DIALOG."); searchDavid = new ConditionalStep(this, goUpstairs, "Search the spider's nest, upstairs in the mansion to the south. If a dialog box doesn't come up, go back to David to ask about poison, and COMPLETE THE DIALOG."); - ((ConditionalStep)searchDavid).addStep(isUpstairs, new ObjectStep(this, ObjectID.MURDERWEB, new WorldPoint(2740, 3574, 1), "")); + ((ConditionalStep) searchDavid).addStep(isUpstairs, new ObjectStep(this, ObjectID.MURDERWEB, new WorldPoint(2740, 3574, 1), "")); searchElizabeth = new ObjectStep(this, ObjectID.MURDERFOUNTAIN, new WorldPoint(2747, 3563, 0), "Search the fountain south east of the mansion. If a dialog box doesn't come up, go back to Elizabeth to ask about poison, and COMPLETE THE DIALOG."); searchFrank = new ObjectStep(this, ObjectID.MURDERSIGN, new WorldPoint(2746, 3573, 0), "Search the family crest attached to the south side of the mansion to the east. If a dialog box doesn't come up, go back to Frank to ask about poison, and COMPLETE THE DIALOG."); @@ -485,74 +551,74 @@ public void setupSteps() remainingSteps.addDialogStep("I know who did it!"); remainingSteps.setShowInSidebar(false); - useFlour = new ConditionalStep(this, new DetailedQuestStep(this, "")); - useFlour.addStep(new Conditions(elizabethGuilty), useFlourOnNeedle); - useFlour.addStep(new Conditions(annaGuilty), useFlourOnNecklace); - useFlour.addStep(new Conditions(carolGuilty), useFlourOnBottle); - useFlour.addStep(new Conditions(davidGuilty), useFlourOnBook); - useFlour.addStep(new Conditions(frankGuilty), useFlourOnPot); - useFlour.addStep(new Conditions(bobGuilty), useFlourOnCup); - useFlourSidebar = new DetailedQuestStep(this, "Use flour on the suspect's item."); - useFlourSidebar.addSubSteps(useFlourOnNeedle, useFlourOnNecklace, useFlourOnBottle, useFlourOnBook, useFlourOnPot, useFlourOnCup); - - searchBarrel = new ConditionalStep(this, new DetailedQuestStep(this, "")); - searchBarrel.addStep(new Conditions(elizabethGuilty), searchElizabethsBarrel); - searchBarrel.addStep(new Conditions(annaGuilty), searchAnnasBarrel); - searchBarrel.addStep(new Conditions(carolGuilty), searchCarolsBarrel); - searchBarrel.addStep(new Conditions(davidGuilty), searchDavidsBarrel); - searchBarrel.addStep(new Conditions(frankGuilty), searchFranksBarrel); - searchBarrel.addStep(new Conditions(bobGuilty), searchBobsBarrel); - searchBarrelSidebar = new DetailedQuestStep(this, "Search the suspect's barrel."); - searchBarrelSidebar.addSubSteps(searchElizabethsBarrel, searchAnnasBarrel, searchCarolsBarrel, searchDavidsBarrel, searchFranksBarrel, searchBobsBarrel); - - useFlypaper = new ConditionalStep(this, new DetailedQuestStep(this, "")); - useFlypaper.addStep(new Conditions(elizabethGuilty), useFlypaperOnNeedle); - useFlypaper.addStep(new Conditions(annaGuilty), useFlypaperOnNecklace); - useFlypaper.addStep(new Conditions(carolGuilty), useFlypaperOnBottle); - useFlypaper.addStep(new Conditions(davidGuilty), useFlypaperOnBook); - useFlypaper.addStep(new Conditions(frankGuilty), useFlypaperOnPot); - useFlypaper.addStep(new Conditions(bobGuilty), useFlypaperOnCup); - useFlypaperSidebar = new DetailedQuestStep(this, "Use flypaper on the floured item."); - useFlypaperSidebar.addSubSteps(useFlypaperOnNeedle, useFlypaperOnNecklace, useFlypaperOnBottle, useFlypaperOnBook, useFlypaperOnPot, useFlypaperOnCup); - - comparePrints = new ConditionalStep(this, new DetailedQuestStep(this, "")); - comparePrints.addStep(new Conditions(annaGuilty), compareAnna); - comparePrints.addStep(new Conditions(bobGuilty), compareBob); - comparePrints.addStep(new Conditions(carolGuilty), compareCarol); - comparePrints.addStep(new Conditions(davidGuilty), compareDavid); - comparePrints.addStep(new Conditions(elizabethGuilty), compareElizabeth); - comparePrints.addStep(new Conditions(frankGuilty), compareFrank); - comparePrintsSidebar = new DetailedQuestStep(this, "Compare the suspect's prints to the unknown prints."); - comparePrintsSidebar.addSubSteps(compareAnna, compareBob, compareCarol, compareDavid, compareElizabeth, compareFrank); - - talkToSuspect = new ConditionalStep(this, new DetailedQuestStep(this, "")); - talkToSuspect.addStep(new Conditions(elizabethGuilty), talkToElizabeth); - talkToSuspect.addStep(new Conditions(carolGuilty), talkToCarol); - talkToSuspect.addStep(new Conditions(davidGuilty), talkToDavid); - talkToSuspect.addStep(new Conditions(frankGuilty), talkToFrank); - talkToSuspect.addStep(new Conditions(bobGuilty), talkToBob); - talkToSuspect.addStep(new Conditions(annaGuilty), talkToAnna); + var useFlourFallback = new DetailedQuestStep(this, "Use flour on the suspect's item."); + useFlour = new ConditionalStep(this, useFlourFallback); + useFlour.setShouldPassthroughText(true); + useFlour.addStep(elizabethGuilty, useFlourOnNeedle); + useFlour.addStep(annaGuilty, useFlourOnNecklace); + useFlour.addStep(carolGuilty, useFlourOnBottle); + useFlour.addStep(davidGuilty, useFlourOnBook); + useFlour.addStep(frankGuilty, useFlourOnPot); + useFlour.addStep(bobGuilty, useFlourOnCup); + + var searchBarrelFallback = new DetailedQuestStep(this, "Search the suspect's barrel."); + searchBarrel = new ConditionalStep(this, searchBarrelFallback); + searchBarrel.setShouldPassthroughText(true); + searchBarrel.addStep(elizabethGuilty, searchElizabethsBarrel); + searchBarrel.addStep(annaGuilty, searchAnnasBarrel); + searchBarrel.addStep(carolGuilty, searchCarolsBarrel); + searchBarrel.addStep(davidGuilty, searchDavidsBarrel); + searchBarrel.addStep(frankGuilty, searchFranksBarrel); + searchBarrel.addStep(bobGuilty, searchBobsBarrel); + + var useFlypaperFallback = new DetailedQuestStep(this, "Use flypaper on the suspect's item."); + useFlypaper = new ConditionalStep(this, useFlypaperFallback); + useFlypaper.setShouldPassthroughText(true); + useFlypaper.addStep(elizabethGuilty, useFlypaperOnNeedle); + useFlypaper.addStep(annaGuilty, useFlypaperOnNecklace); + useFlypaper.addStep(carolGuilty, useFlypaperOnBottle); + useFlypaper.addStep(davidGuilty, useFlypaperOnBook); + useFlypaper.addStep(frankGuilty, useFlypaperOnPot); + useFlypaper.addStep(bobGuilty, useFlypaperOnCup); + + var comparePrintsFallback = new DetailedQuestStep(this, "Compare prints with the suspect."); + comparePrints = new ConditionalStep(this, comparePrintsFallback); + comparePrints.setShouldPassthroughText(true); + comparePrints.addStep(annaGuilty, compareAnna); + comparePrints.addStep(bobGuilty, compareBob); + comparePrints.addStep(carolGuilty, compareCarol); + comparePrints.addStep(davidGuilty, compareDavid); + comparePrints.addStep(elizabethGuilty, compareElizabeth); + comparePrints.addStep(frankGuilty, compareFrank); + + var talkToSuspectFallback = new DetailedQuestStep(this, "Talk to the suspect."); + talkToSuspect = new ConditionalStep(this, talkToSuspectFallback); + talkToSuspect.setShouldPassthroughText(true); + talkToSuspect.addStep(elizabethGuilty, talkToElizabeth); + talkToSuspect.addStep(carolGuilty, talkToCarol); + talkToSuspect.addStep(davidGuilty, talkToDavid); + talkToSuspect.addStep(frankGuilty, talkToFrank); + talkToSuspect.addStep(bobGuilty, talkToBob); + talkToSuspect.addStep(annaGuilty, talkToAnna); talkToSuspect.addDialogStep("Why'd you buy poison the other day?"); - talkToSuspectSidebar = new DetailedQuestStep(this, "Talk to the suspect."); - talkToSuspectSidebar.addSubSteps(talkToElizabeth, talkToCarol, talkToDavid, talkToFrank, talkToBob, talkToAnna); - - searchSuspectItem = new ConditionalStep(this, new DetailedQuestStep(this, "")); - searchSuspectItem.addStep(new Conditions(elizabethGuilty), searchElizabeth); - searchSuspectItem.addStep(new Conditions(carolGuilty), searchCarol); - searchSuspectItem.addStep(new Conditions(davidGuilty), searchDavid); - searchSuspectItem.addStep(new Conditions(frankGuilty), searchFrank); - searchSuspectItem.addStep(new Conditions(bobGuilty), searchBob); - searchSuspectItem.addStep(new Conditions(annaGuilty), searchAnna); - searchSuspectItemSidebar = new DetailedQuestStep(this, "Disprove the suspect's alibi by checking the thing they claimed to clean."); - searchSuspectItemSidebar.addSubSteps(searchElizabeth, searchCarol, searchDavid, searchFrank, searchBob, searchAnna); + + var searchSuspectItemFallback = new DetailedQuestStep(this, "Disprove the suspect's alibi by checking the thing they claimed to clean."); + searchSuspectItem = new ConditionalStep(this, searchSuspectItemFallback); + searchSuspectItem.setShouldPassthroughText(true); + searchSuspectItem.addStep(elizabethGuilty, searchElizabeth); + searchSuspectItem.addStep(carolGuilty, searchCarol); + searchSuspectItem.addStep(davidGuilty, searchDavid); + searchSuspectItem.addStep(frankGuilty, searchFrank); + searchSuspectItem.addStep(bobGuilty, searchBob); + searchSuspectItem.addStep(annaGuilty, searchAnna); } @Override public List getItemRequirements() { - ArrayList required = new ArrayList<>(); - required.add(pot); - return required; + return List.of( + pot + ); } @Override @@ -564,25 +630,57 @@ public QuestPointReward getQuestPointReward() @Override public List getExperienceRewards() { - return Collections.singletonList(new ExperienceReward(Skill.CRAFTING, 1406)); + return List.of( + new ExperienceReward(Skill.CRAFTING, 1406) + ); } @Override public List getItemRewards() { - return Collections.singletonList(new ItemReward("Coins", ItemID.COINS, 2000)); + return List.of( + new ItemReward("Coins", ItemID.COINS, 2000) + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); + var allSteps = new ArrayList(); + + allSteps.add(new PanelDetails("Go to the Sinclair Manor", List.of( + talkToGuard + ), List.of( + pot + ))); + + allSteps.add(new PanelDetails("Collect evidence", List.of( + searchWindowForThread, + pickUpPungentPot, + pickUpDagger + ))); + + allSteps.add(new PanelDetails("Collect fingerprints", List.of( + collectTwoFlypaper, + searchBarrel, + fillPotWithFlour, + useFlourOnDagger, + useFlypaperOnDagger, + fillPotWithFlourForSilver, + useFlour, + useFlypaper, + comparePrints + ))); + + allSteps.add(new PanelDetails("Finishing off", List.of( + talkToGossip, + talkToPoisonSalesman, + talkToPoisonSalesman2, + talkToSuspect, + searchSuspectItem, + finishQuest + ))); - allSteps.add(new PanelDetails("Go to the Sinclair Manor", Collections.singletonList(talkToGuard), pot)); - allSteps.add(new PanelDetails("Collect evidence", Arrays.asList(pickUpPungentPot, pickUpDagger, searchWindowForThread))); - allSteps.add(new PanelDetails("Collect fingerprints", Arrays.asList(collectTwoFlypaper, searchBarrelSidebar, fillPotWithFlour, - useFlourOnDagger, useFlypaperOnDagger, fillPotWithFlourForSilver, useFlourSidebar, useFlypaperSidebar, comparePrintsSidebar))); - allSteps.add(new PanelDetails("Finishing off", Arrays.asList(talkToGossip, talkToPoisonSalesman, talkToSuspectSidebar, searchSuspectItemSidebar, finishQuest))); return allSteps; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/myarmsbigadventure/AddCompost.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/myarmsbigadventure/AddCompost.java index 559534663a3..6471f2b3274 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/myarmsbigadventure/AddCompost.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/myarmsbigadventure/AddCompost.java @@ -31,6 +31,7 @@ import net.runelite.api.events.GameTick; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; import java.util.Arrays; @@ -56,7 +57,7 @@ public void onGameTick(GameTick event) protected void updateSteps() { - int numCompToAdd = 7 - client.getVarbitValue(2792); + int numCompToAdd = 7 - client.getVarbitValue(VarbitID.MYARM_SUPERCOMPOST); compost.setQuantity(numCompToAdd); this.setRequirements(Arrays.asList(compost, spade)); this.setText("Add " + numCompToAdd + " supercompost on My Arm's soil patch."); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/myarmsbigadventure/AddDung.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/myarmsbigadventure/AddDung.java index cf1a4189010..a2693749cdd 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/myarmsbigadventure/AddDung.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/myarmsbigadventure/AddDung.java @@ -7,6 +7,7 @@ import net.runelite.api.events.GameTick; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; import java.util.Arrays; @@ -32,7 +33,7 @@ public void onGameTick(GameTick event) protected void updateSteps() { - int numCompToAdd = 3 - client.getVarbitValue(2791); + int numCompToAdd = 3 - client.getVarbitValue(VarbitID.MYARM_DUNG); dung.setQuantity(numCompToAdd); this.setRequirements(Arrays.asList(dung, spade)); this.setText("Add " + numCompToAdd + " ugthanki dung on My Arm's soil patch."); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/myarmsbigadventure/MyArmsBigAdventure.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/myarmsbigadventure/MyArmsBigAdventure.java index 206015cfd52..99b248acbe7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/myarmsbigadventure/MyArmsBigAdventure.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/myarmsbigadventure/MyArmsBigAdventure.java @@ -279,15 +279,15 @@ public void setupConditions() inPrison = new ZoneRequirement(prison); onRoof = new ZoneRequirement(roof); - added3Dung = new VarbitRequirement(2791, 3); - added7Comp = new VarbitRequirement(2792, 7); + added3Dung = new VarbitRequirement(VarbitID.MYARM_DUNG, 3); + added7Comp = new VarbitRequirement(VarbitID.MYARM_SUPERCOMPOST, 7); - givenHardy = new VarbitRequirement(2794, 1); - usedRake = new VarbitRequirement(2799, 6); - givenCompost = new VarbitRequirement(2799, 7); + givenHardy = new VarbitRequirement(VarbitID.MYARM_TUBERS, 1); + usedRake = new VarbitRequirement(VarbitID.MYARM_FAKEPATCH, 6); + givenCompost = new VarbitRequirement(VarbitID.MYARM_FAKEPATCH, 7); givenDibber = new VarbitRequirement(VarbitID.MYARM_FAKEPATCH, 9, Operation.GREATER_EQUAL); - givenCure = new VarbitRequirement(2798, 1); + givenCure = new VarbitRequirement(VarbitID.MYARM_BARNABYSWAP, 1); hasRakeHeadAndHandle = new Conditions(rakeHead, rakeHandle); rakeHeadNearby = new ItemOnTileRequirement(rakeHead); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/observatoryquest/ObservatoryQuest.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/observatoryquest/ObservatoryQuest.java index 25ce672c7d4..3047f4d70f7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/observatoryquest/ObservatoryQuest.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/observatoryquest/ObservatoryQuest.java @@ -40,11 +40,12 @@ import net.runelite.client.plugins.microbot.questhelper.rewards.UnlockReward; import net.runelite.client.plugins.microbot.questhelper.steps.*; import net.runelite.api.Skill; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.SpriteID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -136,11 +137,11 @@ public void setupConditions() // Started quest // 3828 = 9 // 3827 = 1 - usedKey = new VarbitRequirement(3826, 1); + usedKey = new VarbitRequirement(VarbitID.OBSERVATORY_GATELOCK, 1); sleepingGuardNearby = new NpcCondition(NpcID.QIP_OBS_GOBLIN_GUARD); - hasMould = new VarbitRequirement(3837, 1); + hasMould = new VarbitRequirement(VarbitID.OBSERVATORY_MOULD_PRES, 1); // Watched cutscene, 3838 = 1 - lookedThroughTelescope = new VarbitRequirement(3836, 1); + lookedThroughTelescope = new VarbitRequirement(VarbitID.OBSERVATORY_SCOPELOOKED, 1); } @Override @@ -176,10 +177,10 @@ public void setupSteps() prodGuard = new NpcStep(this, NpcID.QIP_OBS_GOBLIN_GUARD, new WorldPoint(2327, 9394, 0), "Prod the sleeping guard in the north of the dungeon. He'll attack you. You need to then either kill him," + " or get him in the marked spot to the north of the gate."); - prodGuard.addTileMarker(new WorldPoint(2327, 9399, 0), SpriteID.BARBARIAN_ASSAULT_HORN_FOR_HEALER_ICON); + prodGuard.addTileMarker(new WorldPoint(2327, 9399, 0), SpriteID.BarbassaultIcons.HORN_FOR_HEALER); inspectStove = new ObjectStep(this, ObjectID.QIP_OBS_DUNGEON_STOVE_TOP_MULTI, new WorldPoint(2327, 9389, 0), "Either kill or trap the guard on the marked tile to the north, then search the goblin stove."); - inspectStove.addTileMarker(new WorldPoint(2327, 9399, 0), SpriteID.BARBARIAN_ASSAULT_HORN_FOR_HEALER_ICON); + inspectStove.addTileMarker(new WorldPoint(2327, 9399, 0), SpriteID.BarbassaultIcons.HORN_FOR_HEALER); leaveDungeon = new ObjectStep(this, ObjectID.QIP_OBS_STAIRS1_DUNGEON, new WorldPoint(2355, 9396, 0), "Climb the stairs back to the surface."); giveProfessorMould = new NpcStep(this, NpcID.OBSERVATORY_PROFESSOR, new WorldPoint(2442, 3186, 0), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/observatoryquest/StarSignAnswer.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/observatoryquest/StarSignAnswer.java index ef165b16239..b83582651d7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/observatoryquest/StarSignAnswer.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/observatoryquest/StarSignAnswer.java @@ -30,6 +30,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.VarbitChanged; import net.runelite.api.gameval.NpcID; +import net.runelite.api.gameval.VarbitID; import java.util.HashMap; @@ -79,7 +80,7 @@ private void updateCorrectChoice() return; } - int newValue = client.getVarbitValue(3828); + int newValue = client.getVarbitValue(VarbitID.OBSERVATORY_STARSIGN); if (currentValue != newValue) { currentValue = newValue; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/olafsquest/OlafsQuest.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/olafsquest/OlafsQuest.java index bf475122d86..6253eab3a07 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/olafsquest/OlafsQuest.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/olafsquest/OlafsQuest.java @@ -188,13 +188,13 @@ public void setupConditions() puzzleOpen = new WidgetModelRequirement(253, 0, 24126); hasBarrel3Ropes = new Conditions(rottenBarrel, ropes3); has2Barrels6Ropes = new Conditions(rottenBarrels2, ropes6); - placedBarrel1 = new VarbitRequirement(3547, 1); - placedBarrel2 = new VarbitRequirement(3548, 1); + placedBarrel1 = new VarbitRequirement(VarbitID.OLAF2_WALKWAY_1, 1); + placedBarrel2 = new VarbitRequirement(VarbitID.OLAF2_WALKWAY_2, 1); keyInterfaceOpen = new WidgetModelRequirement(252, 0, 24124); ulfricNearby = new NpcCondition(NpcID.OLAF2_ULFRIC); - killedUlfric = new VarbitRequirement(3539, 1); + killedUlfric = new VarbitRequirement(VarbitID.OLAF2_KILLED_ULFRIC, 1); } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/olafsquest/PaintingWall.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/olafsquest/PaintingWall.java index bf3367fc2ff..61b27dbf862 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/olafsquest/PaintingWall.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/olafsquest/PaintingWall.java @@ -5,6 +5,7 @@ import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; import net.runelite.api.events.GameTick; import net.runelite.api.gameval.InterfaceID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.widgets.Widget; import net.runelite.client.eventbus.Subscribe; @@ -12,11 +13,6 @@ public class PaintingWall extends QuestStep { - private final int RIGHT_VARBIT = 3541; - private final int BOTTOM_VARBIT = 3542; - private final int LEFT_VARBIT = 3543; - private final int TOP_VARBIT = 3544; - private int highlightWidget = -1; int rightPiece, bottomPiece, leftPiece, topPiece; @@ -40,10 +36,10 @@ public void onGameTick(GameTick event) private void updateSolvedPositionState() { - rightPiece = client.getVarbitValue(RIGHT_VARBIT); - bottomPiece = client.getVarbitValue(BOTTOM_VARBIT); - leftPiece = client.getVarbitValue(LEFT_VARBIT); - topPiece = client.getVarbitValue(TOP_VARBIT); + rightPiece = client.getVarbitValue(VarbitID.OLAF2_GATE_DISK_1); + bottomPiece = client.getVarbitValue(VarbitID.OLAF2_GATE_DISK_2); + leftPiece = client.getVarbitValue(VarbitID.OLAF2_GATE_DISK_3); + topPiece = client.getVarbitValue(VarbitID.OLAF2_GATE_DISK_4); if (rightPiece != 4) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/onesmallfavour/OneSmallFavour.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/onesmallfavour/OneSmallFavour.java index 9e0ab0cefc6..0df7c60826e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/onesmallfavour/OneSmallFavour.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/onesmallfavour/OneSmallFavour.java @@ -48,6 +48,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -467,27 +468,27 @@ public void setupConditions() inDwarvenMine = new ZoneRequirement(dwarvenMine); inGoblinCave = new ZoneRequirement(goblinCave); - lamp1Empty = new VarbitRequirement(6225, 1); - lamp2Empty = new VarbitRequirement(6226, 1); - lamp3Empty = new VarbitRequirement(6227, 1); - lamp4Empty = new VarbitRequirement(6228, 1); - lamp5Empty = new VarbitRequirement(6229, 1); - lamp6Empty = new VarbitRequirement(6230, 1); - lamp7Empty = new VarbitRequirement(6231, 1); - lamp8Empty = new VarbitRequirement(6232, 1); + lamp1Empty = new VarbitRequirement(VarbitID.JADELIGHT1_TAKEN, 1); + lamp2Empty = new VarbitRequirement(VarbitID.TOPAZLIGHT1_TAKEN, 1); + lamp3Empty = new VarbitRequirement(VarbitID.OPALLIGHT1_TAKEN, 1); + lamp4Empty = new VarbitRequirement(VarbitID.SAPPHIRELIGHT1_TAKEN, 1); + lamp5Empty = new VarbitRequirement(VarbitID.JADELIGHT2_TAKEN, 1); + lamp6Empty = new VarbitRequirement(VarbitID.TOPAZLIGHT2_TAKEN, 1); + lamp7Empty = new VarbitRequirement(VarbitID.OPALLIGHT2_TAKEN, 1); + lamp8Empty = new VarbitRequirement(VarbitID.SAPPHIRELIGHT2_TAKEN, 1); - allEmpty = new VarbitRequirement(244, 255); + allEmpty = new VarbitRequirement(VarbitID.CHECKLANDINGLIGHTS, 255); - lamp1Full = new VarbitRequirement(6233, 1); - lamp2Full = new VarbitRequirement(6234, 1); - lamp3Full = new VarbitRequirement(6235, 1); - lamp4Full = new VarbitRequirement(6236, 1); - lamp5Full = new VarbitRequirement(6237, 1); - lamp6Full = new VarbitRequirement(6238, 1); - lamp7Full = new VarbitRequirement(6239, 1); - lamp8Full = new VarbitRequirement(6240, 1); + lamp1Full = new VarbitRequirement(VarbitID.JADELIGHT1_FIXED, 1); + lamp2Full = new VarbitRequirement(VarbitID.TOPAZLIGHT1_FIXED, 1); + lamp3Full = new VarbitRequirement(VarbitID.OPALLIGHT1_FIXED, 1); + lamp4Full = new VarbitRequirement(VarbitID.SAPPHIRELIGHT1_FIXED, 1); + lamp5Full = new VarbitRequirement(VarbitID.JADELIGHT2_FIXED, 1); + lamp6Full = new VarbitRequirement(VarbitID.TOPAZLIGHT2_FIXED, 1); + lamp7Full = new VarbitRequirement(VarbitID.OPALLIGHT2_FIXED, 1); + lamp8Full = new VarbitRequirement(VarbitID.SAPPHIRELIGHT2_FIXED, 1); - allFull = new VarbitRequirement(6241, 255); + allFull = new VarbitRequirement(VarbitID.FIXEDLANDINGLIGHTS, 255); slagilithNearby = new NpcCondition(NpcID.SLAGILITH); inScrollSpot = new ZoneRequirement(scrollSpot); @@ -496,9 +497,9 @@ public void setupConditions() petraNearby = new NpcCondition(NpcID.FAVOUR_PETRA); - addedOrnaments = new VarbitRequirement(255, 1); - addedDirectionals = new VarbitRequirement(254, 1); - addedWeathervanePillar = new VarbitRequirement(253, 1); + addedOrnaments = new VarbitRequirement(VarbitID.ORNAMENTFIXED, 1); + addedDirectionals = new VarbitRequirement(VarbitID.DIRECTIONALSFIXED, 1); + addedWeathervanePillar = new VarbitRequirement(VarbitID.ROTATINGPILLARFIXED, 1); hasOrUsedDirectionals = new Conditions(LogicType.OR, addedDirectionals, directionals.alsoCheckBank(questBank)); hasOrUsedOrnament = new Conditions(LogicType.OR, addedOrnaments, ornament.alsoCheckBank(questBank)); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/perilousmoon/PerilousMoon.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/perilousmoon/PerilousMoon.java index b8d6317df8a..ddd6df33568 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/perilousmoon/PerilousMoon.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/perilousmoon/PerilousMoon.java @@ -37,7 +37,6 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.player.FreeInventorySlotRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.player.SkillRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.quest.QuestRequirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.util.Operation; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; @@ -120,7 +119,7 @@ public Map loadSteps() steps.put(4, returnToAttala); ConditionalStep goTalkToJess = new ConditionalStep(this, enterCamTorum); - goTalkToJess.addStep(LogicHelper.and(inCamTorum), talkToJessamine); + goTalkToJess.addStep(and(inCamTorum), talkToJessamine); steps.put(5, goTalkToJess); // 5->6 when entered cam torum // 9826 0->1, probably builders going @@ -198,7 +197,7 @@ public Map loadSteps() getItemsWhenInStream.addStep(and(hadPaste, hadScales), getHunterSupplies); getItemsWhenInStream.addStep(and(hadPaste, bream), useKnifeOnBream); getItemsWhenInStream.addStep(and(hadPaste, bigFishingNet), fishBream); - getItemsWhenInStream.addStep(LogicHelper.and(hadPaste), getFishingSupplies); + getItemsWhenInStream.addStep(and(hadPaste), getFishingSupplies); getItemsWhenInStream.addStep(and(pestleAndMortar, moonlightGrub), useGrubOnPestle); getItemsWhenInStream.addStep(and(pestleAndMortar), collectGrub); @@ -322,11 +321,11 @@ protected void setupRequirements() private void setupConditions() { - talkedToBuilders = new VarbitRequirement(9824, 1); + talkedToBuilders = new VarbitRequirement(VarbitID.PMOON_RUIN_DIALOGUE, 1); inCamTorum = new ZoneRequirement(camTorum); inAntechamber = new ZoneRequirement(antechamber); - talkedToAttalaInNey = new VarbitRequirement(9823, 1); - talkedToZumaInNey = new VarbitRequirement(9823, 2); + talkedToAttalaInNey = new VarbitRequirement(VarbitID.PMOON_MURALS_INSPECTED, 1); + talkedToZumaInNey = new VarbitRequirement(VarbitID.PMOON_MURALS_INSPECTED, 2); // 9826 0->2 // 9827 0->1 (Interrupted by guard to not risk stuff), increments each time, reached 5 @@ -341,9 +340,9 @@ private void setupConditions() bloodMoonRoom, eclipseRoom); // 15064 0->100 - madePrisonCamp = new VarbitRequirement(9820, 1); - madeEarthCamp = new VarbitRequirement(9821, 1); - madeStreamCamp = new VarbitRequirement(9822, 1); + madePrisonCamp = new VarbitRequirement(VarbitID.PMOON_CAMP_1, 1); + madeEarthCamp = new VarbitRequirement(VarbitID.PMOON_CAMP_2, 1); + madeStreamCamp = new VarbitRequirement(VarbitID.PMOON_CAMP_3, 1); // Found eyat // Location: 1525, 9580, 0. 3x3 region for summoning. Directions work for exact row/column @@ -351,8 +350,8 @@ private void setupConditions() // 9825 0->1 eyatlalliNearby = new NpcRequirement(NpcID.PMOON_EYATLALLI_VIS); // icosahedron - trapSetup = or(new VarbitRequirement(9871, 1), new VarbitRequirement(9872, 1), - new VarbitRequirement(9873, 1)); + trapSetup = or(new VarbitRequirement(VarbitID.PMOON_LIZARD_TRAP_SET_1, 1), new VarbitRequirement(VarbitID.PMOON_LIZARD_TRAP_SET_2, 1), + new VarbitRequirement(VarbitID.PMOON_LIZARD_TRAP_SET_3, 1)); lizardNearby = new ItemOnTileRequirement(ItemID.RAW_LIZARD); // 9871/2/3 for traps, 0->1 @@ -375,9 +374,9 @@ private void setupConditions() // Varp 4150 0->1 blood moon ded - defeatedBloodMoon = new VarbitRequirement(9858, 1); - defeatedBlueMoon = new VarbitRequirement(9859, 1); - defeatedEclipseMoon = new VarbitRequirement(9860, 1); + defeatedBloodMoon = new VarbitRequirement(VarbitID.PMOON_BOSS_BLOOD_DEAD, 1); + defeatedBlueMoon = new VarbitRequirement(VarbitID.PMOON_BOSS_BLUE_DEAD, 1); + defeatedEclipseMoon = new VarbitRequirement(VarbitID.PMOON_BOSS_ECLIPSE_DEAD, 1); } private void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/piratestreasure/PiratesTreasure.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/piratestreasure/PiratesTreasure.java index 50f2018ec9e..c3c4b80bb61 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/piratestreasure/PiratesTreasure.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/piratestreasure/PiratesTreasure.java @@ -27,115 +27,159 @@ import net.runelite.client.plugins.microbot.questhelper.collections.ItemCollections; import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; -import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.npc.NpcHintArrowRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DigStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; -import java.util.*; - public class PiratesTreasure extends BasicQuestHelper { - //ItemRequirements - ItemRequirement sixtyCoins, spade, pirateMessage, chestKey; + // Required items + ItemRequirement sixtyCoins; + ItemRequirement spade; + ItemRequirement tenBananas; - private NpcStep speakToRedbeard; + // Recommended items + ItemRequirement teleportVarrock; + ItemRequirement teleportFalador; - private RumSmugglingStep smuggleRum; + // Mid-quest requirements + ItemRequirement pirateMessage; + ItemRequirement chestKey; - private QuestStep readPirateMessage; + // Zones + Zone blueMoonFirst; - private ObjectStep openChest, climbStairs; + // Miscellaneous requirements + ZoneRequirement inBlueMoonFirst; - private QuestStep digUpTreasure; + // Steps + NpcStep speakToRedbeard; - Zone blueMoonFirst; + QuestStep readPirateMessage; - ZoneRequirement inBlueMoonFirst; + RumSmugglingStep smuggleRum; + + ObjectStep openChest; + ObjectStep climbStairs; + + QuestStep digUpTreasure; + NpcStep killGardener; @Override - public Map loadSteps() + protected void setupZones() { - initializeRequirements(); + blueMoonFirst = new Zone(new WorldPoint(3213, 3405, 1), new WorldPoint(3234, 3391, 1)); + } + + @Override + protected void setupRequirements() + { + sixtyCoins = new ItemRequirement("Coins", ItemCollections.COINS, 60); + spade = new ItemRequirement("Spade", ItemID.SPADE).isNotConsumed(); - Map steps = new HashMap<>(); + teleportVarrock = new ItemRequirement("A teleport to Varrock", ItemID.POH_TABLET_VARROCKTELEPORT); + teleportFalador = new ItemRequirement("A teleport to Falador", ItemID.POH_TABLET_FALADORTELEPORT); + tenBananas = new ItemRequirement("Bananas", ItemID.BANANA, 10).canBeObtainedDuringQuest(); + + pirateMessage = new ItemRequirement("Pirate message", ItemID.PIRATEMESSAGE); + chestKey = new ItemRequirement("Chest key", ItemID.CHEST_KEY); + chestKey.setTooltip("You can get another one from Redbeard Frank"); + inBlueMoonFirst = new ZoneRequirement(blueMoonFirst); + } + + private void setupSteps() + { speakToRedbeard = new NpcStep(this, NpcID.REDBEARD_FRANK, new WorldPoint(3053, 3251, 0), "Talk to Redbeard Frank in Port Sarim."); speakToRedbeard.addDialogSteps("I'm in search of treasure.", "Yes."); - steps.put(0, speakToRedbeard); - smuggleRum = new RumSmugglingStep(this); + readPirateMessage = new DetailedQuestStep(this, "Read the Pirate message.", pirateMessage.highlighted()); - steps.put(1, smuggleRum); - readPirateMessage = new DetailedQuestStep(this, "Read the Pirate message.", pirateMessage.highlighted()); - climbStairs = new ObjectStep(this, ObjectID.FAI_VARROCK_STAIRS, new WorldPoint(3228, 3393, 0), - "Climb up the stairs in The Blue Moon Inn in Varrock."); - openChest = new ObjectStep(this, ObjectID.PIRATECHEST, new WorldPoint(3219, 3396, 1), - "Open the chest by using the key on it.", chestKey.highlighted()); + climbStairs = new ObjectStep(this, ObjectID.FAI_VARROCK_STAIRS, new WorldPoint(3228, 3393, 0), "Climb up the stairs in The Blue Moon Inn in Varrock.", chestKey); + climbStairs.addTeleport(teleportVarrock); + openChest = new ObjectStep(this, ObjectID.PIRATECHEST, new WorldPoint(3219, 3396, 1), "Open the chest by using the key on it.", chestKey.highlighted()); openChest.addDialogStep("Ok thanks, I'll go and get it."); openChest.addIcon(ItemID.CHEST_KEY); - blueMoonFirst = new Zone(new WorldPoint(3213, 3405, 1), new WorldPoint(3234, 3391, 1)); - inBlueMoonFirst = new ZoneRequirement(blueMoonFirst); + smuggleRum = new RumSmugglingStep(this); + + digUpTreasure = new DigStep(this, new WorldPoint(2999, 3383, 0), "Dig in the middle of the cross in Falador Park, and kill the Gardener (level 4) who appears. Once killed, dig again."); + // TODO: Add a teleport to DigStep + + killGardener = new NpcStep(this, NpcID.PIRATE_IRATE_GARDENER, new WorldPoint(2999, 3383, 0), "Kill the Gardener (level 4)."); + digUpTreasure.addSubSteps(killGardener); + } + + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + steps.put(0, speakToRedbeard); + + steps.put(1, smuggleRum); - ConditionalStep getTreasureMap = new ConditionalStep(this, climbStairs); - getTreasureMap.addStep(new Conditions(chestKey, inBlueMoonFirst), openChest); + var getTreasureMap = new ConditionalStep(this, climbStairs); getTreasureMap.addStep(pirateMessage, readPirateMessage); + getTreasureMap.addStep(inBlueMoonFirst, openChest); steps.put(2, getTreasureMap); - digUpTreasure = new DigStep(this, new WorldPoint(2999, 3383, 0), - "Dig in the middle of the cross in Falador Park, and kill the Gardener (level 4) who appears. Once killed, dig again."); + var cDigUpTreasure = new ConditionalStep(this, digUpTreasure); + cDigUpTreasure.addStep(new NpcHintArrowRequirement(NpcID.PIRATE_IRATE_GARDENER), killGardener); + steps.put(3, cDigUpTreasure); - steps.put(3, digUpTreasure); return steps; } - @Override - protected void setupRequirements() - { - sixtyCoins = new ItemRequirement("Coins", ItemCollections.COINS, 60); - spade = new ItemRequirement("Spade", ItemID.SPADE).isNotConsumed(); - pirateMessage = new ItemRequirement("Pirate message", ItemID.PIRATEMESSAGE); - chestKey = new ItemRequirement("Chest key", ItemID.CHEST_KEY); - chestKey.setTooltip("You can get another one from Redbeard Frank"); - } - @Override public List getItemRequirements() { - ArrayList reqs = new ArrayList<>(); - reqs.add(sixtyCoins); - reqs.add(spade); - - return reqs; + return List.of( + sixtyCoins, + spade, + tenBananas + ); } @Override public List getItemRecommended() { - ArrayList reqs = new ArrayList<>(); - reqs.add(new ItemRequirement("A teleport to Varrock", ItemID.POH_TABLET_VARROCKTELEPORT)); - reqs.add(new ItemRequirement("A teleport to Falador", ItemID.POH_TABLET_FALADORTELEPORT)); - reqs.add(new ItemRequirement("Bananas (obtainable in quest)", ItemID.BANANA, 10)); - - return reqs; + return List.of( + teleportVarrock, + teleportFalador + ); } @Override public List getCombatRequirements() { - return Collections.singletonList("Gardener (level 4)"); + return List.of( + "Gardener (level 4)" + ); } @Override @@ -147,22 +191,35 @@ public QuestPointReward getQuestPointReward() @Override public List getItemRewards() { - return Arrays.asList( - new ItemReward("A Gold Ring", ItemID.GOLD_RING, 1), - new ItemReward("An Emerald", ItemID.EMERALD, 1), - new ItemReward("Coins", ItemID.COINS, 450)); + return List.of( + new ItemReward("A Gold Ring", ItemID.GOLD_RING, 1), + new ItemReward("An Emerald", ItemID.EMERALD, 1), + new ItemReward("Coins", ItemID.COINS, 450) + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); - - allSteps.add(new PanelDetails("Talk to Redbeard Frank", Collections.singletonList(speakToRedbeard), sixtyCoins)); - allSteps.addAll(smuggleRum.panelDetails()); - allSteps.add(new PanelDetails("Discover the treasure", Arrays.asList(climbStairs, openChest, readPirateMessage, - digUpTreasure), spade)); - - return allSteps; + var sections = new ArrayList(); + + sections.add(new PanelDetails("Talk to Redbeard Frank", List.of( + speakToRedbeard + ), List.of( + sixtyCoins + ))); + + sections.addAll(smuggleRum.panelDetails()); + + sections.add(new PanelDetails("Discover the treasure", List.of( + climbStairs, + openChest, + readPirateMessage, + digUpTreasure + ), List.of( + spade + ))); + + return sections; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/piratestreasure/RumSmugglingStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/piratestreasure/RumSmugglingStep.java index faafa6e5a28..b4952501757 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/piratestreasure/RumSmugglingStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/piratestreasure/RumSmugglingStep.java @@ -26,35 +26,46 @@ import net.runelite.client.plugins.microbot.questhelper.collections.ItemCollections; import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; -import net.runelite.client.plugins.microbot.questhelper.questhelpers.QuestHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.ChatMessageRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.MesBoxRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.npc.DialogRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicType; import net.runelite.client.plugins.microbot.questhelper.requirements.widget.WidgetTextRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.List; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.InterfaceID; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - public class RumSmugglingStep extends ConditionalStep { - private Zone karamjaZone1, karamjaZone2, karamjaBoat; + private final PiratesTreasure pt; + + // Zones + private Zone karamjaZone1; + private Zone karamjaZone2; + private Zone karamjaBoat; - private ItemRequirement karamjanRum, tenBananas, whiteApron, whiteApronEquipped, whiteApronHanging; + // Miscellaneous requirements + private ZoneRequirement onKaramja; - private Requirement onKaramja; + private ItemRequirement karamjanRum; + private ItemRequirement whiteApron; + private ItemRequirement whiteApronEquipped; + private ItemRequirement whiteApronHanging; private Conditions atStart; private Conditions employed; private Conditions stashedRum; @@ -66,57 +77,34 @@ public class RumSmugglingStep extends ConditionalStep private Conditions filledCrateWithBananasAndRum; private ChatMessageRequirement crateSent; private ChatMessageRequirement fillCrateWithBananasChat; - - private QuestStep talkToCustomsOfficer, getRumFromCrate, getWhiteApron, addBananasToCrate, addRumToCrate, talkToZambo, talkToLuthas, talkToLuthasAgain, goToKaramja, bringRumToRedbeard; - - public RumSmugglingStep(QuestHelper questHelper) + private Requirement haveYouCompletedyourTaskYet; + + // Steps + private QuestStep syncStep; + private QuestStep talkToCustomsOfficer; + private QuestStep getRumFromCrate; + private QuestStep getWhiteApron; + private QuestStep addBananasToCrate; + private QuestStep addRumToCrate; + private QuestStep talkToZambo; + private QuestStep talkToLuthas; + private QuestStep talkToLuthasAgain; + private QuestStep goToKaramja; + private QuestStep bringRumToRedbeard; + private MesBoxRequirement fillCrateBananas; + + public RumSmugglingStep(PiratesTreasure questHelper) { super(questHelper, new DetailedQuestStep(questHelper, "Please open Pirate Treasure's Quest Journal to sync the current quest state.")); - setupItemRequirements(); - setupZones(); - setupConditions(); - setupSteps(); - addSteps(); - } + pt = questHelper; - private void addSteps() - { - this.addStep(new Conditions(hasRumOffKaramja), bringRumToRedbeard); - this.addStep(new Conditions(verifiedAState, haveShippedRum, onKaramja), talkToCustomsOfficer); - this.addStep(new Conditions(verifiedAState, haveShippedRum, whiteApron), getRumFromCrate); - this.addStep(new Conditions(verifiedAState, haveShippedRum), getWhiteApron); - this.addStep(new Conditions(verifiedAState, filledCrateWithBananasAndRum, onKaramja), talkToLuthasAgain); - this.addStep(new Conditions(verifiedAState, stashedRum, onKaramja), addBananasToCrate); - this.addStep(new Conditions(verifiedAState, employed, karamjanRum, onKaramja), addRumToCrate); - this.addStep(new Conditions(verifiedAState, employed, onKaramja), talkToZambo); - this.addStep(new Conditions(verifiedAState, atStart, karamjanRum, onKaramja), talkToLuthas); - this.addStep(new Conditions(verifiedAState, atStart, onKaramja), talkToZambo); - this.addStep(verifiedAState, goToKaramja); - } + syncStep = this.steps.get(null); - @Override - protected void updateSteps() - { - if ((hadRumOffKaramja.check(client) && !hasRumOffKaramja.check(client)) - || lostRum.check(client)) - { - haveShippedRum.setHasPassed(false); - stashedRum.setHasPassed(false); - atStart.setHasPassed(true); - hadRumOffKaramja.setHasPassed(false); - lostRum.setHasPassed(false); - } - - if (crateSent.check(client)) - { - haveShippedRum.check(client); - employed.setHasPassed(false); - fillCrateWithBananasChat.setHasReceivedChatMessage(false); - filledCrateWithBananasAndRum.setHasPassed(false); - crateSent.setHasReceivedChatMessage(false); - } + setupZones(); + setupRequirements(); - super.updateSteps(); + setupSteps(); + addSteps(); } private void setupZones() @@ -126,18 +114,14 @@ private void setupZones() karamjaBoat = new Zone(new WorldPoint(2964, 3138, 0), new WorldPoint(2951, 3144, 1)); } - private void setupItemRequirements() + private void setupRequirements() { karamjanRum = new ItemRequirement("Karamjan rum", ItemID.KARAMJA_RUM); - tenBananas = new ItemRequirement("Banana", ItemID.BANANA, 10); whiteApron = new ItemRequirement("White apron", ItemID.WHITE_APRON); - whiteApronEquipped = new ItemRequirement("White apron", ItemID.WHITE_APRON, 1, true); + whiteApronEquipped = whiteApron.equipped(); whiteApronHanging = new ItemRequirement("White apron", ItemID.PIRATETREASURE_APRON); whiteApronHanging.addAlternates(ItemID.WHITE_APRON); - } - private void setupConditions() - { onKaramja = new ZoneRequirement(karamjaZone1, karamjaZone2, karamjaBoat); Requirement offKaramja = new ZoneRequirement(false, karamjaZone1, karamjaZone2, karamjaBoat); Requirement inPirateTreasureMenu = new WidgetTextRequirement(InterfaceID.Questjournal.TITLE, getQuestHelper().getQuest().getName()); @@ -162,16 +146,20 @@ private void setupConditions() Requirement employedFromDialog = new Conditions(new DialogRequirement("If you could fill it up with bananas, I'll pay you 30 gold.", "Have you completed your task yet?", "you should see the old crate")); employed = new Conditions(true, LogicType.OR, employedFromDialog, employedFromWidget, employedByWydinFromWidget); + // This can't be a dialog requirement because the check function doesn't do the actual checking + haveYouCompletedyourTaskYet = new WidgetTextRequirement(InterfaceID.ChatLeft.TEXT, "Have you completed your task yet?"); + Requirement stashedRumFromWidget = new Conditions(inPirateTreasureMenu, new WidgetTextRequirement(InterfaceID.Questjournal.TEXTLAYER, true, "I have hidden my")); Requirement stashedRumFromDialog = new MesBoxRequirement("You stash the rum in the crate."); Requirement stashedRumFromChat = new Conditions(new ChatMessageRequirement("There is also some rum stashed in here too.", "There's already some rum in here...", "There is some rum in here, although with no bananas to cover it. It is a little obvious.")); stashedRum = new Conditions(true, LogicType.OR, stashedRumFromDialog, stashedRumFromWidget, stashedRumFromChat, employedByWydinFromWidget); - MesBoxRequirement fillCrateBananas = new MesBoxRequirement("You fill the crate with bananas.", "You pack all your bananas into the crate."); - fillCrateBananas.setInvalidateRequirement(new ChatMessageRequirement("Have you completed your task yet?")); + var filledCrateWidget = and(inPirateTreasureMenu, new WidgetTextRequirement(InterfaceID.Questjournal.TEXTLAYER, true, "in the crate and filled it with")); + + fillCrateBananas = new MesBoxRequirement("You fill the crate with bananas.", "You pack all your bananas into the crate."); fillCrateWithBananasChat = new ChatMessageRequirement("The crate is full of bananas.", "The crate is already full."); - Requirement filledCrateWithBananas = new Conditions(false, LogicType.OR, fillCrateWithBananasChat, fillCrateBananas); + Requirement filledCrateWithBananas = new Conditions(false, LogicType.OR, fillCrateWithBananasChat, fillCrateBananas, filledCrateWidget); filledCrateWithBananasAndRum = new Conditions(true, LogicType.AND, filledCrateWithBananas, stashedRum); Requirement shippedRumFromWidget = new Conditions(inPirateTreasureMenu, new WidgetTextRequirement(InterfaceID.Questjournal.TEXTLAYER, true, "the crate has been shipped")); @@ -200,11 +188,11 @@ private void setupSteps() talkToLuthas.addDialogStep("Will you pay me for another crate full?"); addRumToCrate = new ObjectStep(getQuestHelper(), ObjectID.BANANACRATE, new WorldPoint(2943, 3151, 0), - "Put the Karamjan rum into the crate.", karamjanRum.highlighted(), tenBananas); + "Put the Karamjan rum into the crate.", karamjanRum.highlighted(), pt.tenBananas); addRumToCrate.addIcon(ItemID.KARAMJA_RUM); addBananasToCrate = new ObjectStep(getQuestHelper(), ObjectID.BANANACRATE, new WorldPoint(2943, 3151, 0), - "Right-click fill the rest of the crate with bananas, then talk to Luthas.", tenBananas); + "Right-click fill the rest of the crate with bananas, then talk to Luthas.", pt.tenBananas); talkToLuthasAgain = new NpcStep(getQuestHelper(), NpcID.LUTHAS, new WorldPoint(2938, 3154, 0), "Talk to Luthas and tell him you finished filling the crate."); @@ -228,12 +216,78 @@ private void setupSteps() karamjanRum); } - public List panelDetails() + private void addSteps() + { + this.addStep(hasRumOffKaramja, bringRumToRedbeard); + this.addStep(and(verifiedAState, haveShippedRum, onKaramja), talkToCustomsOfficer); + this.addStep(and(verifiedAState, haveShippedRum, whiteApron), getRumFromCrate); + this.addStep(and(verifiedAState, haveShippedRum), getWhiteApron); + this.addStep(and(verifiedAState, filledCrateWithBananasAndRum, onKaramja), talkToLuthasAgain); + this.addStep(and(verifiedAState, stashedRum, onKaramja), addBananasToCrate); + this.addStep(and(verifiedAState, employed, karamjanRum, onKaramja), addRumToCrate); + this.addStep(and(verifiedAState, employed, onKaramja), talkToZambo); + this.addStep(and(verifiedAState, atStart, karamjanRum, onKaramja), talkToLuthas); + this.addStep(and(verifiedAState, atStart, onKaramja), talkToZambo); + this.addStep(verifiedAState, goToKaramja); + } + + @Override + protected void updateSteps() { - List allSteps = new ArrayList<>(); + if (haveYouCompletedyourTaskYet.check(client)) + { + // When talking to Luthas, we've confirmed you have actually not filled up the crate + // with bananas. Reset the checks that mdae us think it was filled up. + // + // This can happen if the user fills the crate up with less than 10 bananas in one go. + fillCrateWithBananasChat.setHasReceivedChatMessage(false); + fillCrateBananas.setHasPassed(false); + filledCrateWithBananasAndRum.setHasPassed(false); + } + + if ((hadRumOffKaramja.check(client) && !hasRumOffKaramja.check(client)) + || lostRum.check(client)) + { + haveShippedRum.setHasPassed(false); + stashedRum.setHasPassed(false); + atStart.setHasPassed(true); + hadRumOffKaramja.setHasPassed(false); + lostRum.setHasPassed(false); + } + + if (crateSent.check(client)) + { + haveShippedRum.check(client); + employed.setHasPassed(false); + fillCrateWithBananasChat.setHasReceivedChatMessage(false); + filledCrateWithBananasAndRum.setHasPassed(false); + crateSent.setHasReceivedChatMessage(false); + } - allSteps.add(new PanelDetails("Rum smuggling", Arrays.asList(goToKaramja, talkToZambo, talkToLuthas, addRumToCrate, addBananasToCrate, talkToLuthas))); - allSteps.add(new PanelDetails("Back to Port Sarim", Arrays.asList(talkToCustomsOfficer, getWhiteApron, getRumFromCrate, bringRumToRedbeard))); - return allSteps; + super.updateSteps(); + } + + public List panelDetails() + { + List sections = new ArrayList<>(); + + sections.add(new PanelDetails("Rum smuggling", List.of( + syncStep, + goToKaramja, + talkToZambo, + talkToLuthas, + addRumToCrate, + addBananasToCrate, + talkToLuthasAgain + ))); + + sections.add(new PanelDetails("Back to Port Sarim", List.of( + talkToCustomsOfficer, + getWhiteApron, + getRumFromCrate, + bringRumToRedbeard + ))); + + return sections; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/plaguecity/PlagueCity.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/plaguecity/PlagueCity.java index fc60ffdf16a..ea5c10ad94c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/plaguecity/PlagueCity.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/plaguecity/PlagueCity.java @@ -26,164 +26,136 @@ import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; -import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.ObjectCondition; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; import net.runelite.client.plugins.microbot.questhelper.rewards.UnlockReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; - -import java.util.*; +import net.runelite.api.gameval.VarbitID; public class PlagueCity extends BasicQuestHelper { - //Items Required - ItemRequirement spade, dwellberries, rope, bucketOfMilk, chocolateDust, snapeGrass, - pictureOfElena, gasMask, book, bucketOfChocolateMilk, hangoverCure, warrant, key; - - //Items Recommended - ItemRequirement fourBucketsOfWater, threeBucketsOfWater, twoBucketsOfWater, bucketOfWater; - - Requirement inUnderground, hasTriedToPullGrill, inWestArdougne, inUpstairsMathasHouse, - inPlagueHouse, inDownstairsOfPlagueHouse, manholeClosed; - - QuestStep talkToEdmond, talkToAlrena, talkToEdmondAgain, useWaterOnMudPatch1, useWaterOnMudPatch2, useWaterOnMudPatch3, useWaterOnMudPatch4, - digHole, grabPictureOfElena, goDownHole, attemptToPullGrill, climbMudPile, talkToEdmondUnderground, useRopeOnGrill, climbThroughPipe, talkToJethick, - enterMarthasHouse, talkToMartha, talkToMilli, goUpstairsInMarthasHouse, tryToEnterPlagueHouse, talkToClerk, talkToBravek, useDustOnMilk, - useSnapeGrassOnChocolateMilk, giveHangoverCureToBravek, talkToBravekAgain, tryToEnterPlagueHouseAgain, searchBarrel, goDownstairsInPlagueHouse, - goUpstairsInPlagueHouse, talkToElena, goUpstairsInPlagueHouseToFinish, goDownManhole, goDownManhole2, climbMudPileToFinish, talkToEdmondToFinish; - - //Zones - Zone underground, westArdougne1, westArdougne2, westArdougne3, upstairsMathasHouse, plagueHouse1, plagueHouse2, downstairsOfPlagueHouse; + // Required items + ItemRequirement spade; + ItemRequirement dwellberries; + ItemRequirement rope; + ItemRequirement bucketOfMilk; + ItemRequirement chocolateDust; + ItemRequirement snapeGrass; + + // Recommended items + ItemRequirement fourBucketsOfWater; + ItemRequirement threeBucketsOfWater; + ItemRequirement twoBucketsOfWater; + ItemRequirement bucketOfWater; + + // Mid-quest requirements + ItemRequirement pictureOfElena; + ItemRequirement gasMask; + ItemRequirement book; + ItemRequirement bucketOfChocolateMilk; + ItemRequirement hangoverCure; + ItemRequirement warrant; + ItemRequirement key; + + // Zones + Zone underground; + Zone westArdougne1; + Zone westArdougne2; + Zone westArdougne3; + Zone upstairsMathasHouse; + Zone plagueHouse1; + Zone plagueHouse2; + Zone downstairsOfPlagueHouse; + + // Miscellaneous requirements + ZoneRequirement inUnderground; + VarbitRequirement hasTriedToPullGrill; + ZoneRequirement inWestArdougne; + ZoneRequirement inUpstairsMathasHouse; + ZoneRequirement inPlagueHouse; + ZoneRequirement inDownstairsOfPlagueHouse; + ObjectCondition manholeClosed; + + // Steps + NpcStep talkToEdmond; + NpcStep talkToAlrena; + DetailedQuestStep grabPictureOfElena; + NpcStep talkToEdmondAgain; + DetailedQuestStep useWaterOnMudPatch1; + DetailedQuestStep useWaterOnMudPatch2; + DetailedQuestStep useWaterOnMudPatch3; + DetailedQuestStep useWaterOnMudPatch4; + ObjectStep digHole; + ObjectStep goDownHole; + ObjectStep attemptToPullGrill; + ObjectStep climbMudPile; + NpcStep talkToEdmondUnderground; + ObjectStep useRopeOnGrill; + ObjectStep climbThroughPipe; + NpcStep talkToJethick; + ObjectStep enterMarthasHouse; + NpcStep talkToMartha; + NpcStep talkToMilli; + ObjectStep goUpstairsInMarthasHouse; + ObjectStep tryToEnterPlagueHouse; + NpcStep talkToClerk; + NpcStep talkToBravek; + DetailedQuestStep useDustOnMilk; + DetailedQuestStep useSnapeGrassOnChocolateMilk; + NpcStep giveHangoverCureToBravek; + NpcStep talkToBravekAgain; + ObjectStep tryToEnterPlagueHouseAgain; + ObjectStep searchBarrel; + ObjectStep goDownstairsInPlagueHouse; + ObjectStep goUpstairsInPlagueHouse; + NpcStep talkToElena; + ObjectStep goUpstairsInPlagueHouseToFinish; + ObjectStep goDownManhole; + ObjectStep goDownManhole2; + ObjectStep climbMudPileToFinish; + NpcStep talkToEdmondToFinish; @Override - public Map loadSteps() + protected void setupZones() { - initializeRequirements(); - setupConditions(); - setupSteps(); - Map steps = new HashMap<>(); - - steps.put(0, talkToEdmond); - steps.put(1, talkToAlrena); - - ConditionalStep getPictureThenTalkEdmond = new ConditionalStep(this, grabPictureOfElena); - getPictureThenTalkEdmond.addStep(pictureOfElena, talkToEdmondAgain); - steps.put(2, getPictureThenTalkEdmond); - - steps.put(3, useWaterOnMudPatch1); - steps.put(4, useWaterOnMudPatch2); - steps.put(5, useWaterOnMudPatch3); - steps.put(6, useWaterOnMudPatch4); - - ConditionalStep getPictureThenDig = new ConditionalStep(this, grabPictureOfElena); - getPictureThenDig.addStep(pictureOfElena, digHole); - steps.put(7, getPictureThenDig); - - ConditionalStep attemptToOpenGrill = new ConditionalStep(this, grabPictureOfElena); - attemptToOpenGrill.addStep(new Conditions(hasTriedToPullGrill, inUnderground, pictureOfElena), useRopeOnGrill); - attemptToOpenGrill.addStep(new Conditions(inUnderground, pictureOfElena), attemptToPullGrill); - attemptToOpenGrill.addStep(inUnderground, climbMudPile); - attemptToOpenGrill.addStep(pictureOfElena, goDownHole); - - steps.put(8, attemptToOpenGrill); - - ConditionalStep pullOffGrill = new ConditionalStep(this, grabPictureOfElena); - pullOffGrill.addStep(new Conditions(inUnderground, pictureOfElena), talkToEdmondUnderground); - pullOffGrill.addStep(inUnderground, climbMudPile); - pullOffGrill.addStep(pictureOfElena, goDownHole); - - steps.put(9, pullOffGrill); - - ConditionalStep enterWestArdougne = new ConditionalStep(this, grabPictureOfElena); - enterWestArdougne.addStep(new Conditions(inWestArdougne, pictureOfElena), talkToJethick); - enterWestArdougne.addStep(new Conditions(inUnderground, pictureOfElena), climbThroughPipe); - enterWestArdougne.addStep(inUnderground, climbMudPile); - enterWestArdougne.addStep(pictureOfElena, goDownHole); - - steps.put(10, enterWestArdougne); - - ConditionalStep goToMarthasHouse = new ConditionalStep(this, goDownHole); - goToMarthasHouse.addStep(new Conditions(inWestArdougne, book), enterMarthasHouse); - goToMarthasHouse.addStep(inWestArdougne, talkToJethick); - goToMarthasHouse.addStep(inUnderground, climbThroughPipe); - - steps.put(20, goToMarthasHouse); - - ConditionalStep talkToMarthaInHouse = new ConditionalStep(this, goDownHole); - talkToMarthaInHouse.addStep(inWestArdougne, talkToMartha); - talkToMarthaInHouse.addStep(inUnderground, climbThroughPipe); - - steps.put(21, talkToMarthaInHouse); - - ConditionalStep talkToMilliInHouse = new ConditionalStep(this, goDownHole); - talkToMilliInHouse.addStep(inUpstairsMathasHouse, talkToMilli); - talkToMilliInHouse.addStep(inWestArdougne, goUpstairsInMarthasHouse); - talkToMilliInHouse.addStep(inUnderground, climbThroughPipe); - - steps.put(22, talkToMilliInHouse); - - ConditionalStep goToPlagueHouse = new ConditionalStep(this, goDownHole); - goToPlagueHouse.addStep(inWestArdougne, tryToEnterPlagueHouse); - goToPlagueHouse.addStep(inUnderground, climbThroughPipe); - - steps.put(23, goToPlagueHouse); - - ConditionalStep goSpeakToClerk = new ConditionalStep(this, goDownHole); - goSpeakToClerk.addStep(inWestArdougne, talkToClerk); - goSpeakToClerk.addStep(inUnderground, climbThroughPipe); - - steps.put(24, goSpeakToClerk); - - ConditionalStep goTalkToBravek = new ConditionalStep(this, goDownHole); - goTalkToBravek.addStep(inWestArdougne, talkToBravek); - goTalkToBravek.addStep(inUnderground, climbThroughPipe); - - steps.put(25, goTalkToBravek); - - ConditionalStep createHangoverCureForBravek = new ConditionalStep(this, useDustOnMilk); - createHangoverCureForBravek.addStep(new Conditions(inWestArdougne, hangoverCure), giveHangoverCureToBravek); - createHangoverCureForBravek.addStep(new Conditions(hangoverCure, inUnderground), climbThroughPipe); - createHangoverCureForBravek.addStep(hangoverCure, goDownHole); - createHangoverCureForBravek.addStep(bucketOfChocolateMilk, useSnapeGrassOnChocolateMilk); - - steps.put(26, createHangoverCureForBravek); - - ConditionalStep continueTalkingToBravek = new ConditionalStep(this, goDownHole); - continueTalkingToBravek.addStep(new Conditions(inDownstairsOfPlagueHouse, key), talkToElena); - continueTalkingToBravek.addStep(new Conditions(inPlagueHouse, key), goDownstairsInPlagueHouse); - continueTalkingToBravek.addStep(inPlagueHouse, searchBarrel); - continueTalkingToBravek.addStep(inDownstairsOfPlagueHouse, goUpstairsInPlagueHouse); - continueTalkingToBravek.addStep(new Conditions(warrant, inWestArdougne), tryToEnterPlagueHouseAgain); - continueTalkingToBravek.addStep(inWestArdougne, talkToBravekAgain); - continueTalkingToBravek.addStep(inUnderground, climbThroughPipe); - - steps.put(27, continueTalkingToBravek); - - ConditionalStep finishQuest = new ConditionalStep(this, talkToEdmondToFinish); - finishQuest.addStep(inDownstairsOfPlagueHouse, goUpstairsInPlagueHouseToFinish); - finishQuest.addStep(new Conditions(inWestArdougne, manholeClosed), goDownManhole2); - finishQuest.addStep(inWestArdougne, goDownManhole); - finishQuest.addStep(inUnderground, climbMudPileToFinish); - - steps.put(28, finishQuest); - - return steps; + underground = new Zone(new WorldPoint(2506, 9737, 0), new WorldPoint(2532, 9781, 0)); + westArdougne1 = new Zone(new WorldPoint(2460, 3279, 0), new WorldPoint(2556, 3334, 2)); + westArdougne2 = new Zone(new WorldPoint(2434, 3305, 0), new WorldPoint(2464, 3323, 2)); + westArdougne3 = new Zone(new WorldPoint(2510, 3265, 0), new WorldPoint(2556, 3280, 2)); + upstairsMathasHouse = new Zone(new WorldPoint(2527, 3329, 1), new WorldPoint(2533, 3333, 1)); + plagueHouse1 = new Zone(new WorldPoint(2532, 3268, 0), new WorldPoint(2541, 3271, 0)); + plagueHouse2 = new Zone(new WorldPoint(2535, 3272, 0), new WorldPoint(2541, 3272, 0)); + downstairsOfPlagueHouse = new Zone(new WorldPoint(2535, 9670, 0), new WorldPoint(2542, 9673, 0)); } @Override protected void setupRequirements() { + inUnderground = new ZoneRequirement(underground); + hasTriedToPullGrill = new VarbitRequirement(VarbitID.PLAGUECITY_CHECKED_GRILL, 1); + inWestArdougne = new ZoneRequirement(westArdougne1, westArdougne2, westArdougne3); + inUpstairsMathasHouse = new ZoneRequirement(upstairsMathasHouse); + manholeClosed = new ObjectCondition(ObjectID.PLAGUEMANHOLECLOSED); + dwellberries = new ItemRequirement("Dwellberries", ItemID.DWELLBERRIES); dwellberries.setTooltip("You can get these from McGrubor's Wood west of Seers' Village"); rope = new ItemRequirement("Rope", ItemID.ROPE); @@ -192,17 +164,15 @@ protected void setupRequirements() spade.canBeObtainedDuringQuest(); spade.setTooltip("A spawn is found in Edmond's garden at the start of the quest"); spade.setHighlightInInventory(true); - fourBucketsOfWater = new ItemRequirement("Buckets of water", ItemID.BUCKET_WATER, 4); + + fourBucketsOfWater = new ItemRequirement("Bucket of water", ItemID.BUCKET_WATER, 4); + fourBucketsOfWater.canBeObtainedDuringQuest(); fourBucketsOfWater.setHighlightInInventory(true); - fourBucketsOfWater.setTooltip("You can use the bucket near the start of the quest on the sink nearby"); - threeBucketsOfWater = new ItemRequirement("Buckets of water", ItemID.BUCKET_WATER, 3); - threeBucketsOfWater.setHighlightInInventory(true); - threeBucketsOfWater.setTooltip("You can use the bucket near the start of the quest on the sink nearby"); - twoBucketsOfWater = new ItemRequirement("Buckets of water", ItemID.BUCKET_WATER, 2); - twoBucketsOfWater.setHighlightInInventory(true); - twoBucketsOfWater.setTooltip("You can use the bucket near the start of the quest on the sink nearby"); - bucketOfWater = new ItemRequirement("Bucket of water", ItemID.BUCKET_WATER); - bucketOfWater.setHighlightInInventory(true); + fourBucketsOfWater.setTooltip("An empty bucket can be found next to Edmond's garden patch, which can be filled in the sink inside Edmond's house."); + threeBucketsOfWater = fourBucketsOfWater.quantity(3); + twoBucketsOfWater = fourBucketsOfWater.quantity(2); + bucketOfWater = fourBucketsOfWater.quantity(1); + bucketOfMilk = new ItemRequirement("Bucket of milk", ItemID.BUCKET_MILK); bucketOfMilk.setHighlightInInventory(true); chocolateDust = new ItemRequirement("Chocolate dust", ItemID.CHOCOLATE_DUST); @@ -222,33 +192,19 @@ protected void setupRequirements() key = new ItemRequirement("A small key", ItemID.ELENAKEY); } - @Override - protected void setupZones() { - underground = new Zone(new WorldPoint(2506,9737,0), new WorldPoint(2532,9781,0)); - westArdougne1 = new Zone(new WorldPoint(2460,3279,0), new WorldPoint(2556, 3334,2)); - westArdougne2 = new Zone(new WorldPoint(2434,3305,0), new WorldPoint(2464, 3323,2)); - westArdougne3 = new Zone(new WorldPoint(2510,3265,0), new WorldPoint(2556, 3280,2)); - upstairsMathasHouse = new Zone(new WorldPoint(2527,3329,1), new WorldPoint(2533, 3333,1)); - plagueHouse1 = new Zone(new WorldPoint(2532,3268,0), new WorldPoint(2541, 3271,0)); - plagueHouse2 = new Zone(new WorldPoint(2535,3272,0), new WorldPoint(2541, 3272,0)); - downstairsOfPlagueHouse = new Zone(new WorldPoint(2535, 9670,0), new WorldPoint(2542, 9673,0)); - } - - public void setupConditions() { - inUnderground = new ZoneRequirement(underground); - hasTriedToPullGrill = new VarbitRequirement(1786, 1); - inWestArdougne = new ZoneRequirement(westArdougne1, westArdougne2, westArdougne3); - inUpstairsMathasHouse = new ZoneRequirement(upstairsMathasHouse); - manholeClosed = new ObjectCondition(ObjectID.PLAGUEMANHOLECLOSED); - } - public void setupSteps() { - talkToEdmond = new NpcStep(this, NpcID.WILDERNESS_CAPESELLER_8, new WorldPoint(2568, 3333, 0), "Talk to Edmond in the north-west corner of East Ardougne."); + talkToEdmond = new NpcStep(this, NpcID.EDMOND, new WorldPoint(2568, 3333, 0), "Talk to Edmond in the north-west corner of East Ardougne."); talkToEdmond.addDialogStep("What's happened to her?"); talkToEdmond.addDialogStep("Yes."); - talkToAlrena = new NpcStep(this, NpcID.ALRENA, new WorldPoint(2573, 3333, 0), "Talk to Alrena nearby.", dwellberries); - talkToEdmondAgain = new NpcStep(this, NpcID.WILDERNESS_CAPESELLER_8, new WorldPoint(2568, 3332, 0), "Talk to Edmond again."); + + talkToAlrena = new NpcStep(this, NpcID.ALRENA, new WorldPoint(2573, 3333, 0), "Talk to Alrena and give her the dwellberries.", dwellberries); + + grabPictureOfElena = new DetailedQuestStep(this, new WorldPoint(2576, 3334, 0), + "Grab the Picture from Edmond's house.", pictureOfElena); + + talkToEdmondAgain = new NpcStep(this, NpcID.EDMOND, new WorldPoint(2568, 3332, 0), "Talk to Edmond again."); + useWaterOnMudPatch1 = new ObjectStep(this, ObjectID.PLAGUEMUDPATCH2, new WorldPoint(2566, 3332, 0), "Use four buckets of water on the mud patch in Edmond's garden patch.", fourBucketsOfWater); useWaterOnMudPatch1.addIcon(ItemID.BUCKET_WATER); @@ -268,20 +224,18 @@ public void setupSteps() "Use a spade on the mud patch.", spade); digHole.addIcon(ItemID.SPADE); - grabPictureOfElena = new DetailedQuestStep(this, new WorldPoint(2576, 3334, 0), - "Grab the Picture from Edmond's house.", pictureOfElena); goDownHole = new ObjectStep(this, ObjectID.PLAGUEMUDPATCH2, new WorldPoint(2566, 3332, 0), "Go down the hole."); - attemptToPullGrill = new ObjectStep(this, ObjectID.PLAGUE_GRILL, new WorldPoint(2514,9739,0), "Attempt to pull the grill in the south of the sewer."); - climbMudPile = new ObjectStep(this, ObjectID.PLAGUEMUDPILE, new WorldPoint(2519,9760,0), "Climb the mud pile."); + attemptToPullGrill = new ObjectStep(this, ObjectID.PLAGUE_GRILL, new WorldPoint(2514, 9739, 0), "Attempt to pull the grill in the south of the sewer."); + climbMudPile = new ObjectStep(this, ObjectID.PLAGUEMUDPILE, new WorldPoint(2519, 9760, 0), "Climb the mud pile."); grabPictureOfElena.addSubSteps(climbMudPile); - useRopeOnGrill = new ObjectStep(this, ObjectID.PLAGUE_GRILL, new WorldPoint(2514,9739,0), "Use a rope on the grill.", rope); + useRopeOnGrill = new ObjectStep(this, ObjectID.PLAGUE_GRILL, new WorldPoint(2514, 9739, 0), "Use a rope on the grill.", rope); useRopeOnGrill.addIcon(ItemID.ROPE); - talkToEdmondUnderground = new NpcStep(this, NpcID.WILDERNESS_CAPESELLER_8, new WorldPoint(2517, 9753, 0), "Talk to Edmond."); + talkToEdmondUnderground = new NpcStep(this, NpcID.EDMOND, new WorldPoint(2517, 9753, 0), "Talk to Edmond and ask him to help you pull off the grill."); climbThroughPipe = new ObjectStep(this, ObjectID.PLAGUESEWERPIPE_OPEN, new WorldPoint(2514, 9738, 0), "Equip the gas mask and climb through the pipe.", gasMask.highlighted()); @@ -290,7 +244,8 @@ public void setupSteps() enterMarthasHouse = new ObjectStep(this, ObjectID.REHNISONDOORSHUT, new WorldPoint(2531, 3328, 0), "Enter the tall house in north West Ardougne."); - talkToMartha = new NpcStep(this, NpcID.MARTHA_REHNISON, new WorldPoint(2531, 3331, 0), "Talk to Martha or Ted Renison"); + talkToMartha = new NpcStep(this, NpcID.MARTHA_REHNISON, new WorldPoint(2531, 3331, 0), "Talk to Martha or Ted Rehnison", true); + talkToMartha.addAlternateNpcs(NpcID.TED_REHNISON); goUpstairsInMarthasHouse = new ObjectStep(this, ObjectID.REHNISONSTAIRS, new WorldPoint(2528, 3333, 0), "Talk to Milli upstairs."); talkToMilli = new NpcStep(this, NpcID.MILLI, new WorldPoint(2531, 3331, 1), "Talk to Milli."); @@ -304,7 +259,7 @@ public void setupSteps() talkToClerk.addDialogStep("I need permission to enter a plague house."); talkToClerk.addDialogStep("This is urgent though! Someone's been kidnapped!"); - talkToBravek = new NpcStep(this, NpcID.BRAVEK, new WorldPoint(2534, 3314, 0), "Talk to the Bravek in the room to the east."); + talkToBravek = new NpcStep(this, NpcID.BRAVEK, new WorldPoint(2534, 3314, 0), "Talk to Bravek in the room to the east."); talkToBravek.addDialogStep("This is really important though!"); talkToBravek.addDialogStep("Do you know what's in the cure?"); @@ -312,18 +267,16 @@ public void setupSteps() useDustOnMilk = new DetailedQuestStep(this, "Use your chocolate dust on the bucket of milk.", bucketOfMilk, chocolateDust); useSnapeGrassOnChocolateMilk = new DetailedQuestStep(this, "Use the snape grass on the chocolatey milk", bucketOfChocolateMilk, snapeGrass); - giveHangoverCureToBravek = new NpcStep(this, NpcID.BRAVEK, new WorldPoint(2534, 3314, 0), "Talk to the Bravek again.", hangoverCure); + giveHangoverCureToBravek = new NpcStep(this, NpcID.BRAVEK, new WorldPoint(2534, 3314, 0), "Give the hangover cure to Bravek.", hangoverCure); - talkToBravekAgain = new NpcStep(this, NpcID.BRAVEK, new WorldPoint(2534, 3314, 0), "Talk to the Bravek again.", warrant); + talkToBravekAgain = new NpcStep(this, NpcID.BRAVEK, new WorldPoint(2534, 3314, 0), "Talk to Bravek to receive the warrant you need to enter the plague house."); talkToBravekAgain.addDialogStep("They won't listen to me!"); - giveHangoverCureToBravek.addSubSteps(talkToBravekAgain); - tryToEnterPlagueHouseAgain = new ObjectStep(this, ObjectID.PLAGUEELENADOORSHUT, new WorldPoint(2540, 3273, 0), "Try to enter the plague house again.", warrant); searchBarrel = new ObjectStep(this, ObjectID.PLAGUEKEYBARREL, new WorldPoint(2534, 3268, 0), "Search the barrel in the room for a small key."); - goDownstairsInPlagueHouse = new ObjectStep(this, ObjectID.PLAGUEHOUSESTAIRSDOWN, new WorldPoint(2537, 3269, 0), "Go downstairs.", key); + goDownstairsInPlagueHouse = new ObjectStep(this, ObjectID.PLAGUEHOUSESTAIRSDOWN, new WorldPoint(2537, 3269, 0), "Go downstairs in the plague house.", key); goUpstairsInPlagueHouse = new ObjectStep(this, ObjectID.PLAGUEHOUSESTAIRSUP, new WorldPoint(2537, 9672, 0), "Go back upstairs to get the key for Elena's cell."); searchBarrel.addSubSteps(goUpstairsInPlagueHouse); @@ -334,31 +287,150 @@ public void setupSteps() goDownManhole = new ObjectStep(this, ObjectID.PLAGUEMANHOLEOPEN, new WorldPoint(2529, 3303, 0), "Go back down the manhole to return to Edmond."); goDownManhole2 = new ObjectStep(this, ObjectID.PLAGUEMANHOLECLOSED, new WorldPoint(2529, 3303, 0), "Go back down the manhole to return to Edmond."); - climbMudPileToFinish = new ObjectStep(this, ObjectID.PLAGUEMUDPILE, new WorldPoint(2519,9760,0), "Climb the mud pile to return to Edmond."); + climbMudPileToFinish = new ObjectStep(this, ObjectID.PLAGUEMUDPILE, new WorldPoint(2519, 9760, 0), "Climb the mud pile to return to Edmond."); - talkToEdmondToFinish = new NpcStep(this, NpcID.WILDERNESS_CAPESELLER_8, new WorldPoint(2568, 3333, 0), "Return to Edmond to finish the quest."); + talkToEdmondToFinish = new NpcStep(this, NpcID.EDMOND, new WorldPoint(2568, 3333, 0), "Return to Edmond to finish the quest."); talkToEdmondToFinish.addSubSteps(goUpstairsInPlagueHouseToFinish, goDownManhole, goDownManhole2, climbMudPileToFinish); } + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + steps.put(0, talkToEdmond); + steps.put(1, talkToAlrena); + + var getPictureThenTalkEdmond = new ConditionalStep(this, grabPictureOfElena); + getPictureThenTalkEdmond.addStep(pictureOfElena, talkToEdmondAgain); + steps.put(2, getPictureThenTalkEdmond); + + steps.put(3, useWaterOnMudPatch1); + steps.put(4, useWaterOnMudPatch2); + steps.put(5, useWaterOnMudPatch3); + steps.put(6, useWaterOnMudPatch4); + + var getPictureThenDig = new ConditionalStep(this, grabPictureOfElena); + getPictureThenDig.addStep(pictureOfElena, digHole); + steps.put(7, getPictureThenDig); + + var attemptToOpenGrill = new ConditionalStep(this, grabPictureOfElena); + attemptToOpenGrill.addStep(and(hasTriedToPullGrill, inUnderground, pictureOfElena), useRopeOnGrill); + attemptToOpenGrill.addStep(and(inUnderground, pictureOfElena), attemptToPullGrill); + attemptToOpenGrill.addStep(inUnderground, climbMudPile); + attemptToOpenGrill.addStep(pictureOfElena, goDownHole); + + steps.put(8, attemptToOpenGrill); + + var pullOffGrill = new ConditionalStep(this, grabPictureOfElena); + pullOffGrill.addStep(and(inUnderground, pictureOfElena), talkToEdmondUnderground); + pullOffGrill.addStep(inUnderground, climbMudPile); + pullOffGrill.addStep(pictureOfElena, goDownHole); + + steps.put(9, pullOffGrill); + + var enterWestArdougne = new ConditionalStep(this, grabPictureOfElena); + enterWestArdougne.addStep(and(inWestArdougne, pictureOfElena), talkToJethick); + enterWestArdougne.addStep(and(inUnderground, pictureOfElena), climbThroughPipe); + enterWestArdougne.addStep(inUnderground, climbMudPile); + enterWestArdougne.addStep(pictureOfElena, goDownHole); + + steps.put(10, enterWestArdougne); + + var goToMarthasHouse = new ConditionalStep(this, goDownHole); + goToMarthasHouse.addStep(and(inWestArdougne, book), enterMarthasHouse); + goToMarthasHouse.addStep(inWestArdougne, talkToJethick); + goToMarthasHouse.addStep(inUnderground, climbThroughPipe); + + steps.put(20, goToMarthasHouse); + + var talkToMarthaInHouse = new ConditionalStep(this, goDownHole); + talkToMarthaInHouse.addStep(inWestArdougne, talkToMartha); + talkToMarthaInHouse.addStep(inUnderground, climbThroughPipe); + + steps.put(21, talkToMarthaInHouse); + + var talkToMilliInHouse = new ConditionalStep(this, goDownHole); + talkToMilliInHouse.addStep(inUpstairsMathasHouse, talkToMilli); + talkToMilliInHouse.addStep(inWestArdougne, goUpstairsInMarthasHouse); + talkToMilliInHouse.addStep(inUnderground, climbThroughPipe); + + steps.put(22, talkToMilliInHouse); + + var goToPlagueHouse = new ConditionalStep(this, goDownHole); + goToPlagueHouse.addStep(inWestArdougne, tryToEnterPlagueHouse); + goToPlagueHouse.addStep(inUnderground, climbThroughPipe); + + steps.put(23, goToPlagueHouse); + + var goSpeakToClerk = new ConditionalStep(this, goDownHole); + goSpeakToClerk.addStep(inWestArdougne, talkToClerk); + goSpeakToClerk.addStep(inUnderground, climbThroughPipe); + + steps.put(24, goSpeakToClerk); + + var goTalkToBravek = new ConditionalStep(this, goDownHole); + goTalkToBravek.addStep(inWestArdougne, talkToBravek); + goTalkToBravek.addStep(inUnderground, climbThroughPipe); + + steps.put(25, goTalkToBravek); + + var createHangoverCureForBravek = new ConditionalStep(this, useDustOnMilk); + createHangoverCureForBravek.addStep(and(inWestArdougne, hangoverCure), giveHangoverCureToBravek); + createHangoverCureForBravek.addStep(and(hangoverCure, inUnderground), climbThroughPipe); + createHangoverCureForBravek.addStep(hangoverCure, goDownHole); + createHangoverCureForBravek.addStep(bucketOfChocolateMilk, useSnapeGrassOnChocolateMilk); + + steps.put(26, createHangoverCureForBravek); + + var continueTalkingToBravek = new ConditionalStep(this, goDownHole); + continueTalkingToBravek.addStep(and(inDownstairsOfPlagueHouse, key), talkToElena); + continueTalkingToBravek.addStep(and(inPlagueHouse, key), goDownstairsInPlagueHouse); + continueTalkingToBravek.addStep(inPlagueHouse, searchBarrel); + continueTalkingToBravek.addStep(inDownstairsOfPlagueHouse, goUpstairsInPlagueHouse); + continueTalkingToBravek.addStep(and(warrant, inWestArdougne), tryToEnterPlagueHouseAgain); + continueTalkingToBravek.addStep(inWestArdougne, talkToBravekAgain); + continueTalkingToBravek.addStep(inUnderground, climbThroughPipe); + + steps.put(27, continueTalkingToBravek); + + var finishQuest = new ConditionalStep(this, talkToEdmondToFinish); + finishQuest.addStep(inDownstairsOfPlagueHouse, goUpstairsInPlagueHouseToFinish); + finishQuest.addStep(and(inWestArdougne, manholeClosed), goDownManhole2); + finishQuest.addStep(inWestArdougne, goDownManhole); + finishQuest.addStep(inUnderground, climbMudPileToFinish); + + steps.put(28, finishQuest); + + // 29: quest finished + // 30: has read ardougne scroll, so can use ardougne teleport / teleport tablet + + return steps; + } + + @Override public List getItemRequirements() { - ArrayList reqs = new ArrayList<>(); - reqs.add(dwellberries); - reqs.add(spade); - reqs.add(rope); - reqs.add(bucketOfMilk); - reqs.add(chocolateDust); - reqs.add(snapeGrass); - return reqs; + return List.of( + dwellberries, + spade, + rope, + bucketOfMilk, + chocolateDust, + snapeGrass + ); } @Override public List getItemRecommended() { - ArrayList reqs = new ArrayList<>(); - reqs.add(fourBucketsOfWater); - return reqs; + return List.of( + fourBucketsOfWater + ); } @Override @@ -370,27 +442,73 @@ public QuestPointReward getQuestPointReward() @Override public List getExperienceRewards() { - return Collections.singletonList(new ExperienceReward(Skill.MINING, 2426)); + return List.of( + new ExperienceReward(Skill.MINING, 2425) + ); } @Override public List getUnlockRewards() { - return Collections.singletonList(new UnlockReward("Ability to use Ardougne teleport spell and tablets")); + return List.of( + new UnlockReward("Ability to use Ardougne teleport spell and tablets") + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); - allSteps.add(new PanelDetails("Start the quest", Collections.singletonList(talkToEdmond), dwellberries, spade, rope, bucketOfMilk, chocolateDust, snapeGrass)); - allSteps.add(new PanelDetails("Infiltrate West Ardougne", Arrays.asList(talkToAlrena, talkToEdmondAgain, useWaterOnMudPatch1, - grabPictureOfElena, digHole, goDownHole, attemptToPullGrill, useRopeOnGrill, talkToEdmondUnderground, climbThroughPipe))); - allSteps.add(new PanelDetails("Discover Elena's location", Arrays.asList(talkToJethick, enterMarthasHouse, talkToMartha, - goUpstairsInMarthasHouse))); - allSteps.add(new PanelDetails("Freeing Elena", Arrays.asList(tryToEnterPlagueHouse, talkToClerk, talkToBravek, useDustOnMilk, useSnapeGrassOnChocolateMilk, - giveHangoverCureToBravek, tryToEnterPlagueHouseAgain, searchBarrel, goDownstairsInPlagueHouse, talkToElena))); - allSteps.add(new PanelDetails("Finishing off", Collections.singletonList(talkToEdmondToFinish))); - return allSteps; + var sections = new ArrayList(); + + sections.add(new PanelDetails("Start the quest", List.of( + talkToEdmond + ), List.of( + dwellberries, + spade, + rope, + bucketOfMilk, + chocolateDust, + snapeGrass + ))); + + sections.add(new PanelDetails("Infiltrate West Ardougne", List.of( + talkToAlrena, + grabPictureOfElena, + talkToEdmondAgain, + useWaterOnMudPatch1, + digHole, + goDownHole, + attemptToPullGrill, + useRopeOnGrill, + talkToEdmondUnderground, + climbThroughPipe + ))); + + sections.add(new PanelDetails("Discover Elena's location", List.of( + talkToJethick, + enterMarthasHouse, + talkToMartha, + goUpstairsInMarthasHouse + ))); + + sections.add(new PanelDetails("Freeing Elena", List.of( + tryToEnterPlagueHouse, + talkToClerk, + talkToBravek, + useDustOnMilk, + useSnapeGrassOnChocolateMilk, + giveHangoverCureToBravek, + talkToBravekAgain, + tryToEnterPlagueHouseAgain, + searchBarrel, + goDownstairsInPlagueHouse, + talkToElena + ))); + + sections.add(new PanelDetails("Finishing off", List.of( + talkToEdmondToFinish + ))); + + return sections; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ragandboneman/RagAndBoneManI.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ragandboneman/RagAndBoneManI.java index 15dd93ec900..15e7cb6cb06 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ragandboneman/RagAndBoneManI.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ragandboneman/RagAndBoneManI.java @@ -41,12 +41,12 @@ import net.runelite.client.plugins.microbot.questhelper.steps.*; import net.runelite.client.plugins.microbot.questhelper.tools.QuestTile; import net.runelite.api.Skill; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.SpriteID; import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; @@ -199,14 +199,14 @@ private void setupConditions() // 2044 = 1, talked a bit to Odd Old Man - addedRope = new VarbitRequirement(279, 1); + addedRope = new VarbitRequirement(VarbitID.SWAMP_CAVES_ROPED_ENTRANCE, 1); boneNearby = new Conditions(LogicType.OR, RagBoneGroups.getBonesOnFloor(RagBoneGroups.getBones(RagBoneGroups.getRagBoneIStates()))); logAdded = new VarbitRequirement(VarbitID.RAG_BOILER, 1, Operation.GREATER_EQUAL); boneAddedToBoiler = new VarbitRequirement(VarbitID.RAG_BOILER, 2, Operation.GREATER_EQUAL); logLit = new VarbitRequirement(VarbitID.RAG_BOILER, 3, Operation.GREATER_EQUAL); - boneReady = new VarbitRequirement(2046, 4); + boneReady = new VarbitRequirement(VarbitID.RAG_BOILER, 4); // Every time handing in a bone, 2045 iterates from 0->28 1 by 1. Next time you hand in a bone it goes back // to 0 and repeats??? @@ -217,7 +217,7 @@ private void setupConditions() hadAllBones = new Conditions(RagBoneGroups.allBonesObtained(RagBoneGroups.getRagBoneIStates(), questBank)); - talkedToFortunato = new VarbitRequirement(2047, 1); + talkedToFortunato = new VarbitRequirement(VarbitID.RAG_WINE, 1); hadVinegar = new Conditions(jugOfVinegar.alsoCheckBank(questBank)); } @@ -261,8 +261,8 @@ public void setupSteps() killFrog = new NpcStep(this, NpcID.MEDIUM_FROG, new WorldPoint(3153, 9558, 0), "Kill a big frog in the south west of the caves. Make sure to RUN between the two marked run tiles to " + "avoid the Wall Beast.", true); - killFrog.addTileMarker(new QuestTile(new WorldPoint(3161, 9574, 0), SpriteID.OPTIONS_RUNNING)); - killFrog.addTileMarker(new QuestTile(new WorldPoint(3163, 9574, 0), SpriteID.OPTIONS_RUNNING)); + killFrog.addTileMarker(new QuestTile(new WorldPoint(3161, 9574, 0), SpriteID.OptionsIcons.RUNNING)); + killFrog.addTileMarker(new QuestTile(new WorldPoint(3163, 9574, 0), SpriteID.OptionsIcons.RUNNING)); ConditionalStep killFrogSteps = new ConditionalStep(this, addRope); killFrogSteps.addStep(inSwamp, killFrog); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ragandboneman/RagAndBoneManII.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ragandboneman/RagAndBoneManII.java index d7dd9b2c1e3..c10f11a8c9a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ragandboneman/RagAndBoneManII.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ragandboneman/RagAndBoneManII.java @@ -53,12 +53,12 @@ import net.runelite.client.plugins.microbot.questhelper.tools.QuestTile; import net.runelite.api.QuestState; import net.runelite.api.Skill; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.SpriteID; import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; @@ -342,7 +342,7 @@ private void setupConditions() onWaterbirth = new ZoneRequirement(waterbirth); inWaterbirthDungeon = new ZoneRequirement(waterbirthDungeon); - addedRope = new VarbitRequirement(279, 1); + addedRope = new VarbitRequirement(VarbitID.SWAMP_CAVES_ROPED_ENTRANCE, 1); boneNearby = new Conditions(LogicType.OR, RagBoneGroups.getBonesOnFloor(RagBoneGroups.getBones(RagBoneGroups.getRagBoneIIStates()))); @@ -350,7 +350,7 @@ private void setupConditions() logAdded = new VarbitRequirement(VarbitID.RAG_BOILER, 1, Operation.GREATER_EQUAL); boneAddedToBoiler = new VarbitRequirement(VarbitID.RAG_BOILER, 2, Operation.GREATER_EQUAL); logLit = new VarbitRequirement(VarbitID.RAG_BOILER, 3, Operation.GREATER_EQUAL); - boneReady = new VarbitRequirement(2046, 4); + boneReady = new VarbitRequirement(VarbitID.RAG_BOILER, 4); jailKeyOnFloor = new ItemOnTileRequirement(jailKey); mogreNearby = new NpcInteractingRequirement(NpcID.MUDSKIPPER_OGRE); @@ -422,17 +422,17 @@ public void setupSteps() "Beasts.", true); ((NpcStep) killCaveGoblin).addAlternateNpcs(NpcID.CAVE_GOBLIN2, NpcID.CAVE_GOBLIN3, NpcID.CAVE_GOBLIN4); - killCaveGoblin.addTileMarker(new QuestTile(new WorldPoint(3161, 9573, 0), SpriteID.OPTIONS_RUNNING)); - killCaveGoblin.addTileMarker(new QuestTile(new WorldPoint(3163, 9573, 0), SpriteID.OPTIONS_RUNNING)); + killCaveGoblin.addTileMarker(new QuestTile(new WorldPoint(3161, 9573, 0), SpriteID.OptionsIcons.RUNNING)); + killCaveGoblin.addTileMarker(new QuestTile(new WorldPoint(3163, 9573, 0), SpriteID.OptionsIcons.RUNNING)); - killCaveGoblin.addTileMarker(new QuestTile(new WorldPoint(3163, 9555, 0), SpriteID.OPTIONS_RUNNING)); - killCaveGoblin.addTileMarker(new QuestTile(new WorldPoint(3165, 9555, 0), SpriteID.OPTIONS_RUNNING)); + killCaveGoblin.addTileMarker(new QuestTile(new WorldPoint(3163, 9555, 0), SpriteID.OptionsIcons.RUNNING)); + killCaveGoblin.addTileMarker(new QuestTile(new WorldPoint(3165, 9555, 0), SpriteID.OptionsIcons.RUNNING)); - killCaveGoblin.addTileMarker(new QuestTile(new WorldPoint(3197, 9553, 0), SpriteID.OPTIONS_RUNNING)); - killCaveGoblin.addTileMarker(new QuestTile(new WorldPoint(3199, 9553, 0), SpriteID.OPTIONS_RUNNING)); + killCaveGoblin.addTileMarker(new QuestTile(new WorldPoint(3197, 9553, 0), SpriteID.OptionsIcons.RUNNING)); + killCaveGoblin.addTileMarker(new QuestTile(new WorldPoint(3199, 9553, 0), SpriteID.OptionsIcons.RUNNING)); - killCaveGoblin.addTileMarker(new QuestTile(new WorldPoint(3214, 9559, 0), SpriteID.OPTIONS_RUNNING)); - killCaveGoblin.addTileMarker(new QuestTile(new WorldPoint(3216, 9559, 0), SpriteID.OPTIONS_RUNNING)); + killCaveGoblin.addTileMarker(new QuestTile(new WorldPoint(3214, 9559, 0), SpriteID.OptionsIcons.RUNNING)); + killCaveGoblin.addTileMarker(new QuestTile(new WorldPoint(3216, 9559, 0), SpriteID.OptionsIcons.RUNNING)); killJackal = new NpcStep(this, NpcID.ICS_LITTLE_JACKAL, new WorldPoint(3400, 2997, 0), "Kill Jackals north of Nardah.", true); @@ -856,7 +856,7 @@ public List getGeneralRequirements() requirements.add(new QuestRequirement(QuestHelperQuest.SKIPPY_AND_THE_MOGRES, QuestState.FINISHED)); Conditions canAccessExperimentCave = new Conditions(LogicType.OR, - new VarbitRequirement(192, 1), + new VarbitRequirement(VarbitID.FENK_COFFIN, 1), new VarplayerRequirement(QuestVarPlayer.QUEST_CREATURE_OF_FENKENSTRAIN.getId(), 2, Operation.GREATER_EQUAL) ); canAccessExperimentCave.setText("Partial completion of Creature of Fenkenstrain"); @@ -943,7 +943,7 @@ public List getPanels() PanelDetails collectingKaramjaPanel = new PanelDetails("Karamja bones", Arrays.asList(killJogre, enterBrimhavenDungeon, killMossGiant, killFireGiant), - coins.quantity(875).hideConditioned(new VarbitRequirement(8122, 1)), axe); + coins.quantity(875).hideConditioned(new VarbitRequirement(VarbitID.KARAM_DUNGEON_PERMANENTACCESS, 1)), axe); collectingKaramjaPanel.setLockingStep(karamjaSteps); allSteps.add(collectingKaramjaPanel); // 8123 0->8 also when paid 1m for perm access diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ragandboneman/RagBoneState.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ragandboneman/RagBoneState.java index cb90f1bb231..75226ad5f21 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ragandboneman/RagBoneState.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ragandboneman/RagBoneState.java @@ -116,7 +116,7 @@ public enum RagBoneState boneCleanedItem = new ItemRequirement(Text.titleCase(this), boneID + 2); VarbitRequirement boneAddedToBoiler = new VarbitRequirement(VarbitID.RAG_BOILER, 2, Operation.GREATER_EQUAL); - boneIsBeingCleaned = new Conditions(boneAddedToBoiler, new VarbitRequirement(2043, pos)); + boneIsBeingCleaned = new Conditions(boneAddedToBoiler, new VarbitRequirement(VarbitID.RAG_POTBOILER, pos)); // Mark always true once obtained as no way to identify if a bone has been handed in easily WidgetTextRequirement hadFromWidgetsCheck = new WidgetTextRequirement(InterfaceID.Questjournal.TEXTLAYER, true, "" + nameInList); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ratcatchers/RatCatchers.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ratcatchers/RatCatchers.java index f4a03decae6..72e8d43bac5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ratcatchers/RatCatchers.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ratcatchers/RatCatchers.java @@ -48,11 +48,12 @@ import net.runelite.client.plugins.microbot.questhelper.steps.*; import net.runelite.api.QuestState; import net.runelite.api.Skill; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; +import net.runelite.api.gameval.SpriteID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -287,18 +288,18 @@ public void setupConditions() // 1423 = 1, // 1424 = 1 - caughtRat1 = new VarbitRequirement(1424, 1); + caughtRat1 = new VarbitRequirement(VarbitID.VC_RATON_OFF1, 1); caughtRat2And3 = new Conditions( - new VarbitRequirement(1425, 1), - new VarbitRequirement(1426, 1) + new VarbitRequirement(VarbitID.VC_RATON_OFF2, 1), + new VarbitRequirement(VarbitID.VC_RATON_OFF3, 1) ); - poisonedHole1 = new VarbitRequirement(1406, 1); - poisonedHole2 = new VarbitRequirement(1407, 1); - poisonedHole3 = new VarbitRequirement(1408, 1); - poisonedHole4 = new VarbitRequirement(1409, 1); + poisonedHole1 = new VarbitRequirement(VarbitID.RATCATCH_RATHOLE_1, 1); + poisonedHole2 = new VarbitRequirement(VarbitID.RATCATCH_RATHOLE_2, 1); + poisonedHole3 = new VarbitRequirement(VarbitID.RATCATCH_RATHOLE_3, 1); + poisonedHole4 = new VarbitRequirement(VarbitID.RATCATCH_RATHOLE_4, 1); - catSeenFailure = new VarbitRequirement(1410, 1); + catSeenFailure = new VarbitRequirement(VarbitID.RATCATCH_CATKNOWSDRILL, 1); // 1422, cat's told you how to get kelda rats inPlayWidget = new WidgetTextRequirement(282, 20, "PLAY"); @@ -355,12 +356,12 @@ public void setupSteps() climbTrellis.addSubSteps(climbTrellisNoPath); catchRat1 = new NpcStep(this, NpcID.VC_PARTY_RAT, new WorldPoint(2835, 5098, 1), "Catch the rat in the north west room with your cat.", catFollower); - catchRat1.addTileMarker(new WorldPoint(2841, 5104, 1), SpriteID.EQUIPMENT_SLOT_SHIELD); + catchRat1.addTileMarker(new WorldPoint(2841, 5104, 1), SpriteID.Wornicons.SHIELD); catchRat1.setMaxRoamRange(7); catchRat2And3 = new NpcStep(this, NpcID.VC_PARTY_RAT, new WorldPoint(2859, 5091, 1), "Hide in the north east room until it's safe to go to the south east room, then catch the rats there.", true); - catchRat2And3.addTileMarker(new WorldPoint(2857, 5098, 1), SpriteID.EQUIPMENT_SLOT_SHIELD); + catchRat2And3.addTileMarker(new WorldPoint(2857, 5098, 1), SpriteID.Wornicons.SHIELD); climbDownLadderInMansion = new ObjectStep(this, ObjectID.LADDERTOP, new WorldPoint(2862, 5092, 1), "Climb down the ladder."); catchRemainingRats = new NpcStep(this, NpcID.VC_PARTY_RAT, new WorldPoint(2860, 5093, 0), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ratcatchers/RatCharming.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ratcatchers/RatCharming.java index 33537285bcb..173162ba463 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ratcatchers/RatCharming.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/ratcatchers/RatCharming.java @@ -33,6 +33,7 @@ import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; import net.runelite.client.plugins.microbot.questhelper.steps.WidgetStep; import net.runelite.api.events.GameTick; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; import java.util.ArrayList; @@ -55,7 +56,7 @@ public RatCharming(QuestHelper questHelper) @Override protected void updateSteps() { - int currentPage = client.getVarbitValue(1420); + int currentPage = client.getVarbitValue(VarbitID.VC_NOTE_NUMBER); for (int i = 0; i < noteSteps.length; i++) { @@ -75,7 +76,7 @@ protected void updateSteps() // If need to raise octave if (i == 4) { - int octaveRaised = client.getVarbitValue(1413); + int octaveRaised = client.getVarbitValue(VarbitID.VC_NOTE_CURRENT_HI); if (octaveRaised == 0) { startUpStep(clickOctave); @@ -101,66 +102,66 @@ public void setupRequirements() noteRequirements = new Requirement[8]; noteRequirements[0] = new Conditions(LogicType.OR, new Conditions( - new VarbitRequirement(1411, 63), - new VarbitRequirement(1420, 0) + new VarbitRequirement(VarbitID.VC_NOTE_CURRENT, 63), + new VarbitRequirement(VarbitID.VC_NOTE_NUMBER, 0) ), - new VarbitRequirement(1395, 63) + new VarbitRequirement(VarbitID.VC_NOTE1, 63) ); noteRequirements[1] = new Conditions(LogicType.OR, new Conditions( - new VarbitRequirement(1411, 56), - new VarbitRequirement(1420, 1) + new VarbitRequirement(VarbitID.VC_NOTE_CURRENT, 56), + new VarbitRequirement(VarbitID.VC_NOTE_NUMBER, 1) ), - new VarbitRequirement(1396, 56) + new VarbitRequirement(VarbitID.VC_NOTE2, 56) ); noteRequirements[2] = new Conditions(LogicType.OR, new Conditions( - new VarbitRequirement(1411, 62), - new VarbitRequirement(1420, 2) + new VarbitRequirement(VarbitID.VC_NOTE_CURRENT, 62), + new VarbitRequirement(VarbitID.VC_NOTE_NUMBER, 2) ), - new VarbitRequirement(1397, 62) + new VarbitRequirement(VarbitID.VC_NOTE3, 62) ); noteRequirements[3] = new Conditions(LogicType.OR, new Conditions( - new VarbitRequirement(1411, 60), - new VarbitRequirement(1420, 3) + new VarbitRequirement(VarbitID.VC_NOTE_CURRENT, 60), + new VarbitRequirement(VarbitID.VC_NOTE_NUMBER, 3) ), - new VarbitRequirement(1398, 60) + new VarbitRequirement(VarbitID.VC_NOTE4, 60) ); noteRequirements[4] = new Conditions(LogicType.OR, new Conditions( - new VarbitRequirement(1411, 127), - new VarbitRequirement(1420, 4) + new VarbitRequirement(VarbitID.VC_NOTE_CURRENT, 127), + new VarbitRequirement(VarbitID.VC_NOTE_NUMBER, 4) ), - new VarbitRequirement(1399, 127) + new VarbitRequirement(VarbitID.VC_NOTE5, 127) ); noteRequirements[5] = new Conditions(LogicType.OR, new Conditions( - new VarbitRequirement(1411, 32), - new VarbitRequirement(1420, 5) + new VarbitRequirement(VarbitID.VC_NOTE_CURRENT, 32), + new VarbitRequirement(VarbitID.VC_NOTE_NUMBER, 5) ), - new VarbitRequirement(1400, 32) + new VarbitRequirement(VarbitID.VC_NOTE6, 32) ); noteRequirements[6] = new Conditions(LogicType.OR, new Conditions( - new VarbitRequirement(1411, 1), - new VarbitRequirement(1420, 6) + new VarbitRequirement(VarbitID.VC_NOTE_CURRENT, 1), + new VarbitRequirement(VarbitID.VC_NOTE_NUMBER, 6) ), - new VarbitRequirement(1401, 1) + new VarbitRequirement(VarbitID.VC_NOTE7, 1) ); noteRequirements[7] = new Conditions(LogicType.OR, new Conditions( - new VarbitRequirement(1411, 48), - new VarbitRequirement(1420, 7) + new VarbitRequirement(VarbitID.VC_NOTE_CURRENT, 48), + new VarbitRequirement(VarbitID.VC_NOTE_NUMBER, 7) ), - new VarbitRequirement(1402, 48) + new VarbitRequirement(VarbitID.VC_NOTE8, 48) ); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/AskAboutFishCake.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/AskAboutFishCake.java index bea179ecee5..7cb9ee63afe 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/AskAboutFishCake.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/AskAboutFishCake.java @@ -30,6 +30,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; import net.runelite.api.gameval.NpcID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; public class AskAboutFishCake extends NpcStep @@ -48,10 +49,10 @@ public void onGameTick(GameTick event) private void updateCorrectChoice() { - boolean askedAboutKelp = client.getVarbitValue(1873) == 1; // And 1874 = 1 - boolean askedAboutCrab = client.getVarbitValue(1874) == 1; - boolean askedAboutBread = client.getVarbitValue(1876) == 1; - boolean askedAboutCod = client.getVarbitValue(1877) == 1; + boolean askedAboutKelp = client.getVarbitValue(VarbitID.HUNDRED_PIRATE_MEAT_INTRO) == 1; // And 1874 = 1 + boolean askedAboutCrab = client.getVarbitValue(VarbitID.HUNDRED_PIRATE_KELP_INTRO) == 1; + boolean askedAboutBread = client.getVarbitValue(VarbitID.HUNDRED_PIRATE_CRUMB_INTRO) == 1; + boolean askedAboutCod = client.getVarbitValue(VarbitID.HUNDRED_PIRATE_COD_INTRO) == 1; choices = new DialogChoiceSteps(); addDialogStep("Protecting the Pirate"); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/GetRohakDrunk.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/GetRohakDrunk.java index 1b01b812d8c..9debdda7619 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/GetRohakDrunk.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/GetRohakDrunk.java @@ -30,6 +30,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; import net.runelite.api.gameval.NpcID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; import java.util.Collections; @@ -54,7 +55,7 @@ public void onGameTick(GameTick event) protected void updateSteps() { - int numAle = 4 - client.getVarbitValue(1893); + int numAle = 4 - client.getVarbitValue(VarbitID.HUNDRED_DWARF_DRUNK); asgoldianAle.setQuantity(numAle); if (numAle == 0) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/MakeEvilStew.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/MakeEvilStew.java index 0b81c5e9c61..a601bf0c2d5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/MakeEvilStew.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/MakeEvilStew.java @@ -33,7 +33,6 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.steps.*; -import net.runelite.api.Varbits; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; import net.runelite.api.gameval.ItemID; @@ -73,21 +72,6 @@ public void onGameTick(GameTick event) @Override protected void updateSteps() { - int redNeeded = client.getVarbitValue(1883); - int yellowNeeded = client.getVarbitValue(1884); - int brownNeeded = client.getVarbitValue(1885); - int orangeNeeded = client.getVarbitValue(1886); - - int redInStew = client.getVarbitValue(Varbits.SPICY_STEW_RED_SPICES); - int yellowInStew = client.getVarbitValue(Varbits.SPICY_STEW_YELLOW_SPICES); - int brownInStew = client.getVarbitValue(Varbits.SPICY_STEW_BROWN_SPICES); - int orangeInStew = client.getVarbitValue(Varbits.SPICY_STEW_ORANGE_SPICES); - - int numRedStillNeeded = redNeeded - redInStew; - int numOrangeStillNeeded = orangeNeeded - orangeInStew; - int numBrownStillNeeded = brownNeeded - brownInStew; - int numYellowStillNeeded = yellowNeeded - yellowInStew; - if (!inEvilDaveRoom.check(client)) { startUpStep(enterBasement); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/QuizSteps.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/QuizSteps.java index 6abd9ca34c2..fa1cb5cf206 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/QuizSteps.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/QuizSteps.java @@ -36,6 +36,7 @@ import net.runelite.api.gameval.InterfaceID; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.widgets.Widget; import net.runelite.client.eventbus.Subscribe; @@ -70,9 +71,9 @@ public void onGameTick(GameTick event) @Override protected void updateSteps() { - boolean eggEnchanted = client.getVarbitValue(1894) == 1; - boolean flourEnchanted = client.getVarbitValue(1897) == 1; - boolean milkEnchanted = client.getVarbitValue(1898) == 1; + boolean eggEnchanted = client.getVarbitValue(VarbitID._100GUIDE_EGGDONE) == 1; + boolean flourEnchanted = client.getVarbitValue(VarbitID._100GUIDE_FLOURDONE) == 1; + boolean milkEnchanted = client.getVarbitValue(VarbitID._100GUIDE_MILKDONE) == 1; ArrayList items = new ArrayList<>(); if (!eggEnchanted) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/RFDDwarf.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/RFDDwarf.java index cfb954d1389..5ab818f1387 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/RFDDwarf.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/RFDDwarf.java @@ -162,8 +162,8 @@ public void setupConditions() inDiningRoom = new ZoneRequirement(diningRoom); inTunnel = new ZoneRequirement(tunnel); - learnedHowToMakeAle = new VarbitRequirement(1891, 1); - givenAle = new VarbitRequirement(1893, 1); + learnedHowToMakeAle = new VarbitRequirement(VarbitID.HUNDRED_DWARF_BEER, 1); + givenAle = new VarbitRequirement(VarbitID.HUNDRED_DWARF_DRUNK, 1); has4AleOrGivenAle = new Conditions(LogicType.OR, asgoldianAle4, givenAle); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/RFDFinal.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/RFDFinal.java index 3acd0cddb69..9f7c4db7238 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/RFDFinal.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/RFDFinal.java @@ -51,6 +51,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -112,11 +113,11 @@ protected void setupRequirements() protected void setupZones() { fightArena = new Zone(new WorldPoint(1889, 5345, 2), new WorldPoint(1910, 5366, 2)); - killedAgrith = new VarbitRequirement(1855, 1); - killedFlambeed = new VarbitRequirement(1855, 2); - killedKaramel = new VarbitRequirement(1855, 3); - killedDessourt = new VarbitRequirement(1855, 4); - killedMother = new VarbitRequirement(1855, 5); + killedAgrith = new VarbitRequirement(VarbitID.HUNDRED_MINIONSKILLED_TALLY, 1); + killedFlambeed = new VarbitRequirement(VarbitID.HUNDRED_MINIONSKILLED_TALLY, 2); + killedKaramel = new VarbitRequirement(VarbitID.HUNDRED_MINIONSKILLED_TALLY, 3); + killedDessourt = new VarbitRequirement(VarbitID.HUNDRED_MINIONSKILLED_TALLY, 4); + killedMother = new VarbitRequirement(VarbitID.HUNDRED_MINIONSKILLED_TALLY, 5); } public void setupConditions() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/RFDLumbridgeGuide.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/RFDLumbridgeGuide.java index c0094048e3e..dc5449b4f82 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/RFDLumbridgeGuide.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/RFDLumbridgeGuide.java @@ -49,6 +49,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -241,6 +242,6 @@ public QuestState getState(Client client) @Override public boolean isCompleted() { - return (client.getVarbitValue(1896) >= 5 || client.getVarbitValue(QuestVarbits.QUEST_RECIPE_FOR_DISASTER.getId()) < 3); + return (client.getVarbitValue(VarbitID._100GUIDE_PROG) >= 5 || client.getVarbitValue(QuestVarbits.QUEST_RECIPE_FOR_DISASTER.getId()) < 3); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/RFDPiratePete.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/RFDPiratePete.java index 20e2b7db03f..f7614226618 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/RFDPiratePete.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recipefordisaster/RFDPiratePete.java @@ -53,6 +53,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -199,16 +200,16 @@ protected void setupZones() public void setupConditions() { inDiningRoom = new ZoneRequirement(diningRoom); - walkingUnderwater = new VarbitRequirement(1871, 1); + walkingUnderwater = new VarbitRequirement(VarbitID.HUNDRED_PIRATE_UNDERWATER_ONFLOOR, 1); askedCookOptions = new Conditions( - new VarbitRequirement(1873, 1), - new VarbitRequirement(1876, 1), - new VarbitRequirement(1877, 1)); + new VarbitRequirement(VarbitID.HUNDRED_PIRATE_MEAT_INTRO, 1), + new VarbitRequirement(VarbitID.HUNDRED_PIRATE_CRUMB_INTRO, 1), + new VarbitRequirement(VarbitID.HUNDRED_PIRATE_COD_INTRO, 1)); inUnderWater = new ZoneRequirement(underwater); - hasEnoughRocks = new VarbitRequirement(1869, 5); + hasEnoughRocks = new VarbitRequirement(VarbitID.HUNDRED_PIRATE_ROCKS, 5); hasCrabMeat = new Conditions(LogicType.OR, crabMeat, groundCrabMeatHighlighted); hasKelp = new Conditions(LogicType.OR, kelp, groundKelpHighlighted); @@ -365,6 +366,6 @@ public QuestState getState(Client client) @Override public boolean isCompleted() { - return (client.getVarbitValue(1895) >= 110 || client.getVarbitValue(QuestVarbits.QUEST_RECIPE_FOR_DISASTER.getId()) < 3); + return (client.getVarbitValue(VarbitID._100_PIRATE_QUEST_VAR) >= 110 || client.getVarbitValue(QuestVarbits.QUEST_RECIPE_FOR_DISASTER.getId()) < 3); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/LadyTableStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/LadyTableStep.java index 5ee1918b82c..8f3713f1f6b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/LadyTableStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/LadyTableStep.java @@ -36,6 +36,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.VarbitChanged; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.ArrayList; import java.util.Collection; @@ -47,12 +48,10 @@ public class LadyTableStep extends DetailedOwnerStep protected Client client; private Statue[] statues; - private final int VARBIT_FINISHED_ROOM = 660; - private final int VARBIT_STATUE_ANSWER = 667; private ObjectStep clickMissingStatue, leaveRoom; - VarbitRequirement finishedRoom = new VarbitRequirement(VARBIT_FINISHED_ROOM, 1); + VarbitRequirement finishedRoom = new VarbitRequirement(VarbitID.RD_ROOM2_COMPLETE, 1); public LadyTableStep(QuestHelper questHelper, Requirement... requirements) { @@ -63,7 +62,7 @@ public LadyTableStep(QuestHelper questHelper, Requirement... requirements) public void startUp() { super.startUp(); - Statue answerStatue = statues[client.getVarbitValue(VARBIT_STATUE_ANSWER)]; + Statue answerStatue = statues[client.getVarbitValue(VarbitID.RD_TEMPLOCK_2)]; clickMissingStatue.setText("Click the " + answerStatue.text + " once it appears."); clickMissingStatue.setWorldPoint(answerStatue.point); } @@ -72,7 +71,7 @@ public void startUp() public void onVarbitChanged(VarbitChanged varbitChanged) { super.onVarbitChanged(varbitChanged); - Statue answerStatue = statues[client.getVarbitValue(VARBIT_STATUE_ANSWER)]; + Statue answerStatue = statues[client.getVarbitValue(VarbitID.RD_TEMPLOCK_2)]; clickMissingStatue.setText("Click the " + answerStatue.text + " once it appears."); clickMissingStatue.setWorldPoint(answerStatue.point); } @@ -99,7 +98,7 @@ public void setupSteps() new Statue("Gold axe", new WorldPoint(2454, 4972, 0)) }; - leaveRoom = new ObjectStep(questHelper, 7302, "Leave through the door to enter the portal and continue."); + leaveRoom = new ObjectStep(questHelper, ObjectID.RD_ROOM2_EXITDOOR, "Leave through the door to enter the portal and continue."); clickMissingStatue = new ObjectStep(questHelper, 0, statues[0].point, "CLick the missing statue."); clickMissingStatue.addAlternateObjects(ObjectID.RD_1G, ObjectID.RD_1S, ObjectID.RD_1B, ObjectID.RD_2G, ObjectID.RD_2S, ObjectID.RD_2B, ObjectID.RD_3G, diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/MsCheevesSetup.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/MsCheevesSetup.java index bbfa4992ce1..2c4942293bf 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/MsCheevesSetup.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/MsCheevesSetup.java @@ -37,6 +37,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.ArrayList; import java.util.List; @@ -77,26 +78,6 @@ public class MsCheevesSetup private VarbitRequirement hasLiquidInTin; ItemRequirement hasGypsumTin, hasTinKeyPrint, hasTinCupricOre, hasTinWithTinOre, hasTinWithAllOre; - private final int VARBIT_NITROUS_OXIDE = 5581; - private final int VARBIT_VIAL_OF_LIQUID = 671; - private final int VARBIT_ACETIC_ACIDE = 672; - private final int VARBIT_CUPRIC_SULFATE = 673; - private final int VARBIT_GYPSUM = 674; - private final int VARBIT_SODIUM_CHLORIDE = 675; - private final int VARBIT_NITROUS_OXIDE_RETRIEVED = 676; - private final int VARBIT_TIN_ORE_POWDER = 677; - private final int VARBIT_CUPRIC_ORE_POWDER = 678; - private final int VARBIT_THREE_VIALS = 679; //(0 -> 3) - - private final int VARBIT_SPADEHEAD_ON_DOOR = 686; //1 - private final int VARBIT_USE_CUPRIC_SULFATE_ON_DOOR = 687; - private final int VARBIT_VIAL_OF_LIQUID_ON_DOOR = 686; // 2 - private final int VARBIT_FIRST_DOOR_OPEN = 686; //3 - - private final int VARBIT_LIQUID_IN_TIN = 689; - - private final int VARBIT_COMPLETE_ROOM = 664; - public MsCheevesSetup(QuestHelper questHelper) { this.questHelper = questHelper; @@ -138,19 +119,19 @@ private void setupSteps() , metalSpade); useSpadeOnBunsenBurner.addIcon(ItemID.RD_METAL_SPADE); - useSpadeHeadOnDoor = new ObjectStep(questHelper, 7342, "Use the spade in your inventory on the door.", + useSpadeHeadOnDoor = new ObjectStep(questHelper, ObjectID.RD_STONE_DOOR, "Use the spade in your inventory on the door.", metalSpadeHead); useSpadeHeadOnDoor.addIcon(ItemID.RD_METAL_SPADE_NO_HANDLE); - useCupricSulfateOnDoor = new ObjectStep(questHelper, 7342, "Use Cupric Sulfate in your inventory on the door.", + useCupricSulfateOnDoor = new ObjectStep(questHelper, ObjectID.RD_STONE_DOOR, "Use Cupric Sulfate in your inventory on the door.", cupricSulfate); useCupricSulfateOnDoor.addIcon(ItemID.RD_CUPRIC_SULPHATE); - useVialOfLiquidOnDoor = new ObjectStep(questHelper, 7342, "Use vial of liquid in your inventory on the door.", + useVialOfLiquidOnDoor = new ObjectStep(questHelper, ObjectID.RD_STONE_DOOR, "Use vial of liquid in your inventory on the door.", vialOfLiquid); useVialOfLiquidOnDoor.addIcon(ItemID.RD_DIHYDROGEN_MONOXIDE); - openDoor = new ObjectStep(questHelper, 7342, "Open the door."); + openDoor = new ObjectStep(questHelper, ObjectID.RD_STONE_DOOR, "Open the door."); useVialOfLiquidOnCakeTin = new DetailedQuestStep(questHelper, "Use a vial of liquid on the tin in your inventory.", tin, vialOfLiquid); @@ -175,7 +156,7 @@ private void setupSteps() useEquipmentOnTin = new DetailedQuestStep(questHelper, "Use your chisel,knife or bronze wires on your tin in your inventory.", tinWithAllOre, chisel, knife, bronzeWire); - leaveRoom = new ObjectStep(questHelper, 7326, new WorldPoint(2478, 4940, 0), "Leave the room by the second door to enter the portal"); + leaveRoom = new ObjectStep(questHelper, ObjectID.RD_ROOM6_EXITDOOR, new WorldPoint(2478, 4940, 0), "Leave the room by the second door to enter the portal"); } private void addSteps() @@ -391,13 +372,13 @@ private void setupConditions() hasBronzeKey = bronzeKey; - hasRetrievedThreeVials = new VarbitRequirement(VARBIT_THREE_VIALS, 3); - hasSpadeHeadOnDoor = new VarbitRequirement(VARBIT_SPADEHEAD_ON_DOOR, 1); - hasCupricSulfateOnDoor = new VarbitRequirement(VARBIT_USE_CUPRIC_SULFATE_ON_DOOR, 1); - hasVialOfLiquidOnDoor = new VarbitRequirement(VARBIT_VIAL_OF_LIQUID_ON_DOOR, 2); - hasFirstDoorOpen = new VarbitRequirement(VARBIT_FIRST_DOOR_OPEN, 3); - finishedRoom = new VarbitRequirement(VARBIT_COMPLETE_ROOM, 1); + hasRetrievedThreeVials = new VarbitRequirement(VarbitID.RD_SPARE_WATER, 3); + hasSpadeHeadOnDoor = new VarbitRequirement(VarbitID.RD_ROOM6_STONE_DOOR, 1); + hasCupricSulfateOnDoor = new VarbitRequirement(VarbitID.RD_REACT_ON_SPADE, 1); + hasVialOfLiquidOnDoor = new VarbitRequirement(VarbitID.RD_ROOM6_STONE_DOOR, 2); + hasFirstDoorOpen = new VarbitRequirement(VarbitID.RD_ROOM6_STONE_DOOR, 3); + finishedRoom = new VarbitRequirement(VarbitID.RD_ROOM6_COMPLETE, 1); - hasLiquidInTin = new VarbitRequirement(VARBIT_LIQUID_IN_TIN, 1); + hasLiquidInTin = new VarbitRequirement(VarbitID.RD_WATER_IN_TIN, 1); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/MsHynnAnswerDialogQuizStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/MsHynnAnswerDialogQuizStep.java index 7731968d1e5..e9caf82dd3f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/MsHynnAnswerDialogQuizStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/MsHynnAnswerDialogQuizStep.java @@ -32,6 +32,8 @@ import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; import net.runelite.api.events.VarbitChanged; +import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.ArrayList; import java.util.List; @@ -40,9 +42,6 @@ public class MsHynnAnswerDialogQuizStep extends ConditionalStep { private QuestStep leaveRoom, talkToMsHynnTerprett; - private final int VARBIT_FINISHED_ROOM = 665; - private final int VARBIT_PUZZLE_SOLUTION = 667; - String[] answers = { "unknown", "10", @@ -69,7 +68,7 @@ public MsHynnAnswerDialogQuizStep(QuestHelper questHelper, QuestStep step, Requi public void startUp() { super.startUp(); - int answerID = client.getVarbitValue(VARBIT_PUZZLE_SOLUTION); + int answerID = client.getVarbitValue(VarbitID.RD_TEMPLOCK_2); if (answerID == 0) { return; @@ -81,7 +80,7 @@ public void startUp() @Override public void onVarbitChanged(VarbitChanged varbitChanged) { - int answerID = client.getVarbitValue(VARBIT_PUZZLE_SOLUTION); + int answerID = client.getVarbitValue(VarbitID.RD_TEMPLOCK_2); if (answerID == 0) { return; @@ -92,8 +91,8 @@ public void onVarbitChanged(VarbitChanged varbitChanged) private void addSteps() { - VarbitRequirement finishedRoomCondition = new VarbitRequirement(VARBIT_FINISHED_ROOM, 1); - leaveRoom = new ObjectStep(questHelper, 7354, "Leave through the door to enter the portal and continue."); + VarbitRequirement finishedRoomCondition = new VarbitRequirement(VarbitID.RD_ROOM7_COMPLETE, 1); + leaveRoom = new ObjectStep(questHelper, ObjectID.RD_ROOM7_EXITDOOR, "Leave through the door to enter the portal and continue."); addStep(finishedRoomCondition, leaveRoom); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/RecruitmentDrive.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/RecruitmentDrive.java index 65c4cce6fe8..8e47577d226 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/RecruitmentDrive.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/RecruitmentDrive.java @@ -183,13 +183,13 @@ private LadyTableStep getLadyTableStep() private QuestStep getSirKuam() { - VarbitRequirement finishedRoom = new VarbitRequirement(661, 1); + VarbitRequirement finishedRoom = new VarbitRequirement(VarbitID.RD_ROOM3_COMPLETE, 1); talkToSirKuam = new NpcStep(this, NpcID.RD_OBSERVER_ROOM_3, "Talk to Sir Kuam Ferentse to have him spawn Sir Leye."); killSirLeye = new NpcStep(this, NpcID.RD_COMBAT_NPC_ROOM_3, "Defeat Sir Leye to win this challenge. You must use the steel warhammer or your barehands to deal the final hit on him.", true); - leaveSirKuamRoom = new ObjectStep(this, 7317, "Leave through the portal to continue."); + leaveSirKuamRoom = new ObjectStep(this, ObjectID.RD_ROOM3_EXITDOOR, "Leave through the portal to continue."); NpcCondition npcCondition = new NpcCondition(NpcID.RD_COMBAT_NPC_ROOM_3); ConditionalStep sirKuamConditional = new ConditionalStep(this, talkToSirKuam); @@ -211,19 +211,19 @@ private QuestStep getSirSpishyus() WorldPoint foxOnRightPoint = new WorldPoint(2485, 4974, 0); WorldPoint grainOnRightPoint = new WorldPoint(2486, 4974, 0); - VarbitRequirement foxOnRightSide = new VarbitRequirement(680, 0); - VarbitRequirement foxOnLeftSide = new VarbitRequirement(681, 1); - VarbitRequirement foxNotOnRightSide = new VarbitRequirement(680, 1); - VarbitRequirement foxNotOnLeftSide = new VarbitRequirement(681, 0); - VarbitRequirement chickenOnRightSide = new VarbitRequirement(682, 0); - VarbitRequirement chickenOnLeftSide = new VarbitRequirement(683, 1); - VarbitRequirement chickenNotOnRightSide = new VarbitRequirement(682, 1); - VarbitRequirement chickenNotOnLeftSide = new VarbitRequirement(683, 0); - VarbitRequirement grainOnRightSide = new VarbitRequirement(684, 0); - VarbitRequirement grainOnLeftSide = new VarbitRequirement(685, 1); - VarbitRequirement grainNotOnRightSide = new VarbitRequirement(684, 1); - VarbitRequirement grainNotOnLeftSide = new VarbitRequirement(685, 0); - VarbitRequirement finishedSpishyus = new VarbitRequirement(659, 1); + VarbitRequirement foxOnRightSide = new VarbitRequirement(VarbitID.RD_FOXLEFT, 0); + VarbitRequirement foxOnLeftSide = new VarbitRequirement(VarbitID.RD_FOXRIGHT, 1); + VarbitRequirement foxNotOnRightSide = new VarbitRequirement(VarbitID.RD_FOXLEFT, 1); + VarbitRequirement foxNotOnLeftSide = new VarbitRequirement(VarbitID.RD_FOXRIGHT, 0); + VarbitRequirement chickenOnRightSide = new VarbitRequirement(VarbitID.RD_CHICKLEFT, 0); + VarbitRequirement chickenOnLeftSide = new VarbitRequirement(VarbitID.RD_CHICKRIGHT, 1); + VarbitRequirement chickenNotOnRightSide = new VarbitRequirement(VarbitID.RD_CHICKLEFT, 1); + VarbitRequirement chickenNotOnLeftSide = new VarbitRequirement(VarbitID.RD_CHICKRIGHT, 0); + VarbitRequirement grainOnRightSide = new VarbitRequirement(VarbitID.RD_GRAINLEFT, 0); + VarbitRequirement grainOnLeftSide = new VarbitRequirement(VarbitID.RD_GRAINRIGHT, 1); + VarbitRequirement grainNotOnRightSide = new VarbitRequirement(VarbitID.RD_GRAINLEFT, 1); + VarbitRequirement grainNotOnLeftSide = new VarbitRequirement(VarbitID.RD_GRAINRIGHT, 0); + VarbitRequirement finishedSpishyus = new VarbitRequirement(VarbitID.RD_ROOM1_COMPLETE, 1); Conditions foxPickedUp = new Conditions(LogicType.AND, foxNotOnLeftSide, foxNotOnRightSide); Conditions chickenPickedUp = new Conditions(LogicType.AND, chickenNotOnRightSide, chickenNotOnLeftSide); @@ -232,7 +232,7 @@ private QuestStep getSirSpishyus() int chickenOnRightId = 7279; moveChickenOnRightToLeft = new ObjectStep(this, chickenOnRightId, chickenOnRightPoint, getSpishyusPickupText("Chicken", true)); - finishedSpishyusRoom = new ObjectStep(this, 7274, "Leave through the portal to continue."); + finishedSpishyusRoom = new ObjectStep(this, ObjectID.RD_ROOM1_EXITDOOR, "Leave through the portal to continue."); int foxOnRightId = 7275; moveFoxOnRightToLeft = new ObjectStep(this, foxOnRightId, foxOnRightPoint, @@ -295,7 +295,7 @@ private String getSpishyusMoveText(String itemName, boolean rightSide) private QuestStep getSirRenItchood() { - NpcStep talkToSirRenItchood = new NpcStep(this, NpcID.RD_OBSERVER_ROOM_5, "Talk to Sir Ren Itchood to recieve the clue."); + NpcStep talkToSirRenItchood = new NpcStep(this, NpcID.RD_OBSERVER_ROOM_5, "Talk to Sir Ren Itchood to receive the clue."); talkToSirRenItchood.addDialogSteps("Can I have the clue for the door?"); sirRenStep = new SirRenItchoodStep(this, talkToSirRenItchood); @@ -308,10 +308,10 @@ private QuestStep getSirTinley() "Talk to Sir Tinley. \n Once you have pressed continue do not do anything or you will fail."); doNothingStep = new DetailedQuestStep(this, "Press Continue and do nothing. Sir Tinley will eventually talk to you and let you pass."); - leaveSirTinleyRoom = new ObjectStep(this, 7320, "Leave through the portal to continue."); + leaveSirTinleyRoom = new ObjectStep(this, ObjectID.RD_ROOM4_EXITDOOR, "Leave through the portal to continue."); VarbitRequirement waitForCondition = new VarbitRequirement(VarbitID.RD_TEMPLOCK_2, 1, Operation.GREATER_EQUAL); - VarbitRequirement finishedRoom = new VarbitRequirement(662, 1); + VarbitRequirement finishedRoom = new VarbitRequirement(VarbitID.RD_ROOM4_COMPLETE, 1); ConditionalStep sirTinleyStep = new ConditionalStep(this, talkToSirTinley); sirTinleyStep.addStep(finishedRoom, leaveSirTinleyRoom); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/SirRenItchoodStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/SirRenItchoodStep.java index cdbfac526bc..b7c1e17cf30 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/SirRenItchoodStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/recruitmentdrive/SirRenItchoodStep.java @@ -34,6 +34,8 @@ import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; import net.runelite.api.events.VarbitChanged; +import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.ArrayList; import java.util.List; @@ -46,9 +48,6 @@ public class SirRenItchoodStep extends ConditionalStep "NULL", "TIME", "FISH", "RAIN", "BITE", "MEAT", "LAST" }; - private final int VARBIT_FINISHED_ROOM = 663; - private final int VARBIT_ANSWER = 666; - private Requirement answerWidgetOpen; private DoorPuzzle enterDoorcode; private QuestStep talkToRen, openAnswerWidget, leaveRoom; @@ -66,7 +65,7 @@ public SirRenItchoodStep(QuestHelper questHelper, QuestStep step, Requirement... public void startUp() { super.startUp(); - int answerID = client.getVarbitValue(VARBIT_ANSWER); + int answerID = client.getVarbitValue(VarbitID.RD_TEMPLOCK_1); if (answerID == 0) { return; @@ -79,7 +78,7 @@ public void startUp() public void onVarbitChanged(VarbitChanged varbitChanged) { super.onVarbitChanged(varbitChanged); - int answerID = client.getVarbitValue(VARBIT_ANSWER); + int answerID = client.getVarbitValue(VarbitID.RD_TEMPLOCK_1); if (answerID == 0) { return; @@ -90,11 +89,11 @@ public void onVarbitChanged(VarbitChanged varbitChanged) private void addRenSteps() { - finishedRoomCondition = new VarbitRequirement(VARBIT_FINISHED_ROOM, 1); - openAnswerWidget = new ObjectStep(questHelper, 7323, "Open the door to be prompted to enter a code."); + finishedRoomCondition = new VarbitRequirement(VarbitID.RD_ROOM5_COMPLETE, 1); + openAnswerWidget = new ObjectStep(questHelper, ObjectID.RD_ROOM5_EXITDOOR, "Open the door to be prompted to enter a code."); answerWidgetOpen = new WidgetTextRequirement(285, 55, "Combination Lock Door"); enterDoorcode = new DoorPuzzle(questHelper, "NONE"); - leaveRoom = new ObjectStep(questHelper, 7323, "Leave through the door to enter the portal and continue."); + leaveRoom = new ObjectStep(questHelper, ObjectID.RD_ROOM5_EXITDOOR, "Leave through the door to enter the portal and continue."); addStep(finishedRoomCondition, leaveRoom); addStep(new Conditions(answerWidgetOpen), enterDoorcode); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/regicide/Regicide.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/regicide/Regicide.java index 5a54f5185a0..c94c17b5ffe 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/regicide/Regicide.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/regicide/Regicide.java @@ -50,6 +50,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -421,19 +422,19 @@ private void setupConditions() guardNearby = new NpcInteractingRequirement(NpcID.REGICIDE_OLD_CAMP_GUARD, NpcID.REGICIDE_TYRAS_CAMP_GUARD); // Guard appeared, 8446 0->1 // Gone through dart trap, 8450 0->1 - hasReadBook = new VarbitRequirement(8453, 1); - knowHowToMakeFuse = new VarbitRequirement(8455, 1); - askedAboutBarrel = new VarbitRequirement(8456, 1); - askedAboutSulphur = new VarbitRequirement(8457, 1); - askedAboutQuicklime = new VarbitRequirement(8458, 1); - askedAboutNaptha = new VarbitRequirement(8459, 1); + hasReadBook = new VarbitRequirement(VarbitID.REGICIDE_READ_BOOK, 1); + knowHowToMakeFuse = new VarbitRequirement(VarbitID.REGICIDE_FUSE_CHAT, 1); + askedAboutBarrel = new VarbitRequirement(VarbitID.REGICIDE_BARREL_CHAT, 1); + askedAboutSulphur = new VarbitRequirement(VarbitID.REGICIDE_SULPHUR_CHAT, 1); + askedAboutQuicklime = new VarbitRequirement(VarbitID.REGICIDE_QUICKLIME_CHAT, 1); + askedAboutNaptha = new VarbitRequirement(VarbitID.REGICIDE_NAPHTHA_CHAT, 1); knowHowToMakeBomb = new Conditions(hasReadBook, knowHowToMakeFuse, askedAboutBarrel, askedAboutQuicklime, askedAboutSulphur, askedAboutNaptha); hadGroundQuicklime = new Conditions(true, groundQuicklime); hadGroundSulphur = new Conditions(true, groundSulphur); - talkedToChemist = new VarbitRequirement(8449, 1); - coalInStill = new VarbitRequirement(8448, 1); - givenRabbit = new VarbitRequirement(8447, 1); + talkedToChemist = new VarbitRequirement(VarbitID.REGICIDE_CHEMIST_CHAT, 1); + coalInStill = new VarbitRequirement(VarbitID.REGICIDE_HAD_TAR, 1); + givenRabbit = new VarbitRequirement(VarbitID.REGICIDE_GIVEN_RABBIT, 1); arianwynNearby = new NpcInteractingRequirement(NpcID.REGICIDE_GOOD_ELF3); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/romeoandjuliet/RomeoAndJuliet.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/romeoandjuliet/RomeoAndJuliet.java index 4d41d8a334d..a3429528a95 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/romeoandjuliet/RomeoAndJuliet.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/romeoandjuliet/RomeoAndJuliet.java @@ -26,9 +26,8 @@ import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; -import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; @@ -36,72 +35,61 @@ import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; -import java.util.*; - public class RomeoAndJuliet extends BasicQuestHelper { - //Items Required - ItemRequirement cadavaBerry, letter, potion; - - Requirement inJulietRoom; + // Required items + ItemRequirement cadavaBerry; - QuestStep talkToRomeo, goUpToJuliet, talkToJuliet, giveLetterToRomeo, talkToLawrence, talkToApothecary, goUpToJuliet2, givePotionToJuliet, finishQuest; - - //Zones + // Zones Zone julietRoom; - @Override - public Map loadSteps() - { - initializeRequirements(); - setupConditions(); - setupSteps(); - Map steps = new HashMap<>(); + // Miscellaneous requirements + ItemRequirement letter; + ItemRequirement cadavaPotion; + ZoneRequirement inJulietRoom; - steps.put(0, talkToRomeo); + // Steps + NpcStep talkToRomeo; - ConditionalStep tellJulietAboutRomeo = new ConditionalStep(this, goUpToJuliet); - tellJulietAboutRomeo.addStep(inJulietRoom, talkToJuliet); + ObjectStep goUpToJuliet; + NpcStep talkToJuliet; - steps.put(10, tellJulietAboutRomeo); - steps.put(20, giveLetterToRomeo); - steps.put(30, talkToLawrence); - steps.put(40, talkToApothecary); + ObjectStep goDownstairsToGiveLetterToRomeo; + NpcStep giveLetterToRomeo; - ConditionalStep bringPotionToJuliet = new ConditionalStep(this, talkToApothecary); - bringPotionToJuliet.addStep(new Conditions(potion, inJulietRoom), givePotionToJuliet); - bringPotionToJuliet.addStep(potion, goUpToJuliet2); + NpcStep talkToLawrence; + NpcStep talkToApothecary; + ObjectStep goUpToJuliet2; + NpcStep givePotionToJuliet; - steps.put(50, bringPotionToJuliet); - steps.put(60, finishQuest); + ObjectStep goDownstairsToFinishQuest; + NpcStep finishQuest; - return steps; + @Override + protected void setupZones() + { + julietRoom = new Zone(new WorldPoint(3147, 3425, 1), new WorldPoint(3166, 3443, 1)); } @Override protected void setupRequirements() { + inJulietRoom = new ZoneRequirement(julietRoom); + cadavaBerry = new ItemRequirement("Cadava berries", ItemID.CADAVABERRIES); cadavaBerry.setTooltip("You can pick some from bushes south east of Varrock"); letter = new ItemRequirement("Message", ItemID.JULIETMESSAGE); letter.setTooltip("You can get another from Juliet"); - potion = new ItemRequirement("Cadava potion", ItemID.CADAVA); - } - - public void setupConditions() - { - inJulietRoom = new ZoneRequirement(julietRoom); - } - - @Override - protected void setupZones() - { - julietRoom = new Zone(new WorldPoint(3147, 3425, 1), new WorldPoint(3166, 3443, 1)); + cadavaPotion = new ItemRequirement("Cadava potion", ItemID.CADAVA); } public void setupSteps() @@ -109,31 +97,70 @@ public void setupSteps() talkToRomeo = new NpcStep(this, NpcID.ROMEO, new WorldPoint(3211, 3422, 0), "Talk to Romeo in Varrock Square."); talkToRomeo.addDialogStep("Yes, I have seen her actually!"); talkToRomeo.addDialogStep("Yes, ok, I'll let her know."); + talkToRomeo.addDialogStep("Yes."); goUpToJuliet = new ObjectStep(this, ObjectID.FAI_VARROCK_STAIRS_TALLER, new WorldPoint(3157, 3436, 0), "Talk to Juliet in the house west of Varrock."); goUpToJuliet.addDialogStep("Ok, thanks."); talkToJuliet = new NpcStep(this, NpcID.JULIET, new WorldPoint(3158, 3427, 1), "Talk to Juliet in the house west of Varrock."); talkToJuliet.addSubSteps(goUpToJuliet); + goDownstairsToGiveLetterToRomeo = new ObjectStep(this, ObjectID.FAI_VARROCK_STAIRS_TOP, new WorldPoint(3156, 3435, 1), "Bring the letter to Romeo in Varrock Square.", letter); giveLetterToRomeo = new NpcStep(this, NpcID.ROMEO, new WorldPoint(3211, 3422, 0), "Bring the letter to Romeo in Varrock Square.", letter); + giveLetterToRomeo.addSubSteps(goDownstairsToGiveLetterToRomeo); + talkToLawrence = new NpcStep(this, NpcID.FATHER_LAWRENCE, new WorldPoint(3254, 3483, 0), "Talk to Father Lawrence in north east Varrock."); talkToLawrence.addDialogStep("Ok, thanks."); - talkToApothecary = new NpcStep(this, NpcID.APOTHECARY, new WorldPoint(3195, 3405, 0), "Bring the cadava berries to the Apothecary in south east Varrock.", cadavaBerry); + talkToApothecary = new NpcStep(this, NpcID.APOTHECARY, new WorldPoint(3195, 3405, 0), "Bring the cadava berries to the Apothecary in south west Varrock.", cadavaBerry); talkToApothecary.addDialogStep("Talk about something else."); talkToApothecary.addDialogStep("Talk about Romeo & Juliet."); - goUpToJuliet2 = new ObjectStep(this, ObjectID.FAI_VARROCK_STAIRS_TALLER, new WorldPoint(3157, 3436, 0), "Bring the potion to Juliet in the house west of Varrock.", potion); - givePotionToJuliet = new NpcStep(this, NpcID.JULIET, new WorldPoint(3158, 3427, 1), "Bring the potion to Juliet in the house west of Varrock.", potion); + goUpToJuliet2 = new ObjectStep(this, ObjectID.FAI_VARROCK_STAIRS_TALLER, new WorldPoint(3157, 3436, 0), "Bring the potion to Juliet in the house west of Varrock.", cadavaPotion); + givePotionToJuliet = new NpcStep(this, NpcID.JULIET, new WorldPoint(3158, 3427, 1), "Bring the potion to Juliet in the house west of Varrock.", cadavaPotion); givePotionToJuliet.addSubSteps(goUpToJuliet2); + goDownstairsToFinishQuest = new ObjectStep(this, ObjectID.FAI_VARROCK_STAIRS_TOP, new WorldPoint(3156, 3435, 1), "Talk to Romeo in Varrock Square to finish the quest."); finishQuest = new NpcStep(this, NpcID.ROMEO, new WorldPoint(3211, 3422, 0), "Talk to Romeo in Varrock Square to finish the quest."); + finishQuest.addSubSteps(goDownstairsToFinishQuest); + } + + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + steps.put(0, talkToRomeo); + var tellJulietAboutRomeo = new ConditionalStep(this, goUpToJuliet); + tellJulietAboutRomeo.addStep(inJulietRoom, talkToJuliet); + + steps.put(10, tellJulietAboutRomeo); + + var giveLetterToRomeo = new ConditionalStep(this, this.giveLetterToRomeo); + giveLetterToRomeo.addStep(inJulietRoom, goDownstairsToGiveLetterToRomeo); + steps.put(20, giveLetterToRomeo); + steps.put(30, talkToLawrence); + steps.put(40, talkToApothecary); + + var bringPotionToJuliet = new ConditionalStep(this, talkToApothecary); + bringPotionToJuliet.addStep(and(cadavaPotion, inJulietRoom), givePotionToJuliet); + bringPotionToJuliet.addStep(cadavaPotion, goUpToJuliet2); + + steps.put(50, bringPotionToJuliet); + + var cFinishQuest = new ConditionalStep(this, finishQuest); + giveLetterToRomeo.addStep(inJulietRoom, goDownstairsToFinishQuest); + steps.put(60, cFinishQuest); + + return steps; } @Override public List getItemRequirements() { - ArrayList reqs = new ArrayList<>(); - reqs.add(cadavaBerry); - return reqs; + return List.of( + cadavaBerry + ); } @Override @@ -145,11 +172,26 @@ public QuestPointReward getQuestPointReward() @Override public List getPanels() { - List allSteps = new ArrayList<>(); - - allSteps.add(new PanelDetails("Helping Romeo", Arrays.asList(talkToRomeo, talkToJuliet, giveLetterToRomeo))); - allSteps.add(new PanelDetails("Hatching a plan", Arrays.asList(talkToLawrence, talkToApothecary), cadavaBerry)); - allSteps.add(new PanelDetails("Enact the plan", Arrays.asList(givePotionToJuliet, finishQuest))); - return allSteps; + var sections = new ArrayList(); + + sections.add(new PanelDetails("Helping Romeo", List.of( + talkToRomeo, + talkToJuliet, + giveLetterToRomeo + ))); + + sections.add(new PanelDetails("Hatching a plan", List.of( + talkToLawrence, + talkToApothecary + ), List.of( + cadavaBerry + ))); + + sections.add(new PanelDetails("Enact the plan", List.of( + givePotionToJuliet, + finishQuest + ))); + + return sections; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/royaltrouble/RoyalTrouble.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/royaltrouble/RoyalTrouble.java index fa16f7bcd4a..696a2810a09 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/royaltrouble/RoyalTrouble.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/royaltrouble/RoyalTrouble.java @@ -332,13 +332,13 @@ public void setupConditions() hasCoalOrPickaxe = coal5; } - astridIsHeir = new VarbitRequirement(14607, 0); // Goes to 1 for Brand - isMarryingNotFriend = new VarbitRequirement(14608, 0); // Goes to 1 for friend - startedInvestigation = new VarbitRequirement(2141, 10); + astridIsHeir = new VarbitRequirement(VarbitID.MISC_PARTNER_MULTIVAR, 0); // Goes to 1 for Brand + isMarryingNotFriend = new VarbitRequirement(VarbitID.MISC_NO_ROMANCE_MULTIVAR, 0); // Goes to 1 for friend + startedInvestigation = new VarbitRequirement(VarbitID.ROYAL_MISC, 10); reportedToVargas = new VarbitRequirement(VarbitID.ROYAL_MISC, 20, Operation.GREATER_EQUAL); - talkedToGhrimInInvestigation = new VarbitRequirement(2141, 30); - talkedToSailor = new VarbitRequirement(2141, 40); - gottenScrollFromVargas = new VarbitRequirement(2141, 50); + talkedToGhrimInInvestigation = new VarbitRequirement(VarbitID.ROYAL_MISC, 30); + talkedToSailor = new VarbitRequirement(VarbitID.ROYAL_MISC, 40); + gottenScrollFromVargas = new VarbitRequirement(VarbitID.ROYAL_MISC, 50); enteredDungeon = new VarbitRequirement(VarbitID.ROYAL_MISC, 60, Operation.GREATER_EQUAL); // Missing 70 talkedToDonal = new VarbitRequirement(VarbitID.ROYAL_MISC, 80, Operation.GREATER_EQUAL); @@ -346,41 +346,41 @@ public void setupConditions() talkedToKids = new VarbitRequirement(VarbitID.ROYAL_MISC, 110, Operation.GREATER_EQUAL); killedBoss = new VarbitRequirement(VarbitID.ROYAL_MISC, 120, Operation.GREATER_EQUAL); - talkedToSigrid = new VarbitRequirement(2142, 10); + talkedToSigrid = new VarbitRequirement(VarbitID.ROYAL_ETC, 10); reportedToSigrid = new VarbitRequirement(VarbitID.ROYAL_ETC, 20, Operation.GREATER_EQUAL); - finishedFinalConvoWithSigrid = new VarbitRequirement(2142, 40); + finishedFinalConvoWithSigrid = new VarbitRequirement(VarbitID.ROYAL_ETC, 40); - talkedToMiscSubject = new VarbitRequirement(2143, 1); + talkedToMiscSubject = new VarbitRequirement(VarbitID.ROYAL_MISC_VILLAGERS_ABOUTTHEFTS, 1); talkedToEtcSubject = new VarbitRequirement(VarbitID.ROYAL_ETC_VILLAGERS_ABOUTTHEFTS, 1, Operation.GREATER_EQUAL); - usedProp = new VarbitRequirement(2145, 1); - hasUsedPulley = new VarbitRequirement(2146, 1); - hasUsedLongerPulley = new VarbitRequirement(2146, 2); - hasUsedPulley2 = new VarbitRequirement(2146, 3); - hasUsedRope = new VarbitRequirement(2146, 4); - hasUsedBeam = new VarbitRequirement(2146, 5); - hasUsedEngine = new VarbitRequirement(2146, 6); + usedProp = new VarbitRequirement(VarbitID.ROYAL_MISC_USEDMININGPROP, 1); + hasUsedPulley = new VarbitRequirement(VarbitID.ROYAL_LIFTSTAGE, 1); + hasUsedLongerPulley = new VarbitRequirement(VarbitID.ROYAL_LIFTSTAGE, 2); + hasUsedPulley2 = new VarbitRequirement(VarbitID.ROYAL_LIFTSTAGE, 3); + hasUsedRope = new VarbitRequirement(VarbitID.ROYAL_LIFTSTAGE, 4); + hasUsedBeam = new VarbitRequirement(VarbitID.ROYAL_LIFTSTAGE, 5); + hasUsedEngine = new VarbitRequirement(VarbitID.ROYAL_LIFTSTAGE, 6); hasRepairedScaffold = new VarbitRequirement(VarbitID.ROYAL_LIFTSTAGE, 7, Operation.GREATER_EQUAL); - has1CoalInEngine = new VarbitRequirement(2156, 1); - has2CoalInEngine = new VarbitRequirement(2156, 2); - has3CoalInEngine = new VarbitRequirement(2156, 3); - has4CoalInEngine = new VarbitRequirement(2156, 4); - hasFullEngine = new VarbitRequirement(2156, 5); + has1CoalInEngine = new VarbitRequirement(VarbitID.ROYAL_COALINENGINE, 1); + has2CoalInEngine = new VarbitRequirement(VarbitID.ROYAL_COALINENGINE, 2); + has3CoalInEngine = new VarbitRequirement(VarbitID.ROYAL_COALINENGINE, 3); + has4CoalInEngine = new VarbitRequirement(VarbitID.ROYAL_COALINENGINE, 4); + hasFullEngine = new VarbitRequirement(VarbitID.ROYAL_COALINENGINE, 5); - attachedRope = new VarbitRequirement(2147, 1); + attachedRope = new VarbitRequirement(VarbitID.ROYAL_MISC_ROPELOC, 1); inPlankRoom = new ZoneRequirement(plankRoom); - seenFire = new VarbitRequirement(2154, 1); + seenFire = new VarbitRequirement(VarbitID.ROYAL_NOTICED_FIRES, 1); searchedFire1 = new VarbitRequirement(VarbitID.ROYAL_MISC_NUMBEROFCHAPTERS, 1, Operation.GREATER_EQUAL); - searchedFire2 = new VarbitRequirement(2148, 2); - searchedFire3 = new VarbitRequirement(2148, 3); + searchedFire2 = new VarbitRequirement(VarbitID.ROYAL_MISC_NUMBEROFCHAPTERS, 2); + searchedFire3 = new VarbitRequirement(VarbitID.ROYAL_MISC_NUMBEROFCHAPTERS, 3); searchedFire4 = new VarbitRequirement(VarbitID.ROYAL_MISC_NUMBEROFCHAPTERS, 4, Operation.GREATER_EQUAL); searchedFire5 = new VarbitRequirement(VarbitID.ROYAL_MISC_NUMBEROFCHAPTERS, 5, Operation.GREATER_EQUAL); // TODO: hasReadDiary probably wrong varbit, need to verify - hasReadDiary = new VarbitRequirement(2149, 1); - enteredSnakeRoom = new VarbitRequirement(2157, 1); + hasReadDiary = new VarbitRequirement(VarbitID.ROYAL_MISC_DIARYCHAPTER1READ, 1); + enteredSnakeRoom = new VarbitRequirement(VarbitID.ROYAL_MEDDLINGKIDS_CUTSCENE, 1); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/rumdeal/RumDeal.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/rumdeal/RumDeal.java index fa9f05c4895..69b1e0e51d9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/rumdeal/RumDeal.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/rumdeal/RumDeal.java @@ -51,6 +51,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -302,11 +303,11 @@ public void setupConditions() onNorthIsland = new ZoneRequirement(northIsland); inSpiderRoom = new ZoneRequirement(spiderRoom); - rakedPatch = new VarbitRequirement(1366, 3); - plantedPatch = new VarbitRequirement(1366, 4); - grownPatch = new VarbitRequirement(1366, 5); + rakedPatch = new VarbitRequirement(VarbitID.DEAL_FARMING, 3); + plantedPatch = new VarbitRequirement(VarbitID.DEAL_FARMING, 4); + grownPatch = new VarbitRequirement(VarbitID.DEAL_FARMING, 5); - added5Sluglings = new VarbitRequirement(1354, 5); + added5Sluglings = new VarbitRequirement(VarbitID.DEAL_BARREL, 5); evilSpiritNearby = new NpcCondition(NpcID.DEAL_EVIL_SPIRIT); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/runemysteries/RuneMysteries.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/runemysteries/RuneMysteries.java index aa38c146d07..479201ca3c6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/runemysteries/RuneMysteries.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/runemysteries/RuneMysteries.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, Zoinkwiz + * Copyright (c) 2025, pajlada * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,8 +28,9 @@ import net.runelite.client.plugins.microbot.questhelper.collections.ItemCollections; import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; -import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; +import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; @@ -38,65 +40,70 @@ import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import net.runelite.client.plugins.microbot.questhelper.util.QHObjectID; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; - -import java.util.*; - -import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; +import net.runelite.api.gameval.VarbitID; public class RuneMysteries extends BasicQuestHelper { - //Items Required - ItemRequirement airTalisman, researchPackage, notes; - - //Items Recommended - ItemRequirement varrockTeleport, wizardTeleport; - - Requirement inUpstairsLumbridge, inWizardBasement; - - QuestStep goUpToHoracio, talkToHoracio, goF1ToF0LumbridgeCastle, goDownToSedridor, talkToSedridor, finishTalkingToSedridor, talkToAubury, talkToAudburyAgain, goDownToSedridor2, talkToSedridor2; - - //Zones - Zone wizardBasement, upstairsLumbridge; + // Recommended items + ItemRequirement varrockTeleport; + ItemRequirement wizardTeleport; + + // Zones + Zone wizardBasement; + Zone upstairsLumbridge; + + // Miscellaneous requirements + ItemRequirement airTalisman; + ItemRequirement researchPackage; + ItemRequirement notes; + + ZoneRequirement inUpstairsLumbridge; + ZoneRequirement inWizardBasement; + + VarbitRequirement needsToGrabPackage; + VarbitRequirement needsToGrabResearchNotes; + VarbitRequirement hasGivenSedridorTheNotes; + + // Steps + ObjectStep goUpToHoracio; + NpcStep talkToHoracio; + ObjectStep goF1ToF0LumbridgeCastle; + ObjectStep goDownToSedridor; + NpcStep bringTalismanToSedridor; + ObjectStep goDownToSedridorAfterHandingInAirTalisman; + NpcStep getResearchPackageFromSedridor; + NpcStep deliverPackageToAubury; + NpcStep talkToAudburyAgain; + ObjectStep goDownToSedridor2; + NpcStep deliverResearchNotesToSedridor; + NpcStep talkToSedridorAfterGivingHimTheNotes; @Override - public Map loadSteps() + protected void setupZones() { - initializeRequirements(); - setupConditions(); - setupSteps(); - Map steps = new HashMap<>(); - - ConditionalStep goTalkToHoracio = new ConditionalStep(this, goUpToHoracio); - goTalkToHoracio.addStep(inUpstairsLumbridge, talkToHoracio); - - steps.put(0, goTalkToHoracio); - - ConditionalStep goTalkToSedridor = new ConditionalStep(this, goDownToSedridor); - goTalkToSedridor.addStep(and(airTalisman, inUpstairsLumbridge), goF1ToF0LumbridgeCastle); - goTalkToSedridor.addStep(inWizardBasement, talkToSedridor); - - steps.put(1, goTalkToSedridor); - - steps.put(2, finishTalkingToSedridor); - - steps.put(3, talkToAubury); - - steps.put(4, talkToAudburyAgain); - - ConditionalStep goTalkToSedridor2 = new ConditionalStep(this, goDownToSedridor2); - goTalkToSedridor2.addStep(inWizardBasement, talkToSedridor2); - steps.put(5, goTalkToSedridor2); - - return steps; + upstairsLumbridge = new Zone(new WorldPoint(3203, 3206, 1), new WorldPoint(3218, 3231, 1)); + wizardBasement = new Zone(new WorldPoint(3094, 9553, 0), new WorldPoint(3125, 9582, 0)); } @Override protected void setupRequirements() { + inUpstairsLumbridge = new ZoneRequirement(upstairsLumbridge); + inWizardBasement = new ZoneRequirement(wizardBasement); + + needsToGrabPackage = new VarbitRequirement(VarbitID.RUNEMYSTERIES_PACKAGE, 0); + needsToGrabResearchNotes = new VarbitRequirement(VarbitID.RUNEMYSTERIES_NOTES, 0); + hasGivenSedridorTheNotes = new VarbitRequirement(VarbitID.RUNEMYSTERIES_NOTES_GIVEN, 1); + airTalisman = new ItemRequirement("Air talisman", ItemID.AIR_TALISMAN).isNotConsumed(); airTalisman.setTooltip("You can get another from Duke Horacio if you lost it"); researchPackage = new ItemRequirement("Research package", ItemID.RESEARCH_PACKAGE); @@ -107,58 +114,92 @@ protected void setupRequirements() wizardTeleport = new ItemRequirement("A teleport to the Wizard's Tower", ItemCollections.NECKLACE_OF_PASSAGES); } - public void setupConditions() - { - inUpstairsLumbridge = new ZoneRequirement(upstairsLumbridge); - inWizardBasement = new ZoneRequirement(wizardBasement); - } - - @Override - protected void setupZones() - { - upstairsLumbridge = new Zone(new WorldPoint(3203, 3206, 1), new WorldPoint(3218, 3231, 1)); - wizardBasement = new Zone(new WorldPoint(3094, 9553, 0), new WorldPoint(3125, 9582, 0)); - } - public void setupSteps() { - goUpToHoracio = new ObjectStep(this, ObjectID.SPIRALSTAIRS, new WorldPoint(3205, 3208, 0), "Talk to Duke Horacio on the first floor of Lumbridge castle."); - talkToHoracio = new NpcStep(this, NpcID.DUKE_OF_LUMBRIDGE, new WorldPoint(3210, 3220, 1), "Talk to Duke Horacio on the first floor of Lumbridge castle."); + goUpToHoracio = new ObjectStep(this, QHObjectID.LUMBRIDGE_CASTLE_F0_SOUTH_STAIRCASE, new WorldPoint(3205, 3208, 0), "Talk to Duke Horacio on the first floor of Lumbridge castle."); + + talkToHoracio = new NpcStep(this, NpcID.DUKE_OF_LUMBRIDGE, new WorldPoint(3209, 3222, 1), "Talk to Duke Horacio on the first floor of Lumbridge castle."); talkToHoracio.addDialogStep("Have you any quests for me?"); talkToHoracio.addDialogStep("Yes."); talkToHoracio.addSubSteps(goUpToHoracio); goF1ToF0LumbridgeCastle = new ObjectStep(this, ObjectID.SPIRALSTAIRSMIDDLE, new WorldPoint(3204, 3207, 1), - "Bring the Air Talisman to Sedridor in the Wizard Tower's basement."); + "Bring the Air Talisman to Sedridor in the Wizard Tower's basement.", airTalisman); + goF1ToF0LumbridgeCastle.addDialogStep("Climb down the stairs."); goDownToSedridor = new ObjectStep(this, ObjectID.WIZARDS_TOWER_LADDERTOP, new WorldPoint(3104, 3162, 0), "Bring the Air Talisman to Sedridor in the Wizard Tower's basement.", airTalisman); goDownToSedridor.addDialogStep("Have you any quests for me?"); - talkToSedridor = new NpcStep(this, NpcID.HEAD_WIZARD_1OP, new WorldPoint(3104, 9571, 0), "Bring the Air Talisman to Sedridor in the Wizard Tower's basement.", airTalisman); - talkToSedridor.addDialogStep("I'm looking for the head wizard."); - talkToSedridor.addDialogStep("Okay, here you are."); + bringTalismanToSedridor = new NpcStep(this, NpcID.HEAD_WIZARD_1OP, new WorldPoint(3104, 9571, 0), "Bring the Air Talisman to Sedridor in the Wizard Tower's basement.", airTalisman); + bringTalismanToSedridor.addDialogStep("I'm looking for the head wizard."); + bringTalismanToSedridor.addDialogStep("Okay, here you are."); + + bringTalismanToSedridor.addSubSteps(goDownToSedridor, goF1ToF0LumbridgeCastle); - finishTalkingToSedridor = new NpcStep(this, NpcID.HEAD_WIZARD_1OP, new WorldPoint(3104, 9571, 0), "Accept taking the package for Sedridor."); - finishTalkingToSedridor.addDialogStep("Yes, certainly."); + goDownToSedridorAfterHandingInAirTalisman = new ObjectStep(this, ObjectID.WIZARDS_TOWER_LADDERTOP, new WorldPoint(3104, 3162, 0), "Talk to Sedridor in the Wizard Tower's basement and accept the Research Package."); + goDownToSedridorAfterHandingInAirTalisman.addDialogStep("Have you any quests for me?"); - talkToSedridor.addSubSteps(goDownToSedridor, finishTalkingToSedridor, goF1ToF0LumbridgeCastle); + getResearchPackageFromSedridor = new NpcStep(this, NpcID.HEAD_WIZARD_1OP, new WorldPoint(3104, 9571, 0), "Talk to Sedridor in the Wizard Tower's basement and accept the Research Package."); + getResearchPackageFromSedridor.addDialogSteps("Go ahead.", "Actually, I'm not interested.", "Yes, certainly."); + getResearchPackageFromSedridor.addSubSteps(goDownToSedridorAfterHandingInAirTalisman); - talkToAubury = new NpcStep(this, NpcID.AUBURY_2OP, new WorldPoint(3253, 3401, 0), "Bring the Research Package to Aubury in south east Varrock.", researchPackage); - talkToAubury.addDialogStep("I've been sent here with a package for you."); + deliverPackageToAubury = new NpcStep(this, NpcID.AUBURY_2OP, new WorldPoint(3253, 3401, 0), "Bring the Research Package to Aubury in south east Varrock.", researchPackage); + deliverPackageToAubury.addDialogStep("I've been sent here with a package for you."); + deliverPackageToAubury.addTeleport(varrockTeleport); talkToAudburyAgain = new NpcStep(this, NpcID.AUBURY_2OP, new WorldPoint(3253, 3401, 0), "Talk to Aubury again in south east Varrock."); goDownToSedridor2 = new ObjectStep(this, ObjectID.WIZARDS_TOWER_LADDERTOP, new WorldPoint(3104, 3162, 0), "Bring the research notes to Sedridor in the Wizard Tower's basement.", notes); - talkToSedridor2 = new NpcStep(this, NpcID.HEAD_WIZARD_1OP, new WorldPoint(3104, 9571, 0), "Bring the notes to Sedridor in the Wizard Tower's basement.", notes); - talkToSedridor2.addSubSteps(goDownToSedridor2); + deliverResearchNotesToSedridor = new NpcStep(this, NpcID.HEAD_WIZARD_1OP, new WorldPoint(3104, 9571, 0), "Bring the notes to Sedridor in the Wizard Tower's basement.", notes); + talkToSedridorAfterGivingHimTheNotes = new NpcStep(this, NpcID.HEAD_WIZARD_1OP, new WorldPoint(3104, 9571, 0), "Talk to Sedridor in the Wizard Tower's basement to finish the quest."); + deliverResearchNotesToSedridor.addSubSteps(goDownToSedridor2, talkToSedridorAfterGivingHimTheNotes); + } + + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + var goTalkToHoracio = new ConditionalStep(this, goUpToHoracio); + goTalkToHoracio.addStep(inUpstairsLumbridge, talkToHoracio); + + steps.put(0, goTalkToHoracio); + + var goTalkToSedridor = new ConditionalStep(this, goDownToSedridor); + goTalkToSedridor.addStep(and(airTalisman, inUpstairsLumbridge), goF1ToF0LumbridgeCastle); + goTalkToSedridor.addStep(inWizardBasement, bringTalismanToSedridor); + + steps.put(1, goTalkToSedridor); + + var getPackageFromSedridor = new ConditionalStep(this, goDownToSedridorAfterHandingInAirTalisman); + getPackageFromSedridor.addStep(inWizardBasement, getResearchPackageFromSedridor); + steps.put(2, getPackageFromSedridor); + + var cDeliverPackageToAbury = new ConditionalStep(this, deliverPackageToAubury); + cDeliverPackageToAbury.addStep(and(inWizardBasement, needsToGrabPackage), getResearchPackageFromSedridor); + cDeliverPackageToAbury.addStep(needsToGrabPackage, goDownToSedridorAfterHandingInAirTalisman); + steps.put(3, cDeliverPackageToAbury); + + steps.put(4, talkToAudburyAgain); + + var cDeliverResearchNotesToSedridor = new ConditionalStep(this, goDownToSedridor2); + cDeliverResearchNotesToSedridor.addStep(needsToGrabResearchNotes, talkToAudburyAgain); + cDeliverResearchNotesToSedridor.addStep(and(inWizardBasement, hasGivenSedridorTheNotes), talkToSedridorAfterGivingHimTheNotes); + cDeliverResearchNotesToSedridor.addStep(inWizardBasement, deliverResearchNotesToSedridor); + steps.put(5, cDeliverResearchNotesToSedridor); + + return steps; } @Override public List getItemRecommended() { - ArrayList reqs = new ArrayList<>(); - reqs.add(varrockTeleport); - reqs.add(wizardTeleport); - return reqs; + return List.of( + varrockTeleport, + wizardTeleport + ); } @Override @@ -170,23 +211,36 @@ public QuestPointReward getQuestPointReward() @Override public List getItemRewards() { - return Collections.singletonList(new ItemReward("Air Talisman", ItemID.AIR_TALISMAN, 1)); + return List.of( + new ItemReward("Air Talisman", ItemID.AIR_TALISMAN, 1) + ); } @Override public List getUnlockRewards() { - return Arrays.asList( - new UnlockReward("Ability to use the Runecrafting Skill."), - new UnlockReward("Ability to mine Rune and Pure Essence.")); + return List.of( + new UnlockReward("Ability to mine Rune and Pure Essence.") + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); + var sections = new ArrayList(); + + sections.add(new PanelDetails("Starting off", List.of( + talkToHoracio, + bringTalismanToSedridor + ))); + + sections.add(new PanelDetails("Discovering the list incantation", List.of( + getResearchPackageFromSedridor, + deliverPackageToAubury, + talkToAudburyAgain, + deliverResearchNotesToSedridor + ))); - allSteps.add(new PanelDetails("Discover Runecrafting", Arrays.asList(talkToHoracio, talkToSedridor, talkToAubury, talkToAudburyAgain, talkToSedridor2))); - return allSteps; + return sections; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/scrambled/EggSolver.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/scrambled/EggSolver.java new file mode 100644 index 00000000000..d69b6fa6d34 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/scrambled/EggSolver.java @@ -0,0 +1,230 @@ +/* + * Copyright (c) 2025, pajlada + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.plugins.microbot.questhelper.helpers.quests.scrambled; + +import net.runelite.client.plugins.microbot.questhelper.QuestHelperPlugin; +import net.runelite.client.plugins.microbot.questhelper.questhelpers.QuestHelper; +import net.runelite.client.plugins.microbot.questhelper.requirements.SimpleRequirement; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedOwnerStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.widget.WidgetHighlight; +import java.awt.*; +import java.util.List; +import javax.annotation.Nullable; +import lombok.extern.slf4j.Slf4j; +import net.runelite.api.Client; +import net.runelite.api.gameval.InterfaceID; +import net.runelite.api.widgets.Widget; + +@Slf4j +public class EggSolver extends DetailedOwnerStep +{ + + private ConditionalStep solvePuzzle; + + + public EggSolver(Scrambled parentHelper) + { + super(parentHelper, "Solve the puzzle by following the instructions in the overlay."); + } + + /** + * Find the widget with the given interface ID and, if it exists, look through its dynamic children for a widget + * matching the given model ID + */ + private static @Nullable Widget findWidgetByModelID(Client client, int interfaceID, int modelID) + { + var widget = client.getWidget(interfaceID); + + if (widget == null) + { + return null; + } + + var children = widget.getChildren(); + + if (children != null) + { + for (var w : children) + { + if (w != null && w.getModelId() == modelID) + { + return w; + } + } + } + + return null; + } + + @Override + public void startUp() + { + updateSteps(); + } + + @Override + protected void setupSteps() + { + var h = getQuestHelper(); + var unreachable = new DetailedQuestStep(h, "Something went wrong with the puzzle solver, please report this in the Quest Helper Discord with a screenshot of your puzzle."); + + solvePuzzle = new ConditionalStep(getQuestHelper(), unreachable); + + addEggPair(solvePuzzle, 57106, 194, 121); + addEggPair(solvePuzzle, 57109, 217, 27); + addEggPair(solvePuzzle, 57111, 260, 22); + addEggPair(solvePuzzle, 57107, 250, 41); + addEggPair(solvePuzzle, 57123, 175, 58); + addEggPair(solvePuzzle, 57125, 198, 60); + addEggPair(solvePuzzle, 57118, 288, 71); + addEggPair(solvePuzzle, 57104, 231, 71); + addEggPair(solvePuzzle, 57127, 231, 99); + addEggPair(solvePuzzle, 57115, 257, 113); + addEggPair(solvePuzzle, 57122, 273, 115); + addEggPair(solvePuzzle, 57116, 306, 119); + addEggPair(solvePuzzle, 57103, 243, 149); + addEggPair(solvePuzzle, 57120, 309, 160); + addEggPair(solvePuzzle, 57114, 269, 177); + addEggPair(solvePuzzle, 57102, 297, 217); + addEggPair(solvePuzzle, 57124, 252, 213); + addEggPair(solvePuzzle, 57126, 244, 255); + addEggPair(solvePuzzle, 57112, 199, 248); + addEggPair(solvePuzzle, 57121, 222, 199); + addEggPair(solvePuzzle, 57119, 187, 210); + addEggPair(solvePuzzle, 57105, 149, 179); + addEggPair(solvePuzzle, 57108, 209, 160); + addEggPair(solvePuzzle, 57101, 165, 141); + addEggPair(solvePuzzle, 57110, 157, 103); + addEggPair(solvePuzzle, 57117, 196, 105); + } + + protected void updateSteps() + { + startUpStep(solvePuzzle); + } + + @Override + public List getSteps() + { + return List.of( + this.solvePuzzle + ); + } + + private void addEggPair(ConditionalStep c, int modelID, int positionX, int positionY) + { + var step = new EggPieceStep(getQuestHelper(), modelID, positionX, positionY); + var requirement = new EggPieceRequirement(modelID); + + c.addStep(requirement, step); + } + + private static class EggPieceStep extends QuestStep + { + /// The rotationY required for the widget to be considered correctly rotated + private static final int REQUIRED_ROTATION = 0; + /// The width of the square we mark for the correct spot + private static final int SPOT_WIDTH = 50; + /// The height of the square we mark for the correct spot + private static final int SPOT_HEIGHT = 50; + + /// The model ID of the egg piece this step is handling + int modelID; + + /// The final correct X position for this egg piece + int positionX; + /// The final correct Y position for this egg piece + int positionY; + + public EggPieceStep(QuestHelper questHelper, int modelID, int positionX, int positionY) + { + super(questHelper, "Rotate the piece until you're prompted to move it to the correct spot. The square of the egg piece and the square marking the correct spot need to roughly line up."); + var modelHighlighter = new WidgetHighlight(InterfaceID.Jigsaw.PIECES, true); + modelHighlighter.setModelIdRequirement(57106); + this.addWidgetHighlight(modelHighlighter); + + this.modelID = modelID; + this.positionX = positionX; + this.positionY = positionY; + } + + @Override + public void makeWidgetOverlayHint(Graphics2D graphics, QuestHelperPlugin plugin) + { + super.makeWidgetOverlayHint(graphics, plugin); + var root = client.getWidget(InterfaceID.Jigsaw.UNIVERSE); + if (root == null) + { + return; + } + var rootBounds = root.getBounds(); + + var w = EggSolver.findWidgetByModelID(client, InterfaceID.Jigsaw.PIECES, modelID); + if (w == null) + { + return; + } + + // NOTE: We could hardcode Cyan here + graphics.setColor(getQuestHelper().getConfig().targetOverlayColor()); + + graphics.drawRect(w.getBounds().x, w.getBounds().y, w.getBounds().width, w.getBounds().height); + + // 256 per rotation, goal is + int rotationsLeft = (2048 - w.getRotationY()) / 256; + if (w.getRotationY() == REQUIRED_ROTATION) + { + graphics.drawString("move here", rootBounds.x + this.positionX, rootBounds.y + this.positionY); + graphics.drawRect(rootBounds.x + this.positionX, rootBounds.y + this.positionY, SPOT_WIDTH, SPOT_HEIGHT); + } + else + { + // TODO: We could technically prompt the user with exactly how many times to click the egg piece, but that's overkill imo + graphics.drawString("click to rotate " + rotationsLeft + " times", w.getBounds().x, w.getBounds().y); + } + + } + } + + private static class EggPieceRequirement extends SimpleRequirement + { + private final int modelID; + + public EggPieceRequirement(int modelID) + { + this.modelID = modelID; + } + + @Override + public boolean check(Client client) + { + var w = EggSolver.findWidgetByModelID(client, InterfaceID.Jigsaw.PIECES, modelID); + return w != null; + } + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/scrambled/Scrambled.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/scrambled/Scrambled.java new file mode 100644 index 00000000000..cd2246d6566 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/scrambled/Scrambled.java @@ -0,0 +1,610 @@ +/* + * Copyright (c) 2025, pajlada + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.plugins.microbot.questhelper.helpers.quests.scrambled; + +import net.runelite.client.plugins.microbot.questhelper.bank.banktab.BankSlotIcons; +import net.runelite.client.plugins.microbot.questhelper.collections.ItemCollections; +import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; +import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; +import net.runelite.client.plugins.microbot.questhelper.questinfo.QuestHelperQuest; +import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.NpcCondition; +import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.npc.NpcHintArrowRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.player.SkillRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.quest.QuestRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.util.Operation; +import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.widget.WidgetPresenceRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; +import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; +import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; +import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; +import net.runelite.client.plugins.microbot.questhelper.rewards.UnlockReward; +import net.runelite.client.plugins.microbot.questhelper.steps.*; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Pattern; + +import net.runelite.api.gameval.InterfaceID; +import net.runelite.api.gameval.ObjectID; +import net.runelite.api.QuestState; +import net.runelite.api.Skill; +import net.runelite.api.coords.WorldPoint; +import net.runelite.api.gameval.NpcID; +import net.runelite.api.gameval.ItemID; +import net.runelite.api.gameval.VarbitID; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.not; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.or; + +/** + * The quest guide for the "Scrambled" OSRS quest + */ +public class Scrambled extends BasicQuestHelper +{ + NpcStep startQuest; + NpcStep inspectEggAfterItFell; + NpcStep talkToKing; + ConditionalStep gatherTheMen; + NpcStep talkToGatheredMen; + ConditionalStep collectAllEggs; + NpcStep judgeEggs; + NpcStep panicWithKingsMen; + ConditionalStep cPutEggBackTogether; + QuestStep finishQuest; + + ItemRequirement combatGear; + ItemRequirement antifireShield; + ItemRequirement bowlOfWater; + ItemRequirement twoPlanks; + ItemRequirement sixNails; + ItemRequirement saw; + ItemRequirement hammer; + private ItemStep getEmptyBowl; + private VarbitRequirement acatzinAgreedToHelp; + private VarbitRequirement acatzinAgreedToFixWhetstone; + private VarbitRequirement acatzinhasFixedWhetstone; + private VarbitRequirement stillNeedToHelpAcatzin; + private ItemRequirement emptyBowl; + private ItemRequirement acatzinsDamagedAxe; + private ItemRequirement acatzinsRepairedAxe; + private Zone dragonCave; + private VarbitRequirement canStillTakeNails; + private VarbitRequirement kauayotlNeedToRepairCart; + private VarbitRequirement kauayotlhasRepairedCart; + private VarbitRequirement stillNeedToHelpKauayotl; + private ItemRequirement damianaLeaves; + private VarbitRequirement nezketiAgreedToHelp; + private ItemRequirement damianaWater; + private ItemRequirement damianaTea; + private ItemRequirement emptyCup; + private ItemRequirement cupOfDamianaTea; + private VarbitRequirement needToClickLargeEggToSpawnChicken; + private VarbitRequirement needToSpawnRedDragon; + private VarbitRequirement hasKilledRedDragon; + private VarbitRequirement hasTurnedInDragonEgg; + private VarbitRequirement needToSpawnJaguar; + private VarbitRequirement hasTurnedInJaguarEgg; + private VarbitRequirement hasTurnedInChickenEgg; + private ItemRequirement largeEgg; + private ItemRequirement jaguarEgg; + private ItemRequirement dragonEgg; + private SkillRequirement has40Agi; + private ZoneRequirement nearCaveEntrance; + private ZoneRequirement inDragonCave; + private Zone nearCaveEntranceZone; + private WidgetPresenceRequirement isPuzzleOpen; + private NpcStep acatzinTalkToBlacksmith; + private ObjectStep acatzinFixWhetstone; + private ObjectStep acatzinRepairAxe; + private ItemStep acatzinGetSaw; + private NpcStep acatzinReturnRepairedAxe; + private NpcStep talkToKauayotl; + private NpcStep talkToKauayotlAgain; + private ObjectStep kauayotlRepairCart; + private ItemStep getPlanks; + private ObjectStep getDamianaLeaves; + private NpcStep giveTeaToNezketi; + private NpcStep talkToNezketi; + private ObjectStep fillEmptyBowlWithWater; + private DetailedQuestStep mixWaterAndDamianaLeaves; + private ObjectStep boilDamianaWater; + private DetailedQuestStep pourTeaIntoCup; + private ConditionalStep cReturnToTempleWithEggs; + private ConditionalStep cCollectLargeEgg; + private ConditionalStep cCollectDragonEgg; + private ConditionalStep cCollectJaguarEgg; + private NpcStep talkToAcatzin; + private VarbitRequirement stillNeedToHelpNezketi; + + @Override + public Map loadSteps() + { + initializeRequirements(); + setupRequirements(); + setupSteps(); + + var steps = new HashMap(); + + steps.put(0, startQuest); + steps.put(2, startQuest); + steps.put(4, startQuest); + steps.put(6, inspectEggAfterItFell); + steps.put(8, talkToKing); + steps.put(10, talkToKing); + steps.put(12, talkToKing); + steps.put(14, gatherTheMen); + steps.put(16, talkToGatheredMen); + steps.put(18, collectAllEggs); + steps.put(19, collectAllEggs); + + // has turned in all eggs + steps.put(20, judgeEggs); + + steps.put(22, panicWithKingsMen); + steps.put(24, cPutEggBackTogether); + steps.put(26, finishQuest); + steps.put(28, finishQuest); + + return steps; + } + + @Override + protected void setupZones() + { + dragonCave = new Zone(5012); + + nearCaveEntranceZone = new Zone(new WorldPoint(1277, 3134, 0), new WorldPoint(1299, 3141, 0)); + } + + @Override + protected void setupRequirements() + { + acatzinAgreedToHelp = new VarbitRequirement(VarbitID.SCRAMBLED_KINGS_MAN_3, 2); + acatzinAgreedToFixWhetstone = new VarbitRequirement(VarbitID.SCRAMBLED_KINGS_MAN_3, 3); + acatzinhasFixedWhetstone = new VarbitRequirement(VarbitID.SCRAMBLED_KINGS_MAN_3, 4); + stillNeedToHelpAcatzin = new VarbitRequirement(VarbitID.SCRAMBLED_KINGS_MAN_3, 7, Operation.LESS); + + canStillTakeNails = new VarbitRequirement(VarbitID.SCRAMBLED_NAILS_GIVEN, 0); + kauayotlNeedToRepairCart = new VarbitRequirement(VarbitID.SCRAMBLED_KINGS_MAN_2, 2); + kauayotlhasRepairedCart = new VarbitRequirement(VarbitID.SCRAMBLED_KINGS_MAN_2, 3); + stillNeedToHelpKauayotl = new VarbitRequirement(VarbitID.SCRAMBLED_KINGS_MAN_2, 7, Operation.LESS); + nezketiAgreedToHelp = new VarbitRequirement(VarbitID.SCRAMBLED_KINGS_MAN_1, 2); + // probably no longer needed, we use it as the "conditional fallback step" + stillNeedToHelpNezketi = new VarbitRequirement(VarbitID.SCRAMBLED_KINGS_MAN_1, 7, Operation.LESS); + needToClickLargeEggToSpawnChicken = new VarbitRequirement(VarbitID.SCRAMBLED_REPLACEMENT_EGG_3, 1, Operation.GREATER_EQUAL); + + needToSpawnRedDragon = new VarbitRequirement(VarbitID.SCRAMBLED_REPLACEMENT_EGG_2, 1, Operation.GREATER_EQUAL); + hasKilledRedDragon = new VarbitRequirement(VarbitID.SCRAMBLED_REPLACEMENT_EGG_2, 3); + hasTurnedInDragonEgg = new VarbitRequirement(VarbitID.SCRAMBLED_REPLACEMENT_EGG_2, 4); + + needToSpawnJaguar = new VarbitRequirement(VarbitID.SCRAMBLED_REPLACEMENT_EGG_1, 1, Operation.GREATER_EQUAL); + hasTurnedInJaguarEgg = new VarbitRequirement(VarbitID.SCRAMBLED_REPLACEMENT_EGG_1, 4); + + hasTurnedInChickenEgg = new VarbitRequirement(VarbitID.SCRAMBLED_REPLACEMENT_EGG_3, 4); + + has40Agi = new SkillRequirement(Skill.AGILITY, 40); + nearCaveEntrance = new ZoneRequirement(nearCaveEntranceZone); + inDragonCave = new ZoneRequirement(dragonCave); + isPuzzleOpen = new WidgetPresenceRequirement(InterfaceID.Jigsaw.BACKGROUND); + + bowlOfWater = new ItemRequirement("Bowl of water", ItemID.BOWL_WATER).canBeObtainedDuringQuest().showConditioned(stillNeedToHelpNezketi); + // NOTE: Confirmed it has to be two basic planks + twoPlanks = new ItemRequirement("Plank", ItemID.WOODPLANK, 2).canBeObtainedDuringQuest().showConditioned(stillNeedToHelpKauayotl); + // NOTE: Confirmed other nails work + sixNails = new ItemRequirement("Nail", ItemCollections.NAILS, 6).canBeObtainedDuringQuest().showConditioned(stillNeedToHelpKauayotl); + saw = new ItemRequirement("Saw", ItemCollections.SAW).canBeObtainedDuringQuest().showConditioned(stillNeedToHelpKauayotl); + hammer = new ItemRequirement("Hammer", ItemCollections.HAMMER).canBeObtainedDuringQuest().showConditioned(or(stillNeedToHelpAcatzin, stillNeedToHelpKauayotl)); + + // If the user does not have a bowl of water with them, then the empty bowl requirement will be used in the middle + emptyBowl = new ItemRequirement("Empty bowl", ItemID.BOWL_EMPTY); + + acatzinsDamagedAxe = new ItemRequirement("Acatzin's damaged axe", ItemID.SCRAMBLED_AXE_DAMAGED); + acatzinsRepairedAxe = new ItemRequirement("Acatzin's axe", ItemID.SCRAMBLED_AXE_REPAIRED); + + combatGear = new ItemRequirement("Combat gear", -1, -1); + combatGear.setDisplayItemId(BankSlotIcons.getCombatGear()); + + antifireShield = new ItemRequirement("Antifire shield", ItemCollections.ANTIFIRE_SHIELDS); + + damianaLeaves = new ItemRequirement("Damiana leaves", ItemID.DAMIANA_LEAVES); + + damianaWater = new ItemRequirement("Damiana water", ItemID.BOWL_DAMIANA_WATER); + damianaTea = new ItemRequirement("Damiana tea", ItemID.BOWL_DAMIANA_TEA); + + emptyCup = new ItemRequirement("Empty cup", ItemID.CUP_EMPTY); + cupOfDamianaTea = new ItemRequirement("Cup of damiana tea", ItemID.CUP_DAMIANA_TEA); + + + largeEgg = new ItemRequirement("Large egg", ItemID.SCRAMBLED_CHICKEN_EGG).hideConditioned(hasTurnedInChickenEgg); + jaguarEgg = new ItemRequirement("Jaguar egg", ItemID.SCRAMBLED_JAGUAR_EGG).hideConditioned(hasTurnedInJaguarEgg); + dragonEgg = new ItemRequirement("Dragon egg", ItemID.SCRAMBLED_DRAGON_EGG).hideConditioned(hasTurnedInDragonEgg); + } + + public void setupSteps() + { + startQuest = new NpcStep(this, NpcID.SCRAMBLED_ALAN, new WorldPoint(1247, 3167, 0), "Talk to Alan in Tal Teok Temple, north of Tal Teklan, to start the quest."); + startQuest.addDialogStep("Yes."); + startQuest.addDialogStep("Of course!"); + + inspectEggAfterItFell = new NpcStep(this, NpcID.SCRAMBLED_EGG_DEAD, new WorldPoint(1247, 3170, 0), "Inspect the egg in front of you."); + + talkToKing = new NpcStep(this, NpcID.SCRAMBLED_KING, new WorldPoint(1224, 3119, 0), "Head south into Tal Teklan and talk to King in the pub."); + talkToKing.addDialogSteps("Are you the king?"); + talkToKing.addDialogStep(Pattern.compile(".* fell off a wall!")); + + getEmptyBowl = new ItemStep(this, new WorldPoint(1229, 3119, 0), "Get an empty bowl from the pub, will need it later. If it's not there, hop worlds or" + + " wait for it to spawn again.", emptyBowl); + + talkToAcatzin = new NpcStep(this, NpcID.SCRAMBLED_KINGS_MAN_3, new WorldPoint(1228, 3117, 0), "Talk to Acatzin inside the Tal Teklan pub."); + talkToAcatzin.addDialogStep("I can talk to the blacksmith."); + + acatzinTalkToBlacksmith = new NpcStep(this, NpcID.SCRAMBLED_BLACKSMITH, new WorldPoint(1209, 3109, 0), "Talk to the Blacksmith west of the Tal Teklan pub."); + + var acatzinGetHammer = new ItemStep(this, new WorldPoint(1207, 3108, 0), "Get the hammer from the table. If it's not there, hop worlds or wait for it" + + " to spawn again.", hammer); + + var acatzinGetNails = new ObjectStep(this, ObjectID.SCRAMBLED_WORKBENCH, new WorldPoint(1210, 3112, 0), "Get some nails from the blacksmith's workbench, we'll need them later."); + acatzinGetNails.addDialogStep("Take the nails."); + + acatzinGetSaw = new ItemStep(this, new WorldPoint(1212, 3093, 0), "Get the Saw from the house to the south, we'll need it later. If it's not there, " + + "hop worlds or wait for it to spawn again.", saw); + + acatzinFixWhetstone = new ObjectStep(this, ObjectID.SCRAMBLED_WHETSTONE_BROKEN_OP, new WorldPoint(1211, 3108, 0), "Fix the whetstone."); + acatzinFixWhetstone.addDialogStep("Yes."); + + acatzinFixWhetstone.addSubSteps(acatzinGetHammer); + acatzinFixWhetstone.addSubSteps(acatzinGetNails); + + var cAcatzinFixWhetstone = new ConditionalStep(this, acatzinFixWhetstone); + cAcatzinFixWhetstone.addStep(canStillTakeNails, acatzinGetNails); + cAcatzinFixWhetstone.addStep(not(hammer), acatzinGetHammer); + + var acatzinTalkToBlacksmithAgain = new NpcStep(this, NpcID.SCRAMBLED_BLACKSMITH, new WorldPoint(1209, 3109, 0), "Talk to the Blacksmith again after fixing the whetstone to receive a damaged axe."); + + acatzinRepairAxe = new ObjectStep(this, ObjectID.SCRAMBLED_WHETSTONE_FIXED_OP, new WorldPoint(1211, 3108, 0), "Repair the axe on the whetstone.", acatzinsDamagedAxe); + acatzinRepairAxe.addDialogStep("Yes."); + acatzinRepairAxe.addSubSteps(acatzinTalkToBlacksmithAgain); + + var cAcatzinRepairAxe = new ConditionalStep(this, acatzinRepairAxe); + cAcatzinRepairAxe.addStep(not(acatzinsDamagedAxe), acatzinTalkToBlacksmithAgain); + + acatzinReturnRepairedAxe = new NpcStep(this, NpcID.SCRAMBLED_KINGS_MAN_3, new WorldPoint(1228, 3117, 0), "Return the repaired axe to Acatzin in the Tel Teklan pub.", acatzinsRepairedAxe); + + + var helpAcatzin = new ConditionalStep(this, talkToAcatzin); + helpAcatzin.addStep(and(not(emptyBowl), not(bowlOfWater)), getEmptyBowl); + helpAcatzin.addStep(acatzinAgreedToHelp, acatzinTalkToBlacksmith); + helpAcatzin.addStep(acatzinAgreedToFixWhetstone, cAcatzinFixWhetstone); + helpAcatzin.addStep(and(acatzinsRepairedAxe, not(saw)), acatzinGetSaw); + helpAcatzin.addStep(acatzinsRepairedAxe, acatzinReturnRepairedAxe); + helpAcatzin.addStep(acatzinhasFixedWhetstone, cAcatzinRepairAxe); + + + talkToKauayotl = new NpcStep(this, NpcID.SCRAMBLED_KINGS_MAN_2, new WorldPoint(1251, 3104, 0), "Talk to Kauayotl at the east entrance of Tal Teklan." + , hammer, saw, sixNails, twoPlanks); + talkToKauayotl.addDialogStep("I see. Well, maybe I can help out with that?"); + + talkToKauayotlAgain = new NpcStep(this, NpcID.SCRAMBLED_KINGS_MAN_2, new WorldPoint(1251, 3104, 0), "Talk to Kauayotl again after repairing his cart."); + + kauayotlRepairCart = new ObjectStep(this, ObjectID.SCRAMBLED_CART_BROKEN_OP, new WorldPoint(1250, 3107, 0), "Repair Kauayotl's cart.", hammer, saw, sixNails, twoPlanks); + kauayotlRepairCart.addDialogStep("Yes."); + + getPlanks = new ItemStep(this, new WorldPoint(1238, 3076, 0), "Go south-west of Kauayotl and pick up two planks from besides the lake. If it's not " + + "there, hop worlds or wait for it to spawn again.", twoPlanks); + + getDamianaLeaves = new ObjectStep(this, ObjectID.DAMIANA_SHRUB, new WorldPoint(1250, 3110, 0), "Pick the damiana bush at the east entrance of Tal " + + "Teklan for some damiana leaves, we'll need these later."); + + var helpKauayotl = new ConditionalStep(this, talkToKauayotl); + helpKauayotl.addStep(kauayotlhasRepairedCart, talkToKauayotlAgain); + helpKauayotl.addStep(not(hammer), acatzinGetHammer); + helpKauayotl.addStep(not(saw), acatzinGetSaw); + helpKauayotl.addStep(not(damianaLeaves), getDamianaLeaves); + helpKauayotl.addStep(not(twoPlanks), getPlanks); + // helpKauayotl.addStep(not(onePlank), getPlanks); + helpKauayotl.addStep(kauayotlNeedToRepairCart, kauayotlRepairCart); + + + talkToNezketi = new NpcStep(this, NpcID.SCRAMBLED_KINGS_MAN_1, new WorldPoint(1224, 3105, 0), "Talk to Nezketi in the Tal Teklan temple."); + talkToNezketi.addDialogStep("I can get you some tea."); + + fillEmptyBowlWithWater = new ObjectStep(this, ObjectID.FORTIS_WATER_PUMP, new WorldPoint(1242, 3097, 0), "Fill your empty bowl with water at the water pump near the eastern entrance of Tal Teklan.", emptyBowl.highlighted()); + fillEmptyBowlWithWater.addIcon(ItemID.BOWL_EMPTY); + + mixWaterAndDamianaLeaves = new ItemStep(this, "Mix damiana leaves with your bowl of water.", damianaLeaves.highlighted(), bowlOfWater.highlighted()); + + boilDamianaWater = new ObjectStep(this, ObjectID.STOVE_CLAY01_TALKASTI01_NOOP, "Use your bowl of damiana water on the stove in the east part of Tal Teklan to boil it.", damianaWater.highlighted()); + boilDamianaWater.addIcon(ItemID.BOWL_DAMIANA_WATER); + + pourTeaIntoCup = new DetailedQuestStep(this, "Pour the damiana tea from your bowl into the empty cup", damianaTea.highlighted(), emptyCup.highlighted()); + + var cMakeTea = new ConditionalStep(this, getDamianaLeaves); + cMakeTea.addStep(and(damianaTea, emptyCup), pourTeaIntoCup); + cMakeTea.addStep(damianaWater, boilDamianaWater); + cMakeTea.addStep(not(emptyCup), talkToNezketi); + cMakeTea.addStep(and(damianaLeaves, bowlOfWater), mixWaterAndDamianaLeaves); + cMakeTea.addStep(not(bowlOfWater), fillEmptyBowlWithWater); + cMakeTea.addStep(not(emptyBowl), getEmptyBowl); + + giveTeaToNezketi = new NpcStep(this, NpcID.SCRAMBLED_KINGS_MAN_1, new WorldPoint(1224, 3105, 0), "Return to Nezketi in the Tal Teklan temple and give him the cup of damiana tea.", cupOfDamianaTea); + + var helpNezketi = new ConditionalStep(this, talkToNezketi); + helpNezketi.addStep(cupOfDamianaTea, giveTeaToNezketi); + helpNezketi.addStep(nezketiAgreedToHelp, cMakeTea); + + gatherTheMen = new ConditionalStep(this, helpNezketi); + gatherTheMen.addStep(stillNeedToHelpAcatzin, helpAcatzin); + gatherTheMen.addStep(stillNeedToHelpKauayotl, helpKauayotl); + + var anyOfTheKingsMen = new int[]{ + NpcID.SCRAMBLED_KINGS_MAN_1, + NpcID.SCRAMBLED_KINGS_MAN_2, + NpcID.SCRAMBLED_KINGS_MAN_3, + }; + + talkToGatheredMen = new NpcStep(this, anyOfTheKingsMen, new WorldPoint(1247, 3166, 0), "Return to the temple north of Tal Teklan and speak with one of King's men.", true); + + var collectLargeEgg = new ObjectStep(this, ObjectID.SCRAMBLED_CHICKEN_EGGS_OP, new WorldPoint(1238, 3137, 0), "Search the Eggs to get a Large egg."); + var collectLargeEggSpawnChicken = new ObjectStep(this, ObjectID.SCRAMBLED_CHICKEN_EGGS_OP, new WorldPoint(1238, 3137, 0), ""); + + var fightLargeChicken = new NpcStep(this, NpcID.SCRAMBLED_CHICKEN, new WorldPoint(1239, 3137, 0), "Kill the large chicken."); + var largeChickenNearby = new NpcHintArrowRequirement(NpcID.SCRAMBLED_CHICKEN); + + cCollectLargeEgg = new ConditionalStep(this, collectLargeEgg, "Fetch the Large egg from the chicken coop south of the large temple. Be ready to fight" + + " a level 17 chicken."); + cCollectLargeEgg.addStep(largeChickenNearby, fightLargeChicken); + cCollectLargeEgg.addStep(needToClickLargeEggToSpawnChicken, collectLargeEggSpawnChicken); + + var useDragonShortcut = new ObjectStep(this, ObjectID.TLATI_NORTH_RIVER_LOG_BALANCE_1, new WorldPoint(1283, 3146, 0), "Step across the log balance towards the dragon cave.", has40Agi); + + var enterDragonCave = new ObjectStep(this, ObjectID.TLATI_DRAGON_NEST_CAVE_ENTRY, new WorldPoint(1288, 3133, 0), "", List.of(), List.of(antifireShield)); + + // does protect from melee avoid all damage? + + var spawnDragonFromEgg = new ObjectStep(this, ObjectID.SCRAMBLED_DRAGON_EGGS_OP, new WorldPoint(1259, 9482, 0), "Search the Eggs in the dragon cave."); + + var fightRedDragon = new NpcStep(this, NpcID.SCRAMBLED_DRAGON, new WorldPoint(1257, 9482, 0), "Fight the red dragon. You can safespot it by standing " + + "south-east of the Eggs."); + fightRedDragon.addSafeSpots(new WorldPoint(1260, 9481, 0)); + var redDragonNearby = new NpcHintArrowRequirement(NpcID.SCRAMBLED_DRAGON); + var collectDragonEgg = new ObjectStep(this, ObjectID.SCRAMBLED_DRAGON_EGGS_OP, new WorldPoint(1259, 9482, 0), "Search the Eggs in the " + + "south-east of the dragon cave to collect your Dragon egg.", List.of(), List.of(antifireShield)); + + cCollectDragonEgg = new ConditionalStep(this, enterDragonCave, "Fetch the Dragon egg from the dragon cave south-east of the large temple, across " + + "the river. Be ready to fight a Red dragon."); + cCollectDragonEgg.addStep(and(inDragonCave, hasKilledRedDragon), collectDragonEgg); + cCollectDragonEgg.addStep(and(inDragonCave, redDragonNearby), fightRedDragon); + cCollectDragonEgg.addStep(and(inDragonCave, needToSpawnRedDragon), spawnDragonFromEgg); + cCollectDragonEgg.addStep(and(has40Agi, not(nearCaveEntrance)), useDragonShortcut); + + var exitDragonCave = new ObjectStep(this, ObjectID.TLATI_DRAGON_NEST_CAVE_EXIT, new WorldPoint(1244, 9528, 0), "Exit the dragon's cave."); + + var spawnJaguarFromEgg = new ObjectStep(this, ObjectID.SCRAMBLED_JAGUAR_EGGS_OP, new WorldPoint(1332, 3122, 0), ""); + + var fightJaguar = new NpcStep(this, NpcID.SCRAMBLED_JAGUAR, new WorldPoint(1329, 3122, 0), "Fight the Jaguar. You can safespot it by standing just " + + "north east of the camp."); + fightJaguar.addSafeSpots(new WorldPoint(1337, 3128, 0)); + var jaguarNearby = new NpcHintArrowRequirement(NpcID.SCRAMBLED_JAGUAR); + + var collectJaguarEgg = new ObjectStep(this, ObjectID.SCRAMBLED_JAGUAR_EGGS_OP, new WorldPoint(1332, 3122, 0), "Search the Eggs at the camp, east of the dragon age, and collect your Jaguar egg."); + + cCollectJaguarEgg = new ConditionalStep(this, collectJaguarEgg, "Fetch the Jaguar egg from the tent, east of the dragon cave. Be ready to fight a " + + "level 88 jaguar."); + cCollectJaguarEgg.addStep(inDragonCave, exitDragonCave); + cCollectJaguarEgg.addStep(jaguarNearby, fightJaguar); + cCollectJaguarEgg.addStep(needToSpawnJaguar, spawnJaguarFromEgg); + + var returnToTempleWithEggs = new NpcStep(this, anyOfTheKingsMen, new WorldPoint(1247, 3166, 0), "Return to the temple north of Tal Teklan with the egg replacements and speak with one of \"King\"'s men.", true, largeEgg, dragonEgg, jaguarEgg); + + var returnToTempleWithDragonEgg = new NpcStep(this, NpcID.SCRAMBLED_KINGS_MAN_2, new WorldPoint(1247, 3166, 0), "Give Kauayotl the Dragon egg.", largeEgg, dragonEgg, jaguarEgg); + var returnToTempleWithJaguarEgg = new NpcStep(this, NpcID.SCRAMBLED_KINGS_MAN_1, new WorldPoint(1247, 3166, 0), "Give Nezketi the Jaguar egg.", largeEgg, dragonEgg, jaguarEgg); + var returnToTempleWithChickenEgg = new NpcStep(this, NpcID.SCRAMBLED_KINGS_MAN_3, new WorldPoint(1247, 3166, 0), "Give Acatzin the Large egg.", largeEgg, dragonEgg, jaguarEgg); + + cReturnToTempleWithEggs = new ConditionalStep(this, returnToTempleWithEggs, "Give the eggs to King's men at the Tal Teok Temple, north of Tal Teklan."); + cReturnToTempleWithEggs.addStep(inDragonCave, exitDragonCave); + cReturnToTempleWithEggs.addStep(not(hasTurnedInDragonEgg), returnToTempleWithDragonEgg); + cReturnToTempleWithEggs.addStep(not(hasTurnedInJaguarEgg), returnToTempleWithJaguarEgg); + cReturnToTempleWithEggs.addStep(not(hasTurnedInChickenEgg), returnToTempleWithChickenEgg); + + collectAllEggs = new ConditionalStep(this, cReturnToTempleWithEggs); + collectAllEggs.addStep(and(not(largeEgg), not(hasTurnedInChickenEgg)), cCollectLargeEgg); + collectAllEggs.addStep(and(not(dragonEgg), not(hasTurnedInDragonEgg)), cCollectDragonEgg); + collectAllEggs.addStep(and(not(jaguarEgg), not(hasTurnedInJaguarEgg)), cCollectJaguarEgg); + + judgeEggs = new NpcStep(this, anyOfTheKingsMen, new WorldPoint(1247, 3166, 0), "Return to the large temple north of Tal Teklan and talk with one of King's men to evaluate the Humphrey Dumphrey alternatives.", true); + + // all eggs went from 4 -> 5 when they fell and broke + // and quest state went from 20 -> 22 + + panicWithKingsMen = new NpcStep(this, anyOfTheKingsMen, new WorldPoint(1247, 3166, 0), "Talk to one of King's men to figure out how to solve the broken-egg conundrum.", true); + + var putEggBackTogether = new NpcStep(this, NpcID.SCRAMBLED_EGG_FIX, new WorldPoint(1244,3168, 0), "Inspect the egg."); + + var puzzleSolver = new PuzzleWrapperStep(this, new EggSolver(this)); + + cPutEggBackTogether = new ConditionalStep(this, putEggBackTogether, "Put Lumpty Mumpty back together again."); + cPutEggBackTogether.addStep(isPuzzleOpen, puzzleSolver); + + finishQuest = new NpcStep(this, anyOfTheKingsMen, new WorldPoint(1247, 3166, 0), "Talk to one of King's men to finish the quest.", true); + } + + @Override + public List getItemRequirements() + { + return List.of( + bowlOfWater, + twoPlanks, + sixNails, + saw, + hammer, + combatGear + ); + } + + @Override + public List getItemRecommended() + { + return List.of( + antifireShield + ); + } + + @Override + public List getGeneralRecommended() + { + return List.of( + combatGear + ); + } + + @Override + public List getGeneralRequirements() + { + return List.of( + new QuestRequirement(QuestHelperQuest.CHILDREN_OF_THE_SUN, QuestState.FINISHED), + new SkillRequirement(Skill.CONSTRUCTION, 38), // TODO: boostable? + new SkillRequirement(Skill.COOKING, 36), // TODO: boostable? + new SkillRequirement(Skill.SMITHING, 35) // TODO: boostable? + ); + } + + @Override + public List getCombatRequirements() + { + return List.of( + "Large chicken (lvl 16)", + "Black jaguar (lvl 88)", + "Red dragon (lvl 106, can be safespotted)" + ); + } + + @Override + public QuestPointReward getQuestPointReward() + { + return new QuestPointReward(1); + } + + @Override + public List getExperienceRewards() + { + return List.of( + new ExperienceReward(Skill.CONSTRUCTION, 5000), + new ExperienceReward(Skill.COOKING, 5000), + new ExperienceReward(Skill.SMITHING, 5000) + ); + } + + @Override + public List getUnlockRewards() + { + return List.of( + new UnlockReward("Your very own egg") + ); + } + + @Override + public List getPanels() + { + var panels = new ArrayList(); + + panels.add(new PanelDetails("Humphrey Dumphrey sat on a wall", List.of( + startQuest + ), List.of( + // Requirements + ), List.of( + // Recommended + ))); + + panels.add(new PanelDetails("Wumty Scrumpty had a great fall", List.of( + inspectEggAfterItFell, + talkToKing + ), List.of( + // Requirements + ), List.of( + // Recommended + ))); + + panels.add(new PanelDetails("All the king's horses and all the king's men...", List.of( + getEmptyBowl, + + // Help Acatzin + talkToAcatzin, + acatzinTalkToBlacksmith, + acatzinFixWhetstone, + acatzinRepairAxe, + acatzinGetSaw, + acatzinReturnRepairedAxe, + + // Help Kauayotl + getDamianaLeaves, + getPlanks, + talkToKauayotl, + kauayotlRepairCart, + talkToKauayotlAgain, + + // Help Nezketi + talkToNezketi, + fillEmptyBowlWithWater, + mixWaterAndDamianaLeaves, + boilDamianaWater, + pourTeaIntoCup, + giveTeaToNezketi, + + talkToGatheredMen + ), List.of( + bowlOfWater, + twoPlanks, + sixNails, + saw, + hammer + // Requirements + ), List.of( + // Recommended + ))); + + panels.add(new PanelDetails("Couldn't put Bumpty Numpty back together again...", List.of( + cCollectLargeEgg, + cCollectDragonEgg, + cCollectJaguarEgg, + + cReturnToTempleWithEggs, + judgeEggs, + panicWithKingsMen, + cPutEggBackTogether, + finishQuest + ), List.of( + combatGear + ), List.of( + antifireShield + ))); + + return panels; + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/AskAboutRitual.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/AskAboutRitual.java index d5be581377f..55b8d554e45 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/AskAboutRitual.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/AskAboutRitual.java @@ -30,6 +30,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; import net.runelite.api.gameval.NpcID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; public class AskAboutRitual extends NpcStep @@ -49,8 +50,8 @@ public void onGameTick(GameTick event) private void updateCorrectChoice() { - boolean askedAboutKiller = client.getVarbitValue(14743) == 1; - boolean askedAboutRitual = client.getVarbitValue(14744) == 1; + boolean askedAboutKiller = client.getVarbitValue(VarbitID.SOTN_GHORROCK_QUESTION) == 1; + boolean askedAboutRitual = client.getVarbitValue(VarbitID.SOTN_RITUAL_QUESTION) == 1; choices = new DialogChoiceSteps(); if (!askedAboutKiller) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/SecretsOfTheNorth.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/SecretsOfTheNorth.java index 9a02affd11c..39fce3c530a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/SecretsOfTheNorth.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/SecretsOfTheNorth.java @@ -282,25 +282,25 @@ protected void setupRequirements() notGoneUpstairs = new VarbitRequirement(VarbitID.SOTN, 4, Operation.GREATER_EQUAL); notInspectedCrimeScene = new VarbitRequirement(VarbitID.SOTN, 6, Operation.GREATER_EQUAL); - notInspectWall = new VarbitRequirement(14726, 0); - notInspectCeril = new VarbitRequirement(14727, 0); - notInspectWindow = new VarbitRequirement(14728, 0); - notInspectChest = new VarbitRequirement(14729, 0); + notInspectWall = new VarbitRequirement(VarbitID.SOTN_INSPECTED_WALL, 0); + notInspectCeril = new VarbitRequirement(VarbitID.SOTN_INSPECTED_BODY, 0); + notInspectWindow = new VarbitRequirement(VarbitID.SOTN_INSPECTED_WINDOW, 0); + notInspectChest = new VarbitRequirement(VarbitID.SOTN_INSPECTED_CHEST, 0); inspectedCrimeScene = new VarbitRequirement(VarbitID.SOTN, 8, Operation.GREATER_EQUAL); - toldWindow = new VarbitRequirement(14731, 1); - toldCeril = new VarbitRequirement(14730, 1); - toldWall = new VarbitRequirement(14732, 1); + toldWindow = new VarbitRequirement(VarbitID.SOTN_EXPLAINED_WINDOW, 1); + toldCeril = new VarbitRequirement(VarbitID.SOTN_EXPLAINED_BODY, 1); + toldWall = new VarbitRequirement(VarbitID.SOTN_EXPLAINED_CHEST, 1); onTheTrail = new VarbitRequirement(VarbitID.SOTN, 20, Operation.GREATER_EQUAL); - checkedBarrel = new VarbitRequirement(14733, 1); - checkedBoulder = new VarbitRequirement(14734, 1); - checkedBush = new VarbitRequirement(14735, 1); - checkedStump = new VarbitRequirement(14736, 1); - checkedBoulder2 = new VarbitRequirement(14737, 1); - checkedBush2 = new VarbitRequirement(14738, 1); + checkedBarrel = new VarbitRequirement(VarbitID.SOTN_HUNTING_TRAIL_1, 1); + checkedBoulder = new VarbitRequirement(VarbitID.SOTN_HUNTING_TRAIL_2, 1); + checkedBush = new VarbitRequirement(VarbitID.SOTN_HUNTING_TRAIL_3, 1); + checkedStump = new VarbitRequirement(VarbitID.SOTN_HUNTING_TRAIL_4, 1); + checkedBoulder2 = new VarbitRequirement(VarbitID.SOTN_HUNTING_TRAIL_5, 1); + checkedBush2 = new VarbitRequirement(VarbitID.SOTN_HUNTING_TRAIL_6, 1); evelotDefeated = new VarbitRequirement(VarbitID.SOTN, 28, Operation.GREATER_EQUAL); talkedToAlomoneOrClivet = new VarbitRequirement(VarbitID.SOTN, 32, Operation.GREATER_EQUAL); @@ -419,17 +419,17 @@ public void setupSteps() speakToBarman = new NpcStep(this, NpcID.KHAZARD_BARMAN, new WorldPoint(2566, 3140, 0), "Head to the Fight Arena Bar and talk to the Khazard Barman.", coins, combatGear); speakToBarman.addDialogStep("Do you know anyone called Evelot?"); - inspectBarrel = new ObjectStep(this, 46873, new WorldPoint(2568, 3152, 0), + inspectBarrel = new ObjectStep(this, ObjectID.SOTN_HUNTING_BARREL, new WorldPoint(2568, 3152, 0), "Inspect the barrels outside the Fight Arena Bar entrance.", combatGear); - inspectBoulder = new ObjectStep(this, 46874, new WorldPoint(2573, 3180, 0), + inspectBoulder = new ObjectStep(this, ObjectID.SOTN_HUNTING_BOULDER1, new WorldPoint(2573, 3180, 0), "Inspect the boulder to the north.", combatGear); - inspectBush = new ObjectStep(this, 46878, new WorldPoint(2567, 3202, 0), + inspectBush = new ObjectStep(this, ObjectID.SOTN_HUNTING_BUSH, new WorldPoint(2567, 3202, 0), "Continue north and inspect the bush there.", combatGear); - inspectStump = new ObjectStep(this, 46877, new WorldPoint(2584, 3197, 0), + inspectStump = new ObjectStep(this, ObjectID.SOTN_HUNTING_TREESTUMP, new WorldPoint(2584, 3197, 0), "Inspect the stump to the east.", combatGear); - inspectBoulder2 = new ObjectStep(this, 46875, new WorldPoint(2605, 3188, 0), + inspectBoulder2 = new ObjectStep(this, ObjectID.SOTN_HUNTING_BOULDER2, new WorldPoint(2605, 3188, 0), "Inspect the boulder to the south east.", combatGear); - inspectBush2 = new ObjectStep(this, 46878, new WorldPoint(2621, 3193, 0), + inspectBush2 = new ObjectStep(this, ObjectID.SOTN_HUNTING_BUSH, new WorldPoint(2621, 3193, 0), "Inspect the bush to the east.", combatGear); fightEvelot = new NpcStep(this, NpcID.SOTN_EVELOT_VIS, new WorldPoint(2643, 3202, 0), "Approach Evelot to the east to start the fight.\n\n" + @@ -461,10 +461,10 @@ public void setupSteps() examineShelves = new ObjectStep(this, ObjectID.SOTN_SHELVES_BUTTON, new WorldPoint(2540, 9694, 0), "Search the cooking shelves for a button."); examineShelves.addDialogStep("Yes."); - examineWall = new ObjectStep(this, 46897, new WorldPoint(2544, 9698, 0), + examineWall = new ObjectStep(this, ObjectID.SOTN_HIDDEN_DOOR_1, new WorldPoint(2544, 9698, 0), "Inspect the wall next to the noticeboard."); examineWall.addDialogStep("Enter the passage."); - lockpickChest = new ObjectStep(this, 46899, new WorldPoint(2535, 9621, 0), + lockpickChest = new ObjectStep(this, ObjectID.SOTN_HIDDEN_CHEST_CLOSED, new WorldPoint(2535, 9621, 0), "Picklock the chest.", lockpick); lockpickChest.addText("Green means it's the right number and position."); lockpickChest.addText("Blue means it's the right position but wrong number."); @@ -495,7 +495,7 @@ public void setupSteps() talkToSnowflake.addDialogStep("Have you seen anything odd around here recently?"); moveToWeissCave = new ObjectStep(this, ObjectID.MY2ARM_THRONEROOM_STAIRSDOWN, new WorldPoint(2867, 3940, 0), "Prepare for a fight and climb down the stairs in the middle of Weiss.", combatGear, antipoison); - enterWeissCave = new ObjectStep(this, 46905, new WorldPoint(2846, 10332, 0), + enterWeissCave = new ObjectStep(this, ObjectID.MY2ARM_MINE_WALL_CAVE_EXIT_02, new WorldPoint(2846, 10332, 0), "Enter the cave to the south.", combatGear, antipoison); enterWeissCave.addDialogStep("Yes."); fightAssassin = new NpcStep(this, NpcID.AKD_SETTLEMENT_RUINS_ASSASSIN, new WorldPoint(2927, 10348, 0), "Defeat the assassin."); @@ -558,7 +558,7 @@ public void setupSteps() ((NpcStep) defeatMuspah).addAlternateNpcs(NpcID.MUSPAH_QUEST, NpcID.SOTN_MUSPAH_CUTSCENE, NpcID.MUSPAH_SOULSPLIT_QUEST, NpcID.MUSPAH_SOULSPLIT_QUEST); moveToWeissCaveEnd = new ObjectStep(this, ObjectID.MY2ARM_THRONEROOM_STAIRSDOWN, new WorldPoint(2867, 3940, 0), "Speak to Jhallan in the Muspah room."); - enterWeissCaveEnd = new ObjectStep(this, 46905, new WorldPoint(2846, 10332, 0), + enterWeissCaveEnd = new ObjectStep(this, ObjectID.MY2ARM_MINE_WALL_CAVE_EXIT_02, new WorldPoint(2846, 10332, 0), "Speak to Jhallan in the Muspah room."); enterCreviceEnd = new ObjectStep(this, ObjectID.GHORROCK_DUNGEON_CAVE_ENTRY, new WorldPoint(2908, 10317, 0), "Speak to Jhallan in the Muspah room."); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/SolveChestCode.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/SolveChestCode.java index 2c0bd1ed977..012f0c45153 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/SolveChestCode.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/SolveChestCode.java @@ -30,6 +30,7 @@ import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; import net.runelite.api.events.VarClientIntChanged; import net.runelite.api.gameval.InterfaceID; +import net.runelite.api.gameval.VarClientID; import net.runelite.api.widgets.Widget; import net.runelite.client.eventbus.Subscribe; import net.runelite.client.ui.FontManager; @@ -77,10 +78,10 @@ public void onVarClientIntChanged(VarClientIntChanged varClientIntChanged) private void updateSolvedPositionState() { - final int SLOT_ONE = 1113; - final int SLOT_TWO = 1114; - final int SLOT_THREE = 1115; - final int SLOT_FOUR = 1116; + final int SLOT_ONE = VarClientID.COMBINATION_LOCK_VALUE_0; + final int SLOT_TWO = VarClientID.COMBINATION_LOCK_VALUE_1; + final int SLOT_THREE = VarClientID.COMBINATION_LOCK_VALUE_2; + final int SLOT_FOUR = VarClientID.COMBINATION_LOCK_VALUE_3; final int ENTRY_ONE = 7; final int ENTRY_TWO = 4; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/SolveDoorCode.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/SolveDoorCode.java index 322118f8cfd..a78efcc88a4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/SolveDoorCode.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/SolveDoorCode.java @@ -29,6 +29,7 @@ import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; import net.runelite.api.events.VarClientIntChanged; import net.runelite.api.gameval.InterfaceID; +import net.runelite.api.gameval.VarClientID; import net.runelite.api.widgets.Widget; import net.runelite.client.eventbus.Subscribe; import net.runelite.client.ui.FontManager; @@ -80,11 +81,11 @@ public void onVarClientIntChanged(VarClientIntChanged varClientIntChanged) private void updateSolvedPositionState() { - final int SLOT_ONE = 1113; - final int SLOT_TWO = 1114; - final int SLOT_THREE = 1115; - final int SLOT_FOUR = 1116; - final int SLOT_FIVE = 1117; + final int SLOT_ONE = VarClientID.COMBINATION_LOCK_VALUE_0; + final int SLOT_TWO = VarClientID.COMBINATION_LOCK_VALUE_1; + final int SLOT_THREE = VarClientID.COMBINATION_LOCK_VALUE_2; + final int SLOT_FOUR = VarClientID.COMBINATION_LOCK_VALUE_3; + final int SLOT_FIVE = VarClientID.COMBINATION_LOCK_VALUE_4; final int ENTRY_ONE = 3; final int ENTRY_TWO = 5; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/TellAboutMurder.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/TellAboutMurder.java index 69063aae079..56d978b217e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/TellAboutMurder.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/secretsofthenorth/TellAboutMurder.java @@ -30,6 +30,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; import net.runelite.api.gameval.NpcID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; public class TellAboutMurder extends NpcStep @@ -49,9 +50,9 @@ public void onGameTick(GameTick event) private void updateCorrectChoice() { - boolean saidAboutWindow = client.getVarbitValue(14731) == 1; - boolean saidAboutCeril = client.getVarbitValue(14730) == 1; - boolean saidAboutWall = client.getVarbitValue(14732) == 1; + boolean saidAboutWindow = client.getVarbitValue(VarbitID.SOTN_EXPLAINED_WINDOW) == 1; + boolean saidAboutCeril = client.getVarbitValue(VarbitID.SOTN_EXPLAINED_BODY) == 1; + boolean saidAboutWall = client.getVarbitValue(VarbitID.SOTN_EXPLAINED_CHEST) == 1; choices = new DialogChoiceSteps(); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shadesofmortton/ShadesOfMortton.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shadesofmortton/ShadesOfMortton.java index f1a6ff452f6..e6f1e0845e4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shadesofmortton/ShadesOfMortton.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shadesofmortton/ShadesOfMortton.java @@ -200,14 +200,12 @@ protected void setupRequirements() public void setupConditions() { - has20Sanctity = new VarplayerRequirement(341, 20); - razmirePartlyCured = new VarplayerRequirement(VarPlayerID.MORTTONMULTI, true, 3); curedRazmire = new VarplayerRequirement(VarPlayerID.MORTTONMULTI, true, 6); //64 ulsquirePartlyCured = new VarplayerRequirement(VarPlayerID.MORTTONMULTI, true, 1); curedUlsquire = new VarplayerRequirement(VarPlayerID.MORTTONMULTI, true, 5); - repairedTemple = new VarplayerRequirement(343, 100); + repairedTemple = new VarplayerRequirement(VarPlayerID.TEMPLE_REPAIRED_P, 100); has20Sanctity = new VarplayerRequirement(VarPlayerID.TEMPLE_SANCTITY_P, 20, Operation.GREATER_EQUAL); litFire = new ObjectCondition(ObjectID.TEMPLEFIRE_ALTAR, new WorldPoint(3506, 3316, 0)); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shadowofthestorm/IncantationStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shadowofthestorm/IncantationStep.java index 3420e73af02..8de06b032d4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shadowofthestorm/IncantationStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shadowofthestorm/IncantationStep.java @@ -32,6 +32,7 @@ import net.runelite.api.events.WidgetLoaded; import net.runelite.api.gameval.InterfaceID; import net.runelite.api.gameval.ItemID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.widgets.Widget; import net.runelite.client.eventbus.Subscribe; @@ -44,31 +45,31 @@ public class IncantationStep extends DetailedQuestStep * The order of the words received by Denath is reverse. * The value of this varbit maps to the {@link IncantationStep#WORDS} array. */ - private static final @Varbit int INCANTATION_WORD_1 = 1373; + private static final @Varbit int INCANTATION_WORD_1 = VarbitID.AGRITH_INCANTATION_1; /** * The index of the second word in the incantation, as per the order of the Demonic tome (reverse of the order Denath gives you). * The order of the words received by Denath is reverse. * The value of this varbit maps to the {@link IncantationStep#WORDS} array. */ - private static final @Varbit int INCANTATION_WORD_2 = 1374; + private static final @Varbit int INCANTATION_WORD_2 = VarbitID.AGRITH_INCANTATION_2; /** * The index of the third word in the incantation, as per the order of the Demonic tome (reverse of the order Denath gives you). * The order of the words received by Denath is reverse. * The value of this varbit maps to the {@link IncantationStep#WORDS} array. */ - private static final @Varbit int INCANTATION_WORD_3 = 1375; + private static final @Varbit int INCANTATION_WORD_3 = VarbitID.AGRITH_INCANTATION_3; /** * The index of the fourth word in the incantation, as per the order of the Demonic tome (reverse of the order Denath gives you). * The order of the words received by Denath is reverse. * The value of this varbit maps to the {@link IncantationStep#WORDS} array. */ - private static final @Varbit int INCANTATION_WORD_4 = 1376; + private static final @Varbit int INCANTATION_WORD_4 = VarbitID.AGRITH_INCANTATION_4; /** * The index of the fifth word in the incantation, as per the order of the Demonic tome (reverse of the order Denath gives you). * The order of the words received by Denath is reverse. * The value of this varbit maps to the {@link IncantationStep#WORDS} array. */ - private static final @Varbit int INCANTATION_WORD_5 = 1377; + private static final @Varbit int INCANTATION_WORD_5 = VarbitID.AGRITH_INCANTATION_5; /** * The possible words that that can be used the incantation diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shadowofthestorm/SearchKilns.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shadowofthestorm/SearchKilns.java index e225c39b49a..36faf859532 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shadowofthestorm/SearchKilns.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shadowofthestorm/SearchKilns.java @@ -31,6 +31,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; import java.util.Arrays; @@ -54,7 +55,7 @@ public void onGameTick(GameTick event) @Override protected void updateSteps() { - int correctKiln = client.getVarbitValue(1378); + int correctKiln = client.getVarbitValue(VarbitID.AGRITH_KILN); if (correctKiln == 0) { startUpStep(searchKiln1); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shadowsofcustodia/ShadowsOfCustodia.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shadowsofcustodia/ShadowsOfCustodia.java new file mode 100644 index 00000000000..e2ed47fd491 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shadowsofcustodia/ShadowsOfCustodia.java @@ -0,0 +1,406 @@ +/* + * Copyright (c) 2025, pajlada + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.plugins.microbot.questhelper.helpers.quests.shadowsofcustodia; + +import net.runelite.client.plugins.microbot.questhelper.bank.banktab.BankSlotIcons; +import net.runelite.client.plugins.microbot.questhelper.collections.ItemCollections; +import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; +import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; +import net.runelite.client.plugins.microbot.questhelper.questinfo.QuestHelperQuest; +import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; +import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.item.TeleportItemRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.player.FreeInventorySlotRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.player.SkillRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.quest.QuestRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.not; +import net.runelite.client.plugins.microbot.questhelper.requirements.util.Operation; +import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; +import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; +import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; +import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; +import net.runelite.client.plugins.microbot.questhelper.rewards.UnlockReward; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import net.runelite.api.QuestState; +import net.runelite.api.Skill; +import net.runelite.api.coords.WorldPoint; +import net.runelite.api.gameval.ItemID; +import net.runelite.api.gameval.NpcID; +import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; + +/** + * The quest guide for the "Shadows of Custodia" OSRS quest + */ +public class ShadowsOfCustodia extends BasicQuestHelper +{ + // Item requirements + ItemRequirement fishingRod; + ItemRequirement hammer; + ItemRequirement fourMapleLogs; + ItemRequirement fourWillowLongbows; + + // Item recommendations + ItemRequirement combatGear; + ItemRequirement energyOrStaminas; + TeleportItemRequirement startTeleport; + + // Miscellaneous requirements + VarbitRequirement needToTalkToCitizen; + VarbitRequirement needToTalkToBarkeep; + VarbitRequirement needToTalkToShopkeep; + VarbitRequirement needToTalkToIctus; + Conditions needToFishClothFromLog; + VarbitRequirement needsToHandInWillowLongbows; + VarbitRequirement needToReinforceWall; + FreeInventorySlotRequirement oneFreeInventorySlot; + + // Zones + Zone caveRegion01; + Zone caveRegion02; + Zone caveRegion03; + Zone upstairsOfParentsHouse; + + // Zone requirements + ZoneRequirement outsideOfCave; + ZoneRequirement isUpstairsOfParentsHouse; + + // Steps + ObjectStep startQuest; + ConditionalStep findOutAboutTheMissingPeople; + NpcStep talkToTheParents; + ObjectStep inspectWall; + ObjectStep inspectPuddle; + ObjectStep inspectPlank; + NpcStep returnToTheParentsWithCloth; + ObjectStep enterCave; + NpcStep talkToInjuredBoyInCave; + ConditionalStep findInjuredBoys; + NpcStep returnToTheParentsWithBoy; + ObjectStep reinforceWall; + NpcStep informCaptainAboutMissingPeople; + ConditionalStep reinforceWallAndTalkToCaptain; + NpcStep talkToEtzAboutWhatTheyRemember; + ConditionalStep talkToBoysUpstairs; + ObjectStep enterCave2; + NpcStep talkToAntos; + ConditionalStep saveAntos; + ConditionalStep talkToAntosAfterSavingHim; + NpcStep finishQuest; + + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + steps.put(0, startQuest); + steps.put(2, findOutAboutTheMissingPeople); + steps.put(4, talkToTheParents); + steps.put(5, inspectWall); + steps.put(6, inspectPuddle); + steps.put(8, inspectPlank); + steps.put(9, returnToTheParentsWithCloth); + steps.put(10, findInjuredBoys); + steps.put(12, findInjuredBoys); + steps.put(14, returnToTheParentsWithBoy); + steps.put(15, reinforceWallAndTalkToCaptain); + steps.put(16, talkToBoysUpstairs); + steps.put(18, saveAntos); + steps.put(20, talkToAntosAfterSavingHim); + steps.put(22, finishQuest); + + return steps; + } + + @Override + protected void setupZones() + { + caveRegion01 = new Zone(5272); + caveRegion02 = new Zone(5273); + caveRegion03 = new Zone(5016); + + upstairsOfParentsHouse = new Zone(new WorldPoint(1378, 3357, 1), new WorldPoint(1383, 3360, 1)); + } + + @Override + protected void setupRequirements() + { + // For the step where you're prompted to talk to citizens about missing people + needToTalkToCitizen = new VarbitRequirement(VarbitID.SOC_CITIZEN, 0); + needToTalkToBarkeep = new VarbitRequirement(VarbitID.SOC_BARKEEP, 0); + needToTalkToShopkeep = new VarbitRequirement(VarbitID.SOC_SHOPKEEP, 0); + needToTalkToIctus = new VarbitRequirement(VarbitID.SOC_SILLYMAN, 0); + + needToFishClothFromLog = not(new QuestRequirement(QuestHelperQuest.SHADOWS_OF_CUSTODIA, 9)); + needsToHandInWillowLongbows = new VarbitRequirement(VarbitID.SOC_BOWSMADE, 2, Operation.NOT_EQUAL); + needToReinforceWall = new VarbitRequirement(VarbitID.SOC_WALL_STATE, 3, Operation.NOT_EQUAL); + + outsideOfCave = new ZoneRequirement(false, caveRegion01, caveRegion02, caveRegion03); + isUpstairsOfParentsHouse = new ZoneRequirement(upstairsOfParentsHouse); + + oneFreeInventorySlot = new FreeInventorySlotRequirement(1); + + startTeleport = new TeleportItemRequirement("Teleport to Auburnvale (Fairy ring AIS)", ItemCollections.FAIRY_STAFF); + startTeleport.setAdditionalOptions(new QuestRequirement(QuestHelperQuest.LUMBRIDGE_ELITE, QuestState.FINISHED)); + + fishingRod = new ItemRequirement("Fishing rod", ItemID.FISHING_ROD).showConditioned(needToFishClothFromLog).highlighted(); + fishingRod.appendToTooltip("Can be obtained during the quest, south-west of the area where you need it."); + + // NOTE: I have _not_ confirmed you can use any other hammer, this is an educated guess. + hammer = new ItemRequirement("Hammer", ItemCollections.HAMMER).showConditioned(needToReinforceWall); + fourMapleLogs = new ItemRequirement("Maple logs", ItemID.MAPLE_LOGS, 4).showConditioned(needToReinforceWall); + + fourWillowLongbows = new ItemRequirement("Willow longbow", ItemID.WILLOW_LONGBOW, 4).showConditioned(needsToHandInWillowLongbows); + + combatGear = new ItemRequirement("Combat gear", -1, -1); + combatGear.setDisplayItemId(BankSlotIcons.getCombatGear()); + + energyOrStaminas = new ItemRequirement("Energy/Stamina potions", ItemCollections.RUN_RESTORE_ITEMS); + } + + public void setupSteps() + { + var unreachableState = new DetailedQuestStep(this, "This state should not be reachable, please make a report with a screenshot in the Quest Helper discord."); + + startQuest = new ObjectStep(this, ObjectID.SOC_MISSING_PERSONS, new WorldPoint(1396, 3356, 0), "Read the noticeboard in the Auburnvale bar to start the quest."); + startQuest.addDialogStep("Yes."); + startQuest.addTeleport(startTeleport); + + var talkToCitizen = new NpcStep(this, NpcID.SOC_CITIZEN, new WorldPoint(1394, 3354, 0), "Talk to Marcus in the Auburnvale bar."); + var talkToBarkeep = new NpcStep(this, NpcID.AUBURN_BARTENDER, new WorldPoint(1391, 3354, 0), "Talk to the Bartender in the Auburnvale bar."); + talkToBarkeep.addDialogStep("About the missing people..."); + var talkToShopkeep = new NpcStep(this, NpcID.AUBURN_GENERAL_STORE, new WorldPoint(1380, 3348, 0), "Talk to the Shopkeep in the Auburnvale General store."); + talkToShopkeep.addDialogStep("About the missing people..."); + var talkToIctus = new NpcStep(this, NpcID.SOC_SILLYMAN, new WorldPoint(1409, 3375, 0), "Talk to Ictus, north of the Auburnvale Quetzal."); + + findOutAboutTheMissingPeople = new ConditionalStep(this, unreachableState, "Talk to citizens of Auburnvale about the missing people."); + findOutAboutTheMissingPeople.addStep(needToTalkToCitizen, talkToCitizen); + findOutAboutTheMissingPeople.addStep(needToTalkToBarkeep, talkToBarkeep); + findOutAboutTheMissingPeople.addStep(needToTalkToIctus, talkToIctus); + findOutAboutTheMissingPeople.addStep(needToTalkToShopkeep, talkToShopkeep); + + talkToTheParents = new NpcStep(this, NpcID.SOC_PARENT, new WorldPoint(1381, 3360, 0), "Talk to Aemilia and Francis, north of the Auburnvale General store, about their missing sons.", true); + talkToTheParents.addAlternateNpcs(NpcID.SOC_PARENT_2); + + inspectWall = new ObjectStep(this, ObjectID.SOC_WALL_INSPECT_OP, new WorldPoint(1378, 3358, 0), "Inspect the wall outside Aemilia and Francis' house."); + + inspectPuddle = new ObjectStep(this, ObjectID.SOC_PUDDLE, new WorldPoint(1376, 3357, 0), "Inspect the puddle outside Aemilia and Francis' house."); + inspectPlank = new ObjectStep(this, ObjectID.SOC_LOG_OP, new WorldPoint(1347, 3354, 0), "Follow the puddle trail and inspect the plank in the river, west of Auburnvale.", fishingRod); + + returnToTheParentsWithCloth = talkToTheParents.copy(); + returnToTheParentsWithCloth.setText("Return to Aemilia and Francis' house, north of the Auburnvale General store, and talk to them about the cloth you found."); + + // 16649: clicked plank but without a fishing rod + + enterCave = new ObjectStep(this, ObjectID.SOC_CAVE_ENTRANCE, new WorldPoint(1295, 3373, 0), "Follow the trail west of the city, then through the mountains, and enter the cave."); + + talkToInjuredBoyInCave = new NpcStep(this, NpcID.SOC_INJURED_PERSON, new WorldPoint(1298, 9757, 0), "Talk to the Injured boy inside the cave."); + + findInjuredBoys = new ConditionalStep(this, talkToInjuredBoyInCave); + findInjuredBoys.addStep(outsideOfCave, enterCave); + + returnToTheParentsWithBoy = talkToTheParents.copy(); + returnToTheParentsWithBoy.setText("Return to Aemilia and Francis's house, north of the Auburnvale General store, and tell them you found their missing boys."); + + reinforceWall = new ObjectStep(this, ObjectID.SOC_WALL_INSPECT_REINFORCE, new WorldPoint(1378, 3358, 0), "Reinforce the wall outside Aemilia and Francis' house.", hammer, fourMapleLogs); + + informCaptainAboutMissingPeople = new NpcStep(this, NpcID.AUBURNVALE_GUARD_CAPTAIN, new WorldPoint(1369, 3344, 0), "Talk to Captain Ariadna, south-west of the Auburnvale General store, and inform her about the missing people.", fourWillowLongbows); + + reinforceWallAndTalkToCaptain = new ConditionalStep(this, informCaptainAboutMissingPeople); + reinforceWallAndTalkToCaptain.addStep(needToReinforceWall, reinforceWall); + + var climbUpLadder = new ObjectStep(this, ObjectID.SOC_LADDER, new WorldPoint(1380, 3357, 0), "Climb upstairs of Aemilia and Francis' house and talk to Etz."); + + talkToEtzAboutWhatTheyRemember = new NpcStep(this, NpcID.SOC_ETZ, new WorldPoint(1381, 3360, 1), "Talk to Etz, upstairs of Aemilia and Francis' house, about what he remembers."); + talkToEtzAboutWhatTheyRemember.addSubSteps(climbUpLadder); + + talkToBoysUpstairs = new ConditionalStep(this, talkToEtzAboutWhatTheyRemember); + talkToBoysUpstairs.addStep(not(isUpstairsOfParentsHouse), climbUpLadder); + + var climbDownstairs = new ObjectStep(this, ObjectID.SOC_LADDERTOP, new WorldPoint(1380, 3357, 1), "Climb downstairs, then head back to the cave."); + enterCave2 = enterCave.copy(); + enterCave2.addSubSteps(climbDownstairs); + + var killCreatures = new NpcStep(this, NpcID.SOC_QUEST_JUVENILE, new WorldPoint(1337, 9753, 0), "Kill the strange creatures. Protect from Melee works to avoid most damage.", true); + + talkToAntos = new NpcStep(this, NpcID.SOC_ANTOS, new WorldPoint(1337, 9753, 0), "Talk to Antos in the eastern part of the cave, ready to fight three Strange creatures. Protect from Melee works to avoid all damage."); + talkToAntos.addSubSteps(killCreatures); + + var hasSpawnedCreatures = new VarbitRequirement(VarbitID.SOC_STALKERS_ENCOUNTERED, 1); + + saveAntos = new ConditionalStep(this, talkToAntos); + // TODO: technically a little route would be nice + saveAntos.addStep(isUpstairsOfParentsHouse, climbDownstairs); + saveAntos.addStep(outsideOfCave, enterCave2); + saveAntos.addStep(hasSpawnedCreatures, killCreatures); + + talkToAntosAfterSavingHim = new ConditionalStep(this, talkToAntos); + // TODO: technically a little route would be nice + talkToAntosAfterSavingHim.addStep(outsideOfCave, enterCave2); + + finishQuest = new NpcStep(this, NpcID.AUBURNVALE_GUARD_CAPTAIN, new WorldPoint(1368, 3343, 0), "Talk to Captain Ariadna in Auburnvale to finish the quest!"); + } + + @Override + public List getItemRequirements() + { + return List.of( + fishingRod, + fourMapleLogs, + hammer, + fourWillowLongbows + ); + } + + @Override + public List getItemRecommended() + { + return List.of( + startTeleport, + combatGear, + energyOrStaminas + ); + } + + @Override + public List getGeneralRecommended() + { + return List.of( + oneFreeInventorySlot + ); + } + + @Override + public List getGeneralRequirements() + { + return List.of( + new QuestRequirement(QuestHelperQuest.CHILDREN_OF_THE_SUN, QuestState.FINISHED), + new SkillRequirement(Skill.SLAYER, 54), + new SkillRequirement(Skill.FISHING, 45), + new SkillRequirement(Skill.CONSTRUCTION, 41), + new SkillRequirement(Skill.HUNTER, 36) + ); + } + + @Override + public List getCombatRequirements() + { + return List.of( + "3 Strange creatures (level 93)" + ); + } + + @Override + public QuestPointReward getQuestPointReward() + { + return new QuestPointReward(2); + } + + @Override + public List getExperienceRewards() + { + return List.of( + new ExperienceReward(Skill.SLAYER, 10000), + new ExperienceReward(Skill.HUNTER, 4000), + new ExperienceReward(Skill.FISHING, 3000), + new ExperienceReward(Skill.CONSTRUCTION, 3000) + ); + } + + @Override + public List getUnlockRewards() + { + return List.of( + new UnlockReward("Access to the Custodia Pass Slayer Dungeon") + ); + } + + @Override + public List getPanels() + { + var panels = new ArrayList(); + + panels.add(new PanelDetails("Starting off", List.of( + startQuest, + findOutAboutTheMissingPeople, + talkToTheParents + ), List.of( + // Requirements + ), List.of( + startTeleport + ))); + + panels.add(new PanelDetails("Hunting the trail", List.of( + inspectWall, + inspectPuddle, + inspectPlank, + returnToTheParentsWithCloth, + enterCave, + talkToInjuredBoyInCave, + returnToTheParentsWithBoy + ), List.of( + fishingRod + ), List.of( + // Recommended + ))); + + panels.add(new PanelDetails("Inform the authorities", List.of( + reinforceWall, + informCaptainAboutMissingPeople, + talkToEtzAboutWhatTheyRemember + ), List.of( + fourMapleLogs, + hammer, + fourWillowLongbows + ), List.of( + // Recommended + ))); + + panels.add(new PanelDetails("Save Antos", List.of( + enterCave2, + talkToAntos, + finishQuest + ), List.of( + // Requirements + ), List.of( + combatGear + ))); + + return panels; + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/sheepherder/SheepHerder.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/sheepherder/SheepHerder.java index 8d1c7562594..e32546ca479 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/sheepherder/SheepHerder.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/sheepherder/SheepHerder.java @@ -43,6 +43,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -123,43 +124,43 @@ private void setupConditions() { inEnclosure = new ZoneRequirement(enclosure); - sheep1Burned = new VarbitRequirement(2233, 6); + sheep1Burned = new VarbitRequirement(VarbitID.SHEEPHERDER_SHEEP_C, 6); sheep1HasBones = new Conditions(LogicType.OR, bones3, sheep1Burned ); sheep1InEnclosure = new Conditions(LogicType.OR, - new VarbitRequirement(2233, 1), + new VarbitRequirement(VarbitID.SHEEPHERDER_SHEEP_C, 1), sheep1HasBones ); - sheep2Burned = new VarbitRequirement(2234, 6); + sheep2Burned = new VarbitRequirement(VarbitID.SHEEPHERDER_SHEEP_D, 6); sheep2HasBones = new Conditions(LogicType.OR, bones4, sheep2Burned ); sheep2InEnclosure = new Conditions(LogicType.OR, - new VarbitRequirement(2234, 1), + new VarbitRequirement(VarbitID.SHEEPHERDER_SHEEP_D, 1), sheep2HasBones ); - sheep3Burned = new VarbitRequirement(2232, 6); + sheep3Burned = new VarbitRequirement(VarbitID.SHEEPHERDER_SHEEP_B, 6); sheep3HasBones = new Conditions(LogicType.OR, bones2, sheep3Burned ); sheep3InEnclosure = new Conditions(LogicType.OR, - new VarbitRequirement(2232, 1), + new VarbitRequirement(VarbitID.SHEEPHERDER_SHEEP_B, 1), sheep3HasBones ); - sheep4Burned = new VarbitRequirement(2231, 6); + sheep4Burned = new VarbitRequirement(VarbitID.SHEEPHERDER_SHEEP_A, 6); sheep4HasBones = new Conditions(LogicType.OR, bones1, sheep4Burned ); sheep4InEnclosure = new Conditions(LogicType.OR, - new VarbitRequirement(2231, 1), + new VarbitRequirement(VarbitID.SHEEPHERDER_SHEEP_A, 1), sheep4HasBones ); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/sheepshearer/SheepShearer.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/sheepshearer/SheepShearer.java index 7abb8a34ca0..3f35bb58810 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/sheepshearer/SheepShearer.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/sheepshearer/SheepShearer.java @@ -29,68 +29,68 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.ManualRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.nor; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.or; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; -import net.runelite.api.InventoryID; -import net.runelite.api.ItemContainer; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ItemStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.widget.WidgetHighlight; +import net.runelite.client.plugins.microbot.questhelper.util.QHObjectID; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.IntStream; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.ItemContainerChanged; +import net.runelite.api.gameval.InventoryID; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarPlayerID; import net.runelite.client.eventbus.Subscribe; -import java.util.*; -import java.util.stream.IntStream; - -import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.*; - public class SheepShearer extends BasicQuestHelper { - //Items Required - ItemRequirement ballOfWool, shears, woolOrBalls, onlyWool, totalWoolNeeded, totalBallsNeeded; - - QuestStep startStep, getSheers, climbStairsUp, climbStairsDown, spinBalls, turnInBalls; - - NpcStep shearSheep; - + // Required items + ItemRequirement ballOfWool; + ItemRequirement shears; + ItemRequirement woolOrBalls; + ItemRequirement onlyWool; + ItemRequirement totalWoolNeeded; + ItemRequirement totalBallsNeeded; + + // Zones Zone castleSecond; + // Miscellaneous requirements Requirement inCastleSecond; - + // TODO: We should be able to use a EmptyInvSlot requirement here ManualRequirement skipIfFullInventory; - int woolNeeded; + NpcStep startStep; + ItemStep getSheers; + NpcStep shearSheep; + ObjectStep climbStairsUp; + ObjectStep climbStairsDown; + ObjectStep spinBalls; + NpcStep turnInBalls; + + int woolNeeded = 20; @Override - public Map loadSteps() + protected void setupZones() { - initializeRequirements(); - setupConditions(); - setupSteps(); - - Map steps = new HashMap<>(); - - // If you have all the wool you need, OR you have filled your inventory with wool - Requirement hasAllWoolOrFullInv = or(totalWoolNeeded, and(woolOrBalls, skipIfFullInventory)); - // If you have all the balls needed, OR you've made all the wool you had in your inventory into balls of wool - Requirement hasAllBallsOrFullInv = or(totalBallsNeeded, and(nor(onlyWool), ballOfWool)); - ConditionalStep craftingBalls = new ConditionalStep(this, getSheers); - craftingBalls.addStep(and(hasAllBallsOrFullInv, inCastleSecond), climbStairsDown); - craftingBalls.addStep(hasAllBallsOrFullInv, turnInBalls); - craftingBalls.addStep(and(hasAllWoolOrFullInv, inCastleSecond), spinBalls); - craftingBalls.addStep(hasAllWoolOrFullInv, climbStairsUp); - craftingBalls.addStep(shears, shearSheep); - - steps.put(0, startStep); - IntStream.range(1, 20).forEach(i -> steps.put(i, craftingBalls)); - - return steps; + castleSecond = new Zone(new WorldPoint(3200, 3232, 1), new WorldPoint(3220, 3205, 1)); } @Override @@ -103,27 +103,20 @@ protected void setupRequirements() woolOrBalls.addAlternates(ItemID.BALL_OF_WOOL); onlyWool = new ItemRequirement("Wool", ItemID.WOOL); - woolNeeded = client.getVarpValue(179) > 1 ? 21 - client.getVarpValue(179) : 20; - totalWoolNeeded = woolOrBalls.quantity(woolNeeded); - totalBallsNeeded = ballOfWool.quantity(woolNeeded); - } - - @Override - protected void setupZones() - { - castleSecond = new Zone(new WorldPoint(3200, 3232, 1), new WorldPoint(3220, 3205, 1)); - } + totalWoolNeeded = woolOrBalls.quantity(20); + totalBallsNeeded = ballOfWool.quantity(20); - public void setupConditions() - { inCastleSecond = new ZoneRequirement(castleSecond); skipIfFullInventory = new ManualRequirement(); - ItemContainer inventory = client.getItemContainer(InventoryID.INVENTORY); - if (inventory == null) return; + var inventory = client.getItemContainer(InventoryID.INV); + if (inventory != null) + { + int itemsInInventory = inventory.count(); + skipIfFullInventory.setShouldPass(itemsInInventory == 28); + } - int itemsInInventory = inventory.count(); - skipIfFullInventory.setShouldPass(itemsInInventory == 28); + updateWoolNeeded(); } public void setupSteps() @@ -134,48 +127,81 @@ public void setupSteps() getSheers = new ItemStep(this, new WorldPoint(3190, 3273, 0), "Pickup the shears in Fred's house.", shears); shearSheep = new NpcStep(this, NpcID.SHEEPUNSHEERED3G, new WorldPoint(3201, 3268, 0), - "Shear " + woolNeeded + " sheep in the nearby field.", true, shears); + "Shear sheep in the nearby field.", true, shears, totalWoolNeeded); shearSheep.addAlternateNpcs(NpcID.SHEEPUNSHEERED3, NpcID.SHEEPUNSHEERED3W, NpcID.SHEEPUNSHEERED, NpcID.SHEEPUNSHEEREDG, NpcID.SHEEPUNSHEERED3, NpcID.SHEEPUNSHEEREDW); - climbStairsUp = new ObjectStep(this, ObjectID.SPIRALSTAIRS, new WorldPoint(3204, 3207, 0), - "Climb the staircase in the Lumbridge Castle to spin the wool into balls of wool.", totalWoolNeeded); + climbStairsUp = new ObjectStep(this, QHObjectID.LUMBRIDGE_CASTLE_F0_SOUTH_STAIRCASE, new WorldPoint(3204, 3207, 0), + "Climb the staircase in the Lumbridge Castle to spin the wool in your inventory into balls of wool.", totalWoolNeeded); spinBalls = new ObjectStep(this, ObjectID.SPINNINGWHEEL, new WorldPoint(3209, 3212, 1), "Spin your wool into balls.", totalWoolNeeded); - spinBalls.addWidgetHighlight(270, 14); + spinBalls.addWidgetHighlight(WidgetHighlight.createMultiskillByItemId(ItemID.BALL_OF_WOOL)); climbStairsDown = new ObjectStep(this, ObjectID.SPIRALSTAIRSMIDDLE, new WorldPoint(3204, 3207, 1), "Climb down the staircase.", totalBallsNeeded); climbStairsDown.addDialogSteps("Climb down the stairs."); turnInBalls = new NpcStep(this, NpcID.FRED_THE_FARMER, new WorldPoint(3190, 3273, 0), - "Bring Fred the Farmer north of Lumbridge " + woolNeeded + " balls of wool (UNNOTED) to finish the quest. If you only have some of the balls needed, you can still deposit them with him.", + "Bring Fred the Farmer north of Lumbridge your balls of wool (UNNOTED) to progress the quest. If you only have some of the balls needed, you can still deposit them with him.", totalBallsNeeded); turnInBalls.addDialogSteps("I need to talk to you about shearing these sheep!"); } - @Subscribe - public void onItemContainerChanged(ItemContainerChanged event) + @Override + public Map loadSteps() { - if (event.getContainerId() != InventoryID.INVENTORY.getId()) + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + // If you have all the wool you need, OR you have filled your inventory with wool + var hasAllWoolOrFullInv = or(totalWoolNeeded, and(woolOrBalls, skipIfFullInventory)); + // If you have all the balls needed, OR you've made all the wool you had in your inventory into balls of wool + var hasAllBallsOrFullInv = or(totalBallsNeeded, and(nor(onlyWool), ballOfWool)); + var craftingBalls = new ConditionalStep(this, getSheers); + craftingBalls.addStep(and(hasAllBallsOrFullInv, inCastleSecond), climbStairsDown); + craftingBalls.addStep(hasAllBallsOrFullInv, turnInBalls); + craftingBalls.addStep(and(hasAllWoolOrFullInv, inCastleSecond), spinBalls); + craftingBalls.addStep(hasAllWoolOrFullInv, climbStairsUp); + craftingBalls.addStep(shears, shearSheep); + + steps.put(0, startStep); + IntStream.range(1, 21).forEach(i -> steps.put(i, craftingBalls)); + + return steps; + } + + private void updateWoolNeeded() + { + var sheepVarp = client.getVarpValue(VarPlayerID.SHEEP); + var newWoolNeeded = sheepVarp > 1 ? 21 - sheepVarp : 20; + if (newWoolNeeded == woolNeeded) { return; } - - woolNeeded = client.getVarpValue(179) > 1 ? 21 - client.getVarpValue(179) : 20; + woolNeeded = newWoolNeeded; totalBallsNeeded.setQuantity(woolNeeded); totalWoolNeeded.setQuantity(woolNeeded); + } - turnInBalls.setText("Bring Fred the Farmer north of Lumbridge " + woolNeeded + " balls of wool (UNNOTED) to finish the quest."); - shearSheep.setText("Shear " + woolNeeded + " sheep in the nearby field."); + @Subscribe + public void onItemContainerChanged(ItemContainerChanged event) + { + if (event.getContainerId() != InventoryID.INV) + { + return; + } // If inventory full skipIfFullInventory.setShouldPass(event.getItemContainer().count() == 28); + + updateWoolNeeded(); } @Override public List getItemRequirements() { - ArrayList reqs = new ArrayList<>(); - reqs.add(ballOfWool.quantity(20)); - reqs.add(shears); - return reqs; + return List.of( + totalBallsNeeded, + shears + ); } @Override @@ -187,22 +213,36 @@ public QuestPointReward getQuestPointReward() @Override public List getExperienceRewards() { - return Collections.singletonList(new ExperienceReward(Skill.CRAFTING, 150)); + return List.of( + new ExperienceReward(Skill.CRAFTING, 150) + ); } @Override public List getItemRewards() { - return Collections.singletonList(new ItemReward("Coins", ItemID.COINS, 60)); + return List.of( + new ItemReward("Coins", ItemID.COINS, 60) + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); + var steps = new ArrayList(); + + steps.add(new PanelDetails("Bring Fred Some Wool", List.of( + startStep, + getSheers, + shearSheep, + climbStairsUp, + spinBalls, + climbStairsDown, + turnInBalls + ), List.of( + totalBallsNeeded + ))); - allSteps.add(new PanelDetails("Bring Fred Some Wool", Arrays.asList(startStep, getSheers, shearSheep, - climbStairsUp, spinBalls, climbStairsDown, turnInBalls), ballOfWool.quantity(20))); - return allSteps; + return steps; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shieldofarrav/ShieldOfArravBlackArmGang.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shieldofarrav/ShieldOfArravBlackArmGang.java index b3b63f748c5..694fd1070c2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shieldofarrav/ShieldOfArravBlackArmGang.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/shieldofarrav/ShieldOfArravBlackArmGang.java @@ -44,8 +44,8 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; -import net.runelite.api.gameval.VarPlayerID; import net.runelite.api.gameval.VarbitID; +import net.runelite.api.gameval.VarPlayerID; import java.util.*; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/sinsofthefather/SinsOfTheFather.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/sinsofthefather/SinsOfTheFather.java index c5f38366a4d..fe76f5e161e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/sinsofthefather/SinsOfTheFather.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/sinsofthefather/SinsOfTheFather.java @@ -347,11 +347,11 @@ public void setupConditions() inPuzzleInterface = new WidgetTextRequirement(665, 7, "1"); - talkedToKael = new VarbitRequirement(10347, 1); - talkedToVertida = new VarbitRequirement(10348, 1); - talkedToPolmafi = new VarbitRequirement(10350, 2); - talkedToRadigad = new VarbitRequirement(10351, 1); - talkedToIvan = new VarbitRequirement(10349, 1); + talkedToKael = new VarbitRequirement(VarbitID.MYQ5_KAEL_CONVINCED, 1); + talkedToVertida = new VarbitRequirement(VarbitID.MYQ5_VERTIDA_CONVINCED, 1); + talkedToPolmafi = new VarbitRequirement(VarbitID.MYQ5_POLMAFI_CONVINCED, 2); + talkedToRadigad = new VarbitRequirement(VarbitID.MYQ5_RADIGAD_CONVINCED, 1); + talkedToIvan = new VarbitRequirement(VarbitID.MYQ5_IVAN_CONVINCED, 1); } @Override @@ -656,7 +656,7 @@ public void setupSteps() talkToPolmafi = new NpcStep(this, NpcID.MYQ5_POLMAFI_CHILD, new WorldPoint(3599, 9612, 0), "Bring a Vyrewatch disguise to Polmafi in the Meiyerditch hideout in Old Man Ral's basement.", vyreTop, vyreLegs, vyreShoes); talkToPolmafi.addDialogStep("Here you go."); - talkToPolmafiMore = new NpcStep(this, 9554, new WorldPoint(3599, 9612, 0), + talkToPolmafiMore = new NpcStep(this, NpcID.MYQ5_POLMAFI_CHILD, new WorldPoint(3599, 9612, 0), "Finish speaking to Polmafi in the Meiyerditch hideout."); talkToPolmafiMore.addDialogStep("Here you go."); talkToPolmafi.addSubSteps(talkToPolmafiMore, goDownToPolmafi, goDownToPolmafiNoItems); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/sleepinggiants/SleepingGiants.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/sleepinggiants/SleepingGiants.java index fd85a8ad70f..a0743034f23 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/sleepinggiants/SleepingGiants.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/sleepinggiants/SleepingGiants.java @@ -245,9 +245,9 @@ public void setupConditions() preformObtained = new VarbitRequirement(VarbitID.SLEEPING_GIANTS_TUTORIAL, 50, Operation.GREATER_EQUAL); selectingMould = new WidgetPresenceRequirement(718, 2); - noForteSelected = new VarbitRequirement(13910, 0); - noBladeSelected = new VarbitRequirement(13911, 0); - noTipSelected = new VarbitRequirement(13912, 0); + noForteSelected = new VarbitRequirement(VarbitID.GIANTS_FOUNDRY_MOULD_SELECTED_RICASSO, 0); + noBladeSelected = new VarbitRequirement(VarbitID.GIANTS_FOUNDRY_MOULD_SELECTED_BLADE, 0); + noTipSelected = new VarbitRequirement(VarbitID.GIANTS_FOUNDRY_MOULD_SELECTED_TIP, 0); forteTabOpen = new WidgetSpriteRequirement(718, 12, 1, 297); bladeTabOpen = new WidgetSpriteRequirement(718, 12, 10, 297); tipTabOpen = new WidgetSpriteRequirement(718, 12, 19, 297); @@ -264,7 +264,7 @@ public void setupConditions() metalTooHotForPolishing = new VarbitRequirement(VarbitID.GIANTS_FOUNDRY_PREFORM_TEMPERATURE, 333, Operation.GREATER_EQUAL); metalTooCoolForPolishing = new VarbitRequirement(VarbitID.GIANTS_FOUNDRY_PREFORM_TEMPERATURE, 30, Operation.LESS_EQUAL); - swordMade = new VarbitRequirement(13949, 1000); + swordMade = new VarbitRequirement(VarbitID.GIANTS_FOUNDRY_PREFORM_COMPLETION, 1000); preformHandedIn = new VarbitRequirement(VarbitID.SLEEPING_GIANTS_TUTORIAL, 55, Operation.GREATER_EQUAL); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/AmloddLightPuzzle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/AmloddLightPuzzle.java index 33206dc1d68..761dd0eb0b4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/AmloddLightPuzzle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/AmloddLightPuzzle.java @@ -37,6 +37,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.List; @@ -264,30 +265,30 @@ protected void setupConditions() int RED = 5; int GREEN = 7; - notResetCrwys = new VarbitRequirement(8958, MAGENTA); + notResetCrwys = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_B_5_TO_1_A_5, MAGENTA); r1 = new Conditions( - new VarbitRequirement(8947, MAGENTA), // North - new VarbitRequirement(8969, MAGENTA) // West + new VarbitRequirement(VarbitID.SOTE_LIGHT_1_C_4_TO_1_D_4, MAGENTA), // North + new VarbitRequirement(VarbitID.SOTE_LIGHT_1_D_4_TO_1_D_5, MAGENTA) // West ); - r2 = new Conditions(new VarbitRequirement(8948, MAGENTA), r1); - r3 = new Conditions(new VarbitRequirement(8949, RED), r1); - r4 = new Conditions(new VarbitRequirement(8950, RED), r1); - r5 = new Conditions(new VarbitRequirement(8952, RED), r1); - r6 = new Conditions(new VarbitRequirement(8954, RED), r1); - r7 = new Conditions(new VarbitRequirement(8584, RED), r1); - r8 = new Conditions(new VarbitRequirement(8867, RED), r1); - r9 = new Conditions(new VarbitRequirement(8971, MAGENTA), r1); - r10 = new Conditions(new VarbitRequirement(8586, MAGENTA), r1); - r11 = new Conditions(new VarbitRequirement(8858, MAGENTA), r1); - r12 = new Conditions(new VarbitRequirement(8854, BLUE), r1); - r13 = new Conditions(new VarbitRequirement(8853, BLUE), r1); - r14 = new Conditions(new VarbitRequirement(8843, BLUE), r1); - r15 = new Conditions(new VarbitRequirement(8842, BLUE), r1); - r16 = new Conditions(new VarbitRequirement(8841, CYAN), r1); - r17 = new Conditions(new VarbitRequirement(8861, GREEN), r1); - r18 = new Conditions(new VarbitRequirement(8862, GREEN), r1); - r19 = new Conditions(new VarbitRequirement(8866, RED), r1); + r2 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_1_C_4_TO_1_C_5, MAGENTA), r1); + r3 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_1_C_5_TO_1_C_6, RED), r1); + r4 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_1_C_6_TO_1_D_6, RED), r1); + r5 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_1_D_6_TO_1_D_7, RED), r1); + r6 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_1_D_7_TO_1_C_7, RED), r1); + r7 = new Conditions(new VarbitRequirement(VarbitID.SOTE_PILLAR_0_C_7_TO_1_C_7, RED), r1); + r8 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_0_C_6_TO_0_C_7, RED), r1); + r9 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_1_D_5_TO_1_E_5, MAGENTA), r1); + r10 = new Conditions(new VarbitRequirement(VarbitID.SOTE_PILLAR_0_E_5_TO_1_E_5, MAGENTA), r1); + r11 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_0_E_4_TO_0_E_5, MAGENTA), r1); + r12 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_0_D_3_TO_0_E_3, BLUE), r1); + r13 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_0_D_2_TO_0_D_3, BLUE), r1); + r14 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_0_C_2_TO_0_D_2, BLUE), r1); + r15 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_0_C_2_TO_0_C_3, BLUE), r1); + r16 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_0_C_3_TO_0_C_4, CYAN), r1); + r17 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_0_C_4_TO_0_C_5, GREEN), r1); + r18 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_0_C_5_TO_0_D_5, GREEN), r1); + r19 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_0_C_6_TO_0_D_6, RED), r1); } public List getDisplaySteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/BaxtorianPuzzle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/BaxtorianPuzzle.java index 9dee6a4e69c..a4bfc8ac42c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/BaxtorianPuzzle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/BaxtorianPuzzle.java @@ -32,7 +32,6 @@ import net.runelite.client.plugins.microbot.questhelper.steps.DetailedOwnerStep; import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; import net.runelite.api.Client; -import net.runelite.api.GraphicID; import net.runelite.api.GraphicsObject; import net.runelite.api.coords.LocalPoint; import net.runelite.api.coords.WorldPoint; @@ -41,6 +40,7 @@ import net.runelite.api.events.WidgetLoaded; import net.runelite.api.gameval.InterfaceID; import net.runelite.api.gameval.ItemID; +import net.runelite.api.gameval.SpotanimID; import net.runelite.api.widgets.Widget; import net.runelite.client.eventbus.EventBus; import net.runelite.client.eventbus.Subscribe; @@ -142,7 +142,7 @@ public void onGraphicsObjectCreated(GraphicsObjectCreated event) { final GraphicsObject go = event.getGraphicsObject(); - if (go.getId() == GraphicID.GREY_BUBBLE_TELEPORT) + if (go.getId() == SpotanimID.SMOKEPUFF) { clientThread.invokeLater(() -> { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/CadarnLightPuzzle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/CadarnLightPuzzle.java index c3998ee719b..147c9cfdd6a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/CadarnLightPuzzle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/CadarnLightPuzzle.java @@ -40,6 +40,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.List; @@ -149,13 +150,13 @@ protected void setupConditions() int MAGENTA = 4; int BLUE = 3; - r1 = new VarbitRequirement(8971, MAGENTA); - r2 = new VarbitRequirement(8586, MAGENTA); - r3 = new VarbitRequirement(8858, MAGENTA); - r4 = new VarbitRequirement(8854, BLUE); - r5 = new VarbitRequirement(8853, BLUE); - r6 = new VarbitRequirement(8844, MAGENTA); - r7 = new VarbitRequirement(8845, MAGENTA); + r1 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_D_5_TO_1_E_5, MAGENTA); + r2 = new VarbitRequirement(VarbitID.SOTE_PILLAR_0_E_5_TO_1_E_5, MAGENTA); + r3 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_E_4_TO_0_E_5, MAGENTA); + r4 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_D_3_TO_0_E_3, BLUE); + r5 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_D_2_TO_0_D_3, BLUE); + r6 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_D_1_TO_0_D_2, MAGENTA); + r7 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_D_1_TO_0_E_1, MAGENTA); } public List getDisplaySteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/CrwysLightPuzzle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/CrwysLightPuzzle.java index 4d531fad051..0d7ad6635e9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/CrwysLightPuzzle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/CrwysLightPuzzle.java @@ -37,6 +37,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.List; @@ -232,26 +233,26 @@ protected void setupConditions() int CYAN = 2; int MAGENTA = 4; - notResetCadarn = new VarbitRequirement(8971, MAGENTA); - r1 = new VarbitRequirement(8947, MAGENTA); - r2 = new VarbitRequirement(8948, MAGENTA); - r3 = new VarbitRequirement(8957, MAGENTA); + notResetCadarn = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_D_5_TO_1_E_5, MAGENTA); + r1 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_C_4_TO_1_D_4, MAGENTA); + r2 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_C_4_TO_1_C_5, MAGENTA); + r3 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_C_5_TO_1_B_5, MAGENTA); r4 = new Conditions( - new VarbitRequirement(8958, MAGENTA), - new VarbitRequirement(8959, MAGENTA) + new VarbitRequirement(VarbitID.SOTE_LIGHT_1_B_5_TO_1_A_5, MAGENTA), + new VarbitRequirement(VarbitID.SOTE_LIGHT_1_B_5_TO_1_B_6, MAGENTA) ); - r5 = new Conditions(new VarbitRequirement(8961, MAGENTA), r4); - r6 = new Conditions(new VarbitRequirement(9011, WHITE), r4); - r7 = new Conditions(new VarbitRequirement(8579, WHITE), r4); + r5 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_1_A_5_TO_1_A_6, MAGENTA), r4); + r6 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_1_A_6_TO_1_A_8, WHITE), r4); + r7 = new Conditions(new VarbitRequirement(VarbitID.SOTE_PILLAR_0_A_8_TO_1_A_8, WHITE), r4); - r8 = new Conditions(new VarbitRequirement(8873, WHITE), r4); - r9 = new Conditions(new VarbitRequirement(8583, WHITE), r4); + r8 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_0_A_8_TO_0_B_8, WHITE), r4); + r9 = new Conditions(new VarbitRequirement(VarbitID.SOTE_PILLAR_0_B_8_TO_1_B_8, WHITE), r4); - r10 = new Conditions(new VarbitRequirement(8605, CYAN), r4); + r10 = new Conditions(new VarbitRequirement(VarbitID.SOTE_PILLAR_1_B_8_TO_2_B_8, CYAN), r4); - r11 = new Conditions(new VarbitRequirement(8787, CYAN), r4); - r12 = new Conditions(new VarbitRequirement(8604, CYAN), r4); + r11 = new Conditions(new VarbitRequirement(VarbitID.SOTE_LIGHT_2_B_7_TO_2_B_8, CYAN), r4); + r12 = new Conditions(new VarbitRequirement(VarbitID.SOTE_PILLAR_1_B_7_TO_2_B_7, CYAN), r4); } public List getDisplaySteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/HefinLightPuzzle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/HefinLightPuzzle.java index a4b540faa2d..deea3c11688 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/HefinLightPuzzle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/HefinLightPuzzle.java @@ -37,6 +37,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.List; @@ -330,28 +331,28 @@ protected void setupConditions() int YELLOW = 6; int GREEN = 7; - notResetMeilyr = new VarbitRequirement(8741, YELLOW); - - r1 = new VarbitRequirement(8971, MAGENTA); - r2 = new VarbitRequirement(8586, MAGENTA); - r3 = new VarbitRequirement(8858, MAGENTA); - r4 = new VarbitRequirement(8854, BLUE); - r5 = new VarbitRequirement(8853, BLUE); - r6 = new VarbitRequirement(8843, BLUE); - r7 = new VarbitRequirement(8842, BLUE); - r8 = new VarbitRequirement(8838, BLUE); - r9 = new VarbitRequirement(8932, WHITE); - r10 = new VarbitRequirement(8931, WHITE); - r11 = new VarbitRequirement(8927, WHITE); - r12 = new VarbitRequirement(8577, GREEN); - r13 = new VarbitRequirement(8834, GREEN); - r14 = new VarbitRequirement(8580, GREEN); - - r15 = new VarbitRequirement(8837, BLUE); - r16 = new VarbitRequirement(8836, BLUE); - r17 = new VarbitRequirement(8578, BLUE); - r18 = new VarbitRequirement(8723, GREEN); - r19 = new VarbitRequirement(8725, GREEN); + notResetMeilyr = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_D_6_TO_2_D_5, YELLOW); + + r1 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_D_5_TO_1_E_5, MAGENTA); + r2 = new VarbitRequirement(VarbitID.SOTE_PILLAR_0_E_5_TO_1_E_5, MAGENTA); + r3 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_E_4_TO_0_E_5, MAGENTA); + r4 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_D_3_TO_0_E_3, BLUE); + r5 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_D_2_TO_0_D_3, BLUE); + r6 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_C_2_TO_0_D_2, BLUE); + r7 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_C_2_TO_0_C_3, BLUE); + r8 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_B_3_TO_0_C_3, BLUE); + r9 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_C_0_TO_1_C_1, WHITE); + r10 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_A_0_TO_1_C_0, WHITE); + r11 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_A_0_TO_1_A_1, WHITE); + r12 = new VarbitRequirement(VarbitID.SOTE_PILLAR_0_A_2_TO_1_A_2, GREEN); + r13 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_A_2_TO_0_B_2, GREEN); + r14 = new VarbitRequirement(VarbitID.SOTE_PILLAR_0_B_2_TO_1_B_2, GREEN); + + r15 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_B_4_TO_0_B_3, BLUE); + r16 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_A_4_TO_0_B_4, BLUE); + r17 = new VarbitRequirement(VarbitID.SOTE_PILLAR_0_A_4_TO_1_A_4, BLUE); + r18 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_B_2_TO_2_B_3, GREEN); + r19 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_B_3_TO_2_A_3, GREEN); } public List getDisplaySteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/IorwerthLightPuzzle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/IorwerthLightPuzzle.java index a48874fa157..ed9f0af8793 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/IorwerthLightPuzzle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/IorwerthLightPuzzle.java @@ -38,6 +38,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.List; @@ -446,50 +447,50 @@ protected void setupConditions() int YELLOW = 6; int GREEN = 7; - notResetTra = new VarbitRequirement(8773, YELLOW); + notResetTra = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_H_4_TO_2_I_4, YELLOW); - r1 = new VarbitRequirement(8987, GREEN); - r2 = new VarbitRequirement(8990, CYAN); - r3 = new VarbitRequirement(9002, CYAN); - r4 = new VarbitRequirement(8587, CYAN); - r5 = new VarbitRequirement(8876, CYAN); + r1 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_F_4_TO_1_F_5, GREEN); + r2 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_F_5_TO_1_F_6, CYAN); + r3 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_F_6_TO_1_E_6, CYAN); + r4 = new VarbitRequirement(VarbitID.SOTE_PILLAR_0_E_6_TO_1_E_6, CYAN); + r5 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_E_6_TO_0_E_7, CYAN); r6 = new Conditions( - new VarbitRequirement(8879, CYAN), // NORTH - new VarbitRequirement(8878, CYAN) // EAST + new VarbitRequirement(VarbitID.SOTE_LIGHT_0_E_7_TO_0_E_8, CYAN), // NORTH + new VarbitRequirement(VarbitID.SOTE_LIGHT_0_E_7_TO_0_F_7, CYAN) // EAST ); - r7 = new Conditions(r6, new VarbitRequirement(8881, CYAN)); - r8 = new Conditions(r6, new VarbitRequirement(8591, CYAN)); + r7 = new Conditions(r6, new VarbitRequirement(VarbitID.SOTE_LIGHT_0_E_8_TO_0_F_8, CYAN)); + r8 = new Conditions(r6, new VarbitRequirement(VarbitID.SOTE_PILLAR_0_F_8_TO_1_F_8, CYAN)); - r9 = new Conditions(r8, new VarbitRequirement(8882, CYAN)); - r10 = new Conditions(r8, new VarbitRequirement(8883, CYAN)); - r11 = new Conditions(r8, new VarbitRequirement(8885, GREEN)); - r12 = new Conditions(r8, new VarbitRequirement(8886, GREEN)); - r13 = new Conditions(r8, new VarbitRequirement(8887, GREEN)); - r14 = new Conditions(r8, new VarbitRequirement(8888, GREEN)); - r15 = new Conditions(r8, new VarbitRequirement(8592, GREEN)); - r16 = new Conditions(r8, new VarbitRequirement(8992, GREEN)); + r9 = new Conditions(r8, new VarbitRequirement(VarbitID.SOTE_LIGHT_0_F_7_TO_0_F_6, CYAN)); + r10 = new Conditions(r8, new VarbitRequirement(VarbitID.SOTE_LIGHT_0_F_6_TO_0_G_6, CYAN)); + r11 = new Conditions(r8, new VarbitRequirement(VarbitID.SOTE_LIGHT_0_G_6_TO_0_H_6, GREEN)); + r12 = new Conditions(r8, new VarbitRequirement(VarbitID.SOTE_LIGHT_0_H_6_TO_0_H_7, GREEN)); + r13 = new Conditions(r8, new VarbitRequirement(VarbitID.SOTE_LIGHT_0_H_7_TO_0_G_7, GREEN)); + r14 = new Conditions(r8, new VarbitRequirement(VarbitID.SOTE_LIGHT_0_G_7_TO_0_G_8, GREEN)); + r15 = new Conditions(r8, new VarbitRequirement(VarbitID.SOTE_PILLAR_0_G_8_TO_1_G_8, GREEN)); + r16 = new Conditions(r8, new VarbitRequirement(VarbitID.SOTE_LIGHT_1_G_8_TO_1_G_7, GREEN)); // Back to cyan beam - r17 = new Conditions(r16, new VarbitRequirement(8614, BLUE)); + r17 = new Conditions(r16, new VarbitRequirement(VarbitID.SOTE_PILLAR_1_F_8_TO_2_F_8, BLUE)); // Start on yellow beam - r18 = new Conditions(r17, new VarbitRequirement(8974, YELLOW)); - r19 = new Conditions(r17, new VarbitRequirement(8982, YELLOW)); - r20 = new Conditions(r17, new VarbitRequirement(8983, RED)); - r21 = new Conditions(r17, new VarbitRequirement(8984, RED)); - r22 = new Conditions(r17, new VarbitRequirement(8985, RED)); - r23 = new Conditions(r17, new VarbitRequirement(8986, RED)); - r24 = new Conditions(r17, new VarbitRequirement(8995, RED)); - r25 = new Conditions(r17, new VarbitRequirement(8996, RED)); - r26 = new Conditions(r17, new VarbitRequirement(8625, RED)); - - r27 = new Conditions(r17, new VarbitRequirement(8825, RED)); - r28 = new Conditions(r17, new VarbitRequirement(8827, RED)); - r29 = new Conditions(r17, new VarbitRequirement(8823, RED)); - r30 = new Conditions(r17, new VarbitRequirement(8619, RED)); - - r31 = new Conditions(r30, new VarbitRequirement(8804, BLUE)); + r18 = new Conditions(r17, new VarbitRequirement(VarbitID.SOTE_LIGHT_1_G_3_TO_1_G_4, YELLOW)); + r19 = new Conditions(r17, new VarbitRequirement(VarbitID.SOTE_LIGHT_1_G_4_TO_1_H_4, YELLOW)); + r20 = new Conditions(r17, new VarbitRequirement(VarbitID.SOTE_LIGHT_1_H_4_TO_1_I_4, RED)); + r21 = new Conditions(r17, new VarbitRequirement(VarbitID.SOTE_LIGHT_1_I_4_TO_1_I_5, RED)); + r22 = new Conditions(r17, new VarbitRequirement(VarbitID.SOTE_LIGHT_1_I_5_TO_1_H_5, RED)); + r23 = new Conditions(r17, new VarbitRequirement(VarbitID.SOTE_LIGHT_1_H_5_TO_1_H_6, RED)); + r24 = new Conditions(r17, new VarbitRequirement(VarbitID.SOTE_LIGHT_1_H_6_TO_1_I_6, RED)); + r25 = new Conditions(r17, new VarbitRequirement(VarbitID.SOTE_LIGHT_1_I_6_TO_1_I_7, RED)); + r26 = new Conditions(r17, new VarbitRequirement(VarbitID.SOTE_PILLAR_1_I_7_TO_2_I_7, RED)); + + r27 = new Conditions(r17, new VarbitRequirement(VarbitID.SOTE_LIGHT_2_I_7_TO_2_I_8, RED)); + r28 = new Conditions(r17, new VarbitRequirement(VarbitID.SOTE_LIGHT_2_I_8_TO_2_H_8, RED)); + r29 = new Conditions(r17, new VarbitRequirement(VarbitID.SOTE_LIGHT_2_H_8_TO_2_H_7, RED)); + r30 = new Conditions(r17, new VarbitRequirement(VarbitID.SOTE_PILLAR_1_H_7_TO_2_H_7, RED)); + + r31 = new Conditions(r30, new VarbitRequirement(VarbitID.SOTE_LIGHT_2_F_7_TO_2_F_8, BLUE)); } public List getDisplaySteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/MeilyrLightPuzzle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/MeilyrLightPuzzle.java index 23f21fb0346..91784a32d9e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/MeilyrLightPuzzle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/MeilyrLightPuzzle.java @@ -38,6 +38,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.List; @@ -334,26 +335,26 @@ protected void setupConditions() int YELLOW = 6; int GREEN = 7; - notResetAmlodd = new VarbitRequirement(8861, GREEN); - - r1 = new VarbitRequirement(8971, MAGENTA); - r2 = new VarbitRequirement(8586, MAGENTA); - r3 = new VarbitRequirement(8858, MAGENTA); - r4 = new VarbitRequirement(8854, BLUE); - r5 = new VarbitRequirement(8853, BLUE); - r6 = new VarbitRequirement(8843, BLUE); - r7 = new VarbitRequirement(8842, BLUE); - r8 = new VarbitRequirement(8838, BLUE); - r9 = new VarbitRequirement(8837, BLUE); - r10 = new VarbitRequirement(8581, BLUE); - r11 = new VarbitRequirement(8603, MAGENTA); - r12 = new VarbitRequirement(8733, MAGENTA); - r13 = new VarbitRequirement(8602, YELLOW); - r14 = new VarbitRequirement(8764, YELLOW); - r15 = new VarbitRequirement(8742, YELLOW); - r16 = new VarbitRequirement(8741, YELLOW); - r17 = new VarbitRequirement(8739, YELLOW); - r18 = new VarbitRequirement(8738, YELLOW); + notResetAmlodd = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_C_4_TO_0_C_5, GREEN); + + r1 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_D_5_TO_1_E_5, MAGENTA); + r2 = new VarbitRequirement(VarbitID.SOTE_PILLAR_0_E_5_TO_1_E_5, MAGENTA); + r3 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_E_4_TO_0_E_5, MAGENTA); + r4 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_D_3_TO_0_E_3, BLUE); + r5 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_D_2_TO_0_D_3, BLUE); + r6 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_C_2_TO_0_D_2, BLUE); + r7 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_C_2_TO_0_C_3, BLUE); + r8 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_B_3_TO_0_C_3, BLUE); + r9 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_B_4_TO_0_B_3, BLUE); + r10 = new VarbitRequirement(VarbitID.SOTE_PILLAR_0_B_4_TO_1_B_4, BLUE); + r11 = new VarbitRequirement(VarbitID.SOTE_PILLAR_1_B_4_TO_2_B_4, MAGENTA); + r12 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_B_4_TO_2_B_5, MAGENTA); + r13 = new VarbitRequirement(VarbitID.SOTE_PILLAR_1_F_4_TO_2_F_4, YELLOW); + r14 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_F_4_TO_2_F_5, YELLOW); + r15 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_D_5_TO_2_F_5, YELLOW); + r16 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_D_6_TO_2_D_5, YELLOW); + r17 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_C_6_TO_2_D_6, YELLOW); + r18 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_C_5_TO_2_C_6, YELLOW); } public List getDisplaySteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/SongOfTheElves.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/SongOfTheElves.java index 56f9dd7a5b5..c4c45690dae 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/SongOfTheElves.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/SongOfTheElves.java @@ -679,29 +679,29 @@ public void setupConditions() inIbanRoom = new ZoneRequirement(ibanRoom); inBossArea = new ZoneRequirement(bossArea); - burnedGrain1 = new VarbitRequirement(9058, 1); - burnedGrain2 = new VarbitRequirement(9059, 1); - burnedGrain3 = new VarbitRequirement(9060, 1); - talkedToPriest1 = new VarbitRequirement(9079, 1); - talkedToSarah = new VarbitRequirement(9063, 1); - talkedToChadwell = new VarbitRequirement(9065, 1); + burnedGrain1 = new VarbitRequirement(VarbitID.SOTE_WEST_FOOD1, 1); + burnedGrain2 = new VarbitRequirement(VarbitID.SOTE_WEST_FOOD2, 1); + burnedGrain3 = new VarbitRequirement(VarbitID.SOTE_WEST_FOOD3, 1); + talkedToPriest1 = new VarbitRequirement(VarbitID.SOTE_WEST_CHURCH, 1); + talkedToSarah = new VarbitRequirement(VarbitID.SOTE_WEST_NURSE, 1); + talkedToChadwell = new VarbitRequirement(VarbitID.SOTE_WEST_GENERAL_STORE, 1); talkedToWestArdougne = new Conditions(burnedGrain1, burnedGrain2, burnedGrain3, talkedToPriest1, talkedToSarah, talkedToChadwell); - talkedToSilverMerchant = new VarbitRequirement(9074, 1); - talkedToBaker1 = new VarbitRequirement(9081, 1); // East baker - talkedToBaker2 = new VarbitRequirement(9073, 1); // West baker - talkedToGemMerchant = new VarbitRequirement(9072, 1); - talkedToFurTrader = new VarbitRequirement(9071, 1); - talkedToSpiceSeller = new VarbitRequirement(9070, 1); - talkedToSilkMerchant = new VarbitRequirement(9069, 1); + talkedToSilverMerchant = new VarbitRequirement(VarbitID.SOTE_EAST_SILVER_STORE, 1); + talkedToBaker1 = new VarbitRequirement(VarbitID.SOTE_EAST_BAKER_STORE2, 1); // East baker + talkedToBaker2 = new VarbitRequirement(VarbitID.SOTE_EAST_BAKER_STORE, 1); // West baker + talkedToGemMerchant = new VarbitRequirement(VarbitID.SOTE_EAST_GEM_STORE, 1); + talkedToFurTrader = new VarbitRequirement(VarbitID.SOTE_EAST_FUR_STORE, 1); + talkedToSpiceSeller = new VarbitRequirement(VarbitID.SOTE_EAST_SPICE_STORE, 1); + talkedToSilkMerchant = new VarbitRequirement(VarbitID.SOTE_EAST_SILK_STORE, 1); talkedToMarketStalls = new Conditions(talkedToSilverMerchant, talkedToBaker1, talkedToBaker2, talkedToGemMerchant, talkedToFurTrader, talkedToSpiceSeller, talkedToSilkMerchant); - talkedToTownCrier = new VarbitRequirement(9075, 1); - talkedToZenesha = new VarbitRequirement(9068, 1); - talkedToEstateAgent = new VarbitRequirement(9080, 1); - talkedToProbita = new VarbitRequirement(9067, 1); - talkedToAemad = new VarbitRequirement(9066, 1); - talkedToPriest2 = new VarbitRequirement(9078, 1); - talkedToOrbon = new VarbitRequirement(9064, 1); + talkedToTownCrier = new VarbitRequirement(VarbitID.SOTE_EAST_TOWN_CRIER, 1); + talkedToZenesha = new VarbitRequirement(VarbitID.SOTE_EAST_ARMOUR_STORE, 1); + talkedToEstateAgent = new VarbitRequirement(VarbitID.SOTE_EAST_ESTATE_AGENT, 1); + talkedToProbita = new VarbitRequirement(VarbitID.SOTE_EAST_PET_STORE, 1); + talkedToAemad = new VarbitRequirement(VarbitID.SOTE_EAST_GENERAL_STORE, 1); + talkedToPriest2 = new VarbitRequirement(VarbitID.SOTE_EAST_CHURCH, 1); + talkedToOrbon = new VarbitRequirement(VarbitID.SOTE_EAST_DOCTOR, 1); // 9017 0->1 talked to guard in prison @@ -732,23 +732,23 @@ public void setupConditions() askedAboutHefin = new VarbitRequirement(VarbitID.SOTE_HEFIN, 1, Operation.GREATER_EQUAL); foundHefin = new VarbitRequirement(VarbitID.SOTE_HEFIN, 3, Operation.GREATER_EQUAL); - tracked1 = new VarbitRequirement(9028, 1); - tracked2 = new VarbitRequirement(9029, 1); - tracked3 = new VarbitRequirement(9030, 1); - tracked4 = new VarbitRequirement(9031, 1); - tracked5 = new VarbitRequirement(9032, 1); + tracked1 = new VarbitRequirement(VarbitID.SOTE_HUNTING_TRAIL_2, 1); + tracked2 = new VarbitRequirement(VarbitID.SOTE_HUNTING_TRAIL_3, 1); + tracked3 = new VarbitRequirement(VarbitID.SOTE_HUNTING_TRAIL_4, 1); + tracked4 = new VarbitRequirement(VarbitID.SOTE_HUNTING_TRAIL_5, 1); + tracked5 = new VarbitRequirement(VarbitID.SOTE_HUNTING_TRAIL_6, 1); - foundEoin = new VarbitRequirement(9033, 1); + foundEoin = new VarbitRequirement(VarbitID.SOTE_LLETYA_EOIN_FOUND, 1); // foundIona, 9034 = 1 askedAboutIthell = new VarbitRequirement(VarbitID.SOTE_ITHELL, 1, Operation.GREATER_EQUAL); askedAboutMeilyr = new VarbitRequirement(VarbitID.SOTE_MEILYR, 1, Operation.GREATER_EQUAL); - checkedSymbol1 = new VarbitRequirement(9041, 2); - checkedSymbol2 = new VarbitRequirement(9039, 2); - checkedSymbol3 = new VarbitRequirement(9040, 2); - checkedSymbol4 = new VarbitRequirement(9038, 2); - checkedSymbol5 = new VarbitRequirement(9037, 2); + checkedSymbol1 = new VarbitRequirement(VarbitID.SOTE_SYMBOL_5, 2); + checkedSymbol2 = new VarbitRequirement(VarbitID.SOTE_SYMBOL_3, 2); + checkedSymbol3 = new VarbitRequirement(VarbitID.SOTE_SYMBOL_4, 2); + checkedSymbol4 = new VarbitRequirement(VarbitID.SOTE_SYMBOL_2, 2); + checkedSymbol5 = new VarbitRequirement(VarbitID.SOTE_SYMBOL_1, 2); learnedHowToMakeStatue = new VarbitRequirement(VarbitID.SOTE_ITHELL, 2, Operation.GREATER_EQUAL); builtStatue = new VarbitRequirement(VarbitID.SOTE_ITHELL, 3, Operation.GREATER_EQUAL); @@ -761,13 +761,13 @@ public void setupConditions() // 9037->9041 marks // 9042->49 0->1 for holes - filledHole1 = new VarbitRequirement(9042, 2); - filledHole2 = new VarbitRequirement(9043, 2); - filledHole3 = new VarbitRequirement(9044, 2); - filledHole4 = new VarbitRequirement(9045, 2); - filledHole5 = new VarbitRequirement(9047, 2); - filledHole6 = new VarbitRequirement(9048, 2); - filledHole7 = new VarbitRequirement(9049, 2); + filledHole1 = new VarbitRequirement(VarbitID.SOTE_UPASS_HOLE_1, 2); + filledHole2 = new VarbitRequirement(VarbitID.SOTE_UPASS_HOLE_2, 2); + filledHole3 = new VarbitRequirement(VarbitID.SOTE_UPASS_HOLE_3, 2); + filledHole4 = new VarbitRequirement(VarbitID.SOTE_UPASS_HOLE_4, 2); + filledHole5 = new VarbitRequirement(VarbitID.SOTE_UPASS_HOLE_5, 2); + filledHole6 = new VarbitRequirement(VarbitID.SOTE_UPASS_HOLE_6, 2); + filledHole7 = new VarbitRequirement(VarbitID.SOTE_UPASS_HOLE_7, 2); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/TrahaearnLightPuzzle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/TrahaearnLightPuzzle.java index 64287124d30..648e75951a0 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/TrahaearnLightPuzzle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/songoftheelves/TrahaearnLightPuzzle.java @@ -39,6 +39,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.List; @@ -355,31 +356,31 @@ protected void setupConditions() int YELLOW = 6; int GREEN = 7; - notResetHefin = new VarbitRequirement(8837, BLUE); - - r1 = new VarbitRequirement(8932, WHITE); - r2 = new VarbitRequirement(8931, WHITE); - r3 = new VarbitRequirement(8927, WHITE); - r4 = new VarbitRequirement(8577, GREEN); - r5 = new VarbitRequirement(8834, GREEN); - r6 = new VarbitRequirement(8580, GREEN); - r7 = new VarbitRequirement(8723, GREEN); - r8 = new VarbitRequirement(8726, GREEN); - r9 = new VarbitRequirement(8746, GREEN); - r10 = new VarbitRequirement(8747, GREEN); - r11 = new VarbitRequirement(8751, CYAN); - r12 = new VarbitRequirement(8753, CYAN); - r13 = new VarbitRequirement(8754, CYAN); - r14 = new VarbitRequirement(8755, CYAN); - r15 = new VarbitRequirement(8756, CYAN); - r16 = new VarbitRequirement(8758, CYAN); - - r17 = new VarbitRequirement(8974, YELLOW); - r18 = new VarbitRequirement(8982, YELLOW); - r19 = new VarbitRequirement(8617, YELLOW); - r20 = new VarbitRequirement(8773, YELLOW); - r21 = new VarbitRequirement(8776, YELLOW); - r22 = new VarbitRequirement(8777, YELLOW); + notResetHefin = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_B_4_TO_0_B_3, BLUE); + + r1 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_C_0_TO_1_C_1, WHITE); + r2 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_A_0_TO_1_C_0, WHITE); + r3 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_A_0_TO_1_A_1, WHITE); + r4 = new VarbitRequirement(VarbitID.SOTE_PILLAR_0_A_2_TO_1_A_2, GREEN); + r5 = new VarbitRequirement(VarbitID.SOTE_LIGHT_0_A_2_TO_0_B_2, GREEN); + r6 = new VarbitRequirement(VarbitID.SOTE_PILLAR_0_B_2_TO_1_B_2, GREEN); + r7 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_B_2_TO_2_B_3, GREEN); + r8 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_B_3_TO_2_D_3, GREEN); + r9 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_D_1_TO_2_D_3, GREEN); + r10 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_D_1_TO_2_F_1, GREEN); + r11 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_F_1_TO_2_G_1, CYAN); + r12 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_G_1_TO_2_G_0, CYAN); + r13 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_G_0_TO_2_H_0, CYAN); + r14 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_H_0_TO_2_H_2, CYAN); + r15 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_H_2_TO_2_G_2, CYAN); + r16 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_G_2_TO_2_G_3, CYAN); + + r17 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_G_3_TO_1_G_4, YELLOW); + r18 = new VarbitRequirement(VarbitID.SOTE_LIGHT_1_G_4_TO_1_H_4, YELLOW); + r19 = new VarbitRequirement(VarbitID.SOTE_PILLAR_1_H_4_TO_2_H_4, YELLOW); + r20 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_H_4_TO_2_I_4, YELLOW); + r21 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_I_4_TO_2_I_5, YELLOW); + r22 = new VarbitRequirement(VarbitID.SOTE_LIGHT_2_I_5_TO_2_G_5, YELLOW); } public List getDisplaySteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/spiritsoftheelid/SpiritsOfTheElid.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/spiritsoftheelid/SpiritsOfTheElid.java index 6434bac3915..a71dee8fefc 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/spiritsoftheelid/SpiritsOfTheElid.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/spiritsoftheelid/SpiritsOfTheElid.java @@ -47,6 +47,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -133,7 +134,9 @@ protected void setupRequirements() lawRune = new ItemRequirement("Law Rune", ItemID.LAWRUNE, 1); needle = new ItemRequirement("Needle", ItemID.NEEDLE, 1).isNotConsumed(); needle.setHighlightInInventory(true); + needle.setTooltip("Costume needle cannot be used as a substitute."); thread = new ItemRequirement("Thread", ItemID.THREAD, 2); + thread.setTooltip("Costume needle cannot be used as a substitute."); crushWep = new ItemRequirement("Crush Weapon Style", -1, 1).isNotConsumed(); crushWep.setDisplayItemId(ItemID.RUNE_MACE); stabWep = new ItemRequirement("Stab Weapon Style", -1, 1).isNotConsumed(); @@ -207,12 +210,12 @@ public void setupConditions() notAwusahHouse = new ZoneRequirement(outsideAwusahHouse); insideCrevice = new ZoneRequirement(creviceOutsideNardah); - whiteGolem = new VarbitRequirement(1447, 1); - greyGolem = new VarbitRequirement(1448, 1); - blackGolem = new VarbitRequirement(1446, 1); - stabChannel = new VarbitRequirement(1450, 1); - slashChannel = new VarbitRequirement(1449, 1); - crushChannel = new VarbitRequirement(1451, 1); + whiteGolem = new VarbitRequirement(VarbitID.ELID_WHITEGOLEM, 1); + greyGolem = new VarbitRequirement(VarbitID.ELID_GREYGOLEM, 1); + blackGolem = new VarbitRequirement(VarbitID.ELID_BLACKGOLEM, 1); + stabChannel = new VarbitRequirement(VarbitID.ELID_THIEVINGCHANNEL, 1); + slashChannel = new VarbitRequirement(VarbitID.ELID_MININGCHANNEL, 1); + crushChannel = new VarbitRequirement(VarbitID.ELID_RANGINGCHANNEL, 1); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/swansong/FishMonkfish.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/swansong/FishMonkfish.java index 51cc52f2977..c81693fed28 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/swansong/FishMonkfish.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/swansong/FishMonkfish.java @@ -27,14 +27,15 @@ import net.runelite.client.plugins.microbot.questhelper.questhelpers.QuestHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; import net.runelite.client.plugins.microbot.questhelper.steps.*; -import net.runelite.api.InventoryID; import net.runelite.api.Item; import net.runelite.api.ItemContainer; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; +import net.runelite.api.gameval.InventoryID; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; import java.util.Arrays; @@ -65,8 +66,9 @@ public void onGameTick(GameTick event) @Override protected void updateSteps() { - int numHandedIn = client.getVarbitValue(2105) - 1; - ItemContainer inventory = client.getItemContainer(InventoryID.INVENTORY); + int numHandedIn = client.getVarbitValue(VarbitID.SWANSONG_ARNOLD) - 1; + ItemContainer inventory = client.getItemContainer(InventoryID.INV); + int numRaw = 0; int numCooked = 0; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/swansong/FixWall.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/swansong/FixWall.java index 265e577246c..d76503da550 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/swansong/FixWall.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/swansong/FixWall.java @@ -35,6 +35,7 @@ import net.runelite.api.events.GameTick; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; import java.util.Arrays; @@ -60,11 +61,11 @@ public void onGameTick(GameTick event) @Override protected void updateSteps() { - int wall1Fixed = client.getVarbitValue(2100); - int wall2Fixed = client.getVarbitValue(2101); - int wall3Fixed = client.getVarbitValue(2102); - int wall4Fixed = client.getVarbitValue(2103); - int wall5Fixed = client.getVarbitValue(2104); + int wall1Fixed = client.getVarbitValue(VarbitID.SWANSONG_WALL_1); + int wall2Fixed = client.getVarbitValue(VarbitID.SWANSONG_WALL_2); + int wall3Fixed = client.getVarbitValue(VarbitID.SWANSONG_WALL_3); + int wall4Fixed = client.getVarbitValue(VarbitID.SWANSONG_WALL_4); + int wall5Fixed = client.getVarbitValue(VarbitID.SWANSONG_WALL_5); int wallsToRepair = 5 - (wall1Fixed + wall2Fixed + wall3Fixed + wall4Fixed + wall5Fixed); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/swansong/SwanSong.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/swansong/SwanSong.java index 342b6eadb67..a139a96bee9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/swansong/SwanSong.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/swansong/SwanSong.java @@ -214,18 +214,18 @@ public void setupConditions() inBasement = new ZoneRequirement(basement); // 2111 is number of trolls killed - talkedToFranklin = new VarbitRequirement(2099, 1); - addedLog = new VarbitRequirement(2099, 2); - litLog = new VarbitRequirement(2099, 3); - wall1Fixed = new VarbitRequirement(2100, 1); - wall2Fixed = new VarbitRequirement(2101, 1); - wall3Fixed = new VarbitRequirement(2102, 1); - wall4Fixed = new VarbitRequirement(2103, 1); - wall5Fixed = new VarbitRequirement(2104, 1); + talkedToFranklin = new VarbitRequirement(VarbitID.SWANSONG_FRANKLIN, 1); + addedLog = new VarbitRequirement(VarbitID.SWANSONG_FRANKLIN, 2); + litLog = new VarbitRequirement(VarbitID.SWANSONG_FRANKLIN, 3); + wall1Fixed = new VarbitRequirement(VarbitID.SWANSONG_WALL_1, 1); + wall2Fixed = new VarbitRequirement(VarbitID.SWANSONG_WALL_2, 1); + wall3Fixed = new VarbitRequirement(VarbitID.SWANSONG_WALL_3, 1); + wall4Fixed = new VarbitRequirement(VarbitID.SWANSONG_WALL_4, 1); + wall5Fixed = new VarbitRequirement(VarbitID.SWANSONG_WALL_5, 1); wallsFixed = new Conditions(wall1Fixed, wall2Fixed, wall3Fixed, wall4Fixed, wall5Fixed); talkedToArnold = new VarbitRequirement(VarbitID.SWANSONG_ARNOLD, 1, Operation.GREATER_EQUAL); - finishedFranklin = new VarbitRequirement(2099, 4); + finishedFranklin = new VarbitRequirement(VarbitID.SWANSONG_FRANKLIN, 4); queenNearby = new NpcCondition(NpcID.SWAN_SEATROLL_QUEEN); // 2108 = number of bones given to Mort diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/taibwowannaitrio/TaiBwoWannaiTrio.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/taibwowannaitrio/TaiBwoWannaiTrio.java index 185a9519d87..180f8520326 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/taibwowannaitrio/TaiBwoWannaiTrio.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/taibwowannaitrio/TaiBwoWannaiTrio.java @@ -546,7 +546,7 @@ public List getGeneralRequirements() req.add(new SkillRequirement(Skill.AGILITY, 15, false)); req.add(new SkillRequirement(Skill.COOKING, 30, false)); req.add(new SkillRequirement(Skill.FISHING, 5, false)); - req.add(new ItemRequirement("65 Fishing for Raw Karambwan if any type of Ironman account.", -1, -1)); + req.add(new ItemRequirement("65 Fishing for Raw Karambwan if any type of Ironman account, if you burn the one given to you.", -1, -1)); return req; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/tearsofguthix/TearsOfGuthix.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/tearsofguthix/TearsOfGuthix.java index f4bf3c9094b..a0c4d1cb559 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/tearsofguthix/TearsOfGuthix.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/tearsofguthix/TearsOfGuthix.java @@ -44,6 +44,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -129,7 +130,7 @@ private void setupConditions() inJunaRoom = new ZoneRequirement(junaRoom); atRocks = new ZoneRequirement(rocks); - addedRope = new VarbitRequirement(279, 1); + addedRope = new VarbitRequirement(VarbitID.SWAMP_CAVES_ROPED_ENTRANCE, 1); // 452 = 1, gone through Juna's first dialog } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/templeoftheeye/TempleOfTheEye.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/templeoftheeye/TempleOfTheEye.java index 1e5906be821..bbc820645ae 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/templeoftheeye/TempleOfTheEye.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/templeoftheeye/TempleOfTheEye.java @@ -52,6 +52,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -237,21 +238,21 @@ public void setupConditions() inTempleOfTheEye = new ZoneRequirement(templeOfTheEye); inTempleOfTheEyeTutorial = new ZoneRequirement(templeOfTheEye2, mindAltar); - canTeleportFromHerbert = new VarbitRequirement(13740, 0); + canTeleportFromHerbert = new VarbitRequirement(VarbitID.TOTE_ABYSS_TELEPORT_USED, 0); thrownBucket = new VarbitRequirement(QuestVarbits.QUEST_TEMPLE_OF_THE_EYE.getId(), 30, Operation.GREATER_EQUAL); givenAmuletBack = new VarbitRequirement(QuestVarbits.QUEST_TEMPLE_OF_THE_EYE.getId(), 55, Operation.GREATER_EQUAL); - canTeleportFromPersten = new VarbitRequirement(13753, 0); + canTeleportFromPersten = new VarbitRequirement(VarbitID.TOTE_TOWER_TELEPORT_USED, 0); - felixPuzzleNotSeen = new VarbitRequirement(13743, 0); - tamaraPuzzleNotSeen = new VarbitRequirement(13742, 0); - cordeliaPuzzleNotSeen = new VarbitRequirement(13744, 0); + felixPuzzleNotSeen = new VarbitRequirement(VarbitID.TOTE_SPOKEN_TO_FELIX, 0); + tamaraPuzzleNotSeen = new VarbitRequirement(VarbitID.TOTE_SPOKEN_TO_TAMARA, 0); + cordeliaPuzzleNotSeen = new VarbitRequirement(VarbitID.TOTE_SPOKEN_TO_CORDELIA, 0); - felixRiftTalk = new VarbitRequirement(13755, 0); - tamaraRiftTalk = new VarbitRequirement(13754, 0); - cordeliaRiftTalk = new VarbitRequirement(13756, 0); + felixRiftTalk = new VarbitRequirement(VarbitID.TOTE_TEMPLE_FELIX, 0); + tamaraRiftTalk = new VarbitRequirement(VarbitID.TOTE_TEMPLE_TAMARA, 0); + cordeliaRiftTalk = new VarbitRequirement(VarbitID.TOTE_TEMPLE_CORDELIA, 0); // TODO: Seems to be generally done for cutscenes? Happens in Enahkra's Lament - mysteriousVisionSeen = new VarbitRequirement(12139, 1); + mysteriousVisionSeen = new VarbitRequirement(VarbitID.GRAVESTONE_TLI_HIDE, 1); } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theascentofarceuus/TheAscentOfArceuus.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theascentofarceuus/TheAscentOfArceuus.java index be76f0d4902..dfe769d4f48 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theascentofarceuus/TheAscentOfArceuus.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theascentofarceuus/TheAscentOfArceuus.java @@ -52,6 +52,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -158,11 +159,11 @@ public void setupConditions() inCastle = new ZoneRequirement(castle); inKaruulm = new ZoneRequirement(karuulm); - foundTrack1 = new VarbitRequirement(7860, 1); - foundTrack2 = new VarbitRequirement(7861, 1); - foundTrack3 = new VarbitRequirement(7862, 1); - foundTrack4 = new VarbitRequirement(7863, 1); - foundTrack5 = new VarbitRequirement(7864, 1); + foundTrack1 = new VarbitRequirement(VarbitID.ARCQUEST_HUNTING_TRAIL_2, 1); + foundTrack2 = new VarbitRequirement(VarbitID.ARCQUEST_HUNTING_TRAIL_3, 1); + foundTrack3 = new VarbitRequirement(VarbitID.ARCQUEST_HUNTING_TRAIL_4, 1); + foundTrack4 = new VarbitRequirement(VarbitID.ARCQUEST_HUNTING_TRAIL_5, 1); + foundTrack5 = new VarbitRequirement(VarbitID.ARCQUEST_HUNTING_TRAIL_6, 1); trappedSoulNearby = new NpcHintArrowRequirement(NpcID.ARCQUEST_SOUL); // Inspected grave: diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thecorsaircurse/TheCorsairCurse.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thecorsaircurse/TheCorsairCurse.java index 86601973e20..952ea95e55f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thecorsaircurse/TheCorsairCurse.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thecorsaircurse/TheCorsairCurse.java @@ -197,19 +197,19 @@ public void setupConditions() inArsenHut = new ZoneRequirement(arsenHut); inShip = new ZoneRequirement(ship); inCavern = new ZoneRequirement(cavern); - talkedToIthoi = new VarbitRequirement(6075, 1); + talkedToIthoi = new VarbitRequirement(VarbitID.CORSCURS_NAVIGATOR, 1); talkedToArsen = new VarbitRequirement(VarbitID.CORSCURS_THIEF, 2, Operation.GREATER_EQUAL); - returnedToothPick = new VarbitRequirement(6074, 4); + returnedToothPick = new VarbitRequirement(VarbitID.CORSCURS_THIEF, 4); finishedArsen = new VarbitRequirement(VarbitID.CORSCURS_THIEF, 6, Operation.GREATER_EQUAL); talkedToColin = new VarbitRequirement(VarbitID.CORSCURS_CABINBOY, 1, Operation.GREATER_EQUAL); - lookedThroughTelescope = new VarbitRequirement(6072, 2); - finishedColin = new VarbitRequirement(6072, 3); + lookedThroughTelescope = new VarbitRequirement(VarbitID.CORSCURS_CABINBOY, 2); + finishedColin = new VarbitRequirement(VarbitID.CORSCURS_CABINBOY, 3); - talkedToGnocci = new VarbitRequirement(6073, 1); - foundDoll = new VarbitRequirement(6073, 2); - finishedGnocci = new VarbitRequirement(6073, 3); + talkedToGnocci = new VarbitRequirement(VarbitID.CORSCURS_COOK, 1); + foundDoll = new VarbitRequirement(VarbitID.CORSCURS_COOK, 2); + finishedGnocci = new VarbitRequirement(VarbitID.CORSCURS_COOK, 3); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thecurseofarrav/MetalDoorSolver.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thecurseofarrav/MetalDoorSolver.java index b48bfb89037..af25c87a641 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thecurseofarrav/MetalDoorSolver.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thecurseofarrav/MetalDoorSolver.java @@ -37,6 +37,7 @@ import net.runelite.api.annotations.Interface; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; +import net.runelite.api.gameval.InterfaceID; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.ObjectID; import net.runelite.client.eventbus.Subscribe; @@ -120,16 +121,6 @@ public class MetalDoorSolver extends DetailedOwnerStep private static final int PUZZLE_PASSWORD_3_CHILD_ID = 28; private static final int PUZZLE_PASSWORD_4_CHILD_ID = 29; - /** - * Group ID of the "MESBOX" widget containing our code - */ - private static final @Interface int MESBOX_GROUP_ID = 229; - - /** - * Child ID of the "MESBOX" widget containing our code - */ - private static final int MESBOX_CHILD_ID = 1; - private static final Pattern CODE_PATTERN = Pattern.compile("It reads ([A-I]{4})."); @Inject @@ -344,7 +335,7 @@ else if (Objects.equals(input4Text, "-") || Integer.parseInt(input4.getText()) ! return; } - var textWidget = client.getWidget(MESBOX_GROUP_ID, MESBOX_CHILD_ID); + var textWidget = client.getWidget(InterfaceID.Messagebox.TEXT); if (textWidget == null) { return; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thecurseofarrav/TheCurseOfArrav.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thecurseofarrav/TheCurseOfArrav.java index cf6536f5163..072b4eceb67 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thecurseofarrav/TheCurseOfArrav.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thecurseofarrav/TheCurseOfArrav.java @@ -55,6 +55,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.ArrayList; import java.util.HashMap; @@ -71,9 +72,6 @@ @SuppressWarnings("FieldCanBeLocal") public class TheCurseOfArrav extends BasicQuestHelper { - static final @Varbit int VARBIT_SOUTH_LEVER_STATE = 11482; - static final @Varbit int VARBIT_NORTH_LEVER_STATE = 11481; - // Required items private ItemRequirement dwellberries3; private ItemRequirement ringOfLife; @@ -302,12 +300,12 @@ protected void setupZones() @Override protected void setupRequirements() { - haveUsedKeyOnSouthLever = new VarbitRequirement(VARBIT_SOUTH_LEVER_STATE, 1, Operation.GREATER_EQUAL); - haveFlippedSouthLever = new VarbitRequirement(VARBIT_SOUTH_LEVER_STATE, 2); - haveUsedKeyOnNorthLever = new VarbitRequirement(VARBIT_NORTH_LEVER_STATE, 1, Operation.GREATER_EQUAL); - haveFlippedNorthLever = new VarbitRequirement(VARBIT_NORTH_LEVER_STATE, 2); + haveUsedKeyOnSouthLever = new VarbitRequirement(VarbitID.COA_MASTABA_LEVER_2, 1, Operation.GREATER_EQUAL); + haveFlippedSouthLever = new VarbitRequirement(VarbitID.COA_MASTABA_LEVER_2, 2); + haveUsedKeyOnNorthLever = new VarbitRequirement(VarbitID.COA_MASTABA_LEVER_1, 1, Operation.GREATER_EQUAL); + haveFlippedNorthLever = new VarbitRequirement(VarbitID.COA_MASTABA_LEVER_1, 2); haveKilledGolem = new QuestRequirement(QuestHelperQuest.THE_CURSE_OF_ARRAV, 12); - finishedTilePuzzle = new VarbitRequirement(11483, 1); + finishedTilePuzzle = new VarbitRequirement(VarbitID.COA_FLOOR_PUZZLE_DISABLED, 1); haveMadeCanopicJar = new QuestRequirement(QuestHelperQuest.THE_CURSE_OF_ARRAV, 18); haveMinedAFullPath = new QuestRequirement(QuestHelperQuest.THE_CURSE_OF_ARRAV, 30); haveUsedPlans = new QuestRequirement(QuestHelperQuest.THE_CURSE_OF_ARRAV, 38); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thecurseofarrav/rubblesolvers/RubbleSolver.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thecurseofarrav/rubblesolvers/RubbleSolver.java index a4f434fc0e9..e6272886143 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thecurseofarrav/rubblesolvers/RubbleSolver.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thecurseofarrav/rubblesolvers/RubbleSolver.java @@ -32,10 +32,10 @@ import net.runelite.client.plugins.microbot.questhelper.steps.*; import lombok.extern.slf4j.Slf4j; import net.runelite.api.Client; -import net.runelite.api.SpriteID; import net.runelite.api.coords.Direction; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; +import net.runelite.api.gameval.SpriteID; import net.runelite.client.eventbus.Subscribe; import javax.inject.Inject; @@ -89,7 +89,7 @@ protected void addMineRubbleStep(int x, int y, RubbleType rubbleType, Direction break; } var posWp = new WorldPoint(offsetX, offsetY, 0); - step.addTileMarker(posWp, SpriteID.SKILL_MINING); + step.addTileMarker(posWp, SpriteID.Staticons.MINING); for (var alternateIDs : validObjectIDs) { // todo this adds the first object again xd step.addAlternateObjects(alternateIDs); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thedigsite/TheDigSite.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thedigsite/TheDigSite.java index 0f9781bffb8..6224767b90b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thedigsite/TheDigSite.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thedigsite/TheDigSite.java @@ -286,7 +286,7 @@ public void setupConditions() new DialogRequirement("You got all the questions correct, well done!"), new DialogRequirement("Great, I'm getting good at this.")); - talkedToGuide = new VarbitRequirement(2544, 1); + talkedToGuide = new VarbitRequirement(VarbitID.ITDIGSITETEA, 1); tea = tea.hideConditioned(talkedToGuide); @@ -361,20 +361,20 @@ public void setupConditions() // 2550 = 1, gotten invite // 3644 = 1, gotten invite - givenTalismanIn = new VarbitRequirement(2550, 1); - rope1Added = new VarbitRequirement(2545, 1); - rope2Added = new VarbitRequirement(2546, 1); + givenTalismanIn = new VarbitRequirement(VarbitID.ITEXPERTLETTER, 1); + rope1Added = new VarbitRequirement(VarbitID.ITDIGSITEWINCH1, 1); + rope2Added = new VarbitRequirement(VarbitID.ITDIGSITEWINCH2, 1); // 45 - 54 hasTeddy = new Conditions(LogicType.OR, teddybear, talkedToFemaleStudent); hasSkull = new Conditions(LogicType.OR, skull, talkedToGreenStudent); hasSpecialCup = new Conditions(LogicType.OR, specialCup, talkedToOrangeStudent); - letterStamped = new VarbitRequirement(2552, 1); + letterStamped = new VarbitRequirement(VarbitID.ITCURATORLETTER, 1); - searchedBricks = new VarbitRequirement(2549, 1); + searchedBricks = new VarbitRequirement(VarbitID.ITDIGSITEHINT, 1); openPowderChestNearby = new ObjectCondition(ObjectID.DIGCHESTOPEN); - openedBarrel = new VarbitRequirement(2547, 1); + openedBarrel = new VarbitRequirement(VarbitID.ITDIGSITEBARREL, 1); hasKeyOrPowderOrMixtures = new Conditions(LogicType.OR, key, powder, nitrate, mixedChemicals, mixedChemicals2, chemicalCompound, openPowderChestNearby); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theeyesofglouphrie/TheEyesOfGlouphrie.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theeyesofglouphrie/TheEyesOfGlouphrie.java index 76b04da2e40..e7d8040dd99 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theeyesofglouphrie/TheEyesOfGlouphrie.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theeyesofglouphrie/TheEyesOfGlouphrie.java @@ -47,6 +47,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -192,16 +193,16 @@ protected void setupZones() public void setupConditions() { inCave = new ZoneRequirement(cave); - inspectedBowl = new VarbitRequirement(2515, 1); - inspectedMachine = new VarbitRequirement(2516, 1); + inspectedBowl = new VarbitRequirement(VarbitID.EYEGLO_BOWL_SEEN, 1); + inspectedMachine = new VarbitRequirement(VarbitID.EYEGLO_MACHINE_SEEN, 1); inHazelmereHut = new ZoneRequirement(hazelmereHut); - killedCreature1 = new VarbitRequirement(2504, 2); - killedCreature2 = new VarbitRequirement(2505, 2); - killedCreature3 = new VarbitRequirement(2506, 2); - killedCreature4 = new VarbitRequirement(2507, 2); - killedCreature5 = new VarbitRequirement(2508, 2); - killedCreature6 = new VarbitRequirement(2509, 2); + killedCreature1 = new VarbitRequirement(VarbitID.EYEGLO_KILLED_EYE_1, 2); + killedCreature2 = new VarbitRequirement(VarbitID.EYEGLO_KILLED_EYE_2, 2); + killedCreature3 = new VarbitRequirement(VarbitID.EYEGLO_KILLED_EYE_3, 2); + killedCreature4 = new VarbitRequirement(VarbitID.EYEGLO_KILLED_EYE_4, 2); + killedCreature5 = new VarbitRequirement(VarbitID.EYEGLO_KILLED_EYE_5, 2); + killedCreature6 = new VarbitRequirement(VarbitID.EYEGLO_KILLED_EYE_6, 2); inFloor1 = new ZoneRequirement(floor1); inFloor2 = new ZoneRequirement(floor2); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefeud/TheFeud.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefeud/TheFeud.java index 4d493bd4ca9..bc7e0747e76 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefeud/TheFeud.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefeud/TheFeud.java @@ -191,12 +191,12 @@ public void setupVarBits() //318 Drunk Ali beer count 0->1->2->3 // 315 -> 2 Talked to thug -> 3 Talked to bandit - talkedToThug = new VarbitRequirement(315, 2); - talkedToBandit = new VarbitRequirement(315, 3); + talkedToThug = new VarbitRequirement(VarbitID.FEUD_VAR_TALK_GANGS, 2); + talkedToBandit = new VarbitRequirement(VarbitID.FEUD_VAR_TALK_GANGS, 3); talkedToBanditReturn = new VarbitRequirement(VarbitID.FEUD_VAR_COMP_GANGS, true, 0); // Might have missed? // 340 -> 1 when pickpocket villager - doorOpen = new VarbitRequirement(320, 1); + doorOpen = new VarbitRequirement(VarbitID.FEUD_VAR_MAYORSDOOR, 1); //Varbit 325 keeps track of correctly entered safe values //UPDATE: 325 keeps track of amount of numbers input. Even if they are incorrect @@ -204,26 +204,26 @@ public void setupVarBits() //TODO: Overlay for safe cracking. // Varbit 342 when found Traitor - traitorFound = new VarbitRequirement(342, 1); + traitorFound = new VarbitRequirement(VarbitID.FEUD_FOUND_TRAIT, 1); // Varbit 321 when talked to bar man - talkedToBarman = new VarbitRequirement(321, 1); + talkedToBarman = new VarbitRequirement(VarbitID.FEUD_VAR_DRINK_FOUND, 1); // 345 and 328 when talking to hag - talkedToAliTheHag = new VarbitRequirement(328, 1); - givenPoisonToHag = new VarbitRequirement(328, 2); + talkedToAliTheHag = new VarbitRequirement(VarbitID.FEUD_HAG_LIST, 1); + givenPoisonToHag = new VarbitRequirement(VarbitID.FEUD_HAG_LIST, 2); // 335 = Poisoned drink //322 Menaphite - menaphiteThugAlive = new VarbitRequirement(322, 1); + menaphiteThugAlive = new VarbitRequirement(VarbitID.FEUD_VAR_MENABOSS, 1); // Talked to villager about Menaphite 343, 338 - talkedToVillagerAboutMenaphite = new VarbitRequirement(343, 1); - banditChampionSpawned = new VarbitRequirement(323, 1); + talkedToVillagerAboutMenaphite = new VarbitRequirement(VarbitID.FEUD_TALK_VILLAGER, 1); + banditChampionSpawned = new VarbitRequirement(VarbitID.FEUD_VAR_BANDITBOSS, 1); // 343 -> Mayor spawned - mayorSpawned = new VarbitRequirement(343, 2); + mayorSpawned = new VarbitRequirement(VarbitID.FEUD_TALK_VILLAGER, 2); } @Override @@ -381,13 +381,13 @@ public void setupSteps() //Step 14 //Open the Door - openTheDoor = new ObjectStep(this, 6238, "Open the door.", doorKeys); + openTheDoor = new ObjectStep(this, ObjectID.FEUD_CLOSED_DOOR_LEFT, "Open the door.", doorKeys); openTheDoor.addAlternateObjects(6240); openTheDoor.addIcon(ItemID.FEUD_MAYORS_HOUSE_KEYS); goUpStairs = new ObjectStep(this, ObjectID.FEUD_INSIDESTAIRS_BASE, "Go up the stairs."); - crackTheSafe = new ObjectStep(this, 6276, "Search the painting to reveal the safe. Enter the code 1, 1, 2, 3, 5, 8."); + crackTheSafe = new ObjectStep(this, ObjectID.FEUD_MAYORS_PICTURE, "Search the painting to reveal the safe. Enter the code 1, 1, 2, 3, 5, 8."); //Step 15 //Return the Jewels diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefinaldawn/TheFinalDawn.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefinaldawn/TheFinalDawn.java new file mode 100644 index 00000000000..06697c74a04 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefinaldawn/TheFinalDawn.java @@ -0,0 +1,1272 @@ +/* + * Copyright (c) 2025, Zoinkwiz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.plugins.microbot.questhelper.helpers.quests.thefinaldawn; + +import net.runelite.client.plugins.microbot.questhelper.bank.banktab.BankSlotIcons; +import net.runelite.client.plugins.microbot.questhelper.collections.ItemCollections; +import net.runelite.client.plugins.microbot.questhelper.helpers.quests.deserttreasureii.ChestCodeStep; +import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; +import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; +import net.runelite.client.plugins.microbot.questhelper.questinfo.QuestHelperQuest; +import net.runelite.client.plugins.microbot.questhelper.requirements.ManualRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.ObjectCondition; +import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemOnTileRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirements; +import net.runelite.client.plugins.microbot.questhelper.requirements.npc.NpcRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.player.FreeInventorySlotRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.player.SkillRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.quest.QuestRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.util.Operation; +import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.widget.WidgetTextRequirement; +import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; +import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; +import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; +import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; +import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; +import net.runelite.client.plugins.microbot.questhelper.rewards.UnlockReward; +import net.runelite.client.plugins.microbot.questhelper.steps.*; + +import java.util.*; + +import net.runelite.client.plugins.microbot.questhelper.steps.tools.QuestPerspective; +import net.runelite.client.plugins.microbot.questhelper.steps.widget.WidgetHighlight; +import net.runelite.api.QuestState; +import net.runelite.api.Skill; +import net.runelite.api.Tile; +import net.runelite.api.coords.LocalPoint; +import net.runelite.api.coords.WorldPoint; +import net.runelite.api.events.GameTick; +import net.runelite.api.gameval.*; +import net.runelite.client.eventbus.Subscribe; + +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.*; + +/** + * The quest guide for the "The Final Dawn" OSRS quest + */ +public class TheFinalDawn extends BasicQuestHelper +{ + ItemRequirement emissaryRobesEquipped, emissaryRobes, bone, rangedGear; + + ItemRequirement combatGear, combatWeapon, food, prayerPotions, whistle, pendant, pendantToTwilight, civitasTeleport; + FreeInventorySlotRequirement freeInvSlots4, freeInvSlot1; + + ItemRequirement drawerKey, canvasPiece, emissaryScroll, potatoes, knife, coinPurse, coinPurseFullOrEmpty, branch, coinPurseWithSand, coinPurseEmpty, + emptySack, makeshiftBlackjack; + ItemRequirement steamforgedBrew, dwarvenStout, beer, emptyGlass, wizardsMindBomb, keystoneFragment, essence, roots, kindling, knifeBlade, stoneTablet; + + QuestStep startQuest, goToTempleWithAtes, goToTempleFromSalvager, goToTempleFromGorge, searchChestForEmissaryRobes, enterTwilightTemple, goDownStairsTemple, enterBackroom, + searchBed, openDrawers, openDrawers2; + DetailedQuestStep useCanvasPieceOnPicture, enterPassage, pickBlueChest, fightEnforcer, pickUpEmissaryScroll, readEmissaryScroll, talkToQueen, + climbStairsF0ToF1Palace, climbStairsF1ToF2Palace; + QuestStep openDoorWithGusCode; + QuestStep talkToCaptainVibia, inspectWindow, giveBonesOrMeatToDog, enterDoorCode, takePotato, removePotatoesFromSack, takeKnife, takeCoinPurse, + emptyCoinPurse, goToF1Hideout, goDownFromF2Hideout, goToF0Hideout, goToF0HideoutEnd, goF2ToF1HideoutEnd; + QuestStep goF1ToF2Hideout, useKnifeOnPottedFan, fillCoinPurse, useBranchOnCoinPurse, showSackToVibia, searchBodyForKey, enterTrapdoor, talkToQueenToGoCamTorum; + DetailedQuestStep enterCamTorum, talkToAttala, talkToServiusInCamTorum, goUpstairsPub, takeBeer, goDownstairsPub, useBeerOnGalna, enterCamTorumHouseBasement; + QuestStep takeBeerCabinet, drinkBeer, takeSteamforgeBrew, takeDwarvenStout, takeWizardsMindBomb, placeSteamforgedBrew, placeDwarvenStout, placeBeer, + takeBeerFromBarrel, placeEmptyGlass, placeMindBomb, inspectFireplace, useHole, watchCutsceneCamTorum, returnThroughHole, returnToServius; + DetailedQuestStep climbUpFromTeumoBasement, enterNeypotzli, talkToEyatalli, locateKeystone; + QuestStep enterStreamboundCavern, locateInStreambound, enterEarthboundCavernFromStreambound, enterEarthboundCavern, locateInEarthbound, + enterAncientPrison, enterAncientPrisonFromEarthbound, locateInAncientPrison, touchGlowingSymbol, defeatCultists, talkToAttalaAfterCultistFight; + + DetailedQuestStep talkToServiusAtTalTeklan, enterTonaliCavern, defeatFinalCultists, fightEnnius, tonaliGoDownStairsF2ToF1, tonaliGoDownStairsF1ToF0, + useRedTeleporter, useBlueTeleporter, crossLog, useBlueTeleporter2; + DetailedQuestStep useRedTeleporter2, useBlueTeleporterLizards, useRedTeleporter3, climbRope; + + QuestStep activateStrangePlatform, enterTonaliWithLift, descendIntoSunPuzzle, inspectSunStatue, getEssenceFromUrns, solveSunPuzzle, solveSunPuzzle2Step1MoveItzla, + solveSunPuzzle2Step1Craft, solveSunPuzzle2Step2MoveItzla, solveSunPuzzle2Step2Craft, solveSunPuzzle2Step3MoveItzla, solveSunPuzzle2Step3Craft; + QuestStep solveSunPuzzle1Step1MoveItzla, solveSunPuzzle1Step1Craft, solveSunPuzzle1Step2MoveItzla, solveSunPuzzle1Step2Craft, + solveSunPuzzle1Step3MoveItzla, solveSunPuzzle1Step3Craft; + + QuestStep goUpFromSunPuzzle, enterMoonPuzzle, moveItzlaNorth, moveItzlaSouth, pullTreeRoots, getKnifeBlade, placeRoots, fletchRoots, + repeatMoonPuzzleThreeTimes, leaveMoonPuzzleRoom; + + QuestStep enterFinalBossArea, approachMetzli, defeatFinalBoss, defeatFinalBossSidebar, watchFinalBossAfterCutscene, goToNorthOfFinalArea, + goToNorthOfFinalAreaAgilityShortcut, inspectRanulPillar, inspectRalosPillar, inspectDoor, inspectSkeleton, readStoneTablet, finishQuest; + + Zone templeArea, templeBasement, eastTempleBasement, hiddenRoom, palaceF1, palaceF2, hideoutGroundFloor, hideoutMiddleFloor, hideoutTopFloor, + hideoutBasement, camTorum, camTorumF2, camTorumBasement, hiddenTunnel, hiddenTunnel2; + + Zone antechamber, prison, streambound, earthbound, ancientShrine, neypotzliFightRoom, tonaliCavernF2, tonaliCavernF0P2South, tonaliCavernF0P2North, + tonaliCavernF1Stairs, tonaliCavernF0Start, tonaliCavernF1Rockslugs, tonaliCavernF0P3V1, tonaliCavernF1GrimyLizards, tonaliCavernF1Nagua, + tonaliCavernF2North, tonaliCavernF0P3V2, sunPuzzleRoom, moonPuzzleRoom, finalBossArea; + + Requirement inTempleArea, inTempleBasement, inEastTempleBasement, inHiddenRoom, inPalaceF1, inPalaceF2, inHideout, inHideoutF1, inHideoutF2, + inHideoutBasement, inCamTorum, inCamTorumF2, inCamTorumBasement, inCamTorumHiddenTunnel; + + Requirement inAntechamber, inPrison, inStreambound, inEarthbound, inAncientShrine, inNeypotzli, inNeypotzliFightRoom; + Requirement inTonaliCavern, inTonaliCavernF0P2South, inTonaliCavernF0P2North, inTonaliCavernF0Start, inTonaliCavernF0P3, inTonaliCavernF1Stairs, + inTonaliCavernF1Rockslugs, inTonaliCavernF1GrimyLizards, inTonaliCavernF1Nagua, inTonaliCavernF2North, inSunPuzzleRoom, inMoonPuzzleRoom, + inFinalBossArea; + + Requirement quetzalMadeSalvagerOverlook, hasAtesAndActivatedTeleport; + + Requirement isSouthDrawer, hasDrawerKeyOrOpened, usedSigilOnCanvas, emissaryScrollNearby, inChestInterface; + Requirement hasSackOfGivenSack, isGalnaDrunk, notPlacedMindBomb, notPlacedBeer, notPlacedSteamforgeBrew, notPlacedDwarvenStout, beerTakenFromBarrel; + Requirement locatedKeystone1, locatedKeystone2, liftActivated, inspectedSunStatue, itzlaInPosSunPuzzle2Step1, completedSunPuzzleP1; + Requirement itzlaInPosSunPuzzle1Step1, itzlaInPosSunPuzzle1Step2, itzlaInPosSunPuzzle1Step3; + Requirement itzlaInPosSunPuzzle2Step2, completedSunPuzzleP2, itzlaInPosSunPuzzle2Step3, completedSunPuzzleP3; + Requirement inMoonPuzzleP1, inMoonPuzzleP2, inMoonPuzzleP3, completedMoonPuzzle; + ManualRequirement northPlatformSolutionKnown, southPlatformSolutionKnown; + Requirement isPuzzleOrder1, isPuzzleOrder2; + + Requirement is72Agility, notInspectedRalosPillar, notInspectedRanulPillar, notInspectedSkeleton, notInspectedDoor; + + int lastKnownStateStep = 0; + int lastKnownStateDarkFlame, lastKnownStateLightFlame = -1; + + @Override + public Map loadSteps() + { + initializeRequirements(); + setupZones(); + setupRequirements(); + setupSteps(); + + lastKnownStateStep = -1; + lastKnownStateDarkFlame = -1; + lastKnownStateLightFlame = -1; + + var steps = new HashMap(); + + steps.put(0, startQuest); + steps.put(1, startQuest); + + ConditionalStep goEnterTemple = new ConditionalStep(this, goToTempleFromGorge); + goEnterTemple.addStep(and(inTempleArea, emissaryRobes), enterTwilightTemple); + goEnterTemple.addStep(inTempleArea, searchChestForEmissaryRobes); + goEnterTemple.addStep(hasAtesAndActivatedTeleport, goToTempleWithAtes); + goEnterTemple.addStep(quetzalMadeSalvagerOverlook, goToTempleFromSalvager); + steps.put(3, goEnterTemple); + + ConditionalStep goEnterTempleBasement = new ConditionalStep(this, goEnterTemple); + goEnterTempleBasement.addStep(inHiddenRoom, pickBlueChest); + goEnterTempleBasement.addStep(and(inEastTempleBasement, usedSigilOnCanvas), enterPassage); + goEnterTempleBasement.addStep(and(inEastTempleBasement, canvasPiece), useCanvasPieceOnPicture); + goEnterTempleBasement.addStep(and(inEastTempleBasement, hasDrawerKeyOrOpened, isSouthDrawer), openDrawers2); + goEnterTempleBasement.addStep(and(inEastTempleBasement, hasDrawerKeyOrOpened), openDrawers); + goEnterTempleBasement.addStep(inEastTempleBasement, searchBed); + goEnterTempleBasement.addStep(inTempleBasement, enterBackroom); + goEnterTempleBasement.addStep(and(inTempleArea, emissaryRobes), goDownStairsTemple); + + steps.put(4, goEnterTempleBasement); + steps.put(5, goEnterTempleBasement); + steps.put(6, goEnterTempleBasement); + steps.put(7, goEnterTempleBasement); + + ConditionalStep goFightInBasement = new ConditionalStep(this, goEnterTemple); + goFightInBasement.addStep(inEastTempleBasement, fightEnforcer); + goFightInBasement.addStep(inTempleBasement, enterBackroom); + goFightInBasement.addStep(and(inTempleArea, emissaryRobes), goDownStairsTemple); + steps.put(8, goFightInBasement); + + ConditionalStep goReadScroll = new ConditionalStep(this, goEnterTemple); + goReadScroll.addStep(emissaryScroll, readEmissaryScroll); + goReadScroll.addStep(and(or(inEastTempleBasement, inHiddenRoom), emissaryScrollNearby), pickUpEmissaryScroll); + goReadScroll.addStep(inEastTempleBasement, enterPassage); + goReadScroll.addStep(inHiddenRoom, pickBlueChest); + goReadScroll.addStep(inTempleBasement, enterBackroom); + goReadScroll.addStep(and(inTempleArea, emissaryRobes), goDownStairsTemple); + steps.put(9, goReadScroll); + + ConditionalStep goTalkToQueen = new ConditionalStep(this, climbStairsF0ToF1Palace); + goTalkToQueen.addStep(inPalaceF2, talkToQueen); + goTalkToQueen.addStep(inPalaceF1, climbStairsF1ToF2Palace); + steps.put(10, goTalkToQueen); + + steps.put(11, talkToCaptainVibia); + ConditionalStep goIntoHouse = new ConditionalStep(this, inspectWindow); + goIntoHouse.addStep(inHideout, giveBonesOrMeatToDog); + steps.put(12, goIntoHouse); + steps.put(13, goIntoHouse); + steps.put(14, goIntoHouse); + steps.put(15, goIntoHouse); + steps.put(16, goIntoHouse); + + ConditionalStep goPetDog = new ConditionalStep(this, inspectWindow); + goPetDog.addStep(inChestInterface, openDoorWithGusCode); + goPetDog.addStep(inHideout, enterDoorCode); + steps.put(17, goPetDog); + + ConditionalStep goDoHideoutStuff = new ConditionalStep(this, inspectWindow); + goDoHideoutStuff.addStep(and(inHideoutF1, hasSackOfGivenSack, makeshiftBlackjack), goToF0HideoutEnd); + goDoHideoutStuff.addStep(and(inHideoutF2, hasSackOfGivenSack, makeshiftBlackjack), goF2ToF1HideoutEnd); + goDoHideoutStuff.addStep(and(inHideout, hasSackOfGivenSack, makeshiftBlackjack), showSackToVibia); + goDoHideoutStuff.addStep(and(inHideoutF2, hasSackOfGivenSack, coinPurseWithSand, branch), useBranchOnCoinPurse); + goDoHideoutStuff.addStep(and(inHideoutF2, hasSackOfGivenSack, knife, coinPurseWithSand), useKnifeOnPottedFan); + goDoHideoutStuff.addStep(and(inHideoutF2, hasSackOfGivenSack, knife, coinPurseEmpty), fillCoinPurse); + goDoHideoutStuff.addStep(inHideoutF2, goDownFromF2Hideout); + goDoHideoutStuff.addStep(and(inHideoutF1, hasSackOfGivenSack, knife, coinPurseEmpty), goF1ToF2Hideout); + goDoHideoutStuff.addStep(and(coinPurse), emptyCoinPurse); + goDoHideoutStuff.addStep(and(inHideoutF1, hasSackOfGivenSack, knife), takeCoinPurse); + goDoHideoutStuff.addStep(and(inHideoutF1), goToF0Hideout); + goDoHideoutStuff.addStep(and(inHideout, hasSackOfGivenSack, knife), goToF1Hideout); + goDoHideoutStuff.addStep(and(inHideout, hasSackOfGivenSack), takeKnife); + goDoHideoutStuff.addStep(and(inHideout, potatoes), removePotatoesFromSack); + goDoHideoutStuff.addStep(inHideout, takePotato); + steps.put(18, goDoHideoutStuff); + // 19 was took coin purse, 20 was emptied it first time + steps.put(19, goDoHideoutStuff); + steps.put(20, goDoHideoutStuff); + steps.put(21, goDoHideoutStuff); + steps.put(22, goDoHideoutStuff); + + ConditionalStep goSearchJanus = new ConditionalStep(this, inspectWindow); + goSearchJanus.addStep(inHideout, searchBodyForKey); + steps.put(23, goSearchJanus); + + ConditionalStep goEnterTrapdoor = new ConditionalStep(this, inspectWindow); + goEnterTrapdoor.addStep(inHideoutBasement, talkToQueenToGoCamTorum); + goEnterTrapdoor.addStep(inHideout, enterTrapdoor); + steps.put(24, goEnterTrapdoor); + steps.put(25, goEnterTrapdoor); + steps.put(26, goEnterTrapdoor); + + ConditionalStep goTalkToAttala = new ConditionalStep(this, enterCamTorum); + goTalkToAttala.addStep(inCamTorum, talkToAttala); + // TODO: See if cut cutscene at 27, if you restart it by entering Cam Torum again or not + steps.put(27, goTalkToAttala); + steps.put(28, goTalkToAttala); + + ConditionalStep goTalkToServiusCamTorum = new ConditionalStep(this, enterCamTorum); + goTalkToServiusCamTorum.addStep(inCamTorum, talkToServiusInCamTorum); + steps.put(29, goTalkToServiusCamTorum); + + ConditionalStep doBasementPuzzle = new ConditionalStep(this, enterCamTorumHouseBasement); + doBasementPuzzle.addStep(and(inCamTorumBasement, notPlacedMindBomb, wizardsMindBomb), placeMindBomb); + doBasementPuzzle.addStep(and(inCamTorumBasement, notPlacedMindBomb), takeWizardsMindBomb); + + doBasementPuzzle.addStep(and(inCamTorumBasement, notPlacedBeer, beer), placeBeer); + doBasementPuzzle.addStep(and(inCamTorumBasement, notPlacedBeer), takeBeerCabinet); + + doBasementPuzzle.addStep(and(inCamTorumBasement, notPlacedSteamforgeBrew, steamforgedBrew), placeSteamforgedBrew); + doBasementPuzzle.addStep(and(inCamTorumBasement, notPlacedSteamforgeBrew), takeSteamforgeBrew); + + doBasementPuzzle.addStep(and(inCamTorumBasement, notPlacedDwarvenStout, dwarvenStout), placeDwarvenStout); + doBasementPuzzle.addStep(and(inCamTorumBasement, notPlacedDwarvenStout), takeDwarvenStout); + + doBasementPuzzle.addStep(and(inCamTorumBasement, beerTakenFromBarrel, emptyGlass), placeEmptyGlass); + doBasementPuzzle.addStep(and(inCamTorumBasement, beer), drinkBeer); + doBasementPuzzle.addStep(inCamTorumBasement, takeBeerFromBarrel); + + ConditionalStep goGetGalnaDrunk = new ConditionalStep(this, enterCamTorum); + goGetGalnaDrunk.addStep(and(inCamTorumF2, beer), goDownstairsPub); + goGetGalnaDrunk.addStep(and(inCamTorum, beer), useBeerOnGalna); + goGetGalnaDrunk.addStep(inCamTorumF2, takeBeer); + goGetGalnaDrunk.addStep(inCamTorum, goUpstairsPub); + + ConditionalStep goDoCamTorum = new ConditionalStep(this, enterCamTorum); + goDoCamTorum.addStep(and(inCamTorum, isGalnaDrunk), doBasementPuzzle); + goDoCamTorum.addStep(inCamTorum, goGetGalnaDrunk); + steps.put(30, goDoCamTorum); + steps.put(31, goDoCamTorum); + + ConditionalStep goEnterFireplace = new ConditionalStep(this, enterCamTorum); + goEnterFireplace.addStep(inCamTorumBasement, inspectFireplace); + goEnterFireplace.addStep(inCamTorum, enterCamTorumHouseBasement); + steps.put(32, goEnterFireplace); + + ConditionalStep goEnterHole = new ConditionalStep(this, enterCamTorum); + goEnterHole.addStep(inCamTorumHiddenTunnel, watchCutsceneCamTorum); + goEnterHole.addStep(inCamTorumBasement, useHole); + goEnterHole.addStep(inCamTorum, enterCamTorumHouseBasement); + steps.put(33, goEnterHole); + steps.put(34, goEnterHole); + + ConditionalStep goTalkToServiusBasement = new ConditionalStep(this, enterCamTorum); + goTalkToServiusBasement.addStep(inCamTorumHiddenTunnel, returnThroughHole); + goTalkToServiusBasement.addStep(inCamTorumBasement, returnToServius); + goTalkToServiusBasement.addStep(inCamTorum, enterCamTorumHouseBasement); + steps.put(35, goTalkToServiusBasement); + + ConditionalStep goTalkToEyat = new ConditionalStep(this, enterCamTorum); + goTalkToEyat.addStep(inCamTorumBasement, climbUpFromTeumoBasement); + goTalkToEyat.addStep(inNeypotzli, talkToEyatalli); + goTalkToEyat.addStep(inCamTorum, enterNeypotzli); + steps.put(36, goTalkToEyat); + steps.put(37, goTalkToEyat); + steps.put(38, goTalkToEyat); + + // Received keystone fragment, varbit VarbitID.VMQ4_MONOLITH_FRAGMENT_ATTEMPTED_GIVE went 0->1 + ConditionalStep goLocateKeystone = new ConditionalStep(this, enterCamTorum); + goLocateKeystone.addStep(and(inPrison, locatedKeystone2), locateInAncientPrison); + goLocateKeystone.addStep(and(inEarthbound, locatedKeystone2), enterAncientPrisonFromEarthbound); + goLocateKeystone.addStep(and(inNeypotzli, locatedKeystone2), enterAncientPrison); + + goLocateKeystone.addStep(and(inEarthbound, locatedKeystone1), locateInEarthbound); + goLocateKeystone.addStep(and(inStreambound, locatedKeystone1), enterEarthboundCavernFromStreambound); + goLocateKeystone.addStep(and(inNeypotzli, locatedKeystone1), enterEarthboundCavern); + + goLocateKeystone.addStep(inStreambound, locateInStreambound); + goLocateKeystone.addStep(inNeypotzli, enterStreamboundCavern); + goLocateKeystone.addStep(inCamTorum, enterNeypotzli); + steps.put(39, goLocateKeystone); + steps.put(40, goLocateKeystone); + + ConditionalStep goTouchSymbol = new ConditionalStep(this, enterCamTorum); + goTouchSymbol.addStep(and(inNeypotzliFightRoom), defeatCultists); + goTouchSymbol.addStep(and(inPrison), touchGlowingSymbol); + goTouchSymbol.addStep(and(inEarthbound), enterAncientPrisonFromEarthbound); + goTouchSymbol.addStep(and(inNeypotzli), enterAncientPrison); + goTouchSymbol.addStep(inCamTorum, enterNeypotzli); + steps.put(41, goTouchSymbol); + // Skipped 42? + steps.put(43, goTouchSymbol); + + ConditionalStep goTalkToAttalaAfterFight = new ConditionalStep(this, enterCamTorum); + goTalkToAttalaAfterFight.addStep(and(inNeypotzliFightRoom), talkToAttalaAfterCultistFight); + goTalkToAttalaAfterFight.addStep(and(inPrison), touchGlowingSymbol); + goTalkToAttalaAfterFight.addStep(and(inEarthbound), enterAncientPrisonFromEarthbound); + goTalkToAttalaAfterFight.addStep(and(inNeypotzli), enterAncientPrison); + goTalkToAttalaAfterFight.addStep(inCamTorum, enterNeypotzli); + steps.put(44, goTalkToAttalaAfterFight); + + steps.put(45, talkToServiusAtTalTeklan); + steps.put(46, enterTonaliCavern); + + ConditionalStep goDefeatFinalCultists = new ConditionalStep(this, enterTonaliCavern); + goDefeatFinalCultists.addStep(inTonaliCavern, defeatFinalCultists); + steps.put(47, goDefeatFinalCultists); + + ConditionalStep goDefeatEnnius = new ConditionalStep(this, enterTonaliCavern); + goDefeatEnnius.addStep(inTonaliCavern, fightEnnius); + steps.put(48, goDefeatEnnius); + steps.put(49, goDefeatEnnius); + steps.put(50, goDefeatEnnius); + steps.put(51, goDefeatEnnius); + + ConditionalStep goDoSunPuzzle = new ConditionalStep(this, getEssenceFromUrns); + goDoSunPuzzle.addStep(not(inspectedSunStatue), inspectSunStatue); + goDoSunPuzzle.addStep(completedSunPuzzleP3, goUpFromSunPuzzle); + goDoSunPuzzle.addStep(and(completedSunPuzzleP2, essence, isPuzzleOrder2, itzlaInPosSunPuzzle2Step3), solveSunPuzzle2Step3Craft); + goDoSunPuzzle.addStep(and(completedSunPuzzleP2, essence, isPuzzleOrder2), solveSunPuzzle2Step3MoveItzla); + + goDoSunPuzzle.addStep(and(completedSunPuzzleP1, essence, isPuzzleOrder2, itzlaInPosSunPuzzle2Step2), solveSunPuzzle2Step2Craft); + goDoSunPuzzle.addStep(and(completedSunPuzzleP1, essence, isPuzzleOrder2), solveSunPuzzle2Step2MoveItzla); + + goDoSunPuzzle.addStep(and(essence, isPuzzleOrder2, itzlaInPosSunPuzzle2Step1), solveSunPuzzle2Step1Craft); + goDoSunPuzzle.addStep(and(essence, isPuzzleOrder2), solveSunPuzzle2Step1MoveItzla); + + goDoSunPuzzle.addStep(and(completedSunPuzzleP2, essence, isPuzzleOrder1, itzlaInPosSunPuzzle1Step3), solveSunPuzzle1Step3Craft); + goDoSunPuzzle.addStep(and(completedSunPuzzleP2, essence, isPuzzleOrder1), solveSunPuzzle1Step3MoveItzla); + + goDoSunPuzzle.addStep(and(completedSunPuzzleP1, essence, isPuzzleOrder1, itzlaInPosSunPuzzle1Step2), solveSunPuzzle1Step2Craft); + goDoSunPuzzle.addStep(and(completedSunPuzzleP1, essence, isPuzzleOrder1), solveSunPuzzle1Step2MoveItzla); + + goDoSunPuzzle.addStep(and(essence, isPuzzleOrder1, itzlaInPosSunPuzzle1Step1), solveSunPuzzle1Step1Craft); + goDoSunPuzzle.addStep(and(essence, isPuzzleOrder1), solveSunPuzzle1Step1MoveItzla); + + goDoSunPuzzle.addStep(and(essence), solveSunPuzzle); + + ConditionalStep goDoMoonPuzzle = new ConditionalStep(this, getKnifeBlade); + goDoMoonPuzzle.addStep(completedMoonPuzzle, leaveMoonPuzzleRoom); + goDoMoonPuzzle.addStep(not(southPlatformSolutionKnown), moveItzlaSouth); + goDoMoonPuzzle.addStep(not(northPlatformSolutionKnown), moveItzlaNorth); + goDoMoonPuzzle.addStep(and(kindling), placeRoots); + goDoMoonPuzzle.addStep(and(roots, knifeBlade), fletchRoots); + goDoMoonPuzzle.addStep(knifeBlade, pullTreeRoots); + + ConditionalStep goDeeperIntoTonali = new ConditionalStep(this, enterTonaliCavern); + goDeeperIntoTonali.addStep(and(inMoonPuzzleRoom), goDoMoonPuzzle); + goDeeperIntoTonali.addStep(and(inSunPuzzleRoom), goDoSunPuzzle); + goDeeperIntoTonali.addStep(and(inTonaliCavernF2North, liftActivated, completedSunPuzzleP3), enterMoonPuzzle); + goDeeperIntoTonali.addStep(and(inTonaliCavernF2North, liftActivated), descendIntoSunPuzzle); + goDeeperIntoTonali.addStep(inTonaliCavernF2North, activateStrangePlatform); + goDeeperIntoTonali.addStep(inTonaliCavernF1Nagua, climbRope); + goDeeperIntoTonali.addStep(inTonaliCavernF0P3, useRedTeleporter3); + goDeeperIntoTonali.addStep(inTonaliCavernF0P2North, useRedTeleporter3); + goDeeperIntoTonali.addStep(inTonaliCavernF1GrimyLizards, useBlueTeleporterLizards); + goDeeperIntoTonali.addStep(inTonaliCavernF0P2South, useRedTeleporter2); + goDeeperIntoTonali.addStep(inTonaliCavernF1Rockslugs, useBlueTeleporter); + goDeeperIntoTonali.addStep(inTonaliCavernF0Start, useRedTeleporter); + goDeeperIntoTonali.addStep(inTonaliCavernF1Stairs, tonaliGoDownStairsF1ToF0); + goDeeperIntoTonali.addStep(inTonaliCavern, tonaliGoDownStairsF2ToF1); + goDeeperIntoTonali.addStep(liftActivated, enterTonaliWithLift); + steps.put(52, goDeeperIntoTonali); + steps.put(53, goDeeperIntoTonali); + steps.put(54, goDeeperIntoTonali); + + steps.put(55, goDeeperIntoTonali); + + ConditionalStep goFinalFight = new ConditionalStep(this, goDeeperIntoTonali); + goFinalFight.addStep(and(inFinalBossArea), approachMetzli); + goFinalFight.addStep(and(inTonaliCavernF2North, liftActivated), enterFinalBossArea); + steps.put(60, goFinalFight); + steps.put(61, goFinalFight); + + ConditionalStep fightFinalBoss = new ConditionalStep(this, goDeeperIntoTonali); + fightFinalBoss.addStep(and(inFinalBossArea), defeatFinalBoss); + fightFinalBoss.addStep(and(inTonaliCavernF2North, liftActivated), enterFinalBossArea); + steps.put(62, fightFinalBoss); + // Defeated boss + + ConditionalStep doFinalBossPostCutscene = new ConditionalStep(this, goDeeperIntoTonali); + doFinalBossPostCutscene.addStep(and(inFinalBossArea), watchFinalBossAfterCutscene); + doFinalBossPostCutscene.addStep(and(inTonaliCavernF2North, liftActivated), enterFinalBossArea); + steps.put(63, doFinalBossPostCutscene); + + ConditionalStep goNorthAfterFinalBoss = new ConditionalStep(this, goDeeperIntoTonali); + goNorthAfterFinalBoss.addStep(and(inFinalBossArea, is72Agility), goToNorthOfFinalAreaAgilityShortcut); + goNorthAfterFinalBoss.addStep(inFinalBossArea, goToNorthOfFinalArea); + steps.put(64, goNorthAfterFinalBoss); + + // Inspected + + // Look at tablet, statues + ConditionalStep goInspectFinalChamberItems = new ConditionalStep(this, goDeeperIntoTonali); + goInspectFinalChamberItems.addStep(and(inFinalBossArea, notInspectedRalosPillar), inspectRalosPillar); + goInspectFinalChamberItems.addStep(and(inFinalBossArea, notInspectedRanulPillar), inspectRanulPillar); + goInspectFinalChamberItems.addStep(and(inFinalBossArea, notInspectedDoor), inspectDoor); + goInspectFinalChamberItems.addStep(and(inFinalBossArea, notInspectedSkeleton, stoneTablet), readStoneTablet); + goInspectFinalChamberItems.addStep(and(inFinalBossArea, notInspectedSkeleton), inspectSkeleton); + goInspectFinalChamberItems.addStep(and(inTonaliCavernF2North, liftActivated), enterFinalBossArea); + steps.put(65, goInspectFinalChamberItems); + + ConditionalStep goFinishQuest = new ConditionalStep(this, enterTonaliCavern); + goFinishQuest.addStep(inTonaliCavern, finishQuest); + steps.put(66, goFinishQuest); + steps.put(67, goFinishQuest); + return steps; + } + + @Subscribe + public void onGameTick(GameTick gameTick) + { + Requirement darkBlueFlameMissing = not(new ObjectCondition(ObjectID.VMQ4_MOON_PUZZLE_FIRE_1, new WorldPoint(1296, 9455, 1))); + Requirement lightBlueFlameMissing = not(new ObjectCondition(ObjectID.VMQ4_MOON_PUZZLE_FIRE_2, new WorldPoint(1292, 9454, 1))); + if (inMoonPuzzleRoom == null || !inMoonPuzzleRoom.check(client)) return; + + int currentStep = client.getVarbitValue(VarbitID.VMQ4_MOON_PUZZLE_PROGRESS); + if (currentStep != lastKnownStateStep) + { + lastKnownStateDarkFlame = -1; + lastKnownStateLightFlame = -1; + northPlatformSolutionKnown.setShouldPass(false); + southPlatformSolutionKnown.setShouldPass(false); + lastKnownStateStep = currentStep; + placeRoots.setText("Have Itzla move between both the north and south " + + "platforms to see how many braziers are lit around the room total. Put that many into the statue."); + kindling.setQuantity(-1); + } + + if (lastKnownStateDarkFlame != -1 && lastKnownStateLightFlame != -1) return; + + if (darkBlueFlameMissing.check(client)) + { + lastKnownStateDarkFlame = getSumOfLitBraziers(); + northPlatformSolutionKnown.setShouldPass(true); + } + else if (lightBlueFlameMissing.check(client)) + { + lastKnownStateLightFlame = getSumOfLitBraziers(); + southPlatformSolutionKnown.setShouldPass(true); + } + + if (lastKnownStateDarkFlame >= 0 && lastKnownStateLightFlame >= 0) + { + int total = lastKnownStateLightFlame + lastKnownStateDarkFlame; + placeRoots.setText("Place " + total + " roots in the moon statue."); + kindling.setQuantity(total); + } + } + + private int getSumOfLitBraziers() + { + Tile[][] tiles; + if (client.getTopLevelWorldView().getScene() == null) return -1; + + List wps = List.of( + new WorldPoint(1296, 9457, 1), + new WorldPoint(1289, 9457, 1), + new WorldPoint(1286, 9454, 1), + new WorldPoint(1282, 9449, 1), + new WorldPoint(1282, 9443, 1), + new WorldPoint(1286, 9438, 1), + new WorldPoint(1289, 9435, 1), + new WorldPoint(1296, 9435, 1) + + ); + + int total = 0; + + for (WorldPoint wp : wps) + { + List localPoints = QuestPerspective.getInstanceLocalPointFromReal(client, wp); + + if (localPoints.isEmpty()) return -1; + + tiles = client.getTopLevelWorldView().getScene().getTiles()[client.getTopLevelWorldView().getPlane()]; + + for (LocalPoint localPoint : localPoints) + { + Tile b1Tile = tiles[localPoint.getSceneX()][localPoint.getSceneY()]; + boolean isMatch = Arrays.stream(b1Tile.getGameObjects()).anyMatch((obj) -> obj != null && obj.getId() == ObjectID.VMQ4_MOON_PUZZLE_BRAZIER_LIT); + if (isMatch) total++; + } + } + + return total; + } + + @Override + protected void setupZones() + { + templeArea = new Zone(new WorldPoint(1613, 3205, 0), new WorldPoint(1729, 3293, 0)); + templeBasement = new Zone(new WorldPoint(1660, 9680, 0), new WorldPoint(1725, 9720, 0)); + eastTempleBasement = new Zone(new WorldPoint(1707, 9696, 0), new WorldPoint(1718, 9715, 0)); + hiddenRoom = new Zone(new WorldPoint(1721, 9702, 0), new WorldPoint(1725, 9709, 0)); + palaceF1 = new Zone(new WorldPoint(1669, 3150, 1), new WorldPoint(1692, 3175, 1)); + palaceF2 = new Zone(new WorldPoint(1669, 3150, 2), new WorldPoint(1692, 3175, 2)); + hideoutGroundFloor = new Zone(new WorldPoint(1643, 3091, 0), new WorldPoint(1652, 3096, 0)); + hideoutMiddleFloor = new Zone(new WorldPoint(1643, 3091, 1), new WorldPoint(1652, 3096, 1)); + hideoutTopFloor = new Zone(new WorldPoint(1643, 3091, 2), new WorldPoint(1652, 3102, 2)); + hideoutBasement = new Zone(new WorldPoint(1643, 9486, 0), new WorldPoint(1657, 9500, 0)); + camTorum = new Zone(new WorldPoint(1378, 9502, 0), new WorldPoint(1524, 9600, 3)); + camTorumF2 = new Zone(new WorldPoint(1465, 9567, 2), new WorldPoint(1470, 9572, 2)); + camTorumBasement = new Zone(new WorldPoint(1464, 9564, 0), new WorldPoint(1472, 9574, 0)); + hiddenTunnel = new Zone(new WorldPoint(1468, 9561, 0), new WorldPoint(1476, 9563, 0)); + hiddenTunnel2 = new Zone(new WorldPoint(1477, 9536, 0), new WorldPoint(1500, 9570, 0)); + + antechamber = new Zone(5782, 1); + prison = new Zone(5525, 0); + earthbound = new Zone(5527, 0); + streambound = new Zone(6039, 0); + ancientShrine = new Zone(6037, 0); + + neypotzliFightRoom = new Zone(new WorldPoint(1352, 9501, 0), new WorldPoint(1372, 9524, 0)); + tonaliCavernF1Stairs = new Zone(new WorldPoint(1329, 9360, 1), new WorldPoint(1343, 9369, 1)); + tonaliCavernF1Rockslugs = new Zone(new WorldPoint(1319, 9374, 1), new WorldPoint(1329, 9386, 1)); + tonaliCavernF0Start = new Zone(new WorldPoint(1317, 9366, 0), new WorldPoint(1341, 9385, 0)); + tonaliCavernF0P2South = new Zone(new WorldPoint(1282, 9365, 0), new WorldPoint(1315, 9391, 0)); + tonaliCavernF0P2North = new Zone(new WorldPoint(1282, 9392, 0), new WorldPoint(1305, 9403, 0)); + tonaliCavernF2 = new Zone(new WorldPoint(1298, 9344, 2), new WorldPoint(1343, 9380, 2)); + + tonaliCavernF0P3V1 = new Zone(new WorldPoint(1306, 9392, 0), new WorldPoint(1340, 9420, 0)); + tonaliCavernF0P3V2 = new Zone(new WorldPoint(1320, 9387, 0), new WorldPoint(1340, 9391, 0)); + + tonaliCavernF1GrimyLizards = new Zone(new WorldPoint(1291, 9381, 1), new WorldPoint(1298, 9395, 1)); + tonaliCavernF1Nagua = new Zone(new WorldPoint(1283, 9399, 1), new WorldPoint(1310, 9425, 1)); + tonaliCavernF2North = new Zone(new WorldPoint(1303, 9399, 2), new WorldPoint(1317, 9468, 2)); + sunPuzzleRoom = new Zone(new WorldPoint(1318, 9433, 1), new WorldPoint(1345, 9458, 1)); + moonPuzzleRoom = new Zone(new WorldPoint(1279, 9433, 1), new WorldPoint(1305, 9460, 1)); + + finalBossArea = new Zone(new WorldPoint(1275, 9470, 0), new WorldPoint(1350, 9550, 1)); + } + + @Override + protected void setupRequirements() + { + var emissaryHood = new ItemRequirement("Emissary hood", ItemID.VMQ3_CULTIST_HOOD); + var emissaryTop = new ItemRequirement("Emissary top", ItemID.VMQ3_CULTIST_ROBE_TOP); + var emissaryBottom = new ItemRequirement("Emissary bottom", ItemID.VMQ3_CULTIST_ROBE_BOTTOM); + var emissaryBoots = new ItemRequirement("Emissary sandals", ItemID.VMQ3_CULTIST_SANDALS); + emissaryRobesEquipped = new ItemRequirements("Emissary robes", emissaryHood, emissaryTop, emissaryBottom, + emissaryBoots).equipped().highlighted(); + emissaryRobes = new ItemRequirements("Emissary robes", emissaryHood, emissaryTop, emissaryBottom, emissaryBoots); + + var givenBoneToDog = new VarbitRequirement(VarbitID.VMQ4, 17, Operation.GREATER_EQUAL); + bone = new ItemRequirement("Any type of bone or raw meat", ItemID.BONES); + bone.setConditionToHide(givenBoneToDog); + bone.addAlternates(ItemID.BIG_BONES, ItemID.BONES_BURNT, ItemID.WOLF_BONES, ItemID.BAT_BONES, ItemID.DAGANNOTH_KING_BONES, ItemID.TBWT_BEAST_BONES, + ItemID.WYRM_BONES, ItemID.BABYWYRM_BONES, ItemID.BABYDRAGON_BONES, ItemID.WYVERN_BONES, ItemID.DRAGON_BONES, ItemID.DRAKE_BONES, + ItemID.HYDRA_BONES, ItemID.LAVA_DRAGON_BONES, ItemID.DRAGON_BONES_SUPERIOR, ItemID.MM_NORMAL_MONKEY_BONES, + ItemID.MM_BEARDED_GORILLA_MONKEY_BONES, ItemID.MM_NORMAL_GORILLA_MONKEY_BONES, ItemID.MM_LARGE_ZOMBIE_MONKEY_BONES, + ItemID.MM_SMALL_ZOMBIE_MONKEY_BONES, ItemID.MM_SMALL_NINJA_MONKEY_BONES, ItemID.MM_MEDIUM_NINJA_MONKEY_BONES, ItemID.TBWT_JOGRE_BONES, + ItemID.TBWT_BURNT_JOGRE_BONES, ItemID.ZOGRE_BONES, ItemID.ZOGRE_ANCESTRAL_BONES_FAYG, ItemID.ZOGRE_ANCESTRAL_BONES_RAURG, + ItemID.ZOGRE_ANCESTRAL_BONES_OURG, ItemID.ALAN_BONES, ItemID.RAW_BEAR_MEAT, ItemID.RAW_BOAR_MEAT, ItemID.RAW_RAT_MEAT, + ItemID.RAW_UGTHANKI_MEAT, ItemID.YAK_MEAT_RAW); + + rangedGear = new ItemRequirement("Ranged/Magic Combat gear", -1, -1).isNotConsumed(); + rangedGear.setDisplayItemId(BankSlotIcons.getRangedCombatGear()); + + // Item Recommended + combatWeapon = new ItemRequirement("Combat weapon", -1, -1).isNotConsumed(); + combatWeapon.setDisplayItemId(BankSlotIcons.getCombatGear()); + + combatGear = new ItemRequirement("Melee Combat gear", -1, -1).isNotConsumed(); + combatGear.setDisplayItemId(BankSlotIcons.getCombatGear()); + + food = new ItemRequirement("Food", ItemCollections.GOOD_EATING_FOOD, -1); + food.setUrlSuffix("Food"); + + prayerPotions = new ItemRequirement("Prayer potions", ItemCollections.PRAYER_POTIONS, 3); + + whistle = new ItemRequirement("Quetzal whistle", ItemID.HG_QUETZALWHISTLE_BASIC); + whistle.addAlternates(ItemID.HG_QUETZALWHISTLE_ENHANCED, ItemID.HG_QUETZALWHISTLE_PERFECTED); + pendant = new ItemRequirement("Pendant of ates", ItemID.PENDANT_OF_ATES); + pendantToTwilight = new ItemRequirement("Pendant of ates ([2] Twilight Temple)", ItemID.PENDANT_OF_ATES); + civitasTeleport = new ItemRequirement("Civitas illa fortis teleport", ItemID.POH_TABLET_FORTISTELEPORT); + // Quest items + drawerKey = new ItemRequirement("Key", ItemID.VMQ4_DRAWER_KEY); + canvasPiece = new ItemRequirement("Canvas piece", ItemID.VMQ4_PAINTING_SIGIL); + emissaryScroll = new ItemRequirement("Emissary scroll", ItemID.VMQ4_CULT_MANIFEST); + knife = new ItemRequirement("Knife", ItemID.KNIFE); + potatoes = new ItemRequirement("Potatoes (?)", ItemID.SACK_POTATO_3); + potatoes.addAlternates(ItemID.SACK_POTATO_2, ItemID.SACK_POTATO_1); + + var givenSack = new VarbitRequirement(VarbitID.VMQ4_JANUS_SACK_GIVEN, 1, Operation.GREATER_EQUAL); + emptySack = new ItemRequirement("Empty sack", ItemID.SACK_EMPTY); + emptySack.setConditionToHide(givenSack); + coinPurse = new ItemRequirement("Coin purse", ItemID.VMQ4_JANUS_PURSE); + + coinPurseFullOrEmpty = new ItemRequirement("Coin purse", ItemID.VMQ4_JANUS_PURSE); + coinPurseFullOrEmpty.addAlternates(ItemID.VMQ4_JANUS_PURSE_EMPTY); + coinPurseEmpty = new ItemRequirement("Empty coin purse", ItemID.VMQ4_JANUS_PURSE_EMPTY); + coinPurseWithSand = new ItemRequirement("Sandy coin purse", ItemID.VMQ4_JANUS_PURSE_SAND); + branch = new ItemRequirement("Branch", ItemID.VMQ4_JANUS_REED); + makeshiftBlackjack = new ItemRequirement("Makeshift blackjack", ItemID.VMQ4_JANUS_SLAP); + + beer = new ItemRequirement("Beer", ItemID.BEER); + steamforgedBrew = new ItemRequirement("Steamforge brew", ItemID.STEAMFORGE_BREW); + dwarvenStout = new ItemRequirement("Dwarven stout", ItemID.DWARVEN_STOUT); + emptyGlass = new ItemRequirement("Empty glass", ItemID.BEER_GLASS); + wizardsMindBomb = new ItemRequirement("Wizard's mind bomb", ItemID.WIZARDS_MIND_BOMB); + + keystoneFragment = new ItemRequirement("Keystone fragment", ItemID.VMQ4_MONOLITH_FRAGMENT); + essence = new ItemRequirement("Kuhu essence", ItemID.VMQ4_ESSENCE, 2); + roots = new ItemRequirement("Ancient roots", ItemID.VMQ4_ROOTS); + kindling = new ItemRequirement("Root kindling", ItemID.VMQ4_ROOT_KINDLING); + knifeBlade = new ItemRequirement("Knife blade", ItemID.VMQ4_KNIFE); + + stoneTablet = new ItemRequirement("Stone tablet", ItemID.VMQ4_MOKI_TABLET); + + // Quest requirements + inTempleArea = new ZoneRequirement(templeArea); + inTempleBasement = new ZoneRequirement(templeBasement); + inEastTempleBasement = new ZoneRequirement(eastTempleBasement); + inHiddenRoom = new ZoneRequirement(hiddenRoom); + inPalaceF1 = new ZoneRequirement(palaceF1); + inPalaceF2 = new ZoneRequirement(palaceF2); + inHideout = new ZoneRequirement(hideoutGroundFloor); + inHideoutF1 = new ZoneRequirement(hideoutMiddleFloor); + inHideoutF2 = new ZoneRequirement(hideoutTopFloor); + inHideoutBasement = new ZoneRequirement(hideoutBasement); + inCamTorum = new ZoneRequirement(camTorum); + inCamTorumF2 = new ZoneRequirement(camTorumF2); + inCamTorumBasement = new ZoneRequirement(camTorumBasement); + inCamTorumHiddenTunnel = new ZoneRequirement(hiddenTunnel, hiddenTunnel2); + + inAntechamber = new ZoneRequirement(antechamber); + inPrison = new ZoneRequirement(prison); + inStreambound = new ZoneRequirement(streambound); + inEarthbound = new ZoneRequirement(earthbound); + inAncientShrine = new ZoneRequirement(ancientShrine); + inNeypotzli = new ZoneRequirement(antechamber, prison, streambound, earthbound, ancientShrine); + inNeypotzliFightRoom = new ZoneRequirement(neypotzliFightRoom); + + inTonaliCavern = new ZoneRequirement(tonaliCavernF2); + inTonaliCavernF1Stairs = new ZoneRequirement(tonaliCavernF1Stairs); + inTonaliCavernF1Rockslugs = new ZoneRequirement(tonaliCavernF1Rockslugs); + inTonaliCavernF0Start = new ZoneRequirement(tonaliCavernF0Start); + inTonaliCavernF0P2South = new ZoneRequirement(tonaliCavernF0P2South); + inTonaliCavernF0P2North = new ZoneRequirement(tonaliCavernF0P2North); + inTonaliCavernF0P3 = new ZoneRequirement(tonaliCavernF0P3V1, tonaliCavernF0P3V2); + inTonaliCavernF1GrimyLizards = new ZoneRequirement(tonaliCavernF1GrimyLizards); + inTonaliCavernF1Nagua = new ZoneRequirement(tonaliCavernF1Nagua); + inTonaliCavernF2North = new ZoneRequirement(tonaliCavernF2North); + inSunPuzzleRoom = new ZoneRequirement(sunPuzzleRoom); + inMoonPuzzleRoom = new ZoneRequirement(moonPuzzleRoom); + inFinalBossArea = new ZoneRequirement(finalBossArea); + + isSouthDrawer = new VarbitRequirement(VarbitID.VMQ4_CANVAS_DRAWER, 2); + hasDrawerKeyOrOpened = or(drawerKey, new VarbitRequirement(VarbitID.VMQ4_TEMPLE_DRAW_UNLOCKED, 1, Operation.GREATER_EQUAL)); + usedSigilOnCanvas = new VarbitRequirement(VarbitID.VMQ4, 7, Operation.GREATER_EQUAL); + emissaryScrollNearby = new ItemOnTileRequirement(emissaryScroll); + inChestInterface = new WidgetTextRequirement(809, 5, 9, "Confirm"); + + hasSackOfGivenSack = or(emptySack, givenSack); + isGalnaDrunk = new VarbitRequirement(VarbitID.VMQ4_TEUMO_WIFE_BEER_GIVEN, 1); + + notPlacedMindBomb = not(new ItemOnTileRequirement(ItemID.WIZARDS_MIND_BOMB, new WorldPoint(1471, 9567, 0))); + notPlacedBeer = not(new ItemOnTileRequirement(ItemID.BEER, new WorldPoint(1466, 9573, 0))); + notPlacedSteamforgeBrew = not(new ItemOnTileRequirement(ItemID.STEAMFORGE_BREW, new WorldPoint(1464, 9568, 0))); + notPlacedDwarvenStout = not(new ItemOnTileRequirement(ItemID.DWARVEN_STOUT, new WorldPoint(1466, 9568, 0))); + beerTakenFromBarrel = not(new ItemOnTileRequirement(ItemID.BEER, new WorldPoint(1469, 9571, 0))); + + locatedKeystone1 = new VarbitRequirement(VarbitID.VMQ4_NEYPOTZLI_CHECKPOINT, 1, Operation.GREATER_EQUAL); + locatedKeystone2 = new VarbitRequirement(VarbitID.VMQ4_NEYPOTZLI_CHECKPOINT, 2, Operation.GREATER_EQUAL); + + liftActivated = new VarbitRequirement(VarbitID.VMQ4_LIFT_ACTIVATED, 1); + + // Sun puzzle + inspectedSunStatue = or(new VarbitRequirement(VarbitID.VMQ4_SUN_PUZZLE_PROGRESS, 1, Operation.GREATER_EQUAL), new VarbitRequirement(VarbitID.VMQ4_SUN_PUZZLE_ITZLA_STATE, 1, Operation.GREATER_EQUAL)); + itzlaInPosSunPuzzle1Step1 = new NpcRequirement("Itzla at east altar", NpcID.VMQ4_ITZLA_CRYPT_PUZZLE_SUN, new WorldPoint(1338, 9446, 1)); + itzlaInPosSunPuzzle1Step2 = new NpcRequirement("Itzla at north altar", NpcID.VMQ4_ITZLA_CRYPT_PUZZLE_SUN, new WorldPoint(1330, 9454, 1)); + itzlaInPosSunPuzzle1Step3 = new NpcRequirement("Itzla at north-west altar", NpcID.VMQ4_ITZLA_CRYPT_PUZZLE_SUN, new WorldPoint(1324, 9452, 1)); + + itzlaInPosSunPuzzle2Step1 = new NpcRequirement("Itzla at north altar", NpcID.VMQ4_ITZLA_CRYPT_PUZZLE_SUN, new WorldPoint(1330, 9454, 1)); + itzlaInPosSunPuzzle2Step2 = new NpcRequirement("Itzla at north altar", NpcID.VMQ4_ITZLA_CRYPT_PUZZLE_SUN, new WorldPoint(1338, 9446, 1)); + itzlaInPosSunPuzzle2Step3 = new NpcRequirement("Itzla at north altar", NpcID.VMQ4_ITZLA_CRYPT_PUZZLE_SUN, new WorldPoint(1324, 9452, 1)); + completedSunPuzzleP1 = new VarbitRequirement(VarbitID.VMQ4_SUN_PUZZLE_PROGRESS, 1, Operation.GREATER_EQUAL); + completedSunPuzzleP2 = new VarbitRequirement(VarbitID.VMQ4_SUN_PUZZLE_PROGRESS, 2, Operation.GREATER_EQUAL); + completedSunPuzzleP3 = new VarbitRequirement(VarbitID.VMQ4_SUN_PUZZLE_PROGRESS, 3, Operation.GREATER_EQUAL); + isPuzzleOrder1 = new VarbitRequirement(VarbitID.VMQ4_SUN_PUZZLE_ORDER, 1); + isPuzzleOrder2 = new VarbitRequirement(VarbitID.VMQ4_SUN_PUZZLE_ORDER, 2); + + inMoonPuzzleP1 = new VarbitRequirement(VarbitID.VMQ4_MOON_PUZZLE_PROGRESS, 0); + inMoonPuzzleP2 = new VarbitRequirement(VarbitID.VMQ4_MOON_PUZZLE_PROGRESS, 1); + inMoonPuzzleP3 = new VarbitRequirement(VarbitID.VMQ4_MOON_PUZZLE_PROGRESS, 2); + completedMoonPuzzle = new VarbitRequirement(VarbitID.VMQ4_MOON_PUZZLE_PROGRESS, 3); + northPlatformSolutionKnown = new ManualRequirement(); + southPlatformSolutionKnown = new ManualRequirement(); + + is72Agility = new SkillRequirement(Skill.AGILITY, 72, true); + + notInspectedRalosPillar = not(new VarbitRequirement(VarbitID.VMQ4_FINAL_CHAMBER_RALOS_INSPECT, 1)); + notInspectedRanulPillar = not(new VarbitRequirement(VarbitID.VMQ4_FINAL_CHAMBER_RANUL_INSPECT, 1)); + notInspectedSkeleton = not(new VarbitRequirement(VarbitID.VMQ4_FINAL_CHAMBER_TABLET_INSPECT, 1)); + notInspectedDoor = not(new VarbitRequirement(VarbitID.VMQ4_FINAL_CHAMBER_DOOR_INSPECT, 1)); + quetzalMadeSalvagerOverlook = new VarbitRequirement(VarbitID.QUETZAL_SALVAGEROVERLOOK, 1); + hasAtesAndActivatedTeleport = and(pendant.alsoCheckBank(questBank), new VarbitRequirement(VarbitID.PENDANT_OF_ATES_TWILIGHT_FOUND, 1, Operation.GREATER_EQUAL)); + } + + public void setupSteps() + { + startQuest = new NpcStep(this, NpcID.VMQ3_SERVIUS_PALACE, new WorldPoint(1681, 3168, 0), "Talk to Servius in the Sunrise Palace in Civitas illa " + + "Fortis to start the quest."); + startQuest.addDialogStep("Yes."); + + goToTempleWithAtes = new DetailedQuestStep(this, new WorldPoint(1657, 3231, 0), "Use the pendant of ates to the Twilight Temple, or go there via" + + " Quetzal.", pendantToTwilight.highlighted()); + goToTempleWithAtes.addWidgetHighlight(new WidgetHighlight(InterfaceID.PendantOfAtes.TELEPORT_TWILIGHT, true).withModelRequirement(54541)); + + goToTempleFromSalvager = new DetailedQuestStep(this, new WorldPoint(1657, 3231, 0), "Take a quetzal to the Salvager Overlook and run south to the " + + "Twilight Temple."); + goToTempleFromSalvager.addWidgetHighlight(new WidgetHighlight(InterfaceID.QuetzalMenu.ICONS, true).withModelRequirement(54546)); + ((DetailedQuestStep) goToTempleFromSalvager).setLinePoints(List.of( + new WorldPoint(1613, 3299, 0), + new WorldPoint(1630, 3293, 0), + new WorldPoint(1644, 3279, 0), + new WorldPoint(1644, 3263, 0), + new WorldPoint(1639, 3254, 0), + new WorldPoint(1638, 3244, 0), + new WorldPoint(1644, 3240, 0), + new WorldPoint(1649, 3240, 0), + new WorldPoint(1657, 3231, 0) + )); + goToTempleFromGorge = new DetailedQuestStep(this, new WorldPoint(1657, 3231, 0), "Take a quetzal to the Salvager Overlook and run south to the " + + "Twilight Temple."); + goToTempleFromGorge.addWidgetHighlight(new WidgetHighlight(InterfaceID.QuetzalMenu.ICONS, true).withModelRequirement(54539)); + ((DetailedQuestStep) goToTempleFromGorge).setLinePoints(List.of( + new WorldPoint(1510, 3226, 0), + new WorldPoint(1522, 3252, 0), + new WorldPoint(1529, 3254, 0), + new WorldPoint(1538, 3267, 0), + new WorldPoint(1542, 3277, 0), + new WorldPoint(1551, 3274, 0), + new WorldPoint(1561, 3279, 0), + new WorldPoint(1581, 3279, 0), + new WorldPoint(1593, 3269, 0), + new WorldPoint(1600, 3268, 0), + new WorldPoint(1610, 3260, 0), + new WorldPoint(1618, 3254, 0), + new WorldPoint(1621, 3254, 0), + new WorldPoint(1644, 3240, 0), + new WorldPoint(1649, 3240, 0), + new WorldPoint(1657, 3231, 0) + )); + freeInvSlots4 = new FreeInventorySlotRequirement(4); + freeInvSlot1 = new FreeInventorySlotRequirement(1); + searchChestForEmissaryRobes = new ObjectStep(this, ObjectID.VMQ3_CULTIST_OUTFIT_CHEST, new WorldPoint(1638, 3217, 0), "Search the chest in the south " + + "of the Tower of Ascension south of Salvager Overlook for some emissary robes.", freeInvSlots4); + searchChestForEmissaryRobes.addSubSteps(goToTempleWithAtes, goToTempleFromGorge, goToTempleFromSalvager); + searchChestForEmissaryRobes.addWidgetHighlight(new WidgetHighlight(InterfaceID.QuetzalMenu.ICONS, true).withModelRequirement(54546)); + ((ObjectStep) searchChestForEmissaryRobes).addTeleport(pendant); + enterTwilightTemple = new DetailedQuestStep(this, new WorldPoint(1687, 3247, 0), "Enter the temple south-east of Salvager Overlook.", + emissaryRobesEquipped); + + var goDownStairsTempleBaseStep = new ObjectStep(this, ObjectID.TWILIGHT_TEMPLE_STAIRS, new WorldPoint(1677, 3248, 0), "Go down the " + + "stairs in the temple. The passphrase is 'Final' and 'Dawn'.", List.of(emissaryRobesEquipped), List.of(combatWeapon, food)); + goDownStairsTempleBaseStep.addDialogSteps("Final.", "Dawn."); + goDownStairsTemple = new PuzzleWrapperStep(this, goDownStairsTempleBaseStep, + new ObjectStep(this, ObjectID.TWILIGHT_TEMPLE_STAIRS, new WorldPoint(1677, 3248, 0), "Go down the " + + "stairs in the temple. You'll need to guess the password.", List.of(emissaryRobesEquipped), List.of(combatWeapon, food))); + + enterBackroom = new ObjectStep(this, ObjectID.TWILIGHT_TEMPLE_METZLI_CHAMBER_ENTRY, new WorldPoint(1706, 9706, 0), "Enter the far eastern room. Avoid" + + " the patrolling guard."); + + searchBed = new ObjectStep(this, ObjectID.VMQ4_TEMPLE_BED_WITH_KEY, new WorldPoint(1713, 9698, 0), "Search the bed in the south room."); + openDrawers = new ObjectStep(this, ObjectID.VMQ4_TEMPLE_CANVAS_DRAW_1_CLOSED, new WorldPoint(1713, 9714, 0), "Open the drawers in the north room."); + ((ObjectStep) openDrawers).addAlternateObjects(ObjectID.VMQ4_TEMPLE_CANVAS_DRAW_1_OPEN); + openDrawers.conditionToHideInSidebar(isSouthDrawer); + + openDrawers2 = new ObjectStep(this, ObjectID.VMQ4_TEMPLE_CANVAS_DRAW_2_CLOSED, new WorldPoint(1709, 9700, 0), "Open the drawers in the same room."); + ((ObjectStep) openDrawers2).addAlternateObjects(ObjectID.VMQ4_TEMPLE_CANVAS_DRAW_2_OPEN); + openDrawers2.conditionToHideInSidebar(not(isSouthDrawer)); + useCanvasPieceOnPicture = new ObjectStep(this, ObjectID.TWILIGHT_TEMPLE_METZLI_PAINTING, new WorldPoint(1719, 9706, 0), "Use canvas piece on the " + + "painting in the east of the middle room of the eastern rooms.", canvasPiece.highlighted()); + useCanvasPieceOnPicture.addIcon(ItemID.VMQ4_PAINTING_SIGIL); + enterPassage = new ObjectStep(this, ObjectID.TWILIGHT_TEMPLE_METZLI_PAINTING, new WorldPoint(1719, 9706, 0), "Enter the passage behind the painting."); + enterPassage.addDialogSteps("Enter the passage."); + pickBlueChest = new ObjectStep(this, ObjectID.TWILIGHT_TEMPLE_METZLI_CHAMBER_CHEST_CLOSED, new WorldPoint(1723, 9709, 0), "Picklock the chest in the " + + "hidden room. Be ready for a fight afterwards."); + fightEnforcer = new NpcStep(this, NpcID.VMQ4_TEMPLE_GUARD_BOSS_FIGHT, new WorldPoint(1712, 9706, 0), "Defeat the enforcer. You cannot use prayers" + + ". Step away each time he goes to attack, and step behind him or sideways if he says 'Traitor!' or 'Thief!'."); + pickUpEmissaryScroll = new ItemStep(this, "Pick up the emissary scroll.", emissaryScroll); + readEmissaryScroll = new DetailedQuestStep(this, "Read the emissary scroll.", emissaryScroll.highlighted()); + + // Part 2 + climbStairsF0ToF1Palace = new ObjectStep(this, ObjectID.CIVITAS_PALACE_STAIRS_UP, new WorldPoint(1672, 3164, 0), "Go back to Civitas illa Fortis." + + "Climb up the stairs to the top of the Sunrise Palace to talk to the queen."); + climbStairsF0ToF1Palace.addTeleport(civitasTeleport); + climbStairsF1ToF2Palace = new ObjectStep(this, ObjectID.CIVITAS_PALACE_STAIRS_UP, new WorldPoint(1671, 3169, 1), "Climb up the stairs to the top of " + + "the Sunrise Palace to talk to the queen."); + talkToQueen = new NpcStep(this, NpcID.VMQ4_QUEEN_PALACE, new WorldPoint(1673, 3156, 2), "Talk to the queen on the top floor of the Sunrise Palace."); + talkToQueen.addSubSteps(climbStairsF0ToF1Palace, climbStairsF1ToF2Palace); + talkToCaptainVibia = new NpcStep(this, NpcID.VMQ4_CAPTAIN_VIBIA_OUTSIDE_HOUSE, new WorldPoint(1652, 3088, 0), "Talk to Captain Vibia south of Civitas" + + " illa Fortis' west bank."); + inspectWindow = new ObjectStep(this, ObjectID.VMQ4_CIVITAS_JANUS_WINDOW, new WorldPoint(1652, 3093, 0), "Inspect the window on the east side of the " + + "house north of Captain Vibia, and then enter it.", bone); + inspectWindow.addDialogSteps("Force open the window."); + var giveBonesOrMeatToDogNoPuzzleWrap = new NpcStep(this, NpcID.VMQ4_JANUS_DOG, new WorldPoint(1650, 3094, 0), "Use bones or some raw meat on the dog to calm it down" + + ".", bone.highlighted()); + giveBonesOrMeatToDogNoPuzzleWrap.addIcon(ItemID.BONES); + giveBonesOrMeatToDog = giveBonesOrMeatToDogNoPuzzleWrap.puzzleWrapStep("Work out how to calm down the dog."); + enterDoorCode = new ObjectStep(this, ObjectID.VMQ4_JANUS_HOUSE_PUZZLE_DOOR, new WorldPoint(1649, 3093, 0), "Pet the dog to see the code for the door." + + " Open the door using the code 'GUS'.").puzzleWrapStep("Work out the door code."); + openDoorWithGusCode = new ChestCodeStep(this, "GUS", 10, 0, 4, 0).puzzleWrapStep(true); + enterDoorCode.addSubSteps(openDoorWithGusCode); + takePotato = new ItemStep(this, "Pick up the sack of potatoes (3).", potatoes).puzzleWrapStep("Work out how to make a way to trap Janus and how to " + + "knock him out."); + removePotatoesFromSack = new DetailedQuestStep(this, "Empty the sack of potatoes.", potatoes.highlighted()).puzzleWrapStep(true); + var takeKnifeNoPuzzleWrapped = new ItemStep(this, "Pick up the knife.", knife); + takeKnife = takeKnifeNoPuzzleWrapped.puzzleWrapStep(true); + takeCoinPurse = new ItemStep(this, "Pick up the coin purse.", coinPurseFullOrEmpty).puzzleWrapStep(true); + + goToF1Hideout = new ObjectStep(this, ObjectID.FORTIS_WOODEN_SPIRALSTAIRS_BOTTOM, new WorldPoint(1647, 3091, 0), "Go upstairs.").puzzleWrapStep(true); + goDownFromF2Hideout = new ObjectStep(this, ObjectID.FORTIS_WOODEN_SPIRALSTAIRS_TOP, new WorldPoint(1647, 3091, 2), "Go downstairs.").puzzleWrapStep(true); + goF1ToF2Hideout = new ObjectStep(this, ObjectID.FORTIS_WOODEN_SPIRALSTAIRS_MIDDLE, new WorldPoint(1647, 3091, 1), "Go to the top floor.").puzzleWrapStep(true); + goF1ToF2Hideout.addDialogStep("Climb up."); + useKnifeOnPottedFan = new ObjectStep(this, ObjectID.VMQ4_JANUS_HOUSE_PLANT, new WorldPoint(1650, 3095, 2), "Use the knife on the inspectable potted " + + "fan.", knife.highlighted(), freeInvSlot1).puzzleWrapStep(true); + useKnifeOnPottedFan.addIcon(ItemID.KNIFE); + fillCoinPurse = new ObjectStep(this, ObjectID.VMQ4_JANUS_HOUSE_EMPTY_POT, new WorldPoint(1645, 3098, 2), "Use the empty coin purse on the plant pot " + + "in the north-west of the roof with sand in it.", coinPurseEmpty.highlighted()).puzzleWrapStep(true); + fillCoinPurse.addIcon(ItemID.VMQ4_JANUS_PURSE_EMPTY); + emptyCoinPurse = new DetailedQuestStep(this, "Empty the coin purse.", coinPurse.highlighted()).puzzleWrapStep(true); + useBranchOnCoinPurse = new DetailedQuestStep(this, "Use the branch on the coin purse.", branch.highlighted(), coinPurseWithSand.highlighted()).puzzleWrapStep(true); + + goToF0Hideout = new ObjectStep(this, ObjectID.FORTIS_WOODEN_SPIRALSTAIRS_MIDDLE, new WorldPoint(1647, 3091, 1), "Go to the ground floor.").puzzleWrapStep(true); + goToF0Hideout.addDialogStep("Climb down."); + takeKnifeNoPuzzleWrapped.addSubSteps(goToF0Hideout); + goToF0HideoutEnd = new ObjectStep(this, ObjectID.FORTIS_WOODEN_SPIRALSTAIRS_MIDDLE, new WorldPoint(1647, 3091, 1), "Go to the ground floor.").puzzleWrapStep(true); + goToF0HideoutEnd.addDialogStep("Climb down."); + + goF2ToF1HideoutEnd = new ObjectStep(this, ObjectID.FORTIS_WOODEN_SPIRALSTAIRS_TOP, new WorldPoint(1647, 3091, 2), "Go downstairs back to Vibia.").puzzleWrapStep(true); + var showSackToVibiaNotPuzzleWrapped = new NpcStep(this, NpcID.VMQ4_CAPTAIN_VIBIA_INSIDE_HOUSE, new WorldPoint(1651, 3094, 0), "Show Captain Vibia the empty sack and " + + "makeshift blackjack.", emptySack, makeshiftBlackjack); + showSackToVibiaNotPuzzleWrapped.addDialogStep("I'll get searching."); + showSackToVibia = showSackToVibiaNotPuzzleWrapped.puzzleWrapStep(true); + showSackToVibiaNotPuzzleWrapped.addSubSteps(goF2ToF1HideoutEnd, goToF0HideoutEnd); + + takePotato.addSubSteps(removePotatoesFromSack, takeKnife, takeCoinPurse, goToF1Hideout, goDownFromF2Hideout, goF1ToF2Hideout, useKnifeOnPottedFan, + fillCoinPurse, emptyCoinPurse, useBranchOnCoinPurse, goToF0Hideout, goToF0HideoutEnd, goF2ToF1HideoutEnd, showSackToVibia); + + searchBodyForKey = new NpcStep(this, NpcID.VMQ4_JANUS_HOUSE_JANUS_UNCONSCIOUS, new WorldPoint(1647, 3093, 0), "Search Janus."); + enterTrapdoor = new ObjectStep(this, ObjectID.VMQ4_JANUS_BASEMENT_ENTRY, new WorldPoint(1643, 3092, 0), "Enter the basement in the hideout."); + + talkToQueenToGoCamTorum = new NpcStep(this, NpcID.VMQ4_QUEEN_BASEMENT, new WorldPoint(1653, 9493, 0), "Talk to the queen in the hideout basement."); + talkToQueenToGoCamTorum.addDialogStep("Yes, let's go."); + enterCamTorum = new ObjectStep(this, ObjectID.PMOON_TELEBOX, new WorldPoint(1436, 3129, 0), "Enter Cam Torum."); + + talkToAttala = new NpcStep(this, NpcID.CAM_TORUM_ATTALA, new WorldPoint(1442, 9550, 1), "Talk to Attala in Cam Torum's marketplace."); + talkToServiusInCamTorum = new NpcStep(this, NpcID.VMQ4_SERVIUS_TEUMO_HOUSE, new WorldPoint(1466, 9570, 1), "Talk to Servius in the house east of the " + + "bank in Cam Torum."); + goUpstairsPub = new ObjectStep(this, ObjectID.STAIRS_IMCANDO01_LOWER01, new WorldPoint(1467, 9572, 1), "Go upstairs in the house."); + takeBeer = new ItemStep(this, "Take the beer. Hop worlds if it's missing.", beer); + goDownstairsPub = new ObjectStep(this, ObjectID.STAIRS_IMCANDO01_UPPER01, new WorldPoint(1468, 9572, 2), "Go downstairs in the house."); + useBeerOnGalna = new NpcStep(this, NpcID.VMQ4_TEUMO_WIFE, new WorldPoint(1466, 9570, 1), "Use the beer on Galna.", beer.highlighted()); + useBeerOnGalna.addIcon(ItemID.BEER); + enterCamTorumHouseBasement = new ObjectStep(this, ObjectID.VMQ4_TEUMO_HOUSE_STAIRS_DOWN, new WorldPoint(1470, 9571, 1), "Enter the house's basement."); + takeBeerCabinet = new ObjectStep(this, ObjectID.VMQ4_TEUMO_BASEMENT_SHELF, new WorldPoint(1464, 9569, 0), "Search the south-west cabinet for a beer.") + .puzzleWrapStep("Solve the puzzle in the basement."); + takeBeerCabinet.addDialogStep("Beer."); + drinkBeer = new DetailedQuestStep(this, "Drink a beer.", beer.highlighted()).puzzleWrapStep(true); + takeSteamforgeBrew = new ObjectStep(this, ObjectID.VMQ4_TEUMO_BASEMENT_SHELF, new WorldPoint(1464, 9569, 0), "Search the south-west cabinet for " + + "steamforge brew.").puzzleWrapStep(true); + takeSteamforgeBrew.addDialogSteps("More options...", "Steamforge brew."); + takeDwarvenStout = new ObjectStep(this, ObjectID.VMQ4_TEUMO_BASEMENT_SHELF, new WorldPoint(1464, 9569, 0), "Search the south-west cabinet for dwarven" + + " stout.").puzzleWrapStep(true); + takeDwarvenStout.addDialogSteps("Previous options...", "Dwarven stout."); + takeWizardsMindBomb = new ObjectStep(this, ObjectID.VMQ4_TEUMO_BASEMENT_SHELF, new WorldPoint(1464, 9569, 0), "Search the south-west cabinet for " + + "wizard's mind bomb.").puzzleWrapStep(true); + takeWizardsMindBomb.addDialogSteps("More options...", "Wizard's mind bomb."); + placeSteamforgedBrew = new ObjectStep(this, ObjectID.VMQ4_TEUMO_BASEMENT_BARREL_3, new WorldPoint(1464, 9568, 0), "Place steamforge brew on the " + + "south-west barrel.", steamforgedBrew.highlighted()).puzzleWrapStep(true); + placeSteamforgedBrew.addIcon(ItemID.STEAMFORGE_BREW); + placeDwarvenStout = new ObjectStep(this, ObjectID.VMQ4_TEUMO_BASEMENT_BARREL_4, new WorldPoint(1466, 9568, 0), "Place dwarven stout on the " + + "south barrel.", dwarvenStout.highlighted()).puzzleWrapStep(true); + placeDwarvenStout.addIcon(ItemID.DWARVEN_STOUT); + + var nonPuzzleTakeBeerFromBarrel = new ItemStep(this, new WorldPoint(1469, 9571, 0), "Take the beer from on top of the barrel near the staircase.", + beer); + nonPuzzleTakeBeerFromBarrel.setOnlyHighlightItemsOnTile(true); + takeBeerFromBarrel = nonPuzzleTakeBeerFromBarrel.puzzleWrapStep(true); + placeBeer = new ObjectStep(this, ObjectID.VMQ4_TEUMO_BASEMENT_BARREL_2, new WorldPoint(1466, 9573, 0), "Place beer on the " + + "north barrel.", beer.highlighted()).puzzleWrapStep(true); + placeBeer.addIcon(ItemID.BEER); + + placeEmptyGlass = new ObjectStep(this, ObjectID.VMQ4_TEUMO_BASEMENT_BARREL_1, new WorldPoint(1469, 9571, 0), "Place empty glass on the " + + "east barrel.", emptyGlass.highlighted()).puzzleWrapStep(true); + placeEmptyGlass.addIcon(ItemID.BEER_GLASS); + placeMindBomb = new ObjectStep(this, ObjectID.VMQ4_TEUMO_BASEMENT_BARREL_5, new WorldPoint(1471, 9567, 0), "Place wizard's mind bomb on the " + + "south-east barrel.", wizardsMindBomb.highlighted()).puzzleWrapStep(true); + placeMindBomb.addIcon(ItemID.WIZARDS_MIND_BOMB); + + takeBeerCabinet.addSubSteps(drinkBeer, takeSteamforgeBrew, takeDwarvenStout, takeWizardsMindBomb, placeSteamforgedBrew, placeDwarvenStout, + takeBeerFromBarrel, placeBeer, placeEmptyGlass, placeMindBomb); + + inspectFireplace = new ObjectStep(this, ObjectID.VMQ4_TEUMO_BASEMENT_FIRE_OUT, new WorldPoint(1463, 9571, 0), "Inspect the fireplace."); + inspectFireplace.addDialogStep("Pull it."); + useHole = new ObjectStep(this, ObjectID.VMQ4_TEUMO_BASEMENT_SECRET_PASSAGE_ENTRY, new WorldPoint(1470, 9565, 0), "Enter the hole in the south-east " + + "corner of the room."); + watchCutsceneCamTorum = new DetailedQuestStep(this, "Watch the cutscene with Ennius."); + returnThroughHole = new ObjectStep(this, ObjectID.VMQ4_TEUMO_BASEMENT_SECRET_PASSAGE_EXIT, new WorldPoint(1470, 9563, 0), "Go back through the hole " + + "into the Teumo's basement."); + returnToServius = new NpcStep(this, NpcID.VMQ4_SERVIUS_TEUMO_HOUSE_DOWNSTAIRS, new WorldPoint(1468, 9569, 0), "Talk to Servius in the house basement."); + + // Neypotzli section + climbUpFromTeumoBasement = new ObjectStep(this, ObjectID.VMQ4_TEUMO_HOUSE_STAIRS_UP, new WorldPoint(1468, 9573, 0), "Go to Neypotzli."); + enterNeypotzli = new ObjectStep(this, ObjectID.PMOON_TELEBOX, new WorldPoint(1439, 9600, 1), + "Enter the Neypotzli entrance in the far north of the cavern."); + enterNeypotzli.addSubSteps(climbUpFromTeumoBasement); + talkToEyatalli = new NpcStep(this, NpcID.VMQ4_EYATLALLI, new WorldPoint(1440, 9628, 1), + "Talk to Eyatlalli."); + + locateKeystone = new DetailedQuestStep(this, "Use the keystone fragment to locate the keystone.", keystoneFragment.highlighted()); + + enterStreamboundCavern = new ObjectStep(this, ObjectID.PMOON_TELEBOX_DIAGONAL, new WorldPoint(1458, 9650, 1), + "Enter the north-east entrance to the streambound cavern.").puzzleWrapStep(locateKeystone); + locateInStreambound = new TileStep(this, new WorldPoint(1511, 9702, 0), "Locate with the keystone fragment on the marked tile north of the " + + "cooking stove.", keystoneFragment.highlighted()).puzzleWrapStep(locateKeystone, true); + enterEarthboundCavernFromStreambound = new ObjectStep(this, ObjectID.PMOON_TELEBOX_CAVE, new WorldPoint(1522, 9720, 0), "Enter the earthbound cavern " + + "via the north cave entrance.", keystoneFragment).puzzleWrapStep(locateKeystone, true); + enterEarthboundCavern = new ObjectStep(this, ObjectID.PMOON_TELEBOX_DIAGONAL, new WorldPoint(1421, 9650, 1), + "Enter the north-west entrance.").puzzleWrapStep(locateKeystone, true); + enterEarthboundCavernFromStreambound.addSubSteps(enterEarthboundCavern); + locateInEarthbound = new DetailedQuestStep(this, new WorldPoint(1375, 9684, 0), "Locate with the keystone fragment on the marked tile near where you " + + "trap lizards.", + keystoneFragment.highlighted()).puzzleWrapStep(locateKeystone, true); + enterAncientPrison = new ObjectStep(this, ObjectID.PMOON_TELEBOX_DIAGONAL, new WorldPoint(1421, 9613, 1), + "Enter the south-west entrance.", keystoneFragment).puzzleWrapStep(locateKeystone, true); + enterAncientPrisonFromEarthbound = new ObjectStep(this, ObjectID.PMOON_TELEBOX_3X3, new WorldPoint(1374, 9665, 0), "Enter the ancient prison via the " + + "large entrance in the south-west of the area.", keystoneFragment).puzzleWrapStep(locateKeystone, true); + enterAncientPrisonFromEarthbound.addSubSteps(enterAncientPrison); + locateInAncientPrison = new DetailedQuestStep(this, new WorldPoint(1373, 9539, 0), "Locate with the keystone fragment on the marked tile in the " + + "south-east room with a statue.", keystoneFragment.highlighted()).puzzleWrapStep(locateKeystone, true); + touchGlowingSymbol = new ObjectStep(this, ObjectID.VMQ4_KEYSTONE_CHAMBER_ENTRANCE, new WorldPoint(1375, 9537, 0), "Touch the glowing symbol that " + + "appeared. Be ready for a fight.", combatGear); + defeatCultists = new NpcStep(this, NpcID.VMQ4_KEYSTONE_CHAMBER_BOSS_MAGIC, new WorldPoint(1364, 9514, 0), "Defeat the cultists. Step into golden " + + "circle to avoid the mage's special. Avoid the arrow barrage from the ranger. When you defeat one of the cultists, the other will become " + + "enraged.", true); + ((NpcStep) defeatCultists).addAlternateNpcs(NpcID.VMQ4_KEYSTONE_CHAMBER_BOSS_MAGIC_CS, NpcID.VMQ4_KEYSTONE_CHAMBER_BOSS_RANGED, + NpcID.VMQ4_KEYSTONE_CHAMBER_BOSS_RANGED_CS); + talkToAttalaAfterCultistFight = new NpcStep(this, NpcID.VMQ4_ATTALA_KEYSTONE_CHAMBER, new WorldPoint(1363, 9516, 0), "Talk to Attala."); + + talkToServiusAtTalTeklan = new NpcStep(this, NpcID.VMQ4_SERVIUS_VIS, new WorldPoint(1236, 3105, 0), "Talk to Servius in Tal Teklan in the " + + "Tlati Rainforest, in the north-west of Varlamore. The easiest way here is via quetzal.", List.of(combatGear, food, prayerPotions), List.of(rangedGear)); + talkToServiusAtTalTeklan.addWidgetHighlight(new WidgetHighlight(InterfaceID.QuetzalMenu.ICONS, true).withModelRequirement(56665)); + + enterTonaliCavern = new ObjectStep(this, ObjectID.VMQ4_CRYPT_OF_TONALI_ENTRY, new WorldPoint(1305, 3034, 0), "Enter the passageway in the" + + " tree south-east of Tal Teklan, into the Crypt of Tonali."); + defeatFinalCultists = new NpcStep(this, NpcID.VMQ4_CRYPT_ATTACKER_MELEE_VARIANT_1A, new WorldPoint(1312, 9355, 2), "Defeat the attacking cultists.", + true); + ((NpcStep) defeatFinalCultists).addAlternateNpcs(NpcID.VMQ4_CRYPT_ATTACKER_MELEE_VARIANT_1B, NpcID.VMQ4_CRYPT_ATTACKER_MELEE_VARIANT_2A, + NpcID.VMQ4_CRYPT_ATTACKER_MELEE_VARIANT_2B, NpcID.VMQ4_CRYPT_ATTACKER_MAGIC_VARIANT_1, NpcID.VMQ4_CRYPT_ATTACKER_MAGIC_VARIANT_2, + NpcID.VMQ4_CRYPT_ATTACKER_RANGED_VARIANT_1, NpcID.VMQ4_CRYPT_ATTACKER_RANGED_VARIANT_2); + fightEnnius = new NpcStep(this, NpcID.VMQ4_CRYPT_ENNIUS_BOSS, new WorldPoint(1336, 9355, 2), "Defeat Ennius. Protect from Melee. Stand on the " + + "circles to avoid damage when they appear. Avoid the lines of yellow star icons on the floor when they appear. When they reach 0 health, " + + "they'll gain some back and do more damage."); + tonaliGoDownStairsF2ToF1 = new ObjectStep(this, ObjectID.VMQ4_CRYPT_STAIRS_TOP_ENNIUS, new WorldPoint(1335, 9360, 2), "Climb down the stairs."); + tonaliGoDownStairsF1ToF0 = new ObjectStep(this, ObjectID.VMQ4_CRYPT_STAIRS_TOP_ENNIUS, new WorldPoint(1332, 9367, 1), "Climb down the stairs."); + tonaliGoDownStairsF2ToF1.addSubSteps(tonaliGoDownStairsF1ToF0); + useRedTeleporter = new ObjectStep(this, ObjectID.VMQ4_SUN_TELEPORT, new WorldPoint(1332, 9382, 0), "Step onto the red teleporter to the north-east."); + useBlueTeleporter = new ObjectStep(this, ObjectID.VMQ4_MOON_TELEPORT, new WorldPoint(1319, 9384, 1), "Step onto the blue teleporter to the west."); + + useRedTeleporter2 = new ObjectStep(this, ObjectID.VMQ4_SUN_TELEPORT, new WorldPoint(1303, 9389, 0), "Step on the red teleporter to the west."); + useBlueTeleporterLizards = new ObjectStep(this, ObjectID.VMQ4_MOON_TELEPORT, new WorldPoint(1293, 9394, 1), "Step onto the blue teleporter to the " + + "north-west."); + useRedTeleporter3 = new ObjectStep(this, ObjectID.VMQ4_SUN_TELEPORT, new WorldPoint(1296, 9402, 0), "Step on the red teleporter to the north."); + + + // Unused for now + crossLog = new ObjectStep(this, ObjectID.VMQ4_CRYPT_LOG_BALANCE_1, new WorldPoint(1302, 9398, 0), "Walk across the log balance to the north."); + useBlueTeleporter2 = new ObjectStep(this, ObjectID.VMQ4_MOON_TELEPORT, new WorldPoint(1315, 9409, 0), "Step onto the blue teleporter to the north."); + climbRope = new ObjectStep(this, ObjectID.VMQ4_CRYPT_SHORTCUT_2_BOTTOM, new WorldPoint(1308, 9420, 1), "Climb the rope up to the north-east."); + activateStrangePlatform = new ObjectStep(this, ObjectID.VMQ4_CRYPT_LIFT, new WorldPoint(1311, 9428, 2), "Inspect the strange platform nearby to " + + "activate a shortcut lift from the surface."); + enterTonaliWithLift = new ObjectStep(this, ObjectID.VMQ4_CRYPT_LIFT_SURFACE, new WorldPoint(1310, 3103, 0), "Go down the lift north of the Crypt of " + + "Tonali in the Tlati rainforest."); + enterTonaliCavern.addSubSteps(enterTonaliWithLift); + descendIntoSunPuzzle = new ObjectStep(this, ObjectID.VMQ4_SUN_TELEPORT, new WorldPoint(1316, 9446, 2), "Step on the red teleporter to the north-east " + + "of the lift."); + getEssenceFromUrns = new ObjectStep(this, ObjectID.VMQ4_SUN_PUZZLE_URN, new WorldPoint(1323, 9449, 1), "Search the urns in the area for some essence" + + ".", true).puzzleWrapStep(true); + inspectSunStatue = new ObjectStep(this, ObjectID.VMQ4_SUN_PUZZLE_STATUE, new WorldPoint(1330, 9446, 1), "Inspect the statue in the middle of the room.").puzzleWrapStep(true); + var solveSunPuzzleNoPuzzleWrap = new DetailedQuestStep(this, "Look at the pillar in the middle of the room. The first word " + + "indicates where to tell Itzla to stand, " + + "and the second word where you craft the essence." + + "1 is the north-east altar, and incrementing numbers rotate clockwise. The words mean the following numbers: \n Oma = 2\n" + + " Naui = 4\n" + + " Kuli = 5\n" + + " Chaki = 6\n" + + " Koma = 7\n" + + " Ueai = 8\n" + + " Makti = 10"); + solveSunPuzzle = solveSunPuzzleNoPuzzleWrap.puzzleWrapStep("Solve the sun puzzle."); + + // Can get the text from statue with `Messagebox.TEXT` + solveSunPuzzle1Step1MoveItzla = new NpcStep(this, NpcID.VMQ4_ITZLA_CRYPT_PUZZLE_SUN, new WorldPoint(1327, 9446, 1), "Tell Itzla to stand in the east" + + " of the room.").puzzleWrapStep(true); + solveSunPuzzle1Step1MoveItzla.addDialogSteps("Can you go to an altar for me?", "East.", "Previous options..."); + solveSunPuzzle1Step1Craft = new ObjectStep(this, ObjectID.VMQ4_SUN_ALTAR, new WorldPoint(1320, 9446, 1), "Imbue the essence on the west altar.", + essence).puzzleWrapStep(true); + + solveSunPuzzle1Step2MoveItzla = new NpcStep(this, NpcID.VMQ4_ITZLA_CRYPT_PUZZLE_SUN, new WorldPoint(1327, 9446, 1), "Tell Itzla to stand in the north" + + " of the room.").puzzleWrapStep(true); + solveSunPuzzle1Step2MoveItzla.addDialogSteps("Can you go to an altar for me?", "North.", "Previous options..."); + solveSunPuzzle1Step2Craft = new ObjectStep(this, ObjectID.VMQ4_SUN_ALTAR, new WorldPoint(1330, 9436, 1), "Imbue the essence on the south altar.", + essence).puzzleWrapStep(true); + + solveSunPuzzle1Step3MoveItzla = new NpcStep(this, NpcID.VMQ4_ITZLA_CRYPT_PUZZLE_SUN, new WorldPoint(1327, 9446, 1), "Tell Itzla to stand in the " + + "north-west of the room.").puzzleWrapStep(true); + solveSunPuzzle1Step3MoveItzla.addDialogSteps("Can you go to an altar for me?", "North west.", "More options..."); + solveSunPuzzle1Step3Craft = new ObjectStep(this, ObjectID.VMQ4_SUN_ALTAR, new WorldPoint(1322, 9438, 1), "Imbue the essence on the south-west altar.", + essence).puzzleWrapStep(true); + + solveSunPuzzle2Step1MoveItzla = new NpcStep(this, NpcID.VMQ4_ITZLA_CRYPT_PUZZLE_SUN, new WorldPoint(1327, 9446, 1), "Tell Itzla to stand in the north" + + " of the room.").puzzleWrapStep(true); + solveSunPuzzle2Step1MoveItzla.addDialogSteps("Can you go to an altar for me?", "North.", "Previous options..."); + solveSunPuzzle2Step1Craft = new ObjectStep(this, ObjectID.VMQ4_SUN_ALTAR, new WorldPoint(1330, 9436, 1), "Imbue the essence on the south altar.", + essence).puzzleWrapStep(true); + + solveSunPuzzle2Step2MoveItzla = new NpcStep(this, NpcID.VMQ4_ITZLA_CRYPT_PUZZLE_SUN, new WorldPoint(1327, 9446, 1), "Tell Itzla to stand in the east" + + " of the room.").puzzleWrapStep(true); + solveSunPuzzle2Step2MoveItzla.addDialogSteps("Can you go to an altar for me?", "East.", "Previous options..."); + solveSunPuzzle2Step2Craft = new ObjectStep(this, ObjectID.VMQ4_SUN_ALTAR, new WorldPoint(1320, 9446, 1), "Imbue the essence on the west altar.", + essence).puzzleWrapStep(true); + + solveSunPuzzle2Step3MoveItzla = new NpcStep(this, NpcID.VMQ4_ITZLA_CRYPT_PUZZLE_SUN, new WorldPoint(1327, 9446, 1), "Tell Itzla to stand in the " + + "north-west of the room.").puzzleWrapStep(true); + solveSunPuzzle2Step3MoveItzla.addDialogSteps("Can you go to an altar for me?", "North west.", "More options..."); + solveSunPuzzle2Step3Craft = new ObjectStep(this, ObjectID.VMQ4_SUN_ALTAR, new WorldPoint(1322, 9438, 1), "Imbue the essence on the south-west altar.", + essence).puzzleWrapStep(true); + solveSunPuzzleNoPuzzleWrap.addSubSteps(inspectSunStatue, solveSunPuzzle1Step1MoveItzla, solveSunPuzzle1Step1Craft, solveSunPuzzle1Step2MoveItzla, solveSunPuzzle1Step2Craft, + solveSunPuzzle1Step3MoveItzla, solveSunPuzzle1Step3Craft, solveSunPuzzle2Step1Craft, solveSunPuzzle2Step1MoveItzla, + solveSunPuzzle2Step2MoveItzla, solveSunPuzzle2Step2Craft, solveSunPuzzle2Step3MoveItzla, solveSunPuzzle2Step3Craft); + solveSunPuzzle.addSubSteps(inspectSunStatue, solveSunPuzzle1Step1MoveItzla, solveSunPuzzle1Step1Craft, solveSunPuzzle1Step2MoveItzla, solveSunPuzzle1Step2Craft, + solveSunPuzzle1Step3MoveItzla, solveSunPuzzle1Step3Craft, solveSunPuzzle2Step1Craft, solveSunPuzzle2Step1MoveItzla, + solveSunPuzzle2Step2MoveItzla, solveSunPuzzle2Step2Craft, solveSunPuzzle2Step3MoveItzla, solveSunPuzzle2Step3Craft); + + goUpFromSunPuzzle = new ObjectStep(this, ObjectID.VMQ4_SUN_TELEPORT, new WorldPoint(1323, 9443, 1), "Go back up to the main area."); + enterMoonPuzzle = new ObjectStep(this, ObjectID.VMQ4_MOON_TELEPORT, new WorldPoint(1304, 9446, 2), "Go through the blue teleport to the west."); + + moveItzlaNorth = new ObjectStep(this, ObjectID.VMQ4_MOON_PUZZLE_PLATFORM_1, new WorldPoint(1298, 9448, 1), "Move-Itzla to the platform north of him " + + "by clicking on it to see which torches around the room light up."); + moveItzlaSouth = new ObjectStep(this, ObjectID.VMQ4_MOON_PUZZLE_PLATFORM_2, new WorldPoint(1298, 9444, 1), "Move-Itzla to the platform south of him " + + "by clicking on it to see which torches around the room light up."); + pullTreeRoots = new ObjectStep(this, ObjectID.VMQ4_MOON_PUZZLE_ROOT, new WorldPoint(1285, 9452, 1), "Pull some tree roots.", true) + .puzzleWrapStep("Solve the moon puzzle."); + getKnifeBlade = new ObjectStep(this, ObjectID.VMQ4_MOON_PUZZLE_OLD_TOOLS, new WorldPoint(1292, 9457, 1), + "Search the old tools for a knife blade. Avoid the lines of fire by having Itzla go on the north platform to remove dark flames, and the " + + "south one for light flames.").puzzleWrapStep(true); + fletchRoots = new DetailedQuestStep(this, "Fletch the roots into kindling.", roots.highlighted()).puzzleWrapStep(true); + placeRoots = new ObjectStep(this, ObjectID.VMQ4_MOON_PUZZLE_STATUE, new WorldPoint(1283, 9446, 1), "Have Itzla move between both the north and south " + + "platforms to see how many braziers are lit around the room total. Put that many into the statue.", kindling).puzzleWrapStep(true); + repeatMoonPuzzleThreeTimes = new DetailedQuestStep(this, "Repeat the kindling burning matching the total braziers lit two more times.").puzzleWrapStep(true); + pullTreeRoots.addSubSteps(moveItzlaNorth, moveItzlaSouth, pullTreeRoots, getKnifeBlade, fletchRoots, placeRoots, repeatMoonPuzzleThreeTimes); + leaveMoonPuzzleRoom = new ObjectStep(this, ObjectID.VMQ4_MOON_TELEPORT, new WorldPoint(1299, 9455, 1), "Leave the moon puzzle room."); + + enterFinalBossArea = new ObjectStep(this, ObjectID.VMQ4_CRYPT_DOOR_TO_MOKI, new WorldPoint(1311, 9468, 2), "Try to open the door to the " + + "north. Be ready for the final boss!", rangedGear); + approachMetzli = new NpcStep(this, NpcID.VMQ4_CRYPT_METZLI_NOOPS, new WorldPoint(1311, 9497, 1), "Approach Augur Metzli, ready for a fight."); + defeatFinalBoss = new NpcStep(this, NpcID.VMQ4_METZLI_BOSS, new WorldPoint(1311, 9497, 1), "Defeat Metzli. Read the sidebar for more details."); + defeatFinalBossSidebar = new NpcStep(this, NpcID.VMQ4_METZLI_BOSS, new WorldPoint(1311, 9497, 1), "Defeat Metzli." + + "\n\nStart with Protect from Missiles." + + "\n\nUse the gaps in the wave attacks to dodge the walls as they approach. " + + "\n\nIf circles appear, stand where they appeared." + + "\n\nEvery time a teleporter appears to jump over a wave, the boss will switch attack styles alternating between mage and ranged. " + + "\n\nThe boss will enter an enrage phase, it is much easier to range but melee is still possible. " + + "\n\nAttack the boss and then immediately click on the next teleporter to avoid taking damage."); + defeatFinalBossSidebar.addSubSteps(defeatFinalBoss); + + watchFinalBossAfterCutscene = new NpcStep(this, NpcID.VMQ4_MOKI_METZLI_FIGHT_DEFEATED_NOOPS, new WorldPoint(1311, 9497, 1), "Watch Metzli's cutscene."); + + goToNorthOfFinalAreaAgilityShortcut = new ObjectStep(this, ObjectID.MOKI_ENTRANCE_TO_DOM_BOSS, new WorldPoint(1311, 9533, 1), "Enter the entrance in the north of " + + "the area."); + ((ObjectStep) goToNorthOfFinalAreaAgilityShortcut).setLinePoints(List.of( + new WorldPoint(1310, 9497, 1), + new WorldPoint(1310, 9510, 1), + new WorldPoint(1310, 9520, 1), + new WorldPoint(1311, 9531, 1) + )); + + goToNorthOfFinalArea = new ObjectStep(this, ObjectID.MOKI_ENTRANCE_TO_DOM_BOSS, new WorldPoint(1311, 9533, 1), "Enter the entrance in the north of " + + "the area."); + ((ObjectStep) goToNorthOfFinalArea).setLinePoints(List.of( + new WorldPoint(1310, 9497, 1), + new WorldPoint(1304, 9497, 1), + new WorldPoint(1300, 9497, 0), + new WorldPoint(1287, 9497, 0), + new WorldPoint(1283, 9497, 1), + new WorldPoint(1283, 9513, 1), + new WorldPoint(1311, 9513, 1), + new WorldPoint(1311, 9531, 1) + )); + goToNorthOfFinalArea.addSubSteps(goToNorthOfFinalAreaAgilityShortcut); + + inspectRanulPillar = new ObjectStep(this, ObjectID.VMQ4_MOKI_MEMORIAL_RANUL, new WorldPoint(1317, 9527, 1), "Inspect the ranul pillar south-east " + + "of the north door."); + inspectRalosPillar = new ObjectStep(this, ObjectID.VMQ4_MOKI_MEMORIAL_RALOS, new WorldPoint(1304, 9527, 1), "Inspect the ralos pillar " + + "south-west of the north door."); + inspectDoor = new ObjectStep(this, ObjectID.MOKI_ENTRANCE_TO_DOM_BOSS, new WorldPoint(1311, 9533, 1), "Inspect the entrance in the north of " + + "the area again."); + inspectSkeleton = new ObjectStep(this, ObjectID.VMQ4_MOKI_SKELETON_TABLET, new WorldPoint(1307, 9532, 1), "Inspect the skeleton west of the north " + + "door."); + readStoneTablet = new DetailedQuestStep(this, "Read the stone tablet.", stoneTablet.highlighted()); + + finishQuest = new NpcStep(this, NpcID.VMQ4_ITZLA_CRYPT_DONE, new WorldPoint(1315, 9355, 2), "Talk to Prince Itzla Arkan to complete the quest!"); + } + + @Override + public List getItemRequirements() + { + return List.of( + bone, combatGear + ); + } + + @Override + public List getItemRecommended() + { + return List.of( + rangedGear, food, prayerPotions, pendant, whistle, civitasTeleport + ); + } + + @Override + public List getGeneralRequirements() + { + return List.of( + new QuestRequirement(QuestHelperQuest.THE_HEART_OF_DARKNESS, QuestState.FINISHED), + new QuestRequirement(QuestHelperQuest.PERILOUS_MOON, QuestState.FINISHED), + new SkillRequirement(Skill.THIEVING, 66), + new SkillRequirement(Skill.FLETCHING, 52), + new SkillRequirement(Skill.RUNECRAFT, 52) + ); + } + + @Override + public List getCombatRequirements() + { + return List.of( + "Emissary Enforcer (lvl-196)", + "Chimalli (lvl-160) and Lucius (lvl-160)", + "Multiple waves of Twilight Emissaries (lvl-70 to lvl-90)", + "Ennius Tullus (lvl-306)", + "Augur Metzli (lvl-396)" + ); + } + + @Override + public QuestPointReward getQuestPointReward() + { + return new QuestPointReward(3); + } + + @Override + public List getExperienceRewards() + { + return List.of( + new ExperienceReward(Skill.THIEVING, 55000), + new ExperienceReward(Skill.FLETCHING, 25000), + new ExperienceReward(Skill.RUNECRAFT, 25000) + ); + } + + @Override + public List getUnlockRewards() + { + return List.of( + new UnlockReward("The Arkan Blade"), + new UnlockReward("Access to Mokhaiotl"), + new UnlockReward("Access to Crypt of Tonali") + ); + } + + @Override + public List getItemRewards() + { + return Arrays.asList( + new ItemReward("55,000 Experience Lamps (Combat Skills)", ItemID.VMQ4_REWARD_LAMP, 1), + new ItemReward("Arkan blade", ItemID.ARKAN_BLADE) + ); + } + + @Override + public List getPanels() + { + var panels = new ArrayList(); + + panels.add(new PanelDetails("Starting off", List.of( + startQuest, searchChestForEmissaryRobes, enterTwilightTemple, goDownStairsTemple, enterBackroom, searchBed, openDrawers, openDrawers2, + useCanvasPieceOnPicture, enterPassage, pickBlueChest, fightEnforcer, pickUpEmissaryScroll, readEmissaryScroll + ), List.of( + combatWeapon, food + ), List.of( + civitasTeleport + ))); + panels.add(new PanelDetails("The hideout", List.of(talkToQueen, talkToCaptainVibia, inspectWindow, giveBonesOrMeatToDog, enterDoorCode, takePotato, + takeKnife, goToF1Hideout, takeCoinPurse, goF1ToF2Hideout, useKnifeOnPottedFan, fillCoinPurse, useBranchOnCoinPurse, showSackToVibia, + searchBodyForKey, enterTrapdoor, talkToQueenToGoCamTorum), + List.of(bone), + List.of())); + panels.add(new PanelDetails("The dwarves", List.of(enterCamTorum, talkToAttala, talkToServiusInCamTorum, goUpstairsPub, takeBeer, goDownstairsPub, + useBeerOnGalna, enterCamTorumHouseBasement, takeWizardsMindBomb, placeMindBomb, takeBeerCabinet, + placeBeer, takeSteamforgeBrew, placeSteamforgedBrew, takeDwarvenStout, placeDwarvenStout,takeBeerFromBarrel, drinkBeer, placeEmptyGlass, + inspectFireplace, useHole, watchCutsceneCamTorum, returnThroughHole, returnToServius), + List.of(), + List.of())); + panels.add(new PanelDetails("Ancient keys", List.of(enterNeypotzli, talkToEyatalli, enterStreamboundCavern, locateInStreambound, + enterEarthboundCavernFromStreambound, locateInEarthbound, enterAncientPrisonFromEarthbound, locateInAncientPrison, touchGlowingSymbol, + defeatCultists, talkToAttalaAfterCultistFight), + List.of(combatGear, food, prayerPotions))); + + panels.add(new PanelDetails("Crypt of Tonali", List.of(talkToServiusAtTalTeklan, enterTonaliCavern, defeatFinalCultists, fightEnnius, + tonaliGoDownStairsF2ToF1, useRedTeleporter, useBlueTeleporter, useRedTeleporter2, useBlueTeleporterLizards, useRedTeleporter3, climbRope, + activateStrangePlatform, descendIntoSunPuzzle, inspectSunStatue, getEssenceFromUrns, solveSunPuzzle, goUpFromSunPuzzle, enterMoonPuzzle, + moveItzlaNorth, moveItzlaSouth, pullTreeRoots, getKnifeBlade, fletchRoots, placeRoots, repeatMoonPuzzleThreeTimes, leaveMoonPuzzleRoom), + List.of(combatGear, food, prayerPotions))); + + panels.add(new PanelDetails("Doom", List.of(enterFinalBossArea, approachMetzli, defeatFinalBossSidebar, watchFinalBossAfterCutscene, + goToNorthOfFinalArea, inspectRalosPillar, inspectRanulPillar, inspectDoor, inspectSkeleton, readStoneTablet, finishQuest), + List.of(rangedGear, food, prayerPotions))); + return panels; + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theforsakentower/JugPuzzle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theforsakentower/JugPuzzle.java index 83ba01e4ae6..d2142ed6bc6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theforsakentower/JugPuzzle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theforsakentower/JugPuzzle.java @@ -44,6 +44,7 @@ import net.runelite.api.gameval.InterfaceID; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.widgets.Widget; import net.runelite.client.eventbus.EventBus; import net.runelite.client.eventbus.Subscribe; @@ -254,7 +255,7 @@ private void setupZones() private void setupConditions() { missingTinderbox = new ItemRequirements(LogicType.NAND, tinderbox); - hasFilledWithFuel = new VarbitRequirement(7798, 3); + hasFilledWithFuel = new VarbitRequirement(VarbitID.LOVAQUEST_FURNACE, 3); inFirstFloor = new ZoneRequirement(firstFloor); inSecondFloor = new ZoneRequirement(secondFloor); inBasement = new ZoneRequirement(basement); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theforsakentower/PotionPuzzle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theforsakentower/PotionPuzzle.java index fe26de7433a..7fc3d96fb4f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theforsakentower/PotionPuzzle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theforsakentower/PotionPuzzle.java @@ -40,6 +40,7 @@ import net.runelite.api.gameval.InterfaceID; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.widgets.Widget; import net.runelite.client.eventbus.EventBus; import net.runelite.client.eventbus.Subscribe; @@ -195,8 +196,8 @@ private void setupConditions() inSecondFloor = new ZoneRequirement(secondFloor); inBasement = new ZoneRequirement(basement); - triedToActivate = new VarbitRequirement(7799, 2); - cleanedRefinery = new VarbitRequirement(7799, 3); + triedToActivate = new VarbitRequirement(VarbitID.LOVAQUEST_REFINERY, 2); + cleanedRefinery = new VarbitRequirement(VarbitID.LOVAQUEST_REFINERY, 3); hasFluids = new Requirement[]{null, fluid1, fluid2, fluid3, fluid4, fluid5 }; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theforsakentower/PowerPuzzle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theforsakentower/PowerPuzzle.java index d8348a91a4a..60bd53c1f80 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theforsakentower/PowerPuzzle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theforsakentower/PowerPuzzle.java @@ -29,6 +29,7 @@ import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; import net.runelite.api.events.VarbitChanged; import net.runelite.api.gameval.InterfaceID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.widgets.Widget; import net.runelite.client.eventbus.Subscribe; @@ -70,14 +71,14 @@ private void updateSolvedPositionState() { for (int i=0; i < 36; i++) { - int currentPos = client.getVarbitValue(7811+i); + int currentPos = client.getVarbitValue(VarbitID.LOVAQUEST_POWER_GRID_A1 + i); if (solvedPositions[i] == 4) { currentPositionCorrect[i] = currentPos == 0 || currentPos == 2; } else { - currentPositionCorrect[i] = client.getVarbitValue(7811 + i) == solvedPositions[i]; + currentPositionCorrect[i] = client.getVarbitValue(VarbitID.LOVAQUEST_POWER_GRID_A1 + i) == solvedPositions[i]; } } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theforsakentower/TheForsakenTower.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theforsakentower/TheForsakenTower.java index a12f42a2992..bb7aacbcaa5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theforsakentower/TheForsakenTower.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theforsakentower/TheForsakenTower.java @@ -135,11 +135,11 @@ public void setupConditions() inSecondFloor = new ZoneRequirement(secondFloor); inBasement = new ZoneRequirement(basement); - inspectedDisplayCase = new VarbitRequirement(7804, 1); - finishedPowerPuzzle = new VarbitRequirement(7797, 4); - finishedFurnacePuzzle = new VarbitRequirement(7798, 4); - finishedPotionPuzzle = new VarbitRequirement(7799, 4); - finishedAltarPuzzle = new VarbitRequirement(7800, 2); + inspectedDisplayCase = new VarbitRequirement(VarbitID.LOVAQUEST_FOUNDHAMMER, 1); + finishedPowerPuzzle = new VarbitRequirement(VarbitID.LOVAQUEST_ELECTRICITY, 4); + finishedFurnacePuzzle = new VarbitRequirement(VarbitID.LOVAQUEST_FURNACE, 4); + finishedPotionPuzzle = new VarbitRequirement(VarbitID.LOVAQUEST_REFINERY, 4); + finishedAltarPuzzle = new VarbitRequirement(VarbitID.LOVAQUEST_ALTAR, 2); generatorStarted = new VarbitRequirement(VarbitID.LOVAQUEST_ELECTRICITY, 2, Operation.GREATER_EQUAL); powerPuzzleVisible = new WidgetModelRequirement(624, 2, 0, 36246); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefremennikexiles/TheFremennikExiles.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefremennikexiles/TheFremennikExiles.java index 8611edce08e..e43e810233f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefremennikexiles/TheFremennikExiles.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefremennikexiles/TheFremennikExiles.java @@ -53,7 +53,6 @@ import net.runelite.api.Prayer; import net.runelite.api.QuestState; import net.runelite.api.Skill; -import net.runelite.api.Varbits; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; @@ -244,7 +243,7 @@ protected void setupRequirements() sealOfPassage = new ItemRequirement("Seal of passage", ItemID.LUNAR_SEAL_OF_PASSAGE).isNotConsumed(); sealOfPassageOrEliteDiary = ComplexRequirementBuilder.or("Seal of Passage") - .with(new VarbitRequirement(Varbits.DIARY_FREMENNIK_ELITE, 1)) + .with(new VarbitRequirement(VarbitID.FREMENNIK_DIARY_ELITE_COMPLETE, 1)) .with(sealOfPassage) .build(); @@ -281,17 +280,17 @@ protected void setupRequirements() // Quest events younglingNearby = new NpcCondition(NpcID.VIKINGEXILE_YOUNGLING); letterNearby = new ItemOnTileRequirement(letter); - killedYoungling = new VarbitRequirement(9460, 1); - hasReadLetter = new VarbitRequirement(9461, 1); + killedYoungling = new VarbitRequirement(VarbitID.VIKINGEXILE_YOUNGLING_KILLED, 1); + hasReadLetter = new VarbitRequirement(VarbitID.VIKINGEXILE_LETTER_READ, 1); // 9468 = 1, youngling popped out first time askedAboutShield = new VarbitRequirement(VarbitID.VIKINGEXILE_SHIELD_INFO, 1, Operation.GREATER_EQUAL); askedAboutGlass = new VarbitRequirement(VarbitID.VIKINGEXILE_GLASS_INFO, 1, Operation.GREATER_EQUAL); askedAboutRock = new VarbitRequirement(VarbitID.VIKINGEXILE_ROCK_INFO, 1, Operation.GREATER_EQUAL); askedAboutSigil = new VarbitRequirement(VarbitID.VIKINGEXILE_SIGIL_INFO, 1, Operation.GREATER_EQUAL); askedAboutAllShieldParts = new Conditions(askedAboutShield, askedAboutGlass, askedAboutRock, askedAboutSigil); - triedToThrowRockIntoGeyser = new VarbitRequirement(9464, 2); - talkedToPeer = new VarbitRequirement(9464, 3); - rockInGeyser = new VarbitRequirement(9470, 1); + triedToThrowRockIntoGeyser = new VarbitRequirement(VarbitID.VIKINGEXILE_ROCK_INFO, 2); + talkedToPeer = new VarbitRequirement(VarbitID.VIKINGEXILE_ROCK_INFO, 3); + rockInGeyser = new VarbitRequirement(VarbitID.VIKINGEXILE_ROCK_GONE, 1); // been given shield, 9471 = 1 // Fighting basilisks, 9466 0-30 for 0-100% // Zone checks diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefremennikisles/KillTrolls.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefremennikisles/KillTrolls.java index db9b3d74145..8ece88da9a6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefremennikisles/KillTrolls.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefremennikisles/KillTrolls.java @@ -5,6 +5,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; import net.runelite.api.gameval.NpcID; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.Subscribe; public class KillTrolls extends NpcStep @@ -23,7 +24,7 @@ public void onGameTick(GameTick event) protected void updateSteps() { - int numToKill = client.getVarbitValue(3312); + int numToKill = client.getVarbitValue(VarbitID.FRIS_TASK); this.setText("Kill " + numToKill + " trolls to continue."); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefremennikisles/TheFremennikIsles.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefremennikisles/TheFremennikIsles.java index 086be2c2e9c..9eeb50b5f38 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefremennikisles/TheFremennikIsles.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefremennikisles/TheFremennikIsles.java @@ -54,6 +54,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -63,7 +64,8 @@ public class TheFremennikIsles extends BasicQuestHelper { //Items Required - ItemRequirement tuna, mithrilOre, coal, tinOre, jesterHat, jesterTights, jesterTop, jesterBoots, arcticLogs8, splitLogs8, + ItemRequirement tuna, mithrilOre, coal, tinOre, jesterHat, jesterTights, jesterTop, jesterBoots, equipJesterHat, + equipJesterTights, equipJesterTop, equipJesterBoots, arcticLogs8, splitLogs8, knife, rope8, rope4, splitLogs4, yakTop, yakBottom, royalDecree, roundShield, yakTopWorn, yakBottomWorn, shieldWorn, meleeWeapon, food, head, needle, thread, coins15, bronzeNail, hammer, rope, axe, rope9; @@ -312,10 +314,14 @@ protected void setupRequirements() tinOre = new ItemRequirement("Tin ore", ItemID.TIN_ORE, 8).showConditioned(useTin); tinOre.setTooltip("You can mine some in the underground mine north west of Jatizso."); - jesterHat = new ItemRequirement("Silly jester hat", ItemID.FRISD_JESTER_HAT, 1, true); - jesterTop = new ItemRequirement("Silly jester body", ItemID.FRISD_JESTER_TOP, 1, true); - jesterTights = new ItemRequirement("Silly jester tights", ItemID.FRISD_JESTER_LEGS, 1, true); - jesterBoots = new ItemRequirement("Silly jester boots", ItemID.FRISD_JESTER_BOOTS, 1, true); + jesterHat = new ItemRequirement("Silly jester hat", ItemID.FRISD_JESTER_HAT); + jesterTop = new ItemRequirement("Silly jester body", ItemID.FRISD_JESTER_TOP); + jesterTights = new ItemRequirement("Silly jester tights", ItemID.FRISD_JESTER_LEGS); + jesterBoots = new ItemRequirement("Silly jester boots", ItemID.FRISD_JESTER_BOOTS); + equipJesterHat = jesterHat.equipped(); + equipJesterTop = jesterTop.equipped(); + equipJesterTights = jesterTights.equipped(); + equipJesterBoots = jesterBoots.equipped(); arcticLogs8 = new ItemRequirement("Arctic pine logs", ItemID.ARCTIC_PINE_LOG, 8); splitLogs8 = new ItemRequirement("Split log", ItemID.ARCTIC_PINE_SPLIT, 8); splitLogs4 = new ItemRequirement("Split log", ItemID.ARCTIC_PINE_SPLIT, 4); @@ -397,18 +403,18 @@ public void setupConditions() inTrollCave = new ZoneRequirement(trollCave); inKingCave = new ZoneRequirement(kingCave); hasJesterOutfit = new ItemRequirements(jesterBoots, jesterHat, jesterTights, jesterTop); - jestering1 = new VarbitRequirement(6719, 2); - repairedBridge1 = new VarbitRequirement(3313, 1); - repairedBridge2 = new VarbitRequirement(3314, 1); - - collectedHring = new VarbitRequirement(3321, 1); - collectedSkuli = new VarbitRequirement(3320, 1); - collectedValigga = new VarbitRequirement(3324, 1); - collectedKeepa = new VarbitRequirement(3325, 1); - collectedRaum = new VarbitRequirement(3323, 1); - collectedFlosi = new VarbitRequirement(3322, 1); - - killedTrolls = new VarbitRequirement(3312, 0); + jestering1 = new VarbitRequirement(VarbitID.MINIMAP_STATE, 2); + repairedBridge1 = new VarbitRequirement(VarbitID.FRIS_M_B3, 1); + repairedBridge2 = new VarbitRequirement(VarbitID.FRIS_M_B4, 1); + + collectedHring = new VarbitRequirement(VarbitID.FRISD_OREMERCHANT_TAXCOLLECTED, 1); + collectedSkuli = new VarbitRequirement(VarbitID.FRISD_WEAPONMERCHANT_TAXCOLLECTED, 1); + collectedValigga = new VarbitRequirement(VarbitID.FRISD_PUB_TAXCOLLECTED, 1); + collectedKeepa = new VarbitRequirement(VarbitID.FRISD_COOK_TAXCOLLECTED, 1); + collectedRaum = new VarbitRequirement(VarbitID.FRISD_ARMOURMERCHANT_TAXCOLLECTED, 1); + collectedFlosi = new VarbitRequirement(VarbitID.FRISD_FISHMONGER_TAXCOLLECTED, 1); + + killedTrolls = new VarbitRequirement(VarbitID.FRIS_TASK, 0); } public void setupSteps() @@ -430,7 +436,7 @@ public void setupSteps() returnToRellekkaFromJatizso = new NpcStep(this, NpcID.FRIS_R_FERRYMAN_IZSO, new WorldPoint(2420, 3781, 0), "Return to Rellekka with Mord."); returnToRellekkaFromJatizso.addDialogStep("Can you ferry me to Rellekka?"); - talkToSlug = new NpcStep(this, NpcID.FRIS_SPYMASTER, new WorldPoint(2335, 3811, 0), "Talk to Slug Hemligssen wearing nothing but your Silly Jester outfit.", jesterHat, jesterTop, jesterTights, jesterBoots); + talkToSlug = new NpcStep(this, NpcID.FRIS_SPYMASTER, new WorldPoint(2335, 3811, 0), "Talk to Slug Hemligssen wearing nothing but your Silly Jester outfit.", equipJesterHat, equipJesterTop, equipJesterTights, equipJesterBoots); talkToSlug.addSubSteps(returnToRellekkaFromJatizso, travelToNeitiznot); talkToSlug.addDialogStep("Free stuff please."); talkToSlug.addDialogStep("I am ready."); @@ -442,7 +448,7 @@ public void setupSteps() getJesterOutfit.addDialogStep("Take the jester's boots."); performForMawnis = new DetailedQuestStep(this, "Perform the actions that Mawnis requests of you."); - goSpyOnMawnis = new NpcStep(this, NpcID.FRIS_R_BURGHER_CROWN, new WorldPoint(2335, 3800, 0), "Talk to Mawnis in Neitiznot to start spying on him.", jesterHat, jesterTop, jesterTights, jesterBoots); + goSpyOnMawnis = new NpcStep(this, NpcID.FRIS_R_BURGHER_CROWN, new WorldPoint(2335, 3800, 0), "Talk to Mawnis in Neitiznot to start spying on him.", equipJesterHat, equipJesterTop, equipJesterTights, equipJesterBoots); goSpyOnMawnis.addSubSteps(performForMawnis); tellSlugReport1 = new NpcStep(this, NpcID.FRIS_SPYMASTER, new WorldPoint(2335, 3811, 0), "Report back to Slug Hemligssen."); @@ -501,12 +507,12 @@ public void setupSteps() travelToNeitiznotToSpyAgain = new NpcStep(this, NpcID.FRIS_R_FERRY_RELLIKKA, new WorldPoint(2644, 3710, 0), "Travel to Neitiznot with Maria Gunnars."); returnToRellekkaFromJatizsoToSpyAgain = new NpcStep(this, NpcID.FRIS_R_FERRYMAN_IZSO, new WorldPoint(2420, 3781, 0), "Return to Rellekka with Mord."); returnToRellekkaFromJatizsoToSpyAgain.addDialogStep("Can you ferry me to Rellekka?"); - talkToSlugToSpyAgain = new NpcStep(this, NpcID.FRIS_SPYMASTER, new WorldPoint(2335, 3811, 0), "Talk to Slug Hemligssen wearing nothing but your Silly Jester outfit.", jesterHat, jesterTop, jesterTights, jesterBoots); + talkToSlugToSpyAgain = new NpcStep(this, NpcID.FRIS_SPYMASTER, new WorldPoint(2335, 3811, 0), "Talk to Slug Hemligssen wearing nothing but your Silly Jester outfit.", equipJesterHat, equipJesterTop, equipJesterTights, equipJesterBoots); talkToSlugToSpyAgain.addSubSteps(travelToNeitiznotToSpyAgain, returnToRellekkaFromJatizsoToSpyAgain); performForMawnisAgain = new DetailedQuestStep(this, "Perform the actions that Mawnis requests of you."); - goSpyOnMawnisAgain = new NpcStep(this, NpcID.FRIS_R_BURGHER_CROWN, new WorldPoint(2335, 3800, 0), "Talk to Mawnis to start spying on him.", jesterHat, jesterTop, jesterTights, jesterBoots); + goSpyOnMawnisAgain = new NpcStep(this, NpcID.FRIS_R_BURGHER_CROWN, new WorldPoint(2335, 3800, 0), "Talk to Mawnis to start spying on him.", equipJesterHat, equipJesterTop, equipJesterTights, equipJesterBoots); goSpyOnMawnisAgain.addSubSteps(performForMawnisAgain); reportBackToSlugAgain = new NpcStep(this, NpcID.FRIS_SPYMASTER, new WorldPoint(2335, 3811, 0), "Report to Slug Hemligssen."); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefremenniktrials/TheFremennikTrials.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefremenniktrials/TheFremennikTrials.java index c369ea08c3a..0d4fe0b873d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefremenniktrials/TheFremennikTrials.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thefremenniktrials/TheFremennikTrials.java @@ -53,6 +53,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -403,7 +404,7 @@ public void setupConditions() new DialogRequirement("I see... okay, well, bye!"), new DialogRequirement("Human call itself Askeladden!") )); - gottenRock = new VarbitRequirement(6486, 1); + gottenRock = new VarbitRequirement(VarbitID.ASKELLADEN_HASOP, 1); petRockInCauldron = new RuneliteRequirement(configManager, "fremmytrialsaddedpetrock", new ChatMessageRequirement("You put your pet rock into the cauldron.") diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thegiantdwarf/TheGiantDwarf.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thegiantdwarf/TheGiantDwarf.java index c3a85eac4b6..c78e9cdf101 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thegiantdwarf/TheGiantDwarf.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thegiantdwarf/TheGiantDwarf.java @@ -213,7 +213,7 @@ public void setupConditions() new WidgetTextRequirement(InterfaceID.Questjournal.TEXTLAYER, true, "with the book on dwarven costumes that I got from the") ); - talkedToVermundiWithBook = new VarbitRequirement(584, 1); + talkedToVermundiWithBook = new VarbitRequirement(VarbitID.GIANTDWARF_VERMUNDI_GIVENBOOK, 1); askedToStartMachine = new Conditions(true, LogicType.OR, new DialogRequirement(questHelperPlugin.getPlayerStateManager().getPlayerName(), @@ -277,7 +277,7 @@ public void setupConditions() talkedToReldo = new Conditions(true, LogicType.OR, new DialogRequirement("you could try taking them some redberry pie.")); - givenThurgoPie = new VarbitRequirement(580, 1); + givenThurgoPie = new VarbitRequirement(VarbitID.GIANTDWARF_PIE_GIVEN, 1); // Thurgo makes axe, 2781 = 1 givenDwarvenBattleaxe = new VarbitRequirement(VarbitID.GIANTDWARF_MODEL_STATE, true, 2); hasDwarvenBattleaxe = new Conditions(true, LogicType.OR, @@ -290,14 +290,14 @@ public void setupConditions() completedSecretaryTasks = new Conditions(true, new DialogRequirement("I'm afraid I have no more work to offer you", "You should speak directly to the director.")); completedDirectorTasks = new Conditions(true, new DialogRequirement("Have you ever considered joining")); joinedCompany = new Conditions(true, LogicType.OR, - new VarbitRequirement(578, 1), // Purple Pewter - new VarbitRequirement(578, 2), // Yellow Fortune - new VarbitRequirement(578, 3), // Blue Opal - new VarbitRequirement(578, 4), // Green Gem - new VarbitRequirement(578, 5), // White Chisel - new VarbitRequirement(578, 6), // Silver Cog - new VarbitRequirement(578, 7), // Brown Engine - new VarbitRequirement(578, 8), // Would be Red Axe? + new VarbitRequirement(VarbitID.GIANTDWARF_CURRENT_COMPANY, 1), // Purple Pewter + new VarbitRequirement(VarbitID.GIANTDWARF_CURRENT_COMPANY, 2), // Yellow Fortune + new VarbitRequirement(VarbitID.GIANTDWARF_CURRENT_COMPANY, 3), // Blue Opal + new VarbitRequirement(VarbitID.GIANTDWARF_CURRENT_COMPANY, 4), // Green Gem + new VarbitRequirement(VarbitID.GIANTDWARF_CURRENT_COMPANY, 5), // White Chisel + new VarbitRequirement(VarbitID.GIANTDWARF_CURRENT_COMPANY, 6), // Silver Cog + new VarbitRequirement(VarbitID.GIANTDWARF_CURRENT_COMPANY, 7), // Brown Engine + new VarbitRequirement(VarbitID.GIANTDWARF_CURRENT_COMPANY, 8), // Would be Red Axe? new DialogRequirement("I will not disappoint you."), new DialogRequirement("Come in, come in my friend!")); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thegolem/TheGolem.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thegolem/TheGolem.java index 3bc26cf8457..f151ff9a394 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thegolem/TheGolem.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thegolem/TheGolem.java @@ -227,20 +227,20 @@ private void setupConditions() hasReadNotes = new VarbitRequirement(VarbitID.GOLEM_B, 3, Operation.GREATER_EQUAL); talkedToCurator = new VarbitRequirement(VarbitID.GOLEM_B, 4, Operation.GREATER_EQUAL); - added1Clay = new VarbitRequirement(348, 1); - added2Clay = new VarbitRequirement(348, 2); - added3Clay = new VarbitRequirement(348, 3); + added1Clay = new VarbitRequirement(VarbitID.GOLEM_CLAY, 1); + added2Clay = new VarbitRequirement(VarbitID.GOLEM_CLAY, 2); + added3Clay = new VarbitRequirement(VarbitID.GOLEM_CLAY, 3); - turnedStatue1 = new VarbitRequirement(349, 1); - turnedStatue2 = new VarbitRequirement(350, 1); - turnedStatue3 = new VarbitRequirement(351, 0); - turnedStatue4 = new VarbitRequirement(352, 2); + turnedStatue1 = new VarbitRequirement(VarbitID.GOLEM_STATUETTESTATUSA, 1); + turnedStatue2 = new VarbitRequirement(VarbitID.GOLEM_STATUETTESTATUSB, 1); + turnedStatue3 = new VarbitRequirement(VarbitID.GOLEM_STATUETTESTATUSC, 0); + turnedStatue4 = new VarbitRequirement(VarbitID.GOLEM_STATUETTESTATUSD, 2); - openedHead = new VarbitRequirement(353, 1); + openedHead = new VarbitRequirement(VarbitID.GOLEM_HEAD_OPEN, 1); - stolenStatuette = new Conditions(LogicType.OR, new VarbitRequirement(355, 1), statuette); + stolenStatuette = new Conditions(LogicType.OR, new VarbitRequirement(VarbitID.GOLEM_RETRIEVED_STATUETTE, 1), statuette); - enteredRuins = new VarbitRequirement(356, 1); + enteredRuins = new VarbitRequirement(VarbitID.GOLEM_SEEN_UNDERGROUND, 1); } private void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thegreatbrainrobbery/TheGreatBrainRobbery.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thegreatbrainrobbery/TheGreatBrainRobbery.java index dad4db33d96..0dc425d9473 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thegreatbrainrobbery/TheGreatBrainRobbery.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thegreatbrainrobbery/TheGreatBrainRobbery.java @@ -218,7 +218,7 @@ protected void setupRequirements() plank = new ItemRequirement("Plank", ItemID.WOODPLANK); fur = new ItemRequirement("Fur", ItemID.FUR); fur.addAlternates(ItemID.WEREWOLVE_FUR, ItemID.GREY_WOLF_FUR); - hammer = new ItemRequirement("Hammer", ItemCollections.HAMMER).isNotConsumed(); + hammer = new ItemRequirement("Hammer", ItemID.HAMMER); hammer.setTooltip("a standard hammer, NOT Imcando Hammer, as it will be given to Dr. Fenkenstrain"); nails = new ItemRequirement("Nails", ItemCollections.NAILS); holySymbol = new ItemRequirement("Holy symbol", ItemID.BLESSEDSTAR).isNotConsumed(); @@ -301,8 +301,8 @@ public void setupConditions() // Pulling statue, 3401 =1, statue pulled, 3401 = 2 // 3384, 0->1, entered statue - repairedStairs = new VarbitRequirement(3385, 1); - hasReadPrayerBook = new VarbitRequirement(3386, 1); + repairedStairs = new VarbitRequirement(VarbitID.BRAIN_BROKEN_STEPS, 1); + hasReadPrayerBook = new VarbitRequirement(VarbitID.BRAIN_READ_PRAYERS, 1); // 3387 = 1, talked a bit to Tranq in Mos Le after getting the Prayer book // 3388 = 1, part way through Fenk convo @@ -329,18 +329,18 @@ public void setupConditions() hasFuse = new Conditions(LogicType.OR, fuse, addedFuse); hasTinderbox = new Conditions(LogicType.OR, tinderbox, litFuse); - givenClamp = new VarbitRequirement(3396, 1); - givenTongs = new VarbitRequirement(3397, 1); - givenHammer = new VarbitRequirement(3398, 1); - givenBells = new VarbitRequirement(3399, 3); - givenStaples = new VarbitRequirement(3400, 30); + givenClamp = new VarbitRequirement(VarbitID.BRAIN_CLAMP_GIVEN, 1); + givenTongs = new VarbitRequirement(VarbitID.BRAIN_TONGS_GIVEN, 1); + givenHammer = new VarbitRequirement(VarbitID.BRAIN_HAMMER_GIVEN, 1); + givenBells = new VarbitRequirement(VarbitID.BRAIN_JARS_GIVEN, 3); + givenStaples = new VarbitRequirement(VarbitID.BRAIN_STAPLES_GIVEN, 30); hadClamp = new Conditions(LogicType.OR, givenClamp, cranialClamp); hadStaples = new Conditions(LogicType.OR, givenStaples, neededStaples); hadBells = new Conditions(LogicType.OR, givenBells, neededJars); hadTongs = new Conditions(LogicType.OR, givenTongs, brainTongs); - barrelchestAppeared = new VarbitRequirement(3410, 1); + barrelchestAppeared = new VarbitRequirement(VarbitID.BRAIN_SEEN_WALLBREAKER, 1); // received blessing, 3411 = 1 } @@ -349,8 +349,8 @@ public void onGameTick(GameTick event) { int staplesNeeded = 30; int bellsNeeded = 3; - neededStaples.quantity(staplesNeeded - client.getVarbitValue(3400)); - neededJars.quantity(bellsNeeded - client.getVarbitValue(3399)); + neededStaples.quantity(staplesNeeded - client.getVarbitValue(VarbitID.BRAIN_STAPLES_GIVEN)); + neededJars.quantity(bellsNeeded - client.getVarbitValue(VarbitID.BRAIN_JARS_GIVEN)); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thehandinthesand/TheHandInTheSand.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thehandinthesand/TheHandInTheSand.java index 02ba121dc43..a1e867313d6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thehandinthesand/TheHandInTheSand.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thehandinthesand/TheHandInTheSand.java @@ -43,6 +43,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -186,12 +187,12 @@ protected void setupZones() public void setupConditions() { - notTeleportedToSarim = new VarbitRequirement(1531, 0); + notTeleportedToSarim = new VarbitRequirement(VarbitID.HANDSAND_TELE, 0); inYanille = new ZoneRequirement(yanille); inLightSpot = new ZoneRequirement(lightSpot); - receivedBottledWater = new VarbitRequirement(1532, 1); - vialPlaced = new VarbitRequirement(1537, 1); - madeTruthSerum = new VarbitRequirement(1532, 5); + receivedBottledWater = new VarbitRequirement(VarbitID.HANDSAND_SERUM, 1); + vialPlaced = new VarbitRequirement(VarbitID.HANDSAND_COUNTER_MULTI, 1); + madeTruthSerum = new VarbitRequirement(VarbitID.HANDSAND_SERUM, 5); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theheartofdarkness/ChestCodeStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theheartofdarkness/ChestCodeStep.java index 0256dbd0e26..e3bbec8656b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theheartofdarkness/ChestCodeStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theheartofdarkness/ChestCodeStep.java @@ -29,6 +29,7 @@ import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; import net.runelite.api.events.VarClientIntChanged; import net.runelite.api.gameval.InterfaceID; +import net.runelite.api.gameval.VarClientID; import net.runelite.api.widgets.Widget; import net.runelite.client.eventbus.Subscribe; import net.runelite.client.ui.FontManager; @@ -78,7 +79,7 @@ private void updateSolvedPositionState() { for (int i = 0; i < NUMBER_OF_DIALS; i++) { - int START_VARCLIENTINT_POS = 1113; + int START_VARCLIENTINT_POS = VarClientID.COMBINATION_LOCK_VALUE_0; int varcIntID = START_VARCLIENTINT_POS + i; int START_DOWN_ARROW = 3; int ARROW_INTERVAL = 7; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theheartofdarkness/TheHeartOfDarkness.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theheartofdarkness/TheHeartOfDarkness.java index 7bd517fe123..8b66e12bf67 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theheartofdarkness/TheHeartOfDarkness.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theheartofdarkness/TheHeartOfDarkness.java @@ -41,7 +41,6 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.player.InInstanceRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.player.SkillRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.quest.QuestRequirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.util.Operation; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarplayerRequirement; @@ -56,7 +55,6 @@ import net.runelite.api.ChatMessageType; import net.runelite.api.QuestState; import net.runelite.api.Skill; -import net.runelite.api.SpriteID; import net.runelite.api.coords.LocalPoint; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.ChatMessage; @@ -230,7 +228,7 @@ public Map loadSteps() firstTrialPuzzle.addStep(and(southWestChestOpened, scrapOfPaper1, scrapOfPaper2, hasReadPoem), talkToPrinceAfterPoem); firstTrialPuzzle.addStep(and(southWestChestOpened, scrapOfPaper1, scrapOfPaper2, poem), readPoem); firstTrialPuzzle.addStep(and(scrapOfPaper1, book), openKeywordChestSouthWest); - firstTrialPuzzle.addStep(LogicHelper.and(southEastGateUnlocked), searchChestForBookAndPaper); + firstTrialPuzzle.addStep(and(southEastGateUnlocked), searchChestForBookAndPaper); firstTrialPuzzle.addStep(and(towerKey), useKeyOnSouthEastGate); ConditionalStep goDoFirstChallenge = new ConditionalStep(this, climbUpToFirstTrial); @@ -304,12 +302,12 @@ public Map loadSteps() ConditionalStep goPullLevers = new ConditionalStep(this, enterRuins); goPullLevers.addStep(and(inThirdIceArea, pulledFirstLever, pulledSecondLever, pulledThirdLever), pullFourthLever); goPullLevers.addStep(and(inThirdIceArea, pulledFirstLever, pulledSecondLever), pullThirdLever); - goPullLevers.addStep(LogicHelper.and(inThirdIceArea), climbUpLedgeToSecondLever); + goPullLevers.addStep(and(inThirdIceArea), climbUpLedgeToSecondLever); goPullLevers.addStep(and(inSecondIceAreaSecondRoom, pulledFirstLever, pulledSecondLever), jumpOverFrozenPlatforms); goPullLevers.addStep(and(inSecondIceAreaSecondRoom, pulledFirstLever), pullSecondLever); - goPullLevers.addStep(LogicHelper.and(inSecondIceAreaSecondRoom), slideAlongIceLedgeBackToSecondLever); + goPullLevers.addStep(and(inSecondIceAreaSecondRoom), slideAlongIceLedgeBackToSecondLever); goPullLevers.addStep(and(inSecondIceAreaFirstRoom, pulledFirstLever), slideAlongIceLedge); - goPullLevers.addStep(LogicHelper.and(inSecondIceAreaFirstRoom), climbUpLedgeToFirstLever); + goPullLevers.addStep(and(inSecondIceAreaFirstRoom), climbUpLedgeToFirstLever); goPullLevers.addStep(and(inFirstIceRoom, pulledFirstLever), climbDownLedge); goPullLevers.addStep(inFirstIceRoom, pullFirstLever); steps.put(62, goPullLevers); @@ -418,26 +416,26 @@ private void setupConditions() inFirstTrialRoom = new ZoneRequirement(firstTrialRoom); secondTrialRoom = new Zone(new WorldPoint(1635, 3216, 2), new WorldPoint(1650, 3230, 2)); inSecondTrialRoom = new ZoneRequirement(secondTrialRoom); - builtLandingInOverlook = new VarbitRequirement(11379, 4); - talkedToFelius = new VarbitRequirement(11118, 1); - talkedToCaritta = new VarbitRequirement(11119, 1); - talkedToSergius = new VarbitRequirement(11120, 1); -// talkedToNova = new VarbitRequirement(11121, 1); + builtLandingInOverlook = new VarbitRequirement(VarbitID.QUETZAL_SALVAGEROVERLOOK, 4); + talkedToFelius = new VarbitRequirement(VarbitID.VMQ3_RECRUIT_1, 1); + talkedToCaritta = new VarbitRequirement(VarbitID.VMQ3_RECRUIT_2, 1); + talkedToSergius = new VarbitRequirement(VarbitID.VMQ3_RECRUIT_3, 1); +// talkedToNova = new VarbitRequirement(VarbitID.VMQ3_RECRUIT_4, 1); princeIsFollowing = new VarplayerRequirement(VarPlayerID.FOLLOWER_NPC, 14053, 16); // Overlook landing could also be varp 4182 480 -> 2528 - southEastGateUnlocked = new VarbitRequirement(11165, 1); - southWestChestOpened = new VarbitRequirement(11166, 1); - hasReadPoem = new VarbitRequirement(11170, 1); - knowAboutDirections = new VarbitRequirement(11171, 1); + southEastGateUnlocked = new VarbitRequirement(VarbitID.VMQ3_TOWER_TRIAL_1_DOOR_UNLOCKED, 1); + southWestChestOpened = new VarbitRequirement(VarbitID.VMQ3_TOWER_TRIAL_1_LETTERS_UNLOCKED, 1); + hasReadPoem = new VarbitRequirement(VarbitID.VMQ3_TOWER_TRIAL_1_READ_POEM, 1); + knowAboutDirections = new VarbitRequirement(VarbitID.VMQ3_TOWER_TRIAL_1_FIRST_TRANSLATION, 1); knowPoemSolution = new ManualRequirement(); inArrowPuzzle = new WidgetTextRequirement(810, 15, 9, "Confirm"); hasReadCompletedNote = new ManualRequirement(); -// northWestChestOpened = new VarbitRequirement(11167, 1); +// northWestChestOpened = new VarbitRequirement(VarbitID.VMQ3_TOWER_TRIAL_1_DIRECTIONS_UNLOCKED, 1); NpcCondition emissaryIsPassive = new NpcCondition(NpcID.VMQ3_TOWER_TWILIGHT_MELEE_VARIANT_1A, new WorldPoint(1641, 3227, 2)); emissaryIsPassive.setAnimationIDRequired(-1); combatStarted = not(emissaryIsPassive); - startedInvestigation = new VarbitRequirement(11134, 1); + startedInvestigation = new VarbitRequirement(VarbitID.VMQ3_TOWER_TRIAL_3_ITZLA_CONSULTED, 1); // Accused Tenoch incorrectly // 11135 0->1 // 11140 0->1 @@ -492,14 +490,14 @@ private void setupConditions() bossRoom = new Zone(new WorldPoint(1359, 4505, 0), new WorldPoint(1385, 4520, 0)); inBossRoom = new ZoneRequirement(bossRoom); - pulledFirstLever = new VarbitRequirement(11138, 1); - pulledSecondLever = new VarbitRequirement(11139, 1); + pulledFirstLever = new VarbitRequirement(VarbitID.VMQ3_RUINS_LEVER_3, 1); + pulledSecondLever = new VarbitRequirement(VarbitID.VMQ3_RUINS_LEVER_4, 1); // on first frozen platform: // 11181 0->1 - pulledThirdLever = new VarbitRequirement(11137, 1); -// pulledFourthLever = new VarbitRequirement(11136, 1); + pulledThirdLever = new VarbitRequirement(VarbitID.VMQ3_RUINS_LEVER_2, 1); +// pulledFourthLever = new VarbitRequirement(VarbitID.VMQ3_RUINS_LEVER_1, 1); - unlockedShortcut = new VarbitRequirement(11174, 1); + unlockedShortcut = new VarbitRequirement(VarbitID.VMQ3_RUINS_SHORTCUT_UNLOCKED, 1); inspectedAirMarkings = new ManualRequirement(); inspectedEarthMarkings = new ManualRequirement(); @@ -516,10 +514,10 @@ private void setupConditions() takenOrUsedFireIcon = or(repairedFireStatue, fireIcon); takenOrUsedWaterIcon = or(repairedWaterStatue, waterIcon); - activatedFirstStatue = new VarbitRequirement(11161, -1); - activatedSecondStatue = new VarbitRequirement(11162, -1); - activatedThirdStatue = new VarbitRequirement(11163, -1); - activatedFourthStatue = new VarbitRequirement(11164, -1); + activatedFirstStatue = new VarbitRequirement(VarbitID.VMQ3_RUIN_STATUE_1_CHECK, -1); + activatedSecondStatue = new VarbitRequirement(VarbitID.VMQ3_RUIN_STATUE_2_CHECK, -1); + activatedThirdStatue = new VarbitRequirement(VarbitID.VMQ3_RUIN_STATUE_3_CHECK, -1); + activatedFourthStatue = new VarbitRequirement(VarbitID.VMQ3_RUIN_STATUE_4_CHECK, -1); activateStatueRequirements[0] = activatedFirstStatue; activateStatueRequirements[1] = activatedSecondStatue; @@ -790,7 +788,7 @@ private void setupSteps() int LEVER_ID = 55367; // Decorative object pullFirstLever = new ObjectStep(this, LEVER_ID, new WorldPoint(1695, 9604, 2), "Pull the lever in the south-east of the area. Make sure to avoid the " + "wall spikes."); - pullFirstLever.addTileMarkers(SpriteID.DEADMAN_EXCLAMATION_MARK_SKULLED_WARNING, + pullFirstLever.addTileMarkers(SpriteID.PvpwIcons.DEADMAN_EXCLAMATION_MARK_SKULLED_WARNING, new WorldPoint(1682, 9603, 2), new WorldPoint(1682, 9604, 2), new WorldPoint(1682, 9605, 2), new WorldPoint(1682, 9606, 2), new WorldPoint(1684, 9603, 2), new WorldPoint(1684, 9604, 2), new WorldPoint(1684, 9605, 2), new WorldPoint(1684, 9606, 2), new WorldPoint(1686, 9603, 2), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thelosttribe/TheLostTribe.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thelosttribe/TheLostTribe.java index 9cf408bf761..d3bc4ab8f48 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thelosttribe/TheLostTribe.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thelosttribe/TheLostTribe.java @@ -163,8 +163,8 @@ public void setupConditions() foundRobes = new VarbitRequirement(VarbitID.LOST_TRIBE_HAM, 1, Operation.GREATER_EQUAL); foundSilverwareOrToldOnSigmund = new VarbitRequirement(VarbitID.LOST_TRIBE_HAM, 3, Operation.GREATER_EQUAL); - hansKnows = new VarbitRequirement(537, 0); - bobKnows = new VarbitRequirement(537, 1); + hansKnows = new VarbitRequirement(VarbitID.LOST_TRIBE_CONTACT, 0); + bobKnows = new VarbitRequirement(VarbitID.LOST_TRIBE_CONTACT, 1); // 537 0->2->0, Hans // 537 0->1, Bob diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thepathofglouphrie/MonolithPuzzle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thepathofglouphrie/MonolithPuzzle.java index 02d2229a866..0a293227d3a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thepathofglouphrie/MonolithPuzzle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thepathofglouphrie/MonolithPuzzle.java @@ -32,12 +32,12 @@ import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; -import net.runelite.api.InventoryID; import net.runelite.api.ItemContainer; import net.runelite.api.Tile; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; import net.runelite.api.events.VarbitChanged; +import net.runelite.api.gameval.InventoryID; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; @@ -205,7 +205,7 @@ public void onGameTick(final GameTick event) private int countShapes() { - ItemContainer itemContainer = client.getItemContainer(InventoryID.INVENTORY); + ItemContainer itemContainer = client.getItemContainer(InventoryID.INV); if (itemContainer == null) { return 0; @@ -227,7 +227,7 @@ private int countShapes() private boolean hasFirstChestKey() { - ItemContainer itemContainer = client.getItemContainer(InventoryID.INVENTORY); + ItemContainer itemContainer = client.getItemContainer(InventoryID.INV); if (itemContainer == null) { return false; @@ -238,7 +238,7 @@ private boolean hasFirstChestKey() private boolean hasMachineRoomKey() { - ItemContainer itemContainer = client.getItemContainer(InventoryID.INVENTORY); + ItemContainer itemContainer = client.getItemContainer(InventoryID.INV); if (itemContainer == null) { return false; @@ -250,6 +250,10 @@ private boolean hasMachineRoomKey() private boolean tileHasBigMonolith(Tile[][] tiles, int sceneX, int sceneY) { var tile = tiles[sceneX][sceneY]; + if (tile == null) { + // Tiles normally aren't null, but in tests they can be. + return false; + } for (var gameObject : tile.getGameObjects()) { if (gameObject != null && gameObject.getId() == BIG_MONOLITH) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thepathofglouphrie/ThePathOfGlouphrie.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thepathofglouphrie/ThePathOfGlouphrie.java index 9c53be6d328..5ba87899d0d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thepathofglouphrie/ThePathOfGlouphrie.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thepathofglouphrie/ThePathOfGlouphrie.java @@ -55,6 +55,7 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.ArrayList; import java.util.Arrays; @@ -225,13 +226,13 @@ private void setupConditions() nearLongramble = new ZoneRequirement(longrambleZone); inCutscene = new Conditions(LogicType.OR, - new VarbitRequirement(4606, 3), - new VarbitRequirement(12139, 1) + new VarbitRequirement(VarbitID.FOV_CLAMP, 3), + new VarbitRequirement(VarbitID.GRAVESTONE_TLI_HIDE, 1) ); - learnedAboutChapter1 = new VarbitRequirement(15291, 1); - learnedAboutChapter2 = new VarbitRequirement(15292, 1); - // learnedAboutChapter3 = new VarbitRequirement(15293, 1); + learnedAboutChapter1 = new VarbitRequirement(VarbitID.POG_BOLRIE_DIARY_1, 1); + learnedAboutChapter2 = new VarbitRequirement(VarbitID.POG_BOLRIE_DIARY_2, 1); + // learnedAboutChapter3 = new VarbitRequirement(VarbitID.POG_BOLRIE_DIARY_3, 1); inSewer1 = new ZoneRequirement(sewer1); inSewer2 = new ZoneRequirement(sewer2); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thepathofglouphrie/YewnocksPuzzle.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thepathofglouphrie/YewnocksPuzzle.java index 9483efff40e..3d2db996f8c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thepathofglouphrie/YewnocksPuzzle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thepathofglouphrie/YewnocksPuzzle.java @@ -30,14 +30,15 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.widget.WidgetPresenceRequirement; import net.runelite.client.plugins.microbot.questhelper.steps.*; import lombok.extern.slf4j.Slf4j; -import net.runelite.api.InventoryID; import net.runelite.api.Item; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameTick; import net.runelite.api.events.ItemContainerChanged; import net.runelite.api.events.VarbitChanged; +import net.runelite.api.gameval.InventoryID; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarPlayerID; import net.runelite.client.eventbus.Subscribe; import org.apache.commons.lang3.tuple.Pair; @@ -54,12 +55,6 @@ public class YewnocksPuzzle extends DetailedOwnerStep * Region ID of the storeroom this puzzle takes place in */ private static final int STOREROOM_REGION = 11074; - private static final int PUZZLE1_INSERTED_DISC_VARP_ID = 3994; - private static final int PUZZLE2_UPPER_INSERTED_DISC_VARP_ID = 3995; - private static final int PUZZLE2_LOWER_INSERTED_DISC_VARP_ID = 3996; - private static final int PUZZLE1_LEFT_VARP_ID = 3997; - private static final int PUZZLE1_RIGHT_VARP_ID = 3998; - private static final int PUZZLE2_VARP_ID = 3999; /** * ItemID to ItemRequirement map */ @@ -366,9 +361,9 @@ public static WorldPoint regionPoint(int regionX, int regionY) @Override public void startUp() { - puzzle1LeftItemID = client.getVarpValue(PUZZLE1_LEFT_VARP_ID); - puzzle1RightItemID = client.getVarpValue(PUZZLE1_RIGHT_VARP_ID); - puzzle2ItemID = client.getVarpValue(PUZZLE2_VARP_ID); + puzzle1LeftItemID = client.getVarpValue(VarPlayerID.POG_COIN_TARGET1_1_OBJ); + puzzle1RightItemID = client.getVarpValue(VarPlayerID.POG_COIN_TARGET1_2_OBJ); + puzzle2ItemID = client.getVarpValue(VarPlayerID.POG_COIN_TARGET2_OBJ); updateSteps(); } @@ -411,15 +406,15 @@ public void onVarbitChanged(VarbitChanged varbitChanged) { if (varbitChanged.getVarbitId() == -1) { - if (varbitChanged.getVarpId() == PUZZLE1_LEFT_VARP_ID) + if (varbitChanged.getVarpId() == VarPlayerID.POG_COIN_TARGET1_1_OBJ) { puzzle1LeftItemID = varbitChanged.getValue(); } - else if (varbitChanged.getVarpId() == PUZZLE1_RIGHT_VARP_ID) + else if (varbitChanged.getVarpId() == VarPlayerID.POG_COIN_TARGET1_2_OBJ) { puzzle1RightItemID = varbitChanged.getValue(); } - else if (varbitChanged.getVarpId() == PUZZLE2_VARP_ID) + else if (varbitChanged.getVarpId() == VarPlayerID.POG_COIN_TARGET2_OBJ) { puzzle2ItemID = varbitChanged.getValue(); } @@ -517,7 +512,7 @@ private boolean hasOpenedMachine() * @return a list of discs as Items, or an empty list if inventory wasn't found */ @Nonnull - private List getDiscs(InventoryID inventoryId) + private List getDiscs(int inventoryId) { var itemContainer = client.getItemContainer(inventoryId); if (itemContainer == null) @@ -557,7 +552,7 @@ private void refreshSolution() return; } - var items = getDiscs(InventoryID.INVENTORY); + var items = getDiscs(InventoryID.INV); var puzzle1SolutionValue = puzzle1SolutionValue1 + puzzle1SolutionValue2; // Try to figure out a solution @@ -568,7 +563,7 @@ private void refreshSolution() protected void updateSteps() { - var numDiscs = getDiscs(InventoryID.INVENTORY).stream().mapToInt(Item::getQuantity).sum(); + var numDiscs = getDiscs(InventoryID.INV).stream().mapToInt(Item::getQuantity).sum(); if (numDiscs < 3) { // Player has fewer than 3 discs, no solution is possible @@ -601,9 +596,9 @@ protected void updateSteps() return; } - var puzzle1InsertedDisc = client.getVarpValue(PUZZLE1_INSERTED_DISC_VARP_ID); - var puzzle2UpperInsertedDisc = client.getVarpValue(PUZZLE2_UPPER_INSERTED_DISC_VARP_ID); - var puzzle2LowerInsertedDisc = client.getVarpValue(PUZZLE2_LOWER_INSERTED_DISC_VARP_ID); + var puzzle1InsertedDisc = client.getVarpValue(VarPlayerID.POG_COIN_DISPLAY1_OBJ); + var puzzle2UpperInsertedDisc = client.getVarpValue(VarPlayerID.POG_COIN_DISPLAY2_1_OBJ); + var puzzle2LowerInsertedDisc = client.getVarpValue(VarPlayerID.POG_COIN_DISPLAY2_2_OBJ); if (!solution.puzzle1Requirement.getAllIds().contains(puzzle1InsertedDisc)) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/therestlessghost/TheRestlessGhost.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/therestlessghost/TheRestlessGhost.java index 859707b5434..534620bed0c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/therestlessghost/TheRestlessGhost.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/therestlessghost/TheRestlessGhost.java @@ -27,10 +27,10 @@ import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.NpcCondition; import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.ObjectCondition; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; @@ -41,77 +41,62 @@ import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; - -import java.util.*; +import net.runelite.api.gameval.VarbitID; public class TheRestlessGhost extends BasicQuestHelper { - //Items Required - private ItemRequirement ghostspeakAmulet, skull; - - //Items Recommended - private ItemRequirement lumbridgeTeleports, passage; - - private Requirement ghostSpawned, coffinOpened, inBasement, hasSkull; - - private QuestStep talkToAereck, talkToUrhney, speakToGhost, openCoffin, searchCoffin, enterWizardsTowerBasement, searchAltarAndRun, exitWizardsTowerBasement, - openCoffinToPutSkullIn, putSkullInCoffin; - - //Zones - private Zone basement; - - @Override - public Map loadSteps() - { - initializeRequirements(); - setupConditions(); - setupSteps(); - Map steps = new HashMap<>(); - - steps.put(0, talkToAereck); - steps.put(1, talkToUrhney); - - ConditionalStep talkToGhost = new ConditionalStep(this, openCoffin); - talkToGhost.addStep(ghostSpawned, speakToGhost); - talkToGhost.addStep(coffinOpened, searchCoffin); - steps.put(2, talkToGhost); - - ConditionalStep getSkullForGhost = new ConditionalStep(this, enterWizardsTowerBasement); - getSkullForGhost.addStep(inBasement, searchAltarAndRun); - steps.put(3, getSkullForGhost); - - ConditionalStep returnSkullToGhost = new ConditionalStep(this, enterWizardsTowerBasement); - returnSkullToGhost.addStep(new Conditions(inBasement, hasSkull), exitWizardsTowerBasement); - returnSkullToGhost.addStep(new Conditions(hasSkull, coffinOpened), putSkullInCoffin); - returnSkullToGhost.addStep(hasSkull, openCoffinToPutSkullIn); - returnSkullToGhost.addStep(inBasement, searchAltarAndRun); - steps.put(4, returnSkullToGhost); - - return steps; - } + // Recommended items + ItemRequirement lumbridgeTeleports; + ItemRequirement passage; + + // Mid-quest required items + ItemRequirement ghostspeakAmulet; + ItemRequirement skull; + + // Miscellaneous requirements + Requirement ghostSpawned; + Requirement coffinOpened; + Requirement inBasement; + Requirement hasSkull; + + // Zones + Zone wizardsTowerBasement; + + // Steps + NpcStep talkToAereck; + NpcStep talkToUrhney; + ObjectStep openCoffin; + ObjectStep searchCoffin; + NpcStep speakToGhost; + ObjectStep enterWizardsTowerBasement; + ObjectStep searchAltarAndRun; + ObjectStep exitWizardsTowerBasement; + ObjectStep openCoffinToPutSkullIn; + ObjectStep putSkullInCoffin; @Override protected void setupZones() { - basement = new Zone(new WorldPoint(3094, 9553, 0), new WorldPoint(3125, 9582, 0)); + wizardsTowerBasement = new Zone(new WorldPoint(3094, 9553, 0), new WorldPoint(3125, 9582, 0)); } - public void setupConditions() + @Override + protected void setupRequirements() { ghostSpawned = new NpcCondition(NpcID.GHOSTX); coffinOpened = new ObjectCondition(ObjectID.OPENGHOSTCOFFIN); - inBasement = new ZoneRequirement(basement); - hasSkull = new VarbitRequirement(2130, 1); - } + inBasement = new ZoneRequirement(wizardsTowerBasement); + hasSkull = new VarbitRequirement(VarbitID.RESTLESS_GHOST_ALTAR_VAR, 1); - @Override - protected void setupRequirements() - { lumbridgeTeleports = new ItemRequirement("Lumbridge teleports", ItemID.POH_TABLET_LUMBRIDGETELEPORT, 2); ghostspeakAmulet = new ItemRequirement("Ghostspeak amulet", ItemID.AMULET_OF_GHOSTSPEAK, 1, true).isNotConsumed(); ghostspeakAmulet.setTooltip("If you've lost it you can get another from Father Urhney in his hut in the south east of Lumbridge Swamp"); @@ -125,23 +110,15 @@ public void setupSteps() { talkToAereck = new NpcStep(this, NpcID.FATHER_AERECK, new WorldPoint(3243, 3206, 0), "Talk to Father Aereck in the Lumbridge Church."); talkToAereck.addDialogStep("I'm looking for a quest!"); - talkToAereck.addDialogStep("Ok, let me help then."); + talkToAereck.addDialogStep("Yes."); - talkToUrhney = new NpcStep(this, NpcID.FATHER_URHNEY, new WorldPoint(3147, 3175, 0), "Talk to Father Urhney in the south west of Lumbridge Swamp."); + talkToUrhney = new NpcStep(this, NpcID.FATHER_URHNEY, new WorldPoint(3147, 3175, 0), "Talk to Father Urhney, west of the Lumbridge Swamp."); talkToUrhney.addDialogStep("Father Aereck sent me to talk to you."); talkToUrhney.addDialogStep("He's got a ghost haunting his graveyard."); openCoffin = new ObjectStep(this, ObjectID.SHUTGHOSTCOFFIN, new WorldPoint(3250, 3193, 0), "Open the coffin in the Lumbridge Graveyard to spawn the ghost.", ghostspeakAmulet); - openCoffin.addDialogStep("Yep, now tell me what the problem is."); - openCoffin.addDialogStep("Yep, clever aren't I?."); - openCoffin.addDialogStep("Yes, ok. Do you know WHY you're a ghost?"); - openCoffin.addDialogStep("Yes, ok. Do you know why you're a ghost?"); searchCoffin = new ObjectStep(this, ObjectID.OPENGHOSTCOFFIN, new WorldPoint(3250, 3193, 0), "Search the coffin in the Lumbridge Graveyard to spawn the ghost.", ghostspeakAmulet); - searchCoffin.addDialogStep("Yep, now tell me what the problem is."); - searchCoffin.addDialogStep("Yep, clever aren't I?."); - searchCoffin.addDialogStep("Yes, ok. Do you know WHY you're a ghost?"); - searchCoffin.addDialogStep("Yes, ok. Do you know why you're a ghost?"); speakToGhost = new NpcStep(this, NpcID.GHOSTX, new WorldPoint(3250, 3195, 0), "Speak to the Ghost that appears whilst wearing your Ghostspeak Amulet.", ghostspeakAmulet); speakToGhost.addDialogStep("Yep, now tell me what the problem is."); @@ -149,20 +126,51 @@ public void setupSteps() speakToGhost.addDialogStep("Yes, ok. Do you know WHY you're a ghost?"); speakToGhost.addDialogStep("Yes, ok. Do you know why you're a ghost?"); - enterWizardsTowerBasement = new ObjectStep(this, ObjectID.WIZARDS_TOWER_LADDERTOP, new WorldPoint(3104, 3162, 0), "Enter the Wizards' Tower basement."); + enterWizardsTowerBasement = new ObjectStep(this, ObjectID.WIZARDS_TOWER_LADDERTOP, new WorldPoint(3104, 3162, 0), "Enter the Wizards' Tower basement, south of Draynor village."); searchAltarAndRun = new ObjectStep(this, ObjectID.RESTLESS_GHOST_ALTAR, new WorldPoint(3120, 9567, 0), "Search the Altar. A skeleton (level 13) will appear and attack you, but you can just run away."); exitWizardsTowerBasement = new ObjectStep(this, ObjectID.WIZARDS_TOWER_LADDER, new WorldPoint(3103, 9576, 0), "Leave the basement.", skull); - openCoffinToPutSkullIn = new ObjectStep(this, ObjectID.SHUTGHOSTCOFFIN, new WorldPoint(3250, 3193, 0), "Open the ghost's coffin in Lumbridge graveyard.", skull); - putSkullInCoffin = new ObjectStep(this, ObjectID.OPENGHOSTCOFFIN, new WorldPoint(3250, 3193, 0), "Search the coffin.", skull); + openCoffinToPutSkullIn = new ObjectStep(this, ObjectID.SHUTGHOSTCOFFIN, new WorldPoint(3250, 3193, 0), "Open the ghost's coffin in the Lumbridge graveyard.", skull); + putSkullInCoffin = new ObjectStep(this, ObjectID.OPENGHOSTCOFFIN, new WorldPoint(3250, 3193, 0), "Search the coffin to put the skull back and finish the quest.", skull); + } + + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + steps.put(0, talkToAereck); + steps.put(1, talkToUrhney); + + var talkToGhost = new ConditionalStep(this, openCoffin); + talkToGhost.addStep(ghostSpawned, speakToGhost); + talkToGhost.addStep(coffinOpened, searchCoffin); + steps.put(2, talkToGhost); + + var getSkullForGhost = new ConditionalStep(this, enterWizardsTowerBasement); + getSkullForGhost.addStep(inBasement, searchAltarAndRun); + steps.put(3, getSkullForGhost); + + var returnSkullToGhost = new ConditionalStep(this, enterWizardsTowerBasement); + returnSkullToGhost.addStep(and(inBasement, hasSkull), exitWizardsTowerBasement); + returnSkullToGhost.addStep(and(hasSkull, coffinOpened), putSkullInCoffin); + returnSkullToGhost.addStep(hasSkull, openCoffinToPutSkullIn); + returnSkullToGhost.addStep(inBasement, searchAltarAndRun); + steps.put(4, returnSkullToGhost); + + return steps; } + @Override public List getItemRecommended() { - ArrayList recommended = new ArrayList<>(); - recommended.add(lumbridgeTeleports); - recommended.add(passage); - return recommended; + return List.of( + lumbridgeTeleports, + passage + ); } @Override @@ -174,30 +182,51 @@ public QuestPointReward getQuestPointReward() @Override public List getExperienceRewards() { - return Collections.singletonList(new ExperienceReward(Skill.PRAYER, 1125)); + return List.of( + new ExperienceReward(Skill.PRAYER, 1125) + ); } @Override public List getItemRewards() { - return Collections.singletonList(new ItemReward("Ghostspeak Amulet", ItemID.AMULET_OF_GHOSTSPEAK, 1)); + return List.of( + new ItemReward("Ghostspeak amulet", ItemID.AMULET_OF_GHOSTSPEAK) + ); } @Override - public List getPanels() + public List getCombatRequirements() { - List allSteps = new ArrayList<>(); - - allSteps.add(new PanelDetails("Talk to Father Aereck", Collections.singletonList(talkToAereck))); - allSteps.add(new PanelDetails("Get a ghostspeak amulet", Collections.singletonList(talkToUrhney))); - allSteps.add(new PanelDetails("Talk to the ghost", Arrays.asList(openCoffin, searchCoffin, speakToGhost))); - allSteps.add(new PanelDetails("Return the ghost's skull", Arrays.asList(enterWizardsTowerBasement, searchAltarAndRun, exitWizardsTowerBasement, openCoffinToPutSkullIn, putSkullInCoffin))); - return allSteps; + return List.of( + "A skeleton (level 13) you can run away from" + ); } @Override - public List getCombatRequirements() + public List getPanels() { - return Collections.singletonList("A skeleton (level 13) you can run away from"); + var panels = new ArrayList(); + + panels.add(new PanelDetails("Talk to Father Aereck", List.of( + talkToAereck + ))); + panels.add(new PanelDetails("Get a ghostspeak amulet", List.of( + talkToUrhney + ))); + panels.add(new PanelDetails("Talk to the ghost", List.of( + openCoffin, + searchCoffin, + speakToGhost + ))); + panels.add(new PanelDetails("Return the ghost's skull", List.of( + enterWizardsTowerBasement, + searchAltarAndRun, + exitWizardsTowerBasement, + openCoffinToPutSkullIn, + putSkullInCoffin + ))); + + return panels; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theslugmenace/PuzzleStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theslugmenace/PuzzleStep.java index 02a15095cad..f692f5bf4ee 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theslugmenace/PuzzleStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theslugmenace/PuzzleStep.java @@ -5,8 +5,8 @@ import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; import net.runelite.api.events.VarbitChanged; import net.runelite.api.gameval.InterfaceID; -import net.runelite.api.gameval.VarPlayerID; import net.runelite.api.gameval.VarbitID; +import net.runelite.api.gameval.VarPlayerID; import net.runelite.api.widgets.Widget; import net.runelite.client.eventbus.Subscribe; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theslugmenace/TheSlugMenace.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theslugmenace/TheSlugMenace.java index 477fc18c5f5..c8dfa6f8f04 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theslugmenace/TheSlugMenace.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/theslugmenace/TheSlugMenace.java @@ -50,6 +50,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -167,7 +168,7 @@ protected void setupRequirements() pageFragment3 = new ItemRequirement("Fragment 3", ItemID.SLUG2_PAGE4C); pageFragment3.setHighlightInInventory(true); - receivedFragments = new VarbitRequirement(2619, 1); + receivedFragments = new VarbitRequirement(VarbitID.SLUG2_TORNPAGES, 1); glue = new ItemRequirement("Sea slug glue", ItemID.SLUG2_SLUG_PASTE); glue.setHighlightInInventory(true); @@ -179,11 +180,11 @@ protected void setupRequirements() chisel = new ItemRequirement("Chisel", ItemID.CHISEL).isNotConsumed(); - usedAirRune = new VarbitRequirement(2623, 1); - usedEarthRune = new VarbitRequirement(2622, 1); - usedWaterRune = new VarbitRequirement(2625, 1); - usedFireRune = new VarbitRequirement(2624, 1); - usedMindRune = new VarbitRequirement(2626, 1); + usedAirRune = new VarbitRequirement(VarbitID.SLUG2_USED_AIR_RUNE, 1); + usedEarthRune = new VarbitRequirement(VarbitID.SLUG2_USED_EARTH_RUNE, 1); + usedWaterRune = new VarbitRequirement(VarbitID.SLUG2_USED_WATER_RUNE, 1); + usedFireRune = new VarbitRequirement(VarbitID.SLUG2_USED_FIRE_RUNE, 1); + usedMindRune = new VarbitRequirement(VarbitID.SLUG2_USED_MIND_RUNE, 1); airRune = new ItemRequirement("Air rune", ItemID.SLUG2_RUNE_AIR).hideConditioned(usedAirRune); earthRune = new ItemRequirement("Earth rune", ItemID.SLUG2_RUNE_EARTH).hideConditioned(usedEarthRune); @@ -272,21 +273,21 @@ protected void setupZones() public void setupConditions() { - talkedToHolgart = new VarbitRequirement(2614, 1); - talkedToHobb = new VarbitRequirement(2615, 1); - talkedToMaledict = new VarbitRequirement(2616, 1); - talkedToAllImportantPeople = new VarbitRequirement(2617, 7); + talkedToHolgart = new VarbitRequirement(VarbitID.SLUG2_NPC_TRACK1, 1); + talkedToHobb = new VarbitRequirement(VarbitID.SLUG2_NPC_TRACK2, 1); + talkedToMaledict = new VarbitRequirement(VarbitID.SLUG2_NPC_TRACK3, 1); + talkedToAllImportantPeople = new VarbitRequirement(VarbitID.SLUG2_NPC_ALLTRACK, 7); inHobgoblinDungeon = new ZoneRequirement(hobgoblinDungeon); inSeaSlugDungeon = new ZoneRequirement(seaSlugDungeon); - openedWall = new VarbitRequirement(2618, 1); + openedWall = new VarbitRequirement(VarbitID.SLUG2_DOORBIT, 1); onPlatform = new ZoneRequirement(platform); puzzleUp = new WidgetPresenceRequirement(460, 8); - repairedPage = new VarbitRequirement(2611, 1); + repairedPage = new VarbitRequirement(VarbitID.SLUG2_FIXED_PAGE, 1); - pickedUpSlug = new VarbitRequirement(2631, 1); + pickedUpSlug = new VarbitRequirement(VarbitID.SLUG2_HAVESLUG, 1); hasOrUsedAirRune = new Conditions(LogicType.OR, airRune.alsoCheckBank(questBank), usedAirRune); hasOrUsedWaterRune = new Conditions(LogicType.OR, waterRune.alsoCheckBank(questBank), usedWaterRune); @@ -296,7 +297,7 @@ public void setupConditions() hasAllRunes = new Conditions(hasOrUsedAirRune, hasOrUsedEarthRune, hasOrUsedFireRune, hasOrUsedMindRune, hasOrUsedWaterRune); - usedAllRunes = new VarbitRequirement(2627, 31); + usedAllRunes = new VarbitRequirement(VarbitID.SLUG2_USED_RUNES, 31); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thetouristtrap/TheTouristTrap.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thetouristtrap/TheTouristTrap.java index 13219a38bb6..ee1bfac5698 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thetouristtrap/TheTouristTrap.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/thetouristtrap/TheTouristTrap.java @@ -273,13 +273,13 @@ public void setupConditions() searchedBookcase = new Conditions(true, new WidgetTextRequirement(InterfaceID.Objectbox.TEXT, "You notice several books on the subject of sailing.")); distractedSiad = new Conditions(true, new WidgetTextRequirement(229, 1, "The captain starts rambling on about his days as a salty sea dog. He
looks quite distracted...")); - anaPlacedOnCartOfLift = new VarbitRequirement(2805, 1); + anaPlacedOnCartOfLift = new VarbitRequirement(VarbitID.TOURTRAP_QIP_ANA_STATE, 1); // TODO: Better detection of if Ana is on the surface or in the underground barrel anaOnSurface = new VarplayerRequirement(VarPlayerID.DESERTRESCUE, 22, Operation.GREATER_EQUAL); // TODO: This only gets set the first time. If you somehow lose Ana between here and the cart it remains set. Need to add more logic around this - anaOnSurfaceInBarrel = new VarbitRequirement(2808, 1); - anaOnCart = new VarbitRequirement(2809, 1); - anaFree = new VarbitRequirement(3733, 1); + anaOnSurfaceInBarrel = new VarbitRequirement(VarbitID.TOURTRAP_QIP_ANA_WINCHSIDE_BARREL, 1); + anaOnCart = new VarbitRequirement(VarbitID.TOURTRAP_QIP_FLATBACK_CART_ANA, 1); + anaFree = new VarbitRequirement(VarbitID.TOURTRAP_ANA_VISIBLE_SHANTY_PASS, 1); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/throneofmiscellania/ThroneOfMiscellania.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/throneofmiscellania/ThroneOfMiscellania.java index 284a46fa1b9..84ef3679710 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/throneofmiscellania/ThroneOfMiscellania.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/throneofmiscellania/ThroneOfMiscellania.java @@ -49,6 +49,7 @@ import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; import net.runelite.api.gameval.VarbitID; +import net.runelite.api.gameval.VarPlayerID; import java.util.*; @@ -280,34 +281,34 @@ public void setupConditions() inAstridRoom = new ZoneRequirement(astridRoom1, astridRoom2); // Chose Brand, 14607 0->1 - courtingBrand = new VarbitRequirement(14607, 1); + courtingBrand = new VarbitRequirement(VarbitID.MISC_PARTNER_MULTIVAR, 1); - talked1P1 = new VarbitRequirement(85, 1); - talked1P2 = new VarbitRequirement(86, 1); - talked1P3 = new VarbitRequirement(87, 1); - givenFlowers = new VarbitRequirement(94, 1); - doneEmote = new VarbitRequirement(96, 1); + talked1P1 = new VarbitRequirement(VarbitID.MISC_S1_D1, 1); + talked1P2 = new VarbitRequirement(VarbitID.MISC_S1_D2, 1); + talked1P3 = new VarbitRequirement(VarbitID.MISC_S1_D3, 1); + givenFlowers = new VarbitRequirement(VarbitID.MISC_S1_GIVE, 1); + doneEmote = new VarbitRequirement(VarbitID.MISC_S1_EMOTE, 1); talked1P4 = new VarbitRequirement(VarbitID.MISC_AFFECTION, 15, Operation.GREATER_EQUAL); - talked2P1 = new VarbitRequirement(88, 1); - talked2P2 = new VarbitRequirement(89, 1); - talked2P3 = new VarbitRequirement(90, 1); - givenBowOrCake = new VarbitRequirement(95, 1); + talked2P1 = new VarbitRequirement(VarbitID.MISC_S2_D1, 1); + talked2P2 = new VarbitRequirement(VarbitID.MISC_S2_D2, 1); + talked2P3 = new VarbitRequirement(VarbitID.MISC_S2_D3, 1); + givenBowOrCake = new VarbitRequirement(VarbitID.MISC_S2_GIVE, 1); talked2P4 = new VarbitRequirement(VarbitID.MISC_AFFECTION, 24, Operation.GREATER_EQUAL); - talked3P1 = new VarbitRequirement(91, 1); - talked3P2 = new VarbitRequirement(92, 1); - talked3P3 = new VarbitRequirement(93, 1); - blownKiss = new VarbitRequirement(97, 1); + talked3P1 = new VarbitRequirement(VarbitID.MISC_S3_D1, 1); + talked3P2 = new VarbitRequirement(VarbitID.MISC_S3_D2, 1); + talked3P3 = new VarbitRequirement(VarbitID.MISC_S3_D3, 1); + blownKiss = new VarbitRequirement(VarbitID.MISC_S3_EMOTE, 1); - hasCourted = new VarbitRequirement(14606, 1); + hasCourted = new VarbitRequirement(VarbitID.MISC_ACCEPTEDTORULE, 1); - diplomacyStep1 = new VarplayerRequirement(359, 20); - diplomacyStep2 = new VarplayerRequirement(359, 30); - diplomacyStep3 = new VarplayerRequirement(359, 40); - diplomacyStep4 = new VarplayerRequirement(359, 50); - diplomacyStep5 = new VarplayerRequirement(359, 60); - diplomacyStep6 = new VarplayerRequirement(359, 70); + diplomacyStep1 = new VarplayerRequirement(VarPlayerID.MISC_QUEST, 20); + diplomacyStep2 = new VarplayerRequirement(VarPlayerID.MISC_QUEST, 30); + diplomacyStep3 = new VarplayerRequirement(VarPlayerID.MISC_QUEST, 40); + diplomacyStep4 = new VarplayerRequirement(VarPlayerID.MISC_QUEST, 50); + diplomacyStep5 = new VarplayerRequirement(VarPlayerID.MISC_QUEST, 60); + diplomacyStep6 = new VarplayerRequirement(VarPlayerID.MISC_QUEST, 70); has75Support = new VarbitRequirement(VarbitID.MISC_APPROVAL, 96, Operation.GREATER_EQUAL); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/toweroflife/PuzzleSolver.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/toweroflife/PuzzleSolver.java index b15940e6e92..0a50496100c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/toweroflife/PuzzleSolver.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/toweroflife/PuzzleSolver.java @@ -26,6 +26,7 @@ import net.runelite.client.plugins.microbot.questhelper.steps.widget.WidgetDetails; import net.runelite.api.Client; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.widgets.Widget; import java.util.Arrays; @@ -56,17 +57,6 @@ public PuzzleSolver(Client client) private static final WidgetDetails PRSS_4_WHEEL_RIGHT = new WidgetDetails(510, 135, 0); private static final WidgetDetails PRSS_LEVER_LEFT = new WidgetDetails(510, 136, 0); private static final WidgetDetails PRSS_LEVER_RIGHT = new WidgetDetails(510, 141, 0); - //State Varbits - private static final int PRSS_VBIT_LL = 3356; - private static final int PRSS_VBIT_LR = 3357; - private static final int PRSS_VBIT_P1 = 3347; - private static final int PRSS_VBIT_B1 = 3351; - private static final int PRSS_VBIT_P2 = 3348; - private static final int PRSS_VBIT_B2 = 3352; - private static final int PRSS_VBIT_P3 = 3349; - private static final int PRSS_VBIT_B3 = 3353; - private static final int PRSS_VBIT_P4 = 3350; - private static final int PRSS_VBIT_B4 = 3355; //booleans private boolean prss_3_passed = false; private boolean prss_4_passed = false; @@ -76,9 +66,9 @@ public HashSet pressureSolver() { HashSet highlights = new HashSet<>(); - int ball1Pos = client.getVarbitValue(PRSS_VBIT_B1); - boolean prss_1_locked = client.getVarbitValue(PRSS_VBIT_LL) != 0; - boolean prss_1_plugged = client.getVarbitValue(PRSS_VBIT_P1) == 1; + int ball1Pos = client.getVarbitValue(VarbitID.TOL_PRES1_LEVEL); + boolean prss_1_locked = client.getVarbitValue(VarbitID.TOL_LEVER1) != 0; + boolean prss_1_plugged = client.getVarbitValue(VarbitID.TOL_PRES_SOLVED1) == 1; boolean prss_1_filled = (ball1Pos == 5); if (!prss_1_filled) { @@ -97,9 +87,9 @@ else if (!prss_1_plugged) return highlights; } - int ball2Pos = client.getVarbitValue(PRSS_VBIT_B2); - boolean prss_2_locked = client.getVarbitValue(PRSS_VBIT_LL) != 1; - boolean prss_2_plugged = client.getVarbitValue(PRSS_VBIT_P2) == 1; + int ball2Pos = client.getVarbitValue(VarbitID.TOL_PRES2_LEVEL); + boolean prss_2_locked = client.getVarbitValue(VarbitID.TOL_LEVER1) != 1; + boolean prss_2_plugged = client.getVarbitValue(VarbitID.TOL_PRES_SOLVED2) == 1; boolean prss_2_filled = (ball2Pos == 5); if (!prss_2_filled) { @@ -118,9 +108,9 @@ else if (!prss_2_plugged) return highlights; } - int ball3Pos = client.getVarbitValue(PRSS_VBIT_B3); - boolean prss_3_locked = client.getVarbitValue(PRSS_VBIT_LR) != 0; - boolean prss_3_plugged = client.getVarbitValue(PRSS_VBIT_P3) == 1; + int ball3Pos = client.getVarbitValue(VarbitID.TOL_PRES3_LEVEL); + boolean prss_3_locked = client.getVarbitValue(VarbitID.TOL_LEVER2) != 0; + boolean prss_3_plugged = client.getVarbitValue(VarbitID.TOL_PRES_SOLVED3) == 1; boolean prss_3_filled = (ball3Pos == 5); if (!prss_3_filled) { @@ -144,9 +134,9 @@ else if (!prss_3_plugged) return highlights; } - int ball4Pos = client.getVarbitValue(PRSS_VBIT_B4); - boolean prss_4_locked = client.getVarbitValue(PRSS_VBIT_LR) != 1; - boolean prss_4_plugged = client.getVarbitValue(PRSS_VBIT_P4) == 1; + int ball4Pos = client.getVarbitValue(VarbitID.TOL_PRES4_LEVEL); + boolean prss_4_locked = client.getVarbitValue(VarbitID.TOL_LEVER2) != 1; + boolean prss_4_plugged = client.getVarbitValue(VarbitID.TOL_PRES_SOLVED4) == 1; boolean prss_4_filled = (ball4Pos == 5); if (!prss_4_filled) { @@ -185,12 +175,7 @@ else if (!prss_4_plugged) private static final WidgetDetails PIPE_PCE_3 = new WidgetDetails(511, 11, 0); // T Piece private static final WidgetDetails PIPE_PCE_4 = new WidgetDetails(511, 12, 0); // Big bend private static final WidgetDetails PIPE_PCE_5 = new WidgetDetails(511, 13, 0); // Small bend - //Varbits - private static final int PIPE_VBIT_1_SELECT = 3343; - private static final int PIPE_VBIT_2_SELECT = 3341; - private static final int PIPE_VBIT_3_SELECT = 3344; - private static final int PIPE_VBIT_4_SELECT = 3345; - private static final int PIPE_VBIT_5_SELECT = 3342; + //Orientation private static final int PIPE_PCE_1_ORIENTATION = 22547; private static final int PIPE_PCE_2_ORIENTATION = 22531; private static final int PIPE_PCE_3_ORIENTATION = 22555; @@ -207,11 +192,11 @@ public HashSet pipeSolver() if (pipeSolverSolutions == null) { pipeSolverSolutions = Arrays.asList( - new PipeSolverSolution(PIPE_PCE_1, 159, 69, PIPE_PCE_1_ORIENTATION, PIPE_VBIT_1_SELECT), - new PipeSolverSolution(PIPE_PCE_2, 83, 80, PIPE_PCE_2_ORIENTATION, PIPE_VBIT_2_SELECT), - new PipeSolverSolution(PIPE_PCE_3, 256, 60, PIPE_PCE_3_ORIENTATION, PIPE_VBIT_3_SELECT), - new PipeSolverSolution(PIPE_PCE_4, 237, 155, PIPE_PCE_4_ORIENTATION, PIPE_VBIT_4_SELECT), - new PipeSolverSolution(PIPE_PCE_5, 126, 64, PIPE_PCE_5_ORIENTATION, PIPE_VBIT_5_SELECT) + new PipeSolverSolution(PIPE_PCE_1, 159, 69, PIPE_PCE_1_ORIENTATION, VarbitID.TOL_PIPE_PIECE3_ACTIVE), + new PipeSolverSolution(PIPE_PCE_2, 83, 80, PIPE_PCE_2_ORIENTATION, VarbitID.TOL_PIPE_PIECE1_ACTIVE), + new PipeSolverSolution(PIPE_PCE_3, 256, 60, PIPE_PCE_3_ORIENTATION, VarbitID.TOL_PIPE_PIECE4_ACTIVE), + new PipeSolverSolution(PIPE_PCE_4, 237, 155, PIPE_PCE_4_ORIENTATION, VarbitID.TOL_PIPE_PIECE5_ACTIVE), + new PipeSolverSolution(PIPE_PCE_5, 126, 64, PIPE_PCE_5_ORIENTATION, VarbitID.TOL_PIPE_PIECE2_ACTIVE) ); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/toweroflife/TowerOfLife.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/toweroflife/TowerOfLife.java index 3c4f08c9676..7dd3495bc53 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/toweroflife/TowerOfLife.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/toweroflife/TowerOfLife.java @@ -44,6 +44,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -194,16 +195,16 @@ public void setupConditions() inTowerFloor2 = new ZoneRequirement(tower31, tower32, tower33, tower34); inTowerFloor3 = new ZoneRequirement(tower41, tower42, tower43, tower44); - isPressureMachineBuilt = new VarbitRequirement(3338, 1); - isPressureMachineFixed = new VarbitRequirement(3338, 2); + isPressureMachineBuilt = new VarbitRequirement(VarbitID.TOL_PRES_PROG, 1); + isPressureMachineFixed = new VarbitRequirement(VarbitID.TOL_PRES_PROG, 2); - isPipeMachineBuilt = new VarbitRequirement(3339, 1); - isPipeMachineFixed = new VarbitRequirement(3339, 2); + isPipeMachineBuilt = new VarbitRequirement(VarbitID.TOL_PIPE_PROG, 1); + isPipeMachineFixed = new VarbitRequirement(VarbitID.TOL_PIPE_PROG, 2); - isCageBuilt = new VarbitRequirement(3340, 1); - isCageFixed = new VarbitRequirement(3340, 2); + isCageBuilt = new VarbitRequirement(VarbitID.TOL_CAGE_PROG, 1); + isCageFixed = new VarbitRequirement(VarbitID.TOL_CAGE_PROG, 2); - isTowerFixed = new VarbitRequirement(3354, 1); + isTowerFixed = new VarbitRequirement(VarbitID.TOL_CAGE_STATE, 1); } public void setupSteps() @@ -330,7 +331,7 @@ private void setupFixTower() "Rivets."); Conditions hasAllPipeItems = new Conditions(pipeMachinePipes, pipeMachineRings, pipeMachineRivets); - buildPipeMachine = new ObjectStep(this, 21943, new WorldPoint(2650, 3214, 2), "Build the Pipe Machine."); + buildPipeMachine = new ObjectStep(this, ObjectID.TOL_PIPE_MACHINE_MULTI, new WorldPoint(2650, 3214, 2), "Build the Pipe Machine."); buildPipeMachine.addDialogStep("Yes"); buildPipeMachine.addSubSteps(fixPipeMachineGetPipes, fixPipeMachineGetRings, fixPipeMachineGetRivets, climbUpToFloor1, climbUpToFloor2, climbUpToFloor3, climbDownToGround, climbDownToFloor1, climbDownToFloor2); @@ -357,7 +358,7 @@ private void setupFixTower() "fluid."); Conditions hasAllCageItems = new Conditions(cageMetalBar, cageBindingFluid); - buildCage = new ObjectStep(this, 21941, new WorldPoint(2649, 3218, 3), "Build the cage."); + buildCage = new ObjectStep(this, ObjectID.TOL_CAGE_MULTI, new WorldPoint(2649, 3218, 3), "Build the cage."); buildCage.addDialogStep("Yes"); buildCage.addSubSteps(fixCageGetBars, fixCageGetFluid, climbUpToFloor1, climbUpToFloor2, climbUpToFloor3, climbDownToGround, climbDownToFloor1, climbDownToFloor2); @@ -398,7 +399,7 @@ private void setupGetBuildersCostume() talkToNoFingers = new NpcStep(this, NpcID.TOL_NPC_BUILDER02, new WorldPoint(2645, 3224, 0), "Talk to 'No fingers'."); pickpocketNoFingers = new NpcStep(this, NpcID.TOL_NPC_BUILDER02, new WorldPoint(2645, 3224, 0), "Pickpocket 'No " + "fingers'."); - hasSpokenToNoFingers = new VarbitRequirement(3376, 1); + hasSpokenToNoFingers = new VarbitRequirement(VarbitID.TOL_NOFINGERS_ASKED, 1); ConditionalStep getBoots = new ConditionalStep(this, talkToNoFingers); // "Get the Builder's Boots from 'No fingers'" getBoots.addStep(hasSpokenToNoFingers, pickpocketNoFingers); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/treegnomevillage/TreeGnomeVillage.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/treegnomevillage/TreeGnomeVillage.java index 10fada31695..9beea133524 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/treegnomevillage/TreeGnomeVillage.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/treegnomevillage/TreeGnomeVillage.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, Patyfatycake + * Copyright (c) 2025, pajlada * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,21 +30,29 @@ import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; import net.runelite.client.plugins.microbot.questhelper.questinfo.QuestVarPlayer; -import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemOnTileRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.npc.NpcHintArrowRequirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicType; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; import net.runelite.client.plugins.microbot.questhelper.requirements.util.Operation; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarplayerRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; +import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; import net.runelite.client.plugins.microbot.questhelper.rewards.UnlockReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ItemStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; @@ -51,174 +60,121 @@ import net.runelite.api.gameval.ObjectID; import net.runelite.api.gameval.VarbitID; -import java.util.*; - public class TreeGnomeVillage extends BasicQuestHelper { - //Items Required - ItemRequirement logRequirement, orbsOfProtection; - - private QuestStep talkToCommanderMontai, bringWoodToCommanderMontai, talkToCommanderMontaiAgain, - firstTracker, secondTracker, thirdTracker, fireBallista, fireBallista1, fireBallista2, fireBallista3, fireBallista4, climbTheLadder, - talkToKingBolrenFirstOrb, talkToTheWarlord, fightTheWarlord, returnOrbs, finishQuestDialog, elkoySkip; - - Requirement completeFirstTracker, completeSecondTracker, completeThirdTracker, handedInOrbs, - notCompleteFirstTracker, notCompleteSecondTracker, notCompleteThirdTracker, orbsOfProtectionNearby, givenWood; - - private Conditions talkToSecondTracker, talkToThirdTracker, completedTrackers, - shouldFireBallista1, shouldFireBallista2, shouldFireBallista3, shouldFireBallista4; - - private ConditionalStep retrieveOrb, talkToBolrenAtCentreOfMaze, fireBalistaConditional, returnFirstOrb; - - //Zones - Zone upstairsTower, zoneVillage; - ZoneRequirement isUpstairsTower, insideGnomeVillage; - - private final int TRACKER_1_VARBITID = 599; - private final int TRACKER_2_VARBITID = 600; - private final int TRACKER_3_VARBITID = 601; + // Required items + ItemRequirement sixLogs; + ItemRequirement combatGear; + + // Recommended items + ItemRequirement food; + + // Miscellaneous requirement + VarplayerRequirement givenWood; + + VarbitRequirement needToTalkToFirstTracker; + VarbitRequirement needToTalkToSecondTracker; + VarbitRequirement needToTalkToThirdTracker; + VarbitRequirement shouldFireBallista1; + VarbitRequirement shouldFireBallista2; + VarbitRequirement shouldFireBallista3; + VarbitRequirement shouldFireBallista4; + NpcHintArrowRequirement fightingWarlord; + ItemOnTileRequirement orbsOfProtectionNearby; + /// Has handed in all orbs to King Bolren + VarbitRequirement handedInOrbs; + + ZoneRequirement isUpstairsTower; + ZoneRequirement insideGnomeVillage; + + /// First orb of protection from the battlefield + ItemRequirement firstOrb; + /// Remaining orbs of protection from the Khazard warlord + ItemRequirement orbsOfProtection; + + // Zones + Zone upstairsTower; + Zone zoneVillage; + + // Steps + ConditionalStep talkToBolrenAtCentreOfMaze; + NpcStep talkToCommanderMontai; + NpcStep bringWoodToCommanderMontai; + NpcStep talkToCommanderMontaiAgain; + NpcStep firstTracker; + NpcStep secondTracker; + NpcStep thirdTracker; + ObjectStep fireBallista; + ObjectStep fireBallista1; + ObjectStep fireBallista2; + ObjectStep fireBallista3; + ObjectStep fireBallista4; + ConditionalStep fireBalistaConditional; + ObjectStep climbTheLadder; + ConditionalStep cRetrieveOrb; + NpcStep elkoySkip; + NpcStep talkToKingBolrenFirstOrb; + ConditionalStep returnFirstOrb; + NpcStep talkToTheWarlord; + NpcStep fightTheWarlord; + ItemStep pickupOrb; + NpcStep returnOrbs; + NpcStep finishQuestDialog; + NpcStep elkoySkip2; + ConditionalStep cReturnOrbs; @Override - public Map loadSteps() - { - initializeRequirements(); - setupConditions(); - setupSteps(); - - return CreateSteps(); - } - - private Map CreateSteps() - { - Map steps = new HashMap<>(); - steps.put(0, talkToBolrenAtCentreOfMaze); - steps.put(1, talkToCommanderMontai); - steps.put(2, bringWoodToCommanderMontai); - steps.put(3, talkToCommanderMontaiAgain); - steps.put(4, talkToTrackersStep()); - steps.put(5, retrieveOrbStep()); - steps.put(6, returnFirstOrb); - steps.put(7, defeatWarlordStep()); - steps.put(8, returnOrbsStep()); - return steps; - } - - private QuestStep talkToTrackersStep() - { - fireBalistaConditional = new ConditionalStep(this, fireBallista, "Fire the ballista at the tower."); - fireBalistaConditional.addStep(shouldFireBallista1, fireBallista1); - fireBalistaConditional.addStep(shouldFireBallista2, fireBallista2); - fireBalistaConditional.addStep(shouldFireBallista3, fireBallista3); - fireBalistaConditional.addStep(shouldFireBallista4, fireBallista4); - fireBalistaConditional.addSubSteps(fireBallista, fireBallista1, fireBallista2, fireBallista3, fireBallista4); - - ConditionalStep talkToTrackers = new ConditionalStep(this, firstTracker); - talkToTrackers.addStep(talkToSecondTracker, secondTracker); - talkToTrackers.addStep(talkToThirdTracker, thirdTracker); - talkToTrackers.addStep(completedTrackers, fireBalistaConditional); - - return talkToTrackers; - } - - private QuestStep retrieveOrbStep() + protected void setupZones() { - retrieveOrb = new ConditionalStep(this, climbTheLadder, "Enter the tower by the Crumbled wall and climb the ladder to retrieve the first orb from chest."); - ObjectStep getOrbFromChest = new ObjectStep(this, ObjectID.CHESTCLOSED_KHAZARD, new WorldPoint(2506, 3259, 1), "Retrieve the first orb from chest."); - getOrbFromChest.addAlternateObjects(ObjectID.CHESTOPEN_KHAZARD); - retrieveOrb.addStep(isUpstairsTower, getOrbFromChest); - retrieveOrb.addSubSteps(getOrbFromChest, climbTheLadder); - return retrieveOrb; + upstairsTower = new Zone(new WorldPoint(2500, 3251, 1), new WorldPoint(2506, 3259, 1)); + zoneVillage = new Zone(new WorldPoint(2514, 3158, 0), new WorldPoint(2542, 3175, 0)); } - private QuestStep defeatWarlordStep() + @Override + protected void setupRequirements() { - NpcHintArrowRequirement fightingWarlord = new NpcHintArrowRequirement(NpcID.KHAZARD_WARLORD_COMBAT); - - fightTheWarlord = new NpcStep(this, NpcID.KHAZARD_WARLORD_COMBAT, new WorldPoint(2456, 3301, 0), - "Defeat the warlord and retrieve orbs."); - talkToTheWarlord = new NpcStep(this, NpcID.KHAZARD_WARLORD_CHAT, new WorldPoint(2456, 3301, 0), - "Talk to the Warlord south west of West Ardougne, ready to fight him."); - - ItemRequirement food = new ItemRequirement("Food", ItemCollections.GOOD_EATING_FOOD, -1); - - ItemRequirement combatGear = new ItemRequirement("A Weapon & Armour (magic is best)", -1); - combatGear.setDisplayItemId(BankSlotIcons.getMagicCombatGear()); + givenWood = new VarplayerRequirement(QuestVarPlayer.QUEST_TREE_GNOME_VILLAGE.getId(), 3, Operation.GREATER_EQUAL); - ConditionalStep defeatTheWarlord = new ConditionalStep(this, talkToTheWarlord, - food, - combatGear); + needToTalkToFirstTracker = new VarbitRequirement(VarbitID.GNOMETRACKER_H, 0); + needToTalkToSecondTracker = new VarbitRequirement(VarbitID.GNOMETRACKER_Y, 0); + needToTalkToThirdTracker = new VarbitRequirement(VarbitID.GNOMETRACKER_X, 0); - defeatTheWarlord.addStep(fightingWarlord, fightTheWarlord); + insideGnomeVillage = new ZoneRequirement(zoneVillage); + isUpstairsTower = new ZoneRequirement(upstairsTower); + shouldFireBallista1 = new VarbitRequirement(VarbitID.BALLISTA, 0); + shouldFireBallista2 = new VarbitRequirement(VarbitID.BALLISTA, 1); + shouldFireBallista3 = new VarbitRequirement(VarbitID.BALLISTA, 2); + shouldFireBallista4 = new VarbitRequirement(VarbitID.BALLISTA, 3); - return defeatTheWarlord; - } + fightingWarlord = new NpcHintArrowRequirement(NpcID.KHAZARD_WARLORD_COMBAT); - private QuestStep returnOrbsStep() - { + orbsOfProtectionNearby = new ItemOnTileRequirement(ItemID.ORBS_OF_PROTECTION); handedInOrbs = new VarbitRequirement(VarbitID.BOLREN_GOT_ORBS, 1, Operation.GREATER_EQUAL); - orbsOfProtectionNearby = new ItemOnTileRequirement(ItemID.ORBS_OF_PROTECTION); - ItemStep pickupOrb = new ItemStep(this, - "Pick up the nearby Orbs of Protection.", orbsOfProtection); - returnOrbs.addSubSteps(pickupOrb); + food = new ItemRequirement("Food", ItemCollections.GOOD_EATING_FOOD, -1); + combatGear = new ItemRequirement("Combat gear (magic is best)", -1, -1); + combatGear.setDisplayItemId(BankSlotIcons.getMagicCombatGear()); - ConditionalStep returnOrbsSteps = new ConditionalStep(this, returnOrbs); - returnOrbsSteps.addStep(orbsOfProtectionNearby, pickupOrb); - returnOrbsSteps.addStep(handedInOrbs, finishQuestDialog); + sixLogs = new ItemRequirement("Logs", ItemID.LOGS, 6).hideConditioned(givenWood); - return returnOrbsSteps; - } + firstOrb = new ItemRequirement("Orb of protection", ItemID.ORB_OF_PROTECTION, 1); + firstOrb.setTooltip("If you have lost the orb you can get another from the chest"); - @Override - protected void setupRequirements() - { - givenWood = new VarplayerRequirement(QuestVarPlayer.QUEST_TREE_GNOME_VILLAGE.getId(), 3, Operation.GREATER_EQUAL); - logRequirement = new ItemRequirement("Logs", ItemID.LOGS, 6).hideConditioned(givenWood); orbsOfProtection = new ItemRequirement("Orbs of protection", ItemID.ORBS_OF_PROTECTION); orbsOfProtection.setTooltip("You can retrieve the orbs of protection again by killing the Khazard Warlord again."); } - @Override - protected void setupZones() - { - upstairsTower = new Zone(new WorldPoint(2500, 3251, 1), new WorldPoint(2506, 3259, 1)); - zoneVillage = new Zone(new WorldPoint(2514, 3158, 0), new WorldPoint(2542, 3175, 0)); - } - - public void setupConditions() - { - notCompleteFirstTracker = new VarbitRequirement(TRACKER_1_VARBITID, 0); - notCompleteSecondTracker = new VarbitRequirement(TRACKER_2_VARBITID, 0); - notCompleteThirdTracker = new VarbitRequirement(TRACKER_3_VARBITID, 0); - - completeFirstTracker = new VarbitRequirement(TRACKER_1_VARBITID, 1); - completeSecondTracker = new VarbitRequirement(TRACKER_2_VARBITID, 1); - completeThirdTracker = new VarbitRequirement(TRACKER_3_VARBITID, 1); - - insideGnomeVillage = new ZoneRequirement(zoneVillage); - isUpstairsTower = new ZoneRequirement(upstairsTower); - - talkToSecondTracker = new Conditions(LogicType.AND, completeFirstTracker, notCompleteSecondTracker); - talkToThirdTracker = new Conditions(LogicType.AND, completeFirstTracker, notCompleteThirdTracker); - - completedTrackers = new Conditions(LogicType.AND, completeFirstTracker, completeSecondTracker, completeThirdTracker); - - shouldFireBallista1 = new Conditions(LogicType.AND, completedTrackers, new VarbitRequirement(602, 0)); - shouldFireBallista2 = new Conditions(LogicType.AND, completedTrackers, new VarbitRequirement(602, 1)); - shouldFireBallista3 = new Conditions(LogicType.AND, completedTrackers, new VarbitRequirement(602, 2)); - shouldFireBallista4 = new Conditions(LogicType.AND, completedTrackers, new VarbitRequirement(602, 3)); - } - private void setupSteps() { - QuestStep talkToKingBolren = new NpcStep(this, NpcID.KING_BOLREN, new WorldPoint(2541, 3170, 0), ""); + var talkToKingBolren = new NpcStep(this, NpcID.KING_BOLREN, new WorldPoint(2541, 3170, 0), ""); talkToKingBolren.addDialogStep("Can I help at all?"); talkToKingBolren.addDialogStep("I would be glad to help."); + talkToKingBolren.addDialogStep("Yes."); - DetailedQuestStep goThroughMaze = new DetailedQuestStep(this, new WorldPoint(2541, 3170, 0), "Follow the marked path to walk through the maze."); - List pathThroughMaze = Arrays.asList( + var goThroughMaze = new DetailedQuestStep(this, new WorldPoint(2541, 3170, 0), "Follow the marked path to walk through the maze."); + var pathThroughMaze = List.of( new WorldPoint(2505, 3190, 0), new WorldPoint(2512, 3190, 0), new WorldPoint(2512, 3188, 0), @@ -258,7 +214,8 @@ private void setupSteps() new WorldPoint(2545, 3156, 0), new WorldPoint(2520, 3156, 0), new WorldPoint(2520, 3159, 0), - new WorldPoint(2515, 3159, 0)); + new WorldPoint(2515, 3159, 0) + ); goThroughMaze.setLinePoints(pathThroughMaze); talkToBolrenAtCentreOfMaze = new ConditionalStep(this, goThroughMaze, @@ -266,17 +223,17 @@ private void setupSteps() talkToBolrenAtCentreOfMaze.addStep(insideGnomeVillage, talkToKingBolren); talkToBolrenAtCentreOfMaze.addSubSteps(talkToKingBolren, goThroughMaze); - talkToCommanderMontai = new NpcStep(this, NpcID.COMMANDER_MONTAI, new WorldPoint(2523, 3208, 0), "Speak with Commander Montai."); + talkToCommanderMontai = new NpcStep(this, NpcID.COMMANDER_MONTAI, new WorldPoint(2523, 3208, 0), "Speak with Commander Montai, north-east of the maze entrance."); talkToCommanderMontai.addDialogStep("Ok, I'll gather some wood."); - bringWoodToCommanderMontai = new NpcStep(this, NpcID.COMMANDER_MONTAI, new WorldPoint(2523, 3208, 0), "Speak with Commander Montai again to give him the wood.", logRequirement); + bringWoodToCommanderMontai = new NpcStep(this, NpcID.COMMANDER_MONTAI, new WorldPoint(2523, 3208, 0), "Speak with Commander Montai again to give him the wood.", sixLogs); talkToCommanderMontaiAgain = new NpcStep(this, NpcID.COMMANDER_MONTAI, new WorldPoint(2523, 3208, 0), "Speak with Commander Montai."); talkToCommanderMontaiAgain.addDialogStep("I'll try my best."); - firstTracker = new NpcStep(this, NpcID.TRACKER1, new WorldPoint(2501, 3261, 0), "Talk to the first tracker gnome to the northwest."); - secondTracker = new NpcStep(this, NpcID.TRACKER2, new WorldPoint(2524, 3257, 0), "Talk to the second tracker gnome inside the jail."); - thirdTracker = new NpcStep(this, NpcID.TRACKER3, new WorldPoint(2497, 3234, 0), "Talk to the third tracker gnome to the southwest."); + firstTracker = new NpcStep(this, NpcID.TRACKER1, new WorldPoint(2501, 3261, 0), "Talk to the first tracker gnome to the north-west of the battlefield for the height coordinate."); + secondTracker = new NpcStep(this, NpcID.TRACKER2, new WorldPoint(2524, 3257, 0), "Talk to the second tracker gnome inside the jail for the y coordinate."); + thirdTracker = new NpcStep(this, NpcID.TRACKER3, new WorldPoint(2497, 3234, 0), "Talk to the third tracker gnome to the south-west of the jail."); fireBallista = new ObjectStep(this, ObjectID.CATABOW, new WorldPoint(2509, 3211, 0), ""); fireBallista1 = new ObjectStep(this, ObjectID.CATABOW, new WorldPoint(2509, 3211, 0), ""); @@ -288,38 +245,110 @@ private void setupSteps() fireBallista4 = new ObjectStep(this, ObjectID.CATABOW, new WorldPoint(2509, 3211, 0), ""); fireBallista4.addDialogStep("0004"); + fireBalistaConditional = new ConditionalStep(this, fireBallista, "Fire the ballista at the tower."); + fireBalistaConditional.addStep(shouldFireBallista1, fireBallista1); + fireBalistaConditional.addStep(shouldFireBallista2, fireBallista2); + fireBalistaConditional.addStep(shouldFireBallista3, fireBallista3); + fireBalistaConditional.addStep(shouldFireBallista4, fireBallista4); + climbTheLadder = new ObjectStep(this, ObjectID.LADDER, new WorldPoint(2503, 3252, 0), "Climb the ladder"); - ItemRequirement firstOrb = new ItemRequirement("Orb of protection", ItemID.ORB_OF_PROTECTION, 1); - firstOrb.setTooltip("If you have lost the orb you can get another from the chest"); + var getOrbFromChest = new ObjectStep(this, ObjectID.CHESTCLOSED_KHAZARD, new WorldPoint(2506, 3259, 1), "Retrieve the first orb from chest."); + getOrbFromChest.addAlternateObjects(ObjectID.CHESTOPEN_KHAZARD); + + cRetrieveOrb = new ConditionalStep(this, climbTheLadder, "Enter the tower by the Crumbled wall and climb the ladder to retrieve the first orb from chest."); + cRetrieveOrb.addStep(isUpstairsTower, getOrbFromChest); + cRetrieveOrb.addSubSteps(getOrbFromChest, climbTheLadder); + + elkoySkip = new NpcStep(this, NpcID.ELKOY_2OPS, new WorldPoint(2505, 3191, 0), + "Talk to Elkoy outside the maze to travel to the centre.", firstOrb); + elkoySkip.addDialogStep("Yes please."); + talkToKingBolrenFirstOrb = new NpcStep(this, NpcID.KING_BOLREN, new WorldPoint(2541, 3170, 0), - "Speak to King Bolren in the centre of the Tree Gnome Maze.", firstOrb); + "", firstOrb); talkToKingBolrenFirstOrb.addDialogStep("I will find the warlord and bring back the orbs."); - elkoySkip = new NpcStep(this, NpcID.ELKOY_2OPS, new WorldPoint(2505, 3191, 0), - "Talk to Elkoy outside the maze to travel to the centre."); returnFirstOrb = new ConditionalStep(this, elkoySkip, - "Speak to King Bolren in the centre of the Tree Gnome Maze."); + "Return the Orb of protection to King Bolren in the centre of the Tree Gnome Maze."); returnFirstOrb.addStep(insideGnomeVillage, talkToKingBolrenFirstOrb); returnFirstOrb.addSubSteps(talkToKingBolrenFirstOrb, elkoySkip); - returnOrbs = new NpcStep(this, NpcID.KING_BOLREN, new WorldPoint(2541, 3170, 0), - "Talk to King Bolren in the centre of the Tree Gnome Maze.", orbsOfProtection); + talkToTheWarlord = new NpcStep(this, NpcID.KHAZARD_WARLORD_CHAT, new WorldPoint(2456, 3301, 0), + "Talk to the Khazard warlord, south west of West Ardougne, ready to fight him."); + + fightTheWarlord = new NpcStep(this, NpcID.KHAZARD_WARLORD_COMBAT, new WorldPoint(2456, 3301, 0), + "Defeat the Khazard warlord and retrieve orbs."); + + pickupOrb = new ItemStep(this, "Pick up the nearby Orbs of Protection.", orbsOfProtection); - finishQuestDialog = new NpcStep(this, NpcID.KING_BOLREN, new WorldPoint(2541, 3170, 0), - "Speak to King Bolren in the centre of the Tree Gnome Maze."); - returnOrbs.addSubSteps(finishQuestDialog); + returnOrbs = new NpcStep(this, NpcID.KING_BOLREN, new WorldPoint(2541, 3170, 0), "", orbsOfProtection); + + finishQuestDialog = new NpcStep(this, NpcID.KING_BOLREN, new WorldPoint(2541, 3170, 0), ""); + + elkoySkip2 = new NpcStep(this, NpcID.ELKOY_2OPS, new WorldPoint(2505, 3191, 0), + "Talk to Elkoy outside the maze to travel to the centre.", orbsOfProtection); + elkoySkip2.addDialogStep("Yes please."); + + cReturnOrbs = new ConditionalStep(this, elkoySkip2, "Return the Orbs of protection to King Bolren in the centre of the Tree Gnome Maze."); + cReturnOrbs.addStep(orbsOfProtectionNearby, pickupOrb); + cReturnOrbs.addStep(and(insideGnomeVillage, handedInOrbs), finishQuestDialog); + cReturnOrbs.addStep(insideGnomeVillage, returnOrbs); + } + + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + steps.put(0, talkToBolrenAtCentreOfMaze); + + steps.put(1, talkToCommanderMontai); + steps.put(2, bringWoodToCommanderMontai); + steps.put(3, talkToCommanderMontaiAgain); + + var cTalkToTrackers = new ConditionalStep(this, fireBalistaConditional); + cTalkToTrackers.addStep(needToTalkToFirstTracker, firstTracker); + cTalkToTrackers.addStep(needToTalkToSecondTracker, secondTracker); + cTalkToTrackers.addStep(needToTalkToThirdTracker, thirdTracker); + steps.put(4, cTalkToTrackers); + + steps.put(5, cRetrieveOrb); + steps.put(6, returnFirstOrb); + + var cDefeatTheWarlord = new ConditionalStep(this, talkToTheWarlord, food, combatGear); + cDefeatTheWarlord.addStep(fightingWarlord, fightTheWarlord); + steps.put(7, cDefeatTheWarlord); + + steps.put(8, cReturnOrbs); + + return steps; } @Override public List getItemRequirements() { - return Collections.singletonList(logRequirement); + return List.of( + sixLogs, + combatGear + ); + } + + @Override + public List getItemRecommended() + { + return List.of( + food + ); } @Override public List getCombatRequirements() { - return Collections.singletonList("Khazard Warlord (level 112)"); + return List.of( + "Khazard Warlord (level 112)" + ); } @Override @@ -331,31 +360,59 @@ public QuestPointReward getQuestPointReward() @Override public List getExperienceRewards() { - return Collections.singletonList(new ExperienceReward(Skill.ATTACK, 11450)); + return List.of( + new ExperienceReward(Skill.ATTACK, 11450) + ); + } + + @Override + public List getItemRewards() + { + return List.of( + new ItemReward("Gnome amulet", ItemID.GNOME_AMULET) + ); } @Override public List getUnlockRewards() { - return Collections.singletonList(new UnlockReward("Use of the Spirit Tree transportation method.")); + return List.of( + new UnlockReward("Use of the Spirit Tree transportation method.") + ); } @Override public List getPanels() { - List steps = new ArrayList<>(); - - steps.add(new PanelDetails("Getting started", Collections.singletonList(talkToBolrenAtCentreOfMaze))); - steps.add(new PanelDetails("The three trackers", Arrays.asList( - talkToCommanderMontai, bringWoodToCommanderMontai, talkToCommanderMontaiAgain, - firstTracker, secondTracker, thirdTracker, fireBalistaConditional), logRequirement)); - - ItemRequirement food = new ItemRequirement("Food", ItemCollections.GOOD_EATING_FOOD, -1); - ItemRequirement combatGear = new ItemRequirement("Weapon & Armour (magic is best)", -1); - combatGear.setDisplayItemId(BankSlotIcons.getMagicCombatGear()); - - steps.add(new PanelDetails("Retrieving the orbs", Arrays.asList(retrieveOrb, elkoySkip, talkToKingBolrenFirstOrb, - talkToTheWarlord, fightTheWarlord, returnOrbs), combatGear, food)); - return steps; + var sections = new ArrayList(); + + sections.add(new PanelDetails("Getting started", List.of( + talkToBolrenAtCentreOfMaze + ))); + + sections.add(new PanelDetails("The three trackers", List.of( + talkToCommanderMontai, + bringWoodToCommanderMontai, + talkToCommanderMontaiAgain, + firstTracker, + secondTracker, + thirdTracker, + fireBalistaConditional + ), List.of( + sixLogs + ))); + + sections.add(new PanelDetails("Retrieving the orbs", List.of( + cRetrieveOrb, + returnFirstOrb, + talkToTheWarlord, + fightTheWarlord, + cReturnOrbs + ), List.of( + combatGear, + food + ))); + + return sections; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/trollstronghold/TrollStronghold.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/trollstronghold/TrollStronghold.java index 0b3f8d2ee37..c1c125ca56f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/trollstronghold/TrollStronghold.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/trollstronghold/TrollStronghold.java @@ -52,6 +52,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.gameval.VarPlayerID; import java.util.*; @@ -173,8 +174,8 @@ public void setupConditions() prisonKeyNearby = new ItemOnTileRequirement(ItemID.TROLL_KEY_PRISON); cellKey1Nearby = new ItemOnTileRequirement(cellKey1); cellKey2Nearby = new ItemOnTileRequirement(cellKey2); - freedEadgar = new VarbitRequirement(0, 1); - freedGodric = new VarplayerRequirement(317, 40); + freedEadgar = new VarbitRequirement(VarbitID.TROLL_FREED_EADGAR, 1); + freedGodric = new VarplayerRequirement(VarPlayerID.TROLL_QUEST, 40); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/twilightspromise/TwilightsPromise.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/twilightspromise/TwilightsPromise.java index 1c06e367ef3..79c9c081119 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/twilightspromise/TwilightsPromise.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/twilightspromise/TwilightsPromise.java @@ -34,7 +34,6 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.npc.NpcRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.player.InInstanceRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.quest.QuestRequirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.util.Operation; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarplayerRequirement; @@ -145,9 +144,9 @@ public Map loadSteps() findBazaarKnight.addStep(talkedToBazaarKnight, pickpocketCitizen); ConditionalStep findKnights = new ConditionalStep(this, findColosseumKnight); - findKnights.addStep(LogicHelper.nor(finishedBazaarKnight), findBazaarKnight); - findKnights.addStep(LogicHelper.nor(finishedCothonKnight), findCothonKnight); - findKnights.addStep(LogicHelper.nor(finishedPubKnights), findPubKnights); + findKnights.addStep(nor(finishedBazaarKnight), findBazaarKnight); + findKnights.addStep(nor(finishedCothonKnight), findCothonKnight); + findKnights.addStep(nor(finishedPubKnights), findPubKnights); steps.put(14, findKnights); steps.put(16, findKnights); @@ -222,7 +221,7 @@ protected void setupRequirements() private void setupConditions() { - beenToVarlamore = new VarbitRequirement(9650, 1); + beenToVarlamore = new VarbitRequirement(VarbitID.VARLAMORE_VISITED, 1); inCrypt = new ZoneRequirement(crypt); inColosseumUnderground = new ZoneRequirement(colosseumUnderground); inColosseum = new ZoneRequirement(colosseum); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/undergroundpass/UndergroundPass.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/undergroundpass/UndergroundPass.java index 042b69942bd..86847245226 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/undergroundpass/UndergroundPass.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/undergroundpass/UndergroundPass.java @@ -51,6 +51,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -253,7 +254,7 @@ protected void setupZones() private void setupConditions() { - clothInBag = new VarbitRequirement(9138, 1); + clothInBag = new VarbitRequirement(VarbitID.UPASS_KOFTIK_OUTSIDE, 1); inCastleFloor2 = new ZoneRequirement(castleFloor2); inWestArdougne = new ZoneRequirement(westArdougne); @@ -273,10 +274,10 @@ private void setupConditions() isBeforeTrap3 = new ZoneRequirement(beforeTrap3); isBeforeTrap4 = new ZoneRequirement(beforeTrap4); isBeforeTrap5 = new ZoneRequirement(beforeTrap5); - usedOrb1 = new VarbitRequirement(9122, 1); - usedOrb2 = new VarbitRequirement(9121, 1); - usedOrb3 = new VarbitRequirement(9120, 1); - usedOrb4 = new VarbitRequirement(9119, 1); + usedOrb1 = new VarbitRequirement(VarbitID.UPASS_CAVEORB_4, 1); + usedOrb2 = new VarbitRequirement(VarbitID.UPASS_CAVEORB_3, 1); + usedOrb3 = new VarbitRequirement(VarbitID.UPASS_CAVEORB_2, 1); + usedOrb4 = new VarbitRequirement(VarbitID.UPASS_CAVEORB_1, 1); destroyedAllOrbs = new Conditions(usedOrb1, usedOrb2, usedOrb3, usedOrb4); haveOrb1 = new Conditions(LogicType.OR, usedOrb1, orb1); @@ -295,13 +296,13 @@ private void setupConditions() isAfterMaze = new ZoneRequirement(afterMaze, afterMazeShortcut); isInUnicornArea = new ZoneRequirement(inUnicornArea); isInUnicornArea2 = new ZoneRequirement(inUnicornArea2); - usedHorn = new VarbitRequirement(9136, 1); + usedHorn = new VarbitRequirement(VarbitID.UPASS_CAVE_UNICORN, 1); haveUnicornHorn = new Conditions(LogicType.OR, unicornHorn, usedHorn); isInKnightsArea = new ZoneRequirement(inKnightsArea1, inKnightsArea2, inKnightsArea3); - usedBadgeJerro = new VarbitRequirement(9128, 1); - usedBadgeCarl = new VarbitRequirement(9129, 1); - usedBadgeHarry = new VarbitRequirement(9130, 1); + usedBadgeJerro = new VarbitRequirement(VarbitID.UPASS_PALADINBADGE_1, 1); + usedBadgeCarl = new VarbitRequirement(VarbitID.UPASS_PALADINBADGE_2, 1); + usedBadgeHarry = new VarbitRequirement(VarbitID.UPASS_PALADINBADGE_3, 1); haveBadgeCarl = new Conditions(LogicType.OR, badgeCarl, usedBadgeCarl); haveBadgeHarry = new Conditions(LogicType.OR, badgeHarry, usedBadgeHarry); @@ -310,12 +311,12 @@ private void setupConditions() isInFinalArea = new ZoneRequirement(inFinalArea); isInDwarfCavern = new ZoneRequirement(inDwarfCavern); haveKlanksGauntlets = klanksGauntlets; - givenWitchCat = new VarbitRequirement(9123, 1); - dollImbued = new VarbitRequirement(9118, 1); - pouredBrew = new VarbitRequirement(9134, 1); - dollAshed = new VarbitRequirement(9117, 1); - kalragKilled = new VarbitRequirement(9115, 1); - doveSmeared = new VarbitRequirement(9116, 1); + givenWitchCat = new VarbitRequirement(VarbitID.UPASS_GAVECAT, 1); + dollImbued = new VarbitRequirement(VarbitID.UPASS_SHADOW_ON_DOLL, 1); + pouredBrew = new VarbitRequirement(VarbitID.UPASS_BREW_TOMB, 1); + dollAshed = new VarbitRequirement(VarbitID.UPASS_ASHES_ON_DOLL, 1); + kalragKilled = new VarbitRequirement(VarbitID.UPASS_VENOM_ON_DOLL, 1); + doveSmeared = new VarbitRequirement(VarbitID.UPASS_DOVE_ON_DOLL, 1); isInTemple = new ZoneRequirement(inTemple); isInPostIbanArea = new ZoneRequirement(inPostIbanArea); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/wanted/Wanted.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/wanted/Wanted.java index abc61ecb8f3..c24aa9b27e9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/wanted/Wanted.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/wanted/Wanted.java @@ -55,6 +55,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import net.runelite.api.gameval.VarPlayerID; import java.util.*; @@ -350,33 +351,33 @@ public void setupOtherRequirements() isInRellekka = new ZoneRequirement(rellekka); isInWizardsTower = new ZoneRequirement(wizardsTower); - becameSquire = new VarbitRequirement(1052, 1); - gotAssignmentDetailsFromSavant = new VarbitRequirement(1053, 1); - talkedToLordDaquarius = new VarbitRequirement(1055, 1); - hasKilledBlackKnight = new VarbitRequirement(1055, 2); - investigatedLordDaquarius = new VarbitRequirement(1058, 1); - talkedToMageOfZamorak = new VarbitRequirement(1056, 1); - talkedToSavantNearCanifis = new VarbitRequirement(1065, 1); - mustChaseToChampionsGuild = new VarbitRequirement(1067, 1); - mustChaseToDorgeshKaan = new VarbitRequirement(1069, 1); - mustChaseToEssenceMine = new VarbitRequirement(1071, 1); - mustChaseToMusaPoint = new VarbitRequirement(1073, 1); - mustChaseToDraynorMarket = new VarbitRequirement(1075, 1); - mustChaseToGoblinVillage = new VarbitRequirement(1077, 1); - mustChaseToArdougneMarket = new VarbitRequirement(1079, 1); - mustChaseToGrandTree = new VarbitRequirement(1081, 1); - mustChaseToScorpiusShrine = new VarbitRequirement(1083, 1); - mustChaseToAliMorrisane = new VarbitRequirement(1085, 1); - mustChaseToWizardsTower = new VarbitRequirement(1087, 1); - mustChaseToBrimhavenPub = new VarbitRequirement(1089, 1); - mustChaseToCastleWars = new VarbitRequirement(1091, 1); - mustChaseToRellekka = new VarbitRequirement(1093, 1); - mustChaseToMcGruborsWood = new VarbitRequirement(1095, 1); - mustChaseToSlayerTower = new VarbitRequirement(1097, 1); - mustChaseToYanillePub = new VarbitRequirement(1099, 1); - mustChaseToLumbridgeSwamp = new VarbitRequirement(1101, 1); - - placedRope = new VarbitRequirement(279, 1); + becameSquire = new VarbitRequirement(VarbitID.WANTED_JOKE_OPTION, 1); + gotAssignmentDetailsFromSavant = new VarbitRequirement(VarbitID.WANTED_COMMORB_INTEL, 1); + talkedToLordDaquarius = new VarbitRequirement(VarbitID.WANTED_DAQUARIUS_HINT, 1); + hasKilledBlackKnight = new VarbitRequirement(VarbitID.WANTED_DAQUARIUS_HINT, 2); + investigatedLordDaquarius = new VarbitRequirement(VarbitID.WANTED_LORD_D_EXPOSITION, 1); + talkedToMageOfZamorak = new VarbitRequirement(VarbitID.WANTED_ZAMMY_MAGE_HINT, 1); + talkedToSavantNearCanifis = new VarbitRequirement(VarbitID.WANTED_MISSION1, 1); + mustChaseToChampionsGuild = new VarbitRequirement(VarbitID.WANTED_MISSION2, 1); + mustChaseToDorgeshKaan = new VarbitRequirement(VarbitID.WANTED_MISSION3, 1); + mustChaseToEssenceMine = new VarbitRequirement(VarbitID.WANTED_MISSION4, 1); + mustChaseToMusaPoint = new VarbitRequirement(VarbitID.WANTED_MISSION5, 1); + mustChaseToDraynorMarket = new VarbitRequirement(VarbitID.WANTED_MISSION6, 1); + mustChaseToGoblinVillage = new VarbitRequirement(VarbitID.WANTED_MISSION7, 1); + mustChaseToArdougneMarket = new VarbitRequirement(VarbitID.WANTED_MISSION8, 1); + mustChaseToGrandTree = new VarbitRequirement(VarbitID.WANTED_MISSION9, 1); + mustChaseToScorpiusShrine = new VarbitRequirement(VarbitID.WANTED_MISSION10, 1); + mustChaseToAliMorrisane = new VarbitRequirement(VarbitID.WANTED_MISSION11, 1); + mustChaseToWizardsTower = new VarbitRequirement(VarbitID.WANTED_MISSION12, 1); + mustChaseToBrimhavenPub = new VarbitRequirement(VarbitID.WANTED_MISSION13, 1); + mustChaseToCastleWars = new VarbitRequirement(VarbitID.WANTED_MISSION14, 1); + mustChaseToRellekka = new VarbitRequirement(VarbitID.WANTED_MISSION15, 1); + mustChaseToMcGruborsWood = new VarbitRequirement(VarbitID.WANTED_MISSION16, 1); + mustChaseToSlayerTower = new VarbitRequirement(VarbitID.WANTED_MISSION17, 1); + mustChaseToYanillePub = new VarbitRequirement(VarbitID.WANTED_MISSION18, 1); + mustChaseToLumbridgeSwamp = new VarbitRequirement(VarbitID.WANTED_MISSION19, 1); + + placedRope = new VarbitRequirement(VarbitID.SWAMP_CAVES_ROPED_ENTRANCE, 1); blackKnightNearby = new NpcHintArrowRequirement(NpcID.WANTED_SUMMONED_BLACK_KNIGHT); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/watchtower/Watchtower.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/watchtower/Watchtower.java index d3b9fc3e843..8ac536a6890 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/watchtower/Watchtower.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/watchtower/Watchtower.java @@ -49,6 +49,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -367,7 +368,7 @@ public void setupConditions() hasRelic3 = new Conditions(true, LogicType.OR, relic3, new WidgetTextRequirement(InterfaceID.Questjournal.TEXTLAYER, true, "I gave the dragon bones to Toban.")); - gettingOgreRockCake = new VarbitRequirement(3120, 1); + gettingOgreRockCake = new VarbitRequirement(VarbitID.WATCHTOWER_GATE_CHAT_3, 1); gaveCake = new Conditions(true, LogicType.OR, new DialogRequirement("This time we will let it go."), new DialogRequirement("Well, well, look at this."), @@ -375,7 +376,7 @@ public void setupConditions() inAreaBeforeBridgeJump ); // 3319, 1, tried to enter city - knowsRiddle = new VarbitRequirement(3121, 1); + knowsRiddle = new VarbitRequirement(VarbitID.WATCHTOWER_PUZZLE_CHAT, 1); talkedToScaredSkavid = new Conditions(true, LogicType.OR, new DialogRequirement("Master, how are you doing", "Those will gets you started."), new WidgetTextRequirement(InterfaceID.Questjournal.TEXTLAYER, true, "ar, nod, gor, ig, cur")); @@ -389,23 +390,23 @@ public void setupConditions() talkedToSkavid4 = new Conditions(true, LogicType.OR, new ChatMessageRequirement(inSkavidRoom4, "It seems the skavid understood you.", "You have already talked to this skavid."), new WidgetTextRequirement(InterfaceID.Questjournal.TEXTLAYER, true, "'Gor nod'")); - seenShamans = new VarbitRequirement(3125, 1); + seenShamans = new VarbitRequirement(VarbitID.WATCHTOWER_NIGHTSHADE_USED, 1); - killedOgre1 = new VarbitRequirement(3131, 1); - killedOgre2 = new VarbitRequirement(3132, 1); - killedOgre3 = new VarbitRequirement(3133, 1); - killedOgre4 = new VarbitRequirement(3134, 1); - killedOgre5 = new VarbitRequirement(3135, 1); - killedOgre6 = new VarbitRequirement(3136, 1); + killedOgre1 = new VarbitRequirement(VarbitID.WATCHTOWER_SHAMAN_1, 1); + killedOgre2 = new VarbitRequirement(VarbitID.WATCHTOWER_SHAMAN_2, 1); + killedOgre3 = new VarbitRequirement(VarbitID.WATCHTOWER_SHAMAN_3, 1); + killedOgre4 = new VarbitRequirement(VarbitID.WATCHTOWER_SHAMAN_4, 1); + killedOgre5 = new VarbitRequirement(VarbitID.WATCHTOWER_SHAMAN_5, 1); + killedOgre6 = new VarbitRequirement(VarbitID.WATCHTOWER_SHAMAN_6, 1); killedAllOgres = new Conditions(killedOgre1, killedOgre2, killedOgre3, killedOgre4, killedOgre5, killedOgre6); - gotCrystal4 = new VarbitRequirement(3124, 1); + gotCrystal4 = new VarbitRequirement(VarbitID.WATCHTOWER_ROCK_MINED, 1); - placedCrystal1 = new VarbitRequirement(3128, 1); - placedCrystal2 = new VarbitRequirement(3129, 1); - placedCrystal3 = new VarbitRequirement(3127, 1); - placedCrystal4 = new VarbitRequirement(3130, 1); + placedCrystal1 = new VarbitRequirement(VarbitID.WATCHTOWER_PILLAR_2, 1); + placedCrystal2 = new VarbitRequirement(VarbitID.WATCHTOWER_PILLAR_3, 1); + placedCrystal3 = new VarbitRequirement(VarbitID.WATCHTOWER_PILLAR_1, 1); + placedCrystal4 = new VarbitRequirement(VarbitID.WATCHTOWER_PILLAR_4, 1); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/waterfallquest/WaterfallQuest.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/waterfallquest/WaterfallQuest.java index a61dffd8cab..5c5ca852e37 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/waterfallquest/WaterfallQuest.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/waterfallquest/WaterfallQuest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, Zoinkwiz + * Copyright (c) 2025, pajlada * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,120 +28,146 @@ import net.runelite.client.plugins.microbot.questhelper.collections.ItemCollections; import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; -import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.conditional.Conditions; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.and; import net.runelite.client.plugins.microbot.questhelper.requirements.var.VarbitRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.Zone; import net.runelite.client.plugins.microbot.questhelper.requirements.zone.ZoneRequirement; import net.runelite.client.plugins.microbot.questhelper.rewards.ExperienceReward; import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; -import net.runelite.client.plugins.microbot.questhelper.steps.*; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; +import net.runelite.client.plugins.microbot.questhelper.steps.DetailedQuestStep; +import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; +import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; +import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; - -import java.util.*; +import net.runelite.api.gameval.VarbitID; public class WaterfallQuest extends BasicQuestHelper { - //Items Required - ItemRequirement rope, highlightRope, glarialsPebble, glarialsUrn, glarialsAmulet, unequippedAmulet, book, key, baxKey, airRunes, waterRunes, earthRunes, airRune, waterRune, - earthRune; - - //Items Recommended - ItemRequirement gamesNecklace, food; - - Requirement inGnomeBasement, inGlarialTomb, inFalls, onHudonIsland, onDeadTreeIsland, onLedge, inUpstairsInHouse, - inGolrieRoom, gotPebble, inEndRoom, inEnd2; - - QuestStep talkToAlmera, boardRaft, talkToHudon, useRopeOnRock, useRopeOnTree, getInBarrel, goUpstairsHadley, searchBookcase, - readBook, enterGnomeDungeon, searchGnomeCrate, enterGnomeDoor, talkToGolrie, usePebble, searchGlarialCoffin, - getFinalItems, boardRaftFinal, useRopeOnRockFinal, useRopeOnTreeFinal, enterFalls, searchFallsCrate, useKeyOnFallsDoor, - useRunes, useAmuletOnStatue, useUrnOnChalice; - + // Required items + ItemRequirement rope; + ItemRequirement airRunes; + ItemRequirement waterRunes; + ItemRequirement earthRunes; + + // Recommended items + ItemRequirement gamesNecklace; + ItemRequirement food; + + // Mid-quest requirements + ItemRequirement highlightRope; + ItemRequirement glarialsPebble; + ItemRequirement glarialsPebbleWithBank; + ItemRequirement glarialsUrn; + ItemRequirement glarialsAmulet; + ItemRequirement unequippedAmulet; + ItemRequirement book; + ItemRequirement key; + ItemRequirement baxKey; + ItemRequirement airRune; + ItemRequirement waterRune; + ItemRequirement earthRune; + + // Zones + Zone gnomeBasement; + Zone glarialTomb; + Zone falls; + Zone endRoom; + Zone end2; + Zone hudonIsland; + Zone deadTreeIsland; + Zone ledge; + Zone upstairsInHouse; + Zone golrieRoom; + + // Miscellaneous requirements + ZoneRequirement inGnomeBasement; + ZoneRequirement inGlarialTomb; + ZoneRequirement inFalls; + ZoneRequirement onHudonIsland; + ZoneRequirement onDeadTreeIsland; + ZoneRequirement onLedge; + ZoneRequirement inUpstairsInHouse; + ZoneRequirement inGolrieRoom; + VarbitRequirement gotPebble; + ZoneRequirement inEndRoom; + ZoneRequirement inEnd2; + + // Steps + NpcStep talkToAlmera; + + ObjectStep boardRaft; + NpcStep talkToHudon; + + ObjectStep useRopeOnRock; + ObjectStep useRopeOnTree; + ObjectStep getInBarrel; + ObjectStep goUpstairsHadley; + ObjectStep searchBookcase; + DetailedQuestStep readBook; + + ConditionalStep goGetPebble; + ObjectStep leaveHouse; + ObjectStep enterGnomeDungeon; + ObjectStep searchGnomeCrate; + ObjectStep enterGnomeDoor; + NpcStep talkToGolrie; + + ConditionalStep getGlarialStuff; + ObjectStep usePebble; + ObjectStep searchGlarialCoffin; ObjectStep searchGlarialChest; - ConditionalStep goGetPebble, getGlarialStuff; - - //Zones - Zone gnomeBasement, glarialTomb, falls, endRoom, end2, hudonIsland, deadTreeIsland, ledge, upstairsInHouse, golrieRoom; + DetailedQuestStep getFinalItems; + ObjectStep boardRaftFinal; + ObjectStep useRopeOnRockFinal; + ObjectStep useRopeOnTreeFinal; + DetailedQuestStep equipAmulet; + ObjectStep enterFalls; + ObjectStep searchFallsCrate; + ObjectStep useKeyOnFallsDoor; + DetailedQuestStep useRunes; + ObjectStep useAmuletOnStatue; + ObjectStep useUrnOnChalice; @Override - public Map loadSteps() + protected void setupZones() { - initializeRequirements(); - setupConditions(); - setupSteps(); - Map steps = new HashMap<>(); - - steps.put(0, talkToAlmera); - - ConditionalStep goTalkToHudon = new ConditionalStep(this, boardRaft); - goTalkToHudon.addStep(onHudonIsland, talkToHudon); - - steps.put(1, goTalkToHudon); - - ConditionalStep goReadBook = new ConditionalStep(this, goUpstairsHadley); - goReadBook.addStep(book, readBook); - goReadBook.addStep(inUpstairsInHouse, searchBookcase); - goReadBook.addStep(onLedge, getInBarrel); - goReadBook.addStep(onDeadTreeIsland, useRopeOnTree); - goReadBook.addStep(onHudonIsland, useRopeOnRock); - - steps.put(2, goReadBook); - - // TODO: Add lines to guide through maze - goGetPebble = new ConditionalStep(this, enterGnomeDungeon); - goGetPebble.addStep(inGolrieRoom, talkToGolrie); - goGetPebble.addStep(new Conditions(inGnomeBasement, key), enterGnomeDoor); - goGetPebble.addStep(inGnomeBasement, searchGnomeCrate); - goGetPebble.setLockingCondition(gotPebble); - - getGlarialStuff = new ConditionalStep(this, usePebble); - getGlarialStuff.addStep(new Conditions(glarialsAmulet.alsoCheckBank(questBank), inGlarialTomb), searchGlarialCoffin); - getGlarialStuff.addStep(inGlarialTomb, searchGlarialChest); - getGlarialStuff.setLockingCondition(new Conditions(new Conditions(glarialsAmulet.alsoCheckBank(questBank), glarialsUrn.alsoCheckBank(questBank)))); - - ConditionalStep puttingToRest = new ConditionalStep(this, getFinalItems); - puttingToRest.addStep(inEnd2, useUrnOnChalice); - puttingToRest.addStep(inEndRoom, useRunes); - puttingToRest.addStep(new Conditions(inFalls, baxKey), useKeyOnFallsDoor); - puttingToRest.addStep(inFalls, searchFallsCrate); - puttingToRest.addStep(onLedge, enterFalls); - puttingToRest.addStep(onDeadTreeIsland, useRopeOnTreeFinal); - puttingToRest.addStep(onHudonIsland, useRopeOnRockFinal); - puttingToRest.addStep(new Conditions(glarialsUrn, glarialsAmulet, airRunes, earthRunes, waterRunes, rope), boardRaftFinal); - - ConditionalStep finishingSteps = new ConditionalStep(this, goGetPebble); - finishingSteps.addStep(new Conditions(glarialsUrn.alsoCheckBank(questBank), glarialsAmulet.alsoCheckBank(questBank)), puttingToRest); - finishingSteps.addStep(gotPebble, getGlarialStuff); - - steps.put(3, finishingSteps); - steps.put(4, finishingSteps); - steps.put(5, puttingToRest); - steps.put(6, puttingToRest); - steps.put(7, puttingToRest); // 7 didn't occur during testing - steps.put(8, puttingToRest); - - return steps; + gnomeBasement = new Zone(new WorldPoint(2497, 9552, 0), new WorldPoint(2559, 9593, 0)); + glarialTomb = new Zone(new WorldPoint(2524, 9801, 0), new WorldPoint(2557, 9849, 0)); + golrieRoom = new Zone(new WorldPoint(2502, 9576, 0), new WorldPoint(2523, 9593, 0)); + hudonIsland = new Zone(new WorldPoint(2510, 3476, 0), new WorldPoint(2515, 3482, 0)); + deadTreeIsland = new Zone(new WorldPoint(2512, 3465, 0), new WorldPoint(2513, 3475, 0)); + ledge = new Zone(new WorldPoint(2510, 3462, 0), new WorldPoint(2513, 3464, 0)); + upstairsInHouse = new Zone(new WorldPoint(2516, 3424, 1), new WorldPoint(2520, 3431, 1)); + falls = new Zone(new WorldPoint(2556, 9861, 0), new WorldPoint(2595, 9920, 0)); + endRoom = new Zone(new WorldPoint(2561, 9902, 0), new WorldPoint(2570, 9917, 0)); + end2 = new Zone(new WorldPoint(2599, 9890, 0), new WorldPoint(2608, 9916, 0)); } @Override protected void setupRequirements() { - highlightRope = new ItemRequirement("Rope", ItemID.ROPE).isNotConsumed(); - highlightRope.setHighlightInInventory(true); rope = new ItemRequirement("Rope", ItemID.ROPE).isNotConsumed(); + highlightRope = rope.highlighted(); book = new ItemRequirement("Book on baxtorian", ItemID.BAXTORIAN_BOOK_WATERFALL_QUEST); book.setHighlightInInventory(true); glarialsPebble = new ItemRequirement("Glarial's pebble", ItemID.GLARIALS_PEBBLE_WATERFALL_QUEST); glarialsPebble.setHighlightInInventory(true); glarialsPebble.setTooltip("You can get another from Golrie under the Tree Gnome Village"); + glarialsPebbleWithBank = glarialsPebble.alsoCheckBank(questBank); glarialsUrn = new ItemRequirement("Glarial's urn", ItemID.GLARIALS_URN_FULL_WATERFALL_QUEST); glarialsUrn.setTooltip("You can get another from the chest in Glarial's tomb"); glarialsAmulet = new ItemRequirement("Glarial's amulet", ItemID.GLARIALS_AMULET_WATERFALL_QUEST, 1, true); @@ -158,25 +185,7 @@ protected void setupRequirements() gamesNecklace = new ItemRequirement("Games necklace", ItemCollections.GAMES_NECKLACES); food = new ItemRequirement("Food", ItemCollections.GOOD_EATING_FOOD, -1); - } - @Override - protected void setupZones() - { - gnomeBasement = new Zone(new WorldPoint(2497, 9552, 0), new WorldPoint(2559, 9593, 0)); - glarialTomb = new Zone(new WorldPoint(2524, 9801, 0), new WorldPoint(2557, 9849, 0)); - golrieRoom = new Zone(new WorldPoint(2502, 9576, 0), new WorldPoint(2523, 9593, 0)); - hudonIsland = new Zone(new WorldPoint(2510, 3476, 0), new WorldPoint(2515, 3482, 0)); - deadTreeIsland = new Zone(new WorldPoint(2512, 3465, 0), new WorldPoint(2513, 3475, 0)); - ledge = new Zone(new WorldPoint(2510, 3462, 0), new WorldPoint(2513, 3464, 0)); - upstairsInHouse = new Zone(new WorldPoint(2516, 3424, 1), new WorldPoint(2520, 3431, 1)); - falls = new Zone(new WorldPoint(2556, 9861, 0), new WorldPoint(2595, 9920, 0)); - endRoom = new Zone(new WorldPoint(2561, 9902, 0), new WorldPoint(2570, 9917, 0)); - end2 = new Zone(new WorldPoint(2599, 9890, 0), new WorldPoint(2608, 9916, 0)); - } - - public void setupConditions() - { onDeadTreeIsland = new ZoneRequirement(deadTreeIsland); onHudonIsland = new ZoneRequirement(hudonIsland); onLedge = new ZoneRequirement(ledge); @@ -187,15 +196,16 @@ public void setupConditions() inFalls = new ZoneRequirement(falls); inEndRoom = new ZoneRequirement(endRoom); inEnd2 = new ZoneRequirement(end2); - gotPebble = new VarbitRequirement(9110, 1); + gotPebble = new VarbitRequirement(VarbitID.WATERFALL_GOLRIE_CHAT, 1); } public void setupSteps() { - talkToAlmera = new NpcStep(this, NpcID.ALMERA_WATERFALL_QUEST, new WorldPoint(2521, 3495, 0), "Talk to Almera on top of Baxtorian Falls."); - talkToAlmera.addDialogStep("How can I help?"); - boardRaft = new ObjectStep(this, ObjectID.LOGRAFT_WATERFALL_QUEST, new WorldPoint(2509, 3494, 0), "Board the log raft west of Almera."); - talkToHudon = new NpcStep(this, NpcID.HUDON_WATERFALL_QUEST, new WorldPoint(2511, 3484, 0), "Talk to Hudon."); + talkToAlmera = new NpcStep(this, NpcID.ALMERA_WATERFALL_QUEST, new WorldPoint(2521, 3495, 0), "Talk to Almera on top of Baxtorian Falls, south of Barbarian Outpost."); + talkToAlmera.addDialogStep("Yes."); + + boardRaft = new ObjectStep(this, ObjectID.LOGRAFT_WATERFALL_QUEST, new WorldPoint(2509, 3494, 0), "Board the log raft west of Almera.", rope); + talkToHudon = new NpcStep(this, NpcID.HUDON_WATERFALL_QUEST, new WorldPoint(2511, 3484, 0), "Talk to Hudon.", rope); useRopeOnRock = new ObjectStep(this, ObjectID.CROSSING_ROCK_WATERFALL_QUEST, new WorldPoint(2512, 3468, 0), "Use a rope on the rock to" + " the south.", highlightRope); useRopeOnRock.addIcon(ItemID.ROPE); @@ -207,9 +217,9 @@ public void setupSteps() searchBookcase = new ObjectStep(this, ObjectID.BOOKCASE_WATERFALL_QUEST, new WorldPoint(2520, 3427, 1), "Search the south east bookcase."); readBook = new DetailedQuestStep(this, "Read the book.", book); - enterGnomeDungeon = new ObjectStep(this, ObjectID.ROVING_GOLRIE_LADDER_TO_CELLAR, new WorldPoint(2533, 3155, 0), + enterGnomeDungeon = new ObjectStep(this, ObjectID.ROVING_GOLRIE_LADDER_TO_CELLAR, new WorldPoint(2533, 3155, 0), "Go to the centre of the Tree Gnome Village and go down the ladder at the entrance."); - ((ObjectStep) enterGnomeDungeon).setLinePoints(Arrays.asList( + enterGnomeDungeon.setLinePoints(Arrays.asList( new WorldPoint(2505, 3190, 0), new WorldPoint(2512, 3190, 0), new WorldPoint(2512, 3188, 0), @@ -248,16 +258,18 @@ public void setupSteps() new WorldPoint(2545, 3150, 0), new WorldPoint(2545, 3155, 0), new WorldPoint(2533, 3155, 0) - )); + )); + leaveHouse = new ObjectStep(this, ObjectID.SPIRALSTAIRSTOP, new WorldPoint(2518, 3430, 1), "Go to the centre of the Tree Gnome Village and go down the ladder at the entrance."); + enterGnomeDungeon.addSubSteps(leaveHouse); searchGnomeCrate = new ObjectStep(this, ObjectID.GOLRIE_CRATE_WATERFALL_QUEST, new WorldPoint(2548, 9565, 0), "Search the off-coloured crate in the east room."); enterGnomeDoor = new ObjectStep(this, ObjectID.GOLRIE_GATE_WATERFALL_QUEST, new WorldPoint(2515, 9575, 0), "Go through the gate in the west room.", key); talkToGolrie = new NpcStep(this, NpcID.GOLRIE_WATERFALL_QUEST, new WorldPoint(2514, 9580, 0), "Talk to Golrie."); - usePebble = new ObjectStep(this, ObjectID.GLARIALS_TOMBSTONE_WATERFALL_QUEST, new WorldPoint(2559, 3445, 0), "Bank everything besides the pebble and some food. After, go use Glarial's pebble to Glarial's Tombstone east of Baxtorian Falls.", glarialsPebble); + usePebble = new ObjectStep(this, ObjectID.GLARIALS_TOMBSTONE_WATERFALL_QUEST, new WorldPoint(2559, 3445, 0), "Bank everything besides the pebble and some food. Then use Glarial's pebble on Glarial's Tombstone east of Baxtorian Falls.", glarialsPebble); usePebble.addIcon(ItemID.GLARIALS_PEBBLE_WATERFALL_QUEST); - searchGlarialChest = new ObjectStep(this, ObjectID.GLARIALS_CHEST_CLOSED_WATERFALL_QUEST, new WorldPoint(2530, 9844, 0), "Search the chest in the western room."); + searchGlarialChest = new ObjectStep(this, ObjectID.GLARIALS_CHEST_CLOSED_WATERFALL_QUEST, new WorldPoint(2530, 9844, 0), "Search the chest in the western room for Glarial's amulet."); searchGlarialChest.addAlternateObjects(ObjectID.GLARIALS_CHEST_OPEN_WATERFALL_QUEST); - searchGlarialCoffin = new ObjectStep(this, ObjectID.GLARIALS_TOMB_WATERFALL_QUEST, new WorldPoint(2542, 9812, 0), "Search Glarial's Tomb in the south room."); + searchGlarialCoffin = new ObjectStep(this, ObjectID.GLARIALS_TOMB_WATERFALL_QUEST, new WorldPoint(2542, 9812, 0), "Search Glarial's Tomb in the south room for Glarial's url."); getFinalItems = new DetailedQuestStep(this, "Leave Glarial's Tomb and get 6 air, water, and earth runes, a rope, glarial's amulet, glarial's urn, and some food.", airRunes, earthRunes, waterRunes, glarialsAmulet, glarialsUrn, rope); boardRaftFinal = new ObjectStep(this, ObjectID.LOGRAFT_WATERFALL_QUEST, new WorldPoint(2509, 3494, 0), "Board the log raft west of Almera."); @@ -266,46 +278,108 @@ public void setupSteps() useRopeOnRockFinal.addIcon(ItemID.ROPE); useRopeOnTreeFinal = new ObjectStep(this, ObjectID.OVERHANGING_TREE1_WATERFALL_QUEST, new WorldPoint(2512, 3465, 0), "Use a rope on the dead tree.", highlightRope); useRopeOnTreeFinal.addIcon(ItemID.ROPE); - enterFalls = new ObjectStep(this, ObjectID.WATERFALL_LEDGE_DOOR, new WorldPoint(2511, 3464, 0), "EQUIP Glarial's amulet, then enter the falls.", glarialsAmulet); + equipAmulet = new DetailedQuestStep(this, "Equip Glarial's amulet.", glarialsAmulet.highlighted()); + enterFalls = new ObjectStep(this, ObjectID.WATERFALL_LEDGE_DOOR, new WorldPoint(2511, 3464, 0), "Enter the falls with Glarial's amulet equipped.", glarialsAmulet); searchFallsCrate = new ObjectStep(this, ObjectID.BAXTORIAN_CRATE_WATERFALL_QUEST, new WorldPoint(2589, 9888, 0), "Search the crate in the east room for a key."); - useKeyOnFallsDoor = new ObjectStep(this, ObjectID.BAXTORIAN_DOOR_2_WATERFALL_QUEST, new WorldPoint(2566, 9901, 0), "Go through the doors from the west room.", baxKey); + useKeyOnFallsDoor = new ObjectStep(this, ObjectID.BAXTORIAN_DOOR_2_WATERFALL_QUEST, new WorldPoint(2566, 9901, 0), "Enter the west room with the key.", baxKey); useRunes = new DetailedQuestStep(this, "Use 1 earth, water and air rune on each of the 6 pillars in the room. Afterwards, use Glarial's amulet on the statue of Glarial.", airRune, waterRune, earthRune); useAmuletOnStatue = new ObjectStep(this, ObjectID.STATUE_QUEEN_WATERFALL_QUEST, new WorldPoint(2603, 9915, 0), "Use Glarial's amulet on the Statue of Glarial", unequippedAmulet); useAmuletOnStatue.addIcon(ItemID.GLARIALS_AMULET_WATERFALL_QUEST); - useUrnOnChalice = new ObjectStep(this, ObjectID.BAXTORIAN_CHALICE_WATERFALL_QUEST, new WorldPoint(2604, 9911, 0), "DO NOT LEFT-CLICK THE CHALICE! Use Glarial's urn on the Chalice to finish the quest.", glarialsUrn); + useUrnOnChalice = new ObjectStep(this, ObjectID.BAXTORIAN_CHALICE_WATERFALL_QUEST, new WorldPoint(2604, 9911, 0), "DO NOT LEFT-CLICK THE CHALICE! Use Glarial's urn on the Chalice to finish the quest.", glarialsUrn.highlighted()); useUrnOnChalice.addIcon(ItemID.GLARIALS_URN_FULL_WATERFALL_QUEST); } @Override - public List getItemRequirements() + public Map loadSteps() { - ArrayList reqs = new ArrayList<>(); - reqs.add(highlightRope); - reqs.add(airRunes); - reqs.add(earthRunes); - reqs.add(waterRunes); - return reqs; + initializeRequirements(); + setupSteps(); + + Map steps = new HashMap<>(); + + steps.put(0, talkToAlmera); + + var goTalkToHudon = new ConditionalStep(this, boardRaft); + goTalkToHudon.addStep(onHudonIsland, talkToHudon); + + steps.put(1, goTalkToHudon); + + var goReadBook = new ConditionalStep(this, goUpstairsHadley); + goReadBook.addStep(book, readBook); + goReadBook.addStep(inUpstairsInHouse, searchBookcase); + goReadBook.addStep(onLedge, getInBarrel); + goReadBook.addStep(onDeadTreeIsland, useRopeOnTree); + goReadBook.addStep(onHudonIsland, useRopeOnRock); + + steps.put(2, goReadBook); + + goGetPebble = new ConditionalStep(this, enterGnomeDungeon); + goGetPebble.addStep(inGolrieRoom, talkToGolrie); + goGetPebble.addStep(and(inGnomeBasement, key), enterGnomeDoor); + goGetPebble.addStep(inGnomeBasement, searchGnomeCrate); + goGetPebble.addStep(inUpstairsInHouse, leaveHouse); + goGetPebble.setLockingCondition(glarialsPebbleWithBank); + + getGlarialStuff = new ConditionalStep(this, usePebble); + getGlarialStuff.addStep(and(unequippedAmulet.alsoCheckBank(questBank), inGlarialTomb), searchGlarialCoffin); + getGlarialStuff.addStep(inGlarialTomb, searchGlarialChest); + getGlarialStuff.setLockingCondition(and(unequippedAmulet.alsoCheckBank(questBank), glarialsUrn.alsoCheckBank(questBank))); + + var puttingToRest = new ConditionalStep(this, getFinalItems); + puttingToRest.addStep(inEnd2, useUrnOnChalice); + puttingToRest.addStep(inEndRoom, useRunes); + puttingToRest.addStep(and(inFalls, baxKey), useKeyOnFallsDoor); + puttingToRest.addStep(inFalls, searchFallsCrate); + puttingToRest.addStep(and(onLedge, glarialsAmulet), enterFalls); + puttingToRest.addStep(onLedge, equipAmulet); + puttingToRest.addStep(onDeadTreeIsland, useRopeOnTreeFinal); + puttingToRest.addStep(onHudonIsland, useRopeOnRockFinal); + puttingToRest.addStep(and(glarialsUrn, glarialsAmulet, airRunes, earthRunes, waterRunes, rope), boardRaftFinal); + + var finishingSteps = new ConditionalStep(this, goGetPebble); + finishingSteps.addStep(and(glarialsUrn.alsoCheckBank(questBank), glarialsAmulet.alsoCheckBank(questBank)), puttingToRest); + finishingSteps.addStep(gotPebble, getGlarialStuff); + + steps.put(3, finishingSteps); + steps.put(4, finishingSteps); + steps.put(5, puttingToRest); + steps.put(6, puttingToRest); + steps.put(7, puttingToRest); // 7 didn't occur during testing + steps.put(8, puttingToRest); + + return steps; } @Override - public List getCombatRequirements() + public List getItemRequirements() { - ArrayList reqs = new ArrayList<>(); - reqs.add("Able to survive enemies up to level 86 attacking you"); - return reqs; + return List.of( + highlightRope, + airRunes, + earthRunes, + waterRunes + ); } @Override public List getItemRecommended() { - ArrayList reqs = new ArrayList<>(); - reqs.add(gamesNecklace); - reqs.add(food); - return reqs; + return List.of( + gamesNecklace, + food + ); + } + + @Override + public List getCombatRequirements() + { + return List.of( + "Able to survive enemies up to level 86 attacking you" + ); } @Override @@ -317,38 +391,83 @@ public QuestPointReward getQuestPointReward() @Override public List getExperienceRewards() { - return Arrays.asList( - new ExperienceReward(Skill.STRENGTH, 13750), - new ExperienceReward(Skill.ATTACK, 13750)); + return List.of( + new ExperienceReward(Skill.STRENGTH, 13750), + new ExperienceReward(Skill.ATTACK, 13750) + ); } @Override public List getItemRewards() { - return Arrays.asList( - new ItemReward("Diamonds", ItemID.DIAMOND, 2), - new ItemReward("Gold Bars", ItemID.GOLD_BAR, 2), - new ItemReward("Mithril Seeds", ItemID.MITHRIL_SEED, 40)); + return List.of( + new ItemReward("Diamonds", ItemID.DIAMOND, 2), + new ItemReward("Gold Bars", ItemID.GOLD_BAR, 2), + new ItemReward("Mithril Seeds", ItemID.MITHRIL_SEED, 40) + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); - allSteps.add(new PanelDetails("Starting off", Collections.singletonList(talkToAlmera))); - allSteps.add(new PanelDetails("Investigate", Arrays.asList(boardRaft, talkToHudon, useRopeOnRock, useRopeOnTree, getInBarrel, goUpstairsHadley, searchBookcase, readBook), rope)); - - PanelDetails getPebblePanel = new PanelDetails("Get Glarial's Pebble", Arrays.asList(enterGnomeDungeon, searchGnomeCrate, enterGnomeDoor, talkToGolrie)); + var sections = new ArrayList(); + + sections.add(new PanelDetails("Starting off", List.of( + talkToAlmera + ), List.of( + rope + ))); + + sections.add(new PanelDetails("Investigate", List.of( + boardRaft, + talkToHudon, + useRopeOnRock, + useRopeOnTree, + getInBarrel, + goUpstairsHadley, + searchBookcase, + readBook + ), List.of( + rope + ))); + + var getPebblePanel = new PanelDetails("Get Glarial's Pebble", List.of( + enterGnomeDungeon, + searchGnomeCrate, + enterGnomeDoor, + talkToGolrie + )); getPebblePanel.setLockingStep(goGetPebble); - allSteps.add(getPebblePanel); + sections.add(getPebblePanel); - PanelDetails getGlarialStuffPanel = new PanelDetails("Loot Glarial's tomb", Arrays.asList(usePebble, searchGlarialChest, searchGlarialCoffin)); + var getGlarialStuffPanel = new PanelDetails("Loot Glarial's tomb", List.of( + usePebble, + searchGlarialChest, + searchGlarialCoffin + )); getGlarialStuffPanel.setLockingStep(getGlarialStuff); - - allSteps.add(getGlarialStuffPanel); - - PanelDetails finishOffPanel = new PanelDetails("Put Glarial to rest", Arrays.asList(getFinalItems, boardRaftFinal, useRopeOnRockFinal, useRopeOnTreeFinal, enterFalls, searchFallsCrate, useKeyOnFallsDoor, useRunes, useUrnOnChalice), rope, airRunes, earthRunes, waterRunes, glarialsUrn, glarialsAmulet); - allSteps.add(finishOffPanel); - return allSteps; + sections.add(getGlarialStuffPanel); + + sections.add(new PanelDetails("Put Glarial to rest", List.of( + getFinalItems, + boardRaftFinal, + useRopeOnRockFinal, + useRopeOnTreeFinal, + equipAmulet, + enterFalls, + searchFallsCrate, + useKeyOnFallsDoor, + useRunes, + useUrnOnChalice + ), List.of( + rope, + airRunes, + earthRunes, + waterRunes, + glarialsUrn, + glarialsAmulet + ))); + + return sections; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/whatliesbelow/WhatLiesBelow.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/whatliesbelow/WhatLiesBelow.java index 52c92d232b1..cd5151d3ea1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/whatliesbelow/WhatLiesBelow.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/whatliesbelow/WhatLiesBelow.java @@ -46,6 +46,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarbitID; import java.util.*; @@ -168,7 +169,7 @@ protected void setupZones() public void setupConditions() { inChaosAltar = new ZoneRequirement(chaosAltar); - inBattle = new VarbitRequirement(6719, 2); + inBattle = new VarbitRequirement(VarbitID.MINIMAP_STATE, 2); } public void setupSteps() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/whileguthixsleeps/WhileGuthixSleeps.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/whileguthixsleeps/WhileGuthixSleeps.java index 9ff15070da0..040a425815c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/whileguthixsleeps/WhileGuthixSleeps.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/whileguthixsleeps/WhileGuthixSleeps.java @@ -40,7 +40,6 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.quest.QuestPointRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.quest.QuestRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.util.ItemSlots; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicType; import net.runelite.client.plugins.microbot.questhelper.requirements.util.Operation; import net.runelite.client.plugins.microbot.questhelper.requirements.util.Spellbook; @@ -85,16 +84,15 @@ public class WhileGuthixSleeps extends BasicQuestHelper roseTintedLens, enrichedSnapdragonSeed, enrichedSnapdragon, truthSerum, superTruthSerum, sketch, eliteHelm, eliteBody, eliteLegs, eliteBlackKnightOrSquallOutfit, cellKey, silifTeleorb, strangeTeleorb, darkSquallHood, darkSquallBody, darkSquallLegs, fireOrb, waterOrb, airOrb, earthOrb, airBlock, waterBlock, earthBlock, fireBlock; - ItemRequirement toadflax, toadsLegs, guamLeaf, eyeOfNewt, iritLeaf, harralander, redSpidersEggs, garlic, silverDust, goatHorn, ranarrWeed, whiteBerries, cadantine, avantoe, moryMyreFungus, - chocolateDust, snapeGrass, kebbitTeethdust, lantadyme, potatoCactus, dwarfWeed, wineOfZamorak, snapdragon, tarromin, limpwurt, kwuarm, emptyDruidPouch, fullDruidPouch, silverSickleB; + ItemRequirement emptyDruidPouch; + ItemRequirement fullDruidPouch; + ItemRequirement silverSickleB; FreeInventorySlotRequirement emptySlots9, emptySlots16; Requirement doorNeedsEarthRune, doorNeedsMindRune, doorNeedsAirRune, doorNeedsFireRune, doorNeedsWaterRune, isElectricBookcase1, isElectricBookcase2, isElectricBookcase3, isElectricBookcase4, isElectricBookcase5, isElectricBookcase6, isElectricBookcase7; - Requirement hadToadflax, hadToadsLegs, hadGuamLeaf, hadEyeOfNewt, hadIritLeaf, hadHarralander, hadRedSpidersEggs, hadGarlic, hadSilverDust, hadGoatHorn, hadRanarrWeed, hadWhiteBerries, hadCadantine, hadAvantoeForHunterPotion, hadMortMyreFungus, - hadChocolateDust, hadSnapeGrass, hadKebbitTeethdustForHunterPotion, hadLantadyme, hadPotatoCactus, hadDwarfWeed, hadWineOfZamorak, hadSnapdragon, hadTarromin, hadLimpwurt, hadKwuarm, hadEmptyDruidPouch, hadFullDruidPouch, hadSilverSickleB; Requirement isUpstairsNearThaerisk, assassinsNearby, paidLaunderer, talkedToLaunderer, trapSetUp, trapBaited, broavTrapped, broavNearby, isNearTable, claimedRunes, hasBroav, inMovarioFirstRoom, inMovarioDoorRoom, inLibrary, isNextToSpiralStaircase, disarmedStaircase, inMovarioBaseF1, inMovarioBaseF2, hadRubyKey, searchedBedForTraps, pulledPaintingLever, inWeightRoom, teleportedToDraynor, inPortSarim, inDoorway, purchasedSnapdragon, teleportedToPortSarim, talkedToThaeriskWithSeed, @@ -247,28 +245,28 @@ public Map loadSteps() ConditionalStep goUpToF2Movario = new ConditionalStep(this, goUpToF1Movario); goUpToF2Movario.addStep(and(inMovarioBaseF1, hadRubyKey), climbUpHiddenStaircase); goUpToF2Movario.addStep(and(inMovarioBaseF1, wastePaperBasket), searchWasteBasket); - goUpToF2Movario.addStep(LogicHelper.and(inMovarioBaseF1), pickupWasteBasket); + goUpToF2Movario.addStep(and(inMovarioBaseF1), pickupWasteBasket); ConditionalStep goSearchBed = new ConditionalStep(this, goUpToF2Movario); goSearchBed.addStep(and(inMovarioBaseF2, hadRubyKey), searchBed); - goSearchBed.addStep(LogicHelper.and(inMovarioBaseF2), goDownToF1MovarioBase); + goSearchBed.addStep(and(inMovarioBaseF2), goDownToF1MovarioBase); steps.put(16, goSearchBed); steps.put(17, goSearchBed); ConditionalStep goUseKeyOnBedChest = new ConditionalStep(this, goUpToF2Movario); goUseKeyOnBedChest.addStep(and(inMovarioBaseF2, hadRubyKey), useKeyOnChest); - goUseKeyOnBedChest.addStep(LogicHelper.and(inMovarioBaseF2), goDownToF1MovarioBase); + goUseKeyOnBedChest.addStep(and(inMovarioBaseF2), goDownToF1MovarioBase); steps.put(18, goUseKeyOnBedChest); ConditionalStep goSearchChestForTraps = new ConditionalStep(this, goUpToF2Movario); goSearchChestForTraps.addStep(and(inMovarioBaseF2, searchedBedForTraps), getNotesFromChest); - goSearchChestForTraps.addStep(LogicHelper.and(inMovarioBaseF2), searchChestForTraps); - goSearchChestForTraps.addStep(LogicHelper.and(inMovarioBaseF2), goDownToF1MovarioBase); + goSearchChestForTraps.addStep(and(inMovarioBaseF2), searchChestForTraps); + goSearchChestForTraps.addStep(and(inMovarioBaseF2), goDownToF1MovarioBase); steps.put(19, goSearchChestForTraps); ConditionalStep goSearchChestForNotes2 = new ConditionalStep(this, goUpToF2Movario); - goSearchChestForNotes2.addStep(LogicHelper.and(inMovarioBaseF2), getNotesFromChest); + goSearchChestForNotes2.addStep(and(inMovarioBaseF2), getNotesFromChest); steps.put(20, goSearchChestForNotes2); ConditionalStep goToPainting = new ConditionalStep(this, goUpFromLibrary); @@ -277,8 +275,8 @@ public Map loadSteps() goToPainting.addStep(and(inMovarioBaseF2, movariosNotesV2InBank), goDownFromHiddenRoom); goToPainting.addStep(and(inMovarioBaseF1, movariosNotesV1InBank, movariosNotesV2InBank), inspectPainting); goToPainting.addStep(and(inMovarioBaseF1, movariosNotesV2InBank), searchDesk); - goToPainting.addStep(LogicHelper.and(inMovarioBaseF2), getNotesFromChest); - goToPainting.addStep(LogicHelper.and(inMovarioBaseF1), climbUpHiddenStaircase); + goToPainting.addStep(and(inMovarioBaseF2), getNotesFromChest); + goToPainting.addStep(and(inMovarioBaseF1), climbUpHiddenStaircase); goToPainting.addStep(and(movariosNotesV1InBank, movariosNotesV2InBank), goUpToThaeriskWithNotes); steps.put(21, goToPainting); @@ -435,15 +433,15 @@ public Map loadSteps() steps.put(620, goEnterCellWithRobesOn); ConditionalStep goWitnessTrueTerror = new ConditionalStep(this, enterBlackKnightFortress); - goWitnessTrueTerror.addStep(LogicHelper.and(onChaosTempleF1), jumpToLedge); - goWitnessTrueTerror.addStep(LogicHelper.and(inLucienCamp), climbIceWall); + goWitnessTrueTerror.addStep(and(onChaosTempleF1), jumpToLedge); + goWitnessTrueTerror.addStep(and(inLucienCamp), climbIceWall); goWitnessTrueTerror.addStep(and(inTeleportSpot, strangeTeleorb, deathRune, lawRune), activateStrangeTeleorb); goWitnessTrueTerror.addStep(and(inSquallFightRoom, strangeTeleorb, deathRune, lawRune), standAtTeleportSpot); goWitnessTrueTerror.addStep(and(inSquallFightRoom, strangeTeleorb, not(notSearchedTableForRunes)), getRunes); - goWitnessTrueTerror.addStep(LogicHelper.and(inSquallFightRoom), goDownForOrbAndRunes); + goWitnessTrueTerror.addStep(and(inSquallFightRoom), goDownForOrbAndRunes); goWitnessTrueTerror.addStep(and(inCatacombHQ, isSafeInCatacombs, notSearchedTableForTeleorb), takeStrangeTeleorb); goWitnessTrueTerror.addStep(and(inCatacombHQ, isSafeInCatacombs, notSearchedTableForRunes), takeRunes); - goWitnessTrueTerror.addStep(LogicHelper.and(inCatacombHQ), goUpToUseTeleorb); + goWitnessTrueTerror.addStep(and(inCatacombHQ), goUpToUseTeleorb); goWitnessTrueTerror.addStep(and(inCatacombF2, openedCatacombShortcut), enterNorthernSolidDoor); goWitnessTrueTerror.addStep(and(inCatacombSouth, openedCatacombShortcut), enterCatacombShortcut); goWitnessTrueTerror.addStep(inCatacombF2, useWesternSolidDoor); @@ -496,9 +494,9 @@ public Map loadSteps() goDoSkullPuzzle.addStep(and(inWaterCavity, placedAllOrbs), useWaterBlockOnRecess); goDoSkullPuzzle.addStep(and(inAbyssEntry, placedAllOrbs, not(placedWaterBlock)), enterEastCavity); - goDoSkullPuzzle.addStep(LogicHelper.and(inAirCavity), leaveAirRecess); - goDoSkullPuzzle.addStep(LogicHelper.and(inEarthCavity), leaveEarthRecess); - goDoSkullPuzzle.addStep(LogicHelper.and(inWaterCavity), leaveWaterRecess); + goDoSkullPuzzle.addStep(and(inAirCavity), leaveAirRecess); + goDoSkullPuzzle.addStep(and(inEarthCavity), leaveEarthRecess); + goDoSkullPuzzle.addStep(and(inWaterCavity), leaveWaterRecess); goDoSkullPuzzle.addStep(and(inAbyssEntryF2, usedChiselOnAllBraziers, or(notPlacedAirOrb, notPlacedFireOrb, notPlacedEarthOrb)), climbDownFromSkullF2ToF1); goDoSkullPuzzle.addStep(and(inAbyssEntryF1, usedChiselOnAllBraziers, or(notPlacedAirOrb, notPlacedFireOrb, notPlacedEarthOrb)), climbDownFromSkullF1ToF0); @@ -774,64 +772,6 @@ protected void setupRequirements() fireBlock = new ItemRequirement("Fire block", ItemID.WGS_GUTHIX_TEMPLE_ELEMENTAL_KEY_FIRE); fireBlock.setTooltip("You can get another by searching the recess near the middle cavity"); - toadflax = new ItemRequirement("Toadflax", ItemID.TOADFLAX); - toadsLegs = new ItemRequirement("Toad's legs", ItemID.TOADS_LEGS); - guamLeaf = new ItemRequirement("Guam leaf", ItemID.GUAM_LEAF); - eyeOfNewt = new ItemRequirement("Eye of newt", ItemID.EYE_OF_NEWT); - iritLeaf = new ItemRequirement("Irit leaf", ItemID.IRIT_LEAF); - harralander = new ItemRequirement("Harralander", ItemID.HARRALANDER); - redSpidersEggs = new ItemRequirement("Red spider's eggs", ItemID.RED_SPIDERS_EGGS); - garlic = new ItemRequirement("Garlic", ItemID.GARLIC); - silverDust = new ItemRequirement("Silver dust", ItemID.SILVER_DUST); - goatHorn = new ItemRequirement("Goat horn dust", ItemID.GROUND_DESERT_GOAT_HORN); - ranarrWeed = new ItemRequirement("Ranarr weed", ItemID.RANARR_WEED); - whiteBerries = new ItemRequirement("White berries", ItemID.WHITE_BERRIES); - cadantine = new ItemRequirement("Cadantine", ItemID.CADANTINE); - avantoe = new ItemRequirement("Avantoe", ItemID.AVANTOE); - moryMyreFungus = new ItemRequirement("Mory myre fungus", ItemID.MORTMYREMUSHROOM); - chocolateDust = new ItemRequirement("Chocolate dust", ItemID.CHOCOLATE_DUST); - snapeGrass = new ItemRequirement("Snape grass", ItemID.SNAPE_GRASS); - kebbitTeethdust = new ItemRequirement("Kebbit teeth dust", ItemID.HUNTINGBEAST_SABRETEETH_DUST); - lantadyme = new ItemRequirement("Lantadyme", ItemID.LANTADYME); - potatoCactus = new ItemRequirement("Potato cactus", ItemID.CACTUS_POTATO); - dwarfWeed = new ItemRequirement("Dwarf weed", ItemID.DWARF_WEED); - wineOfZamorak = new ItemRequirement("Wine of zamorak", ItemID.WINE_OF_ZAMORAK); - snapdragon = new ItemRequirement("Snapdragon", ItemID.SNAPDRAGON); - tarromin = new ItemRequirement("Tarromin", ItemID.TARROMIN); - limpwurt = new ItemRequirement("Limpwurt root", ItemID.LIMPWURT_ROOT); - kwuarm = new ItemRequirement("Kwuarm", ItemID.KWUARM); - - // None used! - hadToadflax = or(toadflax, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadToadsLegs = or(toadsLegs, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadGuamLeaf = or(guamLeaf, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadEyeOfNewt = or(eyeOfNewt, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadIritLeaf = or(iritLeaf, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadHarralander = or(harralander, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadRedSpidersEggs = or(redSpidersEggs, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadGarlic = or(garlic, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadSilverDust = or(silverDust, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadGoatHorn = or(goatHorn, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadRanarrWeed = or(ranarrWeed, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadWhiteBerries = or(whiteBerries, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadCadantine = or(cadantine, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadAvantoeForHunterPotion = or(avantoe, new VarbitRequirement(10924, 1), new VarbitRequirement(10924, 3)); - hadMortMyreFungus = or(mortMyreFungus, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadChocolateDust = or(chocolateDust, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadSnapeGrass = or(snapeGrass, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadKebbitTeethdustForHunterPotion = or(kebbitTeethdust, new VarbitRequirement(10924, 2), new VarbitRequirement(10924, 3)); - hadLantadyme = or(lantadyme, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadPotatoCactus = or(potatoCactus, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadDwarfWeed = or(dwarfWeed, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadWineOfZamorak = or(wineOfZamorak, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadSnapdragon = or(snapdragon, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadTarromin = or(tarromin, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadLimpwurt = or(limpwurt, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadKwuarm = or(kwuarm, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadEmptyDruidPouch = or(emptyDruidPouch, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadFullDruidPouch = or(fullDruidPouch, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - hadSilverSickleB = or(silverSickleB, new VarbitRequirement(0, 1), new VarbitRequirement(0, 1)); - // Requirements upstairsNearThaeriskZone = new Zone(new WorldPoint(2898, 3448, 1), new WorldPoint(2917, 3452, 1)); isUpstairsNearThaerisk = new ZoneRequirement(upstairsNearThaeriskZone); @@ -865,18 +805,18 @@ protected void setupRequirements() library = new Zone(new WorldPoint(4166, 4946, 0), new WorldPoint(4190, 4968, 0)); inLibrary = new ZoneRequirement(library); - isElectricBookcase1 = new VarbitRequirement(10763, 1); - isElectricBookcase2 = new VarbitRequirement(10764, 1); - isElectricBookcase3 = new VarbitRequirement(10765, 1); - isElectricBookcase4 = new VarbitRequirement(10766, 1); - isElectricBookcase5 = new VarbitRequirement(10767, 1); - isElectricBookcase6 = new VarbitRequirement(10768, 1); - isElectricBookcase7 = new VarbitRequirement(10769, 1); + isElectricBookcase1 = new VarbitRequirement(VarbitID.WGS_WIRE_FLOOR_SECTION_1, 1); + isElectricBookcase2 = new VarbitRequirement(VarbitID.WGS_WIRE_FLOOR_SECTION_2, 1); + isElectricBookcase3 = new VarbitRequirement(VarbitID.WGS_WIRE_FLOOR_SECTION_3, 1); + isElectricBookcase4 = new VarbitRequirement(VarbitID.WGS_WIRE_FLOOR_SECTION_4, 1); + isElectricBookcase5 = new VarbitRequirement(VarbitID.WGS_WIRE_FLOOR_SECTION_5, 1); + isElectricBookcase6 = new VarbitRequirement(VarbitID.WGS_WIRE_FLOOR_SECTION_6, 1); + isElectricBookcase7 = new VarbitRequirement(VarbitID.WGS_WIRE_FLOOR_SECTION_7, 1); nextToSpiralStaircase = new Zone(new WorldPoint(4180, 4949, 0), new WorldPoint(4183, 4952, 0)); isNextToSpiralStaircase = new ZoneRequirement(nextToSpiralStaircase); - disarmedStaircase = new VarbitRequirement(10799, 1); + disarmedStaircase = new VarbitRequirement(VarbitID.WGS_STAIR_TRAP_DEAD, 1); movarioBaseF1 = new Zone(new WorldPoint(4169, 4942, 1), new WorldPoint(4189, 4962, 1)); inMovarioBaseF1 = new ZoneRequirement(movarioBaseF1); @@ -885,9 +825,9 @@ protected void setupRequirements() inMovarioBaseF2 = new ZoneRequirement(movarioBaseF2); hadRubyKey = or(rubyKey, new VarbitRequirement(VarbitID.WGS, 19, Operation.GREATER_EQUAL)); - searchedBedForTraps = new VarbitRequirement(10798, 1); + searchedBedForTraps = new VarbitRequirement(VarbitID.WGS_BEDCHEST_TRAP_DISABLED, 1); - pulledPaintingLever = new VarbitRequirement(10758, 1); + pulledPaintingLever = new VarbitRequirement(VarbitID.WGS_MOVED_PAINTING, 1); weightRoom = new Zone(new WorldPoint(4177, 4944, 1), new WorldPoint(4181, 4947, 1)); inWeightRoom = new ZoneRequirement(weightRoom); @@ -914,13 +854,13 @@ protected void setupRequirements() onLunarSpellbook = new SpellbookRequirement(Spellbook.LUNAR); - notContactedTurael = new VarbitRequirement(10785, 0); - notContactedDuradel = new VarbitRequirement(10786, 0); - notContactedMazchna = new VarbitRequirement(10787, 0); - notRecruitedGhommal = new VarbitRequirement(10788, 0); - notRecruitedHarrallak = new VarbitRequirement(10789, 0); - notRecruitedSloane = new VarbitRequirement(10790, 0); - notContactedCyrisus = new VarbitRequirement(10791, 0); + notContactedTurael = new VarbitRequirement(VarbitID.WGS_TURAEL_RECRUIT, 0); + notContactedDuradel = new VarbitRequirement(VarbitID.WGS_DURADEL_RECRUIT, 0); + notContactedMazchna = new VarbitRequirement(VarbitID.WGS_MAZCHNA_RECRUIT, 0); + notRecruitedGhommal = new VarbitRequirement(VarbitID.WGS_GHOMMAL_RECRUIT, 0); + notRecruitedHarrallak = new VarbitRequirement(VarbitID.WGS_HARRALLAK_RECRUIT, 0); + notRecruitedSloane = new VarbitRequirement(VarbitID.WGS_SLOANE_RECRUIT, 0); + notContactedCyrisus = new VarbitRequirement(VarbitID.WGS_CYRISUS_RECRUIT, 0); f1WarriorsGuild = new Zone(new WorldPoint(2835, 3531, 1), new WorldPoint(3878, 3558, 1)); onF1WarriorsGuild = new ZoneRequirement(f1WarriorsGuild); @@ -1124,7 +1064,7 @@ public void setupSteps() enterMovarioBase = new ObjectStep(this, ObjectID.WGS_BF_TABLE_BROKEN2_OPEN, new WorldPoint(2519, 3249, 0), "Enter Movario's base under the broken table in the Khazard Battlefield."); // TODO: Update hardcoded 54117 to CHEST_54117 - claimRunes = new ObjectStep(this, 54117, new WorldPoint(4124, 4984, 0), "Search the open chest in the far north of the area for some runes."); + claimRunes = new ObjectStep(this, ObjectID.WGS_MOVARIO_RUNE_CHEST, new WorldPoint(4124, 4984, 0), "Search the open chest in the far north of the area for some runes."); // 4066 122878 -> 385022 // 15064 0->100 diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/witchshouse/WitchsHouse.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/witchshouse/WitchsHouse.java index e036b4cec79..dae0c4b66e4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/witchshouse/WitchsHouse.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/witchshouse/WitchsHouse.java @@ -45,6 +45,7 @@ import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.VarPlayerID; import java.util.*; @@ -155,7 +156,7 @@ public void setupConditions() inDownstairsHouseEast = new ZoneRequirement(downstairsHouseEast); inDownstairsHouse = new ZoneRequirement(downstairsHouseEast, downstairsHouseWest); inHouseOrGarden = new ZoneRequirement(house, garden1, garden2, garden3); - ratHasMagnet = new VarplayerRequirement(226, 3); + ratHasMagnet = new VarplayerRequirement(VarPlayerID.BALLQUEST, 3); inShed = new ZoneRequirement(shed); experimentNearby = new Conditions(LogicType.OR, new NpcCondition(NpcID.SHAPESHIFTERGLOB), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/witchspotion/WitchsPotion.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/witchspotion/WitchsPotion.java index 6ca38b3b3c8..3342851ab88 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/witchspotion/WitchsPotion.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/witchspotion/WitchsPotion.java @@ -33,39 +33,29 @@ import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.Skill; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; import net.runelite.api.gameval.ObjectID; -import java.util.*; - public class WitchsPotion extends BasicQuestHelper { - //Items Required - ItemRequirement ratTail, onion, burntMeat, eyeOfNewt; - - QuestStep talkToWitch, killRat, returnToWitch, drinkPotion; - - @Override - public Map loadSteps() - { - initializeRequirements(); - setupSteps(); - Map steps = new HashMap<>(); - - steps.put(0, talkToWitch); - - ConditionalStep getIngredients = new ConditionalStep(this, killRat); - getIngredients.addStep(ratTail.alsoCheckBank(questBank), returnToWitch); - - steps.put(1, getIngredients); - - steps.put(2, drinkPotion); - - return steps; - } + // Required items + ItemRequirement ratTail; + ItemRequirement onion; + ItemRequirement burntMeat; + ItemRequirement eyeOfNewt; + + // Steps + QuestStep talkToWitch; + QuestStep killRat; + QuestStep returnToWitch; + QuestStep drinkPotion; @Override protected void setupRequirements() @@ -84,30 +74,51 @@ public void setupSteps() talkToWitch = new NpcStep(this, NpcID.HETTY, new WorldPoint(2968, 3205, 0), "Talk to Hetty in Rimmington.", onion, eyeOfNewt, burntMeat); talkToWitch.addDialogStep("I am in search of a quest."); - talkToWitch.addDialogStep("Yes, help me become one with my darker side."); + talkToWitch.addDialogStep("Yes."); killRat = new NpcStep(this, NpcID.RAT_INDOORS, new WorldPoint(2956, 3203, 0), "Kill a rat in the house to the west for a rat tail.", ratTail); returnToWitch = new NpcStep(this, NpcID.HETTY, new WorldPoint(2968, 3205, 0), "Bring the ingredients to Hetty.", onion, eyeOfNewt, burntMeat, ratTail); drinkPotion = new ObjectStep(this, ObjectID.HETTYCAULDRON, new WorldPoint(2967, 3205, 0), "Drink from the cauldron to finish off the quest."); + } + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + steps.put(0, talkToWitch); + + var getIngredients = new ConditionalStep(this, killRat); + getIngredients.addStep(ratTail.alsoCheckBank(questBank), returnToWitch); + + steps.put(1, getIngredients); + + steps.put(2, drinkPotion); + + return steps; } @Override public List getItemRequirements() { - ArrayList reqs = new ArrayList<>(); - reqs.add(onion); - reqs.add(burntMeat); - reqs.add(eyeOfNewt); - return reqs; + return List.of( + onion, + burntMeat, + eyeOfNewt + ); } @Override public List getCombatRequirements() { - return Arrays.asList("Rat (level 1)"); + return List.of( + "Rat (level 1)" + ); } @Override @@ -119,17 +130,33 @@ public QuestPointReward getQuestPointReward() @Override public List getExperienceRewards() { - return Collections.singletonList(new ExperienceReward(Skill.MAGIC, 325)); + return List.of( + new ExperienceReward(Skill.MAGIC, 325) + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); + var steps = new ArrayList(); + + steps.add(new PanelDetails("Starting off", List.of( + talkToWitch + ))); + + steps.add(new PanelDetails("Getting a rat's tail", List.of( + killRat + ))); - allSteps.add(new PanelDetails("Starting off", Collections.singletonList(talkToWitch))); - allSteps.add(new PanelDetails("Getting a rat's tail", Collections.singletonList(killRat))); - allSteps.add(new PanelDetails("Make the potion", Collections.singletonList(returnToWitch), ratTail, onion, burntMeat, eyeOfNewt)); - return allSteps; + steps.add(new PanelDetails("Make the potion", List.of( + returnToWitch + ), List.of( + ratTail, + onion, + burntMeat, + eyeOfNewt + ))); + + return steps; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/xmarksthespot/XMarksTheSpot.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/xmarksthespot/XMarksTheSpot.java index fd8f7a28193..5768cf0b31f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/xmarksthespot/XMarksTheSpot.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/xmarksthespot/XMarksTheSpot.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, Trevor + * Copyright (c) 2025, pajlada * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,106 +29,134 @@ import net.runelite.client.plugins.microbot.questhelper.panel.PanelDetails; import net.runelite.client.plugins.microbot.questhelper.questhelpers.BasicQuestHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; +import static net.runelite.client.plugins.microbot.questhelper.requirements.util.LogicHelper.not; import net.runelite.client.plugins.microbot.questhelper.rewards.ItemReward; import net.runelite.client.plugins.microbot.questhelper.rewards.QuestPointReward; +import net.runelite.client.plugins.microbot.questhelper.steps.ConditionalStep; import net.runelite.client.plugins.microbot.questhelper.steps.DigStep; import net.runelite.client.plugins.microbot.questhelper.steps.NpcStep; import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.NpcID; -import java.util.*; - public class XMarksTheSpot extends BasicQuestHelper { - //Items Required + // Required items ItemRequirement spade; - // Items recommended + // Recommended items ItemRequirement glory; - QuestStep speakVeosLumbridge, digOutsideBob, digCastle, digDraynor, digMartin, speakVeosSarim, speakVeosSarimWithoutCasket; - - @Override - public Map loadSteps() - { - initializeRequirements(); - setupSteps(); - - Map steps = new HashMap<>(); - - steps.put(0, speakVeosLumbridge); - steps.put(1, steps.get(0)); - steps.put(2, digOutsideBob); - steps.put(3, digCastle); - steps.put(4, digDraynor); - steps.put(5, digMartin); - steps.put(6, speakVeosSarim); - steps.put(7, speakVeosSarimWithoutCasket); + // Miscellaneous requirements + ItemRequirement ancientCasket; - return steps; - } + // Steps + NpcStep startQuest; + DigStep digOutsideBob; + DigStep digCastle; + DigStep digDraynor; + DigStep digMartin; + NpcStep speakVeosSarim; + DigStep digMartinAgain; + NpcStep speakVeosSarimWithoutCasket; @Override protected void setupRequirements() { spade = new ItemRequirement("Spade", ItemID.SPADE).isNotConsumed(); + spade.setTooltip("Can be bought from the Lumbridge General Store."); glory = new ItemRequirement("Amulet of Glory for faster teleport to Draynor Village.", ItemCollections.AMULET_OF_GLORIES).isNotConsumed(); + + ancientCasket = new ItemRequirement("Ancient casket", ItemID.CLUEQUEST_CASKET); } private void setupSteps() { // TODO: Worth adding PuzzleWrapperStep at all given the Clue Plugin also does this? - speakVeosLumbridge = new NpcStep(this, NpcID.VEOS_VISIBLE, new WorldPoint(3228, 3242, 0), + startQuest = new NpcStep(this, NpcID.VEOS_VISIBLE, new WorldPoint(3228, 3242, 0), "Talk to Veos in The Sheared Ram pub in Lumbridge to start the quest."); - speakVeosLumbridge.addDialogStep("I'm looking for a quest."); - speakVeosLumbridge.addDialogStep("Sounds good, what should I do?"); - speakVeosLumbridge.addDialogSteps("Can I help?", "Yes."); + startQuest.addDialogStep("I'm looking for a quest."); + startQuest.addDialogStep("Sounds good, what should I do?"); + startQuest.addDialogSteps("Can I help?", "Yes."); - digOutsideBob = new DigStep(this, new WorldPoint(3230, 3209, 0), - "Dig north of Bob's Brilliant Axes, on the west side of the plant against the wall of his house."); + digOutsideBob = DigStep.withCustomSpadeRequirement(this, new WorldPoint(3230, 3209, 0), + "Dig north of Bob's Brilliant Axes, on the west side of the plant against the wall of his house.", spade); digOutsideBob.addDialogStep("Okay, thanks Veos."); + digOutsideBob.setWhenToHighlight(DigStep.WhenToHighlight.OnTile); - digCastle = new DigStep(this, new WorldPoint(3203, 3212, 0), - "Dig behind Lumbridge Castle, just outside the kitchen door."); - - digDraynor = new DigStep(this, new WorldPoint(3109, 3264, 0), - "Dig north-west of the Draynor Village jail, just by the wheat farm."); + digCastle = DigStep.withCustomSpadeRequirement(this, new WorldPoint(3203, 3212, 0), + "Dig behind Lumbridge Castle, just outside the kitchen door.", spade); + digCastle.setWhenToHighlight(DigStep.WhenToHighlight.OnTile); - digMartin = new DigStep(this, new WorldPoint(3078, 3259, 0), - "Dig in the pig pen just west where Martin the Master Gardener is.", - new ItemRequirement("Treasure scroll", ItemID.CLUEQUEST_CLUE4)); + digDraynor = DigStep.withCustomSpadeRequirement(this, new WorldPoint(3109, 3264, 0), + "Dig north-west of the Draynor Village jail, just by the wheat farm.", spade); + digDraynor.addTeleport(glory); + digDraynor.setWhenToHighlight(DigStep.WhenToHighlight.OnTile); - ItemRequirement ancientCasket = new ItemRequirement("Ancient casket", ItemID.CLUEQUEST_CASKET); - ancientCasket.setTooltip("If you've lost this you can get another by digging in the pig pen in Draynor Village."); + digMartin = DigStep.withCustomSpadeRequirement(this, new WorldPoint(3078, 3259, 0), + "Dig just inside the pig pen in the Draynor Market.", spade); + digMartin.setWhenToHighlight(DigStep.WhenToHighlight.OnTile); speakVeosSarim = new NpcStep(this, NpcID.VEOS_VISIBLE, new WorldPoint(3054, 3245, 0), "Talk to Veos directly south of the Rusty Anchor Inn in Port Sarim to finish the quest.", ancientCasket); - ((NpcStep) speakVeosSarim).addAlternateNpcs(NpcID.VEOS_VISIBLE_TRAVEL); + speakVeosSarim.addAlternateNpcs(NpcID.VEOS_VISIBLE_TRAVEL); + + digMartinAgain = DigStep.withCustomSpadeRequirement(this, new WorldPoint(3078, 3259, 0), + "Dig just inside the pig pen in the Draynor Market to get the Ancient casket back.", spade, ancientCasket); + digMartinAgain.setWhenToHighlight(DigStep.WhenToHighlight.OnTile); + + speakVeosSarim.addSubSteps(digMartinAgain); speakVeosSarimWithoutCasket = new NpcStep(this, NpcID.VEOS_VISIBLE, new WorldPoint(3054, 3245, 0), "Talk to Veos directly south of the Rusty Anchor Inn in Port Sarim to finish the quest."); - ((NpcStep) speakVeosSarimWithoutCasket).addAlternateNpcs(NpcID.VEOS_VISIBLE_TRAVEL); + speakVeosSarimWithoutCasket.addAlternateNpcs(NpcID.VEOS_VISIBLE_TRAVEL); speakVeosSarim.addSubSteps(speakVeosSarimWithoutCasket); } + @Override + public Map loadSteps() + { + initializeRequirements(); + setupSteps(); + + var steps = new HashMap(); + + steps.put(0, startQuest); + steps.put(1, startQuest); + steps.put(2, digOutsideBob); + steps.put(3, digCastle); + steps.put(4, digDraynor); + steps.put(5, digMartin); + + var bringVeosAncientCasket = new ConditionalStep(this, speakVeosSarim); + bringVeosAncientCasket.addStep(not(ancientCasket), digMartinAgain); + steps.put(6, bringVeosAncientCasket); + steps.put(7, speakVeosSarimWithoutCasket); + + return steps; + } + @Override public List getItemRequirements() { - ArrayList reqs = new ArrayList<>(); - reqs.add(spade); - return reqs; + return List.of( + spade + ); } @Override public List getItemRecommended() { - ArrayList reqs = new ArrayList<>(); - reqs.add(glory); - return reqs; + return List.of( + glory + ); } @Override @@ -139,19 +168,37 @@ public QuestPointReward getQuestPointReward() @Override public List getItemRewards() { - return Arrays.asList( + return List.of( new ItemReward("300 Exp. Lamp (Any Skill)", ItemID.THOSF_REWARD_LAMP, 1), new ItemReward("Coins", ItemID.COINS, 200), - new ItemReward("A Beginner Clue Scroll", ItemID.TRAIL_CLUE_BEGINNER, 1)); + new ItemReward("A Beginner Clue Scroll", ItemID.TRAIL_CLUE_BEGINNER, 1) + ); } @Override public List getPanels() { - List allSteps = new ArrayList<>(); - allSteps.add(new PanelDetails("Speak to Veos", Collections.singletonList(speakVeosLumbridge), spade)); - allSteps.add(new PanelDetails("Solve the clue scroll", Arrays.asList(digOutsideBob, digCastle, digDraynor, digMartin))); - allSteps.add(new PanelDetails("Bring the casket to Veos", Collections.singletonList(speakVeosSarim))); - return allSteps; + var steps = new ArrayList(); + + steps.add(new PanelDetails("Speak to Veos", List.of( + startQuest + ), List.of( + spade + ))); + + steps.add(new PanelDetails("Solve the clue scroll", List.of( + digOutsideBob, + digCastle, + digDraynor, + digMartin + ), List.of( + spade + ))); + + steps.add(new PanelDetails("Bring the casket to Veos", List.of( + speakVeosSarim + ))); + + return steps; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/zogreflesheaters/ZogreFleshEaters.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/zogreflesheaters/ZogreFleshEaters.java index 41bd39a3aa1..230e6af50f3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/zogreflesheaters/ZogreFleshEaters.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/quests/zogreflesheaters/ZogreFleshEaters.java @@ -203,32 +203,32 @@ public void setupConditions() inTombF2 = new ZoneRequirement(tombF2); inTombF0 = new ZoneRequirement(tombF0); inTombF2ToBoss = new ZoneRequirement(tombF2ToBoss); - killedZombie = new VarbitRequirement(503, 2); + killedZombie = new VarbitRequirement(VarbitID.THZFE_BRENTLE_SKELE, 2); hasBackpackOrTankard = new Conditions(LogicType.OR, backpack, tankard); - searchedCoffin = new VarbitRequirement(488, 1); - usedKnife = new VarbitRequirement(488, 2); - openedCoffin = new VarbitRequirement(488, 3); + searchedCoffin = new VarbitRequirement(VarbitID.THZFE_PRISMSEARCH, 1); + usedKnife = new VarbitRequirement(VarbitID.THZFE_PRISMSEARCH, 2); + openedCoffin = new VarbitRequirement(VarbitID.THZFE_PRISMSEARCH, 3); talkedToZavistic = new VarbitRequirement(VarbitID.THZFE_PRISMSEARCH, 4, Operation.GREATER_EQUAL); - askedSithToLookAround = new VarbitRequirement(488, 5); + askedSithToLookAround = new VarbitRequirement(VarbitID.THZFE_PRISMSEARCH, 5); atSith = new ZoneRequirement(sith); - usedTankardOnBartender = new VarbitRequirement(489, 1); - usedPortraitOnBartender = new VarbitRequirement(490, 1); - shownNecroBook = new VarbitRequirement(491, 1); - shownHamBook = new VarbitRequirement(492, 1); - shownTankard = new VarbitRequirement(493, 1); - shownSignedPortrait = new VarbitRequirement(494, 1); + usedTankardOnBartender = new VarbitRequirement(VarbitID.THZFE_INNKEEPERMUGSHOWN, 1); + usedPortraitOnBartender = new VarbitRequirement(VarbitID.THZFE_INNKEEPERPORTRAITSHOWN, 1); + shownNecroBook = new VarbitRequirement(VarbitID.THZFE_SHOWNNECROBOOK, 1); + shownHamBook = new VarbitRequirement(VarbitID.THZFE_SHOWNHAMBOOK, 1); + shownTankard = new VarbitRequirement(VarbitID.THZFE_SHOWNTANKARD, 1); + shownSignedPortrait = new VarbitRequirement(VarbitID.THZFE_SHOWNSIGNEDPORTRAIT, 1); hasOrShownHamBook = new Conditions(LogicType.OR, shownHamBook, hamBook); hasOrShownNecroBook = new Conditions(LogicType.OR, shownNecroBook, necroBook); hasOrShownSignedPortrait = new Conditions(LogicType.OR, shownSignedPortrait, signedPort); - sithTransformed = new VarbitRequirement(495, 1); + sithTransformed = new VarbitRequirement(VarbitID.THZFE_SITHIK_TRANSFORMED, 1); - askedAboutDisease = new VarbitRequirement(498, 1); - askedAboutGettingRidOfUndead = new VarbitRequirement(499, 1); - askedAboutBow = new VarbitRequirement(500, 1); + askedAboutDisease = new VarbitRequirement(VarbitID.THZFE_MAKECUREDISEASE, 1); + askedAboutGettingRidOfUndead = new VarbitRequirement(VarbitID.THZFE_MAKEBRUTALARROW, 1); + askedAboutBow = new VarbitRequirement(VarbitID.THZFE_MAKECOMPOZOGREBOW, 1); ogreRelicNearby = new ItemOnTileRequirement(ogreRelic); // 507 1 when are ya sure? diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/skills/mining/Mining.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/skills/mining/Mining.java index 0acbd355a67..76c3d25b2f4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/skills/mining/Mining.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/helpers/skills/mining/Mining.java @@ -39,10 +39,10 @@ import net.runelite.client.plugins.microbot.questhelper.steps.ObjectStep; import net.runelite.client.plugins.microbot.questhelper.steps.QuestStep; import net.runelite.api.Skill; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.gameval.ItemID; import net.runelite.api.gameval.ObjectID; +import net.runelite.api.gameval.SpriteID; import java.util.ArrayList; import java.util.Arrays; @@ -149,13 +149,13 @@ private void setupSteps() "Mine Copper- and Tin ore at South-east Varrock mine until 15 Mining. You can choose to drop " + "the ores as you go or bank them in the eastern Varrock bank.", ironPickaxe, steelPickaxe, blackPickaxe); - copperStep.addTileMarker(COPPER_POINT, SpriteID.SKILL_MINING); + copperStep.addTileMarker(COPPER_POINT, SpriteID.Staticons.MINING); ironStep = new DetailedQuestStep(this, IRON_POINT, "Mine Iron ore at Al Kharid Mine until 99 Mining. You can choose to drop the ores as you go," + " smelt them on the way to the Al Kharid bank or bank the ores as they are.", steelPickaxe, blackPickaxe, mithrilPickaxe, adamantPickaxe, runePickaxe); - ironStep.addTileMarker(IRON_POINT, SpriteID.SKILL_MINING); + ironStep.addTileMarker(IRON_POINT, SpriteID.Staticons.MINING); mineCopper = new ObjectStep(this, ObjectID.TINROCK1, COPPER_POINT, diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/managers/ItemAndLastUpdated.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/managers/ItemAndLastUpdated.java index 0e4cc31572b..88811e34f05 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/managers/ItemAndLastUpdated.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/managers/ItemAndLastUpdated.java @@ -30,6 +30,7 @@ import lombok.extern.slf4j.Slf4j; import net.runelite.api.Item; +import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.concurrent.Callable; @@ -42,7 +43,7 @@ public class ItemAndLastUpdated // last game tick item container was changed @Getter private int lastUpdated = -1; - private Item[] items; + private Item[] items = new Item[0]; @Setter private Callable specialMethodToObtainItems; @@ -65,7 +66,7 @@ public void update(int updateTick, Item[] items) * * @return an {@link Item}[] of items currently thought to be in the container. */ - public @Nullable Item[] getItems() + public @Nonnull Item[] getItems() { if (specialMethodToObtainItems != null) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/managers/QuestBankManager.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/managers/QuestBankManager.java index 3a1958a5be1..739501f7d20 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/managers/QuestBankManager.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/managers/QuestBankManager.java @@ -34,6 +34,7 @@ import net.runelite.api.Item; import net.runelite.api.ItemContainer; import net.runelite.api.Player; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.eventbus.EventBus; import javax.inject.Inject; @@ -127,7 +128,7 @@ public void updateLocalBank(ItemContainer itemContainer) public void updateLocalGroupBank(Client client, ItemContainer itemContainer) { - boolean hasChangedGroupStorage = client.getVarbitValue(4602) == 1; + boolean hasChangedGroupStorage = client.getVarbitValue(VarbitID.GIM_SHARED_BANK_HASEDITED) == 1; if (hasChangedGroupStorage) { // If editing, group bank not actually 'saved', so don't update yet diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/managers/QuestContainerManager.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/managers/QuestContainerManager.java index 3ae835354cd..03a1bac8dc2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/managers/QuestContainerManager.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/managers/QuestContainerManager.java @@ -101,12 +101,11 @@ public static void updateInventory(Client client) if (result) { Item[] runesInPouch = QuestContainerManager.getRunePouchData().getItems(); - if(runesInPouch != null) { - for (Item runePouchItem : runesInPouch) - { - inventoryMap.computeIfPresent(runePouchItem.getId(), (currentVal, existingItem) -> new Item(currentVal, existingItem.getQuantity() + runePouchItem.getQuantity())); - inventoryMap.putIfAbsent(runePouchItem.getId(), runePouchItem); - } + for (Item runePouchItem : runesInPouch) + { + if (runePouchItem == null) continue; + inventoryMap.computeIfPresent(runePouchItem.getId(), (currentVal, existingItem) -> new Item(currentVal, existingItem.getQuantity() + runePouchItem.getQuantity())); + inventoryMap.putIfAbsent(runePouchItem.getId(), runePouchItem); } } QuestContainerManager.getInventoryData().update(client.getTickCount(), inventoryMap.values().toArray(new Item[0])); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/managers/QuestManager.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/managers/QuestManager.java index 48ca5fb7bda..36dafc24eb6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/managers/QuestManager.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/managers/QuestManager.java @@ -44,6 +44,7 @@ import net.runelite.client.eventbus.EventBus; import net.runelite.client.plugins.PluginManager; +import javax.annotation.Nullable; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; @@ -93,6 +94,7 @@ public class QuestManager private boolean developerMode; @Getter + @Nullable private QuestHelper selectedQuest; private boolean loadQuestList = false; private QuestHelperPanel panel; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/PanelDetails.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/PanelDetails.java index 14c4d4efcb9..01caa83a354 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/PanelDetails.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/PanelDetails.java @@ -95,14 +95,34 @@ public PanelDetails(String header, List steps, List requ public PanelDetails withId(int id) { this.id = id; + for (QuestStep step : steps) + { + step.withId(id); + } return this; } + public static PanelDetails lockedPanel(String header, Requirement displayCondition, QuestStep lockingStep, List steps, Requirement... requirements) + { + var section = new PanelDetails(header, steps, requirements); + + section.setDisplayCondition(displayCondition); + section.setLockingStep(lockingStep); + + return section; + } + public void setDisplayCondition(Requirement req) { setHideCondition(new Conditions(LogicType.NOR, req)); } + public PanelDetails withHideCondition(Requirement requirement) + { + setHideCondition(requirement); + return this; + } + /* Set the states of the quest the steps in the sidebar should be active */ public void setVars(Integer... vars) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/QuestHelperPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/QuestHelperPanel.java index c1f533439bd..f4221958012 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/QuestHelperPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/QuestHelperPanel.java @@ -95,6 +95,8 @@ public class QuestHelperPanel extends PluginPanel private static final ImageIcon COLLAPSED_ICON; private static final ImageIcon EXPANDED_ICON; + private int nextDesiredScrollValue = 0; + static { DISCORD_ICON = Icon.DISCORD.getIcon(img -> ImageUtil.resizeImage(img, 16, 16)); @@ -389,6 +391,23 @@ public void mousePressed(MouseEvent mouseEvent) questOverviewWrapper.setLayout(new BorderLayout()); questOverviewWrapper.add(questOverviewPanel, BorderLayout.NORTH); + if (questHelperPlugin.isDeveloperMode()) + { + // If in developer mode, add this "reload quest" button. + // It's always visible under the search bar, and reloads the currently + // active quest, and ensures you're scrolled back to where you were. + var reloadQuest = new JButton("reload quest"); + reloadQuest.addActionListener((ev) -> { + nextDesiredScrollValue = scrollableContainer.getVerticalScrollBar().getValue(); + var currentQuest = questHelperPlugin.getSelectedQuest(); + if (currentQuest != null) { + currentQuest.uninitializeRequirements(); + } + setSelectedQuest(questHelperPlugin.getSelectedQuest()); + }); + searchQuestsPanel.add(reloadQuest, BorderLayout.SOUTH); + } + refreshSkillFiltering(); } @@ -534,7 +553,10 @@ public void addQuest(QuestHelper quest, boolean isActive) questOverviewPanel.addQuest(quest, isActive); questActive = true; - SwingUtilities.invokeLater(() -> scrollableContainer.getVerticalScrollBar().setValue(0)); + SwingUtilities.invokeLater(() -> { + scrollableContainer.getVerticalScrollBar().setValue(nextDesiredScrollValue); + nextDesiredScrollValue = 0; + }); repaint(); revalidate(); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/QuestOverviewPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/QuestOverviewPanel.java index ba567a68d02..2cf24251bbc 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/QuestOverviewPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/QuestOverviewPanel.java @@ -91,8 +91,6 @@ public class QuestOverviewPanel extends JPanel private static final ImageIcon CLOSE_ICON = Icon.CLOSE.getIcon(); - private final JButton collapseBtn = new JButton(); - private final List questStepPanelList = new CopyOnWriteArrayList<>(); private QuestStepPanel draggingPanel = null; @@ -306,25 +304,6 @@ public void addQuest(QuestHelper quest, boolean isActive) } questStepPanelList.add(newStep); questStepsContainer.add(newStep); - newStep.addMouseListener(new MouseAdapter() - { - @Override - public void mouseClicked(MouseEvent e) - { - if (e.getButton() == MouseEvent.BUTTON1) - { - if (newStep.isCollapsed()) - { - newStep.expand(); - } - else - { - newStep.collapse(); - } - updateCollapseText(); - } - } - }); repaint(); revalidate(); } @@ -396,11 +375,6 @@ private void closeHelper() questManager.shutDownQuest(false); } - void updateCollapseText() - { - collapseBtn.setSelected(isAllCollapsed()); - } - public boolean isAllCollapsed() { return questStepPanelList.stream() @@ -739,7 +713,9 @@ public void mouseDragged(MouseEvent e) if (other == draggingPanel) continue; Rectangle r = other.getBounds(); - int midY = other.getLocationOnScreen().y + r.height / 2; + int otherYPos = 0; + if (other.isVisible()) otherYPos = other.getLocationOnScreen().y; + int midY = otherYPos + r.height / 2; int fromIndex = questStepPanelList.indexOf(draggingPanel); int toIndex = questStepPanelList.indexOf(other); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/QuestStepPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/QuestStepPanel.java index cc891aef0c9..c3c65e27580 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/QuestStepPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/QuestStepPanel.java @@ -38,12 +38,14 @@ import javax.swing.*; import javax.swing.border.EmptyBorder; import java.awt.*; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; -public class QuestStepPanel extends JPanel +public class QuestStepPanel extends JPanel implements MouseListener { private static final int TITLE_PADDING = 5; @@ -52,7 +54,7 @@ public class QuestStepPanel extends JPanel private final QuestHelperPlugin questHelperPlugin; private final JPanel headerPanel = new JPanel(); - private final JLabel headerLabel = JGenerator.makeJLabel(); + private final JTextPane headerLabel = JGenerator.makeJTextPane(); private final JPanel bodyPanel = new JPanel(); private final JCheckBox lockStep = new JCheckBox(); @Getter @@ -76,13 +78,16 @@ public QuestStepPanel(PanelDetails panelDetails, QuestStep currentStep, QuestMan leftTitleContainer = new JPanel(new BorderLayout(5, 0)); + headerLabel.addMouseListener(this); + addMouseListener(this); + headerLabel.setText(panelDetails.getHeader()); headerLabel.setFont(FontManager.getRunescapeBoldFont()); headerLabel.setMinimumSize(new Dimension(1, headerLabel.getPreferredSize().height)); headerPanel.setLayout(new BoxLayout(headerPanel, BoxLayout.X_AXIS)); - headerPanel.setBorder(new EmptyBorder(7, 7, 7, 7)); + headerPanel.setBorder(new EmptyBorder(7, 7, 3, 7)); headerPanel.add(Box.createRigidArea(new Dimension(TITLE_PADDING, 0))); leftTitleContainer.add(headerLabel, BorderLayout.CENTER); @@ -252,19 +257,16 @@ public void updateHighlight(QuestStep currentStep) { steps.get(lastHighlightedStep).setForeground(Color.LIGHT_GRAY); } - else + + if (steps.get(currentStep) != null) { + steps.get(currentStep).setForeground(ColorScheme.BRAND_ORANGE); headerLabel.setForeground(Color.BLACK); headerPanel.setBackground(ColorScheme.BRAND_ORANGE); viewControls.setBackground(ColorScheme.BRAND_ORANGE); leftTitleContainer.setBackground(ColorScheme.BRAND_ORANGE); } - if (steps.get(currentStep) != null) - { - steps.get(currentStep).setForeground(ColorScheme.BRAND_ORANGE); - } - lastHighlightedStep = currentStep; } @@ -334,7 +336,7 @@ private void lockSection(boolean locked) } } - void collapse() + private void collapse() { if (!isCollapsed()) { @@ -343,7 +345,7 @@ void collapse() } } - void expand() + private void expand() { if (isCollapsed()) { @@ -402,6 +404,44 @@ public void updateStepVisibility(Client client) private QuestStep currentlyActiveQuestSidebarStep() { - return questHelperPlugin.getSelectedQuest().getCurrentStep().getActiveStep(); + var selectedQuest = questHelperPlugin.getSelectedQuest(); + var currentStep = selectedQuest.getCurrentStep(); + return currentStep.getActiveStep(); + } + + @Override + public void mouseClicked(MouseEvent e) + { + if (e.getButton() == MouseEvent.BUTTON1) + { + if (isCollapsed()) + { + expand(); + } + else + { + collapse(); + } + } + } + + @Override + public void mousePressed(MouseEvent mouseEvent) + { + } + + @Override + public void mouseReleased(MouseEvent mouseEvent) + { + } + + @Override + public void mouseEntered(MouseEvent mouseEvent) + { + } + + @Override + public void mouseExited(MouseEvent mouseEvent) + { } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/questorders/IronmanOptimalQuestGuide.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/questorders/IronmanOptimalQuestGuide.java index c83a2445167..5567c817e2e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/questorders/IronmanOptimalQuestGuide.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/questorders/IronmanOptimalQuestGuide.java @@ -27,9 +27,8 @@ import com.google.common.collect.ImmutableList; import net.runelite.client.plugins.microbot.questhelper.questinfo.QuestHelperQuest; -import lombok.Getter; - import java.util.List; +import lombok.Getter; /** * The order of these quests are parsed using data from the OSRS Wiki @@ -44,20 +43,21 @@ public class IronmanOptimalQuestGuide QuestHelperQuest.THE_RESTLESS_GHOST, QuestHelperQuest.X_MARKS_THE_SPOT, QuestHelperQuest.WITCHS_POTION, - QuestHelperQuest.IMP_CATCHER, QuestHelperQuest.CLIENT_OF_KOUREND, - QuestHelperQuest.ROMEO__JULIET, QuestHelperQuest.STRONGHOLD_OF_SECURITY, + QuestHelperQuest.CHILDREN_OF_THE_SUN, + QuestHelperQuest.ROMEO__JULIET, QuestHelperQuest.GERTRUDES_CAT, QuestHelperQuest.DADDYS_HOME, QuestHelperQuest.RUNE_MYSTERIES, QuestHelperQuest.TREE_GNOME_VILLAGE, - QuestHelperQuest.MONKS_FRIEND, QuestHelperQuest.HAZEEL_CULT, + QuestHelperQuest.CLOCK_TOWER, + QuestHelperQuest.MONKS_FRIEND, QuestHelperQuest.PLAGUE_CITY, QuestHelperQuest.BIOHAZARD, + QuestHelperQuest.ARDOUGNE_EASY, QuestHelperQuest.FIGHT_ARENA, - QuestHelperQuest.CLOCK_TOWER, QuestHelperQuest.SHEEP_HERDER, QuestHelperQuest.DWARF_CANNON, QuestHelperQuest.WATERFALL_QUEST, @@ -68,18 +68,18 @@ public class IronmanOptimalQuestGuide QuestHelperQuest.WITCHS_HOUSE, QuestHelperQuest.BELOW_ICE_MOUNTAIN, QuestHelperQuest.BLACK_KNIGHTS_FORTRESS, - QuestHelperQuest.RECRUITMENT_DRIVE, + QuestHelperQuest.PIRATES_TREASURE, QuestHelperQuest.OBSERVATORY_QUEST, QuestHelperQuest.PRIEST_IN_PERIL, QuestHelperQuest.RAG_AND_BONE_MAN_I, QuestHelperQuest.NATURE_SPIRIT, + QuestHelperQuest.RECRUITMENT_DRIVE, QuestHelperQuest.ALFRED_GRIMHANDS_BARCRAWL, QuestHelperQuest.SCORPION_CATCHER, QuestHelperQuest.JUNGLE_POTION, QuestHelperQuest.VAMPYRE_SLAYER, QuestHelperQuest.A_PORCINE_OF_INTEREST, QuestHelperQuest.DEATH_PLATEAU, - QuestHelperQuest.GOBLIN_DIPLOMACY, QuestHelperQuest.THE_QUEEN_OF_THIEVES, QuestHelperQuest.THE_DEPTHS_OF_DESPAIR, QuestHelperQuest.MOUNTAIN_DAUGHTER, @@ -88,23 +88,24 @@ public class IronmanOptimalQuestGuide QuestHelperQuest.THE_DIG_SITE, QuestHelperQuest.THE_GOLEM, QuestHelperQuest.THE_KNIGHTS_SWORD, - QuestHelperQuest.SLEEPING_GIANTS, QuestHelperQuest.ELEMENTAL_WORKSHOP_I, - QuestHelperQuest.RECIPE_FOR_DISASTER_START, - QuestHelperQuest.RECIPE_FOR_DISASTER_WARTFACE_AND_BENTNOZE, QuestHelperQuest.DEMON_SLAYER, QuestHelperQuest.SHADOW_OF_THE_STORM, QuestHelperQuest.ELEMENTAL_WORKSHOP_II, - QuestHelperQuest.CHILDREN_OF_THE_SUN, QuestHelperQuest.THE_RIBBITING_TALE_OF_A_LILY_PAD_LABOUR_DISPUTE, QuestHelperQuest.LOST_CITY, QuestHelperQuest.FAIRYTALE_I__GROWING_PAINS, + QuestHelperQuest.RECIPE_FOR_DISASTER_START, + QuestHelperQuest.GOBLIN_DIPLOMACY, + QuestHelperQuest.RECIPE_FOR_DISASTER_WARTFACE_AND_BENTNOZE, + QuestHelperQuest.SLEEPING_GIANTS, QuestHelperQuest.SHIELD_OF_ARRAV_BLACK_ARM_GANG, QuestHelperQuest.SHIELD_OF_ARRAV_PHOENIX_GANG, QuestHelperQuest.CREATURE_OF_FENKENSTRAIN, QuestHelperQuest.A_SOULS_BANE, QuestHelperQuest.THE_LOST_TRIBE, QuestHelperQuest.DEATH_TO_THE_DORGESHUUN, + QuestHelperQuest.IMP_CATCHER, QuestHelperQuest.THE_GIANT_DWARF, QuestHelperQuest.ANOTHER_SLICE_OF_HAM, QuestHelperQuest.MAKING_HISTORY, @@ -115,7 +116,6 @@ public class IronmanOptimalQuestGuide QuestHelperQuest.ENTER_THE_ABYSS, QuestHelperQuest.WANTED, QuestHelperQuest.THE_FEUD, - QuestHelperQuest.DEATH_ON_THE_ISLE, QuestHelperQuest.TROLL_STRONGHOLD, QuestHelperQuest.TROLL_ROMANCE, QuestHelperQuest.DRAGON_SLAYER_I, @@ -126,13 +126,18 @@ public class IronmanOptimalQuestGuide QuestHelperQuest.DORICS_QUEST, QuestHelperQuest.SPIRITS_OF_THE_ELID, QuestHelperQuest.ICTHLARINS_LITTLE_HELPER, + QuestHelperQuest.ETHICALLY_ACQUIRED_ANTIQUITIES, + QuestHelperQuest.TWILIGHTS_PROMISE, + QuestHelperQuest.DEATH_ON_THE_ISLE, QuestHelperQuest.RATCATCHERS, + QuestHelperQuest.THE_GARDEN_OF_DEATH, + QuestHelperQuest.ENLIGHTENED_JOURNEY, + QuestHelperQuest.SEA_SLUG, QuestHelperQuest.FISHING_CONTEST, QuestHelperQuest.RECIPE_FOR_DISASTER_DWARF, QuestHelperQuest.GHOSTS_AHOY, QuestHelperQuest.FORGETTABLE_TALE, QuestHelperQuest.GARDEN_OF_TRANQUILLITY, - QuestHelperQuest.ENLIGHTENED_JOURNEY, QuestHelperQuest.RECIPE_FOR_DISASTER_EVIL_DAVE, QuestHelperQuest.BIG_CHOMPY_BIRD_HUNTING, QuestHelperQuest.ZOGRE_FLESH_EATERS, @@ -149,12 +154,12 @@ public class IronmanOptimalQuestGuide QuestHelperQuest.RECIPE_FOR_DISASTER_LUMBRIDGE_GUIDE, QuestHelperQuest.RECIPE_FOR_DISASTER_SKRACH_UGLOGWEE, QuestHelperQuest.HAUNTED_MINE, + QuestHelperQuest.KARAMJA_EASY, QuestHelperQuest.WATCHTOWER, QuestHelperQuest.PRINCE_ALI_RESCUE, QuestHelperQuest.CONTACT, QuestHelperQuest.THE_EYES_OF_GLOUPHRIE, QuestHelperQuest.TEMPLE_OF_THE_EYE, - QuestHelperQuest.SEA_SLUG, QuestHelperQuest.OLAFS_QUEST, QuestHelperQuest.TEARS_OF_GUTHIX, QuestHelperQuest.TEMPLE_OF_IKOV, @@ -163,7 +168,6 @@ public class IronmanOptimalQuestGuide QuestHelperQuest.THE_SLUG_MENACE, QuestHelperQuest.BETWEEN_A_ROCK, QuestHelperQuest.MONKEY_MADNESS_I, - QuestHelperQuest.ETHICALLY_ACQUIRED_ANTIQUITIES, QuestHelperQuest.COLD_WAR, QuestHelperQuest.THE_ASCENT_OF_ARCEUUS, QuestHelperQuest.EAGLES_PEAK, @@ -171,31 +175,28 @@ public class IronmanOptimalQuestGuide QuestHelperQuest.SKIPPY_AND_THE_MOGRES, QuestHelperQuest.RAG_AND_BONE_MAN_II, QuestHelperQuest.LAIR_OF_TARN_RAZORLOR, - QuestHelperQuest.THE_GARDEN_OF_DEATH, QuestHelperQuest.RUM_DEAL, - QuestHelperQuest.PIRATES_TREASURE, QuestHelperQuest.CABIN_FEVER, - QuestHelperQuest.MEAT_AND_GREET, QuestHelperQuest.THE_GREAT_BRAIN_ROBBERY, + QuestHelperQuest.SCRAMBLED, QuestHelperQuest.THE_HAND_IN_THE_SAND, QuestHelperQuest.ENAKHRAS_LAMENT, + QuestHelperQuest.MEAT_AND_GREET, QuestHelperQuest.HEROES_QUEST, QuestHelperQuest.THRONE_OF_MISCELLANIA, QuestHelperQuest.ROYAL_TROUBLE, QuestHelperQuest.DESERT_TREASURE, - QuestHelperQuest.CURSE_OF_THE_EMPTY_LORD, - QuestHelperQuest.THE_GENERALS_SHADOW, - QuestHelperQuest.HIS_FAITHFUL_SERVANTS, QuestHelperQuest.A_TASTE_OF_HOPE, QuestHelperQuest.FAMILY_CREST, QuestHelperQuest.LEGENDS_QUEST, QuestHelperQuest.RECIPE_FOR_DISASTER_SIR_AMIK_VARZE, - QuestHelperQuest.ARDOUGNE_EASY, + QuestHelperQuest.CURSE_OF_THE_EMPTY_LORD, + QuestHelperQuest.THE_GENERALS_SHADOW, + QuestHelperQuest.HIS_FAITHFUL_SERVANTS, QuestHelperQuest.DESERT_EASY, QuestHelperQuest.FALADOR_EASY, QuestHelperQuest.FREMENNIK_EASY, QuestHelperQuest.KANDARIN_EASY, - QuestHelperQuest.KARAMJA_EASY, QuestHelperQuest.KOUREND_EASY, QuestHelperQuest.LUMBRIDGE_EASY, QuestHelperQuest.MORYTANIA_EASY, @@ -211,7 +212,7 @@ public class IronmanOptimalQuestGuide QuestHelperQuest.TALE_OF_THE_RIGHTEOUS, QuestHelperQuest.THE_FORSAKEN_TOWER, QuestHelperQuest.A_KINGDOM_DIVIDED, - QuestHelperQuest.TWILIGHTS_PROMISE, + QuestHelperQuest.THE_HEART_OF_DARKNESS, QuestHelperQuest.PERILOUS_MOON, QuestHelperQuest.RECIPE_FOR_DISASTER_MONKEY_AMBASSADOR, QuestHelperQuest.REGICIDE, @@ -234,17 +235,18 @@ public class IronmanOptimalQuestGuide QuestHelperQuest.LUMBRIDGE_MEDIUM, QuestHelperQuest.MORYTANIA_MEDIUM, QuestHelperQuest.DEVIOUS_MINDS, + QuestHelperQuest.THE_FINAL_DAWN, + QuestHelperQuest.SHADOWS_OF_CUSTODIA, QuestHelperQuest.THE_PATH_OF_GLOUPHRIE, - QuestHelperQuest.THE_HEART_OF_DARKNESS, QuestHelperQuest.THE_FREMENNIK_EXILES, QuestHelperQuest.SINS_OF_THE_FATHER, QuestHelperQuest.BENEATH_CURSED_SANDS, + QuestHelperQuest.THE_CURSE_OF_ARRAV, QuestHelperQuest.MAKING_FRIENDS_WITH_MY_ARM, QuestHelperQuest.MONKEY_MADNESS_II, QuestHelperQuest.FREMENNIK_MEDIUM, QuestHelperQuest.A_NIGHT_AT_THE_THEATRE, QuestHelperQuest.DRAGON_SLAYER_II, - QuestHelperQuest.THE_CURSE_OF_ARRAV, QuestHelperQuest.SECRETS_OF_THE_NORTH, QuestHelperQuest.WHILE_GUTHIX_SLEEPS, QuestHelperQuest.SONG_OF_THE_ELVES, @@ -253,6 +255,7 @@ public class IronmanOptimalQuestGuide QuestHelperQuest.IN_SEARCH_OF_KNOWLEDGE, QuestHelperQuest.HOPESPEARS_WILL, // Quests & mini quests that are not part of the OSRS Wiki's Optimal Ironman Quest Guide + QuestHelperQuest.VALE_TOTEMS, QuestHelperQuest.BALLOON_TRANSPORT_CRAFTING_GUILD, QuestHelperQuest.BALLOON_TRANSPORT_GRAND_TREE, QuestHelperQuest.BALLOON_TRANSPORT_VARROCK, diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/questorders/OptimalQuestGuide.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/questorders/OptimalQuestGuide.java index 9508354e14c..a42257ebdc2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/questorders/OptimalQuestGuide.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/questorders/OptimalQuestGuide.java @@ -27,9 +27,8 @@ import com.google.common.collect.ImmutableList; import net.runelite.client.plugins.microbot.questhelper.questinfo.QuestHelperQuest; -import lombok.Getter; - import java.util.List; +import lombok.Getter; /** * The order of these quests are parsed using data from the OSRS Wiki @@ -224,6 +223,7 @@ public class OptimalQuestGuide QuestHelperQuest.THE_GENERALS_SHADOW, QuestHelperQuest.HIS_FAITHFUL_SERVANTS, QuestHelperQuest.THE_GREAT_BRAIN_ROBBERY, + QuestHelperQuest.SCRAMBLED, QuestHelperQuest.FAIRYTALE_II__CURE_A_QUEEN, QuestHelperQuest.RECIPE_FOR_DISASTER_MONKEY_AMBASSADOR, QuestHelperQuest.RECIPE_FOR_DISASTER_FINALE, @@ -250,16 +250,19 @@ public class OptimalQuestGuide QuestHelperQuest.MONKEY_MADNESS_II, //QuestHelperQuest.INTO_THE_TOMBS, - Placeholder for future addition. QuestHelperQuest.A_NIGHT_AT_THE_THEATRE, + QuestHelperQuest.SHADOWS_OF_CUSTODIA, QuestHelperQuest.DRAGON_SLAYER_II, QuestHelperQuest.THE_CURSE_OF_ARRAV, QuestHelperQuest.MAKING_FRIENDS_WITH_MY_ARM, QuestHelperQuest.SECRETS_OF_THE_NORTH, + QuestHelperQuest.THE_FINAL_DAWN, QuestHelperQuest.WHILE_GUTHIX_SLEEPS, QuestHelperQuest.DESERT_TREASURE_II, QuestHelperQuest.SONG_OF_THE_ELVES, QuestHelperQuest.CLOCK_TOWER, QuestHelperQuest.THE_CORSAIR_CURSE, // Quests & mini quests that are not part of the OSRS Wiki's Optimal Quest Guide + QuestHelperQuest.VALE_TOTEMS, QuestHelperQuest.BARBARIAN_TRAINING, QuestHelperQuest.BEAR_YOUR_SOUL, QuestHelperQuest.ENCHANTED_KEY, diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/questorders/ReleaseDate.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/questorders/ReleaseDate.java index db064e72096..4455be53522 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/questorders/ReleaseDate.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/panel/questorders/ReleaseDate.java @@ -27,9 +27,8 @@ import com.google.common.collect.ImmutableList; import net.runelite.client.plugins.microbot.questhelper.questinfo.QuestHelperQuest; -import lombok.Getter; - import java.util.List; +import lombok.Getter; /** * The order of these quests are parsed using data from the OSRS Wiki @@ -219,6 +218,9 @@ public class ReleaseDate QuestHelperQuest.MEAT_AND_GREET, QuestHelperQuest.ETHICALLY_ACQUIRED_ANTIQUITIES, QuestHelperQuest.THE_CURSE_OF_ARRAV, + QuestHelperQuest.THE_FINAL_DAWN, + QuestHelperQuest.SHADOWS_OF_CUSTODIA, + QuestHelperQuest.SCRAMBLED, // Miniquests QuestHelperQuest.ALFRED_GRIMHANDS_BARCRAWL, QuestHelperQuest.THE_MAGE_ARENA, @@ -237,6 +239,7 @@ public class ReleaseDate //QuestHelperQuest.THE_FROZEN_DOOR, - Placeholder for future addition. QuestHelperQuest.HOPESPEARS_WILL, //QuestHelperQuest.INTO_THE_TOMBS, - Placeholder for future addition. - QuestHelperQuest.HIS_FAITHFUL_SERVANTS + QuestHelperQuest.HIS_FAITHFUL_SERVANTS, + QuestHelperQuest.VALE_TOTEMS ); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/playerquests/bikeshedder/BikeShedder.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/playerquests/bikeshedder/BikeShedder.java index dcf6e074115..31cf0efb50e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/playerquests/bikeshedder/BikeShedder.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/playerquests/bikeshedder/BikeShedder.java @@ -88,6 +88,8 @@ public class BikeShedder extends BasicQuestHelper private ItemRequirement lightbearer; private ItemRequirement elemental30Unique; private ItemRequirement elemental30; + private ItemRequirement anyCoins; + private ItemStep getCoins; @Override public Map loadSteps() @@ -103,6 +105,7 @@ public Map loadSteps() steps.addStep(new ZoneRequirement(new WorldPoint(3223, 3218, 0)), useLogOnBush); steps.addStep(new ZoneRequirement(new WorldPoint(3222, 3217, 0)), useCoinOnBush); steps.addStep(new ZoneRequirement(new WorldPoint(3223, 3216, 0)), useManyCoinsOnBush); + steps.addStep(new ZoneRequirement(new WorldPoint(3224, 3216, 0)), getCoins); steps.addStep(conditionalRequirementZoneRequirement, conditionalRequirementLookAtCoins); steps.addStep(new ZoneRequirement(new WorldPoint(3224, 3221, 0)), lookAtCooksAssistant); return new ImmutableMap.Builder() @@ -184,6 +187,9 @@ protected void setupRequirements() ItemID.FIRERUNE), 30); elemental30.setTooltip("You have potato"); haveRunes = new DetailedQuestStep(this, "Compare rune checks for ItemRequirement and ItemRequirements with OR.", elemental30, elemental30Unique); + + anyCoins = new ItemRequirement("Coins", ItemCollections.COINS); + getCoins = new ItemStep(this, new WorldPoint(3224, 3215, 0), "Get coins", anyCoins); } @Override @@ -202,6 +208,7 @@ public List getPanels() panels.add(new PanelDetails("Use log on mysterious bush", List.of(useLogOnBush), List.of(anyLog))); panels.add(new PanelDetails("Use coins on mysterious bush", List.of(useCoinOnBush, useManyCoinsOnBush), List.of(oneCoin, manyCoins))); panels.add(new PanelDetails("Conditional requirement", List.of(conditionalRequirementLookAtCoins), List.of(conditionalRequirementCoins, conditionalRequirementGoldBar))); + panels.add(new PanelDetails("Item step", List.of(getCoins), List.of(anyCoins))); panels.add(new PanelDetails("Quest state", List.of(lookAtCooksAssistant), List.of(lookAtCooksAssistantRequirement, lookAtCooksAssistantTextRequirement))); panels.add(new PanelDetails("Ensure staircase upstairs in Sunrise Palace is highlighted", List.of(goDownstairsInSunrisePalace), List.of())); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/questhelpers/QuestHelper.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/questhelpers/QuestHelper.java index 5d079e4562f..99276e9fad3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/questhelpers/QuestHelper.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/questhelpers/QuestHelper.java @@ -256,6 +256,14 @@ public void initializeRequirements() hasInitialized = true; } + /// Uninitialize requirements, meaning next time the quest is started it'll recreate all zones & requirements. + /// + /// Intended for developer mode + public void uninitializeRequirements() + { + hasInitialized = false; + } + public List getItemRequirements() { return null; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/questinfo/ExternalQuestResources.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/questinfo/ExternalQuestResources.java index 12fbe616fb9..52b5a7285d8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/questinfo/ExternalQuestResources.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/questinfo/ExternalQuestResources.java @@ -185,6 +185,9 @@ public enum ExternalQuestResources DEATH_ON_THE_ISLE("https://oldschool.runescape.wiki/w/Death_on_the_Isle"), MEAT_AND_GREET("https://oldschool.runescape.wiki/w/Meat_and_Greet"), THE_HEART_OF_DARKNESS("https://oldschool.runescape.wiki/w/The_Heart_of_Darkness"), + THE_FINAL_DAWN("https://oldschool.runescape.wiki/w/The_Final_Dawn"), + SHADOWS_OF_CUSTODIA("https://oldschool.runescape.wiki/w/Shadows_of_Custodia"), + SCRAMBLED("https://oldschool.runescape.wiki/w/Scrambled!"), //Miniquests ENTER_THE_ABYSS("https://oldschool.runescape.wiki/w/Enter_the_Abyss"), @@ -204,6 +207,7 @@ public enum ExternalQuestResources DADDYS_HOME("https://oldschool.runescape.wiki/w/Daddy%27s_Home"), HOPESPEARS_WILL("https://oldschool.runescape.wiki/w/Hopespear%27s_Will"), THE_CURSE_OF_ARRAV("https://oldschool.runescape.wiki/w/The_Curse_of_Arrav"), + VALE_TOTEMS("https://oldschool.runescape.wiki/w/Vale_Totems_(miniquest)"), // Fake miniquests KNIGHT_WAVES_TRAINING_GROUNDS("https://oldschool.runescape.wiki/w/Camelot_training_room"), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/questinfo/QuestHelperQuest.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/questinfo/QuestHelperQuest.java index 8791c8cd1c9..8b7261f3e55 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/questinfo/QuestHelperQuest.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/questinfo/QuestHelperQuest.java @@ -85,6 +85,7 @@ import net.runelite.client.plugins.microbot.questhelper.helpers.miniquests.themagearenai.TheMageArenaI; import net.runelite.client.plugins.microbot.questhelper.helpers.miniquests.themagearenaii.MA2Locator; import net.runelite.client.plugins.microbot.questhelper.helpers.miniquests.themagearenaii.TheMageArenaII; +import net.runelite.client.plugins.microbot.questhelper.helpers.miniquests.valetotems.ValeTotems; import net.runelite.client.plugins.microbot.questhelper.helpers.mischelpers.allneededitems.AllNeededItems; import net.runelite.client.plugins.microbot.questhelper.helpers.mischelpers.knightswaves.KnightWaves; import net.runelite.client.plugins.microbot.questhelper.helpers.mischelpers.strongholdofsecurity.StrongholdOfSecurity; @@ -201,10 +202,12 @@ import net.runelite.client.plugins.microbot.questhelper.helpers.quests.rumdeal.RumDeal; import net.runelite.client.plugins.microbot.questhelper.helpers.quests.runemysteries.RuneMysteries; import net.runelite.client.plugins.microbot.questhelper.helpers.quests.scorpioncatcher.ScorpionCatcher; +import net.runelite.client.plugins.microbot.questhelper.helpers.quests.scrambled.Scrambled; import net.runelite.client.plugins.microbot.questhelper.helpers.quests.seaslug.SeaSlug; import net.runelite.client.plugins.microbot.questhelper.helpers.quests.secretsofthenorth.SecretsOfTheNorth; import net.runelite.client.plugins.microbot.questhelper.helpers.quests.shadesofmortton.ShadesOfMortton; import net.runelite.client.plugins.microbot.questhelper.helpers.quests.shadowofthestorm.ShadowOfTheStorm; +import net.runelite.client.plugins.microbot.questhelper.helpers.quests.shadowsofcustodia.ShadowsOfCustodia; import net.runelite.client.plugins.microbot.questhelper.helpers.quests.sheepherder.SheepHerder; import net.runelite.client.plugins.microbot.questhelper.helpers.quests.sheepshearer.SheepShearer; import net.runelite.client.plugins.microbot.questhelper.helpers.quests.shieldofarrav.ShieldOfArravBlackArmGang; @@ -227,6 +230,7 @@ import net.runelite.client.plugins.microbot.questhelper.helpers.quests.thedigsite.TheDigSite; import net.runelite.client.plugins.microbot.questhelper.helpers.quests.theeyesofglouphrie.TheEyesOfGlouphrie; import net.runelite.client.plugins.microbot.questhelper.helpers.quests.thefeud.TheFeud; +import net.runelite.client.plugins.microbot.questhelper.helpers.quests.thefinaldawn.TheFinalDawn; import net.runelite.client.plugins.microbot.questhelper.helpers.quests.theforsakentower.TheForsakenTower; import net.runelite.client.plugins.microbot.questhelper.helpers.quests.thefremennikexiles.TheFremennikExiles; import net.runelite.client.plugins.microbot.questhelper.helpers.quests.thefremennikisles.TheFremennikIsles; @@ -467,6 +471,9 @@ public enum QuestHelperQuest MEAT_AND_GREET(new MeatAndGreet(), Quest.MEAT_AND_GREET, QuestVarbits.QUEST_MEAT_AND_GREET, QuestDetails.Type.P2P, QuestDetails.Difficulty.EXPERIENCED), THE_HEART_OF_DARKNESS(new TheHeartOfDarkness(), Quest.THE_HEART_OF_DARKNESS, QuestVarbits.QUEST_THE_HEART_OF_DARKNESS, QuestDetails.Type.P2P, QuestDetails.Difficulty.EXPERIENCED), THE_CURSE_OF_ARRAV(new TheCurseOfArrav(), Quest.THE_CURSE_OF_ARRAV, QuestVarbits.QUEST_THE_CURSE_OF_ARRAV, QuestDetails.Type.P2P, QuestDetails.Difficulty.MASTER), + THE_FINAL_DAWN(new TheFinalDawn(), Quest.THE_FINAL_DAWN, QuestVarbits.QUEST_THE_FINAL_DAWN, QuestDetails.Type.P2P, QuestDetails.Difficulty.MASTER), + SHADOWS_OF_CUSTODIA(new ShadowsOfCustodia(), Quest.SHADOWS_OF_CUSTODIA, QuestVarbits.QUEST_SHADOWS_OF_CUSTODIA, QuestDetails.Type.P2P, QuestDetails.Difficulty.MASTER /* TODO: CONFIRM DIFFICULTY */), + SCRAMBLED(new Scrambled(), Quest.SCRAMBLED, QuestVarbits.QUEST_SCRAMBLED, QuestDetails.Type.P2P, QuestDetails.Difficulty.INTERMEDIATE), //Miniquests ENTER_THE_ABYSS(new EnterTheAbyss(), Quest.ENTER_THE_ABYSS, QuestVarPlayer.QUEST_ENTER_THE_ABYSS, QuestDetails.Type.MINIQUEST, QuestDetails.Difficulty.MINIQUEST), @@ -485,6 +492,7 @@ public enum QuestHelperQuest HOPESPEARS_WILL(new HopespearsWill(), Quest.HOPESPEARS_WILL, QuestVarbits.QUEST_HOPESPEARS_WILL, QuestDetails.Type.MINIQUEST, QuestDetails.Difficulty.MINIQUEST), HIS_FAITHFUL_SERVANTS(new HisFaithfulServants(), Quest.HIS_FAITHFUL_SERVANTS, QuestVarbits.HIS_FAITHFUL_SERVANTS, QuestDetails.Type.MINIQUEST, QuestDetails.Difficulty.MINIQUEST), BARBARIAN_TRAINING(new BarbarianTraining(), Quest.BARBARIAN_TRAINING, QuestVarbits.BARBARIAN_TRAINING, QuestDetails.Type.MINIQUEST, QuestDetails.Difficulty.MINIQUEST), + VALE_TOTEMS(new ValeTotems(), Quest.VALE_TOTEMS, QuestVarbits.QUEST_VALE_TOTEMS, QuestDetails.Type.MINIQUEST, QuestDetails.Difficulty.MINIQUEST), // Fake miniquests KNIGHT_WAVES_TRAINING_GROUNDS(new KnightWaves(), "Knight Waves Training Grounds", QuestVarbits.KNIGHT_WAVES_TRAINING_GROUNDS, 8, diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/questinfo/QuestVarbits.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/questinfo/QuestVarbits.java index 50c6d3af6e6..35d5c638d04 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/questinfo/QuestVarbits.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/questinfo/QuestVarbits.java @@ -121,6 +121,9 @@ public enum QuestVarbits QUEST_MEAT_AND_GREET(VarbitID.MAG), QUEST_THE_HEART_OF_DARKNESS(VarbitID.VMQ3), QUEST_THE_CURSE_OF_ARRAV(VarbitID.COA), + QUEST_THE_FINAL_DAWN(VarbitID.VMQ4), + QUEST_SHADOWS_OF_CUSTODIA(VarbitID.SOC), + QUEST_SCRAMBLED(VarbitID.SCRAMBLED), /** * mini-quest varbits, these don't hold the completion value. */ @@ -136,6 +139,7 @@ public enum QuestVarbits QUEST_IN_SEARCH_OF_KNOWLEDGE(VarbitID.HOSDUN_KNOWLEDGE_SEARCH), QUEST_DADDYS_HOME(VarbitID.DADDYSHOME_STATUS), QUEST_HOPESPEARS_WILL(VarbitID.HOPESPEAR), + QUEST_VALE_TOTEMS(VarbitID.ENT_TOTEMS_INTRO), HIS_FAITHFUL_SERVANTS(VarbitID.HFS), BARBARIAN_TRAINING(VarbitID.BRUT_MINIQUEST), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/item/ItemRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/item/ItemRequirement.java index 4e62061f3eb..ca15843498b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/item/ItemRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/item/ItemRequirement.java @@ -92,9 +92,13 @@ public class ItemRequirement extends AbstractRequirement /** * Indicates whether the item must be equipped. */ - @Getter @Setter - protected boolean equip; + protected boolean mustBeEquipped; + + public boolean mustBeEquipped() { + return this.mustBeEquipped; + } + /** * Whether the item should be highlighted in the inventory. @@ -195,7 +199,7 @@ public ItemRequirement(String name, int id, int quantity) this.id = id; this.quantity = quantity; this.name = name; - equip = false; + mustBeEquipped = false; } /** @@ -204,12 +208,12 @@ public ItemRequirement(String name, int id, int quantity) * @param name the display name of the item requirement * @param id the primary item id for the requirement * @param quantity the required quantity of the item - * @param equip {@code true} if the item must be equipped, {@code false} otherwise + * @param mustBeEquipped {@code true} if the item must be equipped, {@code false} otherwise */ - public ItemRequirement(String name, int id, int quantity, boolean equip) + public ItemRequirement(String name, int id, int quantity, boolean mustBeEquipped) { this(name, id, quantity); - this.equip = equip; + this.mustBeEquipped = mustBeEquipped; } /** @@ -263,14 +267,14 @@ public ItemRequirement(String name, List items, int quantity) * @param name the display name of the item requirement * @param items the list of item ids, where the first element is the primary id * @param quantity the required quantity of the item - * @param equip {@code true} if the item must be equipped, {@code false} otherwise + * @param mustBeEquipped {@code true} if the item must be equipped, {@code false} otherwise * @throws AssertionError if any item in the list is {@code null} */ - public ItemRequirement(String name, List items, int quantity, boolean equip) + public ItemRequirement(String name, List items, int quantity, boolean mustBeEquipped) { this(name, items.get(0), quantity); assert (items.stream().noneMatch(Objects::isNull)); - this.equip = equip; + this.mustBeEquipped = mustBeEquipped; this.addAlternates(items.subList(1, items.size())); } @@ -313,13 +317,13 @@ public ItemRequirement(String name, ItemCollections itemCollection, int quantity * @param name the display name of the item requirement * @param itemCollection the {@link ItemCollections} containing item ids and wiki term information * @param quantity the required quantity of the item - * @param equip {@code true} if the item must be equipped, {@code false} otherwise + * @param mustBeEquipped {@code true} if the item must be equipped, {@code false} otherwise */ - public ItemRequirement(String name, ItemCollections itemCollection, int quantity, boolean equip) + public ItemRequirement(String name, ItemCollections itemCollection, int quantity, boolean mustBeEquipped) { this(name, itemCollection.getItems().get(0), quantity); this.setUrlSuffix(itemCollection.getWikiTerm()); - this.equip = equip; + this.mustBeEquipped = mustBeEquipped; this.addAlternates(itemCollection.getItems().subList(1, itemCollection.getItems().size())); } @@ -420,7 +424,7 @@ public ItemRequirement named(String name) public ItemRequirement equipped() { ItemRequirement newItem = copy(); - newItem.setEquip(true); + newItem.setMustBeEquipped(true); return newItem; } @@ -502,7 +506,7 @@ protected ItemRequirement copyOfClass() { throw new UnsupportedOperationException("Subclasses must override copy()"); } - return new ItemRequirement(name, id, quantity, equip); + return new ItemRequirement(name, id, quantity, mustBeEquipped); } /** @@ -515,7 +519,7 @@ public ItemRequirement copy() ItemRequirement newItem = copyOfClass(); newItem.setName(name); newItem.setId(id); - newItem.setEquip(equip); + newItem.setMustBeEquipped(mustBeEquipped); newItem.setQuantity(quantity); newItem.addAlternates(alternateItems); newItem.setDisplayItemId(displayItemId); @@ -548,9 +552,11 @@ public boolean isActualItem() /** * Appends a tooltip indicating that the item can be obtained during the quest. */ - public void canBeObtainedDuringQuest() + public ItemRequirement canBeObtainedDuringQuest() { appendToTooltip("Can be obtained during the quest."); + + return this; } /** @@ -697,6 +703,10 @@ public Color getColor(Client client, QuestHelperConfig config) { color = Color.GRAY; } + else if (additionalOptions != null && additionalOptions.check(client)) + { + color = config.passColour(); + } else if (this.checkContainersOnPlayer(client)) { color = config.passColour(); @@ -913,7 +923,7 @@ protected ArrayList getAdditionalText(Client client, boolean incl Color equipColor = config.passColour(); ArrayList lines = new ArrayList<>(); - if (this.isEquip()) + if (this.mustBeEquipped()) { String equipText = "(equipped)"; if (!checkContainers(QuestContainerManager.getEquippedData())) @@ -956,7 +966,7 @@ public boolean check(Client client) List containers = new ArrayList<>(); containers.add(QuestContainerManager.getEquippedData()); - if (!equip) + if (!mustBeEquipped) { containers.add(QuestContainerManager.getInventoryData()); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/item/ItemRequirements.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/item/ItemRequirements.java index 4292b14f406..118d50484cd 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/item/ItemRequirements.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/item/ItemRequirements.java @@ -335,6 +335,7 @@ public boolean checkItems(Client client, List items) public ItemRequirement copy() { ItemRequirements newItem = new ItemRequirements(getLogicType(), getName(), getItemRequirements()); + newItem.setMustBeEquipped(mustBeEquipped); newItem.addAlternates(alternateItems); newItem.setDisplayItemId(getDisplayItemId()); newItem.setHighlightInInventory(highlightInInventory); @@ -380,20 +381,19 @@ public ItemRequirement equipped() } newItem.itemRequirements.clear(); newItem.itemRequirements.addAll(newReqs); - newItem.equip = true; + newItem.mustBeEquipped = true; return newItem; } /** * Sets the equip flag for all aggregated item requirements. * - * @param shouldEquip {@code true} to mark the items as equipped; {@code false} otherwise. + * @param mustBeEquipped {@code true} to mark the items as equipped; {@code false} otherwise. */ @Override - public void setEquip(boolean shouldEquip) + public void setMustBeEquipped(boolean mustBeEquipped) { - itemRequirements.forEach(itemRequirement -> itemRequirement.setEquip(true)); - equip = shouldEquip; + this.mustBeEquipped = mustBeEquipped; } /** diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/npc/NpcRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/npc/NpcRequirement.java index 53c3f566d02..8ccdf7e21b3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/npc/NpcRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/npc/NpcRequirement.java @@ -132,7 +132,7 @@ public NpcRequirement(int npcID, String npcName) public boolean check(Client client) { List found = client.getTopLevelWorldView().npcs().stream() - .filter(npc -> npc.getId() == npcID) + .filter(npc -> npc.getId() == npcID || npc.getComposition().getId() == npcID) .filter(npc -> npcName == null || (npc.getName() != null && npc.getName().equals(npcName))) .collect(Collectors.toList()); @@ -142,7 +142,7 @@ public boolean check(Client client) { for (NPC npc : found) { - WorldPoint npcLocation = WorldPoint.fromLocalInstance(client, npc.getLocalLocation(), 2); + WorldPoint npcLocation = WorldPoint.fromLocalInstance(client, npc.getLocalLocation(), npc.getWorldLocation().getPlane()); if (npcLocation != null) { boolean inZone = zone.contains(npcLocation); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/player/FreeInventorySlotRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/player/FreeInventorySlotRequirement.java index 588eba35881..47ef5eb748b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/player/FreeInventorySlotRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/player/FreeInventorySlotRequirement.java @@ -30,9 +30,9 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.AbstractRequirement; import lombok.Getter; import net.runelite.api.Client; -import net.runelite.api.InventoryID; import net.runelite.api.Item; import net.runelite.api.ItemContainer; +import net.runelite.api.gameval.InventoryID; import javax.annotation.Nonnull; import java.util.Locale; @@ -45,19 +45,18 @@ public class FreeInventorySlotRequirement extends AbstractRequirement { private final int NUM_INVENTORY_SLOTS_TOTAL = 28; - private InventoryID inventoryID; + private int inventoryID; private int numSlotsFree; /** * Checks if the player has a required number of slots free in a given * {@link InventoryID} * - * @param inventoryID the inventory to check * @param numSlotsFree the required number of slots free */ public FreeInventorySlotRequirement(int numSlotsFree) { - this.inventoryID = InventoryID.INVENTORY; + this.inventoryID = InventoryID.INV; this.numSlotsFree = numSlotsFree; } @@ -82,6 +81,6 @@ private boolean isOpenSlot(Item item) @Override public String getDisplayText() { - return getNumSlotsFree() + " free " + getInventoryID().name().toLowerCase(Locale.ROOT).replaceAll("_", " ") + " slots"; + return getNumSlotsFree() + " free inventory slots"; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/player/SpellbookRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/player/SpellbookRequirement.java index 0f8df1ba556..98661d13b7c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/player/SpellbookRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/player/SpellbookRequirement.java @@ -29,12 +29,12 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.AbstractRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.util.Spellbook; import net.runelite.api.Client; +import net.runelite.api.gameval.VarbitID; import javax.annotation.Nonnull; public class SpellbookRequirement extends AbstractRequirement { - private static final int SPELLBOOK_VARBIT = 4070; private final Spellbook spellBook; public SpellbookRequirement(Spellbook spellBook) @@ -46,7 +46,7 @@ public SpellbookRequirement(Spellbook spellBook) @Override public boolean check(Client client) { - return spellBook.check(client, SPELLBOOK_VARBIT); + return spellBook.check(client, VarbitID.SPELLBOOK); } @Nonnull diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/quest/QuestPointRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/quest/QuestPointRequirement.java index 18403e8f688..4607255e05b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/quest/QuestPointRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/quest/QuestPointRequirement.java @@ -31,7 +31,7 @@ import net.runelite.client.plugins.microbot.questhelper.requirements.util.Operation; import lombok.Getter; import net.runelite.api.Client; -import net.runelite.api.VarPlayer; +import net.runelite.api.gameval.VarPlayerID; import javax.annotation.Nonnull; @@ -72,7 +72,7 @@ public QuestPointRequirement(int requiredQuestPoints, Operation operation) @Override public boolean check(Client client) { - return operation.check(client.getVarpValue(VarPlayer.QUEST_POINTS), requiredQuestPoints); + return operation.check(client.getVarpValue(VarPlayerID.QP), requiredQuestPoints); } @Nonnull diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/runelite/RuneliteRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/runelite/RuneliteRequirement.java index 2b6502a7a5c..e7f3f60b96c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/runelite/RuneliteRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/runelite/RuneliteRequirement.java @@ -58,6 +58,11 @@ public RuneliteRequirement(ConfigManager configManager, String id, String expect this(configManager, id, "false", expectedValue, text, requirements); } + public RuneliteRequirement(ConfigManager configManager, String id) + { + this(configManager, id, "true", new HashMap<>()); + } + public RuneliteRequirement(ConfigManager configManager, String id, String expectedValue) { this(configManager, id, expectedValue, new HashMap<>()); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/util/ItemSlots.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/util/ItemSlots.java index 2fe6db42379..e693900f061 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/util/ItemSlots.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/util/ItemSlots.java @@ -28,9 +28,9 @@ import lombok.Getter; import net.runelite.api.Client; -import net.runelite.api.InventoryID; import net.runelite.api.Item; import net.runelite.api.ItemContainer; +import net.runelite.api.gameval.InventoryID; import java.util.function.Predicate; import java.util.stream.Stream; @@ -90,7 +90,7 @@ public boolean checkInventory(Client client, Predicate predicate) { return false; } - ItemContainer equipment = client.getItemContainer(InventoryID.EQUIPMENT); + ItemContainer equipment = client.getItemContainer(InventoryID.WORN); if (equipment == null || getSlotIdx() < 0) // unknown slot { return false; @@ -120,7 +120,7 @@ public boolean contains(Client client, Predicate predicate) { return false; } - ItemContainer equipment = client.getItemContainer(InventoryID.EQUIPMENT); + ItemContainer equipment = client.getItemContainer(InventoryID.WORN); if (equipment == null || getSlotIdx() < 0) // unknown slot { return false; @@ -133,4 +133,4 @@ public boolean contains(Client client, Predicate predicate) return predicate.test(item); } -} \ No newline at end of file +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/util/RequirementBuilder.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/util/RequirementBuilder.java index fd66dae20ba..7eeb14574a3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/util/RequirementBuilder.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/requirements/util/RequirementBuilder.java @@ -26,7 +26,6 @@ */ package net.runelite.client.plugins.microbot.questhelper.requirements.util; -import net.runelite.client.plugins.microbot.questhelper.requirements.ComplexRequirement; import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; import net.runelite.api.Client; @@ -36,7 +35,7 @@ /** * Builder for building non-standard simple {@link Requirement}s.
* For complex requirements, use {@link ComplexRequirementBuilder}, - * {@link ComplexRequirement}, or + * {@link net.runelite.client.plugins.microbot.questhelper.requirements.ComplexRequirement}, or * implement your own {@link Requirement}. */ public final class RequirementBuilder diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/runeliteobjects/extendedruneliteobjects/FakeItem.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/runeliteobjects/extendedruneliteobjects/FakeItem.java index eb2c1df4622..af9c2a20ec8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/runeliteobjects/extendedruneliteobjects/FakeItem.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/runeliteobjects/extendedruneliteobjects/FakeItem.java @@ -25,10 +25,10 @@ package net.runelite.client.plugins.microbot.questhelper.runeliteobjects.extendedruneliteobjects; import net.runelite.client.plugins.microbot.questhelper.runeliteobjects.RuneliteConfigSetter; -import net.runelite.api.AnimationID; import net.runelite.api.Client; import net.runelite.api.Player; import net.runelite.api.coords.WorldPoint; +import net.runelite.api.gameval.AnimationID; import net.runelite.client.callback.ClientThread; public class FakeItem extends ExtendedRuneliteObject @@ -52,7 +52,7 @@ public void addTakeAction(RuneliteObjectManager runeliteObjectManager, RuneliteC if (player.getWorldLocation().distanceTo(getWorldPoint()) <= 1) { runeliteObjectManager.createChatboxMessage(actionText); - player.setAnimation(AnimationID.BURYING_BONES); + player.setAnimation(AnimationID.HUMAN_PICKUPFLOOR); player.setAnimationFrame(0); // Set variable diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/runeliteobjects/extendedruneliteobjects/RuneliteObjectManager.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/runeliteobjects/extendedruneliteobjects/RuneliteObjectManager.java index b282fdfd052..fcaea921de0 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/runeliteobjects/extendedruneliteobjects/RuneliteObjectManager.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/runeliteobjects/extendedruneliteobjects/RuneliteObjectManager.java @@ -37,6 +37,7 @@ import net.runelite.api.events.*; import net.runelite.api.gameval.InterfaceID; import net.runelite.api.widgets.Widget; +import net.runelite.api.gameval.SpriteID; import net.runelite.client.callback.ClientThread; import net.runelite.client.callback.Hooks; import net.runelite.client.chat.ChatColorType; @@ -81,7 +82,12 @@ public class RuneliteObjectManager Point clickPos; int redClickAnimationFrame = 0; int bufferRedClickAnimation = 0; - int[] redClick = new int[]{SpriteID.RED_CLICK_ANIMATION_1, SpriteID.RED_CLICK_ANIMATION_2, SpriteID.RED_CLICK_ANIMATION_3, SpriteID.RED_CLICK_ANIMATION_4}; + int[] redClick = new int[]{ + SpriteID.CrossInterface.RED_CLICK_ANIMATION_1, + SpriteID.CrossInterface.RED_CLICK_ANIMATION_2, + SpriteID.CrossInterface.RED_CLICK_ANIMATION_3, + SpriteID.CrossInterface.RED_CLICK_ANIMATION_4 + }; final int ANIMATION_PERIOD = 5; ExtendedRuneliteObject lastInteractedWithRuneliteObject; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/statemanagement/PlayerStateManager.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/statemanagement/PlayerStateManager.java index 689f151152f..d97ad298139 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/statemanagement/PlayerStateManager.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/statemanagement/PlayerStateManager.java @@ -33,11 +33,11 @@ import net.runelite.api.ChatMessageType; import net.runelite.api.Client; import net.runelite.api.Player; -import net.runelite.api.Varbits; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.ChatMessage; import net.runelite.api.events.GameTick; import net.runelite.api.events.VarbitChanged; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.config.ConfigManager; import net.runelite.client.eventbus.EventBus; import net.runelite.client.eventbus.Subscribe; @@ -139,7 +139,7 @@ public void onGameTick(GameTick gameTick) @Subscribe public void onVarbitChanged(VarbitChanged event) { - if (event.getVarbitId() == Varbits.ACCOUNT_TYPE) { + if (event.getVarbitId() == VarbitID.IRONMAN) { var newAccountType = AccountType.get(event.getValue()); if (newAccountType == null) { // The account type value is invalid, leave previous account type as is diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/ConditionalStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/ConditionalStep.java index 1e21000c657..0e721e17491 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/ConditionalStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/ConditionalStep.java @@ -59,7 +59,10 @@ public class ConditionalStep extends QuestStep implements OwnerStep protected boolean started = false; - /** + /// Controls whether the sidebar step text should use the current step / child step / fallback step instead of the ConditionalStep's text. + protected boolean passthroughText = false; + + /** * Controls whether the sidebar highlight should consider child steps when determining what to highlight. * When true, the sidebar will highlight the most specific active step in the step hierarchy. * When false, the sidebar will only highlight this ConditionalStep itself, ignoring any active child steps. @@ -71,7 +74,6 @@ public class ConditionalStep extends QuestStep implements OwnerStep protected boolean checkAllChildStepsOnListenerCall = false; protected LinkedHashMap steps; - protected final HashMap orderedSteps; protected final List chatConditions = new ArrayList<>(); protected final List npcConditions = new ArrayList<>(); protected final List dialogConditions = new ArrayList<>(); @@ -102,11 +104,6 @@ public ConditionalStep(QuestHelper questHelper, Integer id, QuestStep step, Stri this.requirements.addAll(Arrays.asList(requirements)); this.steps = new LinkedHashMap<>(); this.steps.put(null, step); - this.orderedSteps = new LinkedHashMap<>(); - if (id != null) - { - this.orderedSteps.put(id, step); - } this.id = id; } @@ -485,6 +482,11 @@ public Collection getSteps() return steps.values(); } + public HashMap getStepsMap() + { + return steps; + } + public ConditionalStep copy() { ConditionalStep newStep = new ConditionalStep(getQuestHelper(), steps.get(null)); @@ -497,4 +499,26 @@ public ConditionalStep copy() .forEach(conditions -> newStep.addStep(conditions, steps.get(conditions))); return newStep; } + + /// Set to true if this conditional step should pass through the current step's text in the sidebar + public void setShouldPassthroughText(boolean newPassthroughText) + { + this.passthroughText = newPassthroughText; + } + + @Override + public List getText() + { + if (passthroughText) + { + if (currentStep != null) + { + return currentStep.getText(); + } + + return steps.get(null).getText(); + } + + return super.getText(); + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/DetailedQuestStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/DetailedQuestStep.java index 0a953a5f756..272313771de 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/DetailedQuestStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/DetailedQuestStep.java @@ -52,6 +52,8 @@ import net.runelite.api.events.GameTick; import net.runelite.api.events.ItemDespawned; import net.runelite.api.events.ItemSpawned; +import net.runelite.api.widgets.Widget; +import net.runelite.api.gameval.SpriteID; import net.runelite.client.eventbus.EventBus; import net.runelite.client.eventbus.Subscribe; import net.runelite.client.events.PluginMessage; @@ -124,6 +126,9 @@ public class DetailedQuestStep extends QuestStep public boolean considerBankForItemHighlight; public int iconToUseForNeededItems = -1; + @Setter + private boolean onlyHighlightItemsOnTile; + public DetailedQuestStep(QuestHelper questHelper, String text, Requirement... requirements) { @@ -169,8 +174,11 @@ public void startUp() super.startUp(); if (worldPoint != null) { - mapPoint = new QuestHelperWorldMapPoint(worldPoint, getQuestImage()); - worldMapPointManager.add(mapPoint); + if (questHelper.getConfig().showWorldMapPoint()) + { + mapPoint = new QuestHelperWorldMapPoint(worldPoint, getQuestImage()); + worldMapPointManager.add(mapPoint); + } setShortestPath(); } @@ -251,8 +259,11 @@ public void setWorldPoint(WorldPoint worldPoint) } if (worldPoint != null) { - mapPoint = new QuestHelperWorldMapPoint(worldPoint, getQuestImage()); - worldMapPointManager.add(mapPoint); + if (questHelper.getConfig().showWorldMapPoint()) + { + mapPoint = new QuestHelperWorldMapPoint(worldPoint, getQuestImage()); + worldMapPointManager.add(mapPoint); + } } else { @@ -417,7 +428,7 @@ public void addSafeSpots(WorldPoint... worldPoints) { for (WorldPoint worldPoint : worldPoints) { - markedTiles.add(new QuestTile(worldPoint, SpriteID.TAB_COMBAT)); + markedTiles.add(new QuestTile(worldPoint, SpriteID.SideIcons.COMBAT)); } } @@ -561,6 +572,7 @@ public void onItemSpawned(ItemSpawned itemSpawned) { TileItem item = itemSpawned.getItem(); Tile tile = itemSpawned.getTile(); + if (onlyHighlightItemsOnTile && !QuestPerspective.getInstanceLocalPointFromReal(client, worldPoint).contains(tile.getLocalLocation())) return; for (Requirement requirement : requirements) { if (isItemRequirement(requirement) && requirementContainsID((ItemRequirement) requirement, item.getId())) @@ -610,6 +622,7 @@ protected void addItemTiles(Collection requirements) { continue; } + if (onlyHighlightItemsOnTile && !QuestPerspective.getInstanceLocalPointFromReal(client, worldPoint).contains(tile.getLocalLocation())) continue; for (Requirement requirement : requirements) { if (isValidRequirementForTileItem(requirement, item)) @@ -823,18 +836,34 @@ protected boolean isActionForRequiredItem(MenuEntry entry) option.equals("Take")); } + @Override + protected boolean isValidRenderRequirementInInventory(ItemRequirement requirement, Widget item) + { + return (teleport.contains(requirement) || requirement.shouldHighlightInInventory(client)) && requirement.getAllIds().contains(item.getItemId()); + } + @Override public void setShortestPath() { - if (worldPoint != null && !isLineDrawn()) + if (worldPoint == null) { - WorldPoint playerWp = client.getLocalPlayer().getWorldLocation(); - if (getQuestHelper().getConfig().useShortestPath() && playerWp != null) { - Map data = new HashMap<>(); - data.put("start", playerWp); - data.put("target", worldPoint); - eventBus.post(new PluginMessage("shortestpath", "path", data)); - } + return; + } + if (isLineDrawn()) + { + return; + } + var playerWp = client.getLocalPlayer().getWorldLocation(); + if (playerWp == null) + { + return; + } + if (getQuestHelper().getConfig().useShortestPath()) + { + Map data = new HashMap<>(); + data.put("start", playerWp); + data.put("target", worldPoint); + eventBus.post(new PluginMessage("shortestpath", "path", data)); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/DigStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/DigStep.java index 4e1f68dc7f3..aae07b61a5d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/DigStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/DigStep.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, Trevor + * Copyright (c) 2025, pajlada * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,8 +29,9 @@ import net.runelite.client.plugins.microbot.questhelper.questhelpers.QuestHelper; import net.runelite.client.plugins.microbot.questhelper.requirements.Requirement; import net.runelite.client.plugins.microbot.questhelper.requirements.item.ItemRequirement; -import net.runelite.client.plugins.microbot.questhelper.requirements.util.InventorySlots; -import net.runelite.api.Item; +import java.awt.*; +import java.awt.image.BufferedImage; +import lombok.Setter; import net.runelite.api.Player; import net.runelite.api.coords.LocalPoint; import net.runelite.api.coords.WorldPoint; @@ -38,46 +40,55 @@ import net.runelite.client.eventbus.Subscribe; import net.runelite.client.ui.overlay.OverlayUtil; -import java.awt.*; -import java.awt.image.BufferedImage; -import java.util.function.Predicate; - public class DigStep extends DetailedQuestStep { - private final ItemRequirement SPADE = new ItemRequirement("Spade", ItemID.SPADE); - private Predicate expectedItemPredicate = i -> i.getId() == -1; - private boolean hasExpectedItem = false; - public DigStep(QuestHelper questHelper, WorldPoint worldPoint, String text, Requirement... requirements) + private final ItemRequirement spade; + + @Setter + private WhenToHighlight whenToHighlight = WhenToHighlight.InScene; + + /// Private ctor requiring a spade requirement, to be used by public ctors & builders + private DigStep(QuestHelper questHelper, WorldPoint worldPoint, String text, ItemRequirement spade, Requirement... requirements) { super(questHelper, worldPoint, text, requirements); - this.getRequirements().add(SPADE); + this.spade = spade; + this.getRequirements().add(this.spade); } - public void setExpectedItem(int itemID) + public DigStep(QuestHelper questHelper, WorldPoint worldPoint, String text, Requirement... requirements) { - setExpectedItem(i -> i.getId() == itemID); + this(questHelper, worldPoint, text, new ItemRequirement("Spade", ItemID.SPADE), requirements); } - public void setExpectedItem(Predicate predicate) + /// Creates a DigStep with a custom spade requirement, allowing you to pass through custom tooltips / tips to the player + public static DigStep withCustomSpadeRequirement(QuestHelper questHelper, WorldPoint worldPoint, String text, ItemRequirement spade, Requirement... requirements) { - this.expectedItemPredicate = predicate == null ? i -> true : predicate; + return new DigStep(questHelper, worldPoint, text, spade, requirements); } @Subscribe public void onGameTick(GameTick event) { super.onGameTick(event); - hasExpectedItem = InventorySlots.INVENTORY_SLOTS.contains(client, expectedItemPredicate); - if (!hasExpectedItem) + + Player player = client.getLocalPlayer(); + if (player == null) + { + return; + } + WorldPoint targetLocation = worldPoint; + boolean shouldHighlightSpade = false; + switch (this.whenToHighlight) { - Player player = client.getLocalPlayer(); - if (player == null) { - return; - } - WorldPoint targetLocation = worldPoint; - boolean shouldHighlightSpade = targetLocation.isInScene(client); - SPADE.setHighlightInInventory(shouldHighlightSpade); + case InScene: + shouldHighlightSpade = targetLocation.isInScene(client); + break; + + case OnTile: + shouldHighlightSpade = targetLocation.distanceTo(player.getWorldLocation()) == 0; + break; } + spade.setHighlightInInventory(shouldHighlightSpade); } @Override @@ -104,4 +115,12 @@ private BufferedImage getSpadeImage() { return itemManager.getImage(ItemID.SPADE); } + + public enum WhenToHighlight + { + /// Highlight the spade whenever the target tile is in the same scene as the player + InScene, + /// Highlight the spade whenever the player is standing on the target tile + OnTile, + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/ItemStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/ItemStep.java index be281229025..967e2bc406d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/ItemStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/ItemStep.java @@ -26,6 +26,10 @@ public ItemStep(QuestHelper questHelper, String text, Requirement... requirement @Override public void renderArrow(Graphics2D graphics) { + if (!questHelper.getConfig().showMiniMapArrow()) { + return; + } + tileHighlights.forEach((tile, ids) -> { LocalPoint lp = tile.getLocalLocation(); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/NpcStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/NpcStep.java index 80d0e2c5658..c7380fff76d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/NpcStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/NpcStep.java @@ -40,6 +40,7 @@ import net.runelite.api.events.NpcChanged; import net.runelite.api.events.NpcDespawned; import net.runelite.api.events.NpcSpawned; +import net.runelite.api.gameval.NpcID; import net.runelite.client.eventbus.Subscribe; import net.runelite.client.ui.overlay.OverlayUtil; import net.runelite.client.util.ColorUtil; @@ -178,7 +179,7 @@ public NpcStep copy() protected boolean npcPassesChecks(NPC npc) { if (npcName != null && (npc.getName() == null || !npc.getName().equals(npcName))) return false; - return npcID == npc.getId() || alternateNpcIDs.contains(npc.getId()); + return npcID == npc.getId() || npcID == npc.getComposition().getId() || alternateNpcIDs.contains(npc.getId()) || alternateNpcIDs.contains(npc.getComposition().getId()); } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/PuzzleWrapperStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/PuzzleWrapperStep.java index 7edeead5462..f73b5a4a231 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/PuzzleWrapperStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/PuzzleWrapperStep.java @@ -35,6 +35,7 @@ import lombok.NonNull; import net.runelite.client.ui.overlay.components.PanelComponent; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; @@ -44,11 +45,12 @@ public class PuzzleWrapperStep extends ConditionalStep { + public static String DEFAULT_TEXT = "If you want help with this, enable 'Show Puzzle Solutions' in the Quest Helper configuration settings."; final QuestHelperConfig questHelperConfig; - final DetailedQuestStep noSolvingStep; + final QuestStep noSolvingStep; ManualRequirement shouldHideHiddenPuzzleHintInSidebar = new ManualRequirement(); - public PuzzleWrapperStep(QuestHelper questHelper, QuestStep step, DetailedQuestStep hiddenStep, Requirement... requirements) + public PuzzleWrapperStep(QuestHelper questHelper, QuestStep step, QuestStep hiddenStep, Requirement... requirements) { super(questHelper, step, "", requirements); this.text = hiddenStep.getText(); @@ -61,7 +63,7 @@ public PuzzleWrapperStep(QuestHelper questHelper, QuestStep step, DetailedQuestS public PuzzleWrapperStep(QuestHelper questHelper, QuestStep step, Requirement... requirements) { - this(questHelper, step, new DetailedQuestStep(questHelper, "If you want help with this, enable 'Show Puzzle Solutions' in the Quest Helper configuration settings."), requirements); + this(questHelper, step, new DetailedQuestStep(questHelper, DEFAULT_TEXT), requirements); } public PuzzleWrapperStep(QuestHelper questHelper, QuestStep step, String text, Requirement... requirements) @@ -110,7 +112,7 @@ public void makeOverlayHint(PanelComponent panelComponent, QuestHelperPlugin plu } else { - super.makeOverlayHint(panelComponent, plugin, additionalText, additionalRequirements); + noSolvingStep.makeOverlayHint(panelComponent, plugin, additionalText, additionalRequirements); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/QuestStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/QuestStep.java index bebe4c25e82..a7c7d271291 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/QuestStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/QuestStep.java @@ -27,7 +27,6 @@ import com.google.inject.Binder; import com.google.inject.Inject; import com.google.inject.Module; -import net.runelite.client.plugins.microbot.questhelper.QuestHelperConfig; import net.runelite.client.plugins.microbot.questhelper.QuestHelperPlugin; import net.runelite.client.plugins.microbot.questhelper.questhelpers.QuestHelper; import net.runelite.client.plugins.microbot.questhelper.questhelpers.QuestUtil; @@ -47,12 +46,12 @@ import lombok.extern.slf4j.Slf4j; import net.runelite.api.ChatMessageType; import net.runelite.api.Client; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.ChatMessage; import net.runelite.api.events.VarbitChanged; import net.runelite.api.events.WidgetLoaded; import net.runelite.api.gameval.InterfaceID; +import net.runelite.api.gameval.SpriteID; import net.runelite.api.gameval.VarbitID; import net.runelite.api.widgets.Widget; import net.runelite.client.callback.ClientThread; @@ -221,6 +220,10 @@ public void shutDown() public QuestStep withId(Integer id) { this.id = id; + for (QuestStep substep : substeps) + { + substep.withId(id); + } return this; } @@ -577,7 +580,7 @@ public void conditionToHideInSidebar(Requirement hideCondition) public BufferedImage getQuestImage() { - return spriteManager.getSprite(SpriteID.TAB_QUESTS, 0); + return spriteManager.getSprite(SpriteID.SideiconsInterface.QUESTS, 0); } @@ -664,9 +667,9 @@ private boolean isValidRequirementForRenderInInventory(Requirement requirement, return requirement instanceof ItemRequirement && isValidRenderRequirementInInventory((ItemRequirement) requirement, item); } - private boolean isValidRenderRequirementInInventory(ItemRequirement requirement, Widget item) + protected boolean isValidRenderRequirementInInventory(ItemRequirement requirement, Widget item) { - return requirement.shouldHighlightInInventory(client) && requirement.getAllIds().contains(item.getItemId()); + return (requirement.shouldHighlightInInventory(client)) && requirement.getAllIds().contains(item.getItemId()); } protected void renderHoveredItemTooltip(String tooltipText) @@ -694,8 +697,29 @@ public PuzzleWrapperStep puzzleWrapStep() return new PuzzleWrapperStep(getQuestHelper(), this); } + public PuzzleWrapperStep puzzleWrapStep(QuestStep questStep) + { + return new PuzzleWrapperStep(getQuestHelper(), this, questStep); + } + + public PuzzleWrapperStep puzzleWrapStep(QuestStep questStep, boolean hiddenInSidebar) + { + return new PuzzleWrapperStep(getQuestHelper(), this, questStep).withNoHelpHiddenInSidebar(hiddenInSidebar); + } + public PuzzleWrapperStep puzzleWrapStep(String alternateText) { return new PuzzleWrapperStep(getQuestHelper(), this, alternateText); } + + /// Wraps this step in a PuzzleWrapperStep with the given alternate text and the default text on a new line. + public PuzzleWrapperStep puzzleWrapStepWithDefaultText(String alternateText) + { + return new PuzzleWrapperStep(getQuestHelper(), this, alternateText + "\n" + PuzzleWrapperStep.DEFAULT_TEXT); + } + + public PuzzleWrapperStep puzzleWrapStep(boolean hiddenInSidebar) + { + return new PuzzleWrapperStep(getQuestHelper(), this).withNoHelpHiddenInSidebar(hiddenInSidebar); + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/ReorderableConditionalStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/ReorderableConditionalStep.java index 2eb66054336..20db0ba856a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/ReorderableConditionalStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/ReorderableConditionalStep.java @@ -28,7 +28,6 @@ private void organiseSteps() if (step.getId().equals(sidebarId)) { newSteps.put(req, step); - break; } } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/choice/WidgetChoiceStep.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/choice/WidgetChoiceStep.java index 1021b1a2fd5..02a952a5744 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/choice/WidgetChoiceStep.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/choice/WidgetChoiceStep.java @@ -57,6 +57,7 @@ public class WidgetChoiceStep @Getter protected final int groupId; + @Getter protected final int childId; protected boolean shouldNumber = false; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/emote/QuestEmote.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/emote/QuestEmote.java index f52103e6454..67cd6f540fa 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/emote/QuestEmote.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/emote/QuestEmote.java @@ -25,27 +25,26 @@ package net.runelite.client.plugins.microbot.questhelper.steps.emote; import lombok.Getter; - -import static net.runelite.api.SpriteID.*; +import net.runelite.api.gameval.SpriteID; @Getter public enum QuestEmote { - SKILL_CAPE("Skill Cape", EMOTE_SKILLCAPE), - FLEX("Flex", 2426), - CLAP("Clap", EMOTE_CLAP), - CRY("Cry", EMOTE_CRY), - BOW("Bow", EMOTE_BOW), - DANCE("Dance", EMOTE_DANCE), - WAVE("Wave", EMOTE_WAVE), - THINK("Think", EMOTE_THINK), - GOBLIN_BOW("Goblin bow", EMOTE_GOBLIN_BOW), - BLOW_KISS("Blow Kiss", EMOTE_BLOW_KISS), - IDEA("Idea", 732), - STAMP("Stamp", 730), - FLAP("Flap", 731), - SLAP_HEAD("Slap Head", 729), - SPIN("Spin", EMOTE_SPIN); + SKILL_CAPE("Skill Cape", SpriteID.Emotes.SKILLCAPE), + FLEX("Flex", SpriteID.Emotes._51), + CLAP("Clap", SpriteID.Emotes.CLAP), + CRY("Cry", SpriteID.Emotes.CRY), + BOW("Bow", SpriteID.Emotes.BOW), + DANCE("Dance", SpriteID.Emotes.DANCE), + WAVE("Wave", SpriteID.Emotes.WAVE), + THINK("Think", SpriteID.Emotes.THINK), + GOBLIN_BOW("Goblin bow", SpriteID.Emotes.GOBLIN_BOW), + BLOW_KISS("Blow Kiss", SpriteID.Emotes.BLOW_KISS), + IDEA("Idea", SpriteID.Emotes.IDEA), + STAMP("Stamp", SpriteID.Emotes.STAMP), + FLAP("Flap", SpriteID.Emotes.FLAP), + SLAP_HEAD("Slap Head", SpriteID.Emotes.SLAP_HEAD), + SPIN("Spin", SpriteID.Emotes.SPIN); private String name; private int spriteId; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/widget/WidgetHighlight.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/widget/WidgetHighlight.java index 6416fc6f562..42c15e62e34 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/widget/WidgetHighlight.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/steps/widget/WidgetHighlight.java @@ -31,6 +31,7 @@ import net.runelite.api.gameval.InterfaceID; import net.runelite.api.widgets.Widget; +import javax.annotation.Nullable; import java.awt.*; public class WidgetHighlight extends AbstractWidgetHighlight @@ -52,6 +53,9 @@ public class WidgetHighlight extends AbstractWidgetHighlight @Getter protected String requiredText; + @Nullable + private String nameToCheckFor = null; + protected final boolean checkChildren; @@ -62,6 +66,14 @@ public WidgetHighlight(int interfaceID) this.checkChildren = false; } + public WidgetHighlight(int interfaceID, boolean checkChildren) + { + this.interfaceID = interfaceID; + this.childChildId = -1; + this.checkChildren = checkChildren; + } + + public WidgetHighlight(int groupId, int childId) { this.interfaceID = groupId << 16 | childId; @@ -99,6 +111,33 @@ public WidgetHighlight(int groupId, int childId, String requiredText, boolean ch this.checkChildren = checkChildren; } + public static WidgetHighlight createMultiskillByName(String roughName) + { + var w = new WidgetHighlight(InterfaceID.Skillmulti.BOTTOM, true); + w.nameToCheckFor = roughName; + return w; + } + + + public static WidgetHighlight createMultiskillByItemId(int itemId) + { + var w = new WidgetHighlight(InterfaceID.Skillmulti.BOTTOM, true); + w.itemIdRequirement = itemId; + return w; + } + + /** + * Create a widget highlight that highlights an item inside the shop interface (e.g. general store) + * @param itemIdRequirement The ID of the item to highlight + * @return a fully built WidgetHighlight + */ + public static WidgetHighlight createShopItemHighlight(int itemIdRequirement) + { + var w = new WidgetHighlight(InterfaceID.Shopmain.ITEMS, true); + w.itemIdRequirement = itemIdRequirement; + return w; + } + @Override public void highlightChoices(Graphics2D graphics, Client client, QuestHelperPlugin questHelper) { @@ -140,13 +179,20 @@ private void highlightChoices(Widget parentWidget, Graphics2D graphics, QuestHel @Override protected void highlightWidget(Graphics2D graphics, QuestHelperPlugin questHelper, Widget widgetToHighlight) { - if (widgetToHighlight == null || !itemCheckPasses(widgetToHighlight) || !modelCheckPasses(widgetToHighlight) || - (requiredText != null && (widgetToHighlight.getText() == null || !widgetToHighlight.getText().contains(requiredText))) - ) return; + if (widgetToHighlight == null) return; + if (!itemCheckPasses(widgetToHighlight)) return; + if (!modelCheckPasses(widgetToHighlight)) return; + if (!requiredTextCheckPasses(widgetToHighlight)) return; + if (!roughNameCheckPasses(widgetToHighlight)) return; super.highlightWidget(graphics, questHelper, widgetToHighlight); } + public WidgetHighlight withModelRequirement(int modelIdRequirement) + { + this.modelIdRequirement = modelIdRequirement; + return this; + } private boolean itemCheckPasses(Widget widgetToHighlight) { @@ -157,4 +203,19 @@ private boolean modelCheckPasses(Widget widget) { return (modelIdRequirement == null || widget.getModelId() == modelIdRequirement); } + + private boolean requiredTextCheckPasses(Widget widget) + { + if (requiredText == null) return true; + if (widget.getText() == null) return false; + return widget.getText().contains(requiredText); + } + + private boolean roughNameCheckPasses(Widget widget) + { + if (nameToCheckFor == null) return true; + var widgetName = widget.getName(); + if (widgetName == null || widgetName.isEmpty()) return false; + return widgetName.contains(nameToCheckFor); + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/tools/QuestTile.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/tools/QuestTile.java index abcd5d5ed2b..ff80a65dd02 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/tools/QuestTile.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/tools/QuestTile.java @@ -25,8 +25,8 @@ package net.runelite.client.plugins.microbot.questhelper.tools; import lombok.Getter; -import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; +import net.runelite.api.gameval.SpriteID; public class QuestTile { @@ -38,7 +38,7 @@ public class QuestTile public QuestTile(WorldPoint worldPoint) { this.worldPoint = worldPoint; - this.iconID = SpriteID.QUESTS_PAGE_ICON_BLUE_QUESTS; + this.iconID = SpriteID.AchievementDiaryIcons.BLUE_QUESTS; } public QuestTile(WorldPoint worldPoint, int iconID) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/util/QHObjectID.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/util/QHObjectID.java index 118496d043d..39900c0be2f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/util/QHObjectID.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/util/QHObjectID.java @@ -45,4 +45,8 @@ public class QHObjectID * Ladder used at the top floor of the Grand Tree in the Tree Gnome Stronghold */ public static final int GRAND_TREE_F3_LADDER = ObjectID.GRANDTREE_LADDERTOP; + /** + * Southern staircase at the bottom floor of Lumbridge Castle + */ + public static final int LUMBRIDGE_CASTLE_F0_SOUTH_STAIRCASE = ObjectID.SPIRALSTAIRSBOTTOM_3; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/util/Utils.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/util/Utils.java index b0300f29196..11b51401499 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/util/Utils.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/questhelper/util/Utils.java @@ -33,6 +33,7 @@ import net.runelite.api.GameState; import net.runelite.api.Varbits; import net.runelite.api.annotations.Component; +import net.runelite.api.gameval.VarbitID; import net.runelite.client.util.ColorUtil; import org.apache.commons.lang3.tuple.Pair; import org.jetbrains.annotations.NotNull; @@ -57,7 +58,7 @@ public AccountType getAccountType(@NotNull Client client) { return AccountType.NORMAL; } - return AccountType.get(client.getVarbitValue(Varbits.ACCOUNT_TYPE)); + return AccountType.get(client.getVarbitValue(VarbitID.IRONMAN)); } /**