From 1f4cb2ae2d470b8b3a1c281cfb029f93b29d2d79 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Mon, 6 Jul 2020 04:15:10 -0400 Subject: [PATCH 01/47] agility: fix Sara GWD obstacle highlights --- .../main/java/net/runelite/client/game/AgilityShortcut.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java b/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java index abee41698c..79dd39a293 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java +++ b/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java @@ -184,8 +184,8 @@ public enum AgilityShortcut FOSSIL_ISLAND_HARDWOOD_NORTH(70, "Hole" , new WorldPoint(3712, 3828, 0), HOLE_31481, HOLE_31482), FOSSIL_ISLAND_HARDWOOD_SOUTH(70, "Hole" , new WorldPoint(3714, 3816, 0), HOLE_31481, HOLE_31482), AL_KHARID_WINDOW(70, "Window", new WorldPoint(3293, 3158, 0), BROKEN_WALL_33344, BIG_WINDOW), - GWD_SARADOMIN_ROPE_NORTH(70, "Rope Descent", new WorldPoint(2912, 5300, 0), NULL_26371), - GWD_SARADOMIN_ROPE_SOUTH(70, "Rope Descent", new WorldPoint(2951, 5267, 0), NULL_26375), + GWD_SARADOMIN_ROPE_NORTH(70, "Rope Descent", new WorldPoint(2912, 5300, 0), NULL_26371, NULL_26561), + GWD_SARADOMIN_ROPE_SOUTH(70, "Rope Descent", new WorldPoint(2951, 5267, 0), NULL_26375, NULL_26562), SLAYER_TOWER_ADVANCED_CHAIN_FIRST(71, "Spiked Chain (Floor 2)", new WorldPoint(3447, 3578, 0), SPIKEY_CHAIN ), SLAYER_TOWER_ADVANCED_CHAIN_SECOND(71, "Spiked Chain (Floor 3)", new WorldPoint(3446, 3576, 0), SPIKEY_CHAIN_16538), STRONGHOLD_SLAYER_CAVE_TUNNEL(72, "Tunnel", new WorldPoint(2431, 9806, 0), TUNNEL_30174, TUNNEL_30175), From 2884f3043eeeb70e738366ce7e271a234c4aa969 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Mon, 6 Jul 2020 04:40:52 -0400 Subject: [PATCH 02/47] agility: add GWD crack obstacle highlight --- .../src/main/java/net/runelite/client/game/AgilityShortcut.java | 1 + 1 file changed, 1 insertion(+) diff --git a/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java b/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java index 79dd39a293..4c946ae24b 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java +++ b/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java @@ -159,6 +159,7 @@ public enum AgilityShortcut MOS_LEHARMLESS_STEPPING_STONE(60, "Stepping Stone", new WorldPoint(3710, 2970, 0), STEPPING_STONE_19042), WINTERTODT_GAP(60, "Gap", new WorldPoint(1629, 4023, 0), GAP_29326), UNGAEL_ICE(60, "Ice Chunks", null, NULL_25337, NULL_29868, NULL_29869, NULL_29870, ICE_CHUNKS_31822, NULL_31823, ICE_CHUNKS_31990), + GWD_LITTLE_CRACK(60, "Little Crack", new WorldPoint(2900, 3712, 0), LITTLE_CRACK), SLAYER_TOWER_MEDIUM_CHAIN_FIRST(61, "Spiked Chain (Floor 1)", new WorldPoint(3421, 3550, 0), SPIKEY_CHAIN), SLAYER_TOWER_MEDIUM_CHAIN_SECOND(61, "Spiked Chain (Floor 2)", new WorldPoint(3420, 3551, 0), SPIKEY_CHAIN_16538), SLAYER_DUNGEON_CREVICE(62, "Narrow Crevice", new WorldPoint(2729, 10008, 0), CREVICE_16539), From e4b43d98f224032273da79f377c1cd0ad19ed0dd Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 22 Jul 2020 22:44:17 -0400 Subject: [PATCH 03/47] tagtabs: split tag search from bank search This fixes a lot of edge cases which required us to re-search for things after input was re-used when a tag tab was open, and removes the requirement of having the bank search text be in sync with the currently selected tab. This also no longer parses the tag tab out of the title during times when the input is being re-used (like Withdraw-x) which was broken earlier from the bank plugin changing the title to include the value of searches. A new tag tab title is being set now on all tag tab views so the old tag tab tab title event can be removed. --- .../main/java/net/runelite/api/ScriptID.java | 3 + .../plugins/banktags/BankTagsPlugin.java | 50 ++++++-- .../plugins/banktags/tabs/BankSearch.java | 37 +++--- .../plugins/banktags/tabs/TabInterface.java | 110 +++--------------- .../client/plugins/banktags/tabs/TagTab.java | 2 +- .../src/main/scripts/BankSearchFilter.rs2asm | 12 +- .../src/main/scripts/BankSearchLayout.rs2asm | 9 -- 7 files changed, 84 insertions(+), 139 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/ScriptID.java b/runelite-api/src/main/java/net/runelite/api/ScriptID.java index 520150c27c..c0c8322d04 100644 --- a/runelite-api/src/main/java/net/runelite/api/ScriptID.java +++ b/runelite-api/src/main/java/net/runelite/api/ScriptID.java @@ -293,4 +293,7 @@ public final class ScriptID */ @ScriptArguments(integer = 17) public static final int BANKMAIN_BUILD = 277; + + @ScriptArguments(integer = 19) + public static final int BANKMAIN_FINISHBUILDING = 505; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/BankTagsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/BankTagsPlugin.java index f28f86fec8..7af659873e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/BankTagsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/BankTagsPlugin.java @@ -61,6 +61,7 @@ import net.runelite.api.events.MenuEntryAdded; import net.runelite.api.events.MenuOptionClicked; import net.runelite.api.events.ScriptCallbackEvent; import net.runelite.api.events.ScriptPostFired; +import net.runelite.api.events.ScriptPreFired; import net.runelite.api.events.WidgetLoaded; import net.runelite.api.vars.InputType; import net.runelite.api.widgets.Widget; @@ -84,6 +85,7 @@ import net.runelite.client.plugins.banktags.tabs.BankSearch; import net.runelite.client.plugins.banktags.tabs.TabInterface; import static net.runelite.client.plugins.banktags.tabs.TabInterface.FILTERED_CHARS; import net.runelite.client.plugins.banktags.tabs.TabSprites; +import net.runelite.client.plugins.banktags.tabs.TagTab; import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin; import net.runelite.client.util.Text; @@ -308,8 +310,19 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener break; } case "bankSearchFilter": - int itemId = intStack[intStackSize - 1]; - String search = stringStack[stringStackSize - 1]; + final int itemId = intStack[intStackSize - 1]; + final String searchfilter = stringStack[stringStackSize - 1]; + + // This event fires regardless of the bank being in search mode. If we have a current + // tab set then the bank should be not in search mode (and the filter empty). Otherwise + // the filter is either empty for no search or contains the search filter. + TagTab activeTab = tabInterface.getActiveTab(); + String search = activeTab != null ? TAG_SEARCH + activeTab.getTag() : searchfilter; + + if (search.isEmpty()) + { + return; + } boolean tagSearch = search.startsWith(TAG_SEARCH); if (tagSearch) @@ -324,6 +337,8 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener } else if (tagSearch) { + // if the item isn't tagged we return false to prevent the item matching if the item name happens + // to contain the tag name. intStack[intStackSize - 2] = 0; } break; @@ -402,8 +417,6 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener .map(i -> i + "*") .forEach(tags::add); - boolean isSearchOpen = client.getVar(VarClientInt.INPUT_TYPE) == InputType.SEARCH.getType(); - String searchText = client.getVar(VarClientStr.INPUT_TEXT); String initialValue = Text.toCSV(tags); chatboxPanelManager.openTextInput(name + " tags:
(append " + VAR_TAG_SUFFIX + " for variation tag)") @@ -430,12 +443,6 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener tabInterface.updateTabIfActive(Text.fromCSV(newValue.toLowerCase().replaceAll(Pattern.quote(VAR_TAG_SUFFIX), ""))); })) .build(); - - if (isSearchOpen) - { - bankSearch.reset(false); - bankSearch.search(InputType.SEARCH, searchText, false); - } } else { @@ -466,6 +473,29 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener && !Strings.isNullOrEmpty(client.getVar(VarClientStr.INPUT_TEXT))); } + @Subscribe + public void onScriptPreFired(ScriptPreFired event) + { + if (event.getScriptId() == ScriptID.BANKMAIN_FINISHBUILDING) + { + // Since we apply tag tab search filters even when the bank is not in search mode, + // bankkmain_build will reset the bank title to "The Bank of Gielinor". So apply our + // own title. + TagTab activeTab = tabInterface.getActiveTab(); + if (tabInterface.isTagTabActive()) + { + // Tag tab tab has its own title since it isn't a real tag + Widget bankTitle = client.getWidget(WidgetInfo.BANK_TITLE_BAR); + bankTitle.setText("Tag tab tab"); + } + else if (activeTab != null) + { + Widget bankTitle = client.getWidget(WidgetInfo.BANK_TITLE_BAR); + bankTitle.setText("Tag tab " + activeTab.getTag() + ""); + } + } + } + @Subscribe public void onScriptPostFired(ScriptPostFired event) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/BankSearch.java b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/BankSearch.java index 34cd7e8244..c5c2a4a9db 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/BankSearch.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/BankSearch.java @@ -25,7 +25,8 @@ package net.runelite.client.plugins.banktags.tabs; -import com.google.inject.Inject; +import javax.inject.Inject; +import javax.inject.Singleton; import net.runelite.api.Client; import net.runelite.api.ScriptID; import net.runelite.api.VarClientInt; @@ -35,6 +36,7 @@ import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.WidgetInfo; import net.runelite.client.callback.ClientThread; +@Singleton public class BankSearch { private final Client client; @@ -50,24 +52,6 @@ public class BankSearch this.clientThread = clientThread; } - public void search(InputType inputType, String search, boolean closeInput) - { - clientThread.invoke(() -> - { - // This ensures that any chatbox input (e.g from search) will not remain visible when - // selecting/changing tab - if (closeInput) - { - client.runScript(ScriptID.MESSAGE_LAYER_CLOSE, 0, 0); - } - - client.setVar(VarClientInt.INPUT_TYPE, inputType.getType()); - client.setVar(VarClientStr.INPUT_TEXT, search); - - layoutBank(); - }); - } - public void layoutBank() { Widget bankContainer = client.getWidget(WidgetInfo.BANK_ITEM_CONTAINER); @@ -87,6 +71,19 @@ public class BankSearch public void reset(boolean closeChat) { - search(InputType.NONE, "", closeChat); + clientThread.invoke(() -> + { + // This ensures that any chatbox input (e.g from search) will not remain visible when + // selecting/changing tab + if (closeChat) + { + client.runScript(ScriptID.MESSAGE_LAYER_CLOSE, 0, 0); + } + + client.setVar(VarClientInt.INPUT_TYPE, InputType.NONE.getType()); + client.setVar(VarClientStr.INPUT_TEXT, ""); + + layoutBank(); + }); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java index 5c7796cbe5..df7abee0e7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java @@ -70,7 +70,6 @@ import net.runelite.api.Varbits; import net.runelite.api.events.MenuEntryAdded; import net.runelite.api.events.MenuOptionClicked; import net.runelite.api.events.ScriptCallbackEvent; -import net.runelite.api.vars.InputType; import net.runelite.api.widgets.ItemQuantityMode; import net.runelite.api.widgets.JavaScriptCallback; import net.runelite.api.widgets.Widget; @@ -118,8 +117,6 @@ public class TabInterface private static final String OPEN_TAB_MENU = "View tag tabs"; private static final String SHOW_WORN = "Show worn items"; private static final String SHOW_SETTINGS = "Show menu"; - private static final String HIDE_WORN = "Hide worn items"; - private static final String HIDE_SETTINGS = "Hide menu"; private static final String SHOW_TUTORIAL = "Show tutorial"; private static final int TAB_HEIGHT = 40; private static final int TAB_WIDTH = 39; @@ -149,12 +146,13 @@ public class TabInterface private final Rectangle canvasBounds = new Rectangle(); private ChatboxItemSearch searchProvider; + @Getter private TagTab activeTab; + @Getter + private boolean tagTabActive; private int maxTabs; private int currentTabIndex; private Instant startScroll = Instant.now(); - private String rememberedSearch; - private boolean waitSearchTick; @Getter private Widget upButton; @@ -410,16 +408,15 @@ public class TabInterface if (tab.equals(activeTab)) { - bankSearch.reset(true); - rememberedSearch = ""; - - clientThread.invokeLater(() -> client.runScript(ScriptID.MESSAGE_LAYER_CLOSE, 0, 0)); + activateTab(null); } else { openTag(Text.removeTags(clicked.getName())); } + bankSearch.reset(true); + client.playSoundEffect(SoundEffectID.UI_BOOP); break; case Tab.CHANGE_ICON: @@ -481,8 +478,6 @@ public class TabInterface currentTabIndex = 0; maxTabs = 0; parent = null; - waitSearchTick = false; - rememberedSearch = ""; if (upButton != null) { @@ -499,8 +494,6 @@ public class TabInterface if (isHidden()) { parent = null; - waitSearchTick = false; - rememberedSearch = ""; saveTab(); return; @@ -512,57 +505,6 @@ public class TabInterface return; } - if (activeTab != null && client.getVar(VarClientInt.INPUT_TYPE) == InputType.RUNELITE_CHATBOX_PANEL.getType()) - { - // don't reset active tab if we are editing tags - updateBounds(); - scrollTab(0); - return; - } - - String str = client.getVar(VarClientStr.INPUT_TEXT); - - if (Strings.isNullOrEmpty(str)) - { - str = ""; - } - - Widget bankTitle = client.getWidget(WidgetInfo.BANK_TITLE_BAR); - if (bankTitle != null && !bankTitle.isHidden() && !str.startsWith(TAG_SEARCH)) - { - str = bankTitle.getText().replaceFirst("Showing items: ", ""); - - if (str.startsWith("Tab ")) - { - str = ""; - } - } - - str = Text.standardize(str); - - if (str.startsWith(BankTagsPlugin.TAG_SEARCH)) - { - activateTab(tabManager.find(str.substring(TAG_SEARCH.length()))); - } - else - { - activateTab(null); - } - - if (!waitSearchTick - && activeTab == null - && !Strings.isNullOrEmpty(rememberedSearch) - && client.getVar(VarClientInt.INPUT_TYPE) == InputType.NONE.getType()) - { - bankSearch.reset(true); - bankSearch.search(InputType.NONE, rememberedSearch, true); - rememberedSearch = ""; - } - else if (waitSearchTick) - { - waitSearchTick = false; - } - updateBounds(); scrollTab(0); } @@ -603,7 +545,7 @@ public class TabInterface private boolean isTabMenuActive() { - return TAB_MENU.equals(client.getVar(VarClientStr.INPUT_TEXT)); + return tagTabActive; } public void handleScriptEvent(final ScriptCallbackEvent event) @@ -633,17 +575,6 @@ public class TabInterface case "beforeBankLayout": setTabMenuVisible(false); break; - case "isTabMenuActive": - if (!isTabMenuActive()) - { - intStack[intStackSize - 1] = 0; - return; - } - - // Must set the bank title because we are skipping it in scripts - client.getWidget(WidgetInfo.BANK_TITLE_BAR).setText("Showing items: " + ColorUtil.wrapWithColorTag(TAB_MENU, Color.red)); - intStack[intStackSize - 1] = 1; - break; } } @@ -724,17 +655,6 @@ public class TabInterface chatboxPanelManager.close(); } - if ((event.getWidgetId() == WidgetInfo.BANK_ITEM_CONTAINER.getId() - || event.getWidgetId() == WidgetInfo.BANK_INVENTORY_ITEMS_CONTAINER.getId()) - && event.getMenuAction() == MenuAction.CC_OP_LOW_PRIORITY - && (event.getMenuOption().equalsIgnoreCase("withdraw-x") - || event.getMenuOption().equalsIgnoreCase("deposit-x"))) - { - waitSearchTick = true; - rememberedSearch = client.getVar(VarClientStr.INPUT_TEXT); - bankSearch.search(InputType.NONE, rememberedSearch, true); - } - if (activeTab != null && event.getMenuOption().equals("Search") && client.getWidget(WidgetInfo.BANK_SEARCH_BUTTON_BACKGROUND).getSpriteId() != SpriteID.EQUIPMENT_SLOT_SELECTED) @@ -760,7 +680,7 @@ public class TabInterface final ItemComposition item = getItem(event.getActionParam()); final int itemId = item.getId(); tagManager.removeTag(itemId, activeTab.getTag()); - bankSearch.search(InputType.SEARCH, TAG_SEARCH + activeTab.getTag(), true); + bankSearch.layoutBank(); // re-layout to filter the removed item out } else if (event.getMenuAction() == MenuAction.RUNELITE && ((event.getWidgetId() == WidgetInfo.BANK_DEPOSIT_INVENTORY.getId() && event.getMenuOption().equals(TAG_INVENTORY)) @@ -773,14 +693,6 @@ public class TabInterface || (event.getWidgetId() == WidgetInfo.BANK_TUTORIAL_BUTTON.getId() && event.getMenuOption().equals(SHOW_TUTORIAL)))) { saveTab(); - rememberedSearch = TAG_SEARCH + activeTab.getTag(); - } - else if (!Strings.isNullOrEmpty(rememberedSearch) && ((event.getWidgetId() == WidgetInfo.BANK_EQUIPMENT_BUTTON.getId() && event.getMenuOption().equals(HIDE_WORN)) - || (event.getWidgetId() == WidgetInfo.BANK_SETTINGS_BUTTON.getId() && event.getMenuOption().equals(HIDE_SETTINGS)))) - { - bankSearch.reset(true); - bankSearch.search(InputType.NONE, rememberedSearch, true); - rememberedSearch = ""; } } @@ -963,6 +875,7 @@ public class TabInterface { if (activeTab != null && activeTab.getTag().equals(tag)) { + activateTab(null); bankSearch.reset(true); } @@ -1092,6 +1005,8 @@ public class TabInterface tab.revalidate(); activeTab = tagTab; } + + tagTabActive = false; } private void updateBounds() @@ -1253,8 +1168,9 @@ public class TabInterface private void openTag(final String tag) { - bankSearch.search(InputType.SEARCH, TAG_SEARCH + tag, true); activateTab(tabManager.find(tag)); + tagTabActive = BankTagsPlugin.TAG_TABS_CONFIG.equals(tag); + bankSearch.layoutBank(); // When tab is selected with search window open, the search window closes but the search button // stays highlighted, this solves that issue diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TagTab.java b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TagTab.java index 403fc9dddf..88ef36537b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TagTab.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TagTab.java @@ -31,7 +31,7 @@ import net.runelite.api.widgets.Widget; @Data @EqualsAndHashCode(of = "tag") -class TagTab +public class TagTab { private String tag; private int iconItemId; diff --git a/runelite-client/src/main/scripts/BankSearchFilter.rs2asm b/runelite-client/src/main/scripts/BankSearchFilter.rs2asm index 5f9db325af..506aa4530b 100644 --- a/runelite-client/src/main/scripts/BankSearchFilter.rs2asm +++ b/runelite-client/src/main/scripts/BankSearchFilter.rs2asm @@ -10,6 +10,16 @@ invoke 514 iconst 1 if_icmpeq LABEL8 + + iconst 1 ; return value - default to true to match anything + iload 0 ; load item id + sconst "" ; we are not searching, so there is no search string + sconst "bankSearchFilter" ; push event name + runelite_callback ; invoke callback + pop_int ; pop item id + pop_string ; pop search string + return ; return rv + jump LABEL34 LABEL8: get_varc_string 359 ; Skip truncating of varcstr 22 by not calling 280 @@ -32,13 +42,11 @@ LABEL19: sstore 0 iconst -1 ; load return value iload 0 ; load item id - sload 0 ; load item name sload 1 ; load search string sconst "bankSearchFilter" ; push event name runelite_callback ; invoke callback pop_int ; pop item id pop_string ; pop search string - pop_string ; pop item name istore 1 ; store return value for the below comparisons iload 1 iconst 0 diff --git a/runelite-client/src/main/scripts/BankSearchLayout.rs2asm b/runelite-client/src/main/scripts/BankSearchLayout.rs2asm index 04692f488f..485a6d08e9 100644 --- a/runelite-client/src/main/scripts/BankSearchLayout.rs2asm +++ b/runelite-client/src/main/scripts/BankSearchLayout.rs2asm @@ -10,9 +10,6 @@ ; callback "setBankScroll" ; Fired before bank is calculated ; Used by the TabInterface to show fake bank items for tag tabs -; -; callback "isTabMenuActive" -; Used by the TabInterface to skip setting the bank title sconst "beforeBankLayout" runelite_callback get_varbit 5102 @@ -966,12 +963,6 @@ LABEL848: add istore 20 jump LABEL769 -SetTitle: - iconst 0 ; Compare variable - iconst 0 ; - sconst "isTabMenuActive" - runelite_callback ; skip setting the bank title if the tag tab menu is active - if_icmpne FinishBuilding LABEL853: get_varbit 4170 iconst 2 From 2bc386668b0d0c694e6972871f603b403153ffba Mon Sep 17 00:00:00 2001 From: MarbleTurtle <60723971+MarbleTurtle@users.noreply.github.com> Date: Thu, 23 Jul 2020 15:38:47 -0700 Subject: [PATCH 04/47] EmoteClue: Change location from Digsite to Exam Centre --- .../runelite/client/plugins/cluescrolls/clues/EmoteClue.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java index bb60754b7a..c98af144a1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java @@ -97,7 +97,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu new EmoteClue("Cheer in the Ogre Pen in the Training Camp. Show you are angry before you talk to me. Equip a green dragonhide body and chaps and a steel square shield.", "King Lathas' camp", OGRE_CAGE_IN_KING_LATHAS_TRAINING_CAMP, new WorldPoint(2527, 3375, 0), CHEER, ANGRY, item(GREEN_DHIDE_BODY), item(GREEN_DHIDE_CHAPS), item(STEEL_SQ_SHIELD)), new EmoteClue("Cheer in the Entrana church. Beware of double agents! Equip a full set of black dragonhide armour.", "Entrana church", ENTRANA_CHAPEL, new WorldPoint(2852, 3349, 0), DOUBLE_AGENT_141, CHEER, item(BLACK_DHIDE_VAMBRACES), item(BLACK_DHIDE_CHAPS), item(BLACK_DHIDE_BODY)), new EmoteClue("Cheer for the monks at Port Sarim. Equip a coif, steel plateskirt and a sapphire necklace.", "Port Sarim", NEAR_THE_ENTRANA_FERRY_IN_PORT_SARIM, new WorldPoint(3047, 3237, 0), CHEER, item(COIF), item(STEEL_PLATESKIRT), item(SAPPHIRE_NECKLACE)), - new EmoteClue("Clap in the main exam room in the Exam Centre. Equip a white apron, green gnome boots and leather gloves.", "Digsite", OUTSIDE_THE_DIGSITE_EXAM_CENTRE, new WorldPoint(3361, 3339, 0), CLAP, item(WHITE_APRON), item(GREEN_BOOTS), item(LEATHER_GLOVES)), + new EmoteClue("Clap in the main exam room in the Exam Centre. Equip a white apron, green gnome boots and leather gloves.", "Exam Centre", OUTSIDE_THE_DIGSITE_EXAM_CENTRE, new WorldPoint(3361, 3339, 0), CLAP, item(WHITE_APRON), item(GREEN_BOOTS), item(LEATHER_GLOVES)), new EmoteClue("Clap on the causeway to the Wizards' Tower. Equip an iron medium helmet, emerald ring and a white apron.", "Wizards' Tower", ON_THE_BRIDGE_TO_THE_MISTHALIN_WIZARDS_TOWER, new WorldPoint(3113, 3196, 0), CLAP, item(IRON_MED_HELM), item(EMERALD_RING), item(WHITE_APRON)), new EmoteClue("Clap on the top level of the mill, north of East Ardougne. Equip a blue gnome robe top, HAM robe bottom and an unenchanted tiara.", "East Ardougne", UPSTAIRS_IN_THE_ARDOUGNE_WINDMILL, new WorldPoint(2635, 3385, 3), CLAP, item(BLUE_ROBE_TOP), item(HAM_ROBE), item(TIARA)), new EmoteClue("Clap in Seers court house. Spin before you talk to me. Equip an adamant halberd, blue mystic robe bottom and a diamond ring.", "Seers Village", OUTSIDE_THE_SEERS_VILLAGE_COURTHOUSE, new WorldPoint(2735, 3469, 0), CLAP, SPIN, item(ADAMANT_HALBERD), item(MYSTIC_ROBE_BOTTOM), item(DIAMOND_RING)), @@ -118,7 +118,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu new EmoteClue("Dance at the entrance to the Grand Exchange. Equip a pink skirt, pink robe top and a body tiara.", "Grand Exchange", SOUTH_OF_THE_GRAND_EXCHANGE, new WorldPoint(3165, 3467, 0), DANCE, item(PINK_SKIRT), item(PINK_ROBE_TOP), item(BODY_TIARA)), new EmoteClue("Goblin Salute in the Goblin Village. Beware of double agents! Equip a bandos godsword, a bandos cloak and a bandos platebody.", "Goblin Village", OUTSIDE_MUDKNUCKLES_HUT, new WorldPoint(2956, 3505, 0), DOUBLE_AGENT_141, GOBLIN_SALUTE, item(BANDOS_PLATEBODY), item(BANDOS_CLOAK), any("Bandos godsword", item(BANDOS_GODSWORD), item(BANDOS_GODSWORD_OR))), new EmoteClue("Headbang in the mine north of Al Kharid. Equip a desert shirt, leather gloves and leather boots.", "Al Kharid mine", AL_KHARID_SCORPION_MINE, new WorldPoint(3299, 3289, 0), HEADBANG, item(DESERT_SHIRT), item(LEATHER_GLOVES), item(LEATHER_BOOTS)), - new EmoteClue("Headbang at the exam center. Beware of double agents! Equip a mystic fire staff, a diamond bracelet and rune boots.", "Digsite", INSIDE_THE_DIGSITE_EXAM_CENTRE, new WorldPoint(3362, 3340, 0), DOUBLE_AGENT_108, HEADBANG, item(MYSTIC_FIRE_STAFF), item(DIAMOND_BRACELET), item(RUNE_BOOTS)), + new EmoteClue("Headbang at the exam center. Beware of double agents! Equip a mystic fire staff, a diamond bracelet and rune boots.", "Exam Centre", INSIDE_THE_DIGSITE_EXAM_CENTRE, new WorldPoint(3362, 3340, 0), DOUBLE_AGENT_108, HEADBANG, item(MYSTIC_FIRE_STAFF), item(DIAMOND_BRACELET), item(RUNE_BOOTS)), new EmoteClue("Headbang at the top of Slayer Tower. Equip a seercull, a combat bracelet and helm of Neitiznot.", "Slayer Tower", OUTSIDE_THE_SLAYER_TOWER_GARGOYLE_ROOM, new WorldPoint(3421, 3537, 2), HEADBANG, item(SEERCULL), range("Combat bracelet", COMBAT_BRACELET4, COMBAT_BRACELET), item(HELM_OF_NEITIZNOT)), new EmoteClue("Dance a jig by the entrance to the Fishing Guild. Equip an emerald ring, a sapphire amulet, and a bronze chain body.", "Fishing Guild", OUTSIDE_THE_FISHING_GUILD, new WorldPoint(2610, 3391, 0), JIG, item(EMERALD_RING), item(SAPPHIRE_AMULET), item(BRONZE_CHAINBODY)), new EmoteClue("Dance a jig under Shantay's Awning. Bow before you talk to me. Equip a pointed blue snail helmet, an air staff and a bronze square shield.", "Shantay Pass", SHANTAY_PASS, new WorldPoint(3304, 3124, 0), JIG, BOW, any("Bruise blue snelm (pointed)", item(BRUISE_BLUE_SNELM_3343)), item(STAFF_OF_AIR), item(BRONZE_SQ_SHIELD)), From 25c7c8c73a4f56ccf5ad869673d72ef9dacbbd20 Mon Sep 17 00:00:00 2001 From: Cyborger1 <45152844+Cyborger1@users.noreply.github.com> Date: Fri, 24 Jul 2020 03:49:35 -0400 Subject: [PATCH 05/47] farming: Improve names of Poison ivy and Dwarf weed patches (#12134) --- .../runelite/client/plugins/timetracking/farming/Produce.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/Produce.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/Produce.java index e80912552c..8909a54b92 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/Produce.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/Produce.java @@ -62,7 +62,7 @@ public enum Produce DWELLBERRIES("Dwellberry", "Dwellberries", PatchImplementation.BUSH, ItemID.DWELLBERRIES, 20, 8, 20, 5), JANGERBERRIES("Jangerberry", "Jangerberries", PatchImplementation.BUSH, ItemID.JANGERBERRIES, 20, 9, 20, 5), WHITEBERRIES("Whiteberry", "White berries", PatchImplementation.BUSH, ItemID.WHITE_BERRIES, 20, 9, 20, 5), - POISON_IVY("Poison", "Poison ivy berries", PatchImplementation.BUSH, ItemID.POISON_IVY_BERRIES, 20, 9, 20, 5), + POISON_IVY("Poison ivy", "Poison ivy berries", PatchImplementation.BUSH, ItemID.POISON_IVY_BERRIES, 20, 9, 20, 5), // Hop crops BARLEY("Barley", ItemID.BARLEY, 10, 5, 0, 3), @@ -86,7 +86,7 @@ public enum Produce SNAPDRAGON("Snapdragon", PatchImplementation.HERB, ItemID.SNAPDRAGON, 20, 5, 0, 3), CADANTINE("Cadantine", PatchImplementation.HERB, ItemID.CADANTINE, 20, 5, 0, 3), LANTADYME("Lantadyme", PatchImplementation.HERB, ItemID.LANTADYME, 20, 5, 0, 3), - DWARF_WEED("Dwarf Weed", PatchImplementation.HERB, ItemID.DWARF_WEED, 20, 5, 0, 3), + DWARF_WEED("Dwarf weed", PatchImplementation.HERB, ItemID.DWARF_WEED, 20, 5, 0, 3), TORSTOL("Torstol", PatchImplementation.HERB, ItemID.TORSTOL, 20, 5, 0, 3), GOUTWEED("Goutweed", PatchImplementation.HERB, ItemID.GOUTWEED, 20, 5, 0, 2), ANYHERB("Any herb", PatchImplementation.HERB, ItemID.GUAM_LEAF, 20, 5, 0, 3), From 6034d4646dd01da95b2d6cb0d9013b550c4af6c2 Mon Sep 17 00:00:00 2001 From: Jussi Kauppinen Date: Fri, 24 Jul 2020 11:05:02 +0300 Subject: [PATCH 06/47] cooking: Add support for drying sinew (#12184) --- .../net/runelite/client/plugins/cooking/CookingPlugin.java | 3 ++- .../net/runelite/client/plugins/cooking/CookingPluginTest.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cooking/CookingPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/cooking/CookingPlugin.java index ef62c1165e..a75aa8c2eb 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cooking/CookingPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cooking/CookingPlugin.java @@ -176,7 +176,8 @@ public class CookingPlugin extends Plugin || message.startsWith("You successfully bake") || message.startsWith("You manage to cook") || message.startsWith("You roast a") - || message.startsWith("You cook")) + || message.startsWith("You cook") + || message.startsWith("You dry a piece of meat")) { if (session == null) { diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/cooking/CookingPluginTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/cooking/CookingPluginTest.java index 65e9cdd3ed..4f87fda050 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/cooking/CookingPluginTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/cooking/CookingPluginTest.java @@ -59,7 +59,8 @@ public class CookingPluginTest "You cook the karambwan. It looks delicious.", "You roast a lobster.", "You cook a bass.", - "You successfully bake a tasty garden pie." + "You successfully bake a tasty garden pie.", + "You dry a piece of meat and extract the sinew." }; @Inject From 5f75fce6cd1318f89dd1739081a262e332e47556 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Tue, 14 Jul 2020 14:03:20 -0400 Subject: [PATCH 07/47] clues: fix apostrophe positioning for Seers' Village --- .../runelite/client/plugins/cluescrolls/clues/CrypticClue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java index da9d600fe9..1aa6f40605 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java @@ -60,7 +60,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("A reck you say; let's pray there aren't any ghosts.", "Father Aereck", new WorldPoint(3242, 3207, 0), "Speak to Father Aereck in Lumbridge."), new CrypticClue("Search the bucket in the Port Sarim jail.", BUCKET_9568, new WorldPoint(3013, 3179, 0), "Talk to Shantay & identify yourself as an outlaw, refuse to pay the 5gp fine twice and you will be sent to the Port Sarim jail."), new CrypticClue("Search the crates in a bank in Varrock.", CRATE_5107, new WorldPoint(3187, 9825, 0), "Search in the basement of the West Varrock bank."), - new CrypticClue("Falo the bard wants to see you.", "Falo the Bard", new WorldPoint(2689, 3550, 0), "Speak to Falo the Bard located between Seer's Village and Rellekka. Southwest of fairy ring CJR."), + new CrypticClue("Falo the bard wants to see you.", "Falo the Bard", new WorldPoint(2689, 3550, 0), "Speak to Falo the Bard located between Seers' Village and Rellekka. Southwest of fairy ring CJR."), new CrypticClue("Search a bookcase in the Wizards tower.", BOOKCASE_12539, new WorldPoint(3113, 3159, 0), "The bookcase located on the ground floor of the Wizards' Tower."), new CrypticClue("Come have a cip with this great soot covered denizen.", "Miner Magnus", new WorldPoint(2527, 3891, 0), "Talk to Miner Magnus on Miscellania, east of the fairy ring CIP. Answer: 8", "How many coal rocks are around here?"), new CrypticClue("Citric cellar.", "Heckel Funch", new WorldPoint(2490, 3488, 0), "Speak to Heckel Funch on the first floor in the Grand Tree."), From b14922013381b49033f5e238deb07f216f3227a2 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Tue, 14 Jul 2020 14:01:42 -0400 Subject: [PATCH 08/47] clues: add descriptions for MapClues --- .../plugins/cluescrolls/clues/MapClue.java | 68 ++++++++++--------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/MapClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/MapClue.java index ec95a7b946..0439c6bb34 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/MapClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/MapClue.java @@ -52,39 +52,45 @@ import net.runelite.client.ui.overlay.components.TitleComponent; @Getter public class MapClue extends ClueScroll implements ObjectClueScroll { + public static final String CHAMPIONS_GUILD = "West of the Champions' Guild"; + public static final String VARROCK_EAST_MINE = "Outside Varrock East Mine"; + public static final String STANDING_STONES = "At the standing stones north of Falador"; + public static final String WIZARDS_TOWER_DIS = "On the south side of the Wizard's Tower (DIS)"; + public static final String SOUTH_OF_DRAYNOR_BANK = "South of Draynor Village Bank"; + private static final Set CLUES = ImmutableSet.of( - new MapClue(CLUE_SCROLL_EASY_12179, new WorldPoint(3300, 3291, 0)), - new MapClue(CLUE_SCROLL_EASY_2713, new WorldPoint(3166, 3361, 0)), - new MapClue(CLUE_SCROLL_EASY_2716, new WorldPoint(3290, 3374, 0)), - new MapClue(CLUE_SCROLL_EASY_2719, new WorldPoint(3043, 3398, 0)), - new MapClue(CLUE_SCROLL_EASY_3516, new WorldPoint(2612, 3482, 0)), - new MapClue(CLUE_SCROLL_EASY_3518, new WorldPoint(3110, 3152, 0)), - new MapClue(CLUE_SCROLL_EASY_7236, new WorldPoint(2970, 3415, 0)), - new MapClue(CLUE_SCROLL_MEDIUM_2827, new WorldPoint(3091, 3227, 0)), - new MapClue(CLUE_SCROLL_MEDIUM_3596, new WorldPoint(2907, 3295, 0)), - new MapClue(CLUE_SCROLL_MEDIUM_3598, new WorldPoint(2658, 3488, 0), CRATE_357), - new MapClue(CLUE_SCROLL_MEDIUM_3599, new WorldPoint(2651, 3231, 0)), - new MapClue(CLUE_SCROLL_MEDIUM_3601, new WorldPoint(2565, 3248, 0), CRATE_354), - new MapClue(CLUE_SCROLL_MEDIUM_3602, new WorldPoint(2924, 3210, 0)), - new MapClue(CLUE_SCROLL_MEDIUM_7286, new WorldPoint(2536, 3865, 0)), - new MapClue(CLUE_SCROLL_MEDIUM_7288, new WorldPoint(3434, 3265, 0)), - new MapClue(CLUE_SCROLL_MEDIUM_7290, new WorldPoint(2454, 3230, 0)), - new MapClue(CLUE_SCROLL_MEDIUM_7292, new WorldPoint(2578, 3597, 0)), - new MapClue(CLUE_SCROLL_MEDIUM_7294, new WorldPoint(2666, 3562, 0)), - new MapClue(CLUE_SCROLL_HARD, new WorldPoint(3309, 3503, 0), CRATE_2620), - new MapClue(CLUE_SCROLL_HARD_2729, new WorldPoint(3190, 3963, 0)), - new MapClue(CLUE_SCROLL_HARD_3520, new WorldPoint(2615, 3078, 0)), - new MapClue(CLUE_SCROLL_HARD_3522, new WorldPoint(2488, 3308, 0)), - new MapClue(CLUE_SCROLL_HARD_3524, new WorldPoint(2457, 3182, 0), CRATE_18506), - new MapClue(CLUE_SCROLL_HARD_3525, new WorldPoint(3026, 3628, 0), CRATE_354), - new MapClue(CLUE_SCROLL_HARD_7239, new WorldPoint(3021, 3912, 0)), - new MapClue(CLUE_SCROLL_HARD_7241, new WorldPoint(2722, 3338, 0)), - new MapClue(CLUE_SCROLL_ELITE_12130, new WorldPoint(2449, 3130, 0)), + new MapClue(CLUE_SCROLL_EASY_12179, new WorldPoint(3300, 3291, 0), "Al Kharid mine"), + new MapClue(CLUE_SCROLL_EASY_2713, new WorldPoint(3166, 3361, 0), CHAMPIONS_GUILD), + new MapClue(CLUE_SCROLL_EASY_2716, new WorldPoint(3290, 3374, 0), VARROCK_EAST_MINE), + new MapClue(CLUE_SCROLL_EASY_2719, new WorldPoint(3043, 3398, 0), STANDING_STONES), + new MapClue(CLUE_SCROLL_EASY_3516, new WorldPoint(2612, 3482, 0), "Brother Galahad's house, West of McGrubor's Wood."), + new MapClue(CLUE_SCROLL_EASY_3518, new WorldPoint(3110, 3152, 0), WIZARDS_TOWER_DIS), + new MapClue(CLUE_SCROLL_EASY_7236, new WorldPoint(2970, 3415, 0), "North of Falador."), + new MapClue(CLUE_SCROLL_MEDIUM_2827, new WorldPoint(3091, 3227, 0), SOUTH_OF_DRAYNOR_BANK), + new MapClue(CLUE_SCROLL_MEDIUM_3596, new WorldPoint(2907, 3295, 0), "West of the Crafting Guild"), + new MapClue(CLUE_SCROLL_MEDIUM_3598, new WorldPoint(2658, 3488, 0), CRATE_357, "The crate in McGrubor's Wood. Fairy ring ALS"), + new MapClue(CLUE_SCROLL_MEDIUM_3599, new WorldPoint(2651, 3231, 0), "North of the Tower of Life. Fairy ring DJP"), + new MapClue(CLUE_SCROLL_MEDIUM_3601, new WorldPoint(2565, 3248, 0), CRATE_354, "The crate west of the Clocktower."), + new MapClue(CLUE_SCROLL_MEDIUM_3602, new WorldPoint(2924, 3210, 0), "Behind the Chemist's house in Rimmington."), + new MapClue(CLUE_SCROLL_MEDIUM_7286, new WorldPoint(2536, 3865, 0), "Miscellania. Fairy ring CIP"), + new MapClue(CLUE_SCROLL_MEDIUM_7288, new WorldPoint(3434, 3265, 0), "Mort Myre Swamp, west of Mort'ton. Fairy ring BIP"), + new MapClue(CLUE_SCROLL_MEDIUM_7290, new WorldPoint(2454, 3230, 0), "At the entrance to the Ourania Cave."), + new MapClue(CLUE_SCROLL_MEDIUM_7292, new WorldPoint(2578, 3597, 0), "South-east of the Lighthouse. Fairy ring ALP"), + new MapClue(CLUE_SCROLL_MEDIUM_7294, new WorldPoint(2666, 3562, 0), "Between Seers' Village and Rellekka. South-west of Fairy ring CJR"), + new MapClue(CLUE_SCROLL_HARD, new WorldPoint(3309, 3503, 0), CRATE_2620, "A crate in the Lumber Yard, north-east of Varrock."), + new MapClue(CLUE_SCROLL_HARD_2729, new WorldPoint(3190, 3963, 0), "Behind the Magic axe hut in level 56 Wilderness."), + new MapClue(CLUE_SCROLL_HARD_3520, new WorldPoint(2615, 3078, 0), "Yanille anvils, south of the bank."), + new MapClue(CLUE_SCROLL_HARD_3522, new WorldPoint(2488, 3308, 0), "In the western section of West Ardougne."), + new MapClue(CLUE_SCROLL_HARD_3524, new WorldPoint(2457, 3182, 0), CRATE_18506, "In a crate by the stairs to the Observatory Dungeon."), + new MapClue(CLUE_SCROLL_HARD_3525, new WorldPoint(3026, 3628, 0), CRATE_354, "In a crate at the Dark Warriors' Fortress in level 14 Wilderness."), + new MapClue(CLUE_SCROLL_HARD_7239, new WorldPoint(3021, 3912, 0), "South-east of the Wilderness Agility Course in level 50 Wilderness."), + new MapClue(CLUE_SCROLL_HARD_7241, new WorldPoint(2722, 3338, 0), "South of the Legends' Guild. Fairy ring BLR"), + new MapClue(CLUE_SCROLL_ELITE_12130, new WorldPoint(2449, 3130, 0), "South-west of Tree Gnome Village."), new MapClue(CLUE_SCROLL_ELITE_19782, new WorldPoint(2953, 9523, 1), "In the Mogre Camp, near Port Khazard. You require a Diving Apparatus and a Fishbowl Helmet"), - new MapClue(CLUE_SCROLL_ELITE_19783, new WorldPoint(2202, 3062, 0)), - new MapClue(CLUE_SCROLL_ELITE_19784, new WorldPoint(1815, 3852, 0)), - new MapClue(CLUE_SCROLL_ELITE_19785, new WorldPoint(3538, 3208, 0)), - new MapClue(CLUE_SCROLL_ELITE_19786, new WorldPoint(2703, 2716, 0), CRATE_6616) + new MapClue(CLUE_SCROLL_ELITE_19783, new WorldPoint(2202, 3062, 0), "Zul-Andra. Fairy ring BJS"), + new MapClue(CLUE_SCROLL_ELITE_19784, new WorldPoint(1815, 3852, 0), "At the Soul Altar, north-east of the Arceuus essence mine."), + new MapClue(CLUE_SCROLL_ELITE_19785, new WorldPoint(3538, 3208, 0), "East of Burgh de Rott."), + new MapClue(CLUE_SCROLL_ELITE_19786, new WorldPoint(2703, 2716, 0), CRATE_6616, "The crate in south-western Ape Atoll") ); private final int itemId; From e5f6c7e2f2f30023050c1f6ac917a08c9d5f4f75 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Thu, 23 Jul 2020 14:00:50 -0400 Subject: [PATCH 09/47] clues: update BeginnerMapClue to use MapClue description constants --- .../plugins/cluescrolls/clues/BeginnerMapClue.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/BeginnerMapClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/BeginnerMapClue.java index d1bd888e70..3942079105 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/BeginnerMapClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/BeginnerMapClue.java @@ -33,11 +33,11 @@ import net.runelite.api.widgets.WidgetID; public class BeginnerMapClue extends MapClue implements LocationClueScroll { private static final ImmutableList CLUES = ImmutableList.of( - new BeginnerMapClue(WidgetID.BEGINNER_CLUE_MAP_CHAMPIONS_GUILD, new WorldPoint(3166, 3361, 0), "West of the Champions' Guild"), - new BeginnerMapClue(WidgetID.BEGINNER_CLUE_MAP_VARROCK_EAST_MINE, new WorldPoint(3290, 3374, 0), "Outside Varrock East Mine"), - new BeginnerMapClue(WidgetID.BEGINNER_CLUE_MAP_DRAYNOR, new WorldPoint(3093, 3226, 0), "South of Draynor Village Bank"), - new BeginnerMapClue(WidgetID.BEGINNER_CLUE_MAP_NORTH_OF_FALADOR, new WorldPoint(3043, 3398, 0), "In the standing stones north of Falador"), - new BeginnerMapClue(WidgetID.BEGINNER_CLUE_MAP_WIZARDS_TOWER, new WorldPoint(3110, 3152, 0), "On the south side of the Wizard's Tower (DIS)") + new BeginnerMapClue(WidgetID.BEGINNER_CLUE_MAP_CHAMPIONS_GUILD, new WorldPoint(3166, 3361, 0), MapClue.CHAMPIONS_GUILD), + new BeginnerMapClue(WidgetID.BEGINNER_CLUE_MAP_VARROCK_EAST_MINE, new WorldPoint(3290, 3374, 0), MapClue.VARROCK_EAST_MINE), + new BeginnerMapClue(WidgetID.BEGINNER_CLUE_MAP_DRAYNOR, new WorldPoint(3093, 3226, 0), MapClue.SOUTH_OF_DRAYNOR_BANK), + new BeginnerMapClue(WidgetID.BEGINNER_CLUE_MAP_NORTH_OF_FALADOR, new WorldPoint(3043, 3398, 0), MapClue.STANDING_STONES), + new BeginnerMapClue(WidgetID.BEGINNER_CLUE_MAP_WIZARDS_TOWER, new WorldPoint(3110, 3152, 0), MapClue.WIZARDS_TOWER_DIS) ); private final int widgetGroupID; From 6bac3e81b822f722d1107f8b6f63642be007d2a1 Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Tue, 14 Jul 2020 20:58:10 -0700 Subject: [PATCH 10/47] OverlayRenderer: Fix overlay resizing logic Prior to this commit, reducing the size of an overlay not attached to an anchor point using the north or west edges and corners such that its dimensions would be below the minimum overlay size would push that overlay in that direction as it was dragged. This commit updates the overlay resize logic to prevent "pushing" overlays when trying to reduce the width or height below the overlay's minimum size. --- .../client/ui/overlay/OverlayRenderer.java | 78 +++++++++++++------ 1 file changed, 54 insertions(+), 24 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/ui/overlay/OverlayRenderer.java b/runelite-client/src/main/java/net/runelite/client/ui/overlay/OverlayRenderer.java index c552ac9de4..421b5d1dca 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/overlay/OverlayRenderer.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/overlay/OverlayRenderer.java @@ -460,53 +460,83 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener if (inOverlayResizingMode) { - final Rectangle r = currentManagedBounds; + final int left = p.x - currentManagedBounds.x; // Distance (in pixels) from the left edge of the bounds + final int top = p.y - currentManagedBounds.y; // Distance (in pixels) from the top edge of the bounds + final int originalX = currentManagedBounds.x; + final int originalY = currentManagedBounds.y; + int x = originalX; + int y = originalY; + int width = currentManagedBounds.width; + int height = currentManagedBounds.height; - final int dx = p.x - r.x; - final int dy = p.y - r.y; switch (clientUI.getCurrentCursor().getType()) { case Cursor.N_RESIZE_CURSOR: - int height = r.height - dy; - r.setRect(r.x, r.y + dy, r.width, height); + y += top; + height -= top; break; case Cursor.NW_RESIZE_CURSOR: - int width = r.width - dx; - height = r.height - dy; - r.setRect(r.x + dx, r.y + dy, width, height); + x += left; + y += top; + width -= left; + height -= top; break; case Cursor.W_RESIZE_CURSOR: - width = r.width - dx; - r.setRect(r.x + dx, r.y, width, r.height); + x += left; + width -= left; break; case Cursor.SW_RESIZE_CURSOR: - width = r.width - dx; - height = dy; - r.setRect(r.x + dx, r.y, width, height); + x += left; + width -= left; + height = top; break; case Cursor.S_RESIZE_CURSOR: - height = dy; - r.setRect(r.x, r.y, r.width, height); + height = top; break; case Cursor.SE_RESIZE_CURSOR: - width = dx; - height = dy; - r.setRect(r.x, r.y, width, height); + width = left; + height = top; break; case Cursor.E_RESIZE_CURSOR: - width = dx; - r.setRect(r.x, r.y, width, r.height); + width = left; break; case Cursor.NE_RESIZE_CURSOR: - width = dx; - height = r.height - dy; - r.setRect(r.x, r.y + dy, width, height); + y += top; + width = left; + height -= top; break; default: // center } - currentManagedOverlay.setPreferredSize(new Dimension(Math.max(MIN_OVERLAY_SIZE, currentManagedBounds.width), Math.max(MIN_OVERLAY_SIZE, currentManagedBounds.height))); + final int widthOverflow = Math.max(0, MIN_OVERLAY_SIZE - width); + final int heightOverflow = Math.max(0, MIN_OVERLAY_SIZE - height); + final int dx = x - originalX; + final int dy = y - originalY; + + // If this resize operation would cause the dimensions to go below the minimum width/height, reset the + // dimensions and adjust the x/y position accordingly as needed + if (widthOverflow > 0) + { + width = MIN_OVERLAY_SIZE; + + if (dx > 0) + { + x -= widthOverflow; + } + } + if (heightOverflow > 0) + { + height = MIN_OVERLAY_SIZE; + + if (dy > 0) + { + y -= heightOverflow; + } + } + + currentManagedBounds.setRect(x, y, width, height); + currentManagedOverlay.setPreferredSize(new Dimension(currentManagedBounds.width, currentManagedBounds.height)); if (currentManagedOverlay.getPreferredLocation() != null) { From 76b57c124ed1f404c4777bed7bf8b678bb2817fb Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 23 Jul 2020 22:47:39 -0400 Subject: [PATCH 11/47] tagtabs: close tab when clicking on main bank tab --- .../net/runelite/client/plugins/banktags/tabs/TabInterface.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java index df7abee0e7..9512db8b94 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java @@ -666,7 +666,7 @@ public class TabInterface client.setVar(VarClientInt.INPUT_TYPE, 0); } else if (activeTab != null - && event.getMenuOption().startsWith("View tab")) + && (event.getMenuOption().startsWith("View tab") || event.getMenuOption().equals("View all items"))) { activateTab(null); } From 340530daf6941549f5ec83b5e47e17326141a39a Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 23 Jul 2020 23:00:36 -0400 Subject: [PATCH 12/47] tagtabs: show tab separators in tag tabs This changes tag tabs to actually put the bank in search mode, still without providing any search input, so that the bank tab builder will draw tab separators (both the separator line and tab text label) --- .../main/java/net/runelite/api/ScriptID.java | 3 +++ .../plugins/banktags/BankTagsPlugin.java | 17 ++++++++++++++--- .../src/main/scripts/BankSearchFilter.rs2asm | 19 +++++++++---------- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/ScriptID.java b/runelite-api/src/main/java/net/runelite/api/ScriptID.java index c0c8322d04..2ad014aacd 100644 --- a/runelite-api/src/main/java/net/runelite/api/ScriptID.java +++ b/runelite-api/src/main/java/net/runelite/api/ScriptID.java @@ -296,4 +296,7 @@ public final class ScriptID @ScriptArguments(integer = 19) public static final int BANKMAIN_FINISHBUILDING = 505; + + @ScriptArguments() + public static final int BANKMAIN_SEARCHING = 514; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/BankTagsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/BankTagsPlugin.java index 7af659873e..8c527a2b4c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/BankTagsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/BankTagsPlugin.java @@ -313,9 +313,9 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener final int itemId = intStack[intStackSize - 1]; final String searchfilter = stringStack[stringStackSize - 1]; - // This event fires regardless of the bank being in search mode. If we have a current - // tab set then the bank should be not in search mode (and the filter empty). Otherwise - // the filter is either empty for no search or contains the search filter. + // This event only fires when the bank is in search mode. It will fire even if there is no search + // input. We prevent having a tag tab open while also performing a normal search, so if a tag tab + // is active here it must mean we have placed the bank into search mode. See onScriptPostFired(). TagTab activeTab = tabInterface.getActiveTab(); String search = activeTab != null ? TAG_SEARCH + activeTab.getTag() : searchfilter; @@ -499,6 +499,17 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener @Subscribe public void onScriptPostFired(ScriptPostFired event) { + if (event.getScriptId() == ScriptID.BANKMAIN_SEARCHING) + { + // The return value of bankmain_searching is on the stack. If we have a tag tab active + // make it return true to put the bank in a searching state. + if (tabInterface.getActiveTab() != null || tabInterface.isTagTabActive()) + { + client.getIntStack()[client.getIntStackSize() - 1] = 1; // true + } + return; + } + if (event.getScriptId() != ScriptID.BANKMAIN_BUILD || !config.removeSeparators()) { return; diff --git a/runelite-client/src/main/scripts/BankSearchFilter.rs2asm b/runelite-client/src/main/scripts/BankSearchFilter.rs2asm index 506aa4530b..0555737bdb 100644 --- a/runelite-client/src/main/scripts/BankSearchFilter.rs2asm +++ b/runelite-client/src/main/scripts/BankSearchFilter.rs2asm @@ -10,16 +10,6 @@ invoke 514 iconst 1 if_icmpeq LABEL8 - - iconst 1 ; return value - default to true to match anything - iload 0 ; load item id - sconst "" ; we are not searching, so there is no search string - sconst "bankSearchFilter" ; push event name - runelite_callback ; invoke callback - pop_int ; pop item id - pop_string ; pop search string - return ; return rv - jump LABEL34 LABEL8: get_varc_string 359 ; Skip truncating of varcstr 22 by not calling 280 @@ -29,6 +19,15 @@ LABEL8: string_length iconst 0 if_icmpgt LABEL15 + ; this is a bank search with no input string. the bank tag plugin uses it to perform its tab searches. + iconst 1 ; return value - default to true to match anything + iload 0 ; load item id + sconst "" ; we are not searching, so there is no search string + sconst "bankSearchFilter" ; push event name + runelite_callback ; invoke callback + pop_int ; pop item id + pop_string ; pop search string + return ; return rv jump LABEL34 LABEL15: iload 0 From 080bc013a8b7d3de689b4ec6695ebdb336e78d3e Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 23 Jul 2020 23:52:39 -0400 Subject: [PATCH 13/47] tagtabs: fix clearing bank search when opening tags --- .../plugins/banktags/tabs/BankSearch.java | 11 +++++++---- .../plugins/banktags/tabs/TabInterface.java | 17 ++++++++++------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/BankSearch.java b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/BankSearch.java index c5c2a4a9db..f607415c38 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/BankSearch.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/BankSearch.java @@ -77,11 +77,14 @@ public class BankSearch // selecting/changing tab if (closeChat) { - client.runScript(ScriptID.MESSAGE_LAYER_CLOSE, 0, 0); + // this clears the input text and type, and resets the chatbox to allow input + client.runScript(ScriptID.MESSAGE_LAYER_CLOSE, 1, 1); + } + else + { + client.setVar(VarClientInt.INPUT_TYPE, InputType.NONE.getType()); + client.setVar(VarClientStr.INPUT_TEXT, ""); } - - client.setVar(VarClientInt.INPUT_TYPE, InputType.NONE.getType()); - client.setVar(VarClientStr.INPUT_TEXT, ""); layoutBank(); }); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java index 9512db8b94..208a6fe1b0 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java @@ -409,14 +409,14 @@ public class TabInterface if (tab.equals(activeTab)) { activateTab(null); + bankSearch.reset(true); } else { openTag(Text.removeTags(clicked.getName())); + // openTag will reset and relayout } - bankSearch.reset(true); - client.playSoundEffect(SoundEffectID.UI_BOOP); break; case Tab.CHANGE_ICON: @@ -1170,12 +1170,15 @@ public class TabInterface { activateTab(tabManager.find(tag)); tagTabActive = BankTagsPlugin.TAG_TABS_CONFIG.equals(tag); - bankSearch.layoutBank(); + bankSearch.reset(true); // clear search dialog & relayout bank for new tab. - // When tab is selected with search window open, the search window closes but the search button - // stays highlighted, this solves that issue - Widget searchBackground = client.getWidget(WidgetInfo.BANK_SEARCH_BUTTON_BACKGROUND); - searchBackground.setSpriteId(SpriteID.EQUIPMENT_SLOT_TILE); + // When searching the button has a script on timer to detect search end, that will set the background back + // and remove the timer. However since we are going from a bank search to our fake search this will not remove + // the timer but instead re-add it and reset the background. So remove the timer and the background. This is the + // same as bankmain_search_setbutton. + Widget searchButtonBackground = client.getWidget(WidgetInfo.BANK_SEARCH_BUTTON_BACKGROUND); + searchButtonBackground.setOnTimerListener((Object[]) null); + searchButtonBackground.setSpriteId(SpriteID.EQUIPMENT_SLOT_TILE); } private static MenuEntry[] createMenuEntry(MenuEntryAdded event, String option, String target, MenuEntry[] entries) From c545052aad21161a1effd27a396753693d45062a Mon Sep 17 00:00:00 2001 From: trimbe <19672127+trimbe@users.noreply.github.com> Date: Thu, 23 Jul 2020 19:32:42 -0400 Subject: [PATCH 14/47] bank tags: update detection of active tab for separator removal This used to require additional logic to handle Withdraw-X but after e4b43d9, the tab interface should always be active if a tag tab is open so we can rely solely on that. --- .../client/plugins/banktags/BankTagsPlugin.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/BankTagsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/BankTagsPlugin.java index 8c527a2b4c..f078e7a167 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/BankTagsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/BankTagsPlugin.java @@ -26,7 +26,6 @@ */ package net.runelite.client.plugins.banktags; -import com.google.common.base.Strings; import com.google.common.collect.Lists; import com.google.common.primitives.Shorts; import com.google.inject.Provides; @@ -52,7 +51,6 @@ import net.runelite.api.MenuAction; import net.runelite.api.MenuEntry; import net.runelite.api.ScriptID; import net.runelite.api.SpriteID; -import net.runelite.api.VarClientInt; import net.runelite.api.VarClientStr; import net.runelite.api.events.DraggingWidgetChanged; import net.runelite.api.events.GameTick; @@ -63,7 +61,6 @@ import net.runelite.api.events.ScriptCallbackEvent; import net.runelite.api.events.ScriptPostFired; import net.runelite.api.events.ScriptPreFired; import net.runelite.api.events.WidgetLoaded; -import net.runelite.api.vars.InputType; import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.WidgetID; import net.runelite.api.widgets.WidgetInfo; @@ -466,13 +463,6 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener } } - private boolean isSearching() - { - return client.getVar(VarClientInt.INPUT_TYPE) == InputType.SEARCH.getType() - || (client.getVar(VarClientInt.INPUT_TYPE) <= 0 - && !Strings.isNullOrEmpty(client.getVar(VarClientStr.INPUT_TEXT))); - } - @Subscribe public void onScriptPreFired(ScriptPreFired event) { @@ -518,7 +508,7 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener // allow time for the tab interface to become active clientThread.invokeLater(() -> { - if (!isSearching() || !tabInterface.isActive()) + if (!tabInterface.isActive()) { return; } From d8b83ce52bf4f57c9c9db19e7838dc1126008980 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 24 Jul 2020 13:22:21 -0400 Subject: [PATCH 15/47] clientui: reset frame position in safe mode --- .../src/main/java/net/runelite/client/ui/ClientUI.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java b/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java index 13c13c7c68..aac0c62bc9 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java @@ -48,6 +48,7 @@ import java.awt.image.BufferedImage; import java.time.Duration; import javax.annotation.Nullable; import javax.inject.Inject; +import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; import javax.swing.BoxLayout; @@ -122,6 +123,7 @@ public class ClientUI private final ConfigManager configManager; private final Provider clientThreadProvider; private final EventBus eventBus; + private final boolean safeMode; private final CardLayout cardLayout = new CardLayout(); private final Rectangle sidebarButtonPosition = new Rectangle(); @@ -150,7 +152,8 @@ public class ClientUI @Nullable Applet client, ConfigManager configManager, Provider clientThreadProvider, - EventBus eventBus) + EventBus eventBus, + @Named("safeMode") boolean safeMode) { this.config = config; this.keyManager = keyManager; @@ -159,6 +162,7 @@ public class ClientUI this.configManager = configManager; this.clientThreadProvider = clientThreadProvider; this.eventBus = eventBus; + this.safeMode = safeMode; } @Subscribe @@ -507,7 +511,7 @@ public class ClientUI trayIcon = SwingUtil.createTrayIcon(ICON, RuneLiteProperties.getTitle(), frame); // Move frame around (needs to be done after frame is packed) - if (config.rememberScreenBounds()) + if (config.rememberScreenBounds() && !safeMode) { try { From aaed7816b21e3e15f6bb27d5a631886b373424d5 Mon Sep 17 00:00:00 2001 From: Blackberry0Pie Date: Sat, 25 Jul 2020 23:37:47 -0400 Subject: [PATCH 16/47] fairyring: Add Falo the bard tag to Sinclair Mansion fairy ring (#12030) --- .../java/net/runelite/client/plugins/fairyring/FairyRings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/fairyring/FairyRings.java b/runelite-client/src/main/java/net/runelite/client/plugins/fairyring/FairyRings.java index 344094a2ba..0f1db7d044 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/fairyring/FairyRings.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/fairyring/FairyRings.java @@ -61,7 +61,7 @@ public enum FairyRings CIQ("North-west of Yanille"), CIS("North of the Arceuus Library"), CIR("North-east of the Farming Guild", "mount karuulm konar"), - CJR("Sinclair Mansion (east)"), + CJR("Sinclair Mansion", "falo bard"), CKP("Cosmic entity's plane"), CKR("South of Tai Bwo Wannai Village"), CKS("Canifis"), From daf64a15a36bb3f9afe0475065a2e59c34dce59b Mon Sep 17 00:00:00 2001 From: MarbleTurtle <60723971+MarbleTurtle@users.noreply.github.com> Date: Sat, 25 Jul 2020 20:40:24 -0700 Subject: [PATCH 17/47] SkillChallengeClue: Update dragonhide clue text (#12217) After a game update, this clue along with others changed instances of "d'hide" to "dragonhide" for consistency. --- .../client/plugins/cluescrolls/clues/SkillChallengeClue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/SkillChallengeClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/SkillChallengeClue.java index a8d0987357..a58cfb9942 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/SkillChallengeClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/SkillChallengeClue.java @@ -134,7 +134,7 @@ public class SkillChallengeClue extends ClueScroll implements NpcClueScroll, Nam new SkillChallengeClue("Complete a lap of Ape atoll agility course.", true, any("Ninja Monkey Greegree", item(ItemID.NINJA_MONKEY_GREEGREE), item(ItemID.NINJA_MONKEY_GREEGREE_4025), item(ItemID.KRUK_MONKEY_GREEGREE))), new SkillChallengeClue("Create a super defence potion.", item(ItemID.CADANTINE_POTION_UNF), item(ItemID.WHITE_BERRIES)), new SkillChallengeClue("Steal from a chest in Ardougne Castle."), - new SkillChallengeClue("Craft a green d'hide body.", xOfItem(ItemID.GREEN_DRAGON_LEATHER, 3), item(ItemID.NEEDLE), item(ItemID.THREAD)), + new SkillChallengeClue("Craft a green dragonhide body.", xOfItem(ItemID.GREEN_DRAGON_LEATHER, 3), item(ItemID.NEEDLE), item(ItemID.THREAD)), new SkillChallengeClue("String a yew longbow.", item(ItemID.YEW_LONGBOW_U), item(ItemID.BOW_STRING)), new SkillChallengeClue("Kill a Dust Devil.", "slay a dust devil.", true, any("Facemask or Slayer Helmet", item(ItemID.FACEMASK), item(ItemID.SLAYER_HELMET), item(ItemID. SLAYER_HELMET_I), item(ItemID. BLACK_SLAYER_HELMET), item(ItemID. BLACK_SLAYER_HELMET_I), item(ItemID. PURPLE_SLAYER_HELMET), item(ItemID. PURPLE_SLAYER_HELMET_I), item(ItemID. RED_SLAYER_HELMET), item(ItemID. RED_SLAYER_HELMET_I), item(ItemID.GREEN_SLAYER_HELMET), item(ItemID. GREEN_SLAYER_HELMET_I), item(ItemID. TURQUOISE_SLAYER_HELMET), item(ItemID. TURQUOISE_SLAYER_HELMET_I), item(ItemID. HYDRA_SLAYER_HELMET), item(ItemID. HYDRA_SLAYER_HELMET_I))), new SkillChallengeClue("Catch a black warlock.", item(ItemID.BUTTERFLY_JAR), any("Butterfly Net", item(ItemID.BUTTERFLY_NET), item(ItemID.MAGIC_BUTTERFLY_NET))), From 24c621177ab6ab39dffc50fe5199c67ae9088705 Mon Sep 17 00:00:00 2001 From: kjartantr Date: Sun, 26 Jul 2020 03:58:14 +0000 Subject: [PATCH 18/47] SlayerUnlock: Update varbits enum (#12214) --- .../src/main/java/net/runelite/api/vars/SlayerUnlock.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/runelite-api/src/main/java/net/runelite/api/vars/SlayerUnlock.java b/runelite-api/src/main/java/net/runelite/api/vars/SlayerUnlock.java index 05081da7a2..4ad46dc060 100644 --- a/runelite-api/src/main/java/net/runelite/api/vars/SlayerUnlock.java +++ b/runelite-api/src/main/java/net/runelite/api/vars/SlayerUnlock.java @@ -79,7 +79,13 @@ public enum SlayerUnlock RUNE_DRAGON_EXTEND(41), VORKATH_SLAYER_HELM(42), FOSSIL_ISLAND_WYVERN_DISABLE(43, Varbits.FOSSIL_ISLAND_WYVERN_DISABLE), - GROTESQUE_GUARDIAN_DOUBLE_COUNT(44); + GROTESQUE_GUARDIAN_DOUBLE_COUNT(44), + HYDRA_SLAYER_HELM(45), + BASILISK_EXTEND(46), + BASILISK_UNLOCK(47), + OLM_SLAYER_HELM(48), + VAMPYRE_EXTEND(49), + VAMPYRE_UNLOCK(50); private Varbits toggleVarbit; From a41074f1355dbb785dc4808eee97b487e7adc0cf Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 28 Jul 2020 13:42:44 -0400 Subject: [PATCH 19/47] clientui: use contains instead of intersects for screen bounds checking It is possible to have the client bounds intersect the screen bounds but still have the client unusable due to being unable to resposition it. --- .../src/main/java/net/runelite/client/ui/ClientUI.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java b/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java index aac0c62bc9..99a5baf689 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java @@ -522,8 +522,8 @@ public class ClientUI frame.setBounds(clientBounds); // frame.getGraphicsConfiguration().getBounds() returns the bounds for the primary display. - // We have to find the correct graphics configuration by using the intersection of the client boundaries. - GraphicsConfiguration gc = getIntersectingDisplay(clientBounds); + // We have to find the correct graphics configuration by using the client boundaries. + GraphicsConfiguration gc = findDisplayFromBounds(clientBounds); if (gc != null) { double scale = gc.getDefaultTransform().getScaleX(); @@ -587,7 +587,7 @@ public class ClientUI } } - private GraphicsConfiguration getIntersectingDisplay(final Rectangle bounds) + private GraphicsConfiguration findDisplayFromBounds(final Rectangle bounds) { GraphicsDevice[] gds = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices(); @@ -596,7 +596,7 @@ public class ClientUI GraphicsConfiguration gc = gd.getDefaultConfiguration(); final Rectangle displayBounds = gc.getBounds(); - if (displayBounds.intersects(bounds)) + if (displayBounds.contains(bounds)) { return gc; } From 04648664ad6bd4970f531958435851ef0173d75d Mon Sep 17 00:00:00 2001 From: Arman Rafian Date: Wed, 29 Jul 2020 20:54:02 -0700 Subject: [PATCH 20/47] agility: Improve laps per hour calculation accuracy (#12246) The agility plugin previously calculated the average laps/hr rate based on the speed of the last 10 completed laps. Since this number was too low, it regularly resulted in an inaccurate estimate. Increasing this cache of previous lap speed to 30 yields a good trade-off between accuracy over a long period of time and responsiveness to laps with outlier completion times. --- .../net/runelite/client/plugins/agility/AgilitySession.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilitySession.java b/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilitySession.java index ea466a1c5b..2a1174a6e6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilitySession.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilitySession.java @@ -41,7 +41,7 @@ class AgilitySession private Instant lastLapCompleted; private int totalLaps; private int lapsTillGoal; - private final EvictingQueue lastLapTimes = EvictingQueue.create(10); + private final EvictingQueue lastLapTimes = EvictingQueue.create(30); private int lapsPerHour; AgilitySession(Courses course) From 40f032bede826714ad431f912889f6a527fcd0c9 Mon Sep 17 00:00:00 2001 From: LA <14169758+LA@users.noreply.github.com> Date: Wed, 29 Jul 2020 22:39:22 -0700 Subject: [PATCH 21/47] screenshot: Capture Barbarian Assault high gamble screenshots (#12071) --- .../plugins/screenshot/ScreenshotConfig.java | 14 +++++- .../plugins/screenshot/ScreenshotPlugin.java | 47 ++++++++++++++++--- .../screenshot/ScreenshotPluginTest.java | 7 +++ 3 files changed, 61 insertions(+), 7 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java index 9753e6da5b..269eb8554a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java @@ -229,11 +229,23 @@ public interface ScreenshotConfig extends Config return false; } + @ConfigItem( + keyName = "baHighGamble", + name = "Screenshot BA high gambles", + description = "Take a screenshot of your reward from a high gamble at Barbarian Assault.", + position = 16, + section = whatSection + ) + default boolean screenshotHighGamble() + { + return false; + } + @ConfigItem( keyName = "hotkey", name = "Screenshot hotkey", description = "When you press this key a screenshot will be taken", - position = 16 + position = 17 ) default Keybind hotkey() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java index 7d0c3d18a2..ad721b0160 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java @@ -110,6 +110,7 @@ public class ScreenshotPlugin extends Plugin private static final ImmutableList PET_MESSAGES = ImmutableList.of("You have a funny feeling like you're being followed", "You feel something weird sneaking into your backpack", "You have a funny feeling like you would have been followed"); + private static final Pattern BA_HIGH_GAMBLE_REWARD_PATTERN = Pattern.compile("(?.+)!
High level gamble count: (?.+)"); private String clueType; private Integer clueNumber; @@ -238,8 +239,17 @@ public class ScreenshotPlugin extends Plugin } else if (client.getWidget(WidgetInfo.DIALOG_SPRITE_TEXT) != null) { - fileName = parseLevelUpWidget(WidgetInfo.DIALOG_SPRITE_TEXT); - screenshotSubDir = "Levels"; + String text = client.getWidget(WidgetInfo.DIALOG_SPRITE_TEXT).getText(); + if (Text.removeTags(text).contains("High level gamble")) + { + fileName = parseBAHighGambleWidget(text); + screenshotSubDir = "BA High Gambles"; + } + else + { + fileName = parseLevelUpWidget(WidgetInfo.DIALOG_SPRITE_TEXT); + screenshotSubDir = "Levels"; + } } else if (client.getWidget(WidgetInfo.QUEST_COMPLETED_NAME_TEXT) != null) { @@ -378,7 +388,7 @@ public class ScreenshotPlugin extends Plugin takeScreenshot(fileName, "Pets"); } - if (config.screenshotBossKills() ) + if (config.screenshotBossKills()) { Matcher m = BOSSKILL_MESSAGE_PATTERN.matcher(chatMessage); if (m.matches()) @@ -455,12 +465,17 @@ public class ScreenshotPlugin extends Plugin } break; case LEVEL_UP_GROUP_ID: - case DIALOG_SPRITE_GROUP_ID: if (!config.screenshotLevels()) { return; } break; + case DIALOG_SPRITE_GROUP_ID: + if (!(config.screenshotLevels() || config.screenshotHighGamble())) + { + return; + } + break; case KINGDOM_GROUP_ID: if (!config.screenshotKingdom()) { @@ -626,12 +641,32 @@ public class ScreenshotPlugin extends Plugin return "Quest(" + quest + ')'; } + /** + * Parses the Barbarian Assault high gamble reward dialog text into a shortened string for filename usage. + * + * @param text The {@link Widget#getText() text} of the {@link WidgetInfo#DIALOG_SPRITE_TEXT} widget. + * @return Shortened string in the format "High Gamble(100)" + */ + @VisibleForTesting + static String parseBAHighGambleWidget(final String text) + { + final Matcher highGambleMatch = BA_HIGH_GAMBLE_REWARD_PATTERN.matcher(text); + if (highGambleMatch.find()) + { + String gambleCount = highGambleMatch.group("gambleCount"); + return String.format("High Gamble(%s)", gambleCount); + } + + return "High Gamble(count not found)"; + } + + /** * Saves a screenshot of the client window to the screenshot folder as a PNG, * and optionally uploads it to an image-hosting service. * - * @param fileName Filename to use, without file extension. - * @param subDir Subdirectory to store the captured screenshot in. + * @param fileName Filename to use, without file extension. + * @param subDir Subdirectory to store the captured screenshot in. */ private void takeScreenshot(String fileName, String subDir) { diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/screenshot/ScreenshotPluginTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/screenshot/ScreenshotPluginTest.java index 2616db357e..d77ae1d17c 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/screenshot/ScreenshotPluginTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/screenshot/ScreenshotPluginTest.java @@ -66,6 +66,7 @@ public class ScreenshotPluginTest private static final String THEATRE_OF_BLOOD_CHEST = "Your completed Theatre of Blood count is: 73."; private static final String VALUABLE_DROP = "Valuable drop: 6 x Bronze arrow (42 coins)"; private static final String UNTRADEABLE_DROP = "Untradeable drop: Rusty sword"; + private static final String BA_HIGH_GAMBLE_REWARD = "Raw shark (x 300)!
High level gamble count: 100"; @Mock @Bind @@ -258,4 +259,10 @@ public class ScreenshotPluginTest assertEquals("Quest(Doric's Quest)", ScreenshotPlugin.parseQuestCompletedWidget("You have completed Doric's Quest!")); assertEquals("Quest(quest not found)", ScreenshotPlugin.parseQuestCompletedWidget("Sins of the Father forgiven!")); } + + @Test + public void testBAHighGambleRewardParsing() + { + assertEquals("High Gamble(100)", ScreenshotPlugin.parseBAHighGambleWidget(BA_HIGH_GAMBLE_REWARD)); + } } From d8b433739381b4ff5703b0b054325959304bf4e0 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Thu, 30 Jul 2020 02:03:59 -0400 Subject: [PATCH 22/47] cannon: Add Meiyerditch Laboratory Bloodveld cannon spot (#12078) --- .../java/net/runelite/client/plugins/cannon/CannonSpots.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cannon/CannonSpots.java b/runelite-client/src/main/java/net/runelite/client/plugins/cannon/CannonSpots.java index 18f7466203..03cbe9a8bd 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cannon/CannonSpots.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cannon/CannonSpots.java @@ -33,7 +33,7 @@ import net.runelite.api.coords.WorldPoint; enum CannonSpots { - BLOODVELDS(new WorldPoint(2439, 9821, 0), new WorldPoint(2448, 9821, 0), new WorldPoint(2472, 9832, 0), new WorldPoint(2453, 9817, 0)), + BLOODVELDS(new WorldPoint(2439, 9821, 0), new WorldPoint(2448, 9821, 0), new WorldPoint(2472, 9832, 0), new WorldPoint(2453, 9817, 0), new WorldPoint(3597, 9743, 0)), FIRE_GIANTS(new WorldPoint(2393, 9782, 0), new WorldPoint(2412, 9776, 0), new WorldPoint(2401, 9780, 0), new WorldPoint(3047, 10340, 0)), ABERRANT_SPECTRES(new WorldPoint(2456, 9791, 0)), HELLHOUNDS(new WorldPoint(2431, 9776, 0), new WorldPoint(2413, 9786, 0), new WorldPoint(2783, 9686, 0), new WorldPoint(3198, 10071, 0)), From 407ec54d7034d99208872b322ddf5b074b8a93b9 Mon Sep 17 00:00:00 2001 From: OneProGoober Date: Thu, 30 Jul 2020 01:08:33 -0500 Subject: [PATCH 23/47] emoji: Add XD and pleading emojis (#12203) --- .../net/runelite/client/plugins/emojis/Emoji.java | 2 ++ .../runelite/client/plugins/emojis/pleading.png | Bin 0 -> 311 bytes .../net/runelite/client/plugins/emojis/xd.png | Bin 0 -> 312 bytes 3 files changed, 2 insertions(+) create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/emojis/pleading.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/emojis/xd.png diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/emojis/Emoji.java b/runelite-client/src/main/java/net/runelite/client/plugins/emojis/Emoji.java index 3ac56872d1..acee57ab0f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/emojis/Emoji.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/emojis/Emoji.java @@ -89,6 +89,8 @@ enum Emoji PENSIVE("V_V"), ACORN("D~"), // emojiMap; diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/emojis/pleading.png b/runelite-client/src/main/resources/net/runelite/client/plugins/emojis/pleading.png new file mode 100644 index 0000000000000000000000000000000000000000..be897688aca0f250e7af35defda245aa07bd9aa6 GIT binary patch literal 311 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uGBwbBK{D4$rfKP}kkp6$h7l?iy^FF)K_R(hN za|>^_|C9OuA5Q;& zKK$DeuczBw`?544d%rYKUiRJU>+QMuRu4Arb!c7wttXU0hjoK%)6Dum(V8-b_Quvg>li#;{an^L HB{Ts5ks6Mb literal 0 HcmV?d00001 diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/emojis/xd.png b/runelite-client/src/main/resources/net/runelite/client/plugins/emojis/xd.png new file mode 100644 index 0000000000000000000000000000000000000000..7f9e9e0b4035bedec96f0db381d57b1a84dde303 GIT binary patch literal 312 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uGBwbBK{D4$-fKP}kkp6$h7l_uisw}HhxU|&# z@>26(C%l)|Dx|qGEUc7USSh=#R^ihDxBg7g74?d*cR7DL=>F%V_pQ}d$7UHk-faK% zu*Z*Mp2uby+*)J3rAvKEt?$}7u|gSa59yTF+DxEal|A?th4n$Iy%!tLVT|Hblxtes76 zssD@@?P6Xq^+B>sYy+Z1O{$#g?HZpEFdE?fP2+NO)BF=v Date: Thu, 30 Jul 2020 08:44:36 +0200 Subject: [PATCH 24/47] PrayerType: Fix BURST_OF_STRENGTH description typo (#12138) --- .../java/net/runelite/client/plugins/prayer/PrayerType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/prayer/PrayerType.java b/runelite-client/src/main/java/net/runelite/client/plugins/prayer/PrayerType.java index 6ef41a7676..7ca4524f53 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/prayer/PrayerType.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/prayer/PrayerType.java @@ -34,7 +34,7 @@ import net.runelite.api.SpriteID; enum PrayerType { THICK_SKIN("Thick Skin", Prayer.THICK_SKIN, "+5% Defence", SpriteID.PRAYER_THICK_SKIN, false), - BURST_OF_STRENGTH("Burst of Strength", Prayer.BURST_OF_STRENGTH, "+5% Strenth", SpriteID.PRAYER_BURST_OF_STRENGTH, false), + BURST_OF_STRENGTH("Burst of Strength", Prayer.BURST_OF_STRENGTH, "+5% Strength", SpriteID.PRAYER_BURST_OF_STRENGTH, false), CLARITY_OF_THOUGHT("Clarity of Thought", Prayer.CLARITY_OF_THOUGHT, "+5% Attack", SpriteID.PRAYER_CLARITY_OF_THOUGHT, false), SHARP_EYE("Sharp Eye", Prayer.SHARP_EYE, "+5% Ranged", SpriteID.PRAYER_SHARP_EYE, false), MYSTIC_WILL("Mystic Will", Prayer.MYSTIC_WILL, "+5% Magical attack and defence", SpriteID.PRAYER_MYSTIC_WILL, false), From df21c1f6f92ced3644b2df1db6f6651ca99be2bb Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Thu, 30 Jul 2020 02:45:51 -0400 Subject: [PATCH 25/47] discord: Add castle wars underground region ID (#12075) --- .../runelite/client/plugins/discord/DiscordGameEventType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordGameEventType.java b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordGameEventType.java index 2df8d6bd60..b78920f666 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordGameEventType.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordGameEventType.java @@ -239,7 +239,7 @@ enum DiscordGameEventType MG_BLAST_FURNACE("Blast Furnace", DiscordAreaType.MINIGAMES, 7757), MG_BRIMHAVEN_AGILITY_ARENA("Brimhaven Agility Arena", DiscordAreaType.MINIGAMES, 11157), MG_BURTHORPE_GAMES_ROOM("Burthorpe Games Room", DiscordAreaType.MINIGAMES, 8781), - MG_CASTLE_WARS("Castle Wars", DiscordAreaType.MINIGAMES, 9520), + MG_CASTLE_WARS("Castle Wars", DiscordAreaType.MINIGAMES, 9520, 9620), MG_CLAN_WARS("Clan Wars", DiscordAreaType.MINIGAMES, 13135, 13134, 13133, 13131, 13130, 13387, 13386), MG_DUEL_ARENA("Duel Arena", DiscordAreaType.MINIGAMES, 13362), MG_FISHING_TRAWLER("Fishing Trawler", DiscordAreaType.MINIGAMES, 7499), From 9fef3ad47df49d476858a9ef3b8e9f149b222429 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 2 Aug 2020 11:48:34 -0400 Subject: [PATCH 26/47] inventory-grid: show grid when viewing bank Co-authored-by: while-loop --- .../inventorygrid/InventoryGridOverlay.java | 48 +++++++++++++++---- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/inventorygrid/InventoryGridOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/inventorygrid/InventoryGridOverlay.java index 6c0380b687..3d606d8d6a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/inventorygrid/InventoryGridOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/inventorygrid/InventoryGridOverlay.java @@ -72,20 +72,30 @@ class InventoryGridOverlay extends Overlay @Override public Dimension render(Graphics2D graphics) { - final Widget if1DraggingWidget = client.getIf1DraggedWidget(); - final Widget inventoryWidget = client.getWidget(WidgetInfo.INVENTORY); - - if (if1DraggingWidget == null || if1DraggingWidget != inventoryWidget) + final Widget draggingWidget = getDraggedWidget(); + if (draggingWidget == null) { initialMousePoint = null; hoverActive = false; + // not dragging + return null; + } + + // grid is only supported on bank inventory and inventory + Widget inventoryWidget = draggingWidget.isIf3() ? + client.getWidget(WidgetInfo.BANK_INVENTORY_ITEMS_CONTAINER) : + client.getWidget(WidgetInfo.INVENTORY); + + // with if3 the dragged widget is a child of the inventory, with if1 it is an item of the inventory (and the same widget) + if (inventoryWidget == null || (draggingWidget.isIf3() ? draggingWidget.getParent() != inventoryWidget : draggingWidget != inventoryWidget)) + { return null; } final net.runelite.api.Point mouse = client.getMouseCanvasPosition(); final Point mousePoint = new Point(mouse.getX(), mouse.getY()); - final int if1DraggedItemIndex = client.getIf1DraggedItemIndex(); - final WidgetItem draggedItem = inventoryWidget.getWidgetItem(if1DraggedItemIndex); + final int draggedItemIndex = draggingWidget.isIf3() ? draggingWidget.getIndex() : client.getIf1DraggedItemIndex(); + final WidgetItem draggedItem = getWidgetItem(inventoryWidget, draggedItemIndex); final Rectangle initialBounds = draggedItem.getCanvasBounds(false); if (initialMousePoint == null) @@ -104,8 +114,7 @@ class InventoryGridOverlay extends Overlay for (int i = 0; i < INVENTORY_SIZE; ++i) { - WidgetItem targetWidgetItem = inventoryWidget.getWidgetItem(i); - + final WidgetItem targetWidgetItem = getWidgetItem(inventoryWidget, i); final Rectangle bounds = targetWidgetItem.getCanvasBounds(false); boolean inBounds = bounds.contains(mousePoint); @@ -130,6 +139,29 @@ class InventoryGridOverlay extends Overlay return null; } + private Widget getDraggedWidget() + { + Widget widget = client.getIf1DraggedWidget(); // if1 drag + if (widget != null) + { + return widget; + } + return client.getDraggedWidget(); // if3 drag + } + + private static WidgetItem getWidgetItem(Widget parentWidget, int idx) + { + if (parentWidget.isIf3()) + { + Widget wi = parentWidget.getChild(idx); + return new WidgetItem(wi.getItemId(), wi.getItemQuantity(), -1, wi.getBounds(), parentWidget, wi.getBounds()); + } + else + { + return parentWidget.getWidgetItem(idx); + } + } + private void drawItem(Graphics2D graphics, Rectangle bounds, WidgetItem item) { if (item.getId() == -1) From e885cef94255b5ff76a7d03fdabae196e80b42b8 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Sat, 1 Aug 2020 19:10:24 -0400 Subject: [PATCH 27/47] agility: Fix prif portal highlighting Previously they would be highlighted with graphics.setColor(configColor) when config.highlightPortals was set to false. --- .../client/plugins/agility/AgilityOverlay.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityOverlay.java index 96e52d22f8..a7996744c2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityOverlay.java @@ -109,9 +109,16 @@ class AgilityOverlay extends Overlay configColor = config.getMarkColor(); } - if (config.highlightPortals() && Obstacles.PORTAL_OBSTACLE_IDS.contains(object.getId())) + if (Obstacles.PORTAL_OBSTACLE_IDS.contains(object.getId())) { - configColor = config.getPortalsColor(); + if (config.highlightPortals()) + { + configColor = config.getPortalsColor(); + } + else + { + return; + } } if (objectClickbox.contains(mousePosition.getX(), mousePosition.getY())) From e53e33d6fb53abab9397bd17f462d692a65a1ab5 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 3 Aug 2020 11:56:12 -0400 Subject: [PATCH 28/47] mouse highlight: fix interface tooltips option Use the menu type instead of assuming if the param1 is a valid widget then the menu is for a widget. The params are free form data which is specific to the menu type, so it is possible for it to unintentionally be a valid widget id even when it is something else. --- .../mousehighlight/MouseHighlightOverlay.java | 80 +++++++++++++------ 1 file changed, 54 insertions(+), 26 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/mousehighlight/MouseHighlightOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/mousehighlight/MouseHighlightOverlay.java index 4a8e1026e6..be6001241d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/mousehighlight/MouseHighlightOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/mousehighlight/MouseHighlightOverlay.java @@ -25,14 +25,15 @@ package net.runelite.client.plugins.mousehighlight; import com.google.common.base.Strings; +import com.google.common.collect.ImmutableSet; import java.awt.Dimension; import java.awt.Graphics2D; +import java.util.Set; import javax.inject.Inject; import net.runelite.api.Client; import net.runelite.api.MenuAction; import net.runelite.api.MenuEntry; import net.runelite.api.VarClientInt; -import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.WidgetID; import net.runelite.api.widgets.WidgetInfo; import net.runelite.client.ui.overlay.Overlay; @@ -42,6 +43,35 @@ import net.runelite.client.ui.overlay.tooltip.TooltipManager; class MouseHighlightOverlay extends Overlay { + /** + * Menu types which are on widgets. + */ + private static final Set WIDGET_MENU_ACTIONS = ImmutableSet.of( + MenuAction.WIDGET_TYPE_1, + MenuAction.WIDGET_TYPE_2, + MenuAction.WIDGET_TYPE_3, + MenuAction.WIDGET_TYPE_4, + MenuAction.WIDGET_TYPE_5, + MenuAction.WIDGET_TYPE_6, + MenuAction.ITEM_USE_ON_WIDGET_ITEM, + MenuAction.ITEM_USE_ON_WIDGET, + MenuAction.ITEM_FIRST_OPTION, + MenuAction.ITEM_SECOND_OPTION, + MenuAction.ITEM_THIRD_OPTION, + MenuAction.ITEM_FOURTH_OPTION, + MenuAction.ITEM_FIFTH_OPTION, + MenuAction.ITEM_USE, + MenuAction.WIDGET_FIRST_OPTION, + MenuAction.WIDGET_SECOND_OPTION, + MenuAction.WIDGET_THIRD_OPTION, + MenuAction.WIDGET_FOURTH_OPTION, + MenuAction.WIDGET_FIFTH_OPTION, + MenuAction.EXAMINE_ITEM, + MenuAction.SPELL_CAST_ON_WIDGET, + MenuAction.CC_OP_LOW_PRIORITY, + MenuAction.CC_OP + ); + private final TooltipManager tooltipManager; private final Client client; private final MouseHighlightConfig config; @@ -74,9 +104,9 @@ class MouseHighlightOverlay extends Overlay MenuEntry menuEntry = menuEntries[last]; String target = menuEntry.getTarget(); String option = menuEntry.getOption(); - int type = menuEntry.getType(); + MenuAction type = MenuAction.of(menuEntry.getType()); - if (type == MenuAction.RUNELITE_OVERLAY.getId() || type == MenuAction.CC_OP_LOW_PRIORITY.getId()) + if (type == MenuAction.RUNELITE_OVERLAY || type == MenuAction.CC_OP_LOW_PRIORITY) { // These are always right click only return null; @@ -102,34 +132,32 @@ class MouseHighlightOverlay extends Overlay } } - final int widgetId = menuEntry.getParam1(); - final int groupId = WidgetInfo.TO_GROUP(widgetId); - final int childId = WidgetInfo.TO_CHILD(widgetId); - final Widget widget = client.getWidget(groupId, childId); - - if (!config.uiTooltip() && widget != null) + if (WIDGET_MENU_ACTIONS.contains(type)) { - return null; - } + final int widgetId = menuEntry.getParam1(); + final int groupId = WidgetInfo.TO_GROUP(widgetId); - if (!config.chatboxTooltip() && groupId == WidgetInfo.CHATBOX.getGroupId()) - { - return null; - } - - if (config.disableSpellbooktooltip() && groupId == WidgetID.SPELLBOOK_GROUP_ID) - { - return null; - } - - if (widget != null) - { - // If this varc is set, some CS is showing tooltip - int tooltipTimeout = client.getVar(VarClientInt.TOOLTIP_TIMEOUT); - if (tooltipTimeout > client.getGameCycle()) + if (!config.uiTooltip()) { return null; } + + if (!config.chatboxTooltip() && groupId == WidgetInfo.CHATBOX.getGroupId()) + { + return null; + } + + if (config.disableSpellbooktooltip() && groupId == WidgetID.SPELLBOOK_GROUP_ID) + { + return null; + } + } + + // If this varc is set, a tooltip will be displayed soon + int tooltipTimeout = client.getVar(VarClientInt.TOOLTIP_TIMEOUT); + if (tooltipTimeout > client.getGameCycle()) + { + return null; } // If this varc is set, a tooltip is already being displayed From 53cba270b1768feb5273aebc29f43810cda5fe69 Mon Sep 17 00:00:00 2001 From: JZomerlei Date: Mon, 3 Aug 2020 15:07:21 -0500 Subject: [PATCH 29/47] achivement dairy plugin: Add satisfiesRequirement to Requirement (#12265) Add satisfiesRequirement to Requirement interface that all other requirements implement Instead of using instanceOf to see if each requirement is satisfied. --- .../CombatLevelRequirement.java | 6 +++ .../DiaryRequirementsPlugin.java | 45 +------------------ .../achievementdiary/FavourRequirement.java | 7 +++ .../achievementdiary/OrRequirement.java | 13 ++++++ .../QuestPointRequirement.java | 7 +++ .../achievementdiary/QuestRequirement.java | 12 +++++ .../plugins/achievementdiary/Requirement.java | 3 ++ .../achievementdiary/SkillRequirement.java | 6 +++ 8 files changed, 55 insertions(+), 44 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/CombatLevelRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/CombatLevelRequirement.java index 4befd43eb1..302822e534 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/CombatLevelRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/CombatLevelRequirement.java @@ -26,6 +26,7 @@ package net.runelite.client.plugins.achievementdiary; import lombok.Getter; import lombok.RequiredArgsConstructor; +import net.runelite.api.Client; @RequiredArgsConstructor @Getter @@ -38,4 +39,9 @@ public class CombatLevelRequirement implements Requirement { return level + " " + "Combat"; } + + public boolean satisfiesRequirement(Client client) + { + return client.getLocalPlayer() == null ? false : client.getLocalPlayer().getCombatLevel() >= level; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/DiaryRequirementsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/DiaryRequirementsPlugin.java index ee77f19ecc..9afce27f26 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/DiaryRequirementsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/DiaryRequirementsPlugin.java @@ -35,9 +35,7 @@ import javax.inject.Inject; import lombok.extern.slf4j.Slf4j; import net.runelite.api.Client; import net.runelite.api.FontTypeFace; -import net.runelite.api.QuestState; import net.runelite.api.ScriptID; -import net.runelite.api.VarPlayer; import net.runelite.api.events.WidgetLoaded; import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.WidgetID; @@ -277,7 +275,7 @@ public class DiaryRequirementsPlugin extends Plugin assert !req.getRequirements().isEmpty(); for (Requirement ireq : req.getRequirements()) { - boolean satifisfied = satisfiesRequirement(ireq); + boolean satifisfied = ireq.satisfiesRequirement(client); b.append(satifisfied ? "" : ""); b.append(ireq.toString()); b.append(satifisfied ? "" : ""); @@ -292,45 +290,4 @@ public class DiaryRequirementsPlugin extends Plugin } return reqs; } - - private boolean satisfiesRequirement(Requirement r) - { - if (r instanceof OrRequirement) - { - return ((OrRequirement) r).getRequirements() - .stream() - .anyMatch(this::satisfiesRequirement); - } - if (r instanceof SkillRequirement) - { - SkillRequirement s = (SkillRequirement) r; - return client.getRealSkillLevel(s.getSkill()) >= s.getLevel(); - } - if (r instanceof CombatLevelRequirement) - { - return client.getLocalPlayer().getCombatLevel() >= ((CombatLevelRequirement) r).getLevel(); - } - if (r instanceof QuestRequirement) - { - QuestRequirement q = (QuestRequirement) r; - QuestState state = q.getQuest().getState(client); - if (q.isStarted()) - { - return state != QuestState.NOT_STARTED; - } - return state == QuestState.FINISHED; - } - if (r instanceof QuestPointRequirement) - { - return client.getVar(VarPlayer.QUEST_POINTS) >= ((QuestPointRequirement) r).getQp(); - } - if (r instanceof FavourRequirement) - { - FavourRequirement f = (FavourRequirement) r; - int realFavour = client.getVar(f.getHouse().getVarbit()); - return (realFavour / 10) >= f.getPercent(); - } - log.warn("Unknown requirement {}", r); - return false; - } } \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/FavourRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/FavourRequirement.java index 575faa0e75..916033f206 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/FavourRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/FavourRequirement.java @@ -26,6 +26,7 @@ package net.runelite.client.plugins.achievementdiary; import lombok.Getter; import lombok.RequiredArgsConstructor; +import net.runelite.api.Client; import net.runelite.api.Favour; @RequiredArgsConstructor @@ -40,4 +41,10 @@ public class FavourRequirement implements Requirement { return percent + "% " + house.getName() + " favour"; } + + public boolean satisfiesRequirement(Client client) + { + int realFavour = client.getVar(house.getVarbit()); + return (realFavour / 10) >= percent; + } } \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/OrRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/OrRequirement.java index 7b852426f9..44f9ebb0d5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/OrRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/OrRequirement.java @@ -28,6 +28,7 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.Getter; +import net.runelite.api.Client; public class OrRequirement implements Requirement { @@ -44,4 +45,16 @@ public class OrRequirement implements Requirement { return Joiner.on(" or ").join(requirements); } + + public boolean satisfiesRequirement(Client client) + { + for (Requirement r : getRequirements()) + { + if (r.satisfiesRequirement(client)) + { + return true; + } + } + return false; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/QuestPointRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/QuestPointRequirement.java index c2b13e7c9b..0813e6bed0 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/QuestPointRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/QuestPointRequirement.java @@ -26,6 +26,8 @@ package net.runelite.client.plugins.achievementdiary; import lombok.Getter; import lombok.RequiredArgsConstructor; +import net.runelite.api.Client; +import net.runelite.api.VarPlayer; @RequiredArgsConstructor @Getter @@ -38,4 +40,9 @@ public class QuestPointRequirement implements Requirement { return qp + " " + "Quest points"; } + + public boolean satisfiesRequirement(Client client) + { + return client.getVar(VarPlayer.QUEST_POINTS) >= qp; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/QuestRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/QuestRequirement.java index cbc471651f..ca02ee682d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/QuestRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/QuestRequirement.java @@ -26,7 +26,9 @@ package net.runelite.client.plugins.achievementdiary; import lombok.Getter; import lombok.RequiredArgsConstructor; +import net.runelite.api.Client; import net.runelite.api.Quest; +import net.runelite.api.QuestState; @Getter @RequiredArgsConstructor @@ -50,4 +52,14 @@ public class QuestRequirement implements Requirement return quest.getName(); } + + public boolean satisfiesRequirement(Client client) + { + QuestState questState = quest.getState(client); + if (started) + { + return questState != QuestState.NOT_STARTED; + } + return questState == QuestState.FINISHED; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/Requirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/Requirement.java index a507cb4538..3360a15a7f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/Requirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/Requirement.java @@ -24,6 +24,9 @@ */ package net.runelite.client.plugins.achievementdiary; +import net.runelite.api.Client; + public interface Requirement { + boolean satisfiesRequirement(Client client); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/SkillRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/SkillRequirement.java index 1a711f91ac..ded0a3c84d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/SkillRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/SkillRequirement.java @@ -26,6 +26,7 @@ package net.runelite.client.plugins.achievementdiary; import lombok.Getter; import lombok.RequiredArgsConstructor; +import net.runelite.api.Client; import net.runelite.api.Skill; @RequiredArgsConstructor @@ -40,4 +41,9 @@ public class SkillRequirement implements Requirement { return level + " " + skill.getName(); } + + public boolean satisfiesRequirement(Client client) + { + return client.getRealSkillLevel(skill) >= level; + } } From e129230416652ef149e10caf847c2e2b89562c55 Mon Sep 17 00:00:00 2001 From: Jonathan Charles Date: Wed, 5 Aug 2020 02:55:17 +1000 Subject: [PATCH 30/47] menu swapper: add Advisor Ghrim collect swap --- .../menuentryswapper/MenuEntrySwapperConfig.java | 11 +++++++++++ .../menuentryswapper/MenuEntrySwapperPlugin.java | 1 + 2 files changed, 12 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java index 6ca722c229..91e0686121 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java @@ -562,4 +562,15 @@ public interface MenuEntrySwapperConfig extends Config { return false; } + + @ConfigItem( + keyName = "swapCollectMiscellania", + name = "Miscellania", + description = "Swap Talk-to with Collect for Advisor Ghrim", + section = npcSection + ) + default boolean swapCollectMiscellania() + { + return false; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java index 1ea8ca1383..d5cd30fa88 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java @@ -208,6 +208,7 @@ public class MenuEntrySwapperPlugin extends Plugin swap("talk-to", "enchant", config::swapEnchant); swap("talk-to", "start-minigame", config::swapStartMinigame); swap("talk-to", ESSENCE_MINE_NPCS::contains, "teleport", config::swapEssenceMineTeleport); + swap("talk-to", "collect", config::swapCollectMiscellania); swap("leave tomb", "quick-leave", config::swapQuickLeave); swap("tomb door", "quick-leave", config::swapQuickLeave); From 73b73a84c50eae77898f8988a00f20d66e6c280d Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Tue, 4 Aug 2020 21:07:34 -0700 Subject: [PATCH 31/47] HotColdLocation: Center some location spots Center some hot-cold locations as reported and verified from the mega issue. Ref: runelite/runelite#9601 --- .../cluescrolls/clues/hotcold/HotColdLocation.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/hotcold/HotColdLocation.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/hotcold/HotColdLocation.java index 4aeb73a6e5..4352e6c2b8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/hotcold/HotColdLocation.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/hotcold/HotColdLocation.java @@ -64,7 +64,7 @@ public enum HotColdLocation ASGARNIA_MUDSKIPPER(new WorldPoint(2987, 3110, 0), ASGARNIA, "Mudskipper Point, near the starfish in the south-west corner.", BRASSICAN_MAGE), ASGARNIA_TROLL(new WorldPoint(2910, 3616, 0), ASGARNIA, "The Troll arena, where the player fights Dad during the Troll Stronghold quest. Bring climbing boots if travelling from Burthorpe.", BRASSICAN_MAGE), DESERT_GENIE(new WorldPoint(3359, 2912, 0), DESERT, "West of Nardah genie cave.", BRASSICAN_MAGE), - DESERT_ALKHARID_MINE(new WorldPoint(3282, 3270, 0), DESERT, "West of Al Kharid mine.", BRASSICAN_MAGE), + DESERT_ALKHARID_MINE(new WorldPoint(3279, 3263, 0), DESERT, "West of Al Kharid mine.", BRASSICAN_MAGE), DESERT_MENAPHOS_GATE(new WorldPoint(3223, 2820, 0), DESERT, "North of Menaphos gate.", BRASSICAN_MAGE), DESERT_BEDABIN_CAMP(new WorldPoint(3164, 3050, 0), DESERT, "Bedabin Camp, dig around the north tent.", BRASSICAN_MAGE), DESERT_UZER(new WorldPoint(3432, 3105, 0), DESERT, "West of Uzer.", BRASSICAN_MAGE), @@ -111,7 +111,7 @@ public enum HotColdLocation KANDARIN_WEST_ARDY(new WorldPoint(2535, 3322, 0), KANDARIN, "West Ardougne, near the staircase outside the Civic Office.", BRASSICAN_MAGE), KANDARIN_SW_TREE_GNOME_STRONGHOLD(new WorldPoint(2411, 3429, 0), KANDARIN, "South-west Tree Gnome Stronghold", BRASSICAN_MAGE), KANDARIN_OUTPOST(new WorldPoint(2457, 3362, 0), KANDARIN, "South of the Tree Gnome Stronghold, north-east of the Outpost.", BRASSICAN_MAGE), - KANDARIN_BAXTORIAN_FALLS(new WorldPoint(2534, 3479, 0), KANDARIN, "South-east of Almera's house on Baxtorian Falls.", BRASSICAN_MAGE), + KANDARIN_BAXTORIAN_FALLS(new WorldPoint(2530, 3477, 0), KANDARIN, "South-east of Almera's house on Baxtorian Falls.", BRASSICAN_MAGE), KANDARIN_BA_AGILITY_COURSE(new WorldPoint(2540, 3548, 0), KANDARIN, "Inside the Barbarian Agility Course. Completion of Alfred Grimhand's Barcrawl is required.", BRASSICAN_MAGE), KARAMJA_MUSA_POINT(new WorldPoint(2913, 3169, 0), KARAMJA, "Musa Point, banana plantation.", BRASSICAN_MAGE), KARAMJA_BRIMHAVEN_FRUIT_TREE(new WorldPoint(2782, 3215, 0), KARAMJA, "Brimhaven, east of the fruit tree patch.", BRASSICAN_MAGE), @@ -135,7 +135,7 @@ public enum HotColdLocation MORYTANIA_HAUNTED_MINE(new WorldPoint(3444, 3255, 0), MORYTANIA, "At Haunted Mine quest start.", BRASSICAN_MAGE), MORYTANIA_MAUSOLEUM(new WorldPoint(3499, 3539, 0), MORYTANIA, "South of the Mausoleum.", BRASSICAN_MAGE), MORYTANIA_MOS_LES_HARMLESS(new WorldPoint(3740, 3041, 0), MORYTANIA, "Northern area of Mos Le'Harmless, between the lakes.", BRASSICAN_MAGE), - MORYTANIA_MOS_LES_HARMLESS_BAR(new WorldPoint(3670, 2974, 0), MORYTANIA, "Near Mos Le'Harmless southern bar.", BRASSICAN_MAGE), + MORYTANIA_MOS_LES_HARMLESS_BAR(new WorldPoint(3674, 2971, 0), MORYTANIA, "Near Mos Le'Harmless southern bar.", BRASSICAN_MAGE), MORYTANIA_DRAGONTOOTH_NORTH(new WorldPoint(3811, 3569, 0), MORYTANIA, "Northern part of Dragontooth Island.", BRASSICAN_MAGE), MORYTANIA_DRAGONTOOTH_SOUTH(new WorldPoint(3803, 3532, 0), MORYTANIA, "Southern part of Dragontooth Island.", BRASSICAN_MAGE), MORYTANIA_SLEPE_TENTS(new WorldPoint(3769, 3383, 0), MORYTANIA, "North-east of Slepe, near the tents.", BRASSICAN_MAGE), @@ -155,10 +155,10 @@ public enum HotColdLocation WILDERNESS_27(new WorldPoint(3174, 3736, 0), WILDERNESS, "Inside the Ruins north of the Graveyard of Shadows, level 27 Wilderness.", BRASSICAN_MAGE), WILDERNESS_28(new WorldPoint(3377, 3737, 0), WILDERNESS, "East of Venenatis' nest, level 28 Wilderness.", BRASSICAN_MAGE), WILDERNESS_32(new WorldPoint(3311, 3773, 0), WILDERNESS, "North of Venenatis' nest, level 32 Wilderness.", ANCIENT_WIZARDS), - WILDERNESS_35(new WorldPoint(3153, 3795, 0), WILDERNESS, "East of the Wilderness canoe exit, level 35 Wilderness.", BRASSICAN_OR_WIZARDS), + WILDERNESS_35(new WorldPoint(3152, 3796, 0), WILDERNESS, "East of the Wilderness canoe exit, level 35 Wilderness.", BRASSICAN_OR_WIZARDS), WILDERNESS_37(new WorldPoint(2974, 3814, 0), WILDERNESS, "South-east of the Chaos Temple, level 37 Wilderness.", BRASSICAN_MAGE), WILDERNESS_38(new WorldPoint(3293, 3813, 0), WILDERNESS, "South of Callisto, level 38 Wilderness.", ANCIENT_WIZARDS), - WILDERNESS_49(new WorldPoint(3140, 3910, 0), WILDERNESS, "South-west of the Deserted Keep, level 49 Wilderness.", BRASSICAN_MAGE), + WILDERNESS_49(new WorldPoint(3136, 3914, 0), WILDERNESS, "South-west of the Deserted Keep, level 49 Wilderness.", BRASSICAN_MAGE), WILDERNESS_54(new WorldPoint(2981, 3944, 0), WILDERNESS, "West of the Wilderness Agility Course, level 54 Wilderness.", BRASSICAN_MAGE), ZEAH_BLASTMINE_BANK(new WorldPoint(1504, 3859, 0), ZEAH, "Next to the bank in the Lovakengj blast mine.", BRASSICAN_MAGE), ZEAH_BLASTMINE_NORTH(new WorldPoint(1488, 3881, 0), ZEAH, "Northern part of the Lovakengj blast mine.", BRASSICAN_MAGE), @@ -172,7 +172,7 @@ public enum HotColdLocation ZEAH_SHAYZIEN_BANK_2(new WorldPoint(1491, 3623, 0), ZEAH, "North-west of the bank in Shayzien.", ANCIENT_WIZARDS), ZEAH_LIBRARY(new WorldPoint(1603, 3843, 0), ZEAH, "North-west of the Arceuus Library.", BRASSICAN_MAGE), ZEAH_HOUSECHURCH(new WorldPoint(1682, 3792, 0), ZEAH, "By the entrance to the Arceuus church.", ANCIENT_WIZARDS), - ZEAH_DARK_ALTAR(new WorldPoint(1699, 3879, 0), ZEAH, "West of the Dark Altar.", BRASSICAN_MAGE), + ZEAH_DARK_ALTAR(new WorldPoint(1698, 3881, 0), ZEAH, "West of the Dark Altar.", BRASSICAN_MAGE), ZEAH_ARCEUUS_HOUSE(new WorldPoint(1710, 3700, 0), ZEAH, "By the southern entrance to Arceuus.", ANCIENT_WIZARDS), ZEAH_ESSENCE_MINE(new WorldPoint(1762, 3852, 0), ZEAH, "By the Arceuus essence mine.", BRASSICAN_MAGE), ZEAH_ESSENCE_MINE_NE(new WorldPoint(1773, 3867, 0), ZEAH, "North-east of the Arceuus essence mine.", BRASSICAN_MAGE), From 0e4ef402e1456b64049055f6df7223644c965125 Mon Sep 17 00:00:00 2001 From: Chris Janusiewicz Date: Fri, 26 Jun 2020 21:59:45 +0100 Subject: [PATCH 32/47] nmz plugin: add option to send overload notification prior to expire Co-authored-by: Adam --- .../nightmarezone/NightmareZoneConfig.java | 26 +++++++++++--- .../nightmarezone/NightmareZonePlugin.java | 35 +++++++++++++++++-- 2 files changed, 54 insertions(+), 7 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/nightmarezone/NightmareZoneConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/nightmarezone/NightmareZoneConfig.java index 227ccf4066..d808a21abf 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/nightmarezone/NightmareZoneConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/nightmarezone/NightmareZoneConfig.java @@ -28,6 +28,8 @@ import java.awt.Color; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; +import net.runelite.client.config.Range; +import net.runelite.client.config.Units; @ConfigGroup("nightmareZone") public interface NightmareZoneConfig extends Config @@ -98,11 +100,27 @@ public interface NightmareZoneConfig extends Config return true; } + @Range( + min = 0, + max = 300 + ) + @ConfigItem( + keyName = "overloadearlywarningseconds", + name = "Overload early warning", + description = "You will be notified this many seconds before your overload potion expires", + position = 7 + ) + @Units(Units.SECONDS) + default int overloadEarlyWarningSeconds() + { + return 10; + } + @ConfigItem( keyName = "absorptionnotification", name = "Absorption notification", description = "Toggles notifications when your absorption points gets below your threshold", - position = 7 + position = 8 ) default boolean absorptionNotification() { @@ -113,7 +131,7 @@ public interface NightmareZoneConfig extends Config keyName = "absorptionthreshold", name = "Absorption Threshold", description = "The amount of absorption points to send a notification at", - position = 8 + position = 9 ) default int absorptionThreshold() { @@ -124,7 +142,7 @@ public interface NightmareZoneConfig extends Config keyName = "absorptioncoloroverthreshold", name = "Color above threshold", description = "Configures the color for the absorption widget when above the threshold", - position = 9 + position = 10 ) default Color absorptionColorAboveThreshold() { @@ -135,7 +153,7 @@ public interface NightmareZoneConfig extends Config keyName = "absorptioncolorbelowthreshold", name = "Color below threshold", description = "Configures the color for the absorption widget when below the threshold", - position = 10 + position = 11 ) default Color absorptionColorBelowThreshold() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/nightmarezone/NightmareZonePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/nightmarezone/NightmareZonePlugin.java index d683ec78a4..a471f5b241 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/nightmarezone/NightmareZonePlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/nightmarezone/NightmareZonePlugin.java @@ -55,6 +55,7 @@ public class NightmareZonePlugin extends Plugin { private static final int[] NMZ_MAP_REGION = {9033}; private static final Duration HOUR = Duration.ofHours(1); + private static final Duration OVERLOAD_DURATION = Duration.ofMinutes(5); @Inject private Notifier notifier; @@ -73,18 +74,22 @@ public class NightmareZonePlugin extends Plugin @Getter private int pointsPerHour; - + private Instant nmzSessionStartTime; // This starts as true since you need to get // above the threshold before sending notifications private boolean absorptionNotificationSend = true; + private boolean overloadNotificationSend = false; + private Instant lastOverload; @Override protected void startUp() throws Exception { overlayManager.add(overlay); overlay.removeAbsorptionCounter(); + + overloadNotificationSend = false; } @Override @@ -138,6 +143,11 @@ public class NightmareZonePlugin extends Plugin checkAbsorption(); } + if (overloadNotificationSend && config.overloadNotification() && config.overloadEarlyWarningSeconds() > 0) + { + checkOverload(); + } + if (config.moveOverlay()) { pointsPerHour = calculatePointsPerHour(); @@ -147,8 +157,9 @@ public class NightmareZonePlugin extends Plugin @Subscribe public void onChatMessage(ChatMessage event) { - if (event.getType() != ChatMessageType.GAMEMESSAGE - || !isInNightmareZone()) + if (!isInNightmareZone() + || (event.getType() != ChatMessageType.GAMEMESSAGE + && event.getType() != ChatMessageType.SPAM)) { return; } @@ -156,6 +167,9 @@ public class NightmareZonePlugin extends Plugin String msg = Text.removeTags(event.getMessage()); //remove color if (msg.contains("The effects of overload have worn off, and you feel normal again.")) { + // Prevents notification from being sent after overload expiry, if the user disables and re-enables warnings + overloadNotificationSend = false; + if (config.overloadNotification()) { notifier.notify("Your overload has worn off"); @@ -192,6 +206,21 @@ public class NightmareZonePlugin extends Plugin } } } + else if (msg.contains("You drink some of your overload potion.")) + { + lastOverload = Instant.now(); // Save time of last overload + overloadNotificationSend = true; // Queue up a overload notification once time threshold is reached + } + } + + private void checkOverload() + { + if (Instant.now().isAfter(lastOverload.plus(OVERLOAD_DURATION). + minus(Duration.ofSeconds(config.overloadEarlyWarningSeconds())))) + { + notifier.notify("Your overload potion is about to expire!"); + overloadNotificationSend = false; + } } private void checkAbsorption() From 301156678e7e8341407b9ef127ad832e90960caa Mon Sep 17 00:00:00 2001 From: SirGirion Date: Thu, 6 Aug 2020 03:38:21 -0400 Subject: [PATCH 33/47] loottracker: Add bird nest loot tracking (#12237) --- .../client/plugins/loottracker/LootTrackerPlugin.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java index de4f6c1ed7..b862cff408 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java @@ -188,6 +188,9 @@ public class LootTrackerPlugin extends Plugin private static final Pattern PICKPOCKET_REGEX = Pattern.compile("You pick (the )?(?.+)'s? pocket.*"); + private static final String BIRDNEST_EVENT = "Bird nest"; + private static final Set BIRDNEST_IDS = ImmutableSet.of(ItemID.BIRD_NEST, ItemID.BIRD_NEST_5071, ItemID.BIRD_NEST_5072, ItemID.BIRD_NEST_5073, ItemID.BIRD_NEST_5074, ItemID.BIRD_NEST_7413, ItemID.BIRD_NEST_13653, ItemID.BIRD_NEST_22798, ItemID.BIRD_NEST_22800); + /* * This map is used when a pickpocket target has a different name in the chat message than their in-game name. * Note that if the two NPCs can be found in the same place, there is a chance of race conditions @@ -715,6 +718,7 @@ public class LootTrackerPlugin extends Plugin || HESPORI_EVENT.equals(eventType) || SEEDPACK_EVENT.equals(eventType) || CASKET_EVENT.equals(eventType) + || BIRDNEST_EVENT.equals(eventType) || lootRecordType == LootRecordType.PICKPOCKET) { WorldPoint playerLocation = client.getLocalPlayer().getWorldLocation(); @@ -750,6 +754,13 @@ public class LootTrackerPlugin extends Plugin takeInventorySnapshot(); } + if (event.getMenuOption().equals("Search") && BIRDNEST_IDS.contains(event.getId())) + { + eventType = BIRDNEST_EVENT; + lootRecordType = LootRecordType.EVENT; + takeInventorySnapshot(); + } + if (event.getMenuOption().equals("Open") && event.getId() == ItemID.CASKET) { eventType = CASKET_EVENT; From 1e0800cea75c2db2e14d8081bf9971cfa6b909f1 Mon Sep 17 00:00:00 2001 From: LazyScaper <40252392+JamblaInc@users.noreply.github.com> Date: Thu, 6 Aug 2020 08:39:48 +0100 Subject: [PATCH 34/47] worldmap: Fix Misthalin mystery quest icon position (#12273) --- .../runelite/client/plugins/worldmap/QuestStartLocation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartLocation.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartLocation.java index 90e95f75e5..f12513b991 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartLocation.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartLocation.java @@ -43,7 +43,7 @@ enum QuestStartLocation GOBLIN_DIPLOMACY(Quest.GOBLIN_DIPLOMACY, new WorldPoint(2957, 3509, 0)), IMP_CATCHER(Quest.IMP_CATCHER, new WorldPoint(3108, 3160, 0)), THE_KNIGHTS_SWORD(Quest.THE_KNIGHTS_SWORD, new WorldPoint(2976, 3342, 0)), - MISTHALIN_MYSTERY(Quest.MISTHALIN_MYSTERY, new WorldPoint(3234, 3155, 0)), + MISTHALIN_MYSTERY(Quest.MISTHALIN_MYSTERY, new WorldPoint(3235, 3155, 0)), PIRATES_TREASURE(Quest.PIRATES_TREASURE, new WorldPoint(3051, 3252, 0)), PRINCE_ALI_RESCUE(Quest.PRINCE_ALI_RESCUE, new WorldPoint(3301, 3163, 0)), THE_RESTLESS_GHOST(Quest.THE_RESTLESS_GHOST, new WorldPoint(3240, 3210, 0)), From e4a29e7d69108a6dcfc7c3ebbcba784677845284 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 6 Aug 2020 10:32:40 +0000 Subject: [PATCH 35/47] Update Item IDs to 2020-08-06-rev190 --- runelite-api/src/main/java/net/runelite/api/ItemID.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/ItemID.java b/runelite-api/src/main/java/net/runelite/api/ItemID.java index ca8d2d0c6b..488f07091b 100644 --- a/runelite-api/src/main/java/net/runelite/api/ItemID.java +++ b/runelite-api/src/main/java/net/runelite/api/ItemID.java @@ -8159,7 +8159,7 @@ public final class ItemID public static final int HUMAN_EYE = 12843; public static final int VOICE_POTION = 12844; public static final int GRIM_REAPER_HOOD = 12845; - public static final int BOUNTY_TELEPORT_SCROLL = 12846; + public static final int TARGET_TELEPORT_SCROLL = 12846; public static final int GRANITE_MAUL_12848 = 12848; public static final int GRANITE_CLAMP = 12849; public static final int AMULET_OF_THE_DAMNED_FULL = 12851; @@ -11319,7 +11319,7 @@ public final class ItemID public static final int BIRTHDAY_CAKE_24331 = 24331; public static final int BIRTHDAY_CAKE_24332 = 24332; public static final int DAGONHAI_ROBES_SET = 24333; - public static final int BOUNTY_TARGET_TELEPORT = 24336; + public static final int TARGET_TELEPORT = 24336; public static final int BOUNTY_HUNTER_HAT_TIER_1 = 24338; public static final int BOUNTY_HUNTER_HAT_TIER_2 = 24340; public static final int BOUNTY_HUNTER_HAT_TIER_3 = 24342; @@ -11587,5 +11587,9 @@ public final class ItemID public static final int SKELETON_MONKEY = 24865; public static final int KRUK_JR = 24866; public static final int PRINCELY_MONKEY = 24867; + public static final int GOLDEN_ARMADYL_SPECIAL_ATTACK = 24868; + public static final int GOLDEN_BANDOS_SPECIAL_ATTACK = 24869; + public static final int GOLDEN_SARADOMIN_SPECIAL_ATTACK = 24870; + public static final int GOLDEN_ZAMORAK_SPECIAL_ATTACK = 24871; /* This file is automatically generated. Do not edit. */ } From 22af685f84374ea27320831a1a46e37459b484cb Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 6 Aug 2020 10:32:41 +0000 Subject: [PATCH 36/47] Update Object IDs to 2020-08-06-rev190 --- .../main/java/net/runelite/api/NullObjectID.java | 14 -------------- .../src/main/java/net/runelite/api/ObjectID.java | 1 - 2 files changed, 15 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/NullObjectID.java b/runelite-api/src/main/java/net/runelite/api/NullObjectID.java index 62d5fa9147..33b1125075 100644 --- a/runelite-api/src/main/java/net/runelite/api/NullObjectID.java +++ b/runelite-api/src/main/java/net/runelite/api/NullObjectID.java @@ -18031,22 +18031,8 @@ public final class NullObjectID public static final int NULL_37430 = 37430; public static final int NULL_37432 = 37432; public static final int NULL_37433 = 37433; - public static final int NULL_37436 = 37436; - public static final int NULL_37437 = 37437; - public static final int NULL_37438 = 37438; public static final int NULL_37439 = 37439; public static final int NULL_37440 = 37440; - public static final int NULL_37446 = 37446; - public static final int NULL_37447 = 37447; - public static final int NULL_37448 = 37448; - public static final int NULL_37449 = 37449; - public static final int NULL_37451 = 37451; - public static final int NULL_37452 = 37452; - public static final int NULL_37453 = 37453; - public static final int NULL_37454 = 37454; - public static final int NULL_37455 = 37455; - public static final int NULL_37456 = 37456; - public static final int NULL_37457 = 37457; public static final int NULL_37467 = 37467; public static final int NULL_37468 = 37468; public static final int NULL_37469 = 37469; diff --git a/runelite-api/src/main/java/net/runelite/api/ObjectID.java b/runelite-api/src/main/java/net/runelite/api/ObjectID.java index 8900b0cc44..5f7d2f6fa3 100644 --- a/runelite-api/src/main/java/net/runelite/api/ObjectID.java +++ b/runelite-api/src/main/java/net/runelite/api/ObjectID.java @@ -19396,7 +19396,6 @@ public final class ObjectID public static final int DECORATIVE_WINDOW_37442 = 37442; public static final int STAINEDGLASS_WINDOW_37443 = 37443; public static final int LOG_PILE_37444 = 37444; - public static final int HOTSPOT_MARKER = 37445; public static final int DECORATIVE_WINDOW_37450 = 37450; public static final int STAINEDGLASS_WINDOW_37458 = 37458; public static final int DECORATIVE_WINDOW_37459 = 37459; From ba065ac529a7df9d2976255b83e344d0bfd6b798 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 6 Aug 2020 10:32:44 +0000 Subject: [PATCH 37/47] Update Widget IDs to 2020-08-06-rev190 --- .../src/main/java/net/runelite/api/widgets/WidgetID.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java index 3861e3c9a0..6551e1799d 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java @@ -790,10 +790,10 @@ public class WidgetID static class Pvp { static final int BOUNTY_HUNTER_INFO = 6; - static final int KILLDEATH_RATIO = 34; - static final int SKULL_CONTAINER = 54; - static final int SAFE_ZONE = 56; - static final int WILDERNESS_LEVEL = 59; // this can also be the Deadman Mode "Protection" text + static final int KILLDEATH_RATIO = 28; + static final int SKULL_CONTAINER = 48; + static final int SAFE_ZONE = 50; + static final int WILDERNESS_LEVEL = 53; // this can also be the Deadman Mode "Protection" text } static class KourendFavour From abf66002415d10833bf3f27b9daee93cc5e105cb Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Thu, 6 Aug 2020 11:25:56 +0000 Subject: [PATCH 38/47] Release 1.6.24 --- cache-client/pom.xml | 2 +- cache-updater/pom.xml | 2 +- cache/pom.xml | 2 +- http-api/pom.xml | 2 +- http-service/pom.xml | 2 +- pom.xml | 4 ++-- runelite-api/pom.xml | 2 +- runelite-client/pom.xml | 2 +- runelite-script-assembler-plugin/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cache-client/pom.xml b/cache-client/pom.xml index 88c5f98a0c..356c4cec43 100644 --- a/cache-client/pom.xml +++ b/cache-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.24-SNAPSHOT + 1.6.24 cache-client diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml index ac9a3650e8..9369b51068 100644 --- a/cache-updater/pom.xml +++ b/cache-updater/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.6.24-SNAPSHOT + 1.6.24 Cache Updater diff --git a/cache/pom.xml b/cache/pom.xml index 77b23b0d54..f471ba2be9 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.24-SNAPSHOT + 1.6.24 cache diff --git a/http-api/pom.xml b/http-api/pom.xml index f22fb557fa..9a68e878f2 100644 --- a/http-api/pom.xml +++ b/http-api/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.6.24-SNAPSHOT + 1.6.24 Web API diff --git a/http-service/pom.xml b/http-service/pom.xml index 91ce0def99..5eadb0d5bd 100644 --- a/http-service/pom.xml +++ b/http-service/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.6.24-SNAPSHOT + 1.6.24 Web Service diff --git a/pom.xml b/pom.xml index ee14d96b77..c767026181 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.6.24-SNAPSHOT + 1.6.24 pom RuneLite @@ -61,7 +61,7 @@ https://github.com/runelite/runelite scm:git:git://github.com/runelite/runelite scm:git:git@github.com:runelite/runelite - HEAD + runelite-parent-1.6.24 diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index 923bc0603b..d9d67371b6 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.24-SNAPSHOT + 1.6.24 runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index 3197781803..e2e2fe28c3 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.24-SNAPSHOT + 1.6.24 client diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index 4f115daccc..835b184615 100644 --- a/runelite-script-assembler-plugin/pom.xml +++ b/runelite-script-assembler-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.24-SNAPSHOT + 1.6.24 script-assembler-plugin From 7d94e5b839e5addc780dc1715f1cd8bbe0a49d57 Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Thu, 6 Aug 2020 11:26:05 +0000 Subject: [PATCH 39/47] Bump for 1.6.25-SNAPSHOT --- cache-client/pom.xml | 2 +- cache-updater/pom.xml | 2 +- cache/pom.xml | 2 +- http-api/pom.xml | 2 +- http-service/pom.xml | 2 +- pom.xml | 4 ++-- runelite-api/pom.xml | 2 +- runelite-client/pom.xml | 2 +- runelite-script-assembler-plugin/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cache-client/pom.xml b/cache-client/pom.xml index 356c4cec43..11c1d129aa 100644 --- a/cache-client/pom.xml +++ b/cache-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.24 + 1.6.25-SNAPSHOT cache-client diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml index 9369b51068..a8c6a1013b 100644 --- a/cache-updater/pom.xml +++ b/cache-updater/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.6.24 + 1.6.25-SNAPSHOT Cache Updater diff --git a/cache/pom.xml b/cache/pom.xml index f471ba2be9..c2b6d59de9 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.24 + 1.6.25-SNAPSHOT cache diff --git a/http-api/pom.xml b/http-api/pom.xml index 9a68e878f2..5c952e55a0 100644 --- a/http-api/pom.xml +++ b/http-api/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.6.24 + 1.6.25-SNAPSHOT Web API diff --git a/http-service/pom.xml b/http-service/pom.xml index 5eadb0d5bd..2fcd1e27a6 100644 --- a/http-service/pom.xml +++ b/http-service/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.6.24 + 1.6.25-SNAPSHOT Web Service diff --git a/pom.xml b/pom.xml index c767026181..986b24d4f8 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.6.24 + 1.6.25-SNAPSHOT pom RuneLite @@ -61,7 +61,7 @@ https://github.com/runelite/runelite scm:git:git://github.com/runelite/runelite scm:git:git@github.com:runelite/runelite - runelite-parent-1.6.24 + HEAD diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index d9d67371b6..7196fc8429 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.24 + 1.6.25-SNAPSHOT runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index e2e2fe28c3..4944eda5db 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.24 + 1.6.25-SNAPSHOT client diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index 835b184615..6f9d7f3734 100644 --- a/runelite-script-assembler-plugin/pom.xml +++ b/runelite-script-assembler-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.24 + 1.6.25-SNAPSHOT script-assembler-plugin From ae509dc42e465fb5f1a2f0758be079321e207d5a Mon Sep 17 00:00:00 2001 From: Erik Humphrey Date: Thu, 6 Aug 2020 17:50:34 -0400 Subject: [PATCH 40/47] clues: Fix 'Headbang at the exam centre' clue text (#12297) --- .../runelite/client/plugins/cluescrolls/clues/EmoteClue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java index c98af144a1..37453ba3df 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java @@ -118,7 +118,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu new EmoteClue("Dance at the entrance to the Grand Exchange. Equip a pink skirt, pink robe top and a body tiara.", "Grand Exchange", SOUTH_OF_THE_GRAND_EXCHANGE, new WorldPoint(3165, 3467, 0), DANCE, item(PINK_SKIRT), item(PINK_ROBE_TOP), item(BODY_TIARA)), new EmoteClue("Goblin Salute in the Goblin Village. Beware of double agents! Equip a bandos godsword, a bandos cloak and a bandos platebody.", "Goblin Village", OUTSIDE_MUDKNUCKLES_HUT, new WorldPoint(2956, 3505, 0), DOUBLE_AGENT_141, GOBLIN_SALUTE, item(BANDOS_PLATEBODY), item(BANDOS_CLOAK), any("Bandos godsword", item(BANDOS_GODSWORD), item(BANDOS_GODSWORD_OR))), new EmoteClue("Headbang in the mine north of Al Kharid. Equip a desert shirt, leather gloves and leather boots.", "Al Kharid mine", AL_KHARID_SCORPION_MINE, new WorldPoint(3299, 3289, 0), HEADBANG, item(DESERT_SHIRT), item(LEATHER_GLOVES), item(LEATHER_BOOTS)), - new EmoteClue("Headbang at the exam center. Beware of double agents! Equip a mystic fire staff, a diamond bracelet and rune boots.", "Exam Centre", INSIDE_THE_DIGSITE_EXAM_CENTRE, new WorldPoint(3362, 3340, 0), DOUBLE_AGENT_108, HEADBANG, item(MYSTIC_FIRE_STAFF), item(DIAMOND_BRACELET), item(RUNE_BOOTS)), + new EmoteClue("Headbang at the exam centre. Beware of double agents! Equip a mystic fire staff, a diamond bracelet and rune boots.", "Exam Centre", INSIDE_THE_DIGSITE_EXAM_CENTRE, new WorldPoint(3362, 3340, 0), DOUBLE_AGENT_108, HEADBANG, item(MYSTIC_FIRE_STAFF), item(DIAMOND_BRACELET), item(RUNE_BOOTS)), new EmoteClue("Headbang at the top of Slayer Tower. Equip a seercull, a combat bracelet and helm of Neitiznot.", "Slayer Tower", OUTSIDE_THE_SLAYER_TOWER_GARGOYLE_ROOM, new WorldPoint(3421, 3537, 2), HEADBANG, item(SEERCULL), range("Combat bracelet", COMBAT_BRACELET4, COMBAT_BRACELET), item(HELM_OF_NEITIZNOT)), new EmoteClue("Dance a jig by the entrance to the Fishing Guild. Equip an emerald ring, a sapphire amulet, and a bronze chain body.", "Fishing Guild", OUTSIDE_THE_FISHING_GUILD, new WorldPoint(2610, 3391, 0), JIG, item(EMERALD_RING), item(SAPPHIRE_AMULET), item(BRONZE_CHAINBODY)), new EmoteClue("Dance a jig under Shantay's Awning. Bow before you talk to me. Equip a pointed blue snail helmet, an air staff and a bronze square shield.", "Shantay Pass", SHANTAY_PASS, new WorldPoint(3304, 3124, 0), JIG, BOW, any("Bruise blue snelm (pointed)", item(BRUISE_BLUE_SNELM_3343)), item(STAFF_OF_AIR), item(BRONZE_SQ_SHIELD)), From 4fbe77096ca14fe8744387d76ff079e523789c26 Mon Sep 17 00:00:00 2001 From: Meeran <60132509+MeeranB@users.noreply.github.com> Date: Fri, 7 Aug 2020 08:41:34 +0100 Subject: [PATCH 41/47] ItemMapping: Add Bryophyta's staff (#12286) --- .../src/main/java/net/runelite/client/game/ItemMapping.java | 1 + 1 file changed, 1 insertion(+) diff --git a/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java b/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java index 9592eabfcc..c9ab54f86e 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java +++ b/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java @@ -188,6 +188,7 @@ public enum ItemMapping ITEM_CRAWS_BOW(CRAWS_BOW_U, CRAWS_BOW), ITEM_VIGGORAS_CHAINMACE(VIGGORAS_CHAINMACE_U, VIGGORAS_CHAINMACE), ITEM_THAMMARONS_SCEPTRE(THAMMARONS_SCEPTRE_U, THAMMARONS_SCEPTRE), + ITEM_BRYOPHYTAS_STAFF(BRYOPHYTAS_STAFF_UNCHARGED, BRYOPHYTAS_STAFF), // Infinity colour kits ITEM_INFINITY_TOP(INFINITY_TOP, INFINITY_TOP_10605, INFINITY_TOP_20574, DARK_INFINITY_TOP, LIGHT_INFINITY_TOP), From a57721b41a0af670eb0a4ccfec072cf00bbbe0de Mon Sep 17 00:00:00 2001 From: Meeran <60132509+MeeranB@users.noreply.github.com> Date: Fri, 7 Aug 2020 00:43:18 -0700 Subject: [PATCH 42/47] ItemMapping: Add Ring of endurance --- .../src/main/java/net/runelite/client/game/ItemMapping.java | 1 + 1 file changed, 1 insertion(+) diff --git a/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java b/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java index c9ab54f86e..54b77640b9 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java +++ b/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java @@ -189,6 +189,7 @@ public enum ItemMapping ITEM_VIGGORAS_CHAINMACE(VIGGORAS_CHAINMACE_U, VIGGORAS_CHAINMACE), ITEM_THAMMARONS_SCEPTRE(THAMMARONS_SCEPTRE_U, THAMMARONS_SCEPTRE), ITEM_BRYOPHYTAS_STAFF(BRYOPHYTAS_STAFF_UNCHARGED, BRYOPHYTAS_STAFF), + ITEM_RING_OF_ENDURANCE(RING_OF_ENDURANCE_UNCHARGED, RING_OF_ENDURANCE), // Infinity colour kits ITEM_INFINITY_TOP(INFINITY_TOP, INFINITY_TOP_10605, INFINITY_TOP_20574, DARK_INFINITY_TOP, LIGHT_INFINITY_TOP), From b16b3a8017970c7336b6e21132e97e5f99213254 Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Thu, 6 Aug 2020 21:39:29 -0700 Subject: [PATCH 43/47] slayer: Fix slaughter bracelet proc text After the 2020-08-06 game update[1] the Bracelet of slaughter gives a slightly different text than before. This commit updates the slayer plugin to identify that new text. [1]: https://secure.runescape.com/m=news/pvp-changes?oldschool=1 --- .../net/runelite/client/plugins/slayer/SlayerPlugin.java | 2 +- .../runelite/client/plugins/slayer/SlayerPluginTest.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/slayer/SlayerPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/slayer/SlayerPlugin.java index 2b232a10f8..d2ecc8b0f1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/slayer/SlayerPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/slayer/SlayerPlugin.java @@ -105,7 +105,7 @@ public class SlayerPlugin extends Plugin private static final String CHAT_CANCEL_MESSAGE_ZUK = "You no longer have a slayer task as you left the Inferno."; private static final String CHAT_SUPERIOR_MESSAGE = "A superior foe has appeared..."; private static final String CHAT_BRACELET_SLAUGHTER = "Your bracelet of slaughter prevents your slayer"; - private static final Pattern CHAT_BRACELET_SLAUGHTER_REGEX = Pattern.compile("Your bracelet of slaughter prevents your slayer count decreasing. It has (\\d{1,2}) charge[s]? left."); + private static final Pattern CHAT_BRACELET_SLAUGHTER_REGEX = Pattern.compile("Your bracelet of slaughter prevents your slayer count from decreasing. It has (\\d{1,2}) charge[s]? left."); private static final String CHAT_BRACELET_EXPEDITIOUS = "Your expeditious bracelet helps you progress your"; private static final Pattern CHAT_BRACELET_EXPEDITIOUS_REGEX = Pattern.compile("Your expeditious bracelet helps you progress your slayer (?:task )?faster. It has (\\d{1,2}) charge[s]? left."); private static final String CHAT_BRACELET_SLAUGHTER_CHARGE = "Your bracelet of slaughter has "; diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/slayer/SlayerPluginTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/slayer/SlayerPluginTest.java index b217518d0f..82c529464f 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/slayer/SlayerPluginTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/slayer/SlayerPluginTest.java @@ -111,13 +111,13 @@ public class SlayerPluginTest private static final String SUPERIOR_MESSAGE = "A superior foe has appeared..."; - private static final String BRACLET_SLAUGHTER = "Your bracelet of slaughter prevents your slayer count decreasing. It has 9 charges left."; + private static final String BRACLET_SLAUGHTER = "Your bracelet of slaughter prevents your slayer count from decreasing. It has 9 charges left."; private static final String BRACLET_EXPEDITIOUS = "Your expeditious bracelet helps you progress your slayer task faster. It has 9 charges left."; - private static final String BRACLET_SLAUGHTER_V2 = "Your bracelet of slaughter prevents your slayer count decreasing. It has 1 charge left."; + private static final String BRACLET_SLAUGHTER_V2 = "Your bracelet of slaughter prevents your slayer count from decreasing. It has 1 charge left."; private static final String BRACLET_EXPEDITIOUS_V2 = "Your expeditious bracelet helps you progress your slayer faster. It has 1 charge left."; - private static final String BRACLET_SLAUGHTER_V3 = "Your bracelet of slaughter prevents your slayer count decreasing. It then crumbles to dust."; + private static final String BRACLET_SLAUGHTER_V3 = "Your bracelet of slaughter prevents your slayer count from decreasing. It then crumbles to dust."; private static final String BRACLET_EXPEDITIOUS_V3 = "Your expeditious bracelet helps you progress your slayer faster. It then crumbles to dust."; private static final String CHAT_BRACELET_SLAUGHTER_CHARGE = "Your bracelet of slaughter has 12 charges left."; From 7affadcf503ef224bed13d477ef4e0c56f23df10 Mon Sep 17 00:00:00 2001 From: leejt Date: Tue, 9 Jun 2020 00:02:23 -0700 Subject: [PATCH 44/47] loot tracker: track grubby, stone, Dorgesh-Kaan and HAM chests The Dorgesh-Kaan tracking could be done better (there are actually 4 distinct drop tables) but it's hard to do this without significantly complicating the code. --- .../loottracker/LootTrackerPlugin.java | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java index b862cff408..0d0462e4a1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java @@ -144,6 +144,11 @@ public class LootTrackerPlugin extends Plugin // Chest loot handling private static final String CHEST_LOOTED_MESSAGE = "You find some treasure in the chest!"; private static final Pattern LARRAN_LOOTED_PATTERN = Pattern.compile("You have opened Larran's (big|small) chest .*"); + private static final String STONE_CHEST_LOOTED_MESSAGE = "You steal some loot from the chest."; + private static final String DORGESH_KAAN_CHEST_LOOTED_MESSAGE = "You find treasure inside!"; + private static final String GRUBBY_CHEST_LOOTED_MESSAGE = "You unlock the chest with your key."; + private static final Pattern HAM_CHEST_LOOTED_PATTERN = Pattern.compile("Your (?[a-z]+) key breaks in the lock.*"); + private static final int HAM_STOREROOM_REGION = 10321; private static final Map CHEST_EVENT_TYPES = new ImmutableMap.Builder(). put(5179, "Brimstone Chest"). put(11573, "Crystal Chest"). @@ -151,6 +156,10 @@ public class LootTrackerPlugin extends Plugin put(12127, "The Gauntlet"). put(13113, "Larran's small chest"). put(13151, "Elven Crystal Chest"). + put(5277, "Stone chest"). + put(10835, "Dorgesh-Kaan Chest"). + put(10834, "Dorgesh-Kaan Chest"). + put(7323, "Grubby Chest"). build(); // Shade chest loot handling @@ -593,7 +602,9 @@ public class LootTrackerPlugin extends Plugin final String message = event.getMessage(); - if (message.equals(CHEST_LOOTED_MESSAGE) || LARRAN_LOOTED_PATTERN.matcher(message).matches()) + if (message.equals(CHEST_LOOTED_MESSAGE) || message.equals(STONE_CHEST_LOOTED_MESSAGE) + || message.equals(DORGESH_KAAN_CHEST_LOOTED_MESSAGE) || message.equals(GRUBBY_CHEST_LOOTED_MESSAGE) + || LARRAN_LOOTED_PATTERN.matcher(message).matches()) { final int regionID = client.getLocalPlayer().getWorldLocation().getRegionID(); if (!CHEST_EVENT_TYPES.containsKey(regionID)) @@ -639,6 +650,16 @@ public class LootTrackerPlugin extends Plugin return; } + final Matcher hamStoreroomMatcher = HAM_CHEST_LOOTED_PATTERN.matcher(message); + if (hamStoreroomMatcher.matches() && regionID == HAM_STOREROOM_REGION) + { + String keyType = hamStoreroomMatcher.group("key"); + eventType = String.format("H.A.M. chest (%s)", keyType); + lootRecordType = LootRecordType.EVENT; + takeInventorySnapshot(); + return; + } + final Matcher pickpocketMatcher = PICKPOCKET_REGEX.matcher(message); if (pickpocketMatcher.matches()) { @@ -706,7 +727,8 @@ public class LootTrackerPlugin extends Plugin @Subscribe public void onItemContainerChanged(ItemContainerChanged event) { - if (event.getContainerId() != InventoryID.INVENTORY.getId()) + if (event.getContainerId() != InventoryID.INVENTORY.getId() + || eventType == null) { return; } @@ -719,6 +741,7 @@ public class LootTrackerPlugin extends Plugin || SEEDPACK_EVENT.equals(eventType) || CASKET_EVENT.equals(eventType) || BIRDNEST_EVENT.equals(eventType) + || eventType.startsWith("H.A.M. chest") || lootRecordType == LootRecordType.PICKPOCKET) { WorldPoint playerLocation = client.getLocalPlayer().getWorldLocation(); From 18087ca9ccf2ec418d4f33e4136242ca5fa19b19 Mon Sep 17 00:00:00 2001 From: leejt Date: Fri, 7 Aug 2020 14:26:37 -0400 Subject: [PATCH 45/47] loot tracker: add metadata field to loot record This is for tracking miscellaneous data with the loot records, such as npc id and skill levels, for the wiki drop log project. Co-authored-by: Adam --- .../http/api/loottracker/LootRecord.java | 1 + .../loottracker/LootTrackerPlugin.java | 118 +++++++++--------- .../loottracker/LootTrackerPluginTest.java | 12 +- 3 files changed, 69 insertions(+), 62 deletions(-) diff --git a/http-api/src/main/java/net/runelite/http/api/loottracker/LootRecord.java b/http-api/src/main/java/net/runelite/http/api/loottracker/LootRecord.java index fc945220f1..01e180c55b 100644 --- a/http-api/src/main/java/net/runelite/http/api/loottracker/LootRecord.java +++ b/http-api/src/main/java/net/runelite/http/api/loottracker/LootRecord.java @@ -37,6 +37,7 @@ public class LootRecord { private String eventId; private LootRecordType type; + private Object metadata; private Collection drops; private Instant time; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java index 0d0462e4a1..0641f74e44 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java @@ -70,6 +70,7 @@ import net.runelite.api.MessageNode; import net.runelite.api.NPC; import net.runelite.api.ObjectID; import net.runelite.api.Player; +import net.runelite.api.Skill; import net.runelite.api.SpriteID; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.ChatMessage; @@ -256,6 +257,7 @@ public class LootTrackerPlugin extends Plugin String eventType; @VisibleForTesting LootRecordType lootRecordType; + private Object metadata; private boolean chestLooted; private String lastPickpocketTarget; @@ -427,14 +429,14 @@ public class LootTrackerPlugin extends Plugin } } - void addLoot(@NonNull String name, int combatLevel, LootRecordType type, Collection items) + void addLoot(@NonNull String name, int combatLevel, LootRecordType type, Object metadata, Collection items) { final LootTrackerItem[] entries = buildEntries(stack(items)); SwingUtilities.invokeLater(() -> panel.add(name, type, combatLevel, entries)); if (config.saveLoot()) { - LootRecord lootRecord = new LootRecord(name, type, toGameItems(items), Instant.now()); + LootRecord lootRecord = new LootRecord(name, type, metadata, toGameItems(items), Instant.now()); synchronized (queuedLoots) { queuedLoots.add(lootRecord); @@ -452,7 +454,7 @@ public class LootTrackerPlugin extends Plugin final String name = npc.getName(); final int combat = npc.getCombatLevel(); - addLoot(name, combat, LootRecordType.NPC, items); + addLoot(name, combat, LootRecordType.NPC, npc.getId(), items); if (config.npcKillChatMessage()) { @@ -478,7 +480,7 @@ public class LootTrackerPlugin extends Plugin final String name = player.getName(); final int combat = player.getCombatLevel(); - addLoot(name, combat, LootRecordType.PLAYER, items); + addLoot(name, combat, LootRecordType.PLAYER, null, items); if (config.pvpKillChatMessage()) { @@ -489,12 +491,12 @@ public class LootTrackerPlugin extends Plugin @Subscribe public void onWidgetLoaded(WidgetLoaded widgetLoaded) { - final String event; final ItemContainer container; + switch (widgetLoaded.getGroupId()) { case (WidgetID.BARROWS_REWARD_GROUP_ID): - event = "Barrows"; + setEvent(LootRecordType.EVENT, "Barrows"); container = client.getItemContainer(InventoryID.BARROWS_REWARD); break; case (WidgetID.CHAMBERS_OF_XERIC_REWARD_GROUP_ID): @@ -502,7 +504,7 @@ public class LootTrackerPlugin extends Plugin { return; } - event = "Chambers of Xeric"; + setEvent(LootRecordType.EVENT, "Chambers of Xeric"); container = client.getItemContainer(InventoryID.CHAMBERS_OF_XERIC_CHEST); chestLooted = true; break; @@ -516,32 +518,31 @@ public class LootTrackerPlugin extends Plugin { return; } - event = "Theatre of Blood"; + setEvent(LootRecordType.EVENT, "Theatre of Blood"); container = client.getItemContainer(InventoryID.THEATRE_OF_BLOOD_CHEST); chestLooted = true; break; case (WidgetID.CLUE_SCROLL_REWARD_GROUP_ID): // event type should be set via ChatMessage for clue scrolls. // Clue Scrolls use same InventoryID as Barrows - event = eventType; container = client.getItemContainer(InventoryID.BARROWS_REWARD); - if (event == null) + if (eventType == null) { log.debug("Clue scroll reward interface with no event!"); return; } break; case (WidgetID.KINGDOM_GROUP_ID): - event = "Kingdom of Miscellania"; + setEvent(LootRecordType.EVENT, "Kingdom of Miscellania"); container = client.getItemContainer(InventoryID.KINGDOM_OF_MISCELLANIA); break; case (WidgetID.FISHING_TRAWLER_REWARD_GROUP_ID): - event = "Fishing Trawler"; + setEvent(LootRecordType.EVENT, "Fishing Trawler", client.getBoostedSkillLevel(Skill.FISHING)); container = client.getItemContainer(InventoryID.FISHING_TRAWLER_REWARD); break; case (WidgetID.DRIFT_NET_FISHING_REWARD_GROUP_ID): - event = "Drift Net"; + setEvent(LootRecordType.EVENT, "Drift Net", client.getBoostedSkillLevel(Skill.FISHING)); container = client.getItemContainer(InventoryID.DRIFT_NET_FISHING_REWARD); break; default: @@ -559,7 +560,7 @@ public class LootTrackerPlugin extends Plugin .map(item -> new ItemStack(item.getId(), item.getQuantity(), client.getLocalPlayer().getLocalLocation())) .collect(Collectors.toList()); - if (config.showRaidsLootValue() && (event.equals("Theatre of Blood") || event.equals("Chambers of Xeric"))) + if (config.showRaidsLootValue() && (eventType.equals("Theatre of Blood") || eventType.equals("Chambers of Xeric"))) { long totalValue = items.stream() .filter(item -> item.getId() > -1) @@ -585,11 +586,11 @@ public class LootTrackerPlugin extends Plugin if (items.isEmpty()) { - log.debug("No items to find for Event: {} | Container: {}", event, container); + log.debug("No items to find for Event: {} | Container: {}", eventType, container); return; } - addLoot(event, -1, LootRecordType.EVENT, items); + addLoot(eventType, -1, lootRecordType, metadata, items); } @Subscribe @@ -612,8 +613,7 @@ public class LootTrackerPlugin extends Plugin return; } - eventType = CHEST_EVENT_TYPES.get(regionID); - lootRecordType = LootRecordType.EVENT; + setEvent(LootRecordType.EVENT, CHEST_EVENT_TYPES.get(regionID)); takeInventorySnapshot(); return; @@ -622,8 +622,7 @@ public class LootTrackerPlugin extends Plugin if (message.equals(COFFIN_LOOTED_MESSAGE) && isPlayerWithinMapRegion(HALLOWED_SEPULCHRE_MAP_REGIONS)) { - eventType = HALLOWED_SEPULCHRE_COFFIN_EVENT; - lootRecordType = LootRecordType.EVENT; + setEvent(LootRecordType.EVENT, HALLOWED_SEPULCHRE_COFFIN_EVENT); takeInventorySnapshot(); return; } @@ -635,8 +634,7 @@ public class LootTrackerPlugin extends Plugin return; } - eventType = HERBIBOAR_EVENT; - lootRecordType = LootRecordType.EVENT; + setEvent(LootRecordType.EVENT, HERBIBOAR_EVENT, client.getBoostedSkillLevel(Skill.HERBLORE)); takeInventorySnapshot(); return; } @@ -644,8 +642,7 @@ public class LootTrackerPlugin extends Plugin final int regionID = client.getLocalPlayer().getWorldLocation().getRegionID(); if (HESPORI_REGION == regionID && message.equals(HESPORI_LOOTED_MESSAGE)) { - eventType = HESPORI_EVENT; - lootRecordType = LootRecordType.EVENT; + setEvent(LootRecordType.EVENT, HESPORI_EVENT); takeInventorySnapshot(); return; } @@ -654,8 +651,7 @@ public class LootTrackerPlugin extends Plugin if (hamStoreroomMatcher.matches() && regionID == HAM_STOREROOM_REGION) { String keyType = hamStoreroomMatcher.group("key"); - eventType = String.format("H.A.M. chest (%s)", keyType); - lootRecordType = LootRecordType.EVENT; + setEvent(LootRecordType.EVENT, String.format("H.A.M. chest (%s)", keyType)); takeInventorySnapshot(); return; } @@ -669,13 +665,11 @@ public class LootTrackerPlugin extends Plugin // Occasional edge case where the pickpocket message doesn't list the correct name of the NPC (e.g. H.A.M. Members) if (PICKPOCKET_DISAMBIGUATION_MAP.get(lastPickpocketTarget).contains(pickpocketTarget)) { - eventType = lastPickpocketTarget; - lootRecordType = LootRecordType.PICKPOCKET; + setEvent(LootRecordType.PICKPOCKET, lastPickpocketTarget); } else { - eventType = pickpocketTarget; - lootRecordType = LootRecordType.PICKPOCKET; + setEvent(LootRecordType.PICKPOCKET, pickpocketTarget); } takeInventorySnapshot(); @@ -690,28 +684,22 @@ public class LootTrackerPlugin extends Plugin switch (type) { case "beginner": - eventType = "Clue Scroll (Beginner)"; - lootRecordType = LootRecordType.EVENT; + setEvent(LootRecordType.EVENT, "Clue Scroll (Beginner)"); return; case "easy": - eventType = "Clue Scroll (Easy)"; - lootRecordType = LootRecordType.EVENT; + setEvent(LootRecordType.EVENT, "Clue Scroll (Easy)"); return; case "medium": - eventType = "Clue Scroll (Medium)"; - lootRecordType = LootRecordType.EVENT; + setEvent(LootRecordType.EVENT, "Clue Scroll (Medium)"); return; case "hard": - eventType = "Clue Scroll (Hard)"; - lootRecordType = LootRecordType.EVENT; + setEvent(LootRecordType.EVENT, "Clue Scroll (Hard)"); return; case "elite": - eventType = "Clue Scroll (Elite)"; - lootRecordType = LootRecordType.EVENT; + setEvent(LootRecordType.EVENT, "Clue Scroll (Elite)"); return; case "master": - eventType = "Clue Scroll (Master)"; - lootRecordType = LootRecordType.EVENT; + setEvent(LootRecordType.EVENT, "Clue Scroll (Master)"); return; } } @@ -719,8 +707,7 @@ public class LootTrackerPlugin extends Plugin if (SHADE_CHEST_NO_KEY_PATTERN.matcher(message).matches()) { // Player didn't have the key they needed. - eventType = null; - lootRecordType = null; + resetEvent(); } } @@ -747,9 +734,8 @@ public class LootTrackerPlugin extends Plugin WorldPoint playerLocation = client.getLocalPlayer().getWorldLocation(); Collection groundItems = lootManager.getItemSpawns(playerLocation); - processInventoryLoot(eventType, lootRecordType, event.getItemContainer(), groundItems); - eventType = null; - lootRecordType = null; + processInventoryLoot(eventType, lootRecordType, metadata, event.getItemContainer(), groundItems); + resetEvent(); } } @@ -765,29 +751,25 @@ public class LootTrackerPlugin extends Plugin if (event.getMenuOption().equals("Take") && event.getId() == ItemID.SEED_PACK) { - eventType = SEEDPACK_EVENT; - lootRecordType = LootRecordType.EVENT; + setEvent(LootRecordType.EVENT, SEEDPACK_EVENT); takeInventorySnapshot(); } if (event.getMenuOption().equals("Open") && SHADE_CHEST_OBJECTS.containsKey(event.getId())) { - eventType = SHADE_CHEST_OBJECTS.get(event.getId()); - lootRecordType = LootRecordType.EVENT; + setEvent(LootRecordType.EVENT, SHADE_CHEST_OBJECTS.get(event.getId())); takeInventorySnapshot(); } if (event.getMenuOption().equals("Search") && BIRDNEST_IDS.contains(event.getId())) { - eventType = BIRDNEST_EVENT; - lootRecordType = LootRecordType.EVENT; + setEvent(LootRecordType.EVENT, BIRDNEST_EVENT); takeInventorySnapshot(); } if (event.getMenuOption().equals("Open") && event.getId() == ItemID.CASKET) { - eventType = CASKET_EVENT; - lootRecordType = LootRecordType.EVENT; + setEvent(LootRecordType.EVENT, CASKET_EVENT); takeInventorySnapshot(); } } @@ -828,6 +810,25 @@ public class LootTrackerPlugin extends Plugin return future; } + private void setEvent(LootRecordType lootRecordType, String eventType, Object metadata) + { + this.lootRecordType = lootRecordType; + this.eventType = eventType; + this.metadata = metadata; + } + + private void setEvent(LootRecordType lootRecordType, String eventType) + { + setEvent(lootRecordType, eventType, null); + } + + private void resetEvent() + { + lootRecordType = null; + eventType = null; + metadata = null; + } + private void takeInventorySnapshot() { final ItemContainer itemContainer = client.getItemContainer(InventoryID.INVENTORY); @@ -839,7 +840,7 @@ public class LootTrackerPlugin extends Plugin } } - private void processInventoryLoot(String event, LootRecordType lootRecordType, ItemContainer inventoryContainer, Collection groundItems) + private void processInventoryLoot(String event, LootRecordType lootRecordType, Object metadata, ItemContainer inventoryContainer, Collection groundItems) { if (inventorySnapshot != null) { @@ -856,7 +857,7 @@ public class LootTrackerPlugin extends Plugin .map(e -> new ItemStack(e.getElement(), e.getCount(), client.getLocalPlayer().getLocalLocation())) .collect(Collectors.toList()); - addLoot(event, -1, lootRecordType, items); + addLoot(event, -1, lootRecordType, metadata, items); inventorySnapshot = null; } @@ -886,7 +887,8 @@ public class LootTrackerPlugin extends Plugin return false; } - addLoot(HERBIBOAR_EVENT, -1, LootRecordType.EVENT, herbs); + int herbloreLevel = client.getBoostedSkillLevel(Skill.HERBLORE); + addLoot(HERBIBOAR_EVENT, -1, LootRecordType.EVENT, herbloreLevel, herbs); return true; } diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/loottracker/LootTrackerPluginTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/loottracker/LootTrackerPluginTest.java index 4b74201060..12f6e4d990 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/loottracker/LootTrackerPluginTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/loottracker/LootTrackerPluginTest.java @@ -45,6 +45,7 @@ import net.runelite.api.ItemID; import net.runelite.api.IterableHashTable; import net.runelite.api.MessageNode; import net.runelite.api.Player; +import net.runelite.api.Skill; import net.runelite.api.coords.LocalPoint; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.ChatMessage; @@ -69,6 +70,7 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyCollection; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.isNull; import org.mockito.Mock; import org.mockito.Mockito; import static org.mockito.Mockito.doNothing; @@ -172,6 +174,8 @@ public class LootTrackerPluginTest @Test public void testHerbiboarHerbSack() { + when(client.getBoostedSkillLevel(Skill.HERBLORE)).thenReturn(42); + for (Map.Entry herb : HERB_IDS_TO_NAMES.entrySet()) { final int id = herb.getKey(); @@ -200,12 +204,12 @@ public class LootTrackerPluginTest when(client.getMessages()).thenReturn(messageTable); LootTrackerPlugin lootTrackerPluginSpy = spy(this.lootTrackerPlugin); - doNothing().when(lootTrackerPluginSpy).addLoot(any(), anyInt(), any(), any(Collection.class)); + doNothing().when(lootTrackerPluginSpy).addLoot(any(), anyInt(), any(), any(), any(Collection.class)); ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", LootTrackerPlugin.HERBIBOAR_LOOTED_MESSAGE, "", 0); lootTrackerPluginSpy.onChatMessage(chatMessage); - verify(lootTrackerPluginSpy).addLoot("Herbiboar", -1, LootRecordType.EVENT, Arrays.asList( + verify(lootTrackerPluginSpy).addLoot("Herbiboar", -1, LootRecordType.EVENT, 42, Arrays.asList( new ItemStack(id, 1, null), new ItemStack(id, 1, null) )); @@ -222,7 +226,7 @@ public class LootTrackerPluginTest LootTrackerPlugin spyPlugin = Mockito.spy(lootTrackerPlugin); // Make sure we don't execute addLoot, so we don't have to mock LootTrackerPanel and everything else also - doNothing().when(spyPlugin).addLoot(anyString(), anyInt(), any(LootRecordType.class), anyCollection()); + doNothing().when(spyPlugin).addLoot(anyString(), anyInt(), any(LootRecordType.class), isNull(), anyCollection()); ItemContainer itemContainer = mock(ItemContainer.class); when(itemContainer.getItems()).thenReturn(new Item[]{ @@ -253,7 +257,7 @@ public class LootTrackerPluginTest LootTrackerPlugin spyPlugin = Mockito.spy(lootTrackerPlugin); // Make sure we don't execute addLoot, so we don't have to mock LootTrackerPanel and everything else also - doNothing().when(spyPlugin).addLoot(anyString(), anyInt(), any(LootRecordType.class), anyCollection()); + doNothing().when(spyPlugin).addLoot(anyString(), anyInt(), any(LootRecordType.class), isNull(), anyCollection()); ItemContainer itemContainer = mock(ItemContainer.class); when(itemContainer.getItems()).thenReturn(new Item[]{ From 6998931f84964cf2071df23faaa495329e96e520 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 10 Aug 2020 11:11:22 -0400 Subject: [PATCH 46/47] menu swapper: update jewellery box clan wars swap to ferox enclave --- .../client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java index d5cd30fa88..1a67e48cc1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java @@ -264,7 +264,7 @@ public class MenuEntrySwapperPlugin extends Plugin swap("teleport menu", "duel arena", config::swapJewelleryBox); swap("teleport menu", "castle wars", config::swapJewelleryBox); - swap("teleport menu", "clan wars", config::swapJewelleryBox); + swap("teleport menu", "ferox enclave", config::swapJewelleryBox); swap("teleport menu", "burthorpe", config::swapJewelleryBox); swap("teleport menu", "barbarian outpost", config::swapJewelleryBox); swap("teleport menu", "corporeal beast", config::swapJewelleryBox); From c2026f551663ea21c3735dd90c25afa1d74ff9c2 Mon Sep 17 00:00:00 2001 From: melkypie <5113962+melkypie@users.noreply.github.com> Date: Mon, 29 Jun 2020 02:34:11 +0300 Subject: [PATCH 47/47] chatcommands: make cox pb account for 11-15 and 16-23 team sizes --- .../client/plugins/chatcommands/ChatCommandsPlugin.java | 7 ++++--- .../plugins/chatcommands/ChatCommandsPluginTest.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java index 0c67b12c94..e9a30eb61d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java @@ -93,8 +93,9 @@ public class ChatCommandsPlugin extends Plugin { private static final Pattern KILLCOUNT_PATTERN = Pattern.compile("Your (.+) (?:kill|harvest|lap|completion) count is: (\\d+)"); private static final Pattern RAIDS_PATTERN = Pattern.compile("Your completed (.+) count is: (\\d+)"); - private static final Pattern RAIDS_PB_PATTERN = Pattern.compile("Congratulations - your raid is complete!
Team size: (?:[0-9]+\\+? players|Solo) Duration: (?[0-9:]+) \\(new personal best\\)"); - private static final Pattern RAIDS_DURATION_PATTERN = Pattern.compile("Congratulations - your raid is complete!
Team size: (?:[0-9]+\\+? players|Solo) Duration: [0-9:]+ Personal best: (?[0-9:]+)"); + private static final String COX_TEAM_SIZES = "(?:\\d+(?:\\+|-\\d+)? players|Solo)"; + private static final Pattern RAIDS_PB_PATTERN = Pattern.compile("Congratulations - your raid is complete!
Team size: " + COX_TEAM_SIZES + " Duration: (?[0-9:]+) \\(new personal best\\)"); + private static final Pattern RAIDS_DURATION_PATTERN = Pattern.compile("Congratulations - your raid is complete!
Team size: " + COX_TEAM_SIZES + " Duration: [0-9:]+ Personal best: (?[0-9:]+)"); private static final Pattern TOB_WAVE_PB_PATTERN = Pattern.compile("^.*Theatre of Blood wave completion time: (?[0-9:]+) \\(Personal best!\\)"); private static final Pattern TOB_WAVE_DURATION_PATTERN = Pattern.compile("^.*Theatre of Blood wave completion time: [0-9:]+
Personal best: (?[0-9:]+)"); private static final Pattern WINTERTODT_PATTERN = Pattern.compile("Your subdued Wintertodt count is: (\\d+)"); @@ -104,7 +105,7 @@ public class ChatCommandsPlugin extends Plugin private static final Pattern DUEL_ARENA_WINS_PATTERN = Pattern.compile("You (were defeated|won)! You have(?: now)? won (\\d+) duels?"); private static final Pattern DUEL_ARENA_LOSSES_PATTERN = Pattern.compile("You have(?: now)? lost (\\d+) duels?"); private static final Pattern ADVENTURE_LOG_TITLE_PATTERN = Pattern.compile("The Exploits of (.+)"); - private static final Pattern ADVENTURE_LOG_COX_PB_PATTERN = Pattern.compile("Fastest (?:kill|run)(?: - \\(Team size: (?:[0-9]+\\+? players|Solo)\\))?: ([0-9:]+)"); + private static final Pattern ADVENTURE_LOG_COX_PB_PATTERN = Pattern.compile("Fastest (?:kill|run)(?: - \\(Team size: " + COX_TEAM_SIZES + "\\))?: ([0-9:]+)"); private static final Pattern ADVENTURE_LOG_BOSS_PB_PATTERN = Pattern.compile("[a-zA-Z]+(?: [a-zA-Z]+)*"); private static final Pattern ADVENTURE_LOG_PB_PATTERN = Pattern.compile("(" + ADVENTURE_LOG_BOSS_PB_PATTERN + "(?: - " + ADVENTURE_LOG_BOSS_PB_PATTERN + ")*) (?:" + ADVENTURE_LOG_COX_PB_PATTERN + "( )*)+"); private static final Pattern HS_PB_PATTERN = Pattern.compile("Floor (?\\d) time: (?[0-9:]+)(?: \\(new personal best\\)|. Personal best: (?[0-9:]+))" + diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/chatcommands/ChatCommandsPluginTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/chatcommands/ChatCommandsPluginTest.java index c2fab2bd0e..db61d333d7 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/chatcommands/ChatCommandsPluginTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/chatcommands/ChatCommandsPluginTest.java @@ -420,7 +420,7 @@ public class ChatCommandsPluginTest { when(configManager.getConfiguration("personalbest.adam", "chambers of xeric", int.class)).thenReturn(25 * 60 + 14); - ChatMessage chatMessage = new ChatMessage(null, FRIENDSCHATNOTIFICATION, "", "Congratulations - your raid is complete!
Team size: 3 players Duration: 23:25 Personal best: 20:19", null, 0); + ChatMessage chatMessage = new ChatMessage(null, FRIENDSCHATNOTIFICATION, "", "Congratulations - your raid is complete!
Team size: 11-15 players Duration: 23:25 Personal best: 20:19", null, 0); chatCommandsPlugin.onChatMessage(chatMessage); chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Your completed Chambers of Xeric count is: 52.", null, 0);