From 689513f3ca25d2e774323607c1a51efa147423da Mon Sep 17 00:00:00 2001 From: xDemoN Date: Thu, 15 Aug 2019 08:51:56 -0400 Subject: [PATCH 1/6] item mapping: add bird nest variations --- .../src/main/java/net/runelite/client/game/ItemMapping.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 7e2ed45398..6534022788 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 @@ -225,7 +225,10 @@ public enum ItemMapping ITEM_BLADE_OF_SAELDOR(BLADE_OF_SAELDOR_INACTIVE, BLADE_OF_SAELDOR), ITEM_CRYSTAL_BOW(CRYSTAL_WEAPON_SEED, CRYSTAL_BOW, CRYSTAL_BOW_24123, CRYSTAL_BOW_INACTIVE), ITEM_CRYSTAL_HALBERD(CRYSTAL_WEAPON_SEED, CRYSTAL_HALBERD, CRYSTAL_HALBERD_24125, CRYSTAL_HALBERD_INACTIVE), - ITEM_CRYSTAL_SHIELD(CRYSTAL_WEAPON_SEED, CRYSTAL_SHIELD, CRYSTAL_SHIELD_24127, CRYSTAL_SHIELD_INACTIVE); + ITEM_CRYSTAL_SHIELD(CRYSTAL_WEAPON_SEED, CRYSTAL_SHIELD, CRYSTAL_SHIELD_24127, CRYSTAL_SHIELD_INACTIVE), + + // Bird nests + ITEM_BIRD_NEST(BIRD_NEST, BIRD_NEST_5071, BIRD_NEST_5072, BIRD_NEST_5073, BIRD_NEST_5074, BIRD_NEST_5075, BIRD_NEST_7413, BIRD_NEST_13653, BIRD_NEST_22798, BIRD_NEST_22800); private static final Multimap MAPPINGS = HashMultimap.create(); private final int tradeableItem; From 91bf5e8fb2278fa3283c8984c49180d732759ba4 Mon Sep 17 00:00:00 2001 From: xDemoN Date: Thu, 15 Aug 2019 10:59:58 -0400 Subject: [PATCH 2/6] agility: add missing ladder to prifddinas --- .../java/net/runelite/client/plugins/agility/Obstacles.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/agility/Obstacles.java b/runelite-client/src/main/java/net/runelite/client/plugins/agility/Obstacles.java index ad07643db7..edd06acee7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/agility/Obstacles.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/agility/Obstacles.java @@ -93,8 +93,8 @@ class Obstacles STEPPING_STONE_11643, HURDLE, HURDLE_11639, HURDLE_11640, PIPE_11657, SKULL_SLOPE, ZIP_LINE, ZIP_LINE_11645, ZIP_LINE_11646, // Prifddinas - LADDER_36221, TIGHTROPE_36225, CHIMNEY_36227, ROOF_EDGE, DARK_HOLE_36229, LADDER_36231, ROPE_BRIDGE_36233, - TIGHTROPE_36234, ROPE_BRIDGE_36235, TIGHTROPE_36236, TIGHTROPE_36237, DARK_HOLE_36238, + LADDER_36221, TIGHTROPE_36225, CHIMNEY_36227, ROOF_EDGE, DARK_HOLE_36229, LADDER_36231, LADDER_36232, + ROPE_BRIDGE_36233, TIGHTROPE_36234, ROPE_BRIDGE_36235, TIGHTROPE_36236, TIGHTROPE_36237, DARK_HOLE_36238, // Prifddinas portals NULL_36241, NULL_36242, NULL_36243, NULL_36244, NULL_36245, NULL_36246 ); From e7174e36069c5daf2ae57d70a57c84bbcca8b5f7 Mon Sep 17 00:00:00 2001 From: xDemoN Date: Tue, 20 Aug 2019 19:24:44 -0400 Subject: [PATCH 3/6] emote: change "stomp" to "stamp" I cannot believe this is real... --- runelite-api/src/main/java/net/runelite/api/SpriteID.java | 4 ++-- .../runelite/client/plugins/cluescrolls/clues/EmoteClue.java | 2 +- .../client/plugins/cluescrolls/clues/emote/Emote.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/SpriteID.java b/runelite-api/src/main/java/net/runelite/api/SpriteID.java index d1eea37a67..35419da483 100644 --- a/runelite-api/src/main/java/net/runelite/api/SpriteID.java +++ b/runelite-api/src/main/java/net/runelite/api/SpriteID.java @@ -725,7 +725,7 @@ public final class SpriteID public static final int EMOTE_GOBLIN_SALUTE = 727; public static final int EMOTE_SCARED = 728; public static final int EMOTE_SLAP_HEAD = 729; - public static final int EMOTE_STOMP = 730; + public static final int EMOTE_STAMP = 730; public static final int EMOTE_FLAP = 731; public static final int EMOTE_IDEA = 732; public static final int EMOTE_ZOMBIE_WALK = 733; @@ -745,7 +745,7 @@ public final class SpriteID public static final int EMOTE_GOBLIN_SALUTE_LOCKED = 747; public static final int EMOTE_SCARED_LOCKED = 748; public static final int EMOTE_SLAP_HEAD_LOCKED = 749; - public static final int EMOTE_STOMP_LOCKED = 750; + public static final int EMOTE_STAMP_LOCKED = 750; public static final int EMOTE_FLAP_LOCKED = 751; public static final int EMOTE_IDEA_LOCKED = 752; public static final int EMOTE_ZOMBIE_WALK_LOCKED = 753; 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 db46a9f020..f3a6e9acc3 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 @@ -156,7 +156,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu new EmoteClue("Spin in the Varrock Castle courtyard. Equip a black axe, a coif and a ruby ring.", "Varrock Castle", OUTSIDE_VARROCK_PALACE_COURTYARD, new WorldPoint(3213, 3463, 0), SPIN, item(BLACK_AXE), item(COIF), item(RUBY_RING)), new EmoteClue("Spin in West Ardougne Church. Equip a dragon spear and red dragonhide chaps.", "Ardougne", CHAPEL_IN_WEST_ARDOUGNE, new WorldPoint(2530, 3290, 0), SPIN, item(DRAGON_SPEAR), item(RED_DHIDE_CHAPS)), new EmoteClue("Spin on the bridge by the Barbarian Village. Salute before you talk to me. Equip purple gloves, a steel kiteshield and a mithril full helmet.", "Barbarian Village", EAST_OF_THE_BARBARIAN_VILLAGE_BRIDGE, new WorldPoint(3105, 3420, 0), SPIN, SALUTE, item(PURPLE_GLOVES), item(STEEL_KITESHIELD), item(MITHRIL_FULL_HELM)), - new EmoteClue("Stamp in the Enchanted valley west of the waterfall. Beware of double agents! Equip a dragon axe.", "Enchanted Valley", NORTHWESTERN_CORNER_OF_THE_ENCHANTED_VALLEY, new WorldPoint(3030, 4522, 0), STOMP, item(DRAGON_AXE)), + new EmoteClue("Stamp in the Enchanted valley west of the waterfall. Beware of double agents! Equip a dragon axe.", "Enchanted Valley", NORTHWESTERN_CORNER_OF_THE_ENCHANTED_VALLEY, new WorldPoint(3030, 4522, 0), STAMP, item(DRAGON_AXE)), new EmoteClue("Think in middle of the wheat field by the Lumbridge mill. Equip a blue gnome robetop, a turquoise gnome robe bottom and an oak shortbow.", "Lumbridge mill", WHEAT_FIELD_NEAR_THE_LUMBRIDGE_WINDMILL, new WorldPoint(3159, 3298, 0), THINK, item(BLUE_ROBE_TOP), item(TURQUOISE_ROBE_BOTTOMS), item(OAK_SHORTBOW)), new EmoteClue("Think in the centre of the Observatory. Spin before you talk to me. Equip a mithril chain body, green dragonhide chaps and a ruby amulet.", "Observatory", OBSERVATORY, new WorldPoint(2439, 3161, 0), THINK, SPIN, item(MITHRIL_CHAINBODY), item(GREEN_DHIDE_CHAPS), item(RUBY_AMULET)), new EmoteClue("Wave along the south fence of the Lumber Yard. Equip a hard leather body, leather chaps and a bronze axe.", "Lumber Yard", NEAR_THE_SAWMILL_OPERATORS_BOOTH, new WorldPoint(3307, 3491, 0), WAVE, item(HARDLEATHER_BODY), item(LEATHER_CHAPS), item(BRONZE_AXE)), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/emote/Emote.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/emote/Emote.java index 67019d58d0..1be5825d72 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/emote/Emote.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/emote/Emote.java @@ -55,7 +55,7 @@ public enum Emote BLOW_KISS("Blow Kiss", EMOTE_BLOW_KISS), GOBLIN_SALUTE("Goblin Salute", EMOTE_GOBLIN_SALUTE), SLAP_HEAD("Slap Head", EMOTE_SLAP_HEAD), - STOMP("Stomp", EMOTE_STOMP), + STAMP("Stamp", EMOTE_STAMP), FLAP("Flap", EMOTE_FLAP), PUSH_UP("Push up", EMOTE_PUSH_UP); From fba1d0ad51734b4b0cc181e529ac22fec44c4cc8 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 24 Aug 2019 16:09:06 -0400 Subject: [PATCH 4/6] api: remove unused Query class --- .../src/main/java/net/runelite/api/Query.java | 67 ------------------- 1 file changed, 67 deletions(-) delete mode 100644 runelite-api/src/main/java/net/runelite/api/Query.java diff --git a/runelite-api/src/main/java/net/runelite/api/Query.java b/runelite-api/src/main/java/net/runelite/api/Query.java deleted file mode 100644 index 12737f299a..0000000000 --- a/runelite-api/src/main/java/net/runelite/api/Query.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2017, Devin French - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.api; - -import java.util.function.Predicate; - -/** - * A query to search the game for objects that match. - * - * @param the returned object type - * @param the query type - */ -public abstract class Query -{ - protected Predicate predicate = x -> true; - - protected Query() - { - } - - /** - * Executes the query and filters through possible objects, returning only - * those who evaluate true using {@link #predicate}. - * - * @param client the game client - * @return the matching objects - */ - public abstract EntityType[] result(Client client); - - /** - * Constructs and returns a predicate that will evaluate {@link #predicate} - * and the passed value. - * - * @param other the passed predicate - * @return the combined predicate - */ - protected Predicate and(Predicate other) - { - if (predicate == null) - { - return other; - } - return predicate.and(other); - } -} From c2bda2d47f7d4bf1af662101d6abb0f3fbdfe752 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 23 Aug 2019 22:30:10 -0400 Subject: [PATCH 5/6] menu entry swapper: expand talk-to/pickpocket swap to non-blackjack npcs --- .../plugins/menuentryswapper/MenuEntrySwapperConfig.java | 4 ++-- .../plugins/menuentryswapper/MenuEntrySwapperPlugin.java | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) 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 8fa26b7f2f..b7decee5d0 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 @@ -194,8 +194,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapPickpocket", - name = "Pickpocket on H.A.M.", - description = "Swap Talk-to with Pickpocket on H.A.M members" + name = "Pickpocket", + description = "Swap Talk-to with Pickpocket" ) default boolean swapPickpocket() { 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 534b1447f2..8f2464dd4d 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 @@ -373,7 +373,7 @@ public class MenuEntrySwapperPlugin extends Plugin if (option.equals("talk-to")) { - if (config.swapPickpocket() && target.contains("h.a.m.")) + if (config.swapPickpocket() && shouldSwapPickpocket(target)) { swap("pickpocket", option, target, true); } @@ -596,6 +596,11 @@ public class MenuEntrySwapperPlugin extends Plugin } } + private static boolean shouldSwapPickpocket(String target) + { + return !target.startsWith("villager") && !target.startsWith("bandit") && !target.startsWith("menaphite thug"); + } + @Subscribe public void onPostItemComposition(PostItemComposition event) { From 90897563d07f57d0336abcd31f7f4d6d57b0a49e Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 24 Aug 2019 18:10:04 -0400 Subject: [PATCH 6/6] Fix some typos --- .../main/java/net/runelite/client/chat/CommandManager.java | 4 ++-- .../main/java/net/runelite/client/config/ConfigGroup.java | 2 +- .../net/runelite/client/config/ConfigInvocationHandler.java | 2 +- .../src/main/java/net/runelite/client/config/Keybind.java | 4 ++-- .../src/main/java/net/runelite/client/game/LootManager.java | 4 ++-- .../client/plugins/achievementdiary/Requirement.java | 3 ++- .../src/main/java/net/runelite/client/util/ColorUtil.java | 6 +++--- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/chat/CommandManager.java b/runelite-client/src/main/java/net/runelite/client/chat/CommandManager.java index 7529fc6d56..c066d47681 100644 --- a/runelite-client/src/main/java/net/runelite/client/chat/CommandManager.java +++ b/runelite-client/src/main/java/net/runelite/client/chat/CommandManager.java @@ -48,7 +48,7 @@ public class CommandManager { private static final String RUNELITE_COMMAND = "runeliteCommand"; private static final String CHATBOX_INPUT = "chatboxInput"; - private static final String PRIVMATE_MESSAGE = "privateMessage"; + private static final String PRIVATE_MESSAGE = "privateMessage"; private final Client client; private final EventBus eventBus; @@ -91,7 +91,7 @@ public class CommandManager case CHATBOX_INPUT: handleInput(event); break; - case PRIVMATE_MESSAGE: + case PRIVATE_MESSAGE: handlePrivateMessage(event); break; } diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigGroup.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigGroup.java index 7f9293cf8c..5495ec3b44 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/ConfigGroup.java +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigGroup.java @@ -35,7 +35,7 @@ public @interface ConfigGroup { /** * The key name of the config group used for storing configuration within the config group. - * This should typically be a lowercased version of your plugin name, with all spaces removed. + * This should typically be a lowercase version of your plugin name, with all spaces removed. *

