From e9439efc82fd41d8c5ac7ab00f58295307075a5e Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Tue, 23 Feb 2021 02:13:26 -0500 Subject: [PATCH 01/14] slayer: Add Soul Wars imbued Slayer Helmets to slayer item set --- .../net/runelite/client/plugins/slayer/SlayerOverlay.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/slayer/SlayerOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/slayer/SlayerOverlay.java index 6e5ecd72eb..f07954bd6e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/slayer/SlayerOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/slayer/SlayerOverlay.java @@ -52,20 +52,28 @@ class SlayerOverlay extends WidgetItemOverlay private final static Set ALL_SLAYER_ITEMS = ImmutableSet.of( ItemID.SLAYER_HELMET, ItemID.SLAYER_HELMET_I, + ItemID.SLAYER_HELMET_I_25177, ItemID.BLACK_SLAYER_HELMET, ItemID.BLACK_SLAYER_HELMET_I, + ItemID.BLACK_SLAYER_HELMET_I_25179, ItemID.GREEN_SLAYER_HELMET, ItemID.GREEN_SLAYER_HELMET_I, + ItemID.GREEN_SLAYER_HELMET_I_25181, ItemID.PURPLE_SLAYER_HELMET, ItemID.PURPLE_SLAYER_HELMET_I, + ItemID.PURPLE_SLAYER_HELMET_I_25185, ItemID.RED_SLAYER_HELMET, ItemID.RED_SLAYER_HELMET_I, + ItemID.RED_SLAYER_HELMET_I_25183, ItemID.TURQUOISE_SLAYER_HELMET, ItemID.TURQUOISE_SLAYER_HELMET_I, + ItemID.TURQUOISE_SLAYER_HELMET_I_25187, ItemID.TWISTED_SLAYER_HELMET, ItemID.TWISTED_SLAYER_HELMET_I, + ItemID.TWISTED_SLAYER_HELMET_I_25191, ItemID.HYDRA_SLAYER_HELMET, ItemID.HYDRA_SLAYER_HELMET_I, + ItemID.HYDRA_SLAYER_HELMET_I_25189, ItemID.SLAYER_RING_ETERNAL, ItemID.ENCHANTED_GEM, ItemID.ETERNAL_GEM, From 0a666e592456a891bde8aecb3db1a885b13ec50a Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Tue, 23 Feb 2021 02:14:35 -0500 Subject: [PATCH 02/14] clues: Add Soul Wars imbued Slayer Helmets to Emote and Skill sets --- .../runelite/client/plugins/cluescrolls/clues/EmoteClue.java | 4 ++-- .../client/plugins/cluescrolls/clues/SkillChallengeClue.java | 2 +- 2 files changed, 3 insertions(+), 3 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 ab3ac38982..0eca2de62f 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 @@ -140,8 +140,8 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu new EmoteClue("Panic by the pilot on White Wolf Mountain. Beware of double agents! Equip mithril platelegs, a ring of life and a rune axe.", "White Wolf Mountain", GNOME_GLIDER_ON_WHITE_WOLF_MOUNTAIN, new WorldPoint(2847, 3499, 0), DOUBLE_AGENT_108, PANIC, item(MITHRIL_PLATELEGS), item(RING_OF_LIFE), item(RUNE_AXE)), new EmoteClue("Panic by the big egg where no one dare goes and the ground is burnt. Beware of double agents! Equip a dragon med helm, a TokTz-Ket-Xil, a brine sabre, rune platebody and an uncharged amulet of glory.", "Lava dragon isle", SOUTHEAST_CORNER_OF_LAVA_DRAGON_ISLE, new WorldPoint(3227, 3831, 0), DOUBLE_AGENT_141, PANIC, item(DRAGON_MED_HELM), item(TOKTZKETXIL), item(BRINE_SABRE), item(RUNE_PLATEBODY), any("Uncharged Amulet of glory", item(AMULET_OF_GLORY))), new EmoteClue("Panic at the area flowers meet snow. Equip Blue D'hide vambraces, a dragon spear and a rune plateskirt.", "Trollweiss mountain", HALFWAY_DOWN_TROLLWEISS_MOUNTAIN, new WorldPoint(2776, 3781, 0), PANIC, item(BLUE_DHIDE_VAMBRACES), item(DRAGON_SPEAR), item(RUNE_PLATESKIRT), item(SLED_4084)), - new EmoteClue("Do a push up at the bank of the Warrior's guild. Beware of double agents! Equip a dragon battleaxe, a dragon defender and a slayer helm of any kind.", "Warriors' guild", WARRIORS_GUILD_BANK_29047, new WorldPoint(2843, 3543, 0), DOUBLE_AGENT_141, PUSH_UP, item(DRAGON_BATTLEAXE), any("Dragon defender", item(DRAGON_DEFENDER), item(DRAGON_DEFENDER_T), item(DRAGON_DEFENDER_L)), any("Any slayer helmet", item(SLAYER_HELMET), item(BLACK_SLAYER_HELMET), item(GREEN_SLAYER_HELMET), item(PURPLE_SLAYER_HELMET), item(RED_SLAYER_HELMET), item(TURQUOISE_SLAYER_HELMET), item(SLAYER_HELMET_I), item(BLACK_SLAYER_HELMET_I), item(GREEN_SLAYER_HELMET_I), item(PURPLE_SLAYER_HELMET_I), item(RED_SLAYER_HELMET_I), item(TURQUOISE_SLAYER_HELMET_I), item(HYDRA_SLAYER_HELMET), item(HYDRA_SLAYER_HELMET_I), item(TWISTED_SLAYER_HELMET), item(TWISTED_SLAYER_HELMET_I))), - new EmoteClue("Blow a raspberry in the bank of the Warriors' Guild. Beware of double agents! Equip a dragon battleaxe, a slayer helm of any kind and a dragon defender or avernic defender.", "Warriors' guild", WARRIORS_GUILD_BANK_29047, new WorldPoint(2843, 3543, 0), DOUBLE_AGENT_141, RASPBERRY, item(DRAGON_BATTLEAXE), any("Dragon defender or Avernic defender", item(DRAGON_DEFENDER), item(DRAGON_DEFENDER_T), item(DRAGON_DEFENDER_L), item(AVERNIC_DEFENDER), item(AVERNIC_DEFENDER_L)), any("Any slayer helmet", item(SLAYER_HELMET), item(BLACK_SLAYER_HELMET), item(GREEN_SLAYER_HELMET), item(PURPLE_SLAYER_HELMET), item(RED_SLAYER_HELMET), item(TURQUOISE_SLAYER_HELMET), item(SLAYER_HELMET_I), item(BLACK_SLAYER_HELMET_I), item(GREEN_SLAYER_HELMET_I), item(PURPLE_SLAYER_HELMET_I), item(RED_SLAYER_HELMET_I), item(TURQUOISE_SLAYER_HELMET_I), item(HYDRA_SLAYER_HELMET), item(HYDRA_SLAYER_HELMET_I), item(TWISTED_SLAYER_HELMET), item(TWISTED_SLAYER_HELMET_I))), + new EmoteClue("Do a push up at the bank of the Warrior's guild. Beware of double agents! Equip a dragon battleaxe, a dragon defender and a slayer helm of any kind.", "Warriors' guild", WARRIORS_GUILD_BANK_29047, new WorldPoint(2843, 3543, 0), DOUBLE_AGENT_141, PUSH_UP, item(DRAGON_BATTLEAXE), any("Dragon defender", item(DRAGON_DEFENDER), item(DRAGON_DEFENDER_T), item(DRAGON_DEFENDER_L)), any("Any slayer helmet", item(SLAYER_HELMET), item(BLACK_SLAYER_HELMET), item(GREEN_SLAYER_HELMET), item(PURPLE_SLAYER_HELMET), item(RED_SLAYER_HELMET), item(TURQUOISE_SLAYER_HELMET), item(SLAYER_HELMET_I), item(BLACK_SLAYER_HELMET_I), item(GREEN_SLAYER_HELMET_I), item(PURPLE_SLAYER_HELMET_I), item(RED_SLAYER_HELMET_I), item(TURQUOISE_SLAYER_HELMET_I), item(HYDRA_SLAYER_HELMET), item(HYDRA_SLAYER_HELMET_I), item(TWISTED_SLAYER_HELMET), item(TWISTED_SLAYER_HELMET_I), item(SLAYER_HELMET_I_25177), item(BLACK_SLAYER_HELMET_I_25179), item(GREEN_SLAYER_HELMET_I_25181), item(RED_SLAYER_HELMET_I_25183), item(PURPLE_SLAYER_HELMET_I_25185), item(TURQUOISE_SLAYER_HELMET_I_25187), item(HYDRA_SLAYER_HELMET_I_25189), item(TWISTED_SLAYER_HELMET_I_25191))), + new EmoteClue("Blow a raspberry in the bank of the Warriors' Guild. Beware of double agents! Equip a dragon battleaxe, a slayer helm of any kind and a dragon defender or avernic defender.", "Warriors' guild", WARRIORS_GUILD_BANK_29047, new WorldPoint(2843, 3543, 0), DOUBLE_AGENT_141, RASPBERRY, item(DRAGON_BATTLEAXE), any("Dragon defender or Avernic defender", item(DRAGON_DEFENDER), item(DRAGON_DEFENDER_T), item(DRAGON_DEFENDER_L), item(AVERNIC_DEFENDER), item(AVERNIC_DEFENDER_L)), any("Any slayer helmet", item(SLAYER_HELMET), item(BLACK_SLAYER_HELMET), item(GREEN_SLAYER_HELMET), item(PURPLE_SLAYER_HELMET), item(RED_SLAYER_HELMET), item(TURQUOISE_SLAYER_HELMET), item(SLAYER_HELMET_I), item(BLACK_SLAYER_HELMET_I), item(GREEN_SLAYER_HELMET_I), item(PURPLE_SLAYER_HELMET_I), item(RED_SLAYER_HELMET_I), item(TURQUOISE_SLAYER_HELMET_I), item(HYDRA_SLAYER_HELMET), item(HYDRA_SLAYER_HELMET_I), item(TWISTED_SLAYER_HELMET), item(TWISTED_SLAYER_HELMET_I), item(SLAYER_HELMET_I_25177), item(BLACK_SLAYER_HELMET_I_25179), item(GREEN_SLAYER_HELMET_I_25181), item(RED_SLAYER_HELMET_I_25183), item(PURPLE_SLAYER_HELMET_I_25185), item(TURQUOISE_SLAYER_HELMET_I_25187), item(HYDRA_SLAYER_HELMET_I_25189), item(TWISTED_SLAYER_HELMET_I_25191))), new EmoteClue("Blow a raspberry at the monkey cage in Ardougne Zoo. Equip a studded leather body, bronze platelegs and a normal staff with no orb.", "Ardougne Zoo", NEAR_THE_PARROTS_IN_ARDOUGNE_ZOO, new WorldPoint(2607, 3282, 0), RASPBERRY, item(STUDDED_BODY), item(BRONZE_PLATELEGS), item(STAFF)), new EmoteClue("Blow raspberries outside the entrance to Keep Le Faye. Equip a coif, an iron platebody and leather gloves.", "Keep Le Faye", OUTSIDE_KEEP_LE_FAYE, new WorldPoint(2757, 3401, 0), RASPBERRY, item(COIF), item(IRON_PLATEBODY), item(LEATHER_GLOVES)), new EmoteClue("Blow a raspberry in the Fishing Guild bank. Beware of double agents! Equip an elemental shield, blue dragonhide chaps and a rune warhammer.", "Fishing Guild", FISHING_GUILD_BANK, new WorldPoint(2588, 3419, 0), DOUBLE_AGENT_108, RASPBERRY, item(ELEMENTAL_SHIELD), item(BLUE_DHIDE_CHAPS), item(RUNE_WARHAMMER)), 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 7cd1f67f35..19ec7b04a1 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 @@ -146,7 +146,7 @@ public class SkillChallengeClue extends ClueScroll implements NpcClueScroll, Nam new SkillChallengeClue("Steal from a chest in Ardougne Castle."), 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), item(ItemID.TWISTED_SLAYER_HELMET), item(ItemID.TWISTED_SLAYER_HELMET_I))), + 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), item(ItemID.TWISTED_SLAYER_HELMET), item(ItemID.TWISTED_SLAYER_HELMET_I), item(ItemID.SLAYER_HELMET_I_25177), item(ItemID.BLACK_SLAYER_HELMET_I_25179), item(ItemID.GREEN_SLAYER_HELMET_I_25181), item(ItemID.RED_SLAYER_HELMET_I_25183), item(ItemID.PURPLE_SLAYER_HELMET_I_25185), item(ItemID.TURQUOISE_SLAYER_HELMET_I_25187), item(ItemID.HYDRA_SLAYER_HELMET_I_25189), item(ItemID.TWISTED_SLAYER_HELMET_I_25191))), new SkillChallengeClue("Catch a black warlock.", item(ItemID.BUTTERFLY_JAR), any("Butterfly Net", item(ItemID.BUTTERFLY_NET), item(ItemID.MAGIC_BUTTERFLY_NET))), new SkillChallengeClue("Catch a red chinchompa.", item(ItemID.BOX_TRAP)), new SkillChallengeClue("Mine a mithril ore.", ANY_PICKAXE), From a3b45ee50631c6cc82432b8a6dc07dc8de3db51f Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Tue, 23 Feb 2021 02:16:51 -0500 Subject: [PATCH 03/14] ItemMapping: Add Soul Wars imbues --- .../net/runelite/client/game/ItemMapping.java | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) 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 c8694b7153..ed9fc0df6c 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 @@ -155,15 +155,15 @@ public enum ItemMapping ITEM_ENSOULED_DRAGON_HEAD(ENSOULED_DRAGON_HEAD_13511, ENSOULED_DRAGON_HEAD), // Imbued rings - ITEM_BERSERKER_RING(BERSERKER_RING, BERSERKER_RING_I), - ITEM_SEERS_RING(SEERS_RING, SEERS_RING_I), - ITEM_WARRIOR_RING(WARRIOR_RING, WARRIOR_RING_I), - ITEM_ARCHERS_RING(ARCHERS_RING, ARCHERS_RING_I), - ITEM_TREASONOUS_RING(TREASONOUS_RING, TREASONOUS_RING_I), - ITEM_TYRANNICAL_RING(TYRANNICAL_RING, TYRANNICAL_RING_I), - ITEM_RING_OF_THE_GODS(RING_OF_THE_GODS, RING_OF_THE_GODS_I), - ITEM_RING_OF_SUFFERING(RING_OF_SUFFERING, RING_OF_SUFFERING_I, RING_OF_SUFFERING_R, RING_OF_SUFFERING_RI), - ITEM_GRANITE_RING(GRANITE_RING, GRANITE_RING_I), + ITEM_BERSERKER_RING(BERSERKER_RING, BERSERKER_RING_I, BERSERKER_RING_I_25264), + ITEM_SEERS_RING(SEERS_RING, SEERS_RING_I, SEERS_RING_I_25258), + ITEM_WARRIOR_RING(WARRIOR_RING, WARRIOR_RING_I, WARRIOR_RING_I_25262), + ITEM_ARCHERS_RING(ARCHERS_RING, ARCHERS_RING_I, ARCHERS_RING_I_25260), + ITEM_TREASONOUS_RING(TREASONOUS_RING, TREASONOUS_RING_I, TREASONOUS_RING_I_25256), + ITEM_TYRANNICAL_RING(TYRANNICAL_RING, TYRANNICAL_RING_I, TYRANNICAL_RING_I_25254), + ITEM_RING_OF_THE_GODS(RING_OF_THE_GODS, RING_OF_THE_GODS_I, RING_OF_THE_GODS_I_25252), + ITEM_RING_OF_SUFFERING(RING_OF_SUFFERING, RING_OF_SUFFERING_I, RING_OF_SUFFERING_R, RING_OF_SUFFERING_RI, RING_OF_SUFFERING_I_25246, RING_OF_SUFFERING_RI_25248), + ITEM_GRANITE_RING(GRANITE_RING, GRANITE_RING_I, GRANITE_RING_I_25193), // Bounty hunter ITEM_GRANITE_MAUL(GRANITE_MAUL, GRANITE_MAUL_12848), @@ -227,7 +227,9 @@ public enum ItemMapping BLACK_MASK, BLACK_MASK_I, BLACK_MASK_1, BLACK_MASK_1_I, BLACK_MASK_2, BLACK_MASK_2_I, BLACK_MASK_3, BLACK_MASK_3_I, BLACK_MASK_4, BLACK_MASK_4_I, BLACK_MASK_5, BLACK_MASK_5_I, BLACK_MASK_6, BLACK_MASK_6_I, BLACK_MASK_7, BLACK_MASK_7_I, BLACK_MASK_8, BLACK_MASK_8_I, BLACK_MASK_9, BLACK_MASK_9_I, BLACK_MASK_10_I, SLAYER_HELMET, SLAYER_HELMET_I, BLACK_SLAYER_HELMET, BLACK_SLAYER_HELMET_I, PURPLE_SLAYER_HELMET, PURPLE_SLAYER_HELMET_I, RED_SLAYER_HELMET, RED_SLAYER_HELMET_I, - GREEN_SLAYER_HELMET, GREEN_SLAYER_HELMET_I, TURQUOISE_SLAYER_HELMET, TURQUOISE_SLAYER_HELMET_I, TWISTED_SLAYER_HELMET, TWISTED_SLAYER_HELMET_I, HYDRA_SLAYER_HELMET, HYDRA_SLAYER_HELMET_I), + GREEN_SLAYER_HELMET, GREEN_SLAYER_HELMET_I, TURQUOISE_SLAYER_HELMET, TURQUOISE_SLAYER_HELMET_I, TWISTED_SLAYER_HELMET, TWISTED_SLAYER_HELMET_I, HYDRA_SLAYER_HELMET, HYDRA_SLAYER_HELMET_I, + SLAYER_HELMET_I_25177, BLACK_SLAYER_HELMET_I_25179, GREEN_SLAYER_HELMET_I_25181, RED_SLAYER_HELMET_I_25183, PURPLE_SLAYER_HELMET_I_25185, TURQUOISE_SLAYER_HELMET_I_25187, HYDRA_SLAYER_HELMET_I_25189, TWISTED_SLAYER_HELMET_I_25191, + BLACK_MASK_I_25276, BLACK_MASK_1_I_25275, BLACK_MASK_2_I_25274, BLACK_MASK_3_I_25273, BLACK_MASK_4_I_25272, BLACK_MASK_5_I_25271, BLACK_MASK_6_I_25270, BLACK_MASK_7_I_25269, BLACK_MASK_8_I_25268, BLACK_MASK_9_I_25267, BLACK_MASK_10_I_25266), // Pharaoh's Sceptres ITEM_PHARAOHS_SCEPTRE_1(PHARAOHS_SCEPTRE, PHARAOHS_SCEPTRE_1), @@ -245,7 +247,7 @@ public enum ItemMapping ITEM_BOTTOMLESS_COMPOST_BUCKET(BOTTOMLESS_COMPOST_BUCKET, BOTTOMLESS_COMPOST_BUCKET_22997), ITEM_BASILISK_JAW(BASILISK_JAW, NEITIZNOT_FACEGUARD), ITEM_HELM_OF_NEITIZNOT(HELM_OF_NEITIZNOT, NEITIZNOT_FACEGUARD), - ITEM_TWISTED_HORNS(TWISTED_HORNS, TWISTED_SLAYER_HELMET, TWISTED_SLAYER_HELMET_I), + ITEM_TWISTED_HORNS(TWISTED_HORNS, TWISTED_SLAYER_HELMET, TWISTED_SLAYER_HELMET_I, TWISTED_SLAYER_HELMET_I_25191), ITEM_ELDRITCH_ORB(ELDRITCH_ORB, ELDRITCH_NIGHTMARE_STAFF), ITEM_HARMONISED_ORB(HARMONISED_ORB, HARMONISED_NIGHTMARE_STAFF), ITEM_VOLATILE_ORB(VOLATILE_ORB, VOLATILE_NIGHTMARE_STAFF), From bc4144f41811a5021e61c11473850dacb5ea75aa Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Tue, 23 Feb 2021 08:58:29 -0700 Subject: [PATCH 04/14] Update Script arguments to 2021-2-23 --- runelite-api/src/main/java/net/runelite/api/ScriptID.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ae32b36b8b..3d8fda2197 100644 --- a/runelite-api/src/main/java/net/runelite/api/ScriptID.java +++ b/runelite-api/src/main/java/net/runelite/api/ScriptID.java @@ -318,7 +318,7 @@ public final class ScriptID *
  • int (WidgetID) drag parent
  • * */ - @ScriptArguments(integer = 7) + @ScriptArguments(integer = 8, string = 1) public static final int SETTINGS_SLIDER_CHOOSE_ONOP = 3885; /** From 98942ddfb3891c5e07933ef9281cfbd60844b6b6 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Tue, 23 Feb 2021 08:58:30 -0700 Subject: [PATCH 05/14] Update Item IDs to 2021-2-23 --- .../main/java/net/runelite/api/ItemID.java | 21 ++++++++++++++++++- .../java/net/runelite/api/NullItemID.java | 2 ++ 2 files changed, 22 insertions(+), 1 deletion(-) 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 df6d719ce9..20db96da92 100644 --- a/runelite-api/src/main/java/net/runelite/api/ItemID.java +++ b/runelite-api/src/main/java/net/runelite/api/ItemID.java @@ -11620,7 +11620,7 @@ public final class ItemID public static final int RED_ICON_25241 = 25241; public static final int RED_ICON_25242 = 25242; public static final int RED_ICON_25243 = 25243; - public static final int OLD_KEY_25244 = 25244; + public static final int DARK_KEY = 25244; public static final int RING_OF_SUFFERING_I_25246 = 25246; public static final int RING_OF_SUFFERING_RI_25248 = 25248; public static final int SALVE_AMULETI_25250 = 25250; @@ -11751,5 +11751,24 @@ public final class ItemID public static final int CRYSTAL_HELM_BETA = 25495; public static final int CRYSTAL_BODY_BETA = 25496; public static final int CRYSTAL_LEGS_BETA = 25497; + public static final int CLUE_SCROLL_ELITE_25498 = 25498; + public static final int CLUE_SCROLL_ELITE_25499 = 25499; + public static final int CURSED_BANANA = 25500; + public static final int BANANA_CAPE = 25502; + public static final int LIST_OF_MONKEY_SIGHTINGS = 25504; + public static final int PREMIUM_BANANA = 25505; + public static final int BAMBOO = 25506; + public static final int MONKEY_CAGE = 25507; + public static final int DONIES_CAGED_MONKEY = 25508; + public static final int BOBS_CAGED_MONKEY = 25509; + public static final int AERECKS_CAGED_MONKEY = 25510; + public static final int COWS_CAGED_MONKEY = 25511; + public static final int UNICORNS_CAGED_MONKEY = 25512; + public static final int SHEEPS_CAGED_MONKEY = 25513; + public static final int UNICORN_HORN_25514 = 25514; + public static final int DHAROKS_PLATEBODY_25515 = 25515; + public static final int DHAROKS_GREATAXE_25516 = 25516; + public static final int VOLATILE_NIGHTMARE_STAFF_25517 = 25517; + public static final int ANCESTRAL_HAT_25518 = 25518; /* This file is automatically generated. Do not edit. */ } diff --git a/runelite-api/src/main/java/net/runelite/api/NullItemID.java b/runelite-api/src/main/java/net/runelite/api/NullItemID.java index a0bc89a2aa..a0c04d41a3 100644 --- a/runelite-api/src/main/java/net/runelite/api/NullItemID.java +++ b/runelite-api/src/main/java/net/runelite/api/NullItemID.java @@ -13536,5 +13536,7 @@ public final class NullItemID public static final int NULL_25480 = 25480; public static final int NULL_25482 = 25482; public static final int NULL_25483 = 25483; + public static final int NULL_25501 = 25501; + public static final int NULL_25503 = 25503; /* This file is automatically generated. Do not edit. */ } From 49b30ae6d92a66e4c0864ef479908babb47101bc Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Tue, 23 Feb 2021 08:58:30 -0700 Subject: [PATCH 06/14] Update Item variations to 2021-2-23 --- .../src/main/resources/item_variations.json | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/runelite-client/src/main/resources/item_variations.json b/runelite-client/src/main/resources/item_variations.json index 9543697a90..9b69ac1f97 100644 --- a/runelite-client/src/main/resources/item_variations.json +++ b/runelite-client/src/main/resources/item_variations.json @@ -184,7 +184,8 @@ ], "unicorn horn": [ 237, - 1487 + 1487, + 25514 ], "wine of zamorak": [ 245, @@ -1353,7 +1354,9 @@ 23817, 24253, 24493, - 24773 + 24773, + 25498, + 25499 ], "radimus notes": [ 714, @@ -3939,7 +3942,8 @@ 4887, 4888, 4889, - 4890 + 4890, + 25516 ], "dharoks platebody": [ 4720, @@ -3947,7 +3951,8 @@ 4893, 4894, 4895, - 4896 + 4896, + 25515 ], "dharoks platelegs": [ 4722, @@ -8561,6 +8566,10 @@ 21009, 21206 ], + "ancestral hat": [ + 21018, + 25518 + ], "dragon harpoon": [ 21028, 25373 @@ -8967,10 +8976,6 @@ 22405, 22446 ], - "old key": [ - 22428, - 25244 - ], "battlemage potion": [ 22449, 22452, @@ -9422,6 +9427,10 @@ 24418, 24524 ], + "volatile nightmare staff": [ + 24424, + 25517 + ], "iced gingerbread shield": [ 24438, 24439, From 3e0c19bb99518c6496b5277984ea8bafc01d7ae6 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Tue, 23 Feb 2021 08:58:30 -0700 Subject: [PATCH 07/14] Update Object IDs to 2021-2-23 --- .../java/net/runelite/api/NullObjectID.java | 65 +++++++++++++++++-- .../main/java/net/runelite/api/ObjectID.java | 43 +++++++++++- 2 files changed, 98 insertions(+), 10 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 91bb2fdc18..578986a5d4 100644 --- a/runelite-api/src/main/java/net/runelite/api/NullObjectID.java +++ b/runelite-api/src/main/java/net/runelite/api/NullObjectID.java @@ -19970,13 +19970,7 @@ public final class NullObjectID public static final int NULL_40720 = 40720; public static final int NULL_40721 = 40721; public static final int NULL_40722 = 40722; - public static final int NULL_40724 = 40724; - public static final int NULL_40726 = 40726; - public static final int NULL_40727 = 40727; - public static final int NULL_40729 = 40729; - public static final int NULL_40730 = 40730; - public static final int NULL_40740 = 40740; - public static final int NULL_40743 = 40743; + public static final int NULL_40741 = 40741; public static final int NULL_40747 = 40747; public static final int NULL_40748 = 40748; public static final int NULL_40749 = 40749; @@ -20001,13 +19995,70 @@ public final class NullObjectID public static final int NULL_40898 = 40898; public static final int NULL_40907 = 40907; public static final int NULL_40908 = 40908; + public static final int NULL_40918 = 40918; + public static final int NULL_40919 = 40919; + public static final int NULL_40920 = 40920; + public static final int NULL_40921 = 40921; + public static final int NULL_40922 = 40922; + public static final int NULL_40923 = 40923; + public static final int NULL_40924 = 40924; public static final int NULL_40925 = 40925; public static final int NULL_40926 = 40926; public static final int NULL_40927 = 40927; public static final int NULL_40928 = 40928; + public static final int NULL_40929 = 40929; + public static final int NULL_40930 = 40930; + public static final int NULL_40931 = 40931; public static final int NULL_40934 = 40934; public static final int NULL_40935 = 40935; public static final int NULL_40936 = 40936; + public static final int NULL_40939 = 40939; + public static final int NULL_40940 = 40940; + public static final int NULL_40941 = 40941; + public static final int NULL_40943 = 40943; + public static final int NULL_40958 = 40958; + public static final int NULL_40960 = 40960; + public static final int NULL_40961 = 40961; + public static final int NULL_40962 = 40962; + public static final int NULL_40973 = 40973; + public static final int NULL_40974 = 40974; + public static final int NULL_40975 = 40975; + public static final int NULL_40976 = 40976; + public static final int NULL_40977 = 40977; + public static final int NULL_40978 = 40978; + public static final int NULL_40979 = 40979; + public static final int NULL_40980 = 40980; + public static final int NULL_40981 = 40981; + public static final int NULL_40983 = 40983; + public static final int NULL_40984 = 40984; + public static final int NULL_40985 = 40985; + public static final int NULL_40986 = 40986; + public static final int NULL_40987 = 40987; + public static final int NULL_40988 = 40988; + public static final int NULL_40989 = 40989; + public static final int NULL_40990 = 40990; + public static final int NULL_40991 = 40991; + public static final int NULL_40992 = 40992; + public static final int NULL_40993 = 40993; + public static final int NULL_40994 = 40994; + public static final int NULL_40995 = 40995; + public static final int NULL_40996 = 40996; + public static final int NULL_40997 = 40997; + public static final int NULL_40998 = 40998; + public static final int NULL_40999 = 40999; + public static final int NULL_41000 = 41000; + public static final int NULL_41001 = 41001; + public static final int NULL_41002 = 41002; + public static final int NULL_41003 = 41003; + public static final int NULL_41004 = 41004; + public static final int NULL_41005 = 41005; + public static final int NULL_41006 = 41006; + public static final int NULL_41007 = 41007; + public static final int NULL_41008 = 41008; + public static final int NULL_41009 = 41009; + public static final int NULL_41010 = 41010; + public static final int NULL_41011 = 41011; + public static final int NULL_41012 = 41012; public static final int NULL_41022 = 41022; public static final int NULL_41191 = 41191; public static final int NULL_41192 = 41192; 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 8bf9ca4de0..12c8966850 100644 --- a/runelite-api/src/main/java/net/runelite/api/ObjectID.java +++ b/runelite-api/src/main/java/net/runelite/api/ObjectID.java @@ -923,11 +923,13 @@ public final class ObjectID public static final int SAILS = 1779; public static final int SAILS_1780 = 1780; public static final int FLOUR_BIN = 1782; + public static final int WALL_1796 = 1796; public static final int WATERFALL_ROCKS = 1797; public static final int DOOR_1804 = 1804; public static final int DOOR_1805 = 1805; public static final int WEB_1810 = 1810; public static final int SLICED_WEB = 1811; + public static final int CRATE_1812 = 1812; public static final int BANDAGE_TABLE = 1813; public static final int LEVER_1814 = 1814; public static final int LEVER_1816 = 1816; @@ -20737,9 +20739,14 @@ public final class ObjectID public static final int BARREL_40590 = 40590; public static final int TREE_40715 = 40715; public static final int TREE_40716 = 40716; - public static final int FENCE_40723 = 40723; + public static final int CRATE_40723 = 40723; + public static final int CRATES_40724 = 40724; public static final int ANVIL_40725 = 40725; + public static final int CRATES_40726 = 40726; + public static final int BARREL_40727 = 40727; public static final int FIRE_40728 = 40728; + public static final int STOOL_40729 = 40729; + public static final int TABLE_40730 = 40730; public static final int TENT_40731 = 40731; public static final int BROKEN_POTTERS_WHEEL = 40732; public static final int POTTERS_WHEEL_40733 = 40733; @@ -20749,8 +20756,9 @@ public final class ObjectID public static final int OPENING_40737 = 40737; public static final int BONES_40738 = 40738; public static final int CHEST_40739 = 40739; - public static final int CHEST_40741 = 40741; - public static final int LOCKED_CHEST_40742 = 40742; + public static final int CHEST_40740 = 40740; + public static final int DARK_CHEST = 40742; + public static final int DARK_CHEST_40743 = 40743; public static final int BARREL_40744 = 40744; public static final int LADDER_40745 = 40745; public static final int LADDER_40746 = 40746; @@ -20903,6 +20911,35 @@ public final class ObjectID public static final int STATUE_40917 = 40917; public static final int EVERGREEN_40932 = 40932; public static final int EVERGREEN_40933 = 40933; + public static final int OLD_STALL_40937 = 40937; + public static final int CART_40938 = 40938; + public static final int GALLOWS_40942 = 40942; + public static final int HEROIC_STATUE_40944 = 40944; + public static final int STONE_TABLE_40945 = 40945; + public static final int ROCK_40946 = 40946; + public static final int SMALL_ROCK_40947 = 40947; + public static final int ROCK_40948 = 40948; + public static final int FURNACE_40949 = 40949; + public static final int DEAD_TREE_40950 = 40950; + public static final int DEAD_TREE_40951 = 40951; + public static final int ROOTS_40952 = 40952; + public static final int ROOTS_40953 = 40953; + public static final int ROOTS_40954 = 40954; + public static final int UNICORN = 40955; + public static final int ROCKS_40956 = 40956; + public static final int ROCKS_40957 = 40957; + public static final int ROPE_40959 = 40959; + public static final int BAMBOO_MONKEY_TRAP = 40963; + public static final int BANANA_BARREL = 40964; + public static final int BAMBOO_BARREL = 40965; + public static final int CAGED_MONKEY_BOB = 40966; + public static final int CAGED_MONKEY_DONIE = 40967; + public static final int CAGED_MONKEY_AERECK = 40968; + public static final int CAGED_MONKEY_UNICORN = 40969; + public static final int CAGED_MONKEY_COW = 40970; + public static final int CAGED_MONKEY_SHEEP = 40971; + public static final int FIREWORKS = 40972; + public static final int POST_40982 = 40982; public static final int POTION_OF_POWER_TABLE_41023 = 41023; public static final int PEDESTAL_SPACE = 41024; public static final int PEDESTAL_SPACE_41025 = 41025; From af7aae49b984882ea97aeb372ceb4a558f45f6d9 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Tue, 23 Feb 2021 08:58:30 -0700 Subject: [PATCH 08/14] Update NPC IDs to 2021-2-23 --- .../src/main/java/net/runelite/api/NpcID.java | 47 +++++++++++++++++-- .../main/java/net/runelite/api/NullNpcID.java | 13 +++++ 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/NpcID.java b/runelite-api/src/main/java/net/runelite/api/NpcID.java index f6bef67796..b63ecd03ed 100644 --- a/runelite-api/src/main/java/net/runelite/api/NpcID.java +++ b/runelite-api/src/main/java/net/runelite/api/NpcID.java @@ -885,7 +885,6 @@ public final class NpcID public static final int CLAY_GOLEM = 917; public static final int CLAY_GOLEM_918 = 918; public static final int GHOST_920 = 920; - public static final int FATHER_AERECK = 921; public static final int RESTLESS_GHOST = 922; public static final int FATHER_URHNEY = 923; public static final int SKELETON_924 = 924; @@ -2638,7 +2637,6 @@ public final class NpcID public static final int PIGLET_2809 = 2809; public static final int PIGLET_2810 = 2810; public static final int PIGLET_2811 = 2811; - public static final int BOB_2812 = 2812; public static final int SHOP_KEEPER = 2813; public static final int SHOP_ASSISTANT = 2814; public static final int SHOP_KEEPER_2815 = 2815; @@ -6164,7 +6162,6 @@ public final class NpcID public static final int LAMMY_LANGLE = 6814; public static final int MAN_6815 = 6815; public static final int GEE = 6816; - public static final int DONIE = 6817; public static final int MAN_6818 = 6818; public static final int TOWN_CRIER_6823 = 6823; public static final int GIANT_BAT_6824 = 6824; @@ -8922,14 +8919,58 @@ public final class NpcID public static final int DUCK_10546 = 10546; public static final int DUCK_10547 = 10547; public static final int CHICKEN_10556 = 10556; + public static final int ANCIENT_GHOST = 10557; + public static final int ANCIENT_GHOST_10558 = 10558; public static final int SCRUBFOOT = 10559; + public static final int GARL = 10560; public static final int RED_FIREFLIES = 10561; + public static final int DONIE = 10562; + public static final int DONIE_10563 = 10563; public static final int GREEN_FIREFLIES = 10564; + public static final int FATHER_AERECK = 10565; public static final int GOBLIN_10566 = 10566; public static final int GOBLIN_10567 = 10567; + public static final int FATHER_AERECK_10568 = 10568; + public static final int DUKE_HORACIO_10569 = 10569; + public static final int AWOWOGEI_10570 = 10570; + public static final int ZEKE_10571 = 10571; + public static final int ELUNED_10572 = 10572; + public static final int MOFINA_10573 = 10573; + public static final int BOB_10574 = 10574; + public static final int FATHER_AERECK_10575 = 10575; + public static final int DONIE_10576 = 10576; + public static final int MONKEY_ON_COW = 10577; + public static final int SHEEP_10578 = 10578; + public static final int MONKEY_ON_UNICORN = 10579; + public static final int BOB_10580 = 10580; + public static final int BOB_10581 = 10581; + public static final int BOB_10582 = 10582; + public static final int DONIE_10583 = 10583; + public static final int DONIE_10584 = 10584; + public static final int DONIE_10585 = 10585; + public static final int DONIE_10586 = 10586; + public static final int FATHER_AERECK_10587 = 10587; + public static final int FATHER_AERECK_10588 = 10588; public static final int URIUM_SHADE = 10589; public static final int DAMPE = 10590; public static final int UNDEAD_ZEALOT = 10591; public static final int UNDEAD_ZEALOT_10592 = 10592; + public static final int FATHER_AERECK_10593 = 10593; + public static final int SHEEP_10594 = 10594; + public static final int SHEEP_10595 = 10595; + public static final int SHEEP_10596 = 10596; + public static final int SHEEP_10597 = 10597; + public static final int COW_10598 = 10598; + public static final int MONKEY_ON_COW_10599 = 10599; + public static final int MONKEY_ON_COW_10600 = 10600; + public static final int COW_10601 = 10601; + public static final int MONKEY_ON_UNICORN_10603 = 10603; + public static final int MONKEY_ON_UNICORN_10604 = 10604; + public static final int MONKEY_ON_UNICORN_10605 = 10605; + public static final int UNICORN_10607 = 10607; + public static final int UNICORN_10608 = 10608; + public static final int UNICORN1337KILR = 10609; + public static final int BOB_10610 = 10610; + public static final int BOB_10611 = 10611; /* This file is automatically generated. Do not edit. */ } diff --git a/runelite-api/src/main/java/net/runelite/api/NullNpcID.java b/runelite-api/src/main/java/net/runelite/api/NullNpcID.java index c0acd7f40c..36e299be37 100644 --- a/runelite-api/src/main/java/net/runelite/api/NullNpcID.java +++ b/runelite-api/src/main/java/net/runelite/api/NullNpcID.java @@ -41,6 +41,7 @@ public final class NullNpcID public static final int NULL_915 = 915; public static final int NULL_916 = 916; public static final int NULL_919 = 919; + public static final int NULL_921 = 921; public static final int NULL_1023 = 1023; public static final int NULL_1033 = 1033; public static final int NULL_1034 = 1034; @@ -173,6 +174,7 @@ public final class NullNpcID public static final int NULL_2779 = 2779; public static final int NULL_2780 = 2780; public static final int NULL_2781 = 2781; + public static final int NULL_2812 = 2812; public static final int NULL_2831 = 2831; public static final int NULL_2934 = 2934; public static final int NULL_2935 = 2935; @@ -641,6 +643,7 @@ public final class NullNpcID public static final int NULL_6808 = 6808; public static final int NULL_6809 = 6809; public static final int NULL_6810 = 6810; + public static final int NULL_6817 = 6817; public static final int NULL_6819 = 6819; public static final int NULL_6820 = 6820; public static final int NULL_6821 = 6821; @@ -1618,5 +1621,15 @@ public final class NullNpcID public static final int NULL_10553 = 10553; public static final int NULL_10554 = 10554; public static final int NULL_10555 = 10555; + public static final int NULL_10602 = 10602; + public static final int NULL_10606 = 10606; + public static final int NULL_10612 = 10612; + public static final int NULL_10613 = 10613; + public static final int NULL_10614 = 10614; + public static final int NULL_10615 = 10615; + public static final int NULL_10616 = 10616; + public static final int NULL_10617 = 10617; + public static final int NULL_10618 = 10618; + public static final int NULL_10619 = 10619; /* This file is automatically generated. Do not edit. */ } From c2f27fcdac53ee87511d188f835495362c616dda Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Tue, 23 Feb 2021 08:58:37 -0700 Subject: [PATCH 09/14] Update Widget IDs to 2021-2-23 --- .../src/main/java/net/runelite/api/widgets/WidgetID.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 00b0a517c4..4f752bfef0 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 @@ -906,7 +906,7 @@ public class WidgetID static class LmsKDA { - static final int INFO = 5; + static final int INFO = 6; } static class AdventureLog From fc72d17a5575a0a6c042979fe3c018d19fa578a5 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 21 Feb 2021 22:11:43 -0500 Subject: [PATCH 10/14] ping: use icmp ping on linux if available This uses IPPROTO_ICMP sockets, which most modern linux systems support. This allows directly sending icmp echo requests without having to use the tcp ping check. As a fallback the old tcp ping method is used if socket setup fails. --- .../client/plugins/worldhopper/ping/Ping.java | 118 +++++++++++++++--- .../plugins/worldhopper/ping/RLLibC.java | 50 ++++++++ .../plugins/worldhopper/ping/Timeval.java | 41 ++++++ 3 files changed, 194 insertions(+), 15 deletions(-) create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/ping/RLLibC.java create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/ping/Timeval.java diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/ping/Ping.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/ping/Ping.java index 42c88d4975..59f7eb85d4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/ping/Ping.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/ping/Ping.java @@ -24,6 +24,8 @@ */ package net.runelite.client.plugins.worldhopper.ping; +import com.google.common.base.Charsets; +import com.google.common.primitives.Bytes; import com.sun.jna.Memory; import com.sun.jna.Pointer; import java.io.IOException; @@ -38,21 +40,42 @@ import net.runelite.http.api.worlds.World; @Slf4j public class Ping { - private static final String RUNELITE_PING = "RuneLitePing"; - - private static final int TIMEOUT = 2000; + private static final byte[] RUNELITE_PING = "RuneLitePing".getBytes(Charsets.UTF_8); + private static final int TIMEOUT = 2000; // ms private static final int PORT = 43594; + private static short seq; + public static int ping(World world) { + InetAddress inetAddress; + try + { + inetAddress = InetAddress.getByName(world.getAddress()); + } + catch (UnknownHostException ex) + { + log.warn("error resolving host for world ping", ex); + return -1; + } + try { switch (OSType.getOSType()) { case Windows: - return windowsPing(world); + return windowsPing(inetAddress); + case Linux: + try + { + return linuxPing(inetAddress); + } + catch (Exception ex) + { + return tcpPing(inetAddress); + } default: - return tcpPing(world); + return tcpPing(inetAddress); } } catch (IOException ex) @@ -62,22 +85,19 @@ public class Ping } } - private static int windowsPing(World world) throws UnknownHostException + private static int windowsPing(InetAddress inetAddress) { IPHlpAPI ipHlpAPI = IPHlpAPI.INSTANCE; Pointer ptr = ipHlpAPI.IcmpCreateFile(); try { - InetAddress inetAddress = InetAddress.getByName(world.getAddress()); byte[] address = inetAddress.getAddress(); - String dataStr = RUNELITE_PING; - int dataLength = dataStr.length() + 1; - Pointer data = new Memory(dataLength); - data.setString(0L, dataStr); - IcmpEchoReply icmpEchoReply = new IcmpEchoReply(new Memory(IcmpEchoReply.SIZE + dataLength)); + Memory data = new Memory(RUNELITE_PING.length); + data.write(0, RUNELITE_PING, 0, RUNELITE_PING.length); + IcmpEchoReply icmpEchoReply = new IcmpEchoReply(new Memory(IcmpEchoReply.SIZE + data.size())); assert icmpEchoReply.size() == IcmpEchoReply.SIZE; int packed = (address[0] & 0xff) | ((address[1] & 0xff) << 8) | ((address[2] & 0xff) << 16) | ((address[3] & 0xff) << 24); - int ret = ipHlpAPI.IcmpSendEcho(ptr, packed, data, (short) (dataLength), Pointer.NULL, icmpEchoReply, IcmpEchoReply.SIZE + dataLength, TIMEOUT); + int ret = ipHlpAPI.IcmpSendEcho(ptr, packed, data, (short) data.size(), Pointer.NULL, icmpEchoReply, IcmpEchoReply.SIZE + (int) data.size(), TIMEOUT); if (ret != 1) { return -1; @@ -91,12 +111,80 @@ public class Ping } } - private static int tcpPing(World world) throws IOException + private static int linuxPing(InetAddress inetAddress) throws IOException + { + RLLibC libc = RLLibC.INSTANCE; + byte[] address = inetAddress.getAddress(); + + int sock = libc.socket(libc.AF_INET, libc.SOCK_DGRAM, libc.IPPROTO_ICMP); + if (sock < 0) + { + throw new IOException("failed to open ICMP socket"); + } + + try + { + Timeval tv = new Timeval(); + tv.tv_sec = TIMEOUT / 1000; + if (libc.setsockopt(sock, libc.SOL_SOCKET, libc.SO_RCVTIMEO, tv.getPointer(), tv.size()) < 0) + { + throw new IOException("failed to set SO_RCVTIMEO"); + } + + short seqno = seq++; + + // struct icmphdr + byte[] request = { + 8, // type 8 - ipv4 echo request + 0, // code + 0, 0, // checksum (set by kernel) + 0, 0, // id (set by kernel) + (byte) (((seqno >> 8) & 0xff)), (byte) (seqno & 0xff) + }; + // append payload + request = Bytes.concat(request, RUNELITE_PING); + // struct sockaddr_in + byte[] addr = { + (byte) libc.AF_INET, 0, // sin_family + 0, 0, // sin_port + address[0], address[1], address[2], address[3], // sin_addr.s_addr + 0, 0, 0, 0, 0, 0, 0, 0 // padding + }; + + long start = System.nanoTime(); + if (libc.sendto(sock, request, request.length, 0, addr, addr.length) != request.length) + { + return -1; + } + + int size = 8 + RUNELITE_PING.length; // struct icmphdr + response + Memory response = new Memory(size); + if (libc.recvfrom(sock, response, size, 0, null, null) != size) + { + return -1; + } + long end = System.nanoTime(); + + short seq = (short) (((response.getByte(6) & 0xff) << 8) | response.getByte(7) & 0xff); + if (seqno != seq) + { + log.warn("sequence number mismatch ({} != {})", seqno, seq); + return -1; + } + + return (int) ((end - start) / 1_000_000); + } + finally + { + libc.close(sock); + } + } + + private static int tcpPing(InetAddress inetAddress) throws IOException { try (Socket socket = new Socket()) { socket.setSoTimeout(TIMEOUT); - InetAddress inetAddress = InetAddress.getByName(world.getAddress()); long start = System.nanoTime(); socket.connect(new InetSocketAddress(inetAddress, PORT)); long end = System.nanoTime(); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/ping/RLLibC.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/ping/RLLibC.java new file mode 100644 index 0000000000..4692f04a71 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/ping/RLLibC.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2021, Adam + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.plugins.worldhopper.ping; + +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import com.sun.jna.platform.unix.LibC; + +interface RLLibC extends LibC +{ + RLLibC INSTANCE = Native.loadLibrary(NAME, RLLibC.class); + + int AF_INET = 2; + int SOCK_DGRAM = 2; + int SOL_SOCKET = 1; + int IPPROTO_ICMP = 1; + int SO_RCVTIMEO = 20; + + int socket(int domain, int type, int protocol); + + void close(int socket); + + int sendto(int sockfd, byte[] buf, int len, int flags, byte[] dest_addr, int addrlen); + + int recvfrom(int sockfd, Pointer buf, int len, int flags, Pointer src_addr, Pointer addrlen); + + int setsockopt(int sockfd, int level, int optname, Pointer optval, int optlen); +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/ping/Timeval.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/ping/Timeval.java new file mode 100644 index 0000000000..e887b55190 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/ping/Timeval.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021, Adam + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.plugins.worldhopper.ping; + +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; + +public class Timeval extends Structure +{ + public long tv_sec; + public long tv_usec; + + @Override + protected List getFieldOrder() + { + return Arrays.asList("tv_sec", "tv_usec"); + } +} From f7a7d3c1fc56065d55c7ccc86ef8e206ef75e6e6 Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Wed, 24 Feb 2021 11:39:13 +0000 Subject: [PATCH 11/14] Update 194 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 51d715e468..c77ec89ee7 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ true - 193 + 194 From 82e6c6207ea97dc6b1e6ef04815e6706af5410ad Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Wed, 24 Feb 2021 11:55:14 +0000 Subject: [PATCH 12/14] Release 1.7.1 --- 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 dda9747db8..72ab7e41a5 100644 --- a/cache-client/pom.xml +++ b/cache-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.1-SNAPSHOT + 1.7.1 cache-client diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml index daabcfeec2..2cb2f01921 100644 --- a/cache-updater/pom.xml +++ b/cache-updater/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.1-SNAPSHOT + 1.7.1 Cache Updater diff --git a/cache/pom.xml b/cache/pom.xml index 40d121afe9..05ad60492d 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.1-SNAPSHOT + 1.7.1 cache diff --git a/http-api/pom.xml b/http-api/pom.xml index 9ac04bacbf..3d556fde11 100644 --- a/http-api/pom.xml +++ b/http-api/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.1-SNAPSHOT + 1.7.1 Web API diff --git a/http-service/pom.xml b/http-service/pom.xml index ac41551a3a..a9b690f16d 100644 --- a/http-service/pom.xml +++ b/http-service/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.1-SNAPSHOT + 1.7.1 Web Service diff --git a/pom.xml b/pom.xml index c77ec89ee7..f7c5ccbfef 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.1-SNAPSHOT + 1.7.1 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.7.1 diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index 58aa0a549a..d8bb66d7e5 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.1-SNAPSHOT + 1.7.1 runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index 35d74b8b6f..33cd369884 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.1-SNAPSHOT + 1.7.1 client diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index 17e6be9199..b9ea01b2f2 100644 --- a/runelite-script-assembler-plugin/pom.xml +++ b/runelite-script-assembler-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.1-SNAPSHOT + 1.7.1 script-assembler-plugin From 980bc6ba764102a7cf0cc914cb10081a796b7e87 Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Wed, 24 Feb 2021 11:55:23 +0000 Subject: [PATCH 13/14] Bump for 1.7.2-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 72ab7e41a5..2fb04f14d7 100644 --- a/cache-client/pom.xml +++ b/cache-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.1 + 1.7.2-SNAPSHOT cache-client diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml index 2cb2f01921..68430f22b6 100644 --- a/cache-updater/pom.xml +++ b/cache-updater/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.1 + 1.7.2-SNAPSHOT Cache Updater diff --git a/cache/pom.xml b/cache/pom.xml index 05ad60492d..bf00fde2b1 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.1 + 1.7.2-SNAPSHOT cache diff --git a/http-api/pom.xml b/http-api/pom.xml index 3d556fde11..f192b71c49 100644 --- a/http-api/pom.xml +++ b/http-api/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.1 + 1.7.2-SNAPSHOT Web API diff --git a/http-service/pom.xml b/http-service/pom.xml index a9b690f16d..8d3b05dc49 100644 --- a/http-service/pom.xml +++ b/http-service/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.1 + 1.7.2-SNAPSHOT Web Service diff --git a/pom.xml b/pom.xml index f7c5ccbfef..c3ccba7052 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.1 + 1.7.2-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.7.1 + HEAD diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index d8bb66d7e5..8634829df5 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.1 + 1.7.2-SNAPSHOT runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index 33cd369884..37364a3f5b 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.1 + 1.7.2-SNAPSHOT client diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index b9ea01b2f2..d5bc0a593a 100644 --- a/runelite-script-assembler-plugin/pom.xml +++ b/runelite-script-assembler-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.1 + 1.7.2-SNAPSHOT script-assembler-plugin From 78eb69c8df8f823a590fe267bf9663591c3c09c0 Mon Sep 17 00:00:00 2001 From: superiorser9 <58041466+superiorser9@users.noreply.github.com> Date: Thu, 25 Feb 2021 02:29:29 +0000 Subject: [PATCH 14/14] music: fix settings_slider_choose_onop stack mapping (#13268) see bc4144f41811a5021e61c11473850dacb5ea75aa --- .../java/net/runelite/client/plugins/music/MusicPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/music/MusicPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/music/MusicPlugin.java index b557cc18b3..a8ef79401f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/music/MusicPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/music/MusicPlugin.java @@ -705,7 +705,7 @@ public class MusicPlugin extends Plugin return; } - int arg = client.getIntStackSize() - 7; + int arg = client.getIntStackSize() - 8; int[] is = client.getIntStack(); Channel channel; switch (is[arg])