From d193eaae95b70d82a06cff148b7296a2103f0326 Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Sat, 13 Apr 2019 16:35:09 +0100 Subject: [PATCH 01/24] clue plugin: add widget scroll feature --- .../net/runelite/api/widgets/WidgetID.java | 2 ++ .../net/runelite/api/widgets/WidgetInfo.java | 2 ++ .../cluescrolls/ClueScrollEmoteOverlay.java | 13 ++++++++ .../cluescrolls/ClueScrollMusicOverlay.java | 8 +++++ .../plugins/cluescrolls/ClueScrollPlugin.java | 30 +++++++++++++++++++ 5 files changed, 55 insertions(+) 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 b4c5dda576..c337f64002 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 @@ -280,6 +280,7 @@ public class WidgetID { static final int EMOTE_WINDOW = 0; static final int EMOTE_CONTAINER = 1; + static final int EMOTE_SCROLLBAR = 2; } static class Cluescroll @@ -772,6 +773,7 @@ public class WidgetID { static final int CONTAINER = 0; static final int LIST = 3; + static final int SCROLLBAR = 4; } static class Barrows_Puzzle diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java index a63b467e53..78bb2832b4 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java @@ -75,9 +75,11 @@ public enum WidgetInfo EMOTE_WINDOW(WidgetID.EMOTES_GROUP_ID, WidgetID.Emotes.EMOTE_WINDOW), EMOTE_CONTAINER(WidgetID.EMOTES_GROUP_ID, WidgetID.Emotes.EMOTE_CONTAINER), + EMOTE_SCROLLBAR(WidgetID.EMOTES_GROUP_ID, WidgetID.Emotes.EMOTE_SCROLLBAR), MUSIC_WINDOW(WidgetID.MUSIC_GROUP_ID, WidgetID.Music.CONTAINER), MUSIC_TRACK_LIST(WidgetID.MUSIC_GROUP_ID, WidgetID.Music.LIST), + MUSIC_TRACK_SCROLLBAR(WidgetID.MUSIC_GROUP_ID, WidgetID.Music.SCROLLBAR), DIARY_QUEST_WIDGET_TITLE(WidgetID.DIARY_QUEST_GROUP_ID, WidgetID.Diary.DIARY_TITLE), DIARY_QUEST_WIDGET_TEXT(WidgetID.DIARY_QUEST_GROUP_ID, WidgetID.Diary.DIARY_TEXT), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/ClueScrollEmoteOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/ClueScrollEmoteOverlay.java index 4528b0a7be..ecaa85b8ba 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/ClueScrollEmoteOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/ClueScrollEmoteOverlay.java @@ -41,6 +41,8 @@ class ClueScrollEmoteOverlay extends Overlay private final ClueScrollPlugin plugin; private final Client client; + private boolean hasScrolled; + @Inject private ClueScrollEmoteOverlay(ClueScrollPlugin plugin, Client client) { @@ -57,6 +59,7 @@ class ClueScrollEmoteOverlay extends Overlay if (!(clue instanceof EmoteClue)) { + hasScrolled = false; return null; } @@ -81,19 +84,29 @@ class ClueScrollEmoteOverlay extends Overlay return null; } + Widget firstEmoteWidget = null; + Widget secondEmoteWidget = null; + for (Widget emoteWidget : emoteContainer.getDynamicChildren()) { if (emoteWidget.getSpriteId() == emoteClue.getFirstEmote().getSpriteId()) { + firstEmoteWidget = emoteWidget; plugin.highlightWidget(graphics, emoteWidget, emoteWindow, null, emoteClue.getSecondEmote() != null ? "1st" : null); } else if (emoteClue.getSecondEmote() != null && emoteWidget.getSpriteId() == emoteClue.getSecondEmote().getSpriteId()) { + secondEmoteWidget = emoteWidget; plugin.highlightWidget(graphics, emoteWidget, emoteWindow, null, "2nd"); } } + if (!hasScrolled) + { + hasScrolled = true; + plugin.scrollToWidget(WidgetInfo.EMOTE_CONTAINER, WidgetInfo.EMOTE_SCROLLBAR, firstEmoteWidget, secondEmoteWidget); + } return null; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/ClueScrollMusicOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/ClueScrollMusicOverlay.java index f220399f72..2b44290fb5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/ClueScrollMusicOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/ClueScrollMusicOverlay.java @@ -44,6 +44,8 @@ class ClueScrollMusicOverlay extends Overlay private final ClueScrollPlugin plugin; private final Client client; + private boolean hasScrolled; + @Inject private ClueScrollMusicOverlay(ClueScrollPlugin plugin, Client client) { @@ -60,6 +62,7 @@ class ClueScrollMusicOverlay extends Overlay if (!(clue instanceof MusicClue)) { + hasScrolled = false; return null; } @@ -95,6 +98,11 @@ class ClueScrollMusicOverlay extends Overlay return null; } + if (!hasScrolled) + { + hasScrolled = true; + plugin.scrollToWidget(WidgetInfo.MUSIC_TRACK_LIST, WidgetInfo.MUSIC_TRACK_SCROLLBAR, found); + } plugin.highlightWidget(graphics, found, trackList, PADDING, null); return null; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/ClueScrollPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/ClueScrollPlugin.java index 4cd33c3b06..fafb40872f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/ClueScrollPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/ClueScrollPlugin.java @@ -55,6 +55,7 @@ import net.runelite.api.NPC; import net.runelite.api.ObjectComposition; import net.runelite.api.Point; import net.runelite.api.Scene; +import net.runelite.api.ScriptID; import net.runelite.api.Tile; import net.runelite.api.TileObject; import net.runelite.api.coords.LocalPoint; @@ -739,4 +740,33 @@ public class ClueScrollPlugin extends Plugin textComponent.setText(text); textComponent.render(graphics); } + + void scrollToWidget(WidgetInfo list, WidgetInfo scrollbar, Widget ... toHighlight) + { + final Widget parent = client.getWidget(list); + int averageCentralY = 0; + int nonnullCount = 0; + for (Widget widget : toHighlight) + { + if (widget != null) + { + averageCentralY += widget.getRelativeY() + widget.getHeight() / 2; + nonnullCount += 1; + } + } + if (nonnullCount == 0) + { + return; + } + averageCentralY /= nonnullCount; + final int newScroll = Math.max(0, Math.min(parent.getScrollHeight(), + averageCentralY - parent.getHeight() / 2)); + + client.runScript( + ScriptID.UPDATE_SCROLLBAR, + scrollbar.getId(), + list.getId(), + newScroll + ); + } } From 932143b26db8653fde75e6c5fb641ce8f15b30c5 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 29 Apr 2019 13:07:50 -0400 Subject: [PATCH 02/24] travis: update dist to xenial --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6766833ee3..c904adac9e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: java sudo: false -dist: trusty +dist: xenial cache: directories: - $HOME/.m2 From 173dead8d3684097fb6265f068a26c7a63fff5bf Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 29 Apr 2019 13:30:20 -0400 Subject: [PATCH 03/24] travis: switch to openjdk8 travis broke the install of oraclejdk8, but our release builds are built with openjdk8 anyway. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c904adac9e..c33e2a950c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ cache: directories: - $HOME/.m2 jdk: -- oraclejdk8 +- openjdk8 - openjdk11 install: true script: ./travis/build.sh From 8d16c82377f0dba0dfe08460db6793baa4e688f5 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 29 Apr 2019 13:28:17 -0400 Subject: [PATCH 04/24] client: add custom cursor plugin Co-authored-by: Kruithne Co-authored-by: Trevor --- .../plugins/customcursor/CustomCursor.java | 54 +++++++++++ .../customcursor/CustomCursorConfig.java | 43 +++++++++ .../customcursor/CustomCursorPlugin.java | 89 ++++++++++++++++++ .../java/net/runelite/client/ui/ClientUI.java | 4 +- .../customcursor/cursor-dragon-dagger.png | Bin 0 -> 18008 bytes .../customcursor/cursor-dragon-scimitar.png | Bin 0 -> 570 bytes .../plugins/customcursor/cursor-rs3-gold.png | Bin 0 -> 18738 bytes .../customcursor/cursor-rs3-silver.png | Bin 0 -> 15630 bytes .../plugins/customcursor/cursor-trout.png | Bin 0 -> 15609 bytes 9 files changed, 189 insertions(+), 1 deletion(-) create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/customcursor/CustomCursor.java create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/customcursor/CustomCursorConfig.java create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/customcursor/CustomCursorPlugin.java create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/customcursor/cursor-dragon-dagger.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/customcursor/cursor-dragon-scimitar.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/customcursor/cursor-rs3-gold.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/customcursor/cursor-rs3-silver.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/customcursor/cursor-trout.png diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/customcursor/CustomCursor.java b/runelite-client/src/main/java/net/runelite/client/plugins/customcursor/CustomCursor.java new file mode 100644 index 0000000000..1116ab10c2 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/customcursor/CustomCursor.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2018, Kruithne + * 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.customcursor; + +import java.awt.image.BufferedImage; +import lombok.Getter; +import net.runelite.client.util.ImageUtil; + +public enum CustomCursor +{ + RS3_GOLD("RS3 Gold", "cursor-rs3-gold.png"), + RS3_SILVER("RS3 Silver", "cursor-rs3-silver.png"), + DRAGON_DAGGER("Dragon Dagger", "cursor-dragon-dagger.png"), + TROUT("Trout", "cursor-trout.png"), + DRAGON_SCIMITAR("Dragon Scimitar", "cursor-dragon-scimitar.png"); + + private final String name; + @Getter + private final BufferedImage cursorImage; + + CustomCursor(String name, String icon) + { + this.name = name; + this.cursorImage = ImageUtil.getResourceStreamFromClass(CustomCursorPlugin.class, icon); + } + + @Override + public String toString() + { + return name; + } +} \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/customcursor/CustomCursorConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/customcursor/CustomCursorConfig.java new file mode 100644 index 0000000000..cf7075a393 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/customcursor/CustomCursorConfig.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2018, Kruithne + * 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.customcursor; + +import net.runelite.client.config.Config; +import net.runelite.client.config.ConfigGroup; +import net.runelite.client.config.ConfigItem; + +@ConfigGroup("customcursor") +public interface CustomCursorConfig extends Config +{ + @ConfigItem( + keyName = "cursorStyle", + name = "Cursor", + description = "Select which cursor you wish to use" + ) + default CustomCursor selectedCursor() + { + return CustomCursor.RS3_GOLD; + } +} \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/customcursor/CustomCursorPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/customcursor/CustomCursorPlugin.java new file mode 100644 index 0000000000..3025640cd2 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/customcursor/CustomCursorPlugin.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2018, Kruithne + * 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.customcursor; + +import com.google.inject.Provides; +import java.awt.Cursor; +import java.awt.Point; +import java.awt.Toolkit; +import javax.inject.Inject; +import javax.swing.JPanel; +import net.runelite.api.events.ConfigChanged; +import net.runelite.client.config.ConfigManager; +import net.runelite.client.eventbus.Subscribe; +import net.runelite.client.plugins.Plugin; +import net.runelite.client.plugins.PluginDescriptor; +import net.runelite.client.ui.ClientUI; + +@PluginDescriptor( + name = "Custom Cursor", + description = "Replaces your mouse cursor image", + enabledByDefault = false +) +public class CustomCursorPlugin extends Plugin +{ + @Inject + private ClientUI clientUI; + + @Inject + private CustomCursorConfig config; + + @Provides + CustomCursorConfig provideConfig(ConfigManager configManager) + { + return configManager.getConfig(CustomCursorConfig.class); + } + + @Override + protected void startUp() + { + updateCursor(); + } + + @Override + protected void shutDown() + { + clientUI.getContainer().setCursor(Cursor.getDefaultCursor()); + } + + @Subscribe + public void onConfigChanged(ConfigChanged event) + { + if (event.getGroup().equals("customcursor") && event.getKey().equals("cursorStyle")) + { + updateCursor(); + } + } + + private void updateCursor() + { + JPanel container = clientUI.getContainer(); + CustomCursor selectedCursor = config.selectedCursor(); + + Cursor cursor = Toolkit.getDefaultToolkit().createCustomCursor(selectedCursor.getCursorImage(), + new Point(container.getX(), container.getY()), selectedCursor.toString()); + container.setCursor(cursor); + } +} \ No newline at end of file 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 96ba6c31e6..4f76d01a39 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 @@ -110,6 +110,9 @@ public class ClientUI @Getter private TrayIcon trayIcon; + @Getter + private JPanel container; + private final RuneLiteProperties properties; private final RuneLiteConfig config; private final KeyManager keyManager; @@ -130,7 +133,6 @@ public class ClientUI private JButton currentButton; private NavigationButton currentNavButton; private boolean sidebarOpen; - private JPanel container; private NavigationButton sidebarNavigationButton; private JButton sidebarNavigationJButton; private Dimension lastClientSize; diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/customcursor/cursor-dragon-dagger.png b/runelite-client/src/main/resources/net/runelite/client/plugins/customcursor/cursor-dragon-dagger.png new file mode 100644 index 0000000000000000000000000000000000000000..9a59c1753c56344bde2a25a8095a3c9406507e6c GIT binary patch literal 18008 zcmeI3c{o(>`^S$GvbIo3`i!AMW@Uz%#$d)85=LkrGh{=u~rcUBB<|pWij-n(cn>=Y2otc|G@Y&zZTdvu*JrI~B#5 ziU0tpIM`def$y-Pr-B^#Dhv(%1inoa*n0~BKxyjGQwB&nGy?z>T{u+g;>CV^5nt%X z7r-2-RG1)$@5>2b0YGqFiaVR;-agH|`}rq|V@&uyN4}ee0?duFBV0XhuA$DvNeg3i zjy%j`8Dz-3d#rUja_l!%9)helV5D9EU$Rkg0zfK)Dr-c6!Mum!hT&DpeKw(nh!6L zzXHev-&axqN}Q8R(6gck)!tAJE|&@4DpMkgGjmi3R|hOZcT-LRmbNnCDT#C4fiziQ zbrr*>8CZ+}R?pk?>OK&j(sOXV46tmUj)qKH8~~fjim?X#763UlOSanpUT8qw*Rh-c zJV5|x2Txyn;LHV}qiy1~HKgMhm2M^Dm+`MHzY3_(%{ z^GJny1e=Iu3Wz{?Pfz4*{c4Bl^VRY6ar7ihWLd~TO>BgT+KaB+0FV}^0nWCoKe$>o zx4Ig?yFhgn;>}gLLAZ}k^FV7&w!jhqUW&qM2aHhpGs73ig>wgv&gqo(Td9<`wtI(f zo|@%(Ag#U5vr90<#^%VL!lzGLTUwqhET=4^-}2lzz%E-=;@KbYZy2es`}2z{O?na7 z6%lr_Juk{`e{wo8t7h-Stv(H}V(t1aC=K>$--nkw_!N2>syDk%3EXX+w6hC)0=|v1 z*Wmh`dxOlTMx);GyL?un#0PwMhU;02_VSKpXmX|f+ z!S@#Zc4>2fa9@YLfdH`5S`SIPm2Xk0007o$5r${1v_6&2Fe;IoRXU-eRH<(@ek(<< zyo@r5qR0%N6|~wQXEQ}V>dqN$!_}w4voM~Gf- zdnsCCORN0sg}MVO@6X=%xKgU-z~--$ocb~oEk ztuB^Ktwfi+o*{2s9)LzxT%(*dGnyFBs5%SJQO>TId1g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Dd~)Wolw&V5V(gU}a$N>3AL}C=eQQ^HVa@DsgLQo^|a!Py>UftDnm{r-UW| D8kxFa literal 0 HcmV?d00001 diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/customcursor/cursor-rs3-gold.png b/runelite-client/src/main/resources/net/runelite/client/plugins/customcursor/cursor-rs3-gold.png new file mode 100644 index 0000000000000000000000000000000000000000..ee89a5b05a016cf5c7202ae82b88215eb57f5836 GIT binary patch literal 18738 zcmeI43p7;g+rYOjuDMjYipHgq%>8DjF=AXp!pP`8=4Qf-%+#QhNTPI-lxw6b5f!C` zLWL62y@(3wa?&~IsD%F>D%#bov)2E7>s#NqX0J8&Jn!>9&$Hj(`|Ri4@2s`$Sh~bc zU3I1^008O^_SSCT87BQGD}sMTAt62BNhQGEO9TLFlcgU8AmzYx08n+|(`ZYV`Uu5B zk&iF{=0Kyt0s@6xz8?nwf*z;2^XTrcrkeLQ_gFbbhwXC|x=m4rxmm@8X~)eq(O1!0 z9Ib!o(G=J6i8eOlbgDC=$L`)8wrh&3>4crC50%>V5ATjR620?A-?L3eeD9a^zNj5I z_kh}QvOBGyUa3rZLV`Wk6(2U?gq7aJrx8_GE1$I?7KN)C1pr#g1#Ep$zo7!~A(TQ{ zU{I!X2~Y^Sqoxd$Ij5GPWgou)3pLijUtd-nH1PIr9cZu530MRG&%~h(1E$D=nPCeR!~6#h&*>cJvsx`< zLvIW>UvtqpAmi0z&+Y&z8=FIWiXJ^`Z)Wk#`sA;>uiow#Nr(ASygAXqX3Reqt)8 zmm8OatBkX(R-Vk%e;lpgy^~?MTX|Y? zdEgjQ)JofnaSN*f%+}A_OYG45!t-6t?@l;JE6O6y+-7@N?G{^%PKlkGk$Nle>`e1r zghL&-a(px&$5LrksIr&Sm9SU+P>9MaR%gsiRpMDSXADkG$f=xpdfCab#XH`!>d#2V zO$xUuQz49#SizWjmi7!M#*&BjS+H3~xQUNdh$>^ZxmL_Gh|h97JNM$mk5{LAW6)6y zdsD;vlVT?$wKhf5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>6vJ1 literal 0 HcmV?d00001 diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/customcursor/cursor-trout.png b/runelite-client/src/main/resources/net/runelite/client/plugins/customcursor/cursor-trout.png new file mode 100644 index 0000000000000000000000000000000000000000..b32ddf0ea1fb5546600764031562121bcd7fe141 GIT binary patch literal 15609 zcmeI3Yg7|w8plUPq^K(@hzPrcs8y`Vmspa5 zsB>)vDJr>wBF0Q8g-Z{hA&dYXg%?O?a(O%sZ#IR+U~*vw8)h?TEVh8d5O7$O?iW?$ zibq0|CSDLJ3GFV2{|cfeS}aBZ45y@|&{NoS%#;8#0|NtL1`B4fXt;uAPBmE6R+_;) z)sdtpj|4R%Cauw;#S9c%UUeLnYzd-LZH0PY-Pffz_7*ajyV>CsVXN8*GwBR?Fp~!9 z^%#>)I{VNx2#o4bJ!-I+aUXL~pD_`$VCF<@h?2eCLl(y8L@w{GJ?MD#`aw&ZEg`FL z1l>pnb()o_Mih=j%~-MtK|@yImojy*tG8(5`zEJfCR@*tV@IvpA#AoDht0ke95W=u zuT>y6p=t|eQev1+Oy4V9=Zs0d$=d>VsG zV=|R2rhvm0u=(#Wm;wd^Na9cq$RWox+W6GLa`3{}g^h*;A>7vpD0|nFK#b`y6Fw$X#1_JXH3KgD8WTtjW{cW@pi+qlZ=h?n z8UY(&#&hD>0W>wj)X>-{M@@@E7$}X6AUq9|!{PGOfp&ayIcR?^wFEwGPnO zu0``dUdte9UMm%@HRJ0v64mWEUqGkrKM{`B{`1qbtX`i_q3v)J;A;UNm)brDOdGfdUd2NP{pYaS|gor=^i3_Ab7?ZdN z5rF~{7f6FJCUFrW0tF;4kOpB);vz%@3P@Za4Z@hjMTiI#khnk^gfWSW5D_RKae*`l zV-go3B2Yl$0%;J&BrZZkpn${$(jbgUT!e@~0f`HwK^VUgmuuf6fT#g~?k@#@z|T9U zVjuo+AO#7JltWP3bO>6L0YP1_@b8BZl+1vjmiHk@up5Frv7Fe-PzZ7glS<|)t@V%c zmS#nV_@|Rg?wc=**uarCT4MKLD)6Vt#w!R@GEn3eMRG|8=Jp9b7Em&dxkl_`iJ!9cN=}# zVP7uoa*|08ZFwkK8K7%<z{QRdi;j*-deTd&CozSw6@4d>c{tw13r3zgt!={+!=j;u-rH?lU$_ zy!e&}RClc9L?PvB>XnMxQ8O0La*C9_m-;d=?S(Td>*6p<=9uThB@Ifysc{90>_bUE zuOD+hb=&r2>}luN%+QDHPh>uM(Hqdv;-;(agqU zf?>vc_eyV!fM)BHn$F)YXzzObtwP4McCl8+dWU*%Ub$<@o_I>+Or`tykl|h-=_yYW z0**d*t9}vl#r9zf*7JYu*s#oN%H3c7>2eU^ZYfbE)zsZiFH79|4enF?;K|CmFzK>$ zoNQA5Ics)j%Y>R|orYNj)FS!i*#^S_WmObCZ>Gnl@3Idls-mhMX#JxhMt!_!yzI%N zzb~wouYD*>FHZ1mD#lHKTfc zsy}1-#th%n8v@qXbWAzSw6=9LAou$-onQ<1&=TZJvG=9u##dD* zcV7DLsr#qQGEElN*>=CBq%|2{(E6(EZb-}r74I~RqA%~-F=EuX;^xEOS9Zky<&=5S zKaO(#+H`;UpFhu?|7@m*zlZCV+7{=Xk)J6get8E=mo;zO-wG*Zl^+-0xkZ6;IA_LB z@fDWxLtWRpPw;Q4Sn@#CaeXSp*(rPWB9tB+ye3o{xi#RMv-RnF(|vYqLo&BVo$s2H zG@o4%w{~I5>GERlYiAzu_g=c^XRYDSosoB?;YN9TmCLvi`h^eYv`@_YTeHc_AA9fE zo-c;`S&NSs>1DS%KiHQEKR-KPlvlCgWLJ8-ldsWF;XeuEDt4#nmYvD(T(Prrg@@an wh~mTMuH3U<%PL0x#w;CY^u4`$bbBK-;{25kMca<&wuh6YArX?J^WI literal 0 HcmV?d00001 From 51b245602682c41558a6ac9221bb4e03b8244948 Mon Sep 17 00:00:00 2001 From: langhillie Date: Mon, 29 Apr 2019 14:32:00 -0400 Subject: [PATCH 05/24] daily task plugin: add Thirus's dynamite --- .../main/java/net/runelite/api/Varbits.java | 7 ++++++ .../dailytaskindicators/DailyTasksConfig.java | 11 ++++++++++ .../dailytaskindicators/DailyTasksPlugin.java | 22 +++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/runelite-api/src/main/java/net/runelite/api/Varbits.java b/runelite-api/src/main/java/net/runelite/api/Varbits.java index 88ce84f272..f1768c2aaf 100644 --- a/runelite-api/src/main/java/net/runelite/api/Varbits.java +++ b/runelite-api/src/main/java/net/runelite/api/Varbits.java @@ -126,6 +126,11 @@ public enum Varbits DIARY_KARAMJA_HARD(3611), DIARY_KARAMJA_ELITE(4566), + DIARY_KOUREND_EASY(7925), + DIARY_KOUREND_MEDIUM(7926), + DIARY_KOUREND_HARD(7927), + DIARY_KOUREND_ELITE(7928), + DIARY_LUMBRIDGE_EASY(4495), DIARY_LUMBRIDGE_MEDIUM(4496), DIARY_LUMBRIDGE_HARD(4497), @@ -375,6 +380,8 @@ public enum Varbits */ DAILY_BONEMEAL_STATE(4543), + DAILY_DYNAMITE_COLLECTED(7939), + /** * Fairy Ring */ diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/dailytaskindicators/DailyTasksConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/dailytaskindicators/DailyTasksConfig.java index 09752b89a7..603edb2f36 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/dailytaskindicators/DailyTasksConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/dailytaskindicators/DailyTasksConfig.java @@ -109,4 +109,15 @@ public interface DailyTasksConfig extends Config { return true; } + + @ConfigItem( + position = 8, + keyName = "showDynamite", + name = "Show Claimable Dynamite", + description = "Show a message when you can collect Dynamite from Thirus." + ) + default boolean showDynamite() + { + return false; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/dailytaskindicators/DailyTasksPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/dailytaskindicators/DailyTasksPlugin.java index 4076ef693c..b409c89d57 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/dailytaskindicators/DailyTasksPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/dailytaskindicators/DailyTasksPlugin.java @@ -65,6 +65,7 @@ public class DailyTasksPlugin extends Plugin private static final String FLAX_MESSAGE = "You have bowstrings waiting to be converted from flax from the Flax keeper."; private static final String BONEMEAL_MESSAGE = "You have bonemeal and slime waiting to be collected from Robin."; private static final int BONEMEAL_PER_DIARY = 13; + private static final String DYNAMITE_MESSAGE = "You have dynamite waiting to be collected from Thirus."; private static final String RELOG_MESSAGE = " (May require a relog)"; @Inject @@ -153,6 +154,12 @@ public class DailyTasksPlugin extends Plugin { checkBonemeal(dailyReset); } + + if (config.showDynamite()) + { + checkDynamite(dailyReset); + } + } } @@ -272,6 +279,21 @@ public class DailyTasksPlugin extends Plugin } } + private void checkDynamite(boolean dailyReset) + { + if (client.getVar(Varbits.DIARY_KOUREND_MEDIUM) == 1) + { + if (client.getVar(Varbits.DAILY_DYNAMITE_COLLECTED) == 0) + { + sendChatMessage(DYNAMITE_MESSAGE); + } + else if (dailyReset) + { + sendChatMessage(DYNAMITE_MESSAGE); + } + } + } + private void sendChatMessage(String chatMessage) { final String message = new ChatMessageBuilder() From bc2a5cf8f4ae68951fb611d8a00746d031c6a65e Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Mon, 29 Apr 2019 20:40:54 +0200 Subject: [PATCH 06/24] Use proxy methods for settings cursor via ClientUI To not expose swing components directly just to set cursor on them, create convenient proxy methods for updating and resetting cursor. Also document that it is working properly only on Windows. Signed-off-by: Tomas Slusny --- .../customcursor/CustomCursorPlugin.java | 12 +----- .../java/net/runelite/client/ui/ClientUI.java | 37 +++++++++++++++++-- 2 files changed, 36 insertions(+), 13 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/customcursor/CustomCursorPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/customcursor/CustomCursorPlugin.java index 3025640cd2..7e0fc4c18e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/customcursor/CustomCursorPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/customcursor/CustomCursorPlugin.java @@ -25,11 +25,7 @@ package net.runelite.client.plugins.customcursor; import com.google.inject.Provides; -import java.awt.Cursor; -import java.awt.Point; -import java.awt.Toolkit; import javax.inject.Inject; -import javax.swing.JPanel; import net.runelite.api.events.ConfigChanged; import net.runelite.client.config.ConfigManager; import net.runelite.client.eventbus.Subscribe; @@ -65,7 +61,7 @@ public class CustomCursorPlugin extends Plugin @Override protected void shutDown() { - clientUI.getContainer().setCursor(Cursor.getDefaultCursor()); + clientUI.resetCursor(); } @Subscribe @@ -79,11 +75,7 @@ public class CustomCursorPlugin extends Plugin private void updateCursor() { - JPanel container = clientUI.getContainer(); CustomCursor selectedCursor = config.selectedCursor(); - - Cursor cursor = Toolkit.getDefaultToolkit().createCustomCursor(selectedCursor.getCursorImage(), - new Point(container.getX(), container.getY()), selectedCursor.toString()); - container.setCursor(cursor); + clientUI.setCursor(selectedCursor.getCursorImage(), selectedCursor.toString()); } } \ No newline at end of file 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 4f76d01a39..247e6a9dff 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 @@ -37,6 +37,7 @@ import java.awt.Graphics2D; import java.awt.GraphicsConfiguration; import java.awt.LayoutManager; import java.awt.Rectangle; +import java.awt.Toolkit; import java.awt.TrayIcon; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; @@ -110,9 +111,6 @@ public class ClientUI @Getter private TrayIcon trayIcon; - @Getter - private JPanel container; - private final RuneLiteProperties properties; private final RuneLiteConfig config; private final KeyManager keyManager; @@ -133,6 +131,7 @@ public class ClientUI private JButton currentButton; private NavigationButton currentNavButton; private boolean sidebarOpen; + private JPanel container; private NavigationButton sidebarNavigationButton; private JButton sidebarNavigationJButton; private Dimension lastClientSize; @@ -603,6 +602,38 @@ public class ClientUI giveClientFocus(); } + /** + * Changes cursor for client window. Requires ${@link ClientUI#open(RuneLite)} to be called first. + * FIXME: This is working properly only on Windows, Linux and Mac are displaying cursor incorrectly + * @param image cursor image + * @param name cursor name + */ + public void setCursor(final BufferedImage image, final String name) + { + if (container == null) + { + return; + } + + final java.awt.Point hotspot = new java.awt.Point(container.getX(), container.getY()); + final Cursor cursorAwt = Toolkit.getDefaultToolkit().createCustomCursor(image, hotspot, name); + container.setCursor(cursorAwt); + } + + /** + * Resets client window cursor to default one. + * @see ClientUI#setCursor(BufferedImage, String) + */ + public void resetCursor() + { + if (container == null) + { + return; + } + + container.setCursor(Cursor.getDefaultCursor()); + } + /** * Get offset of game canvas in game window * From 9e512b932daba9a9ee7785369bf9848d8676a3a9 Mon Sep 17 00:00:00 2001 From: Twiglet1022 <29353990+Twiglet1022@users.noreply.github.com> Date: Sat, 27 Apr 2019 11:49:30 +0100 Subject: [PATCH 07/24] worldmap: add Battlefront teleport --- .../plugins/worldmap/TeleportLocationData.java | 1 + .../worldmap/battlefront_teleport_icon.png | Bin 0 -> 266 bytes 2 files changed, 1 insertion(+) create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/battlefront_teleport_icon.png diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/TeleportLocationData.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/TeleportLocationData.java index 4430e218cb..b877be8810 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/TeleportLocationData.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/TeleportLocationData.java @@ -61,6 +61,7 @@ enum TeleportLocationData ICE_PLATEAU(TeleportType.LUNAR_MAGIC, "Ice Plateau", 89, new WorldPoint(2973, 3939, 0), "ice_plateau_teleport_icon.png"), LUMBRIDGE_GRAVEYARD(TeleportType.ARCEUUS_MAGIC, "Lumbridge Graveyard", 6, new WorldPoint(3241, 3194, 0), "lumbridge_graveyard_teleport_icon.png"), DRAYNOR_MANOR(TeleportType.ARCEUUS_MAGIC, "Draynor Manor", 17, new WorldPoint(3108, 3352, 0), "draynor_manor_teleport_icon.png"), + BATTLEFRONT(TeleportType.ARCEUUS_MAGIC, "Battlefront", 23, new WorldPoint(1349, 3739, 0), "battlefront_teleport_icon.png"), MIND_ALTAR(TeleportType.ARCEUUS_MAGIC, "Mind Altar", 28, new WorldPoint(2979, 3509, 0), "mind_altar_teleport_icon.png"), SALVE_GRAVEYARD(TeleportType.ARCEUUS_MAGIC, "Salve Graveyard", 40, new WorldPoint(3433, 3461, 0), "salve_graveyard_teleport_icon.png"), FENKENSTRAINS_CASTLE(TeleportType.ARCEUUS_MAGIC, "Fenkenstrain's Castle", 48, new WorldPoint(3548, 3528, 0), "fenkenstrains_castle_teleport_icon.png"), diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/battlefront_teleport_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/battlefront_teleport_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..696c1a0cf6848ee055b9e32f43156e1e6d377a01 GIT binary patch literal 266 zcmeAS@N?(olHy`uVBq!ia0vp^d>}Rl8<3oNC%zs?aTa()7Bet#3xhBt!>l4w^BqzUk$I!P@GHl=SvPXc_qM3aJ0#G5<%`r?RhvfkiF!V#iWjOXOn9ZD za=;+}8KVQsQjriZM?<^bF1_WYo~z_<`a3ZM92Qy3z!0}Ih^y+}yK`~(OgVO1owzk? zOWd4^TT8cuKR#CB7^Q!t;^CS7`lnuA?Au|JcEp0=#?3sli6JtcNB6qS`w+h*TlMwb zJu6;*Y}k|i!P0q^{LIUbweH2AU$%TtcFsgb?wz@gyqB$CUDM}$$og+{xDO+z!*QTL O7(8A5T-G@yGywnxL1{Js literal 0 HcmV?d00001 From 6e1d64cc46390ed4036b19ef097e5c1a2af94ed9 Mon Sep 17 00:00:00 2001 From: xDemoN Date: Mon, 29 Apr 2019 14:56:39 -0400 Subject: [PATCH 08/24] idlenotifier: add support pottery crafting (#8674) adds potter's wheel & pottery oven --- runelite-api/src/main/java/net/runelite/api/AnimationID.java | 2 ++ .../client/plugins/idlenotifier/IdleNotifierPlugin.java | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/runelite-api/src/main/java/net/runelite/api/AnimationID.java b/runelite-api/src/main/java/net/runelite/api/AnimationID.java index e3fa08fd88..591a778366 100644 --- a/runelite-api/src/main/java/net/runelite/api/AnimationID.java +++ b/runelite-api/src/main/java/net/runelite/api/AnimationID.java @@ -81,6 +81,8 @@ public final class AnimationID public static final int CRAFTING_LEATHER = 1249; public static final int CRAFTING_GLASSBLOWING = 884; public static final int CRAFTING_SPINNING = 894; + public static final int CRAFTING_POTTERS_WHEEL = 883; + public static final int CRAFTING_POTTERY_OVEN = 24975; public static final int SMITHING_SMELTING = 899; public static final int SMITHING_CANNONBALL = 827; //cball smithing uses this and SMITHING_SMELTING public static final int SMITHING_ANVIL = 898; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/idlenotifier/IdleNotifierPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/idlenotifier/IdleNotifierPlugin.java index 9aa51bad78..5dc0ca9459 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/idlenotifier/IdleNotifierPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/idlenotifier/IdleNotifierPlugin.java @@ -136,7 +136,7 @@ public class IdleNotifierPlugin extends Plugin case COOKING_FIRE: case COOKING_RANGE: case COOKING_WINE: - /* Crafting(Gem Cutting, Glassblowing, Spinning, Battlestaves) */ + /* Crafting(Gem Cutting, Glassblowing, Spinning, Battlestaves, Pottery) */ case GEM_CUTTING_OPAL: case GEM_CUTTING_JADE: case GEM_CUTTING_REDTOPAZ: @@ -149,6 +149,8 @@ public class IdleNotifierPlugin extends Plugin case CRAFTING_SPINNING: case CRAFTING_BATTLESTAVES: case CRAFTING_LEATHER: + case CRAFTING_POTTERS_WHEEL: + case CRAFTING_POTTERY_OVEN: /* Fletching(Cutting, Stringing) */ case FLETCHING_BOW_CUTTING: case FLETCHING_STRING_NORMAL_SHORTBOW: From 0258260024acf347f090e4881c24fc5708b099c7 Mon Sep 17 00:00:00 2001 From: zaydsalah Date: Mon, 29 Apr 2019 16:03:13 -0400 Subject: [PATCH 09/24] Add Herbiboar support to the Loottracker (#8663) Close #6136 --- .../loottracker/LootTrackerPlugin.java | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 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 50b6c4bb68..5429ec5941 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 @@ -99,6 +99,10 @@ public class LootTrackerPlugin extends Plugin private static final Pattern CLUE_SCROLL_PATTERN = Pattern.compile("You have completed [0-9]+ ([a-z]+) Treasure Trails."); private static final int THEATRE_OF_BLOOD_REGION = 12867; + // Herbiboar loot handling + private static final String HERBIBOAR_LOOTED_MESSAGE = "You harvest herbs from the herbiboar, whereupon it escapes."; + private static final String HERBIBOR_EVENT = "Herbiboar"; + // Chest loot handling private static final String CHEST_LOOTED_MESSAGE = "You find some treasure in the chest!"; private static final Map CHEST_EVENT_TYPES = ImmutableMap.of( @@ -389,14 +393,15 @@ public class LootTrackerPlugin extends Plugin } eventType = CHEST_EVENT_TYPES.get(regionID); + takeInventorySnapshot(); - final ItemContainer itemContainer = client.getItemContainer(InventoryID.INVENTORY); - if (itemContainer != null) - { - inventorySnapshot = HashMultiset.create(); - Arrays.stream(itemContainer.getItems()) - .forEach(item -> inventorySnapshot.add(item.getId(), item.getQuantity())); - } + return; + } + + if (message.equals(HERBIBOAR_LOOTED_MESSAGE)) + { + eventType = HERBIBOR_EVENT; + takeInventorySnapshot(); return; } @@ -433,7 +438,7 @@ public class LootTrackerPlugin extends Plugin @Subscribe public void onItemContainerChanged(ItemContainerChanged event) { - if (eventType != null && CHEST_EVENT_TYPES.containsValue(eventType)) + if (eventType != null && (CHEST_EVENT_TYPES.containsValue(eventType) || HERBIBOR_EVENT.equals(eventType))) { if (event.getItemContainer() != client.getItemContainer(InventoryID.INVENTORY)) { @@ -445,6 +450,17 @@ public class LootTrackerPlugin extends Plugin } } + private void takeInventorySnapshot() + { + final ItemContainer itemContainer = client.getItemContainer(InventoryID.INVENTORY); + if (itemContainer != null) + { + inventorySnapshot = HashMultiset.create(); + Arrays.stream(itemContainer.getItems()) + .forEach(item -> inventorySnapshot.add(item.getId(), item.getQuantity())); + } + } + private void processChestLoot(String chestType, ItemContainer inventoryContainer) { if (inventorySnapshot != null) From d96051812289b8a3bec89f68f82c8d3dbc7b94ce Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 29 Apr 2019 17:53:20 -0400 Subject: [PATCH 10/24] world hopper: disable Hop-to pvp worlds from regular worlds --- .../plugins/worldhopper/WorldHopperPlugin.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java index a161be1af6..84abfcf9f5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java @@ -350,11 +350,21 @@ public class WorldHopperPlugin extends Plugin // Don't add entry if user is offline ChatPlayer player = getChatPlayerFromName(event.getTarget()); - if (player == null || player.getWorld() == 0 || player.getWorld() == client.getWorld()) + if (player == null || player.getWorld() == 0 || player.getWorld() == client.getWorld() + || worldResult == null) { return; } + World currentWorld = worldResult.findWorld(client.getWorld()); + World targetWorld = worldResult.findWorld(player.getWorld()); + if (targetWorld == null || currentWorld == null + || (!currentWorld.getTypes().contains(WorldType.PVP) && targetWorld.getTypes().contains(WorldType.PVP))) + { + // Disable Hop-to a PVP world from a regular world + return; + } + final MenuEntry hopTo = new MenuEntry(); hopTo.setOption(HOP_TO); hopTo.setTarget(event.getTarget()); From 7ae882a6a5677b1a5c1b257f5ba7019ea4d2d166 Mon Sep 17 00:00:00 2001 From: Crow <40111569+000000653@users.noreply.github.com> Date: Tue, 30 Apr 2019 02:56:19 -0500 Subject: [PATCH 11/24] Fix bronze dart requirement in skillcalculator (1->10) (#8690) --- .../plugins/skillcalculator/skill_fletching.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_fletching.json b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_fletching.json index 23f057a59b..5a6f05161d 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_fletching.json +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_fletching.json @@ -18,12 +18,6 @@ "name": "Bronze Arrow", "xp": 1.3 }, - { - "level": 1, - "icon": 806, - "name": "Bronze Dart", - "xp": 1.8 - }, { "level": 5, "icon": 2866, @@ -66,6 +60,12 @@ "name": "Bronze Crossbow", "xp": 6 }, + { + "level": 10, + "icon": 806, + "name": "Bronze Dart", + "xp": 1.8 + }, { "level": 10, "icon": 839, @@ -553,4 +553,4 @@ "xp": 25 } ] -} \ No newline at end of file +} From 8ff1aacfd8805924e9256216cf62a5e8d2024a36 Mon Sep 17 00:00:00 2001 From: beaumitch Date: Tue, 30 Apr 2019 04:19:18 -0400 Subject: [PATCH 12/24] npcindicators: Add option to highlight NPC name in right click menu (#8673) Resolves #8667 --- .../npchighlight/NpcIndicatorsConfig.java | 11 +++++ .../npchighlight/NpcIndicatorsPlugin.java | 40 ++++++++++++++----- 2 files changed, 40 insertions(+), 11 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java index f5b7ac6757..1ef10c50d8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java @@ -89,6 +89,17 @@ public interface NpcIndicatorsConfig extends Config @ConfigItem( position = 5, + keyName = "highlightMenuNames", + name = "Highlight menu names", + description = "Highlight NPC names in right click menu" + ) + default boolean highlightMenuNames() + { + return false; + } + + @ConfigItem( + position = 6, keyName = "showRespawnTimer", name = "Show respawn timer", description = "Show respawn timer of tagged NPCs") diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java index 7e84798d2a..65bfb5bdbc 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java @@ -66,6 +66,7 @@ import net.runelite.client.input.KeyManager; import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.ui.overlay.OverlayManager; +import net.runelite.client.util.ColorUtil; import net.runelite.client.util.Text; import net.runelite.client.util.WildcardMatcher; @@ -248,20 +249,37 @@ public class NpcIndicatorsPlugin extends Plugin @Subscribe public void onMenuEntryAdded(MenuEntryAdded event) { - if (!hotKeyPressed || event.getType() != MenuAction.EXAMINE_NPC.getId()) + MenuEntry[] menuEntries = client.getMenuEntries(); + String target = event.getTarget(); + final int identifier = event.getIdentifier(); + int type = event.getType(); + + if (type >= 2000) { - return; + type -= 2000; + } + + if (config.highlightMenuNames() && + NPC_MENU_ACTIONS.contains(MenuAction.of(type)) && + highlightedNpcs.stream().anyMatch(npc -> npc.getIndex() == identifier)) + { + final MenuEntry menuEntry = menuEntries[menuEntries.length - 1]; + target = ColorUtil.prependColorTag(Text.removeTags(target), config.getHighlightColor()); + menuEntry.setTarget(target); + } + + if (hotKeyPressed && type == MenuAction.EXAMINE_NPC.getId()) + { + menuEntries = Arrays.copyOf(menuEntries, menuEntries.length + 1); + final MenuEntry tagEntry = menuEntries[menuEntries.length - 1] = new MenuEntry(); + tagEntry.setOption(TAG); + tagEntry.setTarget(target); + tagEntry.setParam0(event.getActionParam0()); + tagEntry.setParam1(event.getActionParam1()); + tagEntry.setIdentifier(event.getIdentifier()); + tagEntry.setType(MenuAction.RUNELITE.getId()); } - MenuEntry[] menuEntries = client.getMenuEntries(); - menuEntries = Arrays.copyOf(menuEntries, menuEntries.length + 1); - MenuEntry menuEntry = menuEntries[menuEntries.length - 1] = new MenuEntry(); - menuEntry.setOption(TAG); - menuEntry.setTarget(event.getTarget()); - menuEntry.setParam0(event.getActionParam0()); - menuEntry.setParam1(event.getActionParam1()); - menuEntry.setIdentifier(event.getIdentifier()); - menuEntry.setType(MenuAction.RUNELITE.getId()); client.setMenuEntries(menuEntries); } From d44b749e2d6ed72b16a2afb4674a9b3fd1f9b6a2 Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Thu, 18 Apr 2019 23:35:02 +0100 Subject: [PATCH 13/24] client: add item identification plugin --- .../net/runelite/api/widgets/WidgetID.java | 2 + .../ItemIdentification.java | 127 ++++++++++++++++++ .../ItemIdentificationConfig.java | 86 ++++++++++++ .../ItemIdentificationMode.java | 44 ++++++ .../ItemIdentificationOverlay.java | 103 ++++++++++++++ .../ItemIdentificationPlugin.java | 64 +++++++++ 6 files changed, 426 insertions(+) create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentification.java create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationConfig.java create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationMode.java create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationOverlay.java create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationPlugin.java 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 b4c5dda576..0bea8d3af0 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 @@ -131,6 +131,8 @@ public class WidgetID public static final int QUESTTAB_GROUP_ID = 629; public static final int MUSIC_GROUP_ID = 239; public static final int BARROWS_PUZZLE_GROUP_ID = 25; + public static final int KEPT_ON_DEATH_GROUP_ID = 4; + public static final int GUIDE_PRICE_GROUP_ID = 464; static class WorldMap { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentification.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentification.java new file mode 100644 index 0000000000..612cbafd7a --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentification.java @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2019, Hydrox6 + * 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.itemidentification; + +import java.util.HashMap; +import java.util.Map; +import net.runelite.api.ItemID; + +enum ItemIdentification +{ + //Seeds + GUAM_SEED(Type.SEED, "Guam", "G", ItemID.GUAM_SEED), + MARRENTILL_SEED(Type.SEED, "Marren", "M", ItemID.MARRENTILL_SEED), + TARROMIN_SEED(Type.SEED, "Tarro", "TAR", ItemID.TARROMIN_SEED), + HARRALANDER_SEED(Type.SEED, "Harra", "H", ItemID.HARRALANDER_SEED), + RANARR_SEED(Type.SEED, "Ranarr", "R", ItemID.RANARR_SEED), + TOADFLAX_SEED(Type.SEED, "Toad", "TOA", ItemID.TOADFLAX_SEED), + IRIT_SEED(Type.SEED, "Irit", "I", ItemID.IRIT_SEED), + AVANTOE_SEED(Type.SEED, "Avantoe", "A", ItemID.AVANTOE_SEED), + KWUARM_SEED(Type.SEED, "Kwuarm", "K", ItemID.KWUARM_SEED), + SNAPDRAGON_SEED(Type.SEED, "Snap", "S", ItemID.SNAPDRAGON_SEED), + CADANTINE_SEED(Type.SEED, "Cadan", "C", ItemID.CADANTINE_SEED), + LANTADYME_SEED(Type.SEED, "Lanta", "L", ItemID.LANTADYME_SEED), + DWARF_WEED_SEED(Type.SEED, "Dwarf", "D", ItemID.DWARF_WEED_SEED), + TORSTOL_SEED(Type.SEED, "Torstol", "TOR", ItemID.TORSTOL_SEED), + POISON_IVY_SEED(Type.SEED, "Ivy", "I", ItemID.POISON_IVY_SEED), + WHITEBERRY_SEED( Type.SEED, "White", "W", ItemID.WHITEBERRY_SEED), + + //Herbs + GUAM(Type.HERB, "Guam", "G", ItemID.GUAM_LEAF, ItemID.GRIMY_GUAM_LEAF), + MARRENTILL(Type.HERB, "Marren", "M", ItemID.MARRENTILL, ItemID.GRIMY_MARRENTILL), + TARROMIN(Type.HERB, "Tarro", "TAR", ItemID.TARROMIN, ItemID.GRIMY_TARROMIN), + HARRALANDER(Type.HERB, "Harra", "H", ItemID.HARRALANDER, ItemID.GRIMY_HARRALANDER), + RANARR(Type.HERB, "Ranarr", "R", ItemID.RANARR_WEED, ItemID.GRIMY_RANARR_WEED), + TOADFLAX(Type.HERB, "Toad", "TOA", ItemID.TOADFLAX, ItemID.GRIMY_TOADFLAX), + IRIT(Type.HERB, "Irit", "I", ItemID.IRIT_LEAF, ItemID.GRIMY_TOADFLAX), + AVANTOE(Type.HERB, "Avantoe", "A", ItemID.AVANTOE, ItemID.GRIMY_AVANTOE), + KWUARM(Type.HERB, "Kwuarm", "K", ItemID.KWUARM, ItemID.GRIMY_KWUARM), + SNAPDRAGON(Type.HERB, "Snap", "S", ItemID.SNAPDRAGON, ItemID.GRIMY_SNAPDRAGON), + CADANTINE(Type.HERB, "Cadan", "C", ItemID.CADANTINE, ItemID.GRIMY_CADANTINE), + LANTADYME(Type.HERB, "Lanta", "L", ItemID.LANTADYME, ItemID.GRIMY_LANTADYME), + DWARF_WEED(Type.HERB, "Dwarf", "D", ItemID.DWARF_WEED, ItemID.GRIMY_DWARF_WEED), + TORSTOL(Type.HERB, "Torstol", "TOR", ItemID.TORSTOL, ItemID.GRIMY_TORSTOL), + + //Saplings + OAK_SAPLING(Type.SAPLING, "Oak", "OAK", ItemID.OAK_SAPLING, ItemID.OAK_SEEDLING, ItemID.OAK_SEEDLING_W), + WILLOW_SAPLING(Type.SAPLING, "Willow", "WIL", ItemID.WILLOW_SAPLING, ItemID.WILLOW_SEEDLING, ItemID.WILLOW_SEEDLING_W), + MAPLE_SAPLING(Type.SAPLING, "Maple", "MAP", ItemID.MAPLE_SAPLING, ItemID.MAPLE_SEEDLING, ItemID.MAPLE_SEEDLING_W), + YEW_SAPLING(Type.SAPLING, "Yew", "YEW", ItemID.YEW_SAPLING, ItemID.YEW_SEEDLING, ItemID.YEW_SEEDLING_W), + MAGIC_SAPLING(Type.SAPLING, "Magic", "MAG", ItemID.MAGIC_SAPLING, ItemID.MAGIC_SEEDLING, ItemID.MAGIC_SEEDLING_W), + REDWOOD_SAPLING(Type.SAPLING, "Red", "RED", ItemID.REDWOOD_SAPLING, ItemID.REDWOOD_SEEDLING, ItemID.REDWOOD_SEEDLING_W), + SPIRIT_SAPLING(Type.SAPLING, "Spirit", "SPI", ItemID.SPIRIT_SAPLING, ItemID.SPIRIT_SEEDLING, ItemID.SPIRIT_SEEDLING_W), + + APPLE_SAPLING(Type.SAPLING, "Apple", "APP", ItemID.APPLE_SAPLING, ItemID.APPLE_SEEDLING, ItemID.APPLE_SEEDLING_W), + BANANA_SAPLING(Type.SAPLING, "Banana", "BAN", ItemID.BANANA_SAPLING, ItemID.BANANA_SEEDLING, ItemID.BANANA_SEEDLING_W), + ORANGE_SAPLING(Type.SAPLING, "Orange", "ORA", ItemID.ORANGE_SAPLING, ItemID.ORANGE_SEEDLING, ItemID.ORANGE_SEEDLING_W), + CURRY_SAPLING(Type.SAPLING, "Curry", "CUR", ItemID.CURRY_SAPLING, ItemID.CURRY_SEEDLING, ItemID.CURRY_SEEDLING_W), + PINEAPPLE_SAPLING(Type.SAPLING, "Pine", "PINE", ItemID.PINEAPPLE_SAPLING, ItemID.PINEAPPLE_SEEDLING, ItemID.PINEAPPLE_SEEDLING_W), + PAPAYA_SAPLING(Type.SAPLING, "Papaya", "PAP", ItemID.PAPAYA_SAPLING, ItemID.PAPAYA_SEEDLING, ItemID.PAPAYA_SEEDLING_W), + PALM_SAPLING(Type.SAPLING, "Palm", "PALM", ItemID.PALM_SAPLING, ItemID.PALM_SEEDLING, ItemID.PALM_SEEDLING_W), + DRAGONFRUIT_SAPLING(Type.SAPLING, "Dragon", "DRAG", ItemID.DRAGONFRUIT_SAPLING, ItemID.DRAGONFRUIT_SEEDLING, ItemID.DRAGONFRUIT_SEEDLING_W), + + TEAK_SAPLING(Type.SAPLING, "Teak", "TEAK", ItemID.TEAK_SAPLING, ItemID.TEAK_SEEDLING, ItemID.TEAK_SEEDLING_W), + MAHOGANY_SAPLING(Type.SAPLING, "Mahog", "MAHOG", ItemID.MAHOGANY_SAPLING, ItemID.MAHOGANY_SEEDLING, ItemID.MAHOGANY_SEEDLING_W), + CALQUAT_SAPLING(Type.SAPLING, "Calquat", "CALQ", ItemID.CALQUAT_SAPLING, ItemID.CALQUAT_SEEDLING, ItemID.CALQUAT_SEEDLING_W), + CELASTRUS_SAPLING(Type.SAPLING, "Celas", "CEL", ItemID.CELASTRUS_SAPLING, ItemID.CELASTRUS_SEEDLING, ItemID.CELASTRUS_SEEDLING_W); + + final Type type; + final String medName; + final String shortName; + final int[] itemIDs; + + ItemIdentification(Type type, String medName, String shortName, int ... ids) + { + this.type = type; + this.medName = medName; + this.shortName = shortName; + this.itemIDs = ids; + } + + private static final Map itemIdentifications = new HashMap<>(); + + static + { + for (ItemIdentification i : values()) + { + for (int id : i.itemIDs) + { + itemIdentifications.put(id, i); + } + } + } + + static ItemIdentification get(int id) + { + return itemIdentifications.get(id); + } + + enum Type + { + SEED, + HERB, + SAPLING + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationConfig.java new file mode 100644 index 0000000000..12009a284f --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationConfig.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2019, Hydrox6 + * 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.itemidentification; + +import java.awt.Color; +import net.runelite.client.config.Config; +import net.runelite.client.config.ConfigGroup; +import net.runelite.client.config.ConfigItem; + +@ConfigGroup("itemidentification") +public interface ItemIdentificationConfig extends Config +{ + @ConfigItem( + keyName = "identificationType", + name = "Identification Type", + position = -4, + description = "How much to show of the item name" + ) + default ItemIdentificationMode identificationType() + { + return ItemIdentificationMode.SHORT; + } + + @ConfigItem( + keyName = "textColor", + name = "Color", + position = -3, + description = "The colour of the identification text" + ) + default Color textColor() + { + return Color.WHITE; + } + + @ConfigItem( + keyName = "showSeeds", + name = "Seeds", + description = "Show identification on Seeds" + ) + default boolean showSeeds() + { + return true; + } + + @ConfigItem( + keyName = "showHerbs", + name = "Herbs", + description = "Show identification on Herbs" + ) + default boolean showHerbs() + { + return false; + } + + @ConfigItem( + keyName = "showSaplings", + name = "Saplings", + description = "Show identification on Saplings and Seedlings" + ) + default boolean showSaplings() + { + return true; + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationMode.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationMode.java new file mode 100644 index 0000000000..7b9f11217c --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationMode.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2019, Hydrox6 + * 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.itemidentification; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +@Getter +@RequiredArgsConstructor +public enum ItemIdentificationMode +{ + SHORT("Short"), + MEDIUM("Medium"); + + private final String type; + + @Override + public String toString() + { + return type; + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationOverlay.java new file mode 100644 index 0000000000..badd46bdd3 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationOverlay.java @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2019, Hydrox6 + * 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.itemidentification; + +import com.google.inject.Inject; +import java.awt.Graphics2D; +import java.awt.Point; +import java.awt.Rectangle; +import static net.runelite.api.widgets.WidgetID.GUIDE_PRICE_GROUP_ID; +import static net.runelite.api.widgets.WidgetID.KEPT_ON_DEATH_GROUP_ID; +import net.runelite.api.widgets.WidgetItem; +import net.runelite.client.ui.FontManager; +import net.runelite.client.ui.overlay.WidgetItemOverlay; +import net.runelite.client.ui.overlay.components.TextComponent; + +class ItemIdentificationOverlay extends WidgetItemOverlay +{ + private final ItemIdentificationConfig config; + + @Inject + ItemIdentificationOverlay(ItemIdentificationConfig config) + { + this.config = config; + showOnInventory(); + showOnBank(); + showOnInterfaces(KEPT_ON_DEATH_GROUP_ID, GUIDE_PRICE_GROUP_ID); + } + + @Override + public void renderItemOverlay(Graphics2D graphics, int itemId, WidgetItem itemWidget) + { + ItemIdentification iden = ItemIdentification.get(itemId); + if (iden == null) + { + return; + } + + switch (iden.type) + { + case SEED: + if (!config.showSeeds()) + { + return; + } + break; + case HERB: + if (!config.showHerbs()) + { + return; + } + break; + case SAPLING: + if (!config.showSaplings()) + { + return; + } + break; + } + + graphics.setFont(FontManager.getRunescapeSmallFont()); + renderText(graphics, itemWidget.getCanvasBounds(), iden); + + } + + private void renderText(Graphics2D graphics, Rectangle bounds, ItemIdentification iden) + { + final TextComponent textComponent = new TextComponent(); + textComponent.setPosition(new Point(bounds.x, bounds.y + bounds.height)); + textComponent.setColor(config.textColor()); + switch (config.identificationType()) + { + case SHORT: + textComponent.setText(iden.shortName); + break; + case MEDIUM: + textComponent.setText(iden.medName); + break; + } + textComponent.render(graphics); + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationPlugin.java new file mode 100644 index 0000000000..6e4f331765 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationPlugin.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2019, Hydrox6 + * 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.itemidentification; + +import com.google.inject.Provides; +import javax.inject.Inject; +import net.runelite.client.config.ConfigManager; +import net.runelite.client.plugins.Plugin; +import net.runelite.client.plugins.PluginDescriptor; +import net.runelite.client.ui.overlay.OverlayManager; + +@PluginDescriptor( + name = "Item Identification", + description = "Show identifying text over items with difficult to distinguish sprites", + enabledByDefault = false +) +public class ItemIdentificationPlugin extends Plugin +{ + @Inject + private OverlayManager overlayManager; + + @Inject + private ItemIdentificationOverlay overlay; + + @Provides + ItemIdentificationConfig getConfig(ConfigManager configManager) + { + return configManager.getConfig(ItemIdentificationConfig.class); + } + + @Override + protected void startUp() + { + overlayManager.add(overlay); + } + + @Override + protected void shutDown() + { + overlayManager.remove(overlay); + } +} \ No newline at end of file From b473fa03971fde98923f51c081f8a4bb67ad73f8 Mon Sep 17 00:00:00 2001 From: Beau Date: Sat, 27 Apr 2019 23:48:14 -0400 Subject: [PATCH 14/24] Optionally prevent virtual levels from effecting total level --- .../virtuallevels/VirtualLevelsConfig.java | 44 +++++++++++++++++++ .../virtuallevels/VirtualLevelsPlugin.java | 29 +++++++++++- 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/virtuallevels/VirtualLevelsConfig.java diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/virtuallevels/VirtualLevelsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/virtuallevels/VirtualLevelsConfig.java new file mode 100644 index 0000000000..83bacd8b8f --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/virtuallevels/VirtualLevelsConfig.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2019, Beau Mitchell + * 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.virtuallevels; + +import net.runelite.client.config.Config; +import net.runelite.client.config.ConfigGroup; +import net.runelite.client.config.ConfigItem; + +@ConfigGroup("virtuallevels") +public interface VirtualLevelsConfig extends Config +{ + @ConfigItem( + keyName = "virtualTotalLevel", + name = "Virtual Total Level", + description = "Count virtual levels towards total level", + position = 0 + ) + default boolean virtualTotalLevel() + { + return true; + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/virtuallevels/VirtualLevelsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/virtuallevels/VirtualLevelsPlugin.java index 879110bb2b..7be76a31b4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/virtuallevels/VirtualLevelsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/virtuallevels/VirtualLevelsPlugin.java @@ -25,12 +25,15 @@ */ package net.runelite.client.plugins.virtuallevels; +import com.google.inject.Provides; import javax.inject.Inject; import net.runelite.api.Client; import net.runelite.api.Experience; import net.runelite.api.Skill; +import net.runelite.api.events.ConfigChanged; import net.runelite.api.events.ScriptCallbackEvent; import net.runelite.client.callback.ClientThread; +import net.runelite.client.config.ConfigManager; import net.runelite.client.eventbus.Subscribe; import net.runelite.client.events.PluginChanged; import net.runelite.client.plugins.Plugin; @@ -38,7 +41,7 @@ import net.runelite.client.plugins.PluginDescriptor; @PluginDescriptor( name = "Virtual Levels", - description = "Configuration for the virtual levels plugin.", + description = "Shows virtual levels (beyond 99) and virtual skill total on the skills tab.", tags = {"skill", "total", "max"}, enabledByDefault = false ) @@ -46,12 +49,21 @@ public class VirtualLevelsPlugin extends Plugin { private static final String TOTAL_LEVEL_TEXT_PREFIX = "Total level:
"; + @Inject + private VirtualLevelsConfig config; + @Inject private Client client; @Inject private ClientThread clientThread; + @Provides + VirtualLevelsConfig provideConfig(ConfigManager configManager) + { + return configManager.getConfig(VirtualLevelsConfig.class); + } + @Override protected void shutDown() { @@ -68,6 +80,17 @@ public class VirtualLevelsPlugin extends Plugin } } + @Subscribe + public void onConfigChanged(ConfigChanged configChanged) + { + if (!configChanged.getGroup().equals("virtuallevels")) + { + return; + } + + clientThread.invoke(this::simulateSkillChange); + } + @Subscribe public void onScriptCallbackEvent(ScriptCallbackEvent e) { @@ -93,6 +116,10 @@ public class VirtualLevelsPlugin extends Plugin intStack[intStackSize - 1] = Experience.MAX_VIRT_LEVEL; break; case "skillTabTotalLevel": + if (!config.virtualTotalLevel()) + { + break; + } int level = 0; for (Skill s : Skill.values()) From c80d7726caeed817c111a6a3da858f42149a3cda Mon Sep 17 00:00:00 2001 From: Alexsuperfly Date: Tue, 30 Apr 2019 15:18:40 -0400 Subject: [PATCH 15/24] slayer: add 'south of' to task regex --- .../net/runelite/client/plugins/slayer/SlayerPlugin.java | 6 +++--- 1 file changed, 3 insertions(+), 3 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 b789162bd8..1b87aa769a 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 @@ -90,7 +90,7 @@ import net.runelite.http.api.chat.ChatClient; public class SlayerPlugin extends Plugin { //Chat messages - private static final Pattern CHAT_GEM_PROGRESS_MESSAGE = Pattern.compile("^(?:You're assigned to kill|You have received a new Slayer assignment from .*:) (?:[Tt]he )?(?.+?)(?: (?:in|on) (?:the )?(?[^;]+))?(?:; only | \\()(?\\d+)(?: more to go\\.|\\))$"); + private static final Pattern CHAT_GEM_PROGRESS_MESSAGE = Pattern.compile("^(?:You're assigned to kill|You have received a new Slayer assignment from .*:) (?:[Tt]he )?(?.+?)(?: (?:in|on|south of) (?:the )?(?[^;]+))?(?:; only | \\()(?\\d+)(?: more to go\\.|\\))$"); private static final String CHAT_GEM_COMPLETE_MESSAGE = "You need something new to hunt."; private static final Pattern CHAT_COMPLETE_MESSAGE = Pattern.compile("(?:\\d+,)*\\d+"); private static final String CHAT_CANCEL_MESSAGE = "Your task has been cancelled."; @@ -107,10 +107,10 @@ public class SlayerPlugin extends Plugin private static final Pattern COMBAT_BRACELET_TASK_UPDATE_MESSAGE = Pattern.compile("^You still need to kill (\\d+) monsters to complete your current Slayer assignment"); //NPC messages - private static final Pattern NPC_ASSIGN_MESSAGE = Pattern.compile(".*(?:Your new task is to kill|You are to bring balance to)\\s*(?\\d+) (?.+?)(?: (?:in|on) (?:the )?(?.+))?\\."); + private static final Pattern NPC_ASSIGN_MESSAGE = Pattern.compile(".*(?:Your new task is to kill|You are to bring balance to)\\s*(?\\d+) (?.+?)(?: (?:in|on|south of) (?:the )?(?.+))?\\."); private static final Pattern NPC_ASSIGN_BOSS_MESSAGE = Pattern.compile("^Excellent. You're now assigned to kill (?:the )?(.*) (\\d+) times.*Your reward point tally is (.*)\\.$"); private static final Pattern NPC_ASSIGN_FIRST_MESSAGE = Pattern.compile("^We'll start you off hunting (.*), you'll need to kill (\\d*) of them."); - private static final Pattern NPC_CURRENT_MESSAGE = Pattern.compile("^You're still (?:hunting|bringing balance to) (?.+)(?: (?:in|on) (?:the )?(?.+), with|; you have) (?\\d+) to go\\..*"); + private static final Pattern NPC_CURRENT_MESSAGE = Pattern.compile("^You're still (?:hunting|bringing balance to) (?.+)(?: (?:in|on|south of) (?:the )?(?.+), with|; you have) (?\\d+) to go\\..*"); //Reward UI private static final Pattern REWARD_POINTS = Pattern.compile("Reward points: ((?:\\d+,)*\\d+)"); From b1a9c764c1a1b53ae3615f54157f8a190d16c149 Mon Sep 17 00:00:00 2001 From: Alexsuperfly Date: Tue, 30 Apr 2019 15:47:45 -0400 Subject: [PATCH 16/24] slayer: add test including 'south of' --- .../client/plugins/slayer/SlayerPluginTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 06291d7fce..4e9850e09f 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 @@ -67,6 +67,7 @@ public class SlayerPluginTest private static final String TASK_NEW = "Your new task is to kill 231 Suqahs."; private static final String TASK_NEW_KONAR = "You are to bring balance to 147 Wyrms in the Karuulm Slayer Dungeon."; private static final String TASK_NEW_KONAR_2 = "You are to bring balance to 142 Hellhounds in Witchhaven Dungeon."; + private static final String TASK_NEW_KONAR_3 = "You are to bring balance to 135 Trolls south of Mount Quidamortem."; private static final String TASK_NEW_FIRST = "We'll start you off hunting goblins, you'll need to kill 17 of them."; private static final String TASK_NEW_NPC_CONTACT = "Excellent, you're doing great. Your new task is to kill
211 Suqahs."; private static final String TASK_NEW_FROM_PARTNER = "You have received a new Slayer assignment from breaklulz: Dust Devils (377)"; @@ -201,6 +202,19 @@ public class SlayerPluginTest assertEquals("Witchhaven Dungeon", slayerPlugin.getTaskLocation()); } + @Test + public void testNewKonarTask3() + { + Widget npcDialog = mock(Widget.class); + when(npcDialog.getText()).thenReturn(TASK_NEW_KONAR_3); + when(client.getWidget(WidgetInfo.DIALOG_NPC_TEXT)).thenReturn(npcDialog); + slayerPlugin.onGameTick(new GameTick()); + + assertEquals("Trolls", slayerPlugin.getTaskName()); + assertEquals(135, slayerPlugin.getAmount()); + assertEquals("Mount Quidamortem", slayerPlugin.getTaskLocation()); + } + @Test public void testFirstTask() { From d37566aabf63c9482cb33fa1798440a17e95e23b Mon Sep 17 00:00:00 2001 From: Twiglet1022 <29353990+Twiglet1022@users.noreply.github.com> Date: Wed, 24 Apr 2019 00:54:29 +0100 Subject: [PATCH 17/24] clue scroll plugin: add Falo the Bard clues --- .../plugins/cluescrolls/ClueScrollPlugin.java | 8 + .../cluescrolls/clues/FaloTheBardClue.java | 202 ++++++++++++++++++ 2 files changed, 210 insertions(+) create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/FaloTheBardClue.java diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/ClueScrollPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/ClueScrollPlugin.java index fafb40872f..d060f1a3e4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/ClueScrollPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/ClueScrollPlugin.java @@ -82,6 +82,7 @@ import net.runelite.client.plugins.cluescrolls.clues.CoordinateClue; import net.runelite.client.plugins.cluescrolls.clues.CrypticClue; import net.runelite.client.plugins.cluescrolls.clues.EmoteClue; import net.runelite.client.plugins.cluescrolls.clues.FairyRingClue; +import net.runelite.client.plugins.cluescrolls.clues.FaloTheBardClue; import net.runelite.client.plugins.cluescrolls.clues.HotColdClue; import net.runelite.client.plugins.cluescrolls.clues.LocationClueScroll; import net.runelite.client.plugins.cluescrolls.clues.LocationsClueScroll; @@ -508,6 +509,13 @@ public class ClueScrollPlugin extends Plugin return fairyRingClue; } + final FaloTheBardClue faloTheBardClue = FaloTheBardClue.forText(text); + + if (faloTheBardClue != null) + { + return faloTheBardClue; + } + final HotColdClue hotColdClue = HotColdClue.forText(text); if (hotColdClue != null) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/FaloTheBardClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/FaloTheBardClue.java new file mode 100644 index 0000000000..68ad2e0af8 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/FaloTheBardClue.java @@ -0,0 +1,202 @@ +/* + * Copyright (c) 2019, Twiglet1022 + * 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.cluescrolls.clues; + +import com.google.common.collect.ImmutableList; +import java.awt.Color; +import java.awt.Graphics2D; +import java.util.List; +import javax.annotation.Nonnull; +import lombok.Getter; +import net.runelite.api.Item; +import static net.runelite.api.ItemID.ARMADYL_HELMET; +import static net.runelite.api.ItemID.BARRELCHEST_ANCHOR; +import static net.runelite.api.ItemID.BARROWS_GLOVES; +import static net.runelite.api.ItemID.BASALT; +import static net.runelite.api.ItemID.BOOK_OF_BALANCE; +import static net.runelite.api.ItemID.BOOK_OF_DARKNESS; +import static net.runelite.api.ItemID.BOOK_OF_LAW; +import static net.runelite.api.ItemID.BOOK_OF_WAR; +import static net.runelite.api.ItemID.COOKING_GAUNTLETS; +import static net.runelite.api.ItemID.CRYSTAL_BOW_110; +import static net.runelite.api.ItemID.CRYSTAL_BOW_110_I; +import static net.runelite.api.ItemID.DRAGON_DEFENDER; +import static net.runelite.api.ItemID.DRAGON_SCIMITAR; +import static net.runelite.api.ItemID.FIGHTER_TORSO; +import static net.runelite.api.ItemID.GREENMANS_ALEM; +import static net.runelite.api.ItemID.HOLY_BOOK; +import static net.runelite.api.ItemID.INFERNAL_AXE; +import static net.runelite.api.ItemID.IVANDIS_FLAIL; +import static net.runelite.api.ItemID.LAVA_DRAGON_BONES; +import static net.runelite.api.ItemID.MARK_OF_GRACE; +import static net.runelite.api.ItemID.NEW_CRYSTAL_BOW; +import static net.runelite.api.ItemID.NEW_CRYSTAL_BOW_I; +import static net.runelite.api.ItemID.NUMULITE; +import static net.runelite.api.ItemID.ROD_OF_IVANDIS_1; +import static net.runelite.api.ItemID.ROD_OF_IVANDIS_10; +import static net.runelite.api.ItemID.RUNE_PLATEBODY; +import static net.runelite.api.ItemID.TZHAARKETOM; +import static net.runelite.api.ItemID.UNHOLY_BOOK; +import static net.runelite.api.ItemID.WARRIOR_GUILD_TOKEN; +import net.runelite.api.NPC; +import net.runelite.api.coords.WorldPoint; +import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR; +import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin; +import static net.runelite.client.plugins.cluescrolls.ClueScrollWorldOverlay.IMAGE_Z_OFFSET; +import net.runelite.client.plugins.cluescrolls.clues.emote.AnyRequirementCollection; +import net.runelite.client.plugins.cluescrolls.clues.emote.ItemRequirement; +import net.runelite.client.plugins.cluescrolls.clues.emote.RangeItemRequirement; +import net.runelite.client.plugins.cluescrolls.clues.emote.SingleItemRequirement; +import net.runelite.client.ui.overlay.OverlayUtil; +import net.runelite.client.ui.overlay.components.LineComponent; +import net.runelite.client.ui.overlay.components.PanelComponent; +import net.runelite.client.ui.overlay.components.TitleComponent; + +@Getter +public class FaloTheBardClue extends ClueScroll implements TextClueScroll, NpcClueScroll +{ + private static final List CLUES = ImmutableList.of( + new FaloTheBardClue("A blood red weapon, a strong curved sword, found on the island of primate lords.", item(DRAGON_SCIMITAR)), + new FaloTheBardClue("A book that preaches of some great figure, lending strength, might, and vigour.", any("Any god book (must be complete)", item(HOLY_BOOK), item(BOOK_OF_BALANCE), item(UNHOLY_BOOK), item(BOOK_OF_LAW), item(BOOK_OF_WAR), item(BOOK_OF_DARKNESS))), + new FaloTheBardClue("A bow of elven craft was made, it shimmers bright, but will soon fade.", any("Crystal Bow", range(NEW_CRYSTAL_BOW, CRYSTAL_BOW_110), range(NEW_CRYSTAL_BOW_I, CRYSTAL_BOW_110_I))), + new FaloTheBardClue("A fiery axe of great inferno, when you use it, you'll wonder where the logs go.", item(INFERNAL_AXE)), + new FaloTheBardClue("A mark used to increase one's grace, found atop a seer's place.", item(MARK_OF_GRACE)), + new FaloTheBardClue("A molten beast with fiery breath, you acquire these with its death.", item(LAVA_DRAGON_BONES)), + new FaloTheBardClue("A shiny helmet of flight, to obtain this with melee, struggle you might.", item(ARMADYL_HELMET)), + // The wiki doesn't specify whether the trimmed dragon defender will work so I've assumed that it doesn't + new FaloTheBardClue("A sword held in the other hand, red its colour, Cyclops strength you must withstand.", item(DRAGON_DEFENDER)), + new FaloTheBardClue("A token used to kill mythical beasts, in hope of a blade or just for an xp feast.", item(WARRIOR_GUILD_TOKEN)), + new FaloTheBardClue("Green is my favorite, mature ale I do love, this takes your herblore above.", item(GREENMANS_ALEM)), + new FaloTheBardClue("It can hold down a boat or crush a goat, this object, you see, is quite heavy.", item(BARRELCHEST_ANCHOR)), + new FaloTheBardClue("It comes from the ground, underneath the snowy plain. Trolls aplenty, with what looks like a mane.", item(BASALT)), + new FaloTheBardClue("No attack to wield, only strength is required, made of obsidian but with no room for a shield.", item(TZHAARKETOM)), + new FaloTheBardClue("Penance healers runners and more, obtaining this body often gives much deplore.", item(FIGHTER_TORSO)), + new FaloTheBardClue("Strangely found in a chest, many believe these gloves are the best.", item(BARROWS_GLOVES)), + new FaloTheBardClue("These gloves of white won't help you fight, but aid in cooking, they just might.", item(COOKING_GAUNTLETS)), + new FaloTheBardClue("They come from some time ago, from a land unto the east. Fossilised they have become, this small and gentle beast.", item(NUMULITE)), + new FaloTheBardClue("To slay a dragon you must first do, before this chest piece can be put on you.", item(RUNE_PLATEBODY)), + new FaloTheBardClue("Vampyres are agile opponents, damaged best with a weapon of many components.", any("Rod of Ivandis or Ivandis flail", range(ROD_OF_IVANDIS_10, ROD_OF_IVANDIS_1), item(IVANDIS_FLAIL))) + ); + + private static final WorldPoint LOCATION = new WorldPoint(2689, 3550, 0); + private static final String FALO_THE_BARD = "Falo the Bard"; + + private static SingleItemRequirement item(int itemId) + { + return new SingleItemRequirement(itemId); + } + + private static AnyRequirementCollection any(String name, ItemRequirement... requirements) + { + return new AnyRequirementCollection(name, requirements); + } + + private static RangeItemRequirement range(int startItemId, int endItemId) + { + return range(null, startItemId, endItemId); + } + + private static RangeItemRequirement range(String name, int startItemId, int endItemId) + { + return new RangeItemRequirement(name, startItemId, endItemId); + } + + private final String text; + @Nonnull + private final ItemRequirement[] itemRequirements; + + private FaloTheBardClue(String text, @Nonnull ItemRequirement... itemRequirements) + { + this.text = text; + this.itemRequirements = itemRequirements; + } + + @Override + public void makeOverlayHint(PanelComponent panelComponent, ClueScrollPlugin plugin) + { + panelComponent.getChildren().add(TitleComponent.builder().text("Falo the Bard Clue").build()); + + panelComponent.getChildren().add(LineComponent.builder().left("NPC:").build()); + panelComponent.getChildren().add(LineComponent.builder() + .left(FALO_THE_BARD) + .leftColor(TITLED_CONTENT_COLOR) + .build()); + + panelComponent.getChildren().add(LineComponent.builder().left("Item:").build()); + + Item[] inventory = plugin.getInventoryItems(); + + // If inventory is null, the player has nothing in their inventory + if (inventory == null) + { + inventory = new Item[0]; + } + + for (ItemRequirement requirement : itemRequirements) + { + boolean inventoryFulfilled = requirement.fulfilledBy(inventory); + + panelComponent.getChildren().add(LineComponent.builder() + .left(requirement.getCollectiveName(plugin.getClient())) + .leftColor(TITLED_CONTENT_COLOR) + .right(inventoryFulfilled ? "\u2713" : "\u2717") + .rightColor(inventoryFulfilled ? Color.GREEN : Color.RED) + .build()); + } + } + + @Override + public void makeWorldOverlayHint(Graphics2D graphics, ClueScrollPlugin plugin) + { + if (!LOCATION.isInScene(plugin.getClient())) + { + return; + } + + for (NPC npc : plugin.getNpcsToMark()) + { + OverlayUtil.renderActorOverlayImage(graphics, npc, plugin.getClueScrollImage(), Color.ORANGE, IMAGE_Z_OFFSET); + } + } + + @Override + public String[] getNpcs() + { + return new String[] {FALO_THE_BARD}; + } + + public static FaloTheBardClue forText(String text) + { + for (FaloTheBardClue clue : CLUES) + { + if (clue.text.equalsIgnoreCase(text)) + { + return clue; + } + } + + return null; + } +} From 515d0ab04b51276e5ee99adcd97b251f545d7ff6 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 2 May 2019 10:33:03 +0000 Subject: [PATCH 18/24] Update Object IDs to 2019-05-02-rev179 --- runelite-api/src/main/java/net/runelite/api/ObjectID.java | 1 + 1 file changed, 1 insertion(+) 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 5ceb5ee8bc..82bfa6b5d2 100644 --- a/runelite-api/src/main/java/net/runelite/api/ObjectID.java +++ b/runelite-api/src/main/java/net/runelite/api/ObjectID.java @@ -18575,5 +18575,6 @@ public final class ObjectID public static final int STRANGE_CASKET = 34733; public static final int INCONSPICUOUS_BUSH_BEGINNER = 34734; public static final int STASH_BEGINNER = 34735; + public static final int ROCKS_34741 = 34741; /* This file is automatically generated. Do not edit. */ } From 4783e12737f8a2a32e02ef8ad5c02dc5c05c1ad4 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 2 May 2019 10:33:09 +0000 Subject: [PATCH 19/24] Update Widget IDs to 2019-05-02-rev179 --- .../src/main/java/net/runelite/api/widgets/WidgetID.java | 6 +++--- 1 file changed, 3 insertions(+), 3 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 884d5a2d57..ed593ca11a 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 @@ -204,9 +204,9 @@ public class WidgetID static class ClanChat { static final int TITLE = 1; - static final int NAME = 3; - static final int OWNER = 5; - static final int LIST = 15; + static final int NAME = 4; + static final int OWNER = 6; + static final int LIST = 16; } static class Bank From 6493e3a8cdbca467b2683caaf21805003ece3420 Mon Sep 17 00:00:00 2001 From: Max Weber Date: Thu, 2 May 2019 04:43:35 -0600 Subject: [PATCH 20/24] clanchat: Shorten message so it fits on the new interface --- .../net/runelite/client/plugins/clanchat/ClanChatPlugin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/clanchat/ClanChatPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/clanchat/ClanChatPlugin.java index 3f46869425..fcc8728e92 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/clanchat/ClanChatPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/clanchat/ClanChatPlugin.java @@ -87,8 +87,8 @@ import net.runelite.client.util.Text; public class ClanChatPlugin extends Plugin { private static final int MAX_CHATS = 10; - private static final String CLAN_CHAT_TITLE = "Clan Chat"; - private static final String RECENT_TITLE = "Recent Clan Chats"; + private static final String CLAN_CHAT_TITLE = "CC"; + private static final String RECENT_TITLE = "Recent CCs"; private static final int JOIN_LEAVE_DURATION = 20; private static final int MESSAGE_DELAY = 10; From 8608484acc9bcf23edfdb29489d8c7fa71be4d8c Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Thu, 2 May 2019 11:37:08 +0000 Subject: [PATCH 21/24] [maven-release-plugin] prepare release runelite-parent-1.5.22 --- 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 ++-- protocol-api/pom.xml | 2 +- protocol/pom.xml | 2 +- runelite-api/pom.xml | 2 +- runelite-client/pom.xml | 2 +- runelite-mixins/pom.xml | 2 +- runelite-script-assembler-plugin/pom.xml | 2 +- runescape-api/pom.xml | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cache-client/pom.xml b/cache-client/pom.xml index 1daaf23e24..cd7d986493 100644 --- a/cache-client/pom.xml +++ b/cache-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22-SNAPSHOT + 1.5.22 cache-client diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml index fb3edeb171..cc4c803cb6 100644 --- a/cache-updater/pom.xml +++ b/cache-updater/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.5.22-SNAPSHOT + 1.5.22 Cache Updater diff --git a/cache/pom.xml b/cache/pom.xml index 051e0bbcfc..f6169c3f30 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22-SNAPSHOT + 1.5.22 cache diff --git a/http-api/pom.xml b/http-api/pom.xml index bdebfd7020..22b54a427f 100644 --- a/http-api/pom.xml +++ b/http-api/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.5.22-SNAPSHOT + 1.5.22 Web API diff --git a/http-service/pom.xml b/http-service/pom.xml index c12a91fa11..a5460d0507 100644 --- a/http-service/pom.xml +++ b/http-service/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.5.22-SNAPSHOT + 1.5.22 Web Service diff --git a/pom.xml b/pom.xml index 0d505fccac..a80712d7ab 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.5.22-SNAPSHOT + 1.5.22 pom RuneLite @@ -59,7 +59,7 @@ https://github.com/runelite/runelite scm:git:git://github.com/runelite/runelite scm:git:git@github.com:runelite/runelite - HEAD + runelite-parent-1.5.22 diff --git a/protocol-api/pom.xml b/protocol-api/pom.xml index 09b1d2c28c..1e10e0eebc 100644 --- a/protocol-api/pom.xml +++ b/protocol-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22-SNAPSHOT + 1.5.22 protocol-api diff --git a/protocol/pom.xml b/protocol/pom.xml index 8416894b5e..3e37075fb9 100644 --- a/protocol/pom.xml +++ b/protocol/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22-SNAPSHOT + 1.5.22 protocol diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index 00117b581e..fee86e814c 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22-SNAPSHOT + 1.5.22 runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index b3d4ab64fc..7f1f993b31 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22-SNAPSHOT + 1.5.22 client diff --git a/runelite-mixins/pom.xml b/runelite-mixins/pom.xml index 747256e0ed..3edbed230d 100644 --- a/runelite-mixins/pom.xml +++ b/runelite-mixins/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22-SNAPSHOT + 1.5.22 mixins diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index 2ee5a13a39..11b967d6ed 100644 --- a/runelite-script-assembler-plugin/pom.xml +++ b/runelite-script-assembler-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22-SNAPSHOT + 1.5.22 script-assembler-plugin diff --git a/runescape-api/pom.xml b/runescape-api/pom.xml index 8bdcfa8ed2..025d73d3a8 100644 --- a/runescape-api/pom.xml +++ b/runescape-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22-SNAPSHOT + 1.5.22 net.runelite.rs From 412d97716e03abf979e87419bc35180b16d3ee89 Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Thu, 2 May 2019 11:37:15 +0000 Subject: [PATCH 22/24] [maven-release-plugin] prepare for next development iteration --- 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 ++-- protocol-api/pom.xml | 2 +- protocol/pom.xml | 2 +- runelite-api/pom.xml | 2 +- runelite-client/pom.xml | 2 +- runelite-mixins/pom.xml | 2 +- runelite-script-assembler-plugin/pom.xml | 2 +- runescape-api/pom.xml | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cache-client/pom.xml b/cache-client/pom.xml index cd7d986493..691bb1d95c 100644 --- a/cache-client/pom.xml +++ b/cache-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22 + 1.5.23-SNAPSHOT cache-client diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml index cc4c803cb6..9c925c8cb4 100644 --- a/cache-updater/pom.xml +++ b/cache-updater/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.5.22 + 1.5.23-SNAPSHOT Cache Updater diff --git a/cache/pom.xml b/cache/pom.xml index f6169c3f30..efb80c0240 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22 + 1.5.23-SNAPSHOT cache diff --git a/http-api/pom.xml b/http-api/pom.xml index 22b54a427f..abe47d6a61 100644 --- a/http-api/pom.xml +++ b/http-api/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.5.22 + 1.5.23-SNAPSHOT Web API diff --git a/http-service/pom.xml b/http-service/pom.xml index a5460d0507..81d8de533c 100644 --- a/http-service/pom.xml +++ b/http-service/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.5.22 + 1.5.23-SNAPSHOT Web Service diff --git a/pom.xml b/pom.xml index a80712d7ab..3e7f02b50c 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.5.22 + 1.5.23-SNAPSHOT pom RuneLite @@ -59,7 +59,7 @@ https://github.com/runelite/runelite scm:git:git://github.com/runelite/runelite scm:git:git@github.com:runelite/runelite - runelite-parent-1.5.22 + HEAD diff --git a/protocol-api/pom.xml b/protocol-api/pom.xml index 1e10e0eebc..fae727ac70 100644 --- a/protocol-api/pom.xml +++ b/protocol-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22 + 1.5.23-SNAPSHOT protocol-api diff --git a/protocol/pom.xml b/protocol/pom.xml index 3e37075fb9..814c33de88 100644 --- a/protocol/pom.xml +++ b/protocol/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22 + 1.5.23-SNAPSHOT protocol diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index fee86e814c..38f6ace8a7 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22 + 1.5.23-SNAPSHOT runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index 7f1f993b31..3a84ed3124 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22 + 1.5.23-SNAPSHOT client diff --git a/runelite-mixins/pom.xml b/runelite-mixins/pom.xml index 3edbed230d..a37ea94421 100644 --- a/runelite-mixins/pom.xml +++ b/runelite-mixins/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22 + 1.5.23-SNAPSHOT mixins diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index 11b967d6ed..5302a199d1 100644 --- a/runelite-script-assembler-plugin/pom.xml +++ b/runelite-script-assembler-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22 + 1.5.23-SNAPSHOT script-assembler-plugin diff --git a/runescape-api/pom.xml b/runescape-api/pom.xml index 025d73d3a8..cc70e2bdd1 100644 --- a/runescape-api/pom.xml +++ b/runescape-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.22 + 1.5.23-SNAPSHOT net.runelite.rs From ae7846e32be09ba65d10ae98725496b6d2090cb2 Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Thu, 2 May 2019 14:07:00 +0100 Subject: [PATCH 23/24] item identification: Grimy Toadflax isn't Irit --- .../client/plugins/itemidentification/ItemIdentification.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentification.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentification.java index 612cbafd7a..8ef3efcf8b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentification.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentification.java @@ -55,7 +55,7 @@ enum ItemIdentification HARRALANDER(Type.HERB, "Harra", "H", ItemID.HARRALANDER, ItemID.GRIMY_HARRALANDER), RANARR(Type.HERB, "Ranarr", "R", ItemID.RANARR_WEED, ItemID.GRIMY_RANARR_WEED), TOADFLAX(Type.HERB, "Toad", "TOA", ItemID.TOADFLAX, ItemID.GRIMY_TOADFLAX), - IRIT(Type.HERB, "Irit", "I", ItemID.IRIT_LEAF, ItemID.GRIMY_TOADFLAX), + IRIT(Type.HERB, "Irit", "I", ItemID.IRIT_LEAF, ItemID.GRIMY_IRIT_LEAF), AVANTOE(Type.HERB, "Avantoe", "A", ItemID.AVANTOE, ItemID.GRIMY_AVANTOE), KWUARM(Type.HERB, "Kwuarm", "K", ItemID.KWUARM, ItemID.GRIMY_KWUARM), SNAPDRAGON(Type.HERB, "Snap", "S", ItemID.SNAPDRAGON, ItemID.GRIMY_SNAPDRAGON), From ec9ec1d3af919c8367473880a66cacad79ec5ca3 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 2 May 2019 09:39:05 -0400 Subject: [PATCH 24/24] Revert "npcindicators: Add option to highlight NPC name in right click menu (#8673)" This reverts commit 8ff1aacfd8805924e9256216cf62a5e8d2024a36. --- .../npchighlight/NpcIndicatorsConfig.java | 11 ----- .../npchighlight/NpcIndicatorsPlugin.java | 44 ++++++------------- 2 files changed, 13 insertions(+), 42 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java index 1ef10c50d8..f5b7ac6757 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java @@ -89,17 +89,6 @@ public interface NpcIndicatorsConfig extends Config @ConfigItem( position = 5, - keyName = "highlightMenuNames", - name = "Highlight menu names", - description = "Highlight NPC names in right click menu" - ) - default boolean highlightMenuNames() - { - return false; - } - - @ConfigItem( - position = 6, keyName = "showRespawnTimer", name = "Show respawn timer", description = "Show respawn timer of tagged NPCs") diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java index 65bfb5bdbc..7e84798d2a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java @@ -66,7 +66,6 @@ import net.runelite.client.input.KeyManager; import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.ui.overlay.OverlayManager; -import net.runelite.client.util.ColorUtil; import net.runelite.client.util.Text; import net.runelite.client.util.WildcardMatcher; @@ -249,37 +248,20 @@ public class NpcIndicatorsPlugin extends Plugin @Subscribe public void onMenuEntryAdded(MenuEntryAdded event) { + if (!hotKeyPressed || event.getType() != MenuAction.EXAMINE_NPC.getId()) + { + return; + } + MenuEntry[] menuEntries = client.getMenuEntries(); - String target = event.getTarget(); - final int identifier = event.getIdentifier(); - int type = event.getType(); - - if (type >= 2000) - { - type -= 2000; - } - - if (config.highlightMenuNames() && - NPC_MENU_ACTIONS.contains(MenuAction.of(type)) && - highlightedNpcs.stream().anyMatch(npc -> npc.getIndex() == identifier)) - { - final MenuEntry menuEntry = menuEntries[menuEntries.length - 1]; - target = ColorUtil.prependColorTag(Text.removeTags(target), config.getHighlightColor()); - menuEntry.setTarget(target); - } - - if (hotKeyPressed && type == MenuAction.EXAMINE_NPC.getId()) - { - menuEntries = Arrays.copyOf(menuEntries, menuEntries.length + 1); - final MenuEntry tagEntry = menuEntries[menuEntries.length - 1] = new MenuEntry(); - tagEntry.setOption(TAG); - tagEntry.setTarget(target); - tagEntry.setParam0(event.getActionParam0()); - tagEntry.setParam1(event.getActionParam1()); - tagEntry.setIdentifier(event.getIdentifier()); - tagEntry.setType(MenuAction.RUNELITE.getId()); - } - + menuEntries = Arrays.copyOf(menuEntries, menuEntries.length + 1); + MenuEntry menuEntry = menuEntries[menuEntries.length - 1] = new MenuEntry(); + menuEntry.setOption(TAG); + menuEntry.setTarget(event.getTarget()); + menuEntry.setParam0(event.getActionParam0()); + menuEntry.setParam1(event.getActionParam1()); + menuEntry.setIdentifier(event.getIdentifier()); + menuEntry.setType(MenuAction.RUNELITE.getId()); client.setMenuEntries(menuEntries); }