more checkstyle etc
This commit is contained in:
@@ -59,7 +59,6 @@ import net.runelite.client.menus.MenuManager;
|
|||||||
import net.runelite.client.plugins.Plugin;
|
import net.runelite.client.plugins.Plugin;
|
||||||
import net.runelite.client.plugins.PluginInstantiationException;
|
import net.runelite.client.plugins.PluginInstantiationException;
|
||||||
import net.runelite.client.plugins.PluginManager;
|
import net.runelite.client.plugins.PluginManager;
|
||||||
import net.runelite.client.plugins.config.ConfigPanel;
|
|
||||||
import net.runelite.client.rs.ClientUpdateCheckMode;
|
import net.runelite.client.rs.ClientUpdateCheckMode;
|
||||||
import net.runelite.client.task.Scheduler;
|
import net.runelite.client.task.Scheduler;
|
||||||
import net.runelite.client.ui.ClientUI;
|
import net.runelite.client.ui.ClientUI;
|
||||||
@@ -86,7 +85,7 @@ public class RuneLite
|
|||||||
public static final File PROFILES_DIR = new File(RUNELITE_DIR, "profiles");
|
public static final File PROFILES_DIR = new File(RUNELITE_DIR, "profiles");
|
||||||
public static final File PLUGIN_DIR = new File(RUNELITE_DIR, "plugins");
|
public static final File PLUGIN_DIR = new File(RUNELITE_DIR, "plugins");
|
||||||
public static final File SCREENSHOT_DIR = new File(RUNELITE_DIR, "screenshots");
|
public static final File SCREENSHOT_DIR = new File(RUNELITE_DIR, "screenshots");
|
||||||
public static RuneLiteSplashScreen splashScreen = new RuneLiteSplashScreen();
|
static final RuneLiteSplashScreen splashScreen = new RuneLiteSplashScreen();
|
||||||
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
|||||||
@@ -80,9 +80,12 @@ public class RuneLiteProperties
|
|||||||
|
|
||||||
public String getDiscordAppId()
|
public String getDiscordAppId()
|
||||||
{
|
{
|
||||||
if (RuneLitePlusPlugin.customPresenceEnabled) {
|
if (RuneLitePlusPlugin.customPresenceEnabled)
|
||||||
|
{
|
||||||
return properties.getProperty(RuneLitePlusPlugin.rlPlusDiscordApp);
|
return properties.getProperty(RuneLitePlusPlugin.rlPlusDiscordApp);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return properties.getProperty(DISCORD_APP_ID);
|
return properties.getProperty(DISCORD_APP_ID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,12 +36,12 @@ import javax.inject.Inject;
|
|||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.client.events.SessionClose;
|
|
||||||
import net.runelite.client.events.SessionOpen;
|
|
||||||
import net.runelite.client.RuneLite;
|
import net.runelite.client.RuneLite;
|
||||||
import net.runelite.client.config.ConfigManager;
|
import net.runelite.client.config.ConfigManager;
|
||||||
import net.runelite.client.eventbus.EventBus;
|
import net.runelite.client.eventbus.EventBus;
|
||||||
import net.runelite.client.eventbus.Subscribe;
|
import net.runelite.client.eventbus.Subscribe;
|
||||||
|
import net.runelite.client.events.SessionClose;
|
||||||
|
import net.runelite.client.events.SessionOpen;
|
||||||
import net.runelite.client.util.LinkBrowser;
|
import net.runelite.client.util.LinkBrowser;
|
||||||
import net.runelite.client.ws.WSClient;
|
import net.runelite.client.ws.WSClient;
|
||||||
import net.runelite.http.api.account.AccountClient;
|
import net.runelite.http.api.account.AccountClient;
|
||||||
|
|||||||
@@ -374,6 +374,7 @@ public class Hooks implements Callbacks
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy an image
|
* Copy an image
|
||||||
|
*
|
||||||
* @param src
|
* @param src
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -24,10 +24,10 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.config;
|
package net.runelite.client.config;
|
||||||
|
|
||||||
import lombok.AccessLevel;
|
|
||||||
import lombok.Getter;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
public class ConfigItemsGroup
|
public class ConfigItemsGroup
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,11 +24,10 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.config;
|
package net.runelite.client.config;
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.Getter;
|
|
||||||
import net.runelite.client.ui.FontManager;
|
|
||||||
|
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import net.runelite.client.ui.FontManager;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class DiscordService implements AutoCloseable
|
|||||||
discordEventHandlers.joinGame = this::joinGame;
|
discordEventHandlers.joinGame = this::joinGame;
|
||||||
discordEventHandlers.spectateGame = this::spectateGame;
|
discordEventHandlers.spectateGame = this::spectateGame;
|
||||||
discordEventHandlers.joinRequest = this::joinRequest;
|
discordEventHandlers.joinRequest = this::joinRequest;
|
||||||
discordRPC.Discord_Initialize(runeLiteProperties.discordAppID, discordEventHandlers, true, null);
|
discordRPC.Discord_Initialize(RuneLiteProperties.discordAppID, discordEventHandlers, true, null);
|
||||||
executorService.scheduleAtFixedRate(discordRPC::Discord_RunCallbacks, 0, 2, TimeUnit.SECONDS);
|
executorService.scheduleAtFixedRate(discordRPC::Discord_RunCallbacks, 0, 2, TimeUnit.SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,26 +35,32 @@ for mouse motion.
|
|||||||
package net.runelite.client.flexo;
|
package net.runelite.client.flexo;
|
||||||
|
|
||||||
import com.github.joonasvali.naturalmouse.api.MouseMotionFactory;
|
import com.github.joonasvali.naturalmouse.api.MouseMotionFactory;
|
||||||
import net.runelite.api.Client;
|
import java.awt.AWTException;
|
||||||
import net.runelite.client.ui.ClientUI;
|
import java.awt.Color;
|
||||||
import sun.awt.ComponentFactory;
|
import java.awt.GraphicsDevice;
|
||||||
|
import java.awt.GraphicsEnvironment;
|
||||||
import javax.swing.*;
|
import java.awt.Point;
|
||||||
import java.awt.*;
|
import java.awt.Robot;
|
||||||
|
import java.awt.Toolkit;
|
||||||
import java.awt.event.InputEvent;
|
import java.awt.event.InputEvent;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.awt.peer.RobotPeer;
|
import java.awt.peer.RobotPeer;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.Constants;
|
||||||
|
import net.runelite.client.ui.ClientUI;
|
||||||
|
import sun.awt.ComponentFactory;
|
||||||
|
|
||||||
public class Flexo extends Robot {
|
public class Flexo extends Robot
|
||||||
|
{
|
||||||
public ThreadGroup flexoThreads = new ThreadGroup("flexo");
|
public ThreadGroup flexoThreads = new ThreadGroup("flexo");
|
||||||
public static boolean isActive;
|
public static boolean isActive;
|
||||||
public static double scale;
|
public static double scale;
|
||||||
public static Client client;
|
public static Client client;
|
||||||
public static ClientUI clientUI;
|
public static ClientUI clientUI;
|
||||||
public static int fixedWidth = 765;
|
public static int fixedWidth = Constants.GAME_FIXED_WIDTH;
|
||||||
public static int fixedHeight = 503;
|
public static int fixedHeight = Constants.GAME_FIXED_HEIGHT;
|
||||||
public static boolean isStretched;
|
public static boolean isStretched;
|
||||||
public static int minDelay = 45;
|
public static int minDelay = 45;
|
||||||
public static MouseMotionFactory currentMouseMotionFactory;
|
public static MouseMotionFactory currentMouseMotionFactory;
|
||||||
@@ -62,17 +68,21 @@ public class Flexo extends Robot {
|
|||||||
private Thread holdKeyThread;
|
private Thread holdKeyThread;
|
||||||
private RobotPeer peer;
|
private RobotPeer peer;
|
||||||
|
|
||||||
public Flexo() throws AWTException {
|
public Flexo() throws AWTException
|
||||||
if (GraphicsEnvironment.isHeadless()) {
|
{
|
||||||
|
if (GraphicsEnvironment.isHeadless())
|
||||||
|
{
|
||||||
throw new AWTException("headless environment");
|
throw new AWTException("headless environment");
|
||||||
}
|
}
|
||||||
init(GraphicsEnvironment.getLocalGraphicsEnvironment()
|
init(GraphicsEnvironment.getLocalGraphicsEnvironment()
|
||||||
.getDefaultScreenDevice());
|
.getDefaultScreenDevice());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init(GraphicsDevice screen) throws AWTException {
|
private void init(GraphicsDevice screen) throws AWTException
|
||||||
|
{
|
||||||
Toolkit toolkit = Toolkit.getDefaultToolkit();
|
Toolkit toolkit = Toolkit.getDefaultToolkit();
|
||||||
if (toolkit instanceof ComponentFactory) {
|
if (toolkit instanceof ComponentFactory)
|
||||||
|
{
|
||||||
peer = ((ComponentFactory) toolkit).createRobot(this, screen);
|
peer = ((ComponentFactory) toolkit).createRobot(this, screen);
|
||||||
RobotDisposer disposer = new RobotDisposer(peer);
|
RobotDisposer disposer = new RobotDisposer(peer);
|
||||||
sun.java2d.Disposer.addRecord(anchor, disposer);
|
sun.java2d.Disposer.addRecord(anchor, disposer);
|
||||||
@@ -81,24 +91,35 @@ public class Flexo extends Robot {
|
|||||||
|
|
||||||
private transient Object anchor = new Object();
|
private transient Object anchor = new Object();
|
||||||
|
|
||||||
static class RobotDisposer implements sun.java2d.DisposerRecord {
|
static class RobotDisposer implements sun.java2d.DisposerRecord
|
||||||
|
{
|
||||||
private final RobotPeer peer;
|
private final RobotPeer peer;
|
||||||
private RobotDisposer(RobotPeer peer) {
|
|
||||||
|
private RobotDisposer(RobotPeer peer)
|
||||||
|
{
|
||||||
this.peer = peer;
|
this.peer = peer;
|
||||||
}
|
}
|
||||||
public void dispose() {
|
|
||||||
if (peer != null) {
|
public void dispose()
|
||||||
|
{
|
||||||
|
if (peer != null)
|
||||||
|
{
|
||||||
peer.dispose();
|
peer.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void pauseMS(int delayMS) {
|
private void pauseMS(int delayMS)
|
||||||
|
{
|
||||||
long initialMS = System.currentTimeMillis();
|
long initialMS = System.currentTimeMillis();
|
||||||
while (System.currentTimeMillis()<initialMS+delayMS) {
|
while (System.currentTimeMillis() < initialMS + delayMS)
|
||||||
try {
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
Thread.sleep(10);
|
Thread.sleep(10);
|
||||||
} catch (Exception e) {
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,29 +127,39 @@ public class Flexo extends Robot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void mouseMove(int x, int y) {
|
public synchronized void mouseMove(int x, int y)
|
||||||
try {
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
//TODO: Must be better way to determine titlebar width
|
//TODO: Must be better way to determine titlebar width
|
||||||
currentMouseMotionFactory.build(ClientUI.frame.getX() + x + determineHorizontalOffset(), ClientUI.frame.getY() + y + determineVerticalOffset()).move();
|
currentMouseMotionFactory.build(ClientUI.frame.getX() + x + determineHorizontalOffset(), ClientUI.frame.getY() + y + determineVerticalOffset()).move();
|
||||||
this.delay(getMinDelay());
|
this.delay(getMinDelay());
|
||||||
} catch (InterruptedException e) {
|
}
|
||||||
|
catch (InterruptedException e)
|
||||||
|
{
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void mouseMove(Point p) {
|
public synchronized void mouseMove(Point p)
|
||||||
|
{
|
||||||
Point p2 = p;
|
Point p2 = p;
|
||||||
mouseMove((int) p.getX(), (int) p.getY());
|
mouseMove((int) p.getX(), (int) p.getY());
|
||||||
try {
|
try
|
||||||
|
{
|
||||||
Thread.sleep(150);
|
Thread.sleep(150);
|
||||||
} catch (InterruptedException e) {
|
}
|
||||||
|
catch (InterruptedException e)
|
||||||
|
{
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void mousePress(int buttonID) {
|
public synchronized void mousePress(int buttonID)
|
||||||
if (buttonID<1 || buttonID >5) {
|
{
|
||||||
|
if (buttonID < 1 || buttonID > 5)
|
||||||
|
{
|
||||||
Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5.");
|
Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -136,8 +167,10 @@ public class Flexo extends Robot {
|
|||||||
this.delay(getMinDelay());
|
this.delay(getMinDelay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void mousePressAndRelease(int buttonID) {
|
public synchronized void mousePressAndRelease(int buttonID)
|
||||||
if (buttonID<1 || buttonID >5) {
|
{
|
||||||
|
if (buttonID < 1 || buttonID > 5)
|
||||||
|
{
|
||||||
Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5.");
|
Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -148,11 +181,13 @@ public class Flexo extends Robot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Symbols are nut supported at this time
|
//TODO: Symbols are nut supported at this time
|
||||||
public synchronized void typeMessage(String message) {
|
public synchronized void typeMessage(String message)
|
||||||
|
{
|
||||||
|
|
||||||
Random r = new Random();
|
Random r = new Random();
|
||||||
char[] charArray = message.toCharArray();
|
char[] charArray = message.toCharArray();
|
||||||
for (char c : charArray) {
|
for (char c : charArray)
|
||||||
|
{
|
||||||
keyPress(KeyEvent.getExtendedKeyCodeForChar(c));
|
keyPress(KeyEvent.getExtendedKeyCodeForChar(c));
|
||||||
this.delay(93 + r.nextInt(getMinDelay()));
|
this.delay(93 + r.nextInt(getMinDelay()));
|
||||||
}
|
}
|
||||||
@@ -162,10 +197,11 @@ public class Flexo extends Robot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void mouseRelease(int buttonID) {
|
public synchronized void mouseRelease(int buttonID)
|
||||||
if (buttonID<1 || buttonID >5) {
|
{
|
||||||
|
if (buttonID < 1 || buttonID > 5)
|
||||||
|
{
|
||||||
Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5.");
|
Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -173,19 +209,25 @@ public class Flexo extends Robot {
|
|||||||
this.delay(getMinDelay());
|
this.delay(getMinDelay());
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getMinDelay() {
|
private int getMinDelay()
|
||||||
|
{
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
int random1 = random.nextInt(minDelay);
|
int random1 = random.nextInt(minDelay);
|
||||||
if (random1 < minDelay / 2)
|
if (random1 < minDelay / 2)
|
||||||
|
{
|
||||||
random1 = random.nextInt(minDelay / 2) + minDelay / 2 + random.nextInt(minDelay / 2);
|
random1 = random.nextInt(minDelay / 2) + minDelay / 2 + random.nextInt(minDelay / 2);
|
||||||
|
}
|
||||||
return random1;
|
return random1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getWheelDelay() {
|
private int getWheelDelay()
|
||||||
|
{
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
int random1 = random.nextInt(minDelay);
|
int random1 = random.nextInt(minDelay);
|
||||||
if (random1 < minDelay / 2)
|
if (random1 < minDelay / 2)
|
||||||
|
{
|
||||||
random1 = random.nextInt(minDelay / 2) + minDelay / 2 + random.nextInt(minDelay / 2);
|
random1 = random.nextInt(minDelay / 2) + minDelay / 2 + random.nextInt(minDelay / 2);
|
||||||
|
}
|
||||||
return random1;
|
return random1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,12 +237,13 @@ public class Flexo extends Robot {
|
|||||||
* @param wheelAmt number of "notches" to move the mouse wheel
|
* @param wheelAmt number of "notches" to move the mouse wheel
|
||||||
* Negative values indicate movement up/away from the user,
|
* Negative values indicate movement up/away from the user,
|
||||||
* positive values indicate movement down/towards the user.
|
* positive values indicate movement down/towards the user.
|
||||||
*
|
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public synchronized void mouseWheel(int wheelAmt) {
|
public synchronized void mouseWheel(int wheelAmt)
|
||||||
for (int i : new int[wheelAmt]) {
|
{
|
||||||
|
for (int i : new int[wheelAmt])
|
||||||
|
{
|
||||||
peer.mouseWheel(wheelAmt);
|
peer.mouseWheel(wheelAmt);
|
||||||
this.delay(getWheelDelay());
|
this.delay(getWheelDelay());
|
||||||
}
|
}
|
||||||
@@ -221,35 +264,47 @@ public class Flexo extends Robot {
|
|||||||
* @see java.awt.event.KeyEvent
|
* @see java.awt.event.KeyEvent
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public synchronized void keyPress(int keycode) {
|
public synchronized void keyPress(int keycode)
|
||||||
|
{
|
||||||
peer.keyPress(keycode);
|
peer.keyPress(keycode);
|
||||||
this.delay(getMinDelay());
|
this.delay(getMinDelay());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void keyRelease(int keycode) {
|
public synchronized void keyRelease(int keycode)
|
||||||
|
{
|
||||||
peer.keyRelease(keycode);
|
peer.keyRelease(keycode);
|
||||||
this.delay(getMinDelay());
|
this.delay(getMinDelay());
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void holdKey(int keycode, int timeMS) {
|
public synchronized void holdKey(int keycode, int timeMS)
|
||||||
new Thread(() -> {
|
{
|
||||||
|
new Thread(() ->
|
||||||
|
{
|
||||||
peer.keyPress(keycode);
|
peer.keyPress(keycode);
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
while ((startTime + timeMS) > System.currentTimeMillis()) { }
|
while ((startTime + timeMS) > System.currentTimeMillis())
|
||||||
|
{
|
||||||
|
}
|
||||||
peer.keyRelease(keycode);
|
peer.keyRelease(keycode);
|
||||||
this.delay(getMinDelay());
|
this.delay(getMinDelay());
|
||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void holdKeyIndefinitely(int keycode) {
|
public synchronized void holdKeyIndefinitely(int keycode)
|
||||||
holdKeyThread = new Thread(() -> {
|
{
|
||||||
|
holdKeyThread = new Thread(() ->
|
||||||
|
{
|
||||||
pausedIndefinitely = true;
|
pausedIndefinitely = true;
|
||||||
peer.keyPress(keycode);
|
peer.keyPress(keycode);
|
||||||
while (pausedIndefinitely) {
|
while (pausedIndefinitely)
|
||||||
try {
|
{
|
||||||
holdKeyThread.sleep(10);
|
try
|
||||||
} catch (InterruptedException e) {
|
{
|
||||||
|
Thread.sleep(10);
|
||||||
|
}
|
||||||
|
catch (InterruptedException e)
|
||||||
|
{
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -261,21 +316,25 @@ public class Flexo extends Robot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Color getPixelColor(int x, int y) {
|
public Color getPixelColor(int x, int y)
|
||||||
|
{
|
||||||
Color color = new Color(peer.getRGBPixel(x, y));
|
Color color = new Color(peer.getRGBPixel(x, y));
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delay(int ms) {
|
public void delay(int ms)
|
||||||
|
{
|
||||||
pauseMS(ms);
|
pauseMS(ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int determineHorizontalOffset() {
|
public int determineHorizontalOffset()
|
||||||
|
{
|
||||||
return clientUI.getCanvasOffset().getX();
|
return clientUI.getCanvasOffset().getX();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int determineVerticalOffset() {
|
public int determineVerticalOffset()
|
||||||
|
{
|
||||||
return clientUI.getCanvasOffset().getY();
|
return clientUI.getCanvasOffset().getY();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,45 +28,56 @@
|
|||||||
|
|
||||||
package net.runelite.client.flexo;
|
package net.runelite.client.flexo;
|
||||||
|
|
||||||
import net.runelite.client.ui.ClientUI;
|
import java.awt.Point;
|
||||||
|
import java.awt.Rectangle;
|
||||||
import java.awt.*;
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
import net.runelite.api.Constants;
|
||||||
|
import net.runelite.client.ui.ClientUI;
|
||||||
|
|
||||||
public class FlexoMouse {
|
public class FlexoMouse
|
||||||
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Should pass unstretched coords, handles all conversions here.
|
Should pass unstretched coords, handles all conversions here.
|
||||||
*/
|
*/
|
||||||
public static Point getClickPoint(Rectangle rect)
|
public static Point getClickPoint(Rectangle rect)
|
||||||
{
|
{
|
||||||
if (rect!=null) {
|
if (rect != null)
|
||||||
|
{
|
||||||
Random r = new Random();
|
Random r = new Random();
|
||||||
int x = -1;
|
int x = -1;
|
||||||
int y = -1;
|
int y = -1;
|
||||||
x = rect.x + r.nextInt(rect.width);
|
x = rect.x + r.nextInt(rect.width);
|
||||||
y = rect.y + r.nextInt(rect.height);
|
y = rect.y + r.nextInt(rect.height);
|
||||||
|
|
||||||
if (Flexo.isStretched) {
|
if (Flexo.isStretched)
|
||||||
|
{
|
||||||
double wScale;
|
double wScale;
|
||||||
double hScale;
|
double hScale;
|
||||||
|
|
||||||
if (Flexo.client.isResized()) {
|
if (Flexo.client.isResized())
|
||||||
wScale = (Flexo.client.getStretchedDimensions().width / Flexo.client.getRealDimensions().width);
|
{
|
||||||
hScale = (Flexo.client.getStretchedDimensions().height / Flexo.client.getRealDimensions().height);
|
wScale = (Flexo.client.getStretchedDimensions().width / (double) Flexo.client.getRealDimensions().width);
|
||||||
|
hScale = (Flexo.client.getStretchedDimensions().height / (double) Flexo.client.getRealDimensions().height);
|
||||||
int newX = (int) (x * wScale);
|
int newX = (int) (x * wScale);
|
||||||
int newY = (int) (y * hScale);
|
int newY = (int) (y * hScale);
|
||||||
if (newX>0 && newX< ClientUI.frame.getWidth()) {
|
if (newX > 0 && newX < ClientUI.frame.getWidth())
|
||||||
if (newY>0 && newY< ClientUI.frame.getHeight()) {
|
{
|
||||||
|
if (newY > 0 && newY < ClientUI.frame.getHeight())
|
||||||
|
{
|
||||||
return new Point(newX, newY);
|
return new Point(newX, newY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Logger.getAnonymousLogger().warning("[RuneLit]Flexo - Off screen point attempted. Split the step, or rotate the screen.");
|
Logger.getAnonymousLogger().warning("[RuneLit]Flexo - Off screen point attempted. Split the step, or rotate the screen.");
|
||||||
return null;
|
return null;
|
||||||
} else {
|
}
|
||||||
if (x>0 && x< ClientUI.frame.getWidth()) {
|
else
|
||||||
if (y>0 && y< ClientUI.frame.getHeight()) {
|
{
|
||||||
|
if (x > 0 && x < ClientUI.frame.getWidth())
|
||||||
|
{
|
||||||
|
if (y > 0 && y < ClientUI.frame.getHeight())
|
||||||
|
{
|
||||||
return new Point(x, y);
|
return new Point(x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -74,28 +85,38 @@ public class FlexoMouse {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (!Flexo.client.isResized()) {
|
}
|
||||||
int fixedWidth = 765;
|
else if (!Flexo.client.isResized())
|
||||||
|
{
|
||||||
|
final int fixedWidth = Constants.GAME_FIXED_WIDTH;
|
||||||
int widthDif = ClientUI.frame.getWidth();
|
int widthDif = ClientUI.frame.getWidth();
|
||||||
|
|
||||||
if (ClientUI.pluginToolbar.isVisible()) {
|
if (ClientUI.pluginToolbar.isVisible())
|
||||||
|
{
|
||||||
widthDif -= ClientUI.pluginToolbar.getWidth();
|
widthDif -= ClientUI.pluginToolbar.getWidth();
|
||||||
}
|
}
|
||||||
if (ClientUI.pluginPanel != null)
|
if (ClientUI.pluginPanel != null)
|
||||||
|
{
|
||||||
widthDif -= ClientUI.pluginPanel.getWidth();
|
widthDif -= ClientUI.pluginPanel.getWidth();
|
||||||
|
}
|
||||||
|
|
||||||
widthDif -= fixedWidth;
|
widthDif -= fixedWidth;
|
||||||
if (x+(widthDif/2)>0 && x+(widthDif/2)< ClientUI.frame.getWidth()) {
|
if (x + (widthDif / 2) > 0 && x + (widthDif / 2) < ClientUI.frame.getWidth())
|
||||||
if (y>0 && y< ClientUI.frame.getHeight()) {
|
{
|
||||||
|
if (y > 0 && y < ClientUI.frame.getHeight())
|
||||||
|
{
|
||||||
return new Point(x, y);
|
return new Point(x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Logger.getAnonymousLogger().warning("[RuneLit]Flexo - Off screen point attempted. Split the step, or rotate the screen.");
|
Logger.getAnonymousLogger().warning("[RuneLit]Flexo - Off screen point attempted. Split the step, or rotate the screen.");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
if (x>0 && x< ClientUI.frame.getWidth()) {
|
{
|
||||||
if (y>0 && y< ClientUI.frame.getHeight()) {
|
if (x > 0 && x < ClientUI.frame.getWidth())
|
||||||
|
{
|
||||||
|
if (y > 0 && y < ClientUI.frame.getHeight())
|
||||||
|
{
|
||||||
return new Point(x, y);
|
return new Point(x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -113,12 +134,15 @@ public class FlexoMouse {
|
|||||||
double wScale;
|
double wScale;
|
||||||
double hScale;
|
double hScale;
|
||||||
|
|
||||||
if (Flexo.client.isResized()) {
|
if (Flexo.client.isResized())
|
||||||
wScale = (Flexo.client.getStretchedDimensions().width / Flexo.client.getRealDimensions().width);
|
{
|
||||||
hScale = (Flexo.client.getStretchedDimensions().height / Flexo.client.getRealDimensions().height);
|
wScale = (Flexo.client.getStretchedDimensions().width / (double) Flexo.client.getRealDimensions().width);
|
||||||
} else {
|
hScale = (Flexo.client.getStretchedDimensions().height / (double) Flexo.client.getRealDimensions().height);
|
||||||
wScale = ((double) Flexo.client.getStretchedDimensions().width) / Flexo.fixedWidth;
|
}
|
||||||
hScale = ((double) Flexo.client.getStretchedDimensions().height) / Flexo.fixedHeight;
|
else
|
||||||
|
{
|
||||||
|
wScale = (Flexo.client.getStretchedDimensions().width) / (double) Flexo.fixedWidth;
|
||||||
|
hScale = (Flexo.client.getStretchedDimensions().height) / (double) Flexo.fixedHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
int xPadding = (int) rect.getWidth() / 5;
|
int xPadding = (int) rect.getWidth() / 5;
|
||||||
@@ -129,29 +153,37 @@ public class FlexoMouse {
|
|||||||
clickRect.height = rect.height - yPadding * 2;
|
clickRect.height = rect.height - yPadding * 2;
|
||||||
clickRect.x = rect.x + xPadding;
|
clickRect.x = rect.x + xPadding;
|
||||||
clickRect.y = rect.y + yPadding;
|
clickRect.y = rect.y + yPadding;
|
||||||
if (clickRect.width>0&&clickRect.height>0) {
|
if (clickRect.width > 0 && clickRect.height > 0)
|
||||||
|
{
|
||||||
int x = clickRect.x + r.nextInt(clickRect.width);
|
int x = clickRect.x + r.nextInt(clickRect.width);
|
||||||
int y = clickRect.y + r.nextInt(clickRect.height);
|
int y = clickRect.y + r.nextInt(clickRect.height);
|
||||||
double tScale = 1 + (Flexo.scale / 100);
|
double tScale = 1 + (Flexo.scale / 100);
|
||||||
|
|
||||||
if (Flexo.client.isResized()) {
|
if (Flexo.client.isResized())
|
||||||
|
{
|
||||||
return new Rectangle((int) (clickRect.x * wScale), (int) (clickRect.y * wScale), (int) (clickRect.width * wScale), (int) (clickRect.getHeight() * hScale));
|
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()));
|
else
|
||||||
|
{
|
||||||
|
return new Rectangle(clickRect.x, clickRect.y, clickRect.width, (int) (clickRect.getHeight()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//Fixed, not stretched
|
//Fixed, not stretched
|
||||||
else if (!Flexo.client.isResized()) {
|
else if (!Flexo.client.isResized())
|
||||||
|
{
|
||||||
int fixedWidth = 765;
|
int fixedWidth = 765;
|
||||||
int widthDif = ClientUI.frame.getWidth();
|
int widthDif = ClientUI.frame.getWidth();
|
||||||
|
|
||||||
if (ClientUI.pluginToolbar.isVisible()) {
|
if (ClientUI.pluginToolbar.isVisible())
|
||||||
|
{
|
||||||
widthDif -= ClientUI.pluginToolbar.getWidth();
|
widthDif -= ClientUI.pluginToolbar.getWidth();
|
||||||
}
|
}
|
||||||
if (ClientUI.pluginPanel != null)
|
if (ClientUI.pluginPanel != null)
|
||||||
|
{
|
||||||
widthDif -= ClientUI.pluginPanel.getWidth();
|
widthDif -= ClientUI.pluginPanel.getWidth();
|
||||||
|
}
|
||||||
|
|
||||||
widthDif -= fixedWidth;
|
widthDif -= fixedWidth;
|
||||||
int xPadding = (int) rect.getWidth() / 5;
|
int xPadding = (int) rect.getWidth() / 5;
|
||||||
@@ -162,14 +194,16 @@ public class FlexoMouse {
|
|||||||
clickRect.height = rect.height - yPadding;
|
clickRect.height = rect.height - yPadding;
|
||||||
clickRect.x = rect.x + xPadding;
|
clickRect.x = rect.x + xPadding;
|
||||||
clickRect.y = rect.y + yPadding;
|
clickRect.y = rect.y + yPadding;
|
||||||
if (clickRect.height>0&&clickRect.width>0) {
|
if (clickRect.height > 0 && clickRect.width > 0)
|
||||||
|
{
|
||||||
int x = clickRect.x + r.nextInt(clickRect.width);
|
int x = clickRect.x + r.nextInt(clickRect.width);
|
||||||
int y = clickRect.y + r.nextInt(clickRect.height);
|
int y = clickRect.y + r.nextInt(clickRect.height);
|
||||||
return new Rectangle((int) (clickRect.x), (int) (clickRect.y), (int) (clickRect.width), (int) (clickRect.getHeight()));
|
return new Rectangle(clickRect.x, clickRect.y, clickRect.width, (int) (clickRect.getHeight()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Resizable, not stretched
|
//Resizable, not stretched
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
int xPadding = (int) rect.getWidth() / 5;
|
int xPadding = (int) rect.getWidth() / 5;
|
||||||
int yPadding = (int) rect.getHeight() / 5;
|
int yPadding = (int) rect.getHeight() / 5;
|
||||||
Random r = new Random();
|
Random r = new Random();
|
||||||
@@ -178,10 +212,11 @@ public class FlexoMouse {
|
|||||||
clickRect.height = rect.height - yPadding * 2;
|
clickRect.height = rect.height - yPadding * 2;
|
||||||
clickRect.x = rect.x + xPadding;
|
clickRect.x = rect.x + xPadding;
|
||||||
clickRect.y = rect.y + yPadding;
|
clickRect.y = rect.y + yPadding;
|
||||||
if (clickRect.height>0&&clickRect.width>0) {
|
if (clickRect.height > 0 && clickRect.width > 0)
|
||||||
|
{
|
||||||
int x = clickRect.x + r.nextInt(clickRect.width);
|
int x = clickRect.x + r.nextInt(clickRect.width);
|
||||||
int y = clickRect.y + r.nextInt(clickRect.height);
|
int y = clickRect.y + r.nextInt(clickRect.height);
|
||||||
return new Rectangle((int)(clickRect.x), (int)(clickRect.y), (int)(clickRect.width), (int)(clickRect.getHeight()));
|
return new Rectangle(clickRect.x, clickRect.y, clickRect.width, (int) (clickRect.getHeight()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,8 +26,212 @@
|
|||||||
package net.runelite.client.game;
|
package net.runelite.client.game;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import static net.runelite.api.NullObjectID.*;
|
import static net.runelite.api.NullObjectID.NULL_25337;
|
||||||
import static net.runelite.api.ObjectID.*;
|
import static net.runelite.api.NullObjectID.NULL_26371;
|
||||||
|
import static net.runelite.api.NullObjectID.NULL_26375;
|
||||||
|
import static net.runelite.api.NullObjectID.NULL_26884;
|
||||||
|
import static net.runelite.api.NullObjectID.NULL_26886;
|
||||||
|
import static net.runelite.api.NullObjectID.NULL_29868;
|
||||||
|
import static net.runelite.api.NullObjectID.NULL_29869;
|
||||||
|
import static net.runelite.api.NullObjectID.NULL_29870;
|
||||||
|
import static net.runelite.api.NullObjectID.NULL_31823;
|
||||||
|
import static net.runelite.api.NullObjectID.NULL_31849;
|
||||||
|
import static net.runelite.api.NullObjectID.NULL_33327;
|
||||||
|
import static net.runelite.api.NullObjectID.NULL_33328;
|
||||||
|
import static net.runelite.api.ObjectID.A_WOODEN_LOG;
|
||||||
|
import static net.runelite.api.ObjectID.BALANCING_LEDGE_23548;
|
||||||
|
import static net.runelite.api.ObjectID.BIG_WINDOW;
|
||||||
|
import static net.runelite.api.ObjectID.BOULDER_27990;
|
||||||
|
import static net.runelite.api.ObjectID.BROKEN_FENCE;
|
||||||
|
import static net.runelite.api.ObjectID.BROKEN_FENCE_2618;
|
||||||
|
import static net.runelite.api.ObjectID.BROKEN_RAFT;
|
||||||
|
import static net.runelite.api.ObjectID.BROKEN_WALL_33344;
|
||||||
|
import static net.runelite.api.ObjectID.CASTLE_WALL;
|
||||||
|
import static net.runelite.api.ObjectID.CLIMBING_ROCKS;
|
||||||
|
import static net.runelite.api.ObjectID.CLIMBING_ROCKS_11948;
|
||||||
|
import static net.runelite.api.ObjectID.CLIMBING_ROCKS_11949;
|
||||||
|
import static net.runelite.api.ObjectID.CREVICE_16465;
|
||||||
|
import static net.runelite.api.ObjectID.CREVICE_16539;
|
||||||
|
import static net.runelite.api.ObjectID.CREVICE_16543;
|
||||||
|
import static net.runelite.api.ObjectID.CREVICE_19043;
|
||||||
|
import static net.runelite.api.ObjectID.CREVICE_30198;
|
||||||
|
import static net.runelite.api.ObjectID.CREVICE_9739;
|
||||||
|
import static net.runelite.api.ObjectID.CREVICE_9740;
|
||||||
|
import static net.runelite.api.ObjectID.CROSSBOW_TREE_17062;
|
||||||
|
import static net.runelite.api.ObjectID.CRUMBLING_WALL_24222;
|
||||||
|
import static net.runelite.api.ObjectID.DARK_TUNNEL_10047;
|
||||||
|
import static net.runelite.api.ObjectID.DENSE_FOREST;
|
||||||
|
import static net.runelite.api.ObjectID.DENSE_FOREST_3938;
|
||||||
|
import static net.runelite.api.ObjectID.DENSE_FOREST_3939;
|
||||||
|
import static net.runelite.api.ObjectID.DENSE_FOREST_3998;
|
||||||
|
import static net.runelite.api.ObjectID.DENSE_FOREST_3999;
|
||||||
|
import static net.runelite.api.ObjectID.FALLEN_TREE_33192;
|
||||||
|
import static net.runelite.api.ObjectID.FENCE_16518;
|
||||||
|
import static net.runelite.api.ObjectID.GAP;
|
||||||
|
import static net.runelite.api.ObjectID.GAP_2831;
|
||||||
|
import static net.runelite.api.ObjectID.GAP_29326;
|
||||||
|
import static net.runelite.api.ObjectID.HOLE_16520;
|
||||||
|
import static net.runelite.api.ObjectID.HOLE_30966;
|
||||||
|
import static net.runelite.api.ObjectID.HOLE_31481;
|
||||||
|
import static net.runelite.api.ObjectID.HOLE_31482;
|
||||||
|
import static net.runelite.api.ObjectID.ICE_CHUNKS_31822;
|
||||||
|
import static net.runelite.api.ObjectID.ICE_CHUNKS_31990;
|
||||||
|
import static net.runelite.api.ObjectID.JUTTING_WALL_17002;
|
||||||
|
import static net.runelite.api.ObjectID.LADDER_30938;
|
||||||
|
import static net.runelite.api.ObjectID.LADDER_30939;
|
||||||
|
import static net.runelite.api.ObjectID.LADDER_30940;
|
||||||
|
import static net.runelite.api.ObjectID.LADDER_30941;
|
||||||
|
import static net.runelite.api.ObjectID.LEAVES;
|
||||||
|
import static net.runelite.api.ObjectID.LEAVES_3924;
|
||||||
|
import static net.runelite.api.ObjectID.LEAVES_3925;
|
||||||
|
import static net.runelite.api.ObjectID.LEDGE_33190;
|
||||||
|
import static net.runelite.api.ObjectID.LITTLE_BOULDER;
|
||||||
|
import static net.runelite.api.ObjectID.LOG_BALANCE_16540;
|
||||||
|
import static net.runelite.api.ObjectID.LOG_BALANCE_16541;
|
||||||
|
import static net.runelite.api.ObjectID.LOG_BALANCE_16542;
|
||||||
|
import static net.runelite.api.ObjectID.LOG_BALANCE_16546;
|
||||||
|
import static net.runelite.api.ObjectID.LOG_BALANCE_16547;
|
||||||
|
import static net.runelite.api.ObjectID.LOG_BALANCE_16548;
|
||||||
|
import static net.runelite.api.ObjectID.LOG_BALANCE_20882;
|
||||||
|
import static net.runelite.api.ObjectID.LOG_BALANCE_20884;
|
||||||
|
import static net.runelite.api.ObjectID.LOG_BALANCE_23274;
|
||||||
|
import static net.runelite.api.ObjectID.LOG_BALANCE_3929;
|
||||||
|
import static net.runelite.api.ObjectID.LOG_BALANCE_3930;
|
||||||
|
import static net.runelite.api.ObjectID.LOG_BALANCE_3931;
|
||||||
|
import static net.runelite.api.ObjectID.LOG_BALANCE_3932;
|
||||||
|
import static net.runelite.api.ObjectID.LOG_BALANCE_3933;
|
||||||
|
import static net.runelite.api.ObjectID.LOOSE_RAILING;
|
||||||
|
import static net.runelite.api.ObjectID.LOOSE_RAILING_2186;
|
||||||
|
import static net.runelite.api.ObjectID.LOOSE_RAILING_28849;
|
||||||
|
import static net.runelite.api.ObjectID.LOW_FENCE;
|
||||||
|
import static net.runelite.api.ObjectID.MONKEYBARS_23566;
|
||||||
|
import static net.runelite.api.ObjectID.MONKEYBARS_23567;
|
||||||
|
import static net.runelite.api.ObjectID.MYSTERIOUS_PIPE;
|
||||||
|
import static net.runelite.api.ObjectID.OBSTACLE;
|
||||||
|
import static net.runelite.api.ObjectID.OBSTACLE_30767;
|
||||||
|
import static net.runelite.api.ObjectID.OBSTACLE_30962;
|
||||||
|
import static net.runelite.api.ObjectID.OBSTACLE_30964;
|
||||||
|
import static net.runelite.api.ObjectID.OBSTACLE_PIPE_16509;
|
||||||
|
import static net.runelite.api.ObjectID.OBSTACLE_PIPE_16511;
|
||||||
|
import static net.runelite.api.ObjectID.OBSTACLE_PIPE_23140;
|
||||||
|
import static net.runelite.api.ObjectID.ORNATE_RAILING;
|
||||||
|
import static net.runelite.api.ObjectID.ORNATE_RAILING_17000;
|
||||||
|
import static net.runelite.api.ObjectID.PILE_OF_RUBBLE_23563;
|
||||||
|
import static net.runelite.api.ObjectID.PILE_OF_RUBBLE_23564;
|
||||||
|
import static net.runelite.api.ObjectID.PILLAR_31561;
|
||||||
|
import static net.runelite.api.ObjectID.PILLAR_31809;
|
||||||
|
import static net.runelite.api.ObjectID.PIPE_21727;
|
||||||
|
import static net.runelite.api.ObjectID.PIPE_21728;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKSLIDE_33184;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKSLIDE_33185;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKSLIDE_33191;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_14106;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_16464;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_16514;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_16515;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_16521;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_16522;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_16523;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_16524;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_16534;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_16535;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_16545;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_16549;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_16550;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_16998;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_16999;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_17042;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_19849;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_2231;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_27984;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_27985;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_27987;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_27988;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_31757;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_31758;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_31759;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_34396;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_34397;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_34741;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_3748;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_3790;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_3791;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_3803;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_3804;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_6673;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26400;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26401;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26402;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26404;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26405;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26406;
|
||||||
|
import static net.runelite.api.ObjectID.ROCK_16115;
|
||||||
|
import static net.runelite.api.ObjectID.ROPESWING_23568;
|
||||||
|
import static net.runelite.api.ObjectID.ROPESWING_23569;
|
||||||
|
import static net.runelite.api.ObjectID.ROPE_ANCHOR;
|
||||||
|
import static net.runelite.api.ObjectID.ROPE_ANCHOR_30917;
|
||||||
|
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21306;
|
||||||
|
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21307;
|
||||||
|
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21308;
|
||||||
|
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21309;
|
||||||
|
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21310;
|
||||||
|
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21311;
|
||||||
|
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21312;
|
||||||
|
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21313;
|
||||||
|
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21314;
|
||||||
|
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21315;
|
||||||
|
import static net.runelite.api.ObjectID.RUBBER_CAP_MUSHROOM;
|
||||||
|
import static net.runelite.api.ObjectID.SPIKEY_CHAIN;
|
||||||
|
import static net.runelite.api.ObjectID.SPIKEY_CHAIN_16538;
|
||||||
|
import static net.runelite.api.ObjectID.STAIRS_31485;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONES;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONES_23646;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONES_23647;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_10663;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_11768;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_13504;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_14917;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_14918;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_16466;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_16513;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_16533;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_19040;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_19042;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_21738;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_21739;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_29728;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_29729;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_29730;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_5948;
|
||||||
|
import static net.runelite.api.ObjectID.STEPPING_STONE_5949;
|
||||||
|
import static net.runelite.api.ObjectID.STEPS;
|
||||||
|
import static net.runelite.api.ObjectID.STEPS_29993;
|
||||||
|
import static net.runelite.api.ObjectID.STICKS;
|
||||||
|
import static net.runelite.api.ObjectID.STILE;
|
||||||
|
import static net.runelite.api.ObjectID.STILE_12982;
|
||||||
|
import static net.runelite.api.ObjectID.STRANGE_FLOOR;
|
||||||
|
import static net.runelite.api.ObjectID.STRANGE_FLOOR_16544;
|
||||||
|
import static net.runelite.api.ObjectID.STRONG_TREE_17074;
|
||||||
|
import static net.runelite.api.ObjectID.TIGHTGAP;
|
||||||
|
import static net.runelite.api.ObjectID.TRELLIS_20056;
|
||||||
|
import static net.runelite.api.ObjectID.TRIPWIRE;
|
||||||
|
import static net.runelite.api.ObjectID.TUNNEL_30174;
|
||||||
|
import static net.runelite.api.ObjectID.TUNNEL_30175;
|
||||||
|
import static net.runelite.api.ObjectID.TUNNEL_30959;
|
||||||
|
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL;
|
||||||
|
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL_16528;
|
||||||
|
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL_16529;
|
||||||
|
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL_16530;
|
||||||
|
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL_19032;
|
||||||
|
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL_19036;
|
||||||
|
import static net.runelite.api.ObjectID.VINE_26880;
|
||||||
|
import static net.runelite.api.ObjectID.VINE_26882;
|
||||||
|
import static net.runelite.api.ObjectID.WALL_17047;
|
||||||
|
import static net.runelite.api.ObjectID.WALL_17049;
|
||||||
|
import static net.runelite.api.ObjectID.WALL_17050;
|
||||||
|
import static net.runelite.api.ObjectID.WEATHERED_WALL;
|
||||||
|
import static net.runelite.api.ObjectID.WEATHERED_WALL_16526;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import javax.swing.JLabel;
|
|||||||
public class AsyncBufferedImage extends BufferedImage
|
public class AsyncBufferedImage extends BufferedImage
|
||||||
{
|
{
|
||||||
private final List<Runnable> listeners = new CopyOnWriteArrayList<>();
|
private final List<Runnable> listeners = new CopyOnWriteArrayList<>();
|
||||||
|
|
||||||
public AsyncBufferedImage(int width, int height, int imageType)
|
public AsyncBufferedImage(int width, int height, int imageType)
|
||||||
{
|
{
|
||||||
super(width, height, imageType);
|
super(width, height, imageType);
|
||||||
|
|||||||
@@ -48,7 +48,116 @@ import static net.runelite.api.Constants.CLIENT_DEFAULT_ZOOM;
|
|||||||
import net.runelite.api.GameState;
|
import net.runelite.api.GameState;
|
||||||
import net.runelite.api.ItemComposition;
|
import net.runelite.api.ItemComposition;
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
import static net.runelite.api.ItemID.*;
|
import static net.runelite.api.ItemID.AGILITY_CAPE;
|
||||||
|
import static net.runelite.api.ItemID.AGILITY_CAPET;
|
||||||
|
import static net.runelite.api.ItemID.AGILITY_CAPET_13341;
|
||||||
|
import static net.runelite.api.ItemID.AGILITY_CAPE_13340;
|
||||||
|
import static net.runelite.api.ItemID.BOOTS_OF_LIGHTNESS;
|
||||||
|
import static net.runelite.api.ItemID.BOOTS_OF_LIGHTNESS_89;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_BOOTS;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_11861;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13589;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13590;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13601;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13602;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13613;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13614;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13625;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13626;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13637;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13638;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13677;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13678;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_21076;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_21078;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_CAPE;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_CAPE_11853;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13581;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13582;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13593;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13594;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13605;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13606;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13617;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13618;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13629;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13630;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13669;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13670;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_CAPE_21064;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_CAPE_21066;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_GLOVES;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_11859;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13587;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13588;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13599;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13600;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13611;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13612;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13623;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13624;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13635;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13636;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13675;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13676;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_21073;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_21075;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_HOOD;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_HOOD_11851;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13579;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13580;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13591;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13592;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13603;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13604;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13615;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13616;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13627;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13628;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13667;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13668;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_HOOD_21061;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_HOOD_21063;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_LEGS;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_LEGS_11857;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13585;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13586;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13597;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13598;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13609;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13610;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13621;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13622;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13633;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13634;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13673;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13674;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_LEGS_21070;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_LEGS_21072;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_TOP;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_TOP_11855;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_TOP_13583;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_TOP_13584;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_TOP_13595;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_TOP_13596;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_TOP_13607;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_TOP_13608;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_TOP_13619;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_TOP_13620;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_TOP_13631;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_TOP_13632;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_TOP_13671;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_TOP_13672;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_TOP_21067;
|
||||||
|
import static net.runelite.api.ItemID.GRACEFUL_TOP_21069;
|
||||||
|
import static net.runelite.api.ItemID.MAX_CAPE;
|
||||||
|
import static net.runelite.api.ItemID.MAX_CAPE_13342;
|
||||||
|
import static net.runelite.api.ItemID.PENANCE_GLOVES;
|
||||||
|
import static net.runelite.api.ItemID.PENANCE_GLOVES_10554;
|
||||||
|
import static net.runelite.api.ItemID.SPOTTED_CAPE;
|
||||||
|
import static net.runelite.api.ItemID.SPOTTED_CAPE_10073;
|
||||||
|
import static net.runelite.api.ItemID.SPOTTIER_CAPE;
|
||||||
|
import static net.runelite.api.ItemID.SPOTTIER_CAPE_10074;
|
||||||
import net.runelite.api.SpritePixels;
|
import net.runelite.api.SpritePixels;
|
||||||
import net.runelite.api.events.GameStateChanged;
|
import net.runelite.api.events.GameStateChanged;
|
||||||
import net.runelite.api.events.PostItemComposition;
|
import net.runelite.api.events.PostItemComposition;
|
||||||
@@ -258,6 +367,7 @@ public class ItemManager
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Invalidates internal item manager item composition cache (but not client item composition cache)
|
* Invalidates internal item manager item composition cache (but not client item composition cache)
|
||||||
|
*
|
||||||
* @see Client#getItemCompositionCache()
|
* @see Client#getItemCompositionCache()
|
||||||
*/
|
*/
|
||||||
public void invalidateItemCompositionCache()
|
public void invalidateItemCompositionCache()
|
||||||
@@ -303,6 +413,7 @@ public class ItemManager
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Look up an item's stats
|
* Look up an item's stats
|
||||||
|
*
|
||||||
* @param itemId item id
|
* @param itemId item id
|
||||||
* @return item stats
|
* @return item stats
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -29,7 +29,411 @@ import com.google.common.collect.HashMultimap;
|
|||||||
import com.google.common.collect.Multimap;
|
import com.google.common.collect.Multimap;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import static net.runelite.api.ItemID.*;
|
import static net.runelite.api.ItemID.ABYSSAL_TENTACLE;
|
||||||
|
import static net.runelite.api.ItemID.ABYSSAL_WHIP;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_HOOD;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_HOOD_100;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_HOOD_25;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_HOOD_50;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_HOOD_75;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT_100;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT_25;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT_50;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT_75;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_ROBETOP;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_ROBETOP_100;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_ROBETOP_25;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_ROBETOP_50;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_ROBETOP_75;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_STAFF;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_STAFF_100;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_STAFF_25;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_STAFF_50;
|
||||||
|
import static net.runelite.api.ItemID.AHRIMS_STAFF_75;
|
||||||
|
import static net.runelite.api.ItemID.AMULET_OF_FURY;
|
||||||
|
import static net.runelite.api.ItemID.AMULET_OF_FURY_OR;
|
||||||
|
import static net.runelite.api.ItemID.AMULET_OF_GLORY;
|
||||||
|
import static net.runelite.api.ItemID.AMULET_OF_GLORY1;
|
||||||
|
import static net.runelite.api.ItemID.AMULET_OF_GLORY2;
|
||||||
|
import static net.runelite.api.ItemID.AMULET_OF_GLORY3;
|
||||||
|
import static net.runelite.api.ItemID.AMULET_OF_GLORY5;
|
||||||
|
import static net.runelite.api.ItemID.AMULET_OF_GLORY_T;
|
||||||
|
import static net.runelite.api.ItemID.AMULET_OF_GLORY_T1;
|
||||||
|
import static net.runelite.api.ItemID.AMULET_OF_GLORY_T2;
|
||||||
|
import static net.runelite.api.ItemID.AMULET_OF_GLORY_T3;
|
||||||
|
import static net.runelite.api.ItemID.AMULET_OF_GLORY_T5;
|
||||||
|
import static net.runelite.api.ItemID.AMULET_OF_TORTURE;
|
||||||
|
import static net.runelite.api.ItemID.AMULET_OF_TORTURE_OR;
|
||||||
|
import static net.runelite.api.ItemID.ANCIENT_WYVERN_SHIELD;
|
||||||
|
import static net.runelite.api.ItemID.ANCIENT_WYVERN_SHIELD_21634;
|
||||||
|
import static net.runelite.api.ItemID.ANGUISH_ORNAMENT_KIT;
|
||||||
|
import static net.runelite.api.ItemID.ARCHERS_RING;
|
||||||
|
import static net.runelite.api.ItemID.ARCHERS_RING_I;
|
||||||
|
import static net.runelite.api.ItemID.ARMADYL_GODSWORD;
|
||||||
|
import static net.runelite.api.ItemID.ARMADYL_GODSWORD_OR;
|
||||||
|
import static net.runelite.api.ItemID.ARMADYL_GODSWORD_ORNAMENT_KIT;
|
||||||
|
import static net.runelite.api.ItemID.BANDOS_GODSWORD;
|
||||||
|
import static net.runelite.api.ItemID.BANDOS_GODSWORD_OR;
|
||||||
|
import static net.runelite.api.ItemID.BANDOS_GODSWORD_ORNAMENT_KIT;
|
||||||
|
import static net.runelite.api.ItemID.BERSERKER_RING;
|
||||||
|
import static net.runelite.api.ItemID.BERSERKER_RING_I;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_1;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_10_I;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_1_I;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_2;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_2_I;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_3;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_3_I;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_4;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_4_I;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_5;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_5_I;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_6;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_6_I;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_7;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_7_I;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_8;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_8_I;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_9;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_9_I;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_MASK_I;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_SLAYER_HELMET;
|
||||||
|
import static net.runelite.api.ItemID.BLACK_SLAYER_HELMET_I;
|
||||||
|
import static net.runelite.api.ItemID.BONECRUSHER_NECKLACE;
|
||||||
|
import static net.runelite.api.ItemID.BOTTOMLESS_COMPOST_BUCKET;
|
||||||
|
import static net.runelite.api.ItemID.BOTTOMLESS_COMPOST_BUCKET_22997;
|
||||||
|
import static net.runelite.api.ItemID.CRAWS_BOW;
|
||||||
|
import static net.runelite.api.ItemID.CRAWS_BOW_U;
|
||||||
|
import static net.runelite.api.ItemID.DARK_BOW;
|
||||||
|
import static net.runelite.api.ItemID.DARK_BOW_12765;
|
||||||
|
import static net.runelite.api.ItemID.DARK_BOW_12766;
|
||||||
|
import static net.runelite.api.ItemID.DARK_BOW_12767;
|
||||||
|
import static net.runelite.api.ItemID.DARK_BOW_12768;
|
||||||
|
import static net.runelite.api.ItemID.DARK_BOW_20408;
|
||||||
|
import static net.runelite.api.ItemID.DARK_INFINITY_BOTTOMS;
|
||||||
|
import static net.runelite.api.ItemID.DARK_INFINITY_COLOUR_KIT;
|
||||||
|
import static net.runelite.api.ItemID.DARK_INFINITY_HAT;
|
||||||
|
import static net.runelite.api.ItemID.DARK_INFINITY_TOP;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_GREATAXE;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_GREATAXE_100;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_GREATAXE_25;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_GREATAXE_50;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_GREATAXE_75;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_HELM;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_HELM_100;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_HELM_25;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_HELM_50;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_HELM_75;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY_100;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY_25;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY_50;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY_75;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS_100;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS_25;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS_50;
|
||||||
|
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS_75;
|
||||||
|
import static net.runelite.api.ItemID.DRAGONBONE_NECKLACE;
|
||||||
|
import static net.runelite.api.ItemID.DRAGONFIRE_SHIELD;
|
||||||
|
import static net.runelite.api.ItemID.DRAGONFIRE_SHIELD_11284;
|
||||||
|
import static net.runelite.api.ItemID.DRAGONFIRE_WARD;
|
||||||
|
import static net.runelite.api.ItemID.DRAGONFIRE_WARD_22003;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_BOOTS;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_BOOTS_G;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_BOOTS_ORNAMENT_KIT;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_CHAINBODY_3140;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_CHAINBODY_G;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_CHAINBODY_ORNAMENT_KIT;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_DEFENDER_ORNAMENT_KIT;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_DEFENDER_T;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_FULL_HELM;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_FULL_HELM_G;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_FULL_HELM_ORNAMENT_KIT;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_KITESHIELD;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_KITESHIELD_G;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_KITESHIELD_ORNAMENT_KIT;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_LEGSSKIRT_ORNAMENT_KIT;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_PICKAXE;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_PICKAXE_12797;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_PLATEBODY;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_PLATEBODY_G;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_PLATEBODY_ORNAMENT_KIT;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_PLATELEGS;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_PLATELEGS_G;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_PLATESKIRT;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_PLATESKIRT_G;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_SCIMITAR;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_SCIMITAR_OR;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_SCIMITAR_ORNAMENT_KIT;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_SQ_SHIELD;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_SQ_SHIELD_G;
|
||||||
|
import static net.runelite.api.ItemID.DRAGON_SQ_SHIELD_ORNAMENT_KIT;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_ABYSSAL_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_ABYSSAL_HEAD_13508;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_AVIANSIE_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_AVIANSIE_HEAD_13505;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_BEAR_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_BEAR_HEAD_13463;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_BLOODVELD_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_BLOODVELD_HEAD_13496;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_CHAOS_DRUID_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_CHAOS_DRUID_HEAD_13472;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_DAGANNOTH_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_DAGANNOTH_HEAD_13493;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_DEMON_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_DEMON_HEAD_13502;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_DOG_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_DOG_HEAD_13469;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_DRAGON_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_DRAGON_HEAD_13511;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_ELF_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_ELF_HEAD_13481;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_GIANT_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_GIANT_HEAD_13475;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_GOBLIN_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_GOBLIN_HEAD_13448;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_HORROR_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_HORROR_HEAD_13487;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_IMP_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_IMP_HEAD_13454;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_KALPHITE_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_KALPHITE_HEAD_13490;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_MINOTAUR_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_MINOTAUR_HEAD_13457;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_MONKEY_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_MONKEY_HEAD_13451;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_OGRE_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_OGRE_HEAD_13478;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_SCORPION_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_SCORPION_HEAD_13460;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_TROLL_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_TROLL_HEAD_13484;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_TZHAAR_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_TZHAAR_HEAD_13499;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_UNICORN_HEAD;
|
||||||
|
import static net.runelite.api.ItemID.ENSOULED_UNICORN_HEAD_13466;
|
||||||
|
import static net.runelite.api.ItemID.FEROCIOUS_GLOVES;
|
||||||
|
import static net.runelite.api.ItemID.FROZEN_ABYSSAL_WHIP;
|
||||||
|
import static net.runelite.api.ItemID.FURY_ORNAMENT_KIT;
|
||||||
|
import static net.runelite.api.ItemID.GAMES_NECKLACE1;
|
||||||
|
import static net.runelite.api.ItemID.GAMES_NECKLACE2;
|
||||||
|
import static net.runelite.api.ItemID.GAMES_NECKLACE3;
|
||||||
|
import static net.runelite.api.ItemID.GAMES_NECKLACE4;
|
||||||
|
import static net.runelite.api.ItemID.GAMES_NECKLACE5;
|
||||||
|
import static net.runelite.api.ItemID.GAMES_NECKLACE6;
|
||||||
|
import static net.runelite.api.ItemID.GAMES_NECKLACE7;
|
||||||
|
import static net.runelite.api.ItemID.GAMES_NECKLACE8;
|
||||||
|
import static net.runelite.api.ItemID.GRANITE_MAUL;
|
||||||
|
import static net.runelite.api.ItemID.GRANITE_MAUL_12848;
|
||||||
|
import static net.runelite.api.ItemID.GRANITE_RING;
|
||||||
|
import static net.runelite.api.ItemID.GRANITE_RING_I;
|
||||||
|
import static net.runelite.api.ItemID.GREEN_SLAYER_HELMET;
|
||||||
|
import static net.runelite.api.ItemID.GREEN_SLAYER_HELMET_I;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT_100;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT_25;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT_50;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT_75;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_HELM;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_HELM_100;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_HELM_25;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_HELM_50;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_HELM_75;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY_100;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY_25;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY_50;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY_75;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR_100;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR_25;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR_50;
|
||||||
|
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR_75;
|
||||||
|
import static net.runelite.api.ItemID.HYDRA_LEATHER;
|
||||||
|
import static net.runelite.api.ItemID.HYDRA_SLAYER_HELMET;
|
||||||
|
import static net.runelite.api.ItemID.HYDRA_SLAYER_HELMET_I;
|
||||||
|
import static net.runelite.api.ItemID.HYDRA_TAIL;
|
||||||
|
import static net.runelite.api.ItemID.INFINITY_BOTTOMS;
|
||||||
|
import static net.runelite.api.ItemID.INFINITY_BOTTOMS_20575;
|
||||||
|
import static net.runelite.api.ItemID.INFINITY_HAT;
|
||||||
|
import static net.runelite.api.ItemID.INFINITY_TOP;
|
||||||
|
import static net.runelite.api.ItemID.INFINITY_TOP_10605;
|
||||||
|
import static net.runelite.api.ItemID.INFINITY_TOP_20574;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_COIF;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_COIF_100;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_COIF_25;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_COIF_50;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_COIF_75;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_CROSSBOW;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_CROSSBOW_100;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_CROSSBOW_25;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_CROSSBOW_50;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_CROSSBOW_75;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT_100;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT_25;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT_50;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT_75;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_LEATHERTOP;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_LEATHERTOP_100;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_LEATHERTOP_25;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_LEATHERTOP_50;
|
||||||
|
import static net.runelite.api.ItemID.KARILS_LEATHERTOP_75;
|
||||||
|
import static net.runelite.api.ItemID.KRAKEN_TENTACLE;
|
||||||
|
import static net.runelite.api.ItemID.LAVA_BATTLESTAFF;
|
||||||
|
import static net.runelite.api.ItemID.LAVA_BATTLESTAFF_21198;
|
||||||
|
import static net.runelite.api.ItemID.LIGHT_INFINITY_BOTTOMS;
|
||||||
|
import static net.runelite.api.ItemID.LIGHT_INFINITY_COLOUR_KIT;
|
||||||
|
import static net.runelite.api.ItemID.LIGHT_INFINITY_HAT;
|
||||||
|
import static net.runelite.api.ItemID.LIGHT_INFINITY_TOP;
|
||||||
|
import static net.runelite.api.ItemID.MAGIC_SHORTBOW;
|
||||||
|
import static net.runelite.api.ItemID.MAGIC_SHORTBOW_I;
|
||||||
|
import static net.runelite.api.ItemID.MAGMA_HELM;
|
||||||
|
import static net.runelite.api.ItemID.MAGMA_HELM_UNCHARGED;
|
||||||
|
import static net.runelite.api.ItemID.MALEDICTION_WARD;
|
||||||
|
import static net.runelite.api.ItemID.MALEDICTION_WARD_12806;
|
||||||
|
import static net.runelite.api.ItemID.NECKLACE_OF_ANGUISH;
|
||||||
|
import static net.runelite.api.ItemID.NECKLACE_OF_ANGUISH_OR;
|
||||||
|
import static net.runelite.api.ItemID.OCCULT_NECKLACE;
|
||||||
|
import static net.runelite.api.ItemID.OCCULT_NECKLACE_OR;
|
||||||
|
import static net.runelite.api.ItemID.OCCULT_ORNAMENT_KIT;
|
||||||
|
import static net.runelite.api.ItemID.ODIUM_WARD;
|
||||||
|
import static net.runelite.api.ItemID.ODIUM_WARD_12807;
|
||||||
|
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE;
|
||||||
|
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_1;
|
||||||
|
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_2;
|
||||||
|
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_4;
|
||||||
|
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_5;
|
||||||
|
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_6;
|
||||||
|
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_7;
|
||||||
|
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_8;
|
||||||
|
import static net.runelite.api.ItemID.PURPLE_SLAYER_HELMET;
|
||||||
|
import static net.runelite.api.ItemID.PURPLE_SLAYER_HELMET_I;
|
||||||
|
import static net.runelite.api.ItemID.RED_SLAYER_HELMET;
|
||||||
|
import static net.runelite.api.ItemID.RED_SLAYER_HELMET_I;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_DUELING1;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_DUELING2;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_DUELING3;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_DUELING4;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_DUELING5;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_DUELING6;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_DUELING7;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_DUELING8;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_SUFFERING;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_SUFFERING_I;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_SUFFERING_R;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_SUFFERING_RI;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_THE_GODS;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_THE_GODS_I;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_WEALTH;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_WEALTH_1;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_WEALTH_2;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_WEALTH_3;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_WEALTH_4;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_WEALTH_I;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_WEALTH_I1;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_WEALTH_I2;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_WEALTH_I3;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_WEALTH_I4;
|
||||||
|
import static net.runelite.api.ItemID.RING_OF_WEALTH_I5;
|
||||||
|
import static net.runelite.api.ItemID.SANGUINESTI_STAFF;
|
||||||
|
import static net.runelite.api.ItemID.SANGUINESTI_STAFF_UNCHARGED;
|
||||||
|
import static net.runelite.api.ItemID.SARADOMINS_BLESSED_SWORD;
|
||||||
|
import static net.runelite.api.ItemID.SARADOMINS_TEAR;
|
||||||
|
import static net.runelite.api.ItemID.SARADOMIN_GODSWORD;
|
||||||
|
import static net.runelite.api.ItemID.SARADOMIN_GODSWORD_OR;
|
||||||
|
import static net.runelite.api.ItemID.SARADOMIN_GODSWORD_ORNAMENT_KIT;
|
||||||
|
import static net.runelite.api.ItemID.SCYTHE_OF_VITUR;
|
||||||
|
import static net.runelite.api.ItemID.SCYTHE_OF_VITUR_UNCHARGED;
|
||||||
|
import static net.runelite.api.ItemID.SEERS_RING;
|
||||||
|
import static net.runelite.api.ItemID.SEERS_RING_I;
|
||||||
|
import static net.runelite.api.ItemID.SERPENTINE_HELM;
|
||||||
|
import static net.runelite.api.ItemID.SERPENTINE_HELM_UNCHARGED;
|
||||||
|
import static net.runelite.api.ItemID.SKILLS_NECKLACE;
|
||||||
|
import static net.runelite.api.ItemID.SKILLS_NECKLACE1;
|
||||||
|
import static net.runelite.api.ItemID.SKILLS_NECKLACE2;
|
||||||
|
import static net.runelite.api.ItemID.SKILLS_NECKLACE3;
|
||||||
|
import static net.runelite.api.ItemID.SKILLS_NECKLACE5;
|
||||||
|
import static net.runelite.api.ItemID.SLAYER_HELMET;
|
||||||
|
import static net.runelite.api.ItemID.SLAYER_HELMET_I;
|
||||||
|
import static net.runelite.api.ItemID.STEAM_BATTLESTAFF;
|
||||||
|
import static net.runelite.api.ItemID.STEAM_BATTLESTAFF_12795;
|
||||||
|
import static net.runelite.api.ItemID.TANZANITE_HELM;
|
||||||
|
import static net.runelite.api.ItemID.TANZANITE_HELM_UNCHARGED;
|
||||||
|
import static net.runelite.api.ItemID.THAMMARONS_SCEPTRE;
|
||||||
|
import static net.runelite.api.ItemID.THAMMARONS_SCEPTRE_U;
|
||||||
|
import static net.runelite.api.ItemID.TOME_OF_FIRE;
|
||||||
|
import static net.runelite.api.ItemID.TOME_OF_FIRE_EMPTY;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_HAMMERS;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_HAMMERS_100;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_HAMMERS_25;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_HAMMERS_50;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_HAMMERS_75;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_HELM;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_HELM_100;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_HELM_25;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_HELM_50;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_HELM_75;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_PLATEBODY;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_PLATEBODY_100;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_PLATEBODY_25;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_PLATEBODY_50;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_PLATEBODY_75;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_PLATELEGS;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_PLATELEGS_100;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_PLATELEGS_25;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_PLATELEGS_50;
|
||||||
|
import static net.runelite.api.ItemID.TORAGS_PLATELEGS_75;
|
||||||
|
import static net.runelite.api.ItemID.TORTURE_ORNAMENT_KIT;
|
||||||
|
import static net.runelite.api.ItemID.TOXIC_BLOWPIPE;
|
||||||
|
import static net.runelite.api.ItemID.TOXIC_BLOWPIPE_EMPTY;
|
||||||
|
import static net.runelite.api.ItemID.TOXIC_STAFF_OF_THE_DEAD;
|
||||||
|
import static net.runelite.api.ItemID.TOXIC_STAFF_UNCHARGED;
|
||||||
|
import static net.runelite.api.ItemID.TREASONOUS_RING;
|
||||||
|
import static net.runelite.api.ItemID.TREASONOUS_RING_I;
|
||||||
|
import static net.runelite.api.ItemID.TRIDENT_OF_THE_SEAS;
|
||||||
|
import static net.runelite.api.ItemID.TRIDENT_OF_THE_SEAS_E;
|
||||||
|
import static net.runelite.api.ItemID.TRIDENT_OF_THE_SWAMP;
|
||||||
|
import static net.runelite.api.ItemID.TRIDENT_OF_THE_SWAMP_E;
|
||||||
|
import static net.runelite.api.ItemID.TURQUOISE_SLAYER_HELMET;
|
||||||
|
import static net.runelite.api.ItemID.TURQUOISE_SLAYER_HELMET_I;
|
||||||
|
import static net.runelite.api.ItemID.TYRANNICAL_RING;
|
||||||
|
import static net.runelite.api.ItemID.TYRANNICAL_RING_I;
|
||||||
|
import static net.runelite.api.ItemID.UNCHARGED_TOXIC_TRIDENT;
|
||||||
|
import static net.runelite.api.ItemID.UNCHARGED_TOXIC_TRIDENT_E;
|
||||||
|
import static net.runelite.api.ItemID.UNCHARGED_TRIDENT;
|
||||||
|
import static net.runelite.api.ItemID.UNCHARGED_TRIDENT_E;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_BRASSARD;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_BRASSARD_100;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_BRASSARD_25;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_BRASSARD_50;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_BRASSARD_75;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_FLAIL;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_FLAIL_100;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_FLAIL_25;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_FLAIL_50;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_FLAIL_75;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_HELM;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_HELM_100;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_HELM_25;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_HELM_50;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_HELM_75;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_PLATESKIRT;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_PLATESKIRT_100;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_PLATESKIRT_25;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_PLATESKIRT_50;
|
||||||
|
import static net.runelite.api.ItemID.VERACS_PLATESKIRT_75;
|
||||||
|
import static net.runelite.api.ItemID.VIGGORAS_CHAINMACE;
|
||||||
|
import static net.runelite.api.ItemID.VIGGORAS_CHAINMACE_U;
|
||||||
|
import static net.runelite.api.ItemID.VOLCANIC_ABYSSAL_WHIP;
|
||||||
|
import static net.runelite.api.ItemID.WARRIOR_RING;
|
||||||
|
import static net.runelite.api.ItemID.WARRIOR_RING_I;
|
||||||
|
import static net.runelite.api.ItemID.ZAMORAK_GODSWORD;
|
||||||
|
import static net.runelite.api.ItemID.ZAMORAK_GODSWORD_OR;
|
||||||
|
import static net.runelite.api.ItemID.ZAMORAK_GODSWORD_ORNAMENT_KIT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts untradeable items to it's tradeable counterparts
|
* Converts untradeable items to it's tradeable counterparts
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ public class NPCManager
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns health for target NPC based on it's combat level and name
|
* Returns health for target NPC based on it's combat level and name
|
||||||
|
*
|
||||||
* @param name npc name
|
* @param name npc name
|
||||||
* @param combatLevel npc combat level
|
* @param combatLevel npc combat level
|
||||||
* @return health or null if HP is unknown
|
* @return health or null if HP is unknown
|
||||||
|
|||||||
@@ -33,12 +33,12 @@ import lombok.Data;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.FontID;
|
import net.runelite.api.FontID;
|
||||||
import net.runelite.api.widgets.WidgetType;
|
|
||||||
import net.runelite.api.widgets.JavaScriptCallback;
|
import net.runelite.api.widgets.JavaScriptCallback;
|
||||||
import net.runelite.api.widgets.Widget;
|
import net.runelite.api.widgets.Widget;
|
||||||
import net.runelite.api.widgets.WidgetPositionMode;
|
import net.runelite.api.widgets.WidgetPositionMode;
|
||||||
import net.runelite.api.widgets.WidgetSizeMode;
|
import net.runelite.api.widgets.WidgetSizeMode;
|
||||||
import net.runelite.api.widgets.WidgetTextAlignment;
|
import net.runelite.api.widgets.WidgetTextAlignment;
|
||||||
|
import net.runelite.api.widgets.WidgetType;
|
||||||
import net.runelite.client.input.KeyListener;
|
import net.runelite.client.input.KeyListener;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|||||||
@@ -24,9 +24,8 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.menus;
|
package net.runelite.client.menus;
|
||||||
|
|
||||||
import net.runelite.api.widgets.WidgetInfo;
|
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
import net.runelite.api.widgets.WidgetInfo;
|
||||||
import net.runelite.client.ui.JagexColors;
|
import net.runelite.client.ui.JagexColors;
|
||||||
import net.runelite.client.util.ColorUtil;
|
import net.runelite.client.util.ColorUtil;
|
||||||
|
|
||||||
|
|||||||
@@ -59,11 +59,11 @@ public class BlackjackPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
Client client;
|
Client client;
|
||||||
|
|
||||||
private static long timeSinceKnockout;
|
private long timeSinceKnockout;
|
||||||
private static long timeSinceAggro;
|
private long timeSinceAggro;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private static long currentGameTick;
|
private long currentGameTick;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void configure(Binder binder)
|
public void configure(Binder binder)
|
||||||
@@ -109,7 +109,7 @@ public class BlackjackPlugin extends Plugin
|
|||||||
public void onMenuEntryAdded(MenuEntryAdded menuEntryAdded)
|
public void onMenuEntryAdded(MenuEntryAdded menuEntryAdded)
|
||||||
{
|
{
|
||||||
String target = menuEntryAdded.getTarget().toLowerCase();
|
String target = menuEntryAdded.getTarget().toLowerCase();
|
||||||
if ((target.contains("bandit") | target.contains("menaphite thug")))
|
if ((target.contains("bandit") || target.contains("menaphite thug")))
|
||||||
{
|
{
|
||||||
Quest quest = Quest.THE_FEUD;
|
Quest quest = Quest.THE_FEUD;
|
||||||
if (quest.getState(client) == QuestState.FINISHED)
|
if (quest.getState(client) == QuestState.FINISHED)
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class CombatLevelOverlay extends Overlay
|
|||||||
int prayerLevel = client.getRealSkillLevel(Skill.PRAYER);
|
int prayerLevel = client.getRealSkillLevel(Skill.PRAYER);
|
||||||
|
|
||||||
// calculate initial required numbers
|
// calculate initial required numbers
|
||||||
double base = DEF_HP_MULT * (defenceLevel + hitpointsLevel + Math.floor(prayerLevel / 2));
|
double base = DEF_HP_MULT * (defenceLevel + hitpointsLevel + Math.floor(prayerLevel / 2D));
|
||||||
double melee = ATT_STR_MULT * (attackLevel + strengthLevel);
|
double melee = ATT_STR_MULT * (attackLevel + strengthLevel);
|
||||||
double range = RANGE_MAGIC_MULT * Math.floor(rangedLevel * RANGE_MAGIC_LEVEL_MULT);
|
double range = RANGE_MAGIC_MULT * Math.floor(rangedLevel * RANGE_MAGIC_LEVEL_MULT);
|
||||||
double mage = RANGE_MAGIC_MULT * Math.floor(magicLevel * RANGE_MAGIC_LEVEL_MULT);
|
double mage = RANGE_MAGIC_MULT * Math.floor(magicLevel * RANGE_MAGIC_LEVEL_MULT);
|
||||||
|
|||||||
@@ -64,13 +64,10 @@ public class PrayerTracker
|
|||||||
{
|
{
|
||||||
newTick.put(actor, new HashMap<>());
|
newTick.put(actor, new HashMap<>());
|
||||||
}
|
}
|
||||||
if (actor instanceof Player)
|
|
||||||
{
|
|
||||||
if (actor instanceof Player)
|
if (actor instanceof Player)
|
||||||
{
|
{
|
||||||
newTick.get(actor).put("PrayerIcon", ((Player) actor).getOverheadIcon() == null ? -1 : ((Player) actor).getOverheadIcon().ordinal());
|
newTick.get(actor).put("PrayerIcon", ((Player) actor).getOverheadIcon() == null ? -1 : ((Player) actor).getOverheadIcon().ordinal());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
newTick.get(actor).put("SpotAnim", actor.getGraphic());
|
newTick.get(actor).put("SpotAnim", actor.getGraphic());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ import org.apache.commons.lang3.ArrayUtils;
|
|||||||
)
|
)
|
||||||
public class FriendTaggingPlugin extends Plugin
|
public class FriendTaggingPlugin extends Plugin
|
||||||
{
|
{
|
||||||
public static ConcurrentHashMap<String, String> taggedFriends = new ConcurrentHashMap<>();
|
public static final ConcurrentHashMap<String, String> taggedFriends = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private static final String CONFIG_GROUP = "friendtagging";
|
private static final String CONFIG_GROUP = "friendtagging";
|
||||||
private static final int CHARACTER_LIMIT = 30;
|
private static final int CHARACTER_LIMIT = 30;
|
||||||
|
|||||||
@@ -214,13 +214,9 @@ public class ItemStatPlugin extends Plugin
|
|||||||
closeButton.setSpriteId(SpriteID.BOTTOM_LINE_MODE_WINDOW_CLOSE_BUTTON_SMALL);
|
closeButton.setSpriteId(SpriteID.BOTTOM_LINE_MODE_WINDOW_CLOSE_BUTTON_SMALL);
|
||||||
closeButton.setAction(0, "Close");
|
closeButton.setAction(0, "Close");
|
||||||
closeButton.setOnMouseOverListener((JavaScriptCallback) (ev) ->
|
closeButton.setOnMouseOverListener((JavaScriptCallback) (ev) ->
|
||||||
{
|
closeButton.setSpriteId(SpriteID.BOTTOM_LINE_MODE_WINDOW_CLOSE_BUTTON_SMALL_HOVERED));
|
||||||
closeButton.setSpriteId(SpriteID.BOTTOM_LINE_MODE_WINDOW_CLOSE_BUTTON_SMALL_HOVERED);
|
|
||||||
});
|
|
||||||
closeButton.setOnMouseLeaveListener((JavaScriptCallback) (ev) ->
|
closeButton.setOnMouseLeaveListener((JavaScriptCallback) (ev) ->
|
||||||
{
|
closeButton.setSpriteId(SpriteID.BOTTOM_LINE_MODE_WINDOW_CLOSE_BUTTON_SMALL));
|
||||||
closeButton.setSpriteId(SpriteID.BOTTOM_LINE_MODE_WINDOW_CLOSE_BUTTON_SMALL);
|
|
||||||
});
|
|
||||||
closeButton.setOnOpListener((JavaScriptCallback) (ev) -> resetGEInventory());
|
closeButton.setOnOpListener((JavaScriptCallback) (ev) -> resetGEInventory());
|
||||||
closeButton.setHasListener(true);
|
closeButton.setHasListener(true);
|
||||||
closeButton.revalidate();
|
closeButton.revalidate();
|
||||||
|
|||||||
@@ -266,9 +266,9 @@ public interface PlayerIndicatorsConfig extends Config
|
|||||||
description = "The location of the skull icon for skulled players",
|
description = "The location of the skull icon for skulled players",
|
||||||
group = "Target Indicator"
|
group = "Target Indicator"
|
||||||
)
|
)
|
||||||
default PlayerIndicatorsPlugin.minimapSkullLocations skullLocation()
|
default PlayerIndicatorsPlugin.MinimapSkullLocations skullLocation()
|
||||||
{
|
{
|
||||||
return PlayerIndicatorsPlugin.minimapSkullLocations.AFTER_NAME;
|
return PlayerIndicatorsPlugin.MinimapSkullLocations.AFTER_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public class PlayerIndicatorsMinimapOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
int width = graphics.getFontMetrics().stringWidth(name);
|
int width = graphics.getFontMetrics().stringWidth(name);
|
||||||
int height = graphics.getFontMetrics().getHeight();
|
int height = graphics.getFontMetrics().getHeight();
|
||||||
if (config.skullLocation().equals(PlayerIndicatorsPlugin.minimapSkullLocations.AFTER_NAME))
|
if (config.skullLocation().equals(PlayerIndicatorsPlugin.MinimapSkullLocations.AFTER_NAME))
|
||||||
{
|
{
|
||||||
OverlayUtil.renderImageLocation(graphics, new Point(minimapLocation.getX()
|
OverlayUtil.renderImageLocation(graphics, new Point(minimapLocation.getX()
|
||||||
+ width, minimapLocation.getY() - height),
|
+ width, minimapLocation.getY() - height),
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ public class PlayerIndicatorsOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
int width = graphics.getFontMetrics().stringWidth(name);
|
int width = graphics.getFontMetrics().stringWidth(name);
|
||||||
int height = graphics.getFontMetrics().getHeight();
|
int height = graphics.getFontMetrics().getHeight();
|
||||||
if (config.skullLocation().equals(PlayerIndicatorsPlugin.minimapSkullLocations.AFTER_NAME))
|
if (config.skullLocation().equals(PlayerIndicatorsPlugin.MinimapSkullLocations.AFTER_NAME))
|
||||||
{
|
{
|
||||||
OverlayUtil.renderImageLocation(graphics, new Point(textLocation.getX()
|
OverlayUtil.renderImageLocation(graphics, new Point(textLocation.getX()
|
||||||
+ width, textLocation.getY() - height),
|
+ width, textLocation.getY() - height),
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ public class PlayerIndicatorsPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum minimapSkullLocations
|
public enum MinimapSkullLocations
|
||||||
{
|
{
|
||||||
BEFORE_NAME,
|
BEFORE_NAME,
|
||||||
AFTER_NAME
|
AFTER_NAME
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ public class PlayerInfoCustomIndicator extends InfoBox
|
|||||||
break;
|
break;
|
||||||
case SPECIAL:
|
case SPECIAL:
|
||||||
currLvl = client.getVar(VarPlayer.SPECIAL_ATTACK_PERCENT) / 1000.0F;
|
currLvl = client.getVar(VarPlayer.SPECIAL_ATTACK_PERCENT) / 1000.0F;
|
||||||
|
break;
|
||||||
case WORLD:
|
case WORLD:
|
||||||
currLvl = 1000; // hacky
|
currLvl = 1000; // hacky
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ public class IDAStarMM extends IDAStar
|
|||||||
Point locSwap = new Point(locBlank.getX(), locBlank.getY() + 1);
|
Point locSwap = new Point(locBlank.getX(), locBlank.getY() + 1);
|
||||||
swap(locBlank, locSwap);
|
swap(locBlank, locSwap);
|
||||||
}
|
}
|
||||||
else if (distY <= -1)
|
else
|
||||||
{
|
{
|
||||||
Point locSwap = new Point(locBlank.getX(), locBlank.getY() - 1);
|
Point locSwap = new Point(locBlank.getX(), locBlank.getY() - 1);
|
||||||
swap(locBlank, locSwap);
|
swap(locBlank, locSwap);
|
||||||
@@ -252,7 +252,7 @@ public class IDAStarMM extends IDAStar
|
|||||||
Point locSwap = new Point(locBlank.getX() + 1, locBlank.getY());
|
Point locSwap = new Point(locBlank.getX() + 1, locBlank.getY());
|
||||||
swap(locBlank, locSwap);
|
swap(locBlank, locSwap);
|
||||||
}
|
}
|
||||||
else if (distX <= -1)
|
else
|
||||||
{
|
{
|
||||||
Point locSwap = new Point(locBlank.getX() - 1, locBlank.getY());
|
Point locSwap = new Point(locBlank.getX() - 1, locBlank.getY());
|
||||||
swap(locBlank, locSwap);
|
swap(locBlank, locSwap);
|
||||||
|
|||||||
@@ -162,6 +162,7 @@ public class PyramidPlunderPlugin extends Plugin
|
|||||||
break;
|
break;
|
||||||
case LOADING:
|
case LOADING:
|
||||||
obstacles.clear();
|
obstacles.clear();
|
||||||
|
break;
|
||||||
case LOGGED_IN:
|
case LOGGED_IN:
|
||||||
if (!isInRegion())
|
if (!isInRegion())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -817,7 +817,7 @@ public class RaidsPlugin extends Plugin
|
|||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
if (seconds >= 3600)
|
if (seconds >= 3600)
|
||||||
{
|
{
|
||||||
builder.append((int) Math.floor(seconds / 3600) + ";");
|
builder.append((int) Math.floor(seconds / 3600)).append(";");
|
||||||
}
|
}
|
||||||
seconds %= 3600;
|
seconds %= 3600;
|
||||||
if (builder.toString().equals(""))
|
if (builder.toString().equals(""))
|
||||||
@@ -842,7 +842,7 @@ public class RaidsPlugin extends Plugin
|
|||||||
tooltip = null;
|
tooltip = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
builder.append("Upper level: " + secondsToTime(upperTime));
|
builder.append("Upper level: ").append(secondsToTime(upperTime));
|
||||||
if (middleTime == -1)
|
if (middleTime == -1)
|
||||||
{
|
{
|
||||||
if (lowerTime == -1)
|
if (lowerTime == -1)
|
||||||
@@ -852,12 +852,12 @@ public class RaidsPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
builder.append("</br>Lower level: " + secondsToTime(lowerTime - upperTime));
|
builder.append("</br>Lower level: ").append(secondsToTime(lowerTime - upperTime));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
builder.append("</br>Middle level: " + secondsToTime(middleTime - upperTime));
|
builder.append("</br>Middle level: ").append(secondsToTime(middleTime - upperTime));
|
||||||
if (lowerTime == -1)
|
if (lowerTime == -1)
|
||||||
{
|
{
|
||||||
tooltip = builder.toString();
|
tooltip = builder.toString();
|
||||||
@@ -865,7 +865,7 @@ public class RaidsPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
builder.append("</br>Lower level: " + secondsToTime(lowerTime - middleTime));
|
builder.append("</br>Lower level: ").append(secondsToTime(lowerTime - middleTime));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (raidTime == -1)
|
if (raidTime == -1)
|
||||||
@@ -873,7 +873,7 @@ public class RaidsPlugin extends Plugin
|
|||||||
tooltip = builder.toString();
|
tooltip = builder.toString();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
builder.append("</br>Olm: " + secondsToTime(raidTime - lowerTime));
|
builder.append("</br>Olm: ").append(secondsToTime(raidTime - lowerTime));
|
||||||
tooltip = builder.toString();
|
tooltip = builder.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public enum ThievingRoomType
|
|||||||
this.y = y;
|
this.y = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ThievingRoomType IdentifyByInstancePoint(InstancePoint point)
|
public static ThievingRoomType identifyByInstancePoint(InstancePoint point)
|
||||||
{
|
{
|
||||||
for (ThievingRoomType type : ThievingRoomType.values())
|
for (ThievingRoomType type : ThievingRoomType.values())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ public class RaidsThievingPlugin extends Plugin
|
|||||||
|
|
||||||
if (obj.getId() == RaidsThievingConstants.EMPTY_TROUGH)
|
if (obj.getId() == RaidsThievingConstants.EMPTY_TROUGH)
|
||||||
{
|
{
|
||||||
ThievingRoomType type = ThievingRoomType.IdentifyByInstancePoint(absLoc);
|
ThievingRoomType type = ThievingRoomType.identifyByInstancePoint(absLoc);
|
||||||
|
|
||||||
if (type != null)
|
if (type != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public class RegenMeterOverlay extends Overlay
|
|||||||
g.setColor(RegenMeterOverlay.OVERLAY_COLOR);
|
g.setColor(RegenMeterOverlay.OVERLAY_COLOR);
|
||||||
g.fillOval(
|
g.fillOval(
|
||||||
bounds.x + OFFSET,
|
bounds.x + OFFSET,
|
||||||
bounds.y + (int) (bounds.height / 2 - (DIAMETER) / 2),
|
bounds.y + (int) (bounds.height / 2D - (DIAMETER) / 2D),
|
||||||
(int) DIAMETER, (int) DIAMETER);
|
(int) DIAMETER, (int) DIAMETER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -112,7 +112,7 @@ public class RegenMeterOverlay extends Overlay
|
|||||||
}
|
}
|
||||||
Rectangle bounds = widget.getBounds();
|
Rectangle bounds = widget.getBounds();
|
||||||
|
|
||||||
Arc2D.Double arc = new Arc2D.Double(bounds.x + OFFSET, bounds.y + (bounds.height / 2 - DIAMETER / 2), DIAMETER, DIAMETER, 90.d, -360.d * percent, Arc2D.OPEN);
|
Arc2D.Double arc = new Arc2D.Double(bounds.x + OFFSET, bounds.y + (bounds.height / 2D - DIAMETER / 2D), DIAMETER, DIAMETER, 90.d, -360.d * percent, Arc2D.OPEN);
|
||||||
final Stroke STROKE = new BasicStroke(2f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER);
|
final Stroke STROKE = new BasicStroke(2f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER);
|
||||||
g.setStroke(STROKE);
|
g.setStroke(STROKE);
|
||||||
g.setColor(color);
|
g.setColor(color);
|
||||||
|
|||||||
@@ -228,11 +228,6 @@ public class RunecraftPlugin extends Plugin
|
|||||||
client.setMenuEntries(newEntries);
|
client.setMenuEntries(newEntries);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int searchIndex(MenuEntry[] entries, String option, String target)
|
|
||||||
{
|
|
||||||
return searchIndex(entries, option, target, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
private int searchIndex(MenuEntry[] entries, String option, String target, boolean contains)
|
private int searchIndex(MenuEntry[] entries, String option, String target, boolean contains)
|
||||||
{
|
{
|
||||||
for (int i = entries.length - 1; i >= 0; i--)
|
for (int i = entries.length - 1; i >= 0; i--)
|
||||||
|
|||||||
@@ -100,16 +100,16 @@ class RunedokuOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
if (!util.makeSimple(util.createTable(client)).contains(0))
|
if (!util.makeSimple(util.createTable(client)).contains(0))
|
||||||
{
|
{
|
||||||
OverlayUtil.renderPolygon(graphics, util.RectangleToPolygon(widget.getBounds()), Color.GREEN);
|
OverlayUtil.renderPolygon(graphics, util.rectangleToPolygon(widget.getBounds()), Color.GREEN);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OverlayUtil.renderPolygon(graphics, util.RectangleToPolygon(widget.getBounds()), util.referenceColors(i));
|
OverlayUtil.renderPolygon(graphics, util.rectangleToPolygon(widget.getBounds()), util.referenceColors(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OverlayUtil.renderPolygon(graphics, util.RectangleToPolygon(widget.getBounds()), RED);
|
OverlayUtil.renderPolygon(graphics, util.rectangleToPolygon(widget.getBounds()), RED);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -134,17 +134,17 @@ class RunedokuOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
if (!util.makeSimple(util.createTable(client)).contains(0))
|
if (!util.makeSimple(util.createTable(client)).contains(0))
|
||||||
{
|
{
|
||||||
OverlayUtil.renderPolygon(graphics, util.RectangleToPolygon(squareToHighlight.getBounds()), Color.GREEN);
|
OverlayUtil.renderPolygon(graphics, util.rectangleToPolygon(squareToHighlight.getBounds()), Color.GREEN);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OverlayUtil.renderPolygon(graphics, util.RectangleToPolygon(squareToHighlight.getBounds()), util.sudokuPieceToColor(simpleArr.get(iteration)));
|
OverlayUtil.renderPolygon(graphics, util.rectangleToPolygon(squareToHighlight.getBounds()), util.sudokuPieceToColor(simpleArr.get(iteration)));
|
||||||
}
|
}
|
||||||
iteration++;
|
iteration++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OverlayUtil.renderPolygon(graphics, util.RectangleToPolygon(squareToHighlight.getBounds()), RED);
|
OverlayUtil.renderPolygon(graphics, util.rectangleToPolygon(squareToHighlight.getBounds()), RED);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import net.runelite.api.Client;
|
|||||||
import net.runelite.api.widgets.Widget;
|
import net.runelite.api.widgets.Widget;
|
||||||
import net.runelite.api.widgets.WidgetItem;
|
import net.runelite.api.widgets.WidgetItem;
|
||||||
|
|
||||||
public class RunedokuUtil
|
class RunedokuUtil
|
||||||
{
|
{
|
||||||
|
|
||||||
private final RunedokuConfig config;
|
private final RunedokuConfig config;
|
||||||
@@ -20,7 +20,7 @@ public class RunedokuUtil
|
|||||||
this.config = config;
|
this.config = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Color sudokuPieceToColor(int i)
|
Color sudokuPieceToColor(int i)
|
||||||
{
|
{
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
@@ -47,7 +47,7 @@ public class RunedokuUtil
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Color referenceColors(int i)
|
Color referenceColors(int i)
|
||||||
{
|
{
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
@@ -80,7 +80,7 @@ public class RunedokuUtil
|
|||||||
* @param board
|
* @param board
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
protected ArrayList<Integer> makeSimple(int[][] board)
|
ArrayList<Integer> makeSimple(int[][] board)
|
||||||
{
|
{
|
||||||
ArrayList<Integer> list = new ArrayList<>();
|
ArrayList<Integer> list = new ArrayList<>();
|
||||||
for (int i = 0; i < 9; i++)
|
for (int i = 0; i < 9; i++)
|
||||||
@@ -99,7 +99,7 @@ public class RunedokuUtil
|
|||||||
* @param rect
|
* @param rect
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
protected Polygon RectangleToPolygon(Rectangle rect)
|
public static Polygon rectangleToPolygon(Rectangle rect)
|
||||||
{
|
{
|
||||||
int[] xpoints = {rect.x, rect.x + rect.width, rect.x + rect.width, rect.x};
|
int[] xpoints = {rect.x, rect.x + rect.width, rect.x + rect.width, rect.x};
|
||||||
int[] ypoints = {rect.y, rect.y, rect.y + rect.height, rect.y + rect.height};
|
int[] ypoints = {rect.y, rect.y, rect.y + rect.height, rect.y + rect.height};
|
||||||
@@ -113,7 +113,7 @@ public class RunedokuUtil
|
|||||||
* @return sudoku table that the client currently sees in a 2d array
|
* @return sudoku table that the client currently sees in a 2d array
|
||||||
* @author gazivodag
|
* @author gazivodag
|
||||||
*/
|
*/
|
||||||
protected int[][] createTable(Client client)
|
int[][] createTable(Client client)
|
||||||
{
|
{
|
||||||
int[][] myArr = new int[9][9];
|
int[][] myArr = new int[9][9];
|
||||||
Widget sudokuScreen = client.getWidget(288, 131);
|
Widget sudokuScreen = client.getWidget(288, 131);
|
||||||
|
|||||||
@@ -52,8 +52,8 @@ import net.runelite.client.ui.ClientUI;
|
|||||||
public class RuneLitePlusPlugin extends Plugin
|
public class RuneLitePlusPlugin extends Plugin
|
||||||
{
|
{
|
||||||
public static boolean customPresenceEnabled = false;
|
public static boolean customPresenceEnabled = false;
|
||||||
public static String rlPlusDiscordApp = "560644885250572289";
|
public static final String rlPlusDiscordApp = "560644885250572289";
|
||||||
public static String rlDiscordApp = "409416265891971072";
|
public static final String rlDiscordApp = "409416265891971072";
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public RuneLitePlusConfig config;
|
public RuneLitePlusConfig config;
|
||||||
|
|||||||
@@ -301,7 +301,8 @@ public class SlayerTaskPanel extends PluginPanel
|
|||||||
if (tasks.isEmpty() || isNewAssignment)
|
if (tasks.isEmpty() || isNewAssignment)
|
||||||
{
|
{
|
||||||
// new task so append it to the front of the list
|
// new task so append it to the front of the list
|
||||||
SwingUtilities.invokeLater(() -> {
|
SwingUtilities.invokeLater(() ->
|
||||||
|
{
|
||||||
TaskBox newBox = buildBox(slayerPlugin, tasksContainer, newData);
|
TaskBox newBox = buildBox(slayerPlugin, tasksContainer, newData);
|
||||||
newBox.update(true, newData.isPaused(), newData);
|
newBox.update(true, newData.isPaused(), newData);
|
||||||
});
|
});
|
||||||
@@ -322,7 +323,8 @@ public class SlayerTaskPanel extends PluginPanel
|
|||||||
|
|
||||||
// so this previous task is invalid so delete it then add in the new actually
|
// so this previous task is invalid so delete it then add in the new actually
|
||||||
// correct task
|
// correct task
|
||||||
SwingUtilities.invokeLater(() -> {
|
SwingUtilities.invokeLater(() ->
|
||||||
|
{
|
||||||
tasksContainer.remove(tasks.get(0));
|
tasksContainer.remove(tasks.get(0));
|
||||||
tasks.remove(0);
|
tasks.remove(0);
|
||||||
TaskBox newBox = buildBox(slayerPlugin, tasksContainer, newData);
|
TaskBox newBox = buildBox(slayerPlugin, tasksContainer, newData);
|
||||||
|
|||||||
@@ -80,7 +80,8 @@ class TaskBox extends JPanel
|
|||||||
container.setLayout(new BorderLayout());
|
container.setLayout(new BorderLayout());
|
||||||
container.setBackground(ColorScheme.DARKER_GRAY_COLOR);
|
container.setBackground(ColorScheme.DARKER_GRAY_COLOR);
|
||||||
|
|
||||||
SwingUtilities.invokeLater(() -> {
|
SwingUtilities.invokeLater(() ->
|
||||||
|
{
|
||||||
BufferedImage taskImg = slayerPlugin.getImageForTask(Task.getTask(taskData.getTaskName()));
|
BufferedImage taskImg = slayerPlugin.getImageForTask(Task.getTask(taskData.getTaskName()));
|
||||||
JLabel taskIcon = new JLabel(new ImageIcon(taskImg));
|
JLabel taskIcon = new JLabel(new ImageIcon(taskImg));
|
||||||
taskIcon.setHorizontalAlignment(SwingConstants.CENTER);
|
taskIcon.setHorizontalAlignment(SwingConstants.CENTER);
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ public class TickCounterOverlay extends Overlay
|
|||||||
panelComponent.setBackgroundColor(config.bgColor());
|
panelComponent.setBackgroundColor(config.bgColor());
|
||||||
elems.add(TitleComponent.builder().text("Combat counter").color(config.titleColor()).build());
|
elems.add(TitleComponent.builder().text("Combat counter").color(config.titleColor()).build());
|
||||||
List<Entry<String, Integer>> list = new ArrayList<>(plugin.activity.entrySet());
|
List<Entry<String, Integer>> list = new ArrayList<>(plugin.activity.entrySet());
|
||||||
list.sort((o1, o2) -> {
|
list.sort((o1, o2) ->
|
||||||
|
{
|
||||||
int value = -Integer.compare(o1.getValue(), o2.getValue());
|
int value = -Integer.compare(o1.getValue(), o2.getValue());
|
||||||
if (value == 0)
|
if (value == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ public class WhaleWatchersPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
if (config.showDamageCounter())
|
if (config.showDamageCounter())
|
||||||
{
|
{
|
||||||
if (!(event.getActor() == client.getLocalPlayer() |
|
if (!(event.getActor() == client.getLocalPlayer() ||
|
||||||
event.getActor() == client.getLocalPlayer().getInteracting()))
|
event.getActor() == client.getLocalPlayer().getInteracting()))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -32,17 +32,14 @@ import com.google.common.reflect.TypeToken;
|
|||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import io.sigpipe.jbsdiff.InvalidHeaderException;
|
import io.sigpipe.jbsdiff.InvalidHeaderException;
|
||||||
import io.sigpipe.jbsdiff.Patch;
|
import io.sigpipe.jbsdiff.Patch;
|
||||||
|
|
||||||
import java.applet.Applet;
|
import java.applet.Applet;
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.jar.Attributes;
|
import java.util.jar.Attributes;
|
||||||
@@ -53,13 +50,10 @@ import java.util.jar.Manifest;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import static net.runelite.client.rs.ClientUpdateCheckMode.AUTO;
|
import static net.runelite.client.rs.ClientUpdateCheckMode.AUTO;
|
||||||
import static net.runelite.client.rs.ClientUpdateCheckMode.NONE;
|
import static net.runelite.client.rs.ClientUpdateCheckMode.NONE;
|
||||||
import static net.runelite.client.rs.ClientUpdateCheckMode.VANILLA;
|
import static net.runelite.client.rs.ClientUpdateCheckMode.VANILLA;
|
||||||
|
|
||||||
import net.runelite.client.rs.mixins.MixinRunner;
|
import net.runelite.client.rs.mixins.MixinRunner;
|
||||||
import net.runelite.http.api.RuneLiteAPI;
|
import net.runelite.http.api.RuneLiteAPI;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
@@ -72,6 +66,7 @@ public class ClientLoader
|
|||||||
{
|
{
|
||||||
private final ClientConfigLoader clientConfigLoader;
|
private final ClientConfigLoader clientConfigLoader;
|
||||||
private ClientUpdateCheckMode updateCheckMode;
|
private ClientUpdateCheckMode updateCheckMode;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ClientLoader(
|
private ClientLoader(
|
||||||
@Named("updateCheckMode") final ClientUpdateCheckMode updateCheckMode,
|
@Named("updateCheckMode") final ClientUpdateCheckMode updateCheckMode,
|
||||||
|
|||||||
@@ -25,8 +25,18 @@
|
|||||||
|
|
||||||
package net.runelite.client.rs.mixins;
|
package net.runelite.client.rs.mixins;
|
||||||
|
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.util.Map;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import net.runelite.client.rs.mixins.transformers.*;
|
import net.runelite.client.rs.mixins.transformers.AppendTransformer;
|
||||||
|
import net.runelite.client.rs.mixins.transformers.DoNothingTransformer;
|
||||||
|
import net.runelite.client.rs.mixins.transformers.InjectTransformer;
|
||||||
|
import net.runelite.client.rs.mixins.transformers.InterfaceTransformer;
|
||||||
|
import net.runelite.client.rs.mixins.transformers.OverwriteSanityCheck;
|
||||||
|
import net.runelite.client.rs.mixins.transformers.OverwriteTransformer;
|
||||||
|
import net.runelite.client.rs.mixins.transformers.PrependTransformer;
|
||||||
|
import net.runelite.client.rs.mixins.transformers.ProtectTransformer;
|
||||||
|
import net.runelite.client.rs.mixins.transformers.SanityChecker;
|
||||||
import org.objectweb.asm.ClassReader;
|
import org.objectweb.asm.ClassReader;
|
||||||
import org.objectweb.asm.ClassVisitor;
|
import org.objectweb.asm.ClassVisitor;
|
||||||
import org.objectweb.asm.ClassWriter;
|
import org.objectweb.asm.ClassWriter;
|
||||||
@@ -34,9 +44,6 @@ import org.objectweb.asm.commons.ClassRemapper;
|
|||||||
import org.objectweb.asm.commons.Remapper;
|
import org.objectweb.asm.commons.Remapper;
|
||||||
import org.objectweb.asm.tree.ClassNode;
|
import org.objectweb.asm.tree.ClassNode;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class MixinRunner
|
public class MixinRunner
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,15 +25,14 @@
|
|||||||
|
|
||||||
package net.runelite.client.rs.mixins.transformers;
|
package net.runelite.client.rs.mixins.transformers;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.objectweb.asm.ClassReader;
|
import org.objectweb.asm.ClassReader;
|
||||||
import org.objectweb.asm.ClassVisitor;
|
import org.objectweb.asm.ClassVisitor;
|
||||||
import org.objectweb.asm.Opcodes;
|
import org.objectweb.asm.Opcodes;
|
||||||
import org.objectweb.asm.tree.ClassNode;
|
import org.objectweb.asm.tree.ClassNode;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class InterfaceTransformer extends ClassVisitor implements Opcodes
|
public class InterfaceTransformer extends ClassVisitor implements Opcodes
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
package net.runelite.client.rs.mixins.transformers;
|
package net.runelite.client.rs.mixins.transformers;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.client.util.RefUtils;
|
import net.runelite.client.util.RefUtils;
|
||||||
import org.objectweb.asm.ClassVisitor;
|
import org.objectweb.asm.ClassVisitor;
|
||||||
@@ -33,8 +34,6 @@ import org.objectweb.asm.Opcodes;
|
|||||||
import org.objectweb.asm.tree.ClassNode;
|
import org.objectweb.asm.tree.ClassNode;
|
||||||
import org.objectweb.asm.tree.MethodNode;
|
import org.objectweb.asm.tree.MethodNode;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class OverwriteSanityCheck extends SanityChecker implements Opcodes
|
public class OverwriteSanityCheck extends SanityChecker implements Opcodes
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -615,6 +615,7 @@ public class ClientUI
|
|||||||
/**
|
/**
|
||||||
* Changes cursor for client window. Requires ${@link ClientUI#open(RuneLite)} to be called first.
|
* 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
|
* FIXME: This is working properly only on Windows, Linux and Mac are displaying cursor incorrectly
|
||||||
|
*
|
||||||
* @param image cursor image
|
* @param image cursor image
|
||||||
* @param name cursor name
|
* @param name cursor name
|
||||||
*/
|
*/
|
||||||
@@ -632,6 +633,7 @@ public class ClientUI
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets client window cursor to default one.
|
* Resets client window cursor to default one.
|
||||||
|
*
|
||||||
* @see ClientUI#setCursor(BufferedImage, String)
|
* @see ClientUI#setCursor(BufferedImage, String)
|
||||||
*/
|
*/
|
||||||
public void resetCursor()
|
public void resetCursor()
|
||||||
@@ -666,6 +668,7 @@ public class ClientUI
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Paint UI related overlays to target graphics
|
* Paint UI related overlays to target graphics
|
||||||
|
*
|
||||||
* @param graphics target graphics
|
* @param graphics target graphics
|
||||||
*/
|
*/
|
||||||
public void paintOverlays(final Graphics2D graphics)
|
public void paintOverlays(final Graphics2D graphics)
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ public class ContainableFrame extends JFrame
|
|||||||
/**
|
/**
|
||||||
* Expand frame by specified value. If the frame is going to be expanded outside of screen push the frame to
|
* Expand frame by specified value. If the frame is going to be expanded outside of screen push the frame to
|
||||||
* the side.
|
* the side.
|
||||||
|
*
|
||||||
* @param value size to expand frame by
|
* @param value size to expand frame by
|
||||||
*/
|
*/
|
||||||
public void expandBy(final int value)
|
public void expandBy(final int value)
|
||||||
@@ -141,6 +142,7 @@ public class ContainableFrame extends JFrame
|
|||||||
/**
|
/**
|
||||||
* Contract frame by specified value. If new frame size is less than it's minimum size, force the minimum size.
|
* Contract frame by specified value. If new frame size is less than it's minimum size, force the minimum size.
|
||||||
* If the frame was pushed from side before, restore it's original position.
|
* If the frame was pushed from side before, restore it's original position.
|
||||||
|
*
|
||||||
* @param value value to contract frame by
|
* @param value value to contract frame by
|
||||||
*/
|
*/
|
||||||
public void contractBy(final int value)
|
public void contractBy(final int value)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import java.util.function.Function;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Grid layout implementation with support for cells with unequal size.
|
* Grid layout implementation with support for cells with unequal size.
|
||||||
*
|
* <p>
|
||||||
* See https://www.javaworld.com/article/2077486/core-java/java-tip-121--flex-your-grid-layout.html
|
* See https://www.javaworld.com/article/2077486/core-java/java-tip-121--flex-your-grid-layout.html
|
||||||
*/
|
*/
|
||||||
public class DynamicGridLayout extends GridLayout
|
public class DynamicGridLayout extends GridLayout
|
||||||
@@ -149,6 +149,7 @@ public class DynamicGridLayout extends GridLayout
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculate outer size of the layout based on it's children and sizer
|
* Calculate outer size of the layout based on it's children and sizer
|
||||||
|
*
|
||||||
* @param parent parent component
|
* @param parent parent component
|
||||||
* @param sizer functioning returning dimension of the child component
|
* @param sizer functioning returning dimension of the child component
|
||||||
* @return outer size
|
* @return outer size
|
||||||
|
|||||||
@@ -24,11 +24,11 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.ui;
|
package net.runelite.client.ui;
|
||||||
|
|
||||||
import javax.swing.text.StyleContext;
|
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
import java.awt.FontFormatException;
|
import java.awt.FontFormatException;
|
||||||
import java.awt.GraphicsEnvironment;
|
import java.awt.GraphicsEnvironment;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import javax.swing.text.StyleContext;
|
||||||
|
|
||||||
public class FontManager
|
public class FontManager
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,7 +24,10 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.ui;
|
package net.runelite.client.ui;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.Color;
|
||||||
|
import java.awt.GridBagConstraints;
|
||||||
|
import java.awt.GridBagLayout;
|
||||||
|
import java.awt.Image;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
@@ -36,7 +39,6 @@ import javax.swing.JPanel;
|
|||||||
import javax.swing.JProgressBar;
|
import javax.swing.JProgressBar;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
import javax.swing.plaf.basic.BasicProgressBarUI;
|
import javax.swing.plaf.basic.BasicProgressBarUI;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.client.RuneLite;
|
import net.runelite.client.RuneLite;
|
||||||
import net.runelite.client.RuneLiteProperties;
|
import net.runelite.client.RuneLiteProperties;
|
||||||
@@ -64,6 +66,7 @@ public class RuneLiteSplashScreen
|
|||||||
/**
|
/**
|
||||||
* This is not done in the constructor in order to avoid processing in case the user chooses to not load
|
* This is not done in the constructor in order to avoid processing in case the user chooses to not load
|
||||||
* the splash screen.
|
* the splash screen.
|
||||||
|
*
|
||||||
* @param estimatedSteps steps until completion, used for the progress bar
|
* @param estimatedSteps steps until completion, used for the progress bar
|
||||||
*/
|
*/
|
||||||
private void initLayout(final int estimatedSteps)
|
private void initLayout(final int estimatedSteps)
|
||||||
@@ -183,6 +186,7 @@ public class RuneLiteSplashScreen
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the splash screen to be visible.
|
* Set the splash screen to be visible.
|
||||||
|
*
|
||||||
* @param estimatedSteps steps until completion, used for the progress bar
|
* @param estimatedSteps steps until completion, used for the progress bar
|
||||||
*/
|
*/
|
||||||
public void open(final int estimatedSteps)
|
public void open(final int estimatedSteps)
|
||||||
@@ -226,7 +230,8 @@ public class RuneLiteSplashScreen
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (progressGoal!=progressBar.getMaximum()) {
|
if (progressGoal != progressBar.getMaximum())
|
||||||
|
{
|
||||||
panel.remove(progressBar);
|
panel.remove(progressBar);
|
||||||
panel.validate();
|
panel.validate();
|
||||||
final GridBagConstraints progressConstraints = new GridBagConstraints();
|
final GridBagConstraints progressConstraints = new GridBagConstraints();
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ public class DimmableJPanel extends JPanel
|
|||||||
* Dimming sets all parts of this component with darker colors except for the central label
|
* Dimming sets all parts of this component with darker colors except for the central label
|
||||||
* This is useful for showing that progress is paused
|
* This is useful for showing that progress is paused
|
||||||
* Setting dim to false will restore the original colors from before the component was dimmed.
|
* Setting dim to false will restore the original colors from before the component was dimmed.
|
||||||
|
*
|
||||||
* @param dimmed
|
* @param dimmed
|
||||||
*/
|
*/
|
||||||
public void setDimmed(boolean dimmed)
|
public void setDimmed(boolean dimmed)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class ThinProgressBar extends JPanel
|
|||||||
|
|
||||||
public double getPercentage()
|
public double getPercentage()
|
||||||
{
|
{
|
||||||
return (value * 100) / maximumValue;
|
return (value * 100) / (double) maximumValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ public abstract class Overlay implements LayoutableRenderableEntity
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Overlay name, used for saving the overlay, needs to be unique
|
* Overlay name, used for saving the overlay, needs to be unique
|
||||||
|
*
|
||||||
* @return overlay name
|
* @return overlay name
|
||||||
*/
|
*/
|
||||||
public String getName()
|
public String getName()
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ import lombok.AccessLevel;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.MenuAction;
|
import net.runelite.api.MenuAction;
|
||||||
import net.runelite.api.events.MenuOptionClicked;
|
import net.runelite.api.events.MenuOptionClicked;
|
||||||
import net.runelite.api.widgets.WidgetItem;
|
|
||||||
import net.runelite.api.widgets.WidgetInfo;
|
import net.runelite.api.widgets.WidgetInfo;
|
||||||
|
import net.runelite.api.widgets.WidgetItem;
|
||||||
import net.runelite.client.config.ConfigGroup;
|
import net.runelite.client.config.ConfigGroup;
|
||||||
import net.runelite.client.config.ConfigManager;
|
import net.runelite.client.config.ConfigManager;
|
||||||
import net.runelite.client.config.RuneLiteConfig;
|
import net.runelite.client.config.RuneLiteConfig;
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ import java.awt.image.BufferedImage;
|
|||||||
import net.runelite.api.Actor;
|
import net.runelite.api.Actor;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.Perspective;
|
import net.runelite.api.Perspective;
|
||||||
import net.runelite.api.Player;
|
|
||||||
import net.runelite.api.Point;
|
import net.runelite.api.Point;
|
||||||
import net.runelite.api.TileObject;
|
import net.runelite.api.TileObject;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
import net.runelite.api.coords.LocalPoint;
|
||||||
|
|||||||
@@ -200,10 +200,7 @@ public class ArrowMinimapOverlay extends Overlay
|
|||||||
localPoint = new LocalPoint(localPoint.getX() + 1, localPoint.getY() + 1);
|
localPoint = new LocalPoint(localPoint.getX() + 1, localPoint.getY() + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
localPoint = null;
|
||||||
{
|
|
||||||
localPoint = npc.getLocalLocation();
|
|
||||||
}
|
|
||||||
|
|
||||||
renderMinimapArrow(graphics, arrowPoint, localPoint, localPlayerPos, worldPlayerPos);
|
renderMinimapArrow(graphics, arrowPoint, localPoint, localPlayerPos, worldPlayerPos);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ import com.google.common.collect.Multimap;
|
|||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.events.NpcSpawned;
|
|
||||||
import net.runelite.client.eventbus.Subscribe;
|
|
||||||
import net.runelite.client.plugins.Plugin;
|
import net.runelite.client.plugins.Plugin;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ import net.runelite.client.ui.overlay.RenderableEntity;
|
|||||||
public interface LayoutableRenderableEntity extends RenderableEntity
|
public interface LayoutableRenderableEntity extends RenderableEntity
|
||||||
{
|
{
|
||||||
Rectangle getBounds();
|
Rectangle getBounds();
|
||||||
|
|
||||||
void setPreferredLocation(Point position);
|
void setPreferredLocation(Point position);
|
||||||
|
|
||||||
void setPreferredSize(Dimension dimension);
|
void setPreferredSize(Dimension dimension);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ public class TooltipComponent implements RenderableEntity
|
|||||||
// Draw trailing text (after last tag)
|
// Draw trailing text (after last tag)
|
||||||
final TextComponent textComponent = new TextComponent();
|
final TextComponent textComponent = new TextComponent();
|
||||||
textComponent.setColor(nextColor);
|
textComponent.setColor(nextColor);
|
||||||
textComponent.setText(line.substring(begin, line.length()));
|
textComponent.setText(line.substring(begin));
|
||||||
textComponent.setPosition(new Point(lineX, textY + (i + 1) * textHeight - textDescent));
|
textComponent.setPosition(new Point(lineX, textY + (i + 1) * textHeight - textDescent));
|
||||||
textComponent.render(graphics);
|
textComponent.render(graphics);
|
||||||
}
|
}
|
||||||
@@ -194,7 +194,7 @@ public class TooltipComponent implements RenderableEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Include trailing text (after last tag)
|
// Include trailing text (after last tag)
|
||||||
textWidth += metrics.stringWidth(line.substring(begin, line.length()));
|
textWidth += metrics.stringWidth(line.substring(begin));
|
||||||
|
|
||||||
return textWidth;
|
return textWidth;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,6 +181,7 @@ public class WorldMapOverlay extends Overlay
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the screen coordinates for a WorldPoint on the world map
|
* Get the screen coordinates for a WorldPoint on the world map
|
||||||
|
*
|
||||||
* @param worldPoint WorldPoint to get screen coordinates of
|
* @param worldPoint WorldPoint to get screen coordinates of
|
||||||
* @return Point of screen coordinates of the center of the world point
|
* @return Point of screen coordinates of the center of the world point
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -230,6 +230,7 @@ public class ColorUtil
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates color from passed object hash code
|
* Creates color from passed object hash code
|
||||||
|
*
|
||||||
* @param object object with hashCode
|
* @param object object with hashCode
|
||||||
* @return color
|
* @return color
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ import java.io.IOException;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.function.Predicate;
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import javax.swing.GrayFilter;
|
import javax.swing.GrayFilter;
|
||||||
import java.util.function.Predicate;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.IndexedSprite;
|
import net.runelite.api.IndexedSprite;
|
||||||
@@ -421,6 +421,7 @@ public class ImageUtil
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts the buffered image into a sprite image and returns it
|
* Converts the buffered image into a sprite image and returns it
|
||||||
|
*
|
||||||
* @param image The image to be converted
|
* @param image The image to be converted
|
||||||
* @param client Current client instance
|
* @param client Current client instance
|
||||||
* @return The buffered image as a sprite image
|
* @return The buffered image as a sprite image
|
||||||
@@ -455,7 +456,7 @@ public class ImageUtil
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts an image into an {@code IndexedSprite} instance.
|
* Converts an image into an {@code IndexedSprite} instance.
|
||||||
*
|
* <p>
|
||||||
* The passed in image can only have at max 255 different colors.
|
* The passed in image can only have at max 255 different colors.
|
||||||
*
|
*
|
||||||
* @param image The image to be converted
|
* @param image The image to be converted
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public class LinkBrowser
|
|||||||
/**
|
/**
|
||||||
* Tries to navigate to specified URL in browser. In case operation fails, displays message box with message
|
* Tries to navigate to specified URL in browser. In case operation fails, displays message box with message
|
||||||
* and copies link to clipboard to navigate to.
|
* and copies link to clipboard to navigate to.
|
||||||
|
*
|
||||||
* @param url url to open
|
* @param url url to open
|
||||||
* @return true if operation was successful
|
* @return true if operation was successful
|
||||||
*/
|
*/
|
||||||
@@ -131,6 +132,7 @@ public class LinkBrowser
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Open swing message box with specified message and copy data to clipboard
|
* Open swing message box with specified message and copy data to clipboard
|
||||||
|
*
|
||||||
* @param message message to show
|
* @param message message to show
|
||||||
*/
|
*/
|
||||||
private static void showMessageBox(final String message, final String data)
|
private static void showMessageBox(final String message, final String data)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
package net.runelite.client.util;
|
package net.runelite.client.util;
|
||||||
|
|
||||||
|
import java.awt.Polygon;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.Player;
|
import net.runelite.api.Player;
|
||||||
import net.runelite.api.WorldType;
|
import net.runelite.api.WorldType;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
|
|
||||||
import java.awt.*;
|
|
||||||
|
|
||||||
public class MiscUtils
|
public class MiscUtils
|
||||||
{
|
{
|
||||||
private static int[] abovePointsX = {2944, 3392, 3392, 2944};
|
private static int[] abovePointsX = {2944, 3392, 3392, 2944};
|
||||||
@@ -21,7 +20,9 @@ public class MiscUtils
|
|||||||
private static boolean inWildy(WorldPoint point)
|
private static boolean inWildy(WorldPoint point)
|
||||||
{
|
{
|
||||||
if (point == null)
|
if (point == null)
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return abovePoly.contains(point.getX(), point.getY()) || belowPoly.contains(point.getX(), point.getY());
|
return abovePoly.contains(point.getX(), point.getY()) || belowPoly.contains(point.getX(), point.getY());
|
||||||
}
|
}
|
||||||
@@ -29,23 +30,33 @@ public class MiscUtils
|
|||||||
public static int getWildernessLevelFrom(Client client, WorldPoint point)
|
public static int getWildernessLevelFrom(Client client, WorldPoint point)
|
||||||
{
|
{
|
||||||
if (client == null)
|
if (client == null)
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (point == null)
|
if (point == null)
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int x = point.getX();
|
int x = point.getX();
|
||||||
|
|
||||||
if (point.getPlane() == 0 && (x < 2940 || x > 3391))
|
if (point.getPlane() == 0 && (x < 2940 || x > 3391))
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int y = point.getY();
|
int y = point.getY();
|
||||||
//v underground //v above ground
|
//v underground //v above ground
|
||||||
int wildernessLevel = clamp(y > 6400 ? ((y - 9920) / 8) + 1 : ((y - 3520) / 8) + 1, 0, 56);
|
int wildernessLevel = clamp(y > 6400 ? ((y - 9920) / 8) + 1 : ((y - 3520) / 8) + 1, 0, 56);
|
||||||
|
|
||||||
if (point.getPlane() > 0)
|
if (point.getPlane() > 0)
|
||||||
|
{
|
||||||
if (y < 9920)
|
if (y < 9920)
|
||||||
|
{
|
||||||
wildernessLevel = 0;
|
wildernessLevel = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (client.getWorldType().stream().anyMatch(worldType -> worldType == WorldType.PVP || worldType == WorldType.HIGH_RISK))
|
if (client.getWorldType().stream().anyMatch(worldType -> worldType == WorldType.PVP || worldType == WorldType.HIGH_RISK))
|
||||||
{
|
{
|
||||||
@@ -70,7 +81,9 @@ public class MiscUtils
|
|||||||
Player localPlayer = client.getLocalPlayer();
|
Player localPlayer = client.getLocalPlayer();
|
||||||
|
|
||||||
if (localPlayer == null)
|
if (localPlayer == null)
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return inWildy(localPlayer.getWorldLocation());
|
return inWildy(localPlayer.getWorldLocation());
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public class PvPUtil
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the wilderness level based on a world point
|
* Gets the wilderness level based on a world point
|
||||||
|
*
|
||||||
* @param point the point in the world to get the wilderness level for
|
* @param point the point in the world to get the wilderness level for
|
||||||
* @return the int representing the wilderness level
|
* @return the int representing the wilderness level
|
||||||
*/
|
*/
|
||||||
@@ -48,6 +49,7 @@ public class PvPUtil
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if another player is attackable based off of wilderness level and combat levels
|
* Determines if another player is attackable based off of wilderness level and combat levels
|
||||||
|
*
|
||||||
* @param client The client of the local player
|
* @param client The client of the local player
|
||||||
* @param player the player to determine attackability
|
* @param player the player to determine attackability
|
||||||
* @return returns true if the player is attackable, false otherwise
|
* @return returns true if the player is attackable, false otherwise
|
||||||
|
|||||||
@@ -81,8 +81,8 @@ public class Text
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* In addition to removing all tags, replaces nbsp with space, trims string and lowercases it
|
* In addition to removing all tags, replaces nbsp with space, trims string and lowercases it
|
||||||
* @param str The string to standardize
|
|
||||||
*
|
*
|
||||||
|
* @param str The string to standardize
|
||||||
* @return The given `str` that is standardized
|
* @return The given `str` that is standardized
|
||||||
*/
|
*/
|
||||||
public static String standardize(String str)
|
public static String standardize(String str)
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ public enum WildernessLocation
|
|||||||
private final String name;
|
private final String name;
|
||||||
@Getter
|
@Getter
|
||||||
private final WorldArea worldArea;
|
private final WorldArea worldArea;
|
||||||
|
|
||||||
WildernessLocation(String name, Location location, int plane)
|
WildernessLocation(String name, Location location, int plane)
|
||||||
{
|
{
|
||||||
this.name = name;
|
this.name = name;
|
||||||
@@ -82,6 +83,7 @@ public enum WildernessLocation
|
|||||||
public int y;
|
public int y;
|
||||||
public int width;
|
public int width;
|
||||||
public int height;
|
public int height;
|
||||||
|
|
||||||
Location(int x, int y, int x1, int y1)
|
Location(int x, int y, int x1, int y1)
|
||||||
{
|
{
|
||||||
this.x = x;
|
this.x = x;
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ public class WorldUtil
|
|||||||
/**
|
/**
|
||||||
* Converts http-api world types to runelite-api world types
|
* Converts http-api world types to runelite-api world types
|
||||||
* TODO: Find a better way to handle these to not have duplicate interfaces
|
* TODO: Find a better way to handle these to not have duplicate interfaces
|
||||||
|
*
|
||||||
* @param apiTypes http-api world types
|
* @param apiTypes http-api world types
|
||||||
* @return runelite-api world types
|
* @return runelite-api world types
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -34,9 +34,7 @@ import net.runelite.api.ChatMessageType;
|
|||||||
import static net.runelite.api.ChatMessageType.GAMEMESSAGE;
|
import static net.runelite.api.ChatMessageType.GAMEMESSAGE;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.MessageNode;
|
import net.runelite.api.MessageNode;
|
||||||
import net.runelite.api.Player;
|
|
||||||
import net.runelite.api.Varbits;
|
import net.runelite.api.Varbits;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
|
||||||
import net.runelite.api.events.ChatMessage;
|
import net.runelite.api.events.ChatMessage;
|
||||||
import net.runelite.api.events.GameTick;
|
import net.runelite.api.events.GameTick;
|
||||||
import net.runelite.api.events.VarbitChanged;
|
import net.runelite.api.events.VarbitChanged;
|
||||||
|
|||||||
Reference in New Issue
Block a user