From 2547b164821eabd9c095d57ea31ff2a64826d600 Mon Sep 17 00:00:00 2001 From: zeruth Date: Thu, 25 Apr 2019 17:57:45 -0400 Subject: [PATCH 1/7] Seperate Flexo to library This isn't hiding flexo as it's just now hosted on the maven repo. This is to ensure backwards compatability when api in flexo changes. all old versions will be stored indefinitely. Config plugin is included in library as well. --- .../java/net/runelite/client/RuneLite.java | 7 - .../java/net/runelite/client/flexo/Flexo.java | 253 ------------------ .../net/runelite/client/flexo/FlexoMouse.java | 246 ----------------- .../net/runelite/client/flexo/FlexoUtils.java | 23 -- .../client/plugins/flexo/FlexoConfig.java | 180 ------------- .../client/plugins/flexo/FlexoOverlay.java | 42 --- .../client/plugins/flexo/FlexoPlugin.java | 128 --------- 7 files changed, 879 deletions(-) delete mode 100644 runelite-client/src/main/java/net/runelite/client/flexo/Flexo.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/flexo/FlexoMouse.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/flexo/FlexoUtils.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/flexo/FlexoConfig.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/flexo/FlexoOverlay.java delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/flexo/FlexoPlugin.java diff --git a/runelite-client/src/main/java/net/runelite/client/RuneLite.java b/runelite-client/src/main/java/net/runelite/client/RuneLite.java index b45e4ca0e4..d62a77f102 100644 --- a/runelite-client/src/main/java/net/runelite/client/RuneLite.java +++ b/runelite-client/src/main/java/net/runelite/client/RuneLite.java @@ -174,7 +174,6 @@ public class RuneLite parser.accepts("developer-mode", "Enable developer tools"); parser.accepts("debug", "Show extra debugging output"); parser.accepts("no-splash", "Do not show the splash screen"); - parser.accepts("flexo", "Allow flexo api configuration"); final ArgumentAcceptingOptionSpec updateMode = parser .accepts("rs", "Select client type") @@ -219,12 +218,6 @@ public class RuneLite logger.setLevel(Level.DEBUG); } - if (options.has("flexo")) - { - System.out.println("[RuneLitePlus] Flexo config enabled"); - ConfigPanel.flexoConfigEnabled = true; - } - Thread.setDefaultUncaughtExceptionHandler((thread, throwable) -> { log.error("Uncaught exception:", throwable); diff --git a/runelite-client/src/main/java/net/runelite/client/flexo/Flexo.java b/runelite-client/src/main/java/net/runelite/client/flexo/Flexo.java deleted file mode 100644 index 2ca6ee3093..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/flexo/Flexo.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* -Modified java.awt.Robot for use with RuneLitePlus. Hopefully we can make it stand far apart. -Uses -https://github.com/JoonasVali/NaturalMouseMotion -for mouse motion. - */ - -package net.runelite.client.flexo; - -import java.awt.*; -import java.awt.event.InputEvent; -import java.awt.peer.RobotPeer; -import java.util.Random; -import java.util.logging.Logger; - -import com.github.joonasvali.naturalmouse.api.MouseMotionFactory; -import net.runelite.api.Client; -import net.runelite.api.Point; -import net.runelite.client.plugins.flexo.FlexoOverlay; -import net.runelite.client.ui.ClientUI; -import sun.awt.ComponentFactory; -import sun.awt.SunToolkit; - -public class Flexo extends java.awt.Robot{ - public static double scale; - public static Client client; - public static int fixedWidth = 765; - public static int fixedHeight = 503; - public static boolean isStretched; - public static int minDelay = 45; - public static MouseMotionFactory currentMouseMotionFactory; - private static final int MAX_DELAY = 60000; - private RobotPeer peer; - private static int LEGAL_BUTTON_MASK = 0; - - public Flexo() throws AWTException { - if (GraphicsEnvironment.isHeadless()) { - throw new AWTException("headless environment"); - } - init(GraphicsEnvironment.getLocalGraphicsEnvironment() - .getDefaultScreenDevice()); - } - - private void init(GraphicsDevice screen) throws AWTException { - Toolkit toolkit = Toolkit.getDefaultToolkit(); - if (toolkit instanceof ComponentFactory) { - peer = ((ComponentFactory)toolkit).createRobot(this, screen); - disposer = new RobotDisposer(peer); - sun.java2d.Disposer.addRecord(anchor, disposer); - } - initLegalButtonMask(); - } - - private static synchronized void initLegalButtonMask() { - if (LEGAL_BUTTON_MASK != 0) return; - - int tmpMask = 0; - if (Toolkit.getDefaultToolkit().areExtraMouseButtonsEnabled()){ - if (Toolkit.getDefaultToolkit() instanceof SunToolkit) { - final int buttonsNumber = ((SunToolkit)(Toolkit.getDefaultToolkit())).getNumberOfButtons(); - for (int i = 0; i < buttonsNumber; i++){ - tmpMask |= InputEvent.getMaskForButton(i+1); - } - } - } - tmpMask |= InputEvent.BUTTON1_MASK| - InputEvent.BUTTON2_MASK| - InputEvent.BUTTON3_MASK| - InputEvent.BUTTON1_DOWN_MASK| - InputEvent.BUTTON2_DOWN_MASK| - InputEvent.BUTTON3_DOWN_MASK; - LEGAL_BUTTON_MASK = tmpMask; - } - private transient Object anchor = new Object(); - - static class RobotDisposer implements sun.java2d.DisposerRecord { - private final RobotPeer peer; - private RobotDisposer(RobotPeer peer) { - this.peer = peer; - } - public void dispose() { - if (peer != null) { - peer.dispose(); - } - } - } - - private RobotDisposer disposer; - - @Override - public synchronized void mouseMove(int x, int y) { - try { - //TODO: Must be better way to determine titlebar width - currentMouseMotionFactory.build(ClientUI.frame.getX()+x, ClientUI.frame.getY()+y+20).move(); - this.delay(getMinDelay()); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - - public synchronized void mouseMove(Point p) { - mouseMove((int)p.getX(), (int)p.getY()); - } - - @Override - public synchronized void mousePress(int buttonID) { - if (buttonID<1 || buttonID >5) { - Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5."); - return; - } - peer.mousePress(InputEvent.getMaskForButton(buttonID)); - resetOverlay(); - this.delay(getMinDelay()); - } - - public void resetOverlay() { - FlexoOverlay.clickArea = null; - } - - public synchronized void mousePressAndRelease(int buttonID) { - if (buttonID<1 || buttonID >5) { - Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5."); - return; - } - peer.mousePress(InputEvent.getMaskForButton(buttonID)); - this.delay(getMinDelay()); - peer.mouseRelease(InputEvent.getMaskForButton(buttonID)); - resetOverlay(); - this.delay(getMinDelay()); - } - - @Override - public synchronized void mouseRelease(int buttonID) { - if (buttonID<1 || buttonID >5) { - Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5."); - return; - } - peer.mouseRelease(InputEvent.getMaskForButton(buttonID)); - resetOverlay(); - this.delay(getMinDelay()); - } - - private int getMinDelay() { - Random random = new Random(); - int random1 = random.nextInt(minDelay); - if (random1 < minDelay/2) - random1 = random.nextInt(minDelay/2) + minDelay/2+random.nextInt(minDelay/2); - return random1; - } - - private int getWheelDelay() { - //TODO: implement random timer. - return 40; - } - - /** - * Rotates the scroll wheel on wheel-equipped mice. - * - * @param wheelAmt number of "notches" to move the mouse wheel - * Negative values indicate movement up/away from the user, - * positive values indicate movement down/towards the user. - * - * @since 1.4 - */ - @Override - public synchronized void mouseWheel(int wheelAmt) { - for (int i : new int[wheelAmt]) { - peer.mouseWheel(wheelAmt); - this.delay(getWheelDelay()); - } - } - - /** - * Presses a given key. The key should be released using the - * keyRelease method. - *

- * Key codes that have more than one physical key associated with them - * (e.g. KeyEvent.VK_SHIFT could mean either the - * left or right shift key) will map to the left key. - * - * @param keycode Key to press (e.g. KeyEvent.VK_A) - * @throws IllegalArgumentException if keycode is not - * a valid key - * @see #keyRelease(int) - * @see java.awt.event.KeyEvent - */ - @Override - public synchronized void keyPress(int keycode) { - peer.keyPress(keycode); - this.delay(getMinDelay()); - } - - @Override - public synchronized void keyRelease(int keycode) { - peer.keyRelease(keycode); - this.delay(getMinDelay()); - } - - @Override - public synchronized Color getPixelColor(int x, int y) { - Color color = new Color(peer.getRGBPixel(x, y)); - return color; - } - - /** - * Sleeps for the specified time. - * To catch any InterruptedExceptions that occur, - * Thread.sleep() may be used instead. - * @param ms time to sleep in milliseconds - * @throws IllegalArgumentException if ms is not between 0 and 60,000 milliseconds inclusive - * @see java.lang.Thread#sleep - */ - @Override - public synchronized void delay(int ms) { - checkDelayArgument(ms); - try { - Thread.sleep(ms); - } catch(InterruptedException ite) { - ite.printStackTrace(); - } - } - - private void checkDelayArgument(int ms) { - if (ms < 0 || ms > MAX_DELAY) { - throw new IllegalArgumentException("Delay must be to 0 to 60,000ms"); - } - } -} diff --git a/runelite-client/src/main/java/net/runelite/client/flexo/FlexoMouse.java b/runelite-client/src/main/java/net/runelite/client/flexo/FlexoMouse.java deleted file mode 100644 index 1fe3aeb47c..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/flexo/FlexoMouse.java +++ /dev/null @@ -1,246 +0,0 @@ -package net.runelite.client.flexo; - -import net.runelite.api.Client; -import net.runelite.api.Point; -import net.runelite.client.ui.ClientUI; - -import java.awt.*; -import java.util.Random; -import java.util.logging.Logger; - -public class FlexoMouse { - - /* - Should pass unstretched coords, handles all conversions here. - */ - public static Point getClickPoint(Rectangle rect) - { - if (rect!=null) { - Random r = new Random(); - int x = -1; - int y = -1; - x = rect.x+r.nextInt(rect.width); - y = rect.y+r.nextInt(rect.height); - - if (Flexo.isStretched) { - double wScale; - double hScale; - - if (Flexo.client.isResized()) { - wScale = (Flexo.client.getStretchedDimensions().width / Flexo.client.getRealDimensions().width); - hScale = (Flexo.client.getStretchedDimensions().height / Flexo.client.getRealDimensions().height); - int newX = (int)(x*wScale); - int newY = (int)(y*hScale); - if (newX>0 && newX0 && newY0 && x0 && y0 && x+(widthDif/2)0 && y0 && x0 && y0&&clickRect.height>0) { - int x = clickRect.x+r.nextInt(clickRect.width); - int y = clickRect.y+r.nextInt(clickRect.height); - double tScale = 1 + (Flexo.scale / 100); - - if (Flexo.client.isResized()) { - return new Rectangle((int)(clickRect.x * wScale), (int)(clickRect.y * wScale), (int)(clickRect.width * wScale), (int)(clickRect.getHeight()*hScale)); - } else { - return new Rectangle((int)(clickRect.x), (int)(clickRect.y), (int)(clickRect.width), (int)(clickRect.getHeight())); - } - } - - } - //Fixed, not stretched - else if (!Flexo.client.isResized()) { - int fixedWidth = 765; - int widthDif = ClientUI.frame.getWidth(); - - if (ClientUI.pluginToolbar.isVisible()) { - widthDif -= ClientUI.pluginToolbar.getWidth(); - } - if (ClientUI.pluginPanel!=null) - widthDif -= ClientUI.pluginPanel.getWidth(); - - widthDif -= fixedWidth; - int xPadding = (int)rect.getWidth()/5; - int yPadding = (int)rect.getHeight()/5; - Random r = new Random(); - Rectangle clickRect = new Rectangle(); - clickRect.width = rect.width-xPadding; - clickRect.height = rect.height-yPadding; - clickRect.x = rect.x+xPadding+(widthDif/2); - clickRect.y = rect.y+yPadding; - if (clickRect.height>0&&clickRect.width>0) { - int x = clickRect.x + r.nextInt(clickRect.width); - int y = clickRect.y + r.nextInt(clickRect.height); - return new Rectangle((int) (clickRect.x), (int) (clickRect.y), (int) (clickRect.width), (int) (clickRect.getHeight())); - } - } - //Resizable, not stretched - else { - int xPadding = (int)rect.getWidth()/5; - int yPadding = (int)rect.getHeight()/5; - Random r = new Random(); - Rectangle clickRect = new Rectangle(); - clickRect.width = rect.width-xPadding*2; - clickRect.height = rect.height-yPadding*2; - clickRect.x = rect.x+xPadding; - clickRect.y = rect.y+yPadding; - if (clickRect.height>0&&clickRect.width>0) { - int x = clickRect.x+r.nextInt(clickRect.width); - int y = clickRect.y+r.nextInt(clickRect.height); - return new Rectangle((int)(clickRect.x), (int)(clickRect.y), (int)(clickRect.width), (int)(clickRect.getHeight())); - } - } - - return null; - } - - public static Rectangle getGroundItemClickArea(Rectangle rect) - { - if (Flexo.isStretched) - { - double wScale; - double hScale; - - if (Flexo.client.isResized()) { - wScale = (Flexo.client.getStretchedDimensions().width / Flexo.client.getRealDimensions().width); - hScale = (Flexo.client.getStretchedDimensions().height / Flexo.client.getRealDimensions().height); - } else { - wScale = ((double)Flexo.client.getStretchedDimensions().width) / Flexo.fixedWidth; - hScale = ((double)Flexo.client.getStretchedDimensions().height) / Flexo.fixedHeight; - } - - int xPadding = (int)rect.getWidth()/(int)wScale*3; - int yPadding = (int)rect.getHeight()/(int)hScale*3; - Random r = new Random(); - Rectangle clickRect = new Rectangle(); - clickRect.width = rect.width-xPadding*2; - clickRect.height = rect.height-yPadding*2; - clickRect.x = rect.x+xPadding; - clickRect.y = rect.y+yPadding; - if (clickRect.width>0&&clickRect.height>0) { - int x = clickRect.x+r.nextInt(clickRect.width); - int y = clickRect.y+r.nextInt(clickRect.height); - double tScale = 1 + (Flexo.scale / 100); - - if (Flexo.client.isResized()) { - return new Rectangle((int)(clickRect.x * wScale), (int)(clickRect.y * wScale), (int)(clickRect.width * wScale), (int)(clickRect.getHeight()*hScale)); - } else { - return new Rectangle((int)(clickRect.x), (int)(clickRect.y), (int)(clickRect.width), (int)(clickRect.getHeight())); - } - } - - } - //Fixed, not stretched - else if (!Flexo.client.isResized()) { - int fixedWidth = 765; - int widthDif = ClientUI.frame.getWidth(); - - if (ClientUI.pluginToolbar.isVisible()) { - widthDif -= ClientUI.pluginToolbar.getWidth(); - } - if (ClientUI.pluginPanel!=null) - widthDif -= ClientUI.pluginPanel.getWidth(); - - widthDif -= fixedWidth; - int xPadding = (int)rect.getWidth()/3; - int yPadding = (int)rect.getHeight()/3; - Random r = new Random(); - Rectangle clickRect = new Rectangle(); - clickRect.width = rect.width-xPadding; - clickRect.height = rect.height-yPadding; - clickRect.x = rect.x+xPadding+(widthDif/2); - clickRect.y = rect.y+yPadding; - if (clickRect.height>0&&clickRect.width>0) { - int x = clickRect.x + r.nextInt(clickRect.width); - int y = clickRect.y + r.nextInt(clickRect.height); - return new Rectangle((int) (clickRect.x), (int) (clickRect.y), (int) (clickRect.width), (int) (clickRect.getHeight())); - } - } - //Resizable, not stretched - else { - int xPadding = (int)rect.getWidth()/3; - int yPadding = (int)rect.getHeight()/3; - Random r = new Random(); - Rectangle clickRect = new Rectangle(); - clickRect.width = rect.width-xPadding*2; - clickRect.height = rect.height-yPadding*2; - clickRect.x = rect.x+xPadding; - clickRect.y = rect.y+yPadding; - if (clickRect.height>0&&clickRect.width>0) { - int x = clickRect.x+r.nextInt(clickRect.width); - int y = clickRect.y+r.nextInt(clickRect.height); - return new Rectangle((int)(clickRect.x), (int)(clickRect.y), (int)(clickRect.width), (int)(clickRect.getHeight())); - } - } - - return null; - } -} diff --git a/runelite-client/src/main/java/net/runelite/client/flexo/FlexoUtils.java b/runelite-client/src/main/java/net/runelite/client/flexo/FlexoUtils.java deleted file mode 100644 index a9856cbabb..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/flexo/FlexoUtils.java +++ /dev/null @@ -1,23 +0,0 @@ -package net.runelite.client.flexo; - -import net.runelite.api.GameObject; -import net.runelite.api.widgets.WidgetItem; -import net.runelite.client.plugins.flexo.FlexoOverlay; - -import java.awt.*; - -public class FlexoUtils { - - public static Rectangle getInvItemClickArea(WidgetItem item) { - Rectangle clickArea = item.getCanvasBounds(); - FlexoOverlay.clickArea = clickArea; - return clickArea; - } - - public static Rectangle getGameObjectClickArea(GameObject item) { - Rectangle clickArea = item.getClickbox().getBounds(); - FlexoOverlay.clickArea = clickArea; - return clickArea; - } - -} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/flexo/FlexoConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/flexo/FlexoConfig.java deleted file mode 100644 index b24a585f2e..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/flexo/FlexoConfig.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.client.plugins.flexo; - -import net.runelite.client.config.Config; -import net.runelite.client.config.ConfigGroup; -import net.runelite.client.config.ConfigItem; - -import java.awt.*; - -@ConfigGroup("flexo") -public interface FlexoConfig extends Config { - - @ConfigItem( - position = 0, - keyName = "overlayEnabled", - name = "Overlay Enabled", - description = "Shows clicking area and points etc." - ) - default boolean overlayEnabled() { - return true; - } - - @ConfigItem( - position = 1, - keyName = "minDelayAmount", - name = "Min Delay", - description = "Minimum delay that is applied to every action at the end (ms)" - ) - default int minDelayAmt() { - return 45; - } - - - @ConfigItem( - position = 2, - keyName = "reactionTime", - name = "Reaction Time", - description = "The base time between actions (ms)" - ) - default int getReactionTimeVariation() { - return 80; - } - - @ConfigItem( - position = 3, - keyName = "mouseDragSpeed", - name = "Mouse drag speed", - description = "The speed at which steps are executed. Keep at 49? cuz jagex mouse recorder?" - ) - default int getMouseDragSpeed() { - return 49; - } - - - @ConfigItem( - position = 4, - keyName = "overshoots", - name = "Overshoots", - description = "Higher number = more overshoots" - ) - default int getOvershoots() { - return 4; - } - - @ConfigItem( - position = 5, - keyName = "variatingFlow", - name = "Flow - Variating", - description = "" - ) - default boolean getVariatingFlow() { - return true; - } - - @ConfigItem( - position = 6, - keyName = "slowStartupFlow", - name = "Flow - Slow startup", - description = "" - ) - default boolean getSlowStartupFlow() { - return true; - } - - - @ConfigItem( - position = 7, - keyName = "slowStartup2Flow", - name = "Flow - Slow startup 2", - description = "" - ) - default boolean getSlowStartup2Flow() { - return true; - } - - @ConfigItem( - position = 8, - keyName = "jaggedFlow", - name = "Flow - Jagged", - description = "" - ) - default boolean getJaggedFlow() { - return true; - } - - @ConfigItem( - position = 9, - keyName = "interruptedFlow", - name = "Flow - Interrupted", - description = "" - ) - default boolean getInterruptedFlow() { - return false; - } - - - @ConfigItem( - position = 10, - keyName = "interruptedFlow2", - name = "Flow - Interrupted 2", - description = "" - ) - default boolean getInterruptedFlow2() { - return false; - } - - @ConfigItem( - position = 11, - keyName = "stoppingFlow", - name = "Flow - Stopping", - description = "" - ) - default boolean getStoppingFlow() { - return false; - } - - @ConfigItem( - position = 12, - keyName = "deviationSlopeDivider", - name = "Deviation slope divider", - description = "" - ) - default int getDeviationSlope() { - return 10; - } - - - @ConfigItem( - position = 13, - keyName = "noisinessDivider", - name = "Noisiness divider", - description = "" - ) - default String getNoisinessDivider() { - return "2.0D"; - } -} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/flexo/FlexoOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/flexo/FlexoOverlay.java deleted file mode 100644 index 99072b88bf..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/flexo/FlexoOverlay.java +++ /dev/null @@ -1,42 +0,0 @@ -package net.runelite.client.plugins.flexo; - -import net.runelite.api.Client; -import net.runelite.client.ui.overlay.Overlay; -import net.runelite.client.ui.overlay.OverlayLayer; -import net.runelite.client.ui.overlay.OverlayPosition; - -import javax.annotation.Nullable; -import javax.inject.Inject; -import java.awt.*; -import java.awt.geom.Ellipse2D; - -public class FlexoOverlay extends Overlay { - - public static Rectangle clickArea; - - @Inject - private Client client; - - @Inject - private FlexoPlugin plugin; - - @Inject - private FlexoConfig config; - - @Inject - public FlexoOverlay(@Nullable Client client, FlexoPlugin plugin, FlexoConfig config) { - setPosition(OverlayPosition.DYNAMIC); - setLayer(OverlayLayer.ABOVE_WIDGETS); - this.client = client; - this.plugin = plugin; - this.config = config; - } - - - @Override - public Dimension render(Graphics2D graphics) { - if (clickArea!=null) - graphics.draw(clickArea); - return null; - } -} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/flexo/FlexoPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/flexo/FlexoPlugin.java deleted file mode 100644 index 3921f49e12..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/flexo/FlexoPlugin.java +++ /dev/null @@ -1,128 +0,0 @@ -package net.runelite.client.plugins.flexo; - -import com.github.joonasvali.naturalmouse.api.MouseMotionFactory; -import com.github.joonasvali.naturalmouse.support.DefaultNoiseProvider; -import com.github.joonasvali.naturalmouse.support.DefaultOvershootManager; -import com.github.joonasvali.naturalmouse.support.DefaultSpeedManager; -import com.github.joonasvali.naturalmouse.support.Flow; -import com.github.joonasvali.naturalmouse.support.SinusoidalDeviationProvider; -import com.github.joonasvali.naturalmouse.util.FlowTemplates; -import com.google.inject.Provides; -import lombok.extern.slf4j.Slf4j; -import net.runelite.api.Client; -import net.runelite.api.events.ConfigChanged; -import net.runelite.api.events.GameTick; -import net.runelite.client.config.ConfigManager; -import net.runelite.client.eventbus.Subscribe; -import net.runelite.client.flexo.Flexo; -import net.runelite.client.flexo.FlexoUtils; -import net.runelite.client.plugins.Plugin; -import net.runelite.client.plugins.PluginDescriptor; -import net.runelite.client.plugins.PluginType; -import net.runelite.client.plugins.stretchedmode.StretchedModeConfig; -import net.runelite.client.ui.overlay.OverlayManager; - -import javax.inject.Inject; -import java.util.ArrayList; -import java.util.List; - -@PluginDescriptor( - name = "Flexo Config", - description = "Customizes Flexo, the MouseInput Assistant ;)", - tags = {"flexo", "null"}, - type = PluginType.UTILITY -) -@Slf4j -public class FlexoPlugin extends Plugin { - - @Inject - private Client client; - - @Inject - private ConfigManager configManager; - - @Inject - private OverlayManager overlayManager; - - @Inject - private FlexoOverlay overlay; - - @Provides - FlexoConfig getConfig(ConfigManager configManager) { - return configManager.getConfig(FlexoConfig.class); - } - - @Subscribe - private void onConfigChanged(ConfigChanged event) { - if (event.getKey().compareTo("overlayEnabled")==0) { - if (getConfig(configManager).overlayEnabled()) { - overlayManager.add(overlay); - } else { - overlayManager.remove(overlay); - } - } - updateMouseMotionFactory(); - } - - @Subscribe - public void onGameTick(GameTick event) { - Flexo.isStretched = client.isStretchedEnabled(); - Flexo.scale = configManager.getConfig(StretchedModeConfig.class).scalingFactor(); - } - - private void updateMouseMotionFactory() { - Flexo.minDelay = getConfig(configManager).minDelayAmt(); - MouseMotionFactory factory = new MouseMotionFactory(); - //TODO:Add Options for various flows to allow more personalization - List flows = new ArrayList<>(); - - //Always add random - flows.add(new Flow(FlowTemplates.random())); - - if (getConfig(configManager).getVariatingFlow()) - flows.add(new Flow(FlowTemplates.variatingFlow())); - - if (getConfig(configManager).getSlowStartupFlow()) - flows.add(new Flow(FlowTemplates.slowStartupFlow())); - - if (getConfig(configManager).getSlowStartup2Flow()) - flows.add(new Flow(FlowTemplates.slowStartup2Flow())); - - if (getConfig(configManager).getJaggedFlow()) - flows.add(new Flow(FlowTemplates.jaggedFlow())); - - if (getConfig(configManager).getInterruptedFlow()) - flows.add(new Flow(FlowTemplates.interruptedFlow())); - - if (getConfig(configManager).getInterruptedFlow2()) - flows.add(new Flow(FlowTemplates.interruptedFlow2())); - - if (getConfig(configManager).getStoppingFlow()) - flows.add(new Flow(FlowTemplates.stoppingFlow())); - - DefaultSpeedManager manager = new DefaultSpeedManager(flows); - //TODO:Add options for custom Deviation Provider and Noise Provider - factory.setDeviationProvider(new SinusoidalDeviationProvider(getConfig(configManager).getDeviationSlope())); - factory.setNoiseProvider(new DefaultNoiseProvider(Double.valueOf(getConfig(configManager).getNoisinessDivider()))); - factory.getNature().setReactionTimeVariationMs(getConfig(configManager).getReactionTimeVariation()); - manager.setMouseMovementBaseTimeMs(getConfig(configManager).getMouseDragSpeed()); - - DefaultOvershootManager overshootManager = (DefaultOvershootManager) factory.getOvershootManager(); - overshootManager.setOvershoots(getConfig(configManager).getOvershoots()); - - factory.setSpeedManager(manager); - Flexo.currentMouseMotionFactory = factory; - } - - @Override - protected void startUp() throws Exception { - Flexo.isStretched = client.isStretchedEnabled(); - overlayManager.add(overlay); - updateMouseMotionFactory(); - } - - @Override - protected void shutDown() throws Exception { - overlayManager.remove(overlay); - } -} From 04df6cd1e97ee86d0a38878cc94f94c9619d0813 Mon Sep 17 00:00:00 2001 From: Kyleeld <48519776+Kyleeld@users.noreply.github.com> Date: Thu, 25 Apr 2019 23:36:59 +0100 Subject: [PATCH 2/7] Add files via upload --- .../spellbookiconresizeConfig.java | 101 ++++++ .../spellbookiconresizePlugin.java | 328 ++++++++++++++++++ 2 files changed, 429 insertions(+) create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizeConfig.java create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizePlugin.java diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizeConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizeConfig.java new file mode 100644 index 0000000000..568339c64d --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizeConfig.java @@ -0,0 +1,101 @@ +package net.runelite.client.plugins.spellbookiconresize; + +import net.runelite.client.config.Config; +import net.runelite.client.config.ConfigGroup; +import net.runelite.client.config.ConfigItem; + +@ConfigGroup("spellbookfixer") +public interface spellbookiconresizeConfig extends Config +{ + @ConfigItem(position = 0, keyName = "shouldHideOthers", name = "Hide Others", description = "Toggle on to hide spells not useful for pking that cannot be filtered otherwise.") + default boolean shouldHideOthers() + { + return true; + } + + //ice blitz + @ConfigItem(position = 1, keyName = "shouldModifyBloodBarrage", name = "Blood Barrage", description = "Toggle on to Blood Barrage modifications.") + default boolean shouldModifyBloodBarrage() { return true; } + @ConfigItem(position = 2, keyName = "getBloodPositionX", name = "Blood Barrage Pos X", description = "Modifies the X-axis position of Blood Barrage.") + default int getBloodPositionX() + { + return 0; + } + @ConfigItem(position = 3, keyName = "getBloodPositionY", name = "Blood Barrage Pos Y", description = "Modifies the Y-axis position of Blood Barrage.") + default int getBloodPositionY() + { + return 0; + } + @ConfigItem(position = 4, keyName = "getBloodSize", name = "Blood Barrage Size", description = "Modifies the width of Blood Barrage.") + default int getBloodSize() { return 100; } + @ConfigItem(position = 6, keyName = "shouldHideBloodBarrage", name = "Hide Blood Barrage", description = "Enable this to hide blood barrage") + default boolean shouldHideBloodBarrage() + { + return false; + } + //ice barrage + @ConfigItem(position = 7, keyName = "shouldModifyIceBarrage", name = "Ice Barrage", description = "Toggle on to enable Ice Barrage modifications.") + default boolean shouldModifyIceBarrage() { return true; } + @ConfigItem(position = 8, keyName = "getBarragePositionX", name = "Ice Barrage Pos X", description = "Modifies the X-axis position of Ice Barrage.") + default int getBarragePositionX() + { + return 0; + } + @ConfigItem(position = 9, keyName = "getBarragePositionY", name = "Ice Barrage Pos y", description = "Modifies the X-axis position of Ice Barrage.") + default int getBarragePositionY() + { + return 75; + } + @ConfigItem(position = 10, keyName = "getBarrageSize", name = "Ice Barrage Size", description = "Modifies the width position of Ice Barrage.") + default int getBarrageSize() + { + return 100; + } + @ConfigItem(position = 12, keyName = "shouldHideIceBarrage", name = "Hide Ice Barrage", description = "Enable this to hide Ice barrage") + default boolean shouldHideIceBarrage() + { + return false; + } + + @ConfigItem(position = 13, keyName = "shouldModifyIceBlitz", name = "Ice Blitz", description = "Toggle on to enable Ice Blitz modifications.") + default boolean shouldModifyIceBlitz() { return true; } + @ConfigItem(position = 14, keyName = "getBlitzPositionX", name = "Ice Blitz Pos X", description = "Modifies the X-axis position of Ice Blitz.") + default int getBlitzPositionX() { return 0; } + @ConfigItem(position = 15, keyName = "getBlitzPositionY", name = "Ice Blitz Pos y", description = "Modifies the X-axis position of Ice Blitz.") + default int getBlitzPositionY() + { + return 0; + } + @ConfigItem(position = 16, keyName = "getBlitzeSize", name = "Ice Blitz Size", description = "Modifies the width position of Ice Blitz.") + default int getBlitzSize() + { + return 100; + } + @ConfigItem(position = 17, keyName = "shouldHideIceBlitz", name = "Hide Ice Blitz", description = "Enable this to hide Ice blitz") + default boolean shouldHideIceBlitz() + { + return false; + } + + @ConfigItem(position = 18, keyName = "shouldModifyBloodBlitz", name = "Blood Blitz", description = "Toggle on to enable Ice Blitz modifications.") + default boolean shouldModifyBloodBlitz() { return true; } + @ConfigItem(position = 19, keyName = "getBloodBlitzPositionX", name = "Blood Blitz Pos X", description = "Modifies the X-axis position of Blood Blitz.") + default int getBloodBlitzPositionX() { return 0; } + @ConfigItem(position = 20, keyName = "getBloodBlitzPositionY", name = "Blood Blitz Pos y", description = "Modifies the X-axis position of Blood Blitz.") + default int getBloodBlitzPositionY() + { + return 0; + } + @ConfigItem(position = 21, keyName = "getBloodBlitzSize", name = "Blood Blitz Size", description = "Modifies the width position of Blood Blitz.") + default int getBloodBlitzSize() + { + return 100; + } + @ConfigItem(position = 22, keyName = "shouldHideBLoodBlitz", name = "Hide Blood Blitz", description = "Enable this to hide Blood blitz") + default boolean shouldHideBloodBlitz() + { + return false; + } + + +} \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizePlugin.java new file mode 100644 index 0000000000..6dfc9d1421 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizePlugin.java @@ -0,0 +1,328 @@ +package net.runelite.client.plugins.spellbookiconresize; + +import com.google.inject.Provides; +import lombok.extern.slf4j.Slf4j; +import net.runelite.api.Client; +import net.runelite.api.GameState; +import net.runelite.api.Varbits; +import net.runelite.api.events.*; +import net.runelite.api.widgets.Widget; +import net.runelite.api.widgets.WidgetID; +import net.runelite.api.widgets.WidgetInfo; +import net.runelite.client.callback.ClientThread; +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.plugins.PluginType; +import javax.inject.Inject; + + +@PluginDescriptor( + name = "Spellbook IconResizer", + description = "Resize and filter spellbook for PKing", + tags = {"resize", "spellbook", "magic", "spell", "pk", "book", "filter"}, + type = PluginType.PVP +) +@Slf4j +public class spellbookiconresizePlugin extends Plugin { + public int spellbookID = -1; + //0 = standard + //1 = ancients + //2 = lunars + //3 = arrceus + @Inject + private Client client; + @Inject + private ClientThread clientThread; + @Inject + spellbookiconresizeConfig config; + + @Provides + spellbookiconresizeConfig provideConfig(ConfigManager configManager) { + return configManager.getConfig(spellbookiconresizeConfig.class); + } + + @Override + protected void startUp() throws Exception { + if(client.getGameState()!= GameState.LOGGED_IN){ + return; + } + + clientThread.invoke(()->{ + spellbookID = client.getVar(Varbits.SPELLBOOK_ID); + }); + + adjustSpellbook(); + } + + @Override + protected void shutDown() throws Exception { + resetSpellbook(); + } + + @Subscribe + public void onGameStateChanged(GameStateChanged event) { + if (event.getGameState() == GameState.LOGGED_IN) { + spellbookID = client.getVar(Varbits.SPELLBOOK_ID); + adjustSpellbook(); + } + } + @Subscribe + public void onConfigChanged(ConfigChanged event) + { + if (event.getGroup().equals("spellbookfixer")) + { + adjustSpellbook(); + } + } + @Subscribe + public void onWidgetLoaded(WidgetLoaded event) { + if (client.getGameState() == GameState.LOGGED_IN) { + if (event.getGroupId() == WidgetID.SPELLBOOK_GROUP_ID) + { + spellbookID = client.getVar(Varbits.SPELLBOOK_ID ); + adjustSpellbook(); + } + + } + } + + @Subscribe + public void onWidgetHiddenChanged(WidgetHiddenChanged event) { + if (client.getGameState() == GameState.LOGGED_IN) { + spellbookID = client.getVar(Varbits.SPELLBOOK_ID ); + adjustSpellbook(); + } + } + + @Subscribe + public void onVarbitChanged(VarbitChanged event) { + int oldid = spellbookID; + spellbookID = client.getVar(Varbits.SPELLBOOK_ID); + if (oldid != spellbookID) { + adjustSpellbook(); + } + } + + private void adjustSpellbook() { + clientThread.invoke(()-> { + if (client.getGameState() != GameState.LOGGED_IN) { + return; + } + try { + if (spellbookID == 1) { + if (config.shouldModifyIceBarrage()) { + modifySpell(WidgetInfo.SPELL_ICE_BARRAGE, config.getBarragePositionX()-20, config.getBarragePositionY(), config.getBarrageSize()); + } else { + if (client.getVar(Varbits.SPELLBOOK_HIDDEN) == 1) { + modifySpell(WidgetInfo.SPELL_ICE_BARRAGE, 0, 168, 24); + } else if (client.getVar(Varbits.SPELLBOOK_HIDDEN) == 0) { + modifySpell(WidgetInfo.SPELL_ICE_BARRAGE, 0, 216, 24); + } + } + if (config.shouldModifyBloodBarrage()) { + modifySpell(WidgetInfo.SPELL_BLOOD_BARRAGE, config.getBloodPositionX()-20, config.getBloodPositionY(), config.getBloodSize()); + } else { + if (client.getVar(Varbits.SPELLBOOK_HIDDEN) == 1) { + modifySpell(WidgetInfo.SPELL_BLOOD_BARRAGE, 132, 140, 24); + } else { + modifySpell(WidgetInfo.SPELL_BLOOD_BARRAGE, 144, 180, 24); + } + } + + if (config.shouldModifyIceBlitz()) { + modifySpell(WidgetInfo.SPELL_ICE_BLITZ, config.getBlitzPositionX()-20, config.getBlitzPositionY(), config.getBlitzSize()); + } else { + if (client.getVar(Varbits.SPELLBOOK_HIDDEN) == 1) { + modifySpell(WidgetInfo.SPELL_ICE_BLITZ, 44, 112, 24); + } else { + modifySpell(WidgetInfo.SPELL_ICE_BLITZ, 48, 144, 24); + } + } + + if (config.shouldModifyBloodBlitz()) { + modifySpell(WidgetInfo.SPELL_BLOOD_BLITZ, config.getBloodBlitzPositionX()-20, config.getBloodBlitzPositionY(), config.getBloodBlitzSize()); + } else { + if (client.getVar(Varbits.SPELLBOOK_HIDDEN) == 1) { + modifySpell(WidgetInfo.SPELL_BLOOD_BLITZ, 0, 112, 24); + } else { + modifySpell(WidgetInfo.SPELL_BLOOD_BLITZ, 0, 144, 24); + } + } + + setSpellHidden(WidgetInfo.SPELL_BLOOD_BARRAGE, config.shouldHideBloodBarrage()); + setSpellHidden(WidgetInfo.SPELL_ICE_BARRAGE, config.shouldHideIceBarrage()); + setSpellHidden(WidgetInfo.SPELL_ICE_BLITZ, config.shouldHideIceBlitz()); + setSpellHidden(WidgetInfo.SPELL_BLOOD_BLITZ, config.shouldHideBloodBlitz()); + setSpellHidden(WidgetInfo.SPELL_ICE_BURST, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_ICE_RUSH, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_BLOOD_RUSH, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_BLOOD_BURST, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_SMOKE_RUSH, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_SMOKE_BLITZ, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_SMOKE_BURST, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_SMOKE_BARRAGE, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_SHADOW_RUSH, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_SHADOW_BLITZ, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_SHADOW_BURST, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_SHADOW_BARRAGE, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_BOUNTY_TARGET_TELEPORT, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_PADDEWWA_TELEPORT, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_SENNTISTEN_TELEPORT, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_KHARYRLL_TELEPORT, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_LASSAR_TELEPORT, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_DAREEYAK_TELEPORT, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_CARRALLANGER_TELEPORT, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_ANNAKARL_TELEPORT, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_GHORROCK_TELEPORT, config.shouldHideOthers()); + setSpellHidden(WidgetInfo.SPELL_EDGEVILLE_HOME_TELEPORT, config.shouldHideOthers()); + + + } + // if (spellbookID == 2) { + // if (config.shouldModifyVengeance()) + /// modifySpell(WidgetInfo.SPELL_VENGEANCE, config.getVengeancePositionX(), config.getVengeancePositionY(), config.getVengeanceSize()); + // } + // if (spellbookID == 0) { + + // if (config.shouldModifyTeleBlock()) + // modifySpell(WidgetInfo.SPELL_TELE_BLOCK, config.getTeleBlockPositionX(), config.getTeleBlockPositionY(), config.getTeleBlockSize()); +// + // if (config.shouldModifyEntangle()) + // modifySpell(WidgetInfo.SPELL_ENTANGLE, config.getEntanglePositionX(), config.getEntanglePositionY(), config.getEntangleSize()); + // } + + + } catch (Exception e) { + //swallow + } + + }); + } + + + private void resetSpellbook() { + clientThread.invoke(()-> { + if (client.getGameState() != GameState.LOGGED_IN) + return; + + try { + if (spellbookID == 1) { + + if (client.getVar(Varbits.SPELLBOOK_HIDDEN) == 1) { + modifySpell(WidgetInfo.SPELL_ICE_BARRAGE, 0, 168, 24); + } else { + modifySpell(WidgetInfo.SPELL_ICE_BARRAGE, 0, 216, 24); + } + + if (client.getVar(Varbits.SPELLBOOK_HIDDEN) == 1) { + modifySpell(WidgetInfo.SPELL_BLOOD_BARRAGE, 132, 140, 24); + } else { + modifySpell(WidgetInfo.SPELL_BLOOD_BARRAGE, 144, 180, 24); + } + + if (client.getVar(Varbits.SPELLBOOK_HIDDEN) == 1) { + modifySpell(WidgetInfo.SPELL_ICE_BLITZ, 44, 112, 24); + } else { + modifySpell(WidgetInfo.SPELL_ICE_BLITZ, 48, 144, 24); + } + + if (client.getVar(Varbits.SPELLBOOK_HIDDEN) == 1) { + modifySpell(WidgetInfo.SPELL_BLOOD_BLITZ, 0, 112, 24); + } else { + modifySpell(WidgetInfo.SPELL_BLOOD_BLITZ, 0, 144, 24); + } + + if (config.shouldHideBloodBarrage()) { + setSpellHidden(WidgetInfo.SPELL_BLOOD_BARRAGE, false); + } + if (config.shouldHideIceBarrage()) { + setSpellHidden(WidgetInfo.SPELL_ICE_BARRAGE, false); + } + if (config.shouldHideIceBlitz()) { + setSpellHidden(WidgetInfo.SPELL_ICE_BLITZ, false); + } + if (config.shouldHideBloodBlitz()) { + setSpellHidden(WidgetInfo.SPELL_BLOOD_BLITZ, false); + } + setSpellHidden(WidgetInfo.SPELL_ICE_BURST, false); + setSpellHidden(WidgetInfo.SPELL_ICE_BURST, false); + setSpellHidden(WidgetInfo.SPELL_ICE_RUSH, false); + setSpellHidden(WidgetInfo.SPELL_BLOOD_RUSH, false); + setSpellHidden(WidgetInfo.SPELL_BLOOD_BLITZ, false); + setSpellHidden(WidgetInfo.SPELL_BLOOD_BURST, false); + setSpellHidden(WidgetInfo.SPELL_SMOKE_RUSH, false); + setSpellHidden(WidgetInfo.SPELL_SMOKE_BLITZ, false); + setSpellHidden(WidgetInfo.SPELL_SMOKE_BURST, false); + setSpellHidden(WidgetInfo.SPELL_SMOKE_BARRAGE, false); + setSpellHidden(WidgetInfo.SPELL_SHADOW_RUSH, false); + setSpellHidden(WidgetInfo.SPELL_SHADOW_BLITZ, false); + setSpellHidden(WidgetInfo.SPELL_SHADOW_BURST, false); + setSpellHidden(WidgetInfo.SPELL_SHADOW_BARRAGE, false); + setSpellHidden(WidgetInfo.SPELL_BOUNTY_TARGET_TELEPORT, false); + setSpellHidden(WidgetInfo.SPELL_PADDEWWA_TELEPORT, false); + setSpellHidden(WidgetInfo.SPELL_SENNTISTEN_TELEPORT, false); + setSpellHidden(WidgetInfo.SPELL_KHARYRLL_TELEPORT, false); + setSpellHidden(WidgetInfo.SPELL_LASSAR_TELEPORT, false); + setSpellHidden(WidgetInfo.SPELL_DAREEYAK_TELEPORT, false); + setSpellHidden(WidgetInfo.SPELL_CARRALLANGER_TELEPORT, false); + setSpellHidden(WidgetInfo.SPELL_ANNAKARL_TELEPORT, false); + setSpellHidden(WidgetInfo.SPELL_GHORROCK_TELEPORT, false); + setSpellHidden(WidgetInfo.SPELL_EDGEVILLE_HOME_TELEPORT, false); + } + } catch (Exception e) { + //swallow + } + }); + } + + private void modifySpell(WidgetInfo widgetInfo, int x, int y, int size) { + Widget widget = client.getWidget(widgetInfo); + + if (widget == null) + return; + + try { + boolean update = false; + //if (widget.getSpriteId() != icon) { + + //update = true; + // } + if (widget.getOriginalX() != x) { + widget.setOriginalX(x); + + update = true; + } + if (widget.getOriginalY() != y) { + widget.setOriginalY(y); + update = true; + } + //if (widget.getOriginalWidth() != size) { + widget.setOriginalWidth(size); + // update = true; + // } + //if (widget.getOriginalHeight() != size) { + widget.setOriginalHeight(size); + // update = true; + // } + //if (update) { + widget.revalidate(); + clientThread.invoke(widget::revalidate); + //} + } catch (Exception e) { + //swallow + } + + } + + private void setSpellHidden(WidgetInfo widgetInfo, boolean hidden) { + Widget widget = client.getWidget(widgetInfo); + + if (widget == null) + return; + + widget.setHidden(hidden); + } + +} \ No newline at end of file From a93d7c3175e70ce244024addf9171c291eeda7d6 Mon Sep 17 00:00:00 2001 From: Kyleeld <48519776+Kyleeld@users.noreply.github.com> Date: Thu, 25 Apr 2019 23:48:34 +0100 Subject: [PATCH 3/7] added spellbook varbits --- .../main/java/net/runelite/api/Varbits.java | 1211 +++++++++-------- 1 file changed, 611 insertions(+), 600 deletions(-) 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 711f4c53e1..bd948d4c4e 100644 --- a/runelite-api/src/main/java/net/runelite/api/Varbits.java +++ b/runelite-api/src/main/java/net/runelite/api/Varbits.java @@ -1,600 +1,611 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.api; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * An enumeration of local client variables. - */ -@AllArgsConstructor -@Getter -public enum Varbits -{ - /* - * If chatbox is transparent or not - */ - TRANSPARENT_CHATBOX(4608), - - /* - * If the player has an active stamina potion effect or not - */ - RUN_SLOWED_DEPLETION_ACTIVE(25), - - /** - * If scrollbar in resizable mode chat is on the left - */ - CHAT_SCROLLBAR_ON_LEFT(6374), - - /** - * Runepouch - */ - RUNE_POUCH_RUNE1(29), - RUNE_POUCH_RUNE2(1622), - RUNE_POUCH_RUNE3(1623), - RUNE_POUCH_AMOUNT1(1624), - RUNE_POUCH_AMOUNT2(1625), - RUNE_POUCH_AMOUNT3(1626), - - /** - * Prayers - */ - QUICK_PRAYER(4103), - PRAYER_THICK_SKIN(4104), - PRAYER_BURST_OF_STRENGTH(4105), - PRAYER_CLARITY_OF_THOUGHT(4106), - PRAYER_SHARP_EYE(4122), - PRAYER_MYSTIC_WILL(4123), - PRAYER_ROCK_SKIN(4107), - PRAYER_SUPERHUMAN_STRENGTH(4108), - PRAYER_IMPROVED_REFLEXES(4109), - PRAYER_RAPID_RESTORE(4110), - PRAYER_RAPID_HEAL(4111), - PRAYER_PROTECT_ITEM(4112), - PRAYER_HAWK_EYE(4124), - PRAYER_MYSTIC_LORE(4125), - PRAYER_STEEL_SKIN(4113), - PRAYER_ULTIMATE_STRENGTH(4114), - PRAYER_INCREDIBLE_REFLEXES(4115), - PRAYER_PROTECT_FROM_MAGIC(4116), - PRAYER_PROTECT_FROM_MISSILES(4117), - PRAYER_PROTECT_FROM_MELEE(4118), - PRAYER_EAGLE_EYE(4126), - PRAYER_MYSTIC_MIGHT(4127), - PRAYER_RETRIBUTION(4119), - PRAYER_REDEMPTION(4120), - PRAYER_SMITE(4121), - PRAYER_CHIVALRY(4128), - PRAYER_PIETY(4129), - PRAYER_PRESERVE(5466), - PRAYER_RIGOUR(5464), - PRAYER_AUGURY(5465), - - /** - * Diary Entries - */ - DIARY_ARDOUGNE_EASY(4458), - DIARY_ARDOUGNE_MEDIUM(4459), - DIARY_ARDOUGNE_HARD(4460), - DIARY_ARDOUGNE_ELITE(4461), - - DIARY_DESERT_EASY(4483), - DIARY_DESERT_MEDIUM(4484), - DIARY_DESERT_HARD(4485), - DIARY_DESERT_ELITE(4486), - - DIARY_FALADOR_EASY(4462), - DIARY_FALADOR_MEDIUM(4463), - DIARY_FALADOR_HARD(4464), - DIARY_FALADOR_ELITE(4465), - - DIARY_FREMENNIK_EASY(4491), - DIARY_FREMENNIK_MEDIUM(4492), - DIARY_FREMENNIK_HARD(4493), - DIARY_FREMENNIK_ELITE(4494), - - DIARY_KANDARIN_EASY(4475), - DIARY_KANDARIN_MEDIUM(4476), - DIARY_KANDARIN_HARD(4477), - DIARY_KANDARIN_ELITE(4478), - - DIARY_KARAMJA_EASY(3578), - DIARY_KARAMJA_MEDIUM(3599), - DIARY_KARAMJA_HARD(3611), - DIARY_KARAMJA_ELITE(4566), - - DIARY_LUMBRIDGE_EASY(4495), - DIARY_LUMBRIDGE_MEDIUM(4496), - DIARY_LUMBRIDGE_HARD(4497), - DIARY_LUMBRIDGE_ELITE(4498), - - DIARY_MORYTANIA_EASY(4487), - DIARY_MORYTANIA_MEDIUM(4488), - DIARY_MORYTANIA_HARD(4489), - DIARY_MORYTANIA_ELITE(4490), - - DIARY_VARROCK_EASY(4479), - DIARY_VARROCK_MEDIUM(4480), - DIARY_VARROCK_HARD(4481), - DIARY_VARROCK_ELITE(4482), - - DIARY_WESTERN_EASY(4471), - DIARY_WESTERN_MEDIUM(4472), - DIARY_WESTERN_HARD(4473), - DIARY_WESTERN_ELITE(4474), - - DIARY_WILDERNESS_EASY(4466), - DIARY_WILDERNESS_MEDIUM(4467), - DIARY_WILDERNESS_HARD(4468), - DIARY_WILDERNESS_ELITE(4469), - - /** - * Kourend house favours - */ - KOUREND_FAVOR_ARCEUUS(4896), - KOUREND_FAVOR_HOSIDIUS(4895), - KOUREND_FAVOR_LOVAKENGJ(4898), - KOUREND_FAVOR_PISCARILIUS(4899), - KOUREND_FAVOR_SHAYZIEN(4894), - - /** - * Equipped weapon type - */ - EQUIPPED_WEAPON_TYPE(357), - - /** - * Defensive casting mode - */ - DEFENSIVE_CASTING_MODE(2668), - - /** - * Options - */ - SIDE_PANELS(4607), - - /** - * Herbiboar Trails - */ - HB_TRAIL_31303(5737), - HB_TRAIL_31306(5738), - HB_TRAIL_31309(5739), - HB_TRAIL_31312(5740), - HB_TRAIL_31315(5741), - HB_TRAIL_31318(5742), - HB_TRAIL_31321(5743), - HB_TRAIL_31324(5744), - HB_TRAIL_31327(5745), - HB_TRAIL_31330(5746), - - HB_TRAIL_31333(5768), - HB_TRAIL_31336(5769), - HB_TRAIL_31339(5770), - HB_TRAIL_31342(5771), - HB_TRAIL_31345(5772), - HB_TRAIL_31348(5773), - HB_TRAIL_31351(5774), - HB_TRAIL_31354(5775), - HB_TRAIL_31357(5776), - HB_TRAIL_31360(5777), - - HB_TRAIL_31363(5747), - HB_TRAIL_31366(5748), - HB_TRAIL_31369(5749), - HB_TRAIL_31372(5750), - - HB_FINISH(5766), - HB_STARTED(5767), //not working - - /** - * Barbarian Assault - */ - IN_GAME_BA(3923), - - /** - * 0 = Outside wilderness - * 1 = In wilderness - */ - IN_WILDERNESS(5963), - - /** - * Fishing Trawler - * FISHING_TRAWLER_ACTIVITY Expected values: 0-255 - */ - FISHING_TRAWLER_ACTIVITY(3377), - - /** - * Blast Furnace Bar Dispenser - *

- * These are the expected values: - * 0 = No bars being processed - * 1 = Ores are being processed on the conveyor belt, bar dispenser cannot be checked - * 2 = Bars are cooling down - * 3 = Bars can be collected - */ - BAR_DISPENSER(936), - - /** - * Motherlode mine sack - */ - SACK_NUMBER(5558), - SACK_UPGRADED(5556), - - /** - * Experience tracker - *

- * EXPERIENCE_TRACKER_POSITION expected values: - * 0 = Right - * 1 = Middle - * 2 = Left - */ - EXPERIENCE_TRACKER_POSITION(4692), - EXPERIENCE_TRACKER_COUNTER(4697), - EXPERIENCE_TRACKER_PROGRESS_BAR(4698), - - /** - * Experience drop color - */ - EXPERIENCE_DROP_COLOR(4695), - - /** - * Tithe Farm - */ - TITHE_FARM_SACK_AMOUNT(4900), - TITHE_FARM_SACK_ICON(5370), - TITHE_FARM_POINTS(4893), - - /** - * Blast Mine - */ - BLAST_MINE_COAL(4924), - BLAST_MINE_GOLD(4925), - BLAST_MINE_MITHRIL(4926), - BLAST_MINE_ADAMANTITE(4921), - BLAST_MINE_RUNITE(4922), - - /** - * Raids - */ - IN_RAID(5432), - TOTAL_POINTS(5431), - PERSONAL_POINTS(5422), - RAID_PARTY_SIZE(5424), - - /** - * Theatre of Blood 1=In Party, 2=Inside/Spectator, 3=Dead Spectating - */ - THEATRE_OF_BLOOD(6440), - - /** - * Nightmare Zone - */ - NMZ_ABSORPTION(3956), - NMZ_POINTS(3949), - NMZ_OVERLOAD(3955), - - /** - * Blast Furnace - */ - BLAST_FURNACE_COPPER_ORE(959), - BLAST_FURNACE_TIN_ORE(950), - BLAST_FURNACE_IRON_ORE(951), - BLAST_FURNACE_COAL(949), - BLAST_FURNACE_MITHRIL_ORE(952), - BLAST_FURNACE_ADAMANTITE_ORE(953), - BLAST_FURNACE_RUNITE_ORE(954), - BLAST_FURNACE_SILVER_ORE(956), - BLAST_FURNACE_GOLD_ORE(955), - - BLAST_FURNACE_BRONZE_BAR(941), - BLAST_FURNACE_IRON_BAR(942), - BLAST_FURNACE_STEEL_BAR(943), - BLAST_FURNACE_MITHRIL_BAR(944), - BLAST_FURNACE_ADAMANTITE_BAR(945), - BLAST_FURNACE_RUNITE_BAR(946), - BLAST_FURNACE_SILVER_BAR(948), - BLAST_FURNACE_GOLD_BAR(947), - - BLAST_FURNACE_COFFER(5357), - - /** - * Pyramid plunder - */ - PYRAMID_PLUNDER_TIMER(2375), - PYRAMID_PLUNDER_ROOM(2377), - - /** - * Barrows - */ - BARROWS_KILLED_AHRIM(457), - BARROWS_KILLED_DHAROK(458), - BARROWS_KILLED_GUTHAN(459), - BARROWS_KILLED_KARIL(460), - BARROWS_KILLED_TORAG(461), - BARROWS_KILLED_VERAC(462), - BARROWS_REWARD_POTENTIAL(463), - BARROWS_NPCS_SLAIN(464), - - /** - * Spicy stew ingredients - */ - SPICY_STEW_RED_SPICES(1879), - SPICY_STEW_YELLOW_SPICES(1880), - SPICY_STEW_BROWN_SPICES(1881), - SPICY_STEW_ORANGE_SPICES(1882), - - /** - * Multicombat area - */ - MULTICOMBAT_AREA(4605), - - /** - * In the Wilderness - */ - IN_THE_WILDERNESS(5963), - - /** - * Kingdom Management - */ - KINGDOM_FAVOR(72), - KINGDOM_COFFER(74), - - /** - * The Hand in the Sand quest status - */ - QUEST_THE_HAND_IN_THE_SAND(1527), - - /** - * Daily Tasks (Collection availability) - */ - DAILY_HERB_BOXES_COLLECTED(3961), - DAILY_STAVES_COLLECTED(4539), - DAILY_ESSENCE_COLLECTED(4547), - DAILY_RUNES_COLLECTED(4540), - DAILY_SAND_COLLECTED(4549), - DAILY_ARROWS_STATE(4563), - DAILY_FLAX_STATE(4559), - /** - * This varbit tracks how much bonemeal has been redeemed from Robin - * The player gets 13 for each diary completed above and including Medium, for a maxiumum of 39 - */ - DAILY_BONEMEAL_STATE(4543), - - /** - * Fairy Ring - */ - FAIR_RING_LAST_DESTINATION(5374), - FAIRY_RING_DIAL_ADCB(3985), //Left dial - FAIRY_RIGH_DIAL_ILJK(3986), //Middle dial - FAIRY_RING_DIAL_PSRQ(3987), //Right dial - - /** - * Transmog controllers for farming - */ - FARMING_4771(4771), - FARMING_4772(4772), - FARMING_4773(4773), - FARMING_4774(4774), - FARMING_4775(4775), - FARMING_7904(7904), - FARMING_7905(7905), - FARMING_7906(7906), - FARMING_7907(7907), - FARMING_7908(7908), - FARMING_7909(7909), - FARMING_7910(7910), - FARMING_7911(7911), - - /** - * Transmog controllers for grapes - */ - GRAPES_4953(4953), - GRAPES_4954(4954), - GRAPES_4955(4955), - GRAPES_4956(4956), - GRAPES_4957(4957), - GRAPES_4958(4958), - GRAPES_4959(4959), - GRAPES_4960(4960), - GRAPES_4961(4961), - GRAPES_4962(4962), - GRAPES_4963(4963), - GRAPES_4964(4964), - - /** - * Automatically weed farming patches - */ - AUTOWEED(5557), - - /** - * The varbit that stores the players {@code AccountType}. - */ - ACCOUNT_TYPE(1777), - - /** - * The varbit that stores the oxygen percentage for player - */ - OXYGEN_LEVEL(5811), - - /** - * Corp beast damage - */ - CORP_DAMAGE(999), - - /** - * Toggleable slayer unlocks - */ - SUPERIOR_ENABLED(5362), - FOSSIL_ISLAND_WYVERN_DISABLE(6251), - - CURRENT_BANK_TAB(4150), - - WORLDHOPPER_FAVROITE_1(4597), - WORLDHOPPER_FAVROITE_2(4598), - - /** - * Vengeance is active - */ - VENGEANCE_ACTIVE(2450), - - /** - * Spell cooldowns - */ - VENGEANCE_COOLDOWN(2451), - - /** - * Amount of items in each bank tab - */ - BANK_TAB_ONE_COUNT(4171), - BANK_TAB_TWO_COUNT(4172), - BANK_TAB_THREE_COUNT(4173), - BANK_TAB_FOUR_COUNT(4174), - BANK_TAB_FIVE_COUNT(4175), - BANK_TAB_SIX_COUNT(4176), - BANK_TAB_SEVEN_COUNT(4177), - BANK_TAB_EIGHT_COUNT(4178), - BANK_TAB_NINE_COUNT(4179), - - /** - * Type of GE offer currently being created - * 0 = buy - * 1 = sell - */ - GE_OFFER_CREATION_TYPE(4397), - - - /** - * Spells being auto-casted - */ - AUTO_CAST_SPELL(276), - - - /** - * The active tab within the quest interface - */ - QUEST_TAB(8168), - - /** - * Temple Trekking - */ - TREK_POINTS(1955), - TREK_STARTED(1956), - TREK_EVENT(1958), - TREK_STATUS(6719), - BLOAT_ENTERED_ROOM(6447), - - /** - * f2p Quest varbits, these don't hold the completion value. - */ - QUEST_DEMON_SLAYER(2561), - QUEST_GOBLIN_DIPLOMACY(2378), - QUEST_MISTHALIN_MYSTERY(3468), - QUEST_THE_CORSAIR_CURSE(6071), - QUEST_X_MARKS_THE_SPOT(8063), - - /** - * member Quest varbits, these don't hold the completion value. - */ - QUEST_ANIMAL_MAGNETISM(3185), - QUEST_BETWEEN_A_ROCK(299), - QUEST_CONTACT(3274), - QUEST_ZOGRE_FLESH_EATERS(487), - QUEST_DARKNESS_OF_HALLOWVALE(2573), - QUEST_DEATH_TO_THE_DORGESHUUN(2258), - QUEST_DESERT_TREASURE(358), - QUEST_DEVIOUS_MINDS(1465), - QUEST_EAGLES_PEAK(2780), - QUEST_ELEMENTAL_WORKSHOP_II(2639), - QUEST_ENAKHRAS_LAMENT(1560), - QUEST_ENLIGHTENED_JOURNEY(2866), - QUEST_THE_EYES_OF_GLOUPHRIE(2497), - QUEST_FAIRYTALE_I_GROWING_PAINS(1803), - QUEST_FAIRYTALE_II_CURE_A_QUEEN(2326), - QUEST_THE_FEUD(334), - QUEST_FORGETTABLE_TALE(822), - QUEST_GARDEN_OF_TRANQUILLITY(961), - QUEST_GHOSTS_AHOY(217), - QUEST_THE_GIANT_DWARF(571), - QUEST_THE_GOLEM(346), - QUEST_HORROR_FROM_THE_DEEP(34), - QUEST_ICTHLARINS_LITTLE_HELPER(418), - QUEST_IN_AID_OF_THE_MYREQUE(1990), - QUEST_THE_LOST_TRIBE(532), - QUEST_LUNAR_DIPLOMACY(2448), - QUEST_MAKING_HISTORY(1383), - QUEST_MOUNTAIN_DAUGHTER(260), - QUEST_MOURNINGS_ENDS_PART_II(1103), - QUEST_MY_ARMS_BIG_ADVENTURE(2790), - QUEST_RATCATCHERS(1404), - QUEST_RECIPE_FOR_DISASTER(1850), - QUEST_RECRUITMENT_DRIVE(657), - QUEST_ROYAL_TROUBLE(2140), - QUEST_THE_SLUG_MENACE(2610), - QUEST_SHADOW_OF_THE_STORM(1372), - QUEST_A_SOULS_BANE(2011), - QUEST_SPIRITS_OF_THE_ELID(1444), - QUEST_SWAN_SONG(2098), - QUEST_A_TAIL_OF_TWO_CATS(1028), - QUEST_TEARS_OF_GUTHIX(451), - QUEST_WANTED(1051), - QUEST_COLD_WAR(3293), - QUEST_THE_FREMENNIK_ISLES(3311), - QUEST_TOWER_OF_LIFE(3337), - QUEST_WHAT_LIES_BELOW(3523), - QUEST_OLAFS_QUEST(3534), - QUEST_ANOTHER_SLICE_OF_HAM(3550), - QUEST_DREAM_MENTOR(3618), - QUEST_GRIM_TALES(2783), - QUEST_KINGS_RANSOM(3888), - QUEST_MONKEY_MADNESS_II(5027), - QUEST_CLIENT_OF_KOUREND(5619), - QUEST_BONE_VOYAGE(5795), - QUEST_THE_QUEEN_OF_THIEVES(6037), - QUEST_THE_DEPTHS_OF_DESPAIR(6027), - QUEST_DRAGON_SLAYER_II(6104), - QUEST_TALE_OF_THE_RIGHTEOUS(6358), - QUEST_A_TASTE_OF_HOPE(6396), - QUEST_MAKING_FRIENDS_WITH_MY_ARM(6528), - QUEST_THE_ASCENT_OF_ARCEUUS(7856), - QUEST_THE_FORSAKEN_TOWER(7796), - - /** - * mini-quest varbits, these don't hold the completion value. - */ - QUEST_ARCHITECTURAL_ALLIANCE(4982), - QUEST_BEAR_YOUR_SOUL(5078), - QUEST_CURSE_OF_THE_EMPTY_LORD(821), - QUEST_ENCHANTED_KEY(1391), - QUEST_THE_GENERALS_SHADOW(3330), - QUEST_SKIPPY_AND_THE_MOGRES(1344), - QUEST_LAIR_OF_TARN_RAZORLOR(3290), - QUEST_FAMILY_PEST(5347), - QUEST_THE_MAGE_ARENA_II(6067); - - /** - * The raw varbit ID. - */ - private final int id; -} +/* + * Copyright (c) 2017, Adam + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.api; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * An enumeration of local client variables. + */ +@AllArgsConstructor +@Getter +public enum Varbits +{ + /* + * If chatbox is transparent or not + */ + TRANSPARENT_CHATBOX(4608), + + /* + * If the player has an active stamina potion effect or not + */ + RUN_SLOWED_DEPLETION_ACTIVE(25), + + /** + * If scrollbar in resizable mode chat is on the left + */ + CHAT_SCROLLBAR_ON_LEFT(6374), + + /** + * Runepouch + */ + RUNE_POUCH_RUNE1(29), + RUNE_POUCH_RUNE2(1622), + RUNE_POUCH_RUNE3(1623), + RUNE_POUCH_AMOUNT1(1624), + RUNE_POUCH_AMOUNT2(1625), + RUNE_POUCH_AMOUNT3(1626), + + /** + * Prayers + */ + QUICK_PRAYER(4103), + PRAYER_THICK_SKIN(4104), + PRAYER_BURST_OF_STRENGTH(4105), + PRAYER_CLARITY_OF_THOUGHT(4106), + PRAYER_SHARP_EYE(4122), + PRAYER_MYSTIC_WILL(4123), + PRAYER_ROCK_SKIN(4107), + PRAYER_SUPERHUMAN_STRENGTH(4108), + PRAYER_IMPROVED_REFLEXES(4109), + PRAYER_RAPID_RESTORE(4110), + PRAYER_RAPID_HEAL(4111), + PRAYER_PROTECT_ITEM(4112), + PRAYER_HAWK_EYE(4124), + PRAYER_MYSTIC_LORE(4125), + PRAYER_STEEL_SKIN(4113), + PRAYER_ULTIMATE_STRENGTH(4114), + PRAYER_INCREDIBLE_REFLEXES(4115), + PRAYER_PROTECT_FROM_MAGIC(4116), + PRAYER_PROTECT_FROM_MISSILES(4117), + PRAYER_PROTECT_FROM_MELEE(4118), + PRAYER_EAGLE_EYE(4126), + PRAYER_MYSTIC_MIGHT(4127), + PRAYER_RETRIBUTION(4119), + PRAYER_REDEMPTION(4120), + PRAYER_SMITE(4121), + PRAYER_CHIVALRY(4128), + PRAYER_PIETY(4129), + PRAYER_PRESERVE(5466), + PRAYER_RIGOUR(5464), + PRAYER_AUGURY(5465), + + /** + * Diary Entries + */ + DIARY_ARDOUGNE_EASY(4458), + DIARY_ARDOUGNE_MEDIUM(4459), + DIARY_ARDOUGNE_HARD(4460), + DIARY_ARDOUGNE_ELITE(4461), + + DIARY_DESERT_EASY(4483), + DIARY_DESERT_MEDIUM(4484), + DIARY_DESERT_HARD(4485), + DIARY_DESERT_ELITE(4486), + + DIARY_FALADOR_EASY(4462), + DIARY_FALADOR_MEDIUM(4463), + DIARY_FALADOR_HARD(4464), + DIARY_FALADOR_ELITE(4465), + + DIARY_FREMENNIK_EASY(4491), + DIARY_FREMENNIK_MEDIUM(4492), + DIARY_FREMENNIK_HARD(4493), + DIARY_FREMENNIK_ELITE(4494), + + DIARY_KANDARIN_EASY(4475), + DIARY_KANDARIN_MEDIUM(4476), + DIARY_KANDARIN_HARD(4477), + DIARY_KANDARIN_ELITE(4478), + + DIARY_KARAMJA_EASY(3578), + DIARY_KARAMJA_MEDIUM(3599), + DIARY_KARAMJA_HARD(3611), + DIARY_KARAMJA_ELITE(4566), + + DIARY_LUMBRIDGE_EASY(4495), + DIARY_LUMBRIDGE_MEDIUM(4496), + DIARY_LUMBRIDGE_HARD(4497), + DIARY_LUMBRIDGE_ELITE(4498), + + DIARY_MORYTANIA_EASY(4487), + DIARY_MORYTANIA_MEDIUM(4488), + DIARY_MORYTANIA_HARD(4489), + DIARY_MORYTANIA_ELITE(4490), + + DIARY_VARROCK_EASY(4479), + DIARY_VARROCK_MEDIUM(4480), + DIARY_VARROCK_HARD(4481), + DIARY_VARROCK_ELITE(4482), + + DIARY_WESTERN_EASY(4471), + DIARY_WESTERN_MEDIUM(4472), + DIARY_WESTERN_HARD(4473), + DIARY_WESTERN_ELITE(4474), + + DIARY_WILDERNESS_EASY(4466), + DIARY_WILDERNESS_MEDIUM(4467), + DIARY_WILDERNESS_HARD(4468), + DIARY_WILDERNESS_ELITE(4469), + + /** + * Kourend house favours + */ + KOUREND_FAVOR_ARCEUUS(4896), + KOUREND_FAVOR_HOSIDIUS(4895), + KOUREND_FAVOR_LOVAKENGJ(4898), + KOUREND_FAVOR_PISCARILIUS(4899), + KOUREND_FAVOR_SHAYZIEN(4894), + + /** + * Equipped weapon type + */ + EQUIPPED_WEAPON_TYPE(357), + + /** + * Defensive casting mode + */ + DEFENSIVE_CASTING_MODE(2668), + + /** + * Options + */ + SIDE_PANELS(4607), + + /** + * Herbiboar Trails + */ + HB_TRAIL_31303(5737), + HB_TRAIL_31306(5738), + HB_TRAIL_31309(5739), + HB_TRAIL_31312(5740), + HB_TRAIL_31315(5741), + HB_TRAIL_31318(5742), + HB_TRAIL_31321(5743), + HB_TRAIL_31324(5744), + HB_TRAIL_31327(5745), + HB_TRAIL_31330(5746), + + HB_TRAIL_31333(5768), + HB_TRAIL_31336(5769), + HB_TRAIL_31339(5770), + HB_TRAIL_31342(5771), + HB_TRAIL_31345(5772), + HB_TRAIL_31348(5773), + HB_TRAIL_31351(5774), + HB_TRAIL_31354(5775), + HB_TRAIL_31357(5776), + HB_TRAIL_31360(5777), + + HB_TRAIL_31363(5747), + HB_TRAIL_31366(5748), + HB_TRAIL_31369(5749), + HB_TRAIL_31372(5750), + + HB_FINISH(5766), + HB_STARTED(5767), //not working + + /** + * Barbarian Assault + */ + IN_GAME_BA(3923), + + /** + * 0 = Outside wilderness + * 1 = In wilderness + */ + IN_WILDERNESS(5963), + + /** + * Fishing Trawler + * FISHING_TRAWLER_ACTIVITY Expected values: 0-255 + */ + FISHING_TRAWLER_ACTIVITY(3377), + + /** + * Blast Furnace Bar Dispenser + *

+ * These are the expected values: + * 0 = No bars being processed + * 1 = Ores are being processed on the conveyor belt, bar dispenser cannot be checked + * 2 = Bars are cooling down + * 3 = Bars can be collected + */ + BAR_DISPENSER(936), + + /** + * Motherlode mine sack + */ + SACK_NUMBER(5558), + SACK_UPGRADED(5556), + + /** + * Experience tracker + *

+ * EXPERIENCE_TRACKER_POSITION expected values: + * 0 = Right + * 1 = Middle + * 2 = Left + */ + EXPERIENCE_TRACKER_POSITION(4692), + EXPERIENCE_TRACKER_COUNTER(4697), + EXPERIENCE_TRACKER_PROGRESS_BAR(4698), + + /** + * Experience drop color + */ + EXPERIENCE_DROP_COLOR(4695), + + /** + * Tithe Farm + */ + TITHE_FARM_SACK_AMOUNT(4900), + TITHE_FARM_SACK_ICON(5370), + TITHE_FARM_POINTS(4893), + + /** + * Blast Mine + */ + BLAST_MINE_COAL(4924), + BLAST_MINE_GOLD(4925), + BLAST_MINE_MITHRIL(4926), + BLAST_MINE_ADAMANTITE(4921), + BLAST_MINE_RUNITE(4922), + + /** + * Raids + */ + IN_RAID(5432), + TOTAL_POINTS(5431), + PERSONAL_POINTS(5422), + RAID_PARTY_SIZE(5424), + + /** + * Theatre of Blood 1=In Party, 2=Inside/Spectator, 3=Dead Spectating + */ + THEATRE_OF_BLOOD(6440), + + /** + * Nightmare Zone + */ + NMZ_ABSORPTION(3956), + NMZ_POINTS(3949), + NMZ_OVERLOAD(3955), + + /** + * Blast Furnace + */ + BLAST_FURNACE_COPPER_ORE(959), + BLAST_FURNACE_TIN_ORE(950), + BLAST_FURNACE_IRON_ORE(951), + BLAST_FURNACE_COAL(949), + BLAST_FURNACE_MITHRIL_ORE(952), + BLAST_FURNACE_ADAMANTITE_ORE(953), + BLAST_FURNACE_RUNITE_ORE(954), + BLAST_FURNACE_SILVER_ORE(956), + BLAST_FURNACE_GOLD_ORE(955), + + BLAST_FURNACE_BRONZE_BAR(941), + BLAST_FURNACE_IRON_BAR(942), + BLAST_FURNACE_STEEL_BAR(943), + BLAST_FURNACE_MITHRIL_BAR(944), + BLAST_FURNACE_ADAMANTITE_BAR(945), + BLAST_FURNACE_RUNITE_BAR(946), + BLAST_FURNACE_SILVER_BAR(948), + BLAST_FURNACE_GOLD_BAR(947), + + BLAST_FURNACE_COFFER(5357), + + /** + * Pyramid plunder + */ + PYRAMID_PLUNDER_TIMER(2375), + PYRAMID_PLUNDER_ROOM(2377), + + /** + * Barrows + */ + BARROWS_KILLED_AHRIM(457), + BARROWS_KILLED_DHAROK(458), + BARROWS_KILLED_GUTHAN(459), + BARROWS_KILLED_KARIL(460), + BARROWS_KILLED_TORAG(461), + BARROWS_KILLED_VERAC(462), + BARROWS_REWARD_POTENTIAL(463), + BARROWS_NPCS_SLAIN(464), + + /** + * Spicy stew ingredients + */ + SPICY_STEW_RED_SPICES(1879), + SPICY_STEW_YELLOW_SPICES(1880), + SPICY_STEW_BROWN_SPICES(1881), + SPICY_STEW_ORANGE_SPICES(1882), + + /** + * Multicombat area + */ + MULTICOMBAT_AREA(4605), + + /** + * In the Wilderness + */ + IN_THE_WILDERNESS(5963), + + /** + * Kingdom Management + */ + KINGDOM_FAVOR(72), + KINGDOM_COFFER(74), + + /** + * The Hand in the Sand quest status + */ + QUEST_THE_HAND_IN_THE_SAND(1527), + + /** + * Daily Tasks (Collection availability) + */ + DAILY_HERB_BOXES_COLLECTED(3961), + DAILY_STAVES_COLLECTED(4539), + DAILY_ESSENCE_COLLECTED(4547), + DAILY_RUNES_COLLECTED(4540), + DAILY_SAND_COLLECTED(4549), + DAILY_ARROWS_STATE(4563), + DAILY_FLAX_STATE(4559), + /** + * This varbit tracks how much bonemeal has been redeemed from Robin + * The player gets 13 for each diary completed above and including Medium, for a maxiumum of 39 + */ + DAILY_BONEMEAL_STATE(4543), + + /** + * Fairy Ring + */ + FAIR_RING_LAST_DESTINATION(5374), + FAIRY_RING_DIAL_ADCB(3985), //Left dial + FAIRY_RIGH_DIAL_ILJK(3986), //Middle dial + FAIRY_RING_DIAL_PSRQ(3987), //Right dial + + /** + * Transmog controllers for farming + */ + FARMING_4771(4771), + FARMING_4772(4772), + FARMING_4773(4773), + FARMING_4774(4774), + FARMING_4775(4775), + FARMING_7904(7904), + FARMING_7905(7905), + FARMING_7906(7906), + FARMING_7907(7907), + FARMING_7908(7908), + FARMING_7909(7909), + FARMING_7910(7910), + FARMING_7911(7911), + + /** + * Transmog controllers for grapes + */ + GRAPES_4953(4953), + GRAPES_4954(4954), + GRAPES_4955(4955), + GRAPES_4956(4956), + GRAPES_4957(4957), + GRAPES_4958(4958), + GRAPES_4959(4959), + GRAPES_4960(4960), + GRAPES_4961(4961), + GRAPES_4962(4962), + GRAPES_4963(4963), + GRAPES_4964(4964), + + /** + * Automatically weed farming patches + */ + AUTOWEED(5557), + + /** + * The varbit that stores the players {@code AccountType}. + */ + ACCOUNT_TYPE(1777), + + /** + * The varbit that stores the oxygen percentage for player + */ + OXYGEN_LEVEL(5811), + + /** + * Corp beast damage + */ + CORP_DAMAGE(999), + + /** + * Toggleable slayer unlocks + */ + SUPERIOR_ENABLED(5362), + FOSSIL_ISLAND_WYVERN_DISABLE(6251), + + CURRENT_BANK_TAB(4150), + + WORLDHOPPER_FAVROITE_1(4597), + WORLDHOPPER_FAVROITE_2(4598), + + /** + * Vengeance is active + */ + VENGEANCE_ACTIVE(2450), + + /** + * Spell cooldowns + */ + VENGEANCE_COOLDOWN(2451), + + /** + * 0 = standard + * 1 = ancients + * 2 = lunars + * 3 = arrceus + **/ + SPELLBOOK_ID(0), + SPELLBOOK_ID(1), + SPELLBOOK_ID(2), + SPELLBOOK_ID(3), + + /** + * Amount of items in each bank tab + */ + BANK_TAB_ONE_COUNT(4171), + BANK_TAB_TWO_COUNT(4172), + BANK_TAB_THREE_COUNT(4173), + BANK_TAB_FOUR_COUNT(4174), + BANK_TAB_FIVE_COUNT(4175), + BANK_TAB_SIX_COUNT(4176), + BANK_TAB_SEVEN_COUNT(4177), + BANK_TAB_EIGHT_COUNT(4178), + BANK_TAB_NINE_COUNT(4179), + + /** + * Type of GE offer currently being created + * 0 = buy + * 1 = sell + */ + GE_OFFER_CREATION_TYPE(4397), + + + /** + * Spells being auto-casted + */ + AUTO_CAST_SPELL(276), + + + /** + * The active tab within the quest interface + */ + QUEST_TAB(8168), + + /** + * Temple Trekking + */ + TREK_POINTS(1955), + TREK_STARTED(1956), + TREK_EVENT(1958), + TREK_STATUS(6719), + BLOAT_ENTERED_ROOM(6447), + + /** + * f2p Quest varbits, these don't hold the completion value. + */ + QUEST_DEMON_SLAYER(2561), + QUEST_GOBLIN_DIPLOMACY(2378), + QUEST_MISTHALIN_MYSTERY(3468), + QUEST_THE_CORSAIR_CURSE(6071), + QUEST_X_MARKS_THE_SPOT(8063), + + /** + * member Quest varbits, these don't hold the completion value. + */ + QUEST_ANIMAL_MAGNETISM(3185), + QUEST_BETWEEN_A_ROCK(299), + QUEST_CONTACT(3274), + QUEST_ZOGRE_FLESH_EATERS(487), + QUEST_DARKNESS_OF_HALLOWVALE(2573), + QUEST_DEATH_TO_THE_DORGESHUUN(2258), + QUEST_DESERT_TREASURE(358), + QUEST_DEVIOUS_MINDS(1465), + QUEST_EAGLES_PEAK(2780), + QUEST_ELEMENTAL_WORKSHOP_II(2639), + QUEST_ENAKHRAS_LAMENT(1560), + QUEST_ENLIGHTENED_JOURNEY(2866), + QUEST_THE_EYES_OF_GLOUPHRIE(2497), + QUEST_FAIRYTALE_I_GROWING_PAINS(1803), + QUEST_FAIRYTALE_II_CURE_A_QUEEN(2326), + QUEST_THE_FEUD(334), + QUEST_FORGETTABLE_TALE(822), + QUEST_GARDEN_OF_TRANQUILLITY(961), + QUEST_GHOSTS_AHOY(217), + QUEST_THE_GIANT_DWARF(571), + QUEST_THE_GOLEM(346), + QUEST_HORROR_FROM_THE_DEEP(34), + QUEST_ICTHLARINS_LITTLE_HELPER(418), + QUEST_IN_AID_OF_THE_MYREQUE(1990), + QUEST_THE_LOST_TRIBE(532), + QUEST_LUNAR_DIPLOMACY(2448), + QUEST_MAKING_HISTORY(1383), + QUEST_MOUNTAIN_DAUGHTER(260), + QUEST_MOURNINGS_ENDS_PART_II(1103), + QUEST_MY_ARMS_BIG_ADVENTURE(2790), + QUEST_RATCATCHERS(1404), + QUEST_RECIPE_FOR_DISASTER(1850), + QUEST_RECRUITMENT_DRIVE(657), + QUEST_ROYAL_TROUBLE(2140), + QUEST_THE_SLUG_MENACE(2610), + QUEST_SHADOW_OF_THE_STORM(1372), + QUEST_A_SOULS_BANE(2011), + QUEST_SPIRITS_OF_THE_ELID(1444), + QUEST_SWAN_SONG(2098), + QUEST_A_TAIL_OF_TWO_CATS(1028), + QUEST_TEARS_OF_GUTHIX(451), + QUEST_WANTED(1051), + QUEST_COLD_WAR(3293), + QUEST_THE_FREMENNIK_ISLES(3311), + QUEST_TOWER_OF_LIFE(3337), + QUEST_WHAT_LIES_BELOW(3523), + QUEST_OLAFS_QUEST(3534), + QUEST_ANOTHER_SLICE_OF_HAM(3550), + QUEST_DREAM_MENTOR(3618), + QUEST_GRIM_TALES(2783), + QUEST_KINGS_RANSOM(3888), + QUEST_MONKEY_MADNESS_II(5027), + QUEST_CLIENT_OF_KOUREND(5619), + QUEST_BONE_VOYAGE(5795), + QUEST_THE_QUEEN_OF_THIEVES(6037), + QUEST_THE_DEPTHS_OF_DESPAIR(6027), + QUEST_DRAGON_SLAYER_II(6104), + QUEST_TALE_OF_THE_RIGHTEOUS(6358), + QUEST_A_TASTE_OF_HOPE(6396), + QUEST_MAKING_FRIENDS_WITH_MY_ARM(6528), + QUEST_THE_ASCENT_OF_ARCEUUS(7856), + QUEST_THE_FORSAKEN_TOWER(7796), + + /** + * mini-quest varbits, these don't hold the completion value. + */ + QUEST_ARCHITECTURAL_ALLIANCE(4982), + QUEST_BEAR_YOUR_SOUL(5078), + QUEST_CURSE_OF_THE_EMPTY_LORD(821), + QUEST_ENCHANTED_KEY(1391), + QUEST_THE_GENERALS_SHADOW(3330), + QUEST_SKIPPY_AND_THE_MOGRES(1344), + QUEST_LAIR_OF_TARN_RAZORLOR(3290), + QUEST_FAMILY_PEST(5347), + QUEST_THE_MAGE_ARENA_II(6067); + + /** + * The raw varbit ID. + */ + private final int id; +} From df3caea8af7ca4012277496efcd64ec10bdef290 Mon Sep 17 00:00:00 2001 From: Kyleeld <48519776+Kyleeld@users.noreply.github.com> Date: Thu, 25 Apr 2019 23:59:02 +0100 Subject: [PATCH 4/7] Update Varbits.java /** * 0 = standard * 1 = ancients * 2 = lunars * 3 = arrceus **/ SPELLBOOK_ID(4070), /** * 0 = no * 1 = yes **/ SPELLBOOK_HIDDEN(6718), --- .../src/main/java/net/runelite/api/Varbits.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 bd948d4c4e..378c92def1 100644 --- a/runelite-api/src/main/java/net/runelite/api/Varbits.java +++ b/runelite-api/src/main/java/net/runelite/api/Varbits.java @@ -470,10 +470,13 @@ public enum Varbits * 2 = lunars * 3 = arrceus **/ - SPELLBOOK_ID(0), - SPELLBOOK_ID(1), - SPELLBOOK_ID(2), - SPELLBOOK_ID(3), + SPELLBOOK_ID(4070), + + /** + * 0 = no + * 1 = yes + **/ + SPELLBOOK_HIDDEN(6718), /** * Amount of items in each bank tab From 834cf952b405c5f91baac3fe7575072ebb9081b1 Mon Sep 17 00:00:00 2001 From: Kyleeld <48519776+Kyleeld@users.noreply.github.com> Date: Fri, 26 Apr 2019 00:07:48 +0100 Subject: [PATCH 5/7] Update spellbookiconresizePlugin.java --- .../spellbookiconresizePlugin.java | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizePlugin.java index 6dfc9d1421..ed41930d89 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizePlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizePlugin.java @@ -1,3 +1,27 @@ +/* + * Copyright (c) 2018, https://runelitepl.us + * 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.spellbookiconresize; import com.google.inject.Provides; @@ -325,4 +349,4 @@ public class spellbookiconresizePlugin extends Plugin { widget.setHidden(hidden); } -} \ No newline at end of file +} From 937c139ec21cb0bf275e7f5fae3e045202cc0eb5 Mon Sep 17 00:00:00 2001 From: Kyleeld <48519776+Kyleeld@users.noreply.github.com> Date: Fri, 26 Apr 2019 00:08:08 +0100 Subject: [PATCH 6/7] Update spellbookiconresizeConfig.java --- .../spellbookiconresizeConfig.java | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizeConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizeConfig.java index 568339c64d..c087f39068 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizeConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizeConfig.java @@ -1,3 +1,28 @@ +/* + * Copyright (c) 2018, https://runelitepl.us + * 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.spellbookiconresize; import net.runelite.client.config.Config; @@ -98,4 +123,4 @@ public interface spellbookiconresizeConfig extends Config } -} \ No newline at end of file +} From b297e3e48701161151b7a58d52f1be3de98b7120 Mon Sep 17 00:00:00 2001 From: Kyleeld <48519776+Kyleeld@users.noreply.github.com> Date: Fri, 26 Apr 2019 00:08:37 +0100 Subject: [PATCH 7/7] Update spellbookiconresizePlugin.java --- .../plugins/spellbookiconresize/spellbookiconresizePlugin.java | 1 + 1 file changed, 1 insertion(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizePlugin.java index ed41930d89..5f64e4f61c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizePlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/spellbookiconresize/spellbookiconresizePlugin.java @@ -22,6 +22,7 @@ * (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.spellbookiconresize; import com.google.inject.Provides;