* For example, the {@code Grand Exchange} plugin uses the key name {@code grandexchange}. */ diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigInvocationHandler.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigInvocationHandler.java index f6375b0bb8..ae0126cc89 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/ConfigInvocationHandler.java +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigInvocationHandler.java @@ -124,7 +124,7 @@ class ConfigInvocationHandler implements InvocationHandler if (args.length != 1) { - throw new RuntimeException("Invalid number of arguents to configuration method"); + throw new RuntimeException("Invalid number of arguments to configuration method"); } Object newValue = args[0]; diff --git a/runelite-client/src/main/java/net/runelite/client/config/Keybind.java b/runelite-client/src/main/java/net/runelite/client/config/Keybind.java index b0fb4dffcf..e7e338a6b3 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/Keybind.java +++ b/runelite-client/src/main/java/net/runelite/client/config/Keybind.java @@ -47,7 +47,7 @@ public class Keybind .put(InputEvent.META_DOWN_MASK, KeyEvent.VK_META) .build(); - // Bitmask of all supported modifers + // Bitmask of all supported modifiers private static final int KEYBOARD_MODIFIER_MASK = MODIFIER_TO_KEY_CODE.keySet().stream() .reduce((a, b) -> a | b).get(); @@ -65,7 +65,7 @@ public class Keybind modifiers &= KEYBOARD_MODIFIER_MASK; // If the keybind is just modifiers we don't want the keyCode to contain the modifier too, - // becasue this breaks if you do the keycode backwards + // because this breaks if you do the keycode backwards Integer mf = getModifierForKeyCode(keyCode); if (mf != null) { diff --git a/runelite-client/src/main/java/net/runelite/client/game/LootManager.java b/runelite-client/src/main/java/net/runelite/client/game/LootManager.java index 24d9e6128d..a2c10cf04b 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/LootManager.java +++ b/runelite-client/src/main/java/net/runelite/client/game/LootManager.java @@ -161,7 +161,7 @@ public class LootManager final LocalPoint location = tile.getLocalLocation(); final int packed = location.getSceneX() << 8 | location.getSceneY(); itemSpawns.put(packed, new ItemStack(item.getId(), item.getQuantity(), location)); - log.debug("Item spawn {} ({}) location {},{}", item.getId(), item.getQuantity(), location); + log.debug("Item spawn {} ({}) location {}", item.getId(), item.getQuantity(), location); } @Subscribe @@ -169,7 +169,7 @@ public class LootManager { final TileItem item = itemDespawned.getItem(); final LocalPoint location = itemDespawned.getTile().getLocalLocation(); - log.debug("Item despawn {} ({}) location {},{}", item.getId(), item.getQuantity(), location); + log.debug("Item despawn {} ({}) location {}", item.getId(), item.getQuantity(), location); } @Subscribe 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 d7d0b32a13..a507cb4538 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 @@ -21,7 +21,8 @@ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */package net.runelite.client.plugins.achievementdiary; + */ +package net.runelite.client.plugins.achievementdiary; public interface Requirement { diff --git a/runelite-client/src/main/java/net/runelite/client/util/ColorUtil.java b/runelite-client/src/main/java/net/runelite/client/util/ColorUtil.java index 5c66d129b3..8c6f124f4c 100644 --- a/runelite-client/src/main/java/net/runelite/client/util/ColorUtil.java +++ b/runelite-client/src/main/java/net/runelite/client/util/ColorUtil.java @@ -75,10 +75,10 @@ public class ColorUtil } /** - * Converts a given color to it's hexidecimal equivalent. + * Converts a given color to it's hexadecimal equivalent. * - * @param color Color to get hexidecimal string from. - * @return Hexidecimal string representing the given color, in the form "#abcdef". + * @param color Color to get hexadecimal string from. + * @return Hexadecimal string representing the given color, in the form "#abcdef". */ public static String toHexColor(final Color color) {