From 643a89223c75925af2ace6aec38d9d3c2d6ca738 Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Fri, 12 Oct 2018 18:47:11 +0200 Subject: [PATCH 1/2] Reorder menu swaps again by name Signed-off-by: Tomas Slusny --- .../MenuEntrySwapperConfig.java | 354 +++++++++--------- .../MenuEntrySwapperPlugin.java | 8 +- 2 files changed, 181 insertions(+), 181 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 d4c8c1ea64..3083e7a93b 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 @@ -44,182 +44,6 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( position = 1, - keyName = "swapBanker", - name = "Bank", - description = "Swap Talk-to with Bank on Bank NPC
Example: Banker" - ) - default boolean swapBank() - { - return true; - } - - @ConfigItem( - position = 2, - keyName = "swapBirdhouseEmpty", - name = "Birdhouse", - description = "Swap Interact with Empty for birdhouses on Fossil Island" - ) - default boolean swapBirdhouseEmpty() - { - return true; - } - - @ConfigItem( - position = 3, - keyName = "swapBones", - name = "Bury", - description = "Swap Bury with Use on Bones" - ) - default boolean swapBones() - { - return true; - } - - @ConfigItem( - position = 4, - keyName = "swapChase", - name = "Chase", - description = "Allows to left click your cat to chase" - ) - default boolean swapChase() - { - return true; - } - - @ConfigItem( - position = 5, - keyName = "claimSlime", - name = "Claim Slime", - description = "Swap Talk-to with Claim Slime from Morytania diaries" - ) - default boolean claimSlime() - { - return true; - } - - @ConfigItem( - position = 6, - keyName = "swapExchange", - name = "Exchange", - description = "Swap Talk-to with Exchange on NPC
Example: Grand Exchange Clerk, Tool Leprechaun, Void Knight" - ) - default boolean swapExchange() - { - return true; - } - - @ConfigItem( - position = 7, - keyName = "swapFairyRing", - name = "Fairy ring", - description = "Swap Zanaris with Last-destination or Configure on Fairy rings" - ) - default FairyRingMode swapFairyRing() - { - return FairyRingMode.LAST_DESTINATION; - } - - @ConfigItem( - position = 8, - keyName = "swapHarpoon", - name = "Harpoon", - description = "Swap Cage, Big Net with Harpoon on Fishing spot" - ) - default boolean swapHarpoon() - { - return true; - } - - @ConfigItem( - position = 9, - keyName = "swapHomePortal", - name = "Home", - description = "Swap Enter with Home or Build or Friend's house on Portal" - ) - default HouseMode swapHomePortal() - { - return HouseMode.HOME; - } - - @ConfigItem( - position = 10, - keyName = "swapPickpocket", - name = "Pickpocket on H.A.M.", - description = "Swap Talk-to with Pickpocket on H.A.M members" - ) - default boolean swapPickpocket() - { - return true; - } - - @ConfigItem( - position = 11, - keyName = "swapPay", - name = "Pay", - description = "Swap Talk-to with Pay on NPC
Example: Elstan, Heskel, Fayeth" - ) - default boolean swapPay() - { - return true; - } - - @ConfigItem( - position = 12, - keyName = "swapBoxTrap", - name = "Reset", - description = "Swap Check with Reset on box trap" - ) - default boolean swapBoxTrap() - { - return true; - } - - @ConfigItem( - position = 13, - keyName = "swapTeleportItem", - name = "Teleport item", - description = "Swap Wear, Wield with Rub, Teleport on teleport item
Example: Amulet of glory, Ardougne cloak, Chronicle" - ) - default boolean swapTeleportItem() - { - return false; - } - - @ConfigItem( - position = 14, - keyName = "swapAbyssTeleport", - name = "Teleport to Abyss", - description = "Swap Talk-to with Teleport for the Mage of Zamorak" - ) - default boolean swapAbyssTeleport() - { - return true; - } - - @ConfigItem( - position = 15, - keyName = "swapTrade", - name = "Trade", - description = "Swap Talk-to with Trade on NPC
Example: Shop keeper, Shop assistant" - ) - default boolean swapTrade() - { - return true; - } - - @ConfigItem( - position = 16, - keyName = "swapTravel", - name = "Travel", - description = "Swap Talk-to with Travel, Take-boat, Pay-fare, Charter on NPC
Example: Squire, Monk of Entrana, Customs officer, Trader Crewmember" - ) - default boolean swapTravel() - { - return true; - } - - @ConfigItem( - position = 17, keyName = "swapAssignment", name = "Assignment", description = "Swap Talk-to with Assignment for Slayer Masters. This will take priority over swapping Trade." @@ -230,7 +54,62 @@ public interface MenuEntrySwapperConfig extends Config } @ConfigItem( - position = 18, + position = 2, + keyName = "swapBanker", + name = "Bank", + description = "Swap Talk-to with Bank on Bank NPC
Example: Banker" + ) + default boolean swapBank() + { + return true; + } + + @ConfigItem( + position = 3, + keyName = "swapBirdhouseEmpty", + name = "Birdhouse", + description = "Swap Interact with Empty for birdhouses on Fossil Island" + ) + default boolean swapBirdhouseEmpty() + { + return true; + } + + @ConfigItem( + position = 4, + keyName = "swapBones", + name = "Bury", + description = "Swap Bury with Use on Bones" + ) + default boolean swapBones() + { + return true; + } + + @ConfigItem( + position = 5, + keyName = "swapChase", + name = "Chase", + description = "Allows to left click your cat to chase" + ) + default boolean swapChase() + { + return true; + } + + @ConfigItem( + position = 6, + keyName = "claimSlime", + name = "Claim Slime", + description = "Swap Talk-to with Claim Slime from Morytania diaries" + ) + default boolean claimSlime() + { + return true; + } + + @ConfigItem( + position = 7, keyName = "swapDecant", name = "Decant", description = "Swap Talk-to with Decant for Bob Barter and Murky Matt at the Grand Exchange." @@ -239,4 +118,125 @@ public interface MenuEntrySwapperConfig extends Config { return false; } + + @ConfigItem( + position = 8, + keyName = "swapExchange", + name = "Exchange", + description = "Swap Talk-to with Exchange on NPC
Example: Grand Exchange Clerk, Tool Leprechaun, Void Knight" + ) + default boolean swapExchange() + { + return true; + } + + @ConfigItem( + position = 9, + keyName = "swapFairyRing", + name = "Fairy ring", + description = "Swap Zanaris with Last-destination or Configure on Fairy rings" + ) + default FairyRingMode swapFairyRing() + { + return FairyRingMode.LAST_DESTINATION; + } + + @ConfigItem( + position = 10, + keyName = "swapHarpoon", + name = "Harpoon", + description = "Swap Cage, Big Net with Harpoon on Fishing spot" + ) + default boolean swapHarpoon() + { + return true; + } + + @ConfigItem( + position = 11, + keyName = "swapHomePortal", + name = "Home", + description = "Swap Enter with Home or Build or Friend's house on Portal" + ) + default HouseMode swapHomePortal() + { + return HouseMode.HOME; + } + + @ConfigItem( + position = 12, + keyName = "swapPickpocket", + name = "Pickpocket on H.A.M.", + description = "Swap Talk-to with Pickpocket on H.A.M members" + ) + default boolean swapPickpocket() + { + return true; + } + + @ConfigItem( + position = 13, + keyName = "swapPay", + name = "Pay", + description = "Swap Talk-to with Pay on NPC
Example: Elstan, Heskel, Fayeth" + ) + default boolean swapPay() + { + return true; + } + + @ConfigItem( + position = 14, + keyName = "swapBoxTrap", + name = "Reset", + description = "Swap Check with Reset on box trap" + ) + default boolean swapBoxTrap() + { + return true; + } + + @ConfigItem( + position = 15, + keyName = "swapTeleportItem", + name = "Teleport item", + description = "Swap Wear, Wield with Rub, Teleport on teleport item
Example: Amulet of glory, Ardougne cloak, Chronicle" + ) + default boolean swapTeleportItem() + { + return false; + } + + @ConfigItem( + position = 16, + keyName = "swapAbyssTeleport", + name = "Teleport to Abyss", + description = "Swap Talk-to with Teleport for the Mage of Zamorak" + ) + default boolean swapAbyssTeleport() + { + return true; + } + + @ConfigItem( + position = 17, + keyName = "swapTrade", + name = "Trade", + description = "Swap Talk-to with Trade on NPC
Example: Shop keeper, Shop assistant" + ) + default boolean swapTrade() + { + return true; + } + + @ConfigItem( + position = 18, + keyName = "swapTravel", + name = "Travel", + description = "Swap Talk-to with Travel, Take-boat, Pay-fare, Charter on NPC
Example: Squire, Monk of Entrana, Customs officer, Trader Crewmember" + ) + default boolean swapTravel() + { + return true; + } } 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 53dbc8d19b..be1265e174 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 @@ -460,6 +460,10 @@ public class MenuEntrySwapperPlugin extends Plugin { swap("chase", option, target, true); } + else if (config.swapBirdhouseEmpty() && option.equals("interact") && target.contains("birdhouse")) + { + swap("empty", option, target, true); + } else if (config.shiftClickCustomization() && shiftModifier && !option.equals("use")) { Integer customOption = getSwapConfig(itemId); @@ -486,10 +490,6 @@ public class MenuEntrySwapperPlugin extends Plugin { swap("use", option, target, true); } - else if (config.swapBirdhouseEmpty() && option.equals("interact") && target.contains("birdhouse")) - { - swap("empty", option, target, true); - } } @Subscribe From 61d08d54a6302d11645153c87d6a8928c79aff40 Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Fri, 12 Oct 2018 18:53:59 +0200 Subject: [PATCH 2/2] Add quick pass/travel/start menu entry swapping Closes #2226 Closes #1459 Signed-off-by: Tomas Slusny --- .../MenuEntrySwapperConfig.java | 19 +++++++++++++++---- .../MenuEntrySwapperPlugin.java | 17 +++++++++++++++++ 2 files changed, 32 insertions(+), 4 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 3083e7a93b..9a31b8835e 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 @@ -187,6 +187,17 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( position = 14, + keyName = "swapQuick", + name = "Quick Pass/Start/Travel", + description = "Swap Pass with Quick-Pass, Ring with Quick-Start and Talk-to with Quick-Travel" + ) + default boolean swapQuick() + { + return true; + } + + @ConfigItem( + position = 15, keyName = "swapBoxTrap", name = "Reset", description = "Swap Check with Reset on box trap" @@ -197,7 +208,7 @@ public interface MenuEntrySwapperConfig extends Config } @ConfigItem( - position = 15, + position = 16, keyName = "swapTeleportItem", name = "Teleport item", description = "Swap Wear, Wield with Rub, Teleport on teleport item
Example: Amulet of glory, Ardougne cloak, Chronicle" @@ -208,7 +219,7 @@ public interface MenuEntrySwapperConfig extends Config } @ConfigItem( - position = 16, + position = 17, keyName = "swapAbyssTeleport", name = "Teleport to Abyss", description = "Swap Talk-to with Teleport for the Mage of Zamorak" @@ -219,7 +230,7 @@ public interface MenuEntrySwapperConfig extends Config } @ConfigItem( - position = 17, + position = 18, keyName = "swapTrade", name = "Trade", description = "Swap Talk-to with Trade on NPC
Example: Shop keeper, Shop assistant" @@ -230,7 +241,7 @@ public interface MenuEntrySwapperConfig extends Config } @ConfigItem( - position = 18, + position = 19, keyName = "swapTravel", name = "Travel", description = "Swap Talk-to with Travel, Take-boat, Pay-fare, Charter on NPC
Example: Squire, Monk of Entrana, Customs officer, Trader Crewmember" 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 be1265e174..dacfa9d7ba 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 @@ -396,6 +396,11 @@ public class MenuEntrySwapperPlugin extends Plugin { swap("decant", option, target, true); } + + if (config.swapQuick()) + { + swap("quick-travel", option, target, true); + } } else if (config.swapTravel() && option.equals("pass") && target.equals("energy barrier")) { @@ -464,6 +469,18 @@ public class MenuEntrySwapperPlugin extends Plugin { swap("empty", option, target, true); } + else if (config.swapQuick()) + { + switch (option) + { + case "ring": + swap("quick-start", option, target, true); + break; + case "pass": + swap("quick-pass", option, target, true); + break; + } + } else if (config.shiftClickCustomization() && shiftModifier && !option.equals("use")) { Integer customOption = getSwapConfig(itemId);