Can anyone help with the resizeable client? It used to work but now it goes white whenever i click it.
Can someone jump on TV and take a look through Eclipse? Would be much appreciated!!! Or if anyone knows of any suggestions?
Here is the errors that come up in my eclipse when i click the resize button when logged in
Code:
Exception in thread "Thread-3" java.lang.Error: Unresolved compilation problems:
The method invokeLater(Runnable) in the type SwingUtilities is not applicable for the arguments (ClientUI.getInstance()::updateFrameConfig)
The type Object does not define updateFrameConfig() that is applicable here
at io.battlerune.GameApplet.rebuildFrame(GameApplet.java:94)
at io.battlerune.Client.frameMode(Client.java:441)
at io.battlerune.Client.parsePacket(Client.java:14696)
at io.battlerune.Client.mainGameProcessor(Client.java:4250)
at io.battlerune.Client.processGameLoop(Client.java:3697)
at io.battlerune.GameApplet.run(GameApplet.java:241)
at io.battlerune.Client.run(Client.java:5947)
at java.lang.Thread.run(Unknown Source)
#
So here is my GameApplet.java
Code:
package io.battlerune;
import java.applet.Applet;
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Insets;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import javax.swing.SwingUtilities;
import io.battlerune.login.LoginRenderer;
import io.battlerune.login.ScreenType;
import io.battlerune.updater.UpdateState;
import io.battlerune.updater.Updater;
import io.battlerune.updater.screen.UpdaterRenderer;
import net.runelite.client.ui.ClientUI;
public class GameApplet extends Applet implements Runnable, MouseListener, MouseMotionListener, MouseWheelListener,
KeyListener, FocusListener, WindowListener {
private static final long serialVersionUID = 1L;
public UpdaterRenderer updaterRenderer;
public LoginRenderer loginRenderer;
Console console = new Console();
private int anInt4;
private int delayTime;
private int minDelay;
private final long aLongArray7[] = new long[10];
int fps;
private boolean shouldDebug;
public int myWidth;
public int myHeight;
public Graphics graphics;
GraphicsBuffer fullGameScreen;
GameWindow clientFrame;
private boolean shouldClearScreen;
boolean awtFocus;
int idleTime;
int clickMode2;
public int mouseX;
public int mouseY;
private int clickMode1;
private int clickX;
private int clickY;
long aLong29;
public int lastMetaModifier;
int lastClickX;
int lastClickY;
final int keyArray[] = new int[128];
private final int charQueue[] = new int[128];
private int readIndex;
private int writeIndex;
private boolean isApplet;
int forceWidth = -1;
int forceHeight = -1;
void rebuildFrame(boolean undecorated, int width, int height, boolean resizable, boolean full) {
Component component = getGameComponent();
component.setBackground(Color.black);
component.removeMouseWheelListener(this);
component.removeMouseListener(this);
component.removeMouseMotionListener(this);
component.removeKeyListener(this);
component.removeFocusListener(this);
if (clientFrame != null) {
clientFrame.removeWindowListener(this);
clientFrame.setVisible(false);
clientFrame.dispose();
clientFrame = null;
}
component = getGameComponent();
component.setBackground(Color.black);
component.addMouseWheelListener(this);
component.addMouseListener(this);
component.addMouseMotionListener(this);
component.addKeyListener(this);
component.addFocusListener(this);
mouseX = mouseY = -1;
if (ClientUI.getInstance() != null)
SwingUtilities.invokeLater(ClientUI.getInstance()::updateFrameConfig);
}
int getScreenWidth() {
if (forceWidth >= 0) {
return forceWidth;
}
return getRealScreenWidth();
}
int getScreenHeight() {
if (forceHeight >= 0) {
return forceHeight;
}
return getRealScreenHeight();
}
private int getRealScreenWidth() {
Component component = getGameComponent();
if (component == null) {
return forceWidth >= 0 ? forceWidth : 765;
}
int w = component.getWidth();
if (component instanceof java.awt.Container) {
java.awt.Insets insets = ((java.awt.Container) component).getInsets();
w -= insets.left + insets.right;
}
return w;
}
private int getRealScreenHeight() {
Component component = getGameComponent();
if (component == null) {
return forceHeight >= 0 ? forceHeight : 503;
}
int h = component.getHeight();
if (component instanceof java.awt.Container) {
java.awt.Insets insets = ((java.awt.Container) component).getInsets();
h -= insets.top + insets.bottom;
}
return h;
}
boolean appletClient() {
return clientFrame == null && isApplet == true;
}
/*final void createClientFrame(int w, int h) {
isApplet = false;
myWidth = forceWidth = w;
myHeight = forceHeight = h;
clientFrame = new GameWindow(this, myWidth, myHeight, Client.frameMode == Client.ScreenMode.RESIZABLE,
Client.frameMode == Client.ScreenMode.FULLSCREEN);
clientFrame.setFocusTraversalKeysEnabled(false);
graphics = getGameComponent().getGraphics();
fullGameScreen = new GraphicsBuffer(myWidth, myHeight, getGameComponent());
startRunnable(this, 1);
}*/
final void initClientFrame(int w, int h) {
isApplet = true;
myWidth = forceWidth = w;
myHeight = forceHeight = h;
graphics = getGameComponent().getGraphics();
fullGameScreen = new GraphicsBuffer(myWidth, myHeight, getGameComponent());
startRunnable(this, 1);
}
public void run() {
getGameComponent().addMouseListener(this);
getGameComponent().addMouseMotionListener(this);
getGameComponent().addKeyListener(this);
getGameComponent().addFocusListener(this);
getGameComponent().addMouseWheelListener(this);
if (clientFrame != null) {
clientFrame.addWindowListener(this);
}
Updater.get().setup(Client.instance);
int i = 0;
int j = 256;
int k = 1;
int l = 0;
int i1 = 0;
for (int j1 = 0; j1 < 10; j1++) {
aLongArray7[j1] = System.currentTimeMillis();
}
do {
if (anInt4 < 0) {
break;
}
if (anInt4 > 0) {
anInt4--;
if (anInt4 == 0) {
exit();
return;
}
}
int k1 = j;
int i2 = k;
j = 300;
k = 1;
long currentTimeMillis = System.currentTimeMillis();
if (aLongArray7[i] == 0L) {
j = k1;
k = i2;
} else if (currentTimeMillis > aLongArray7[i]) {
j = (int) ((long) (2560 * delayTime) / (currentTimeMillis - aLongArray7[i]));
}
if (j < 25) {
j = 25;
}
if (j > 256) {
j = 256;
k = (int) ((long) delayTime - (currentTimeMillis - aLongArray7[i]) / 10L);
}
if (k > delayTime) {
k = delayTime;
}
aLongArray7[i] = currentTimeMillis;
i = (i + 1) % 10;
if (k > 1) {
for (int j2 = 0; j2 < 10; j2++) {
if (aLongArray7[j2] != 0L) {
aLongArray7[j2] += k;
}
}
}
if (k < minDelay) {
k = minDelay;
}
try {
Thread.sleep(k);
} catch (InterruptedException interruptedexception) {
interruptedexception.printStackTrace();
i1++;
}
for (; l < 256; l += j) {
lastMetaModifier = clickMode1;
lastClickX = clickX;
lastClickY = clickY;
clickMode1 = 0;
processGameLoop();
readIndex = writeIndex;
}
l &= 0xff;
if (delayTime > 0) {
fps = (1000 * j) / (delayTime * 256);
}
processDrawing();
if (shouldDebug) {
System.out.println((new StringBuilder()).append("ntime:").append(currentTimeMillis).toString());
for (int k2 = 0; k2 < 10; k2++) {
int i3 = ((i - k2 - 1) + 20) % 10;
System.out.println((new StringBuilder()).append("otim").append(i3).append(":")
.append(aLongArray7[i3]).toString());
}
System.out.println((new StringBuilder()).append("fps:").append(fps).append(" ratio:").append(j)
.append(" count:").append(l).toString());
System.out.println((new StringBuilder()).append("del:").append(k).append(" deltime:").append(delayTime)
.append(" mindel:").append(minDelay).toString());
System.out.println(
(new StringBuilder()).append("intex:").append(i1).append(" opos:").append(i).toString());
shouldDebug = false;
i1 = 0;
}
} while (true);
if (anInt4 == -1) {
exit();
}
}
private void exit() {
anInt4 = -2;
cleanUpForQuit();
if (clientFrame != null) {
try {
Thread.sleep(1000L);
} catch (Exception exception) {
exception.printStackTrace();
}
try {
System.exit(0);
} catch (Throwable throwable) {
throwable.printStackTrace();
}
}
}
final void method4(int i) {
delayTime = 1000 / i;
}
public final void start() {
if (anInt4 >= 0) {
anInt4 = 0;
}
}
public final void stop() {
if (anInt4 >= 0) {
anInt4 = 4000 / delayTime;
}
}
public final void destroy() {
anInt4 = -1;
try {
Thread.sleep(5000L);
} catch (Exception exception) {
exception.printStackTrace();
}
if (anInt4 == -1) {
exit();
}
}
public final void update(Graphics g) {
if (graphics == null) {
graphics = g;
}
shouldClearScreen = true;
raiseWelcomeScreen();
}
@Override
public final void paint(Graphics g) {
if (graphics == null) {
graphics = g;
}
shouldClearScreen = true;
raiseWelcomeScreen();
}
@Override
public final void paintComponents(Graphics g) {
if (graphics == null) {
graphics = g;
}
shouldClearScreen = true;
raiseWelcomeScreen();
}
private boolean canZoom = true;
public void mouseWheelMoved(MouseWheelEvent event) {
int rotation = event.getWheelRotation();
handleInterfaceScrolling(event);
if (mouseX > 0 && mouseX < 512 && mouseY > Client.frameHeight - 165 && mouseY < Client.frameHeight - 25) {
int scrollPos = Client.anInt1089;
scrollPos -= rotation * 30;
if (scrollPos < 0)
scrollPos = 0;
if (scrollPos > Client.anInt1211 - 110)
scrollPos = Client.anInt1211 - 110;
if (Client.anInt1089 != scrollPos) {
Client.anInt1089 = scrollPos;
Client.redrawDialogueBox = true;
}
}
if (Client.openInterfaceID == -1) {
if (Client.controlIsDown && canZoom) {
if (mouseX > 0 && mouseX < 512 && mouseY > Client.frameHeight - 165
&& mouseY < Client.frameHeight - 25) {
return;
}
if (rotation == -1) {
if (Client.cameraZoom > 50) {
Client.cameraZoom -= 30;
}
} else {
if (Client.cameraZoom < 1250) {
Client.cameraZoom += 30;
}
}
}
}
}
private void handleInterfaceScrolling(MouseWheelEvent event) {
int rotation = event.getWheelRotation();
int positionX = 0;
int positionY = 0;
int width = 0;
int height = 0;
int offsetX = 0;
int offsetY = 0;
int childID = 0;
int tabInterfaceID = Client.tabInterfaceIDs[Client.tabID];
if (tabInterfaceID != -1) {
RSInterface tab = RSInterface.interfaceCache[tabInterfaceID];
offsetX = Client.frameMode == Client.ScreenMode.FIXED ? Client.frameWidth - 218
: (Client.frameMode == Client.ScreenMode.FIXED ? 28 : Client.frameWidth - 197);
offsetY = Client.frameMode == Client.ScreenMode.FIXED ? Client.frameHeight - 298
: (Client.frameMode == Client.ScreenMode.FIXED ? 37
: Client.frameHeight - (Client.frameWidth >= 1000 ? 37 : 74) - 267);
if (tab.children != null || tab.children.length != 0) {
for (int index = 0; index < tab.children.length; index++) {
RSInterface tabChild = RSInterface.interfaceCache[tab.children[index]];
if (tabChild.children != null) {
for (int idx = 0; idx < tabChild.children.length; idx++) {
RSInterface tabChild2 = RSInterface.interfaceCache[tabChild.children[idx]];
if (tabChild2.dropDown != null && tabChild2.dropDown.isOpen()
&& tabChild2.dropDown.getOptions().length > 5) {
canZoom = false;
tabChild2.dropDown.scroll += rotation;
if (tabChild2.dropDown.scroll >= tabChild2.dropDown.getOptions().length - 5) {
tabChild2.dropDown.scroll = tabChild2.dropDown.getOptions().length - 5;
}
if (tabChild2.dropDown.scroll < 0) {
tabChild2.dropDown.scroll = 0;
}
return;
}
}
}
if (tabChild.scrollMax > 0) {
childID = index;
positionX = tab.childX[index];
positionY = tab.childY[index];
width = RSInterface.interfaceCache[tab.children[index]].width;
height = RSInterface.interfaceCache[tab.children[index]].height;
break;
}
}
}
if (mouseX > offsetX + positionX && mouseY > offsetY + positionY && mouseX < offsetX + positionX + width
&& mouseY < offsetY + positionY + height) {
canZoom = false;
RSInterface.interfaceCache[tab.children[childID]].scrollPosition += rotation * 30;
} else {
canZoom = true;
}
}
if (Client.openInterfaceID != -1) {
int w = 512, h = 334;
int x = (Client.frameWidth / 2) - 256;
int y = (Client.frameHeight / 2) - 167;
int count = !Client.changeTabArea ? 4 : 3;
if (Client.frameMode != Client.ScreenMode.FIXED) {
for (int i = 0; i < count; i++) {
if (x + w > (Client.frameWidth - 225)) {
x = x - 30;
if (x < 0) {
x = 0;
}
}
if (y + h > (Client.frameHeight - 182)) {
y = y - 30;
if (y < 0) {
y = 0;
}
}
}
}
RSInterface rsi = RSInterface.interfaceCache[Client.openInterfaceID];
if (Client.openInterfaceID == 60000) {
offsetX = Client.frameMode == Client.ScreenMode.FIXED ? 4 : (Client.frameWidth / 2) - 356;
offsetY = Client.frameMode == Client.ScreenMode.FIXED ? 4 : (Client.frameHeight / 2) - 230;
} else {
offsetX = Client.frameMode == Client.ScreenMode.FIXED ? 4 : x;
offsetY = Client.frameMode == Client.ScreenMode.FIXED ? 4 : y;
}
for (int index = 0; index < rsi.children.length; index++) {
RSInterface tabChild = RSInterface.interfaceCache[rsi.children[index]];
if (tabChild.dropDown != null && tabChild.dropDown.isOpen()
&& tabChild.dropDown.getOptions().length > 5) {
tabChild.dropDown.scroll += rotation;
if (tabChild.dropDown.scroll >= tabChild.dropDown.getOptions().length - 5) {
tabChild.dropDown.scroll = tabChild.dropDown.getOptions().length - 5;
}
if (tabChild.dropDown.scroll < 0) {
tabChild.dropDown.scroll = 0;
}
return;
}
if (tabChild.scrollMax > 0) {
childID = index;
positionX = rsi.childX[index];
positionY = rsi.childY[index];
width = RSInterface.interfaceCache[rsi.children[index]].width;
height = RSInterface.interfaceCache[rsi.children[index]].height;
break;
}
}
if ((mouseX > (offsetX + positionX)) && (mouseY > (offsetY + positionY))
&& (mouseX < (offsetX + positionX + width)) && (mouseY < (offsetY + positionY + height))) {
if (RSInterface.interfaceCache[rsi.children[childID]].scrollPosition > 0) {
RSInterface.interfaceCache[rsi.children[childID]].scrollPosition += rotation * rsi.scrollSpeed;
if (RSInterface.interfaceCache[rsi.children[childID]].scrollPosition < 0) {
RSInterface.interfaceCache[rsi.children[childID]].scrollPosition = 0;
}
return;
} else {
if (rotation > 0) {
RSInterface.interfaceCache[rsi.children[childID]].scrollPosition += rotation * rsi.scrollSpeed;
if (RSInterface.interfaceCache[rsi.children[childID]].scrollPosition > RSInterface.interfaceCache[rsi.children[childID]].scrollMax) {
RSInterface.interfaceCache[rsi.children[childID]].scrollPosition = RSInterface.interfaceCache[rsi.children[childID]].scrollMax;
}
return;
}
}
}
if (mouseX > offsetX + positionX && mouseY > offsetY + positionY && mouseX < offsetX + positionX + width
&& mouseY < offsetY + positionY + height) {
canZoom = false;
} else {
canZoom = true;
}
}
}
int clickType;
private final int LEFT = 0;
private final int RIGHT = 1;
private final int DRAG = 2;
private final int RELEASED = 3;
private final int MOVE = 4;
private int releasedX;
private int releasedY;
boolean mouseWheelDown;
public final void mousePressed(MouseEvent e) {
int x = e.getX();
int y = e.getY();
int type = e.getButton();
if (Client.frameMode != Client.ScreenMode.FIXED && clientFrame != null) {
Insets insets = clientFrame.getInsets();
x -= insets.left;// 4
y -= insets.top;// 22
}
idleTime = 0;
clickX = x;
clickY = y;
aLong29 = System.currentTimeMillis();
if (SwingUtilities.isMiddleMouseButton(e)) {
mouseWheelDown = true;
mouseWheelX = x;
mouseWheelY = y;
return;
}
if (SwingUtilities.isRightMouseButton(e)) {
clickType = RIGHT;
clickMode1 = 2;
clickMode2 = 2;
} else if (SwingUtilities.isLeftMouseButton(e)) {
clickType = LEFT;
clickMode1 = 1;
clickMode2 = 1;
}
}
public final void mouseReleased(MouseEvent e) {
int x = e.getX();
int y = e.getY();
if (Client.frameMode != Client.ScreenMode.FIXED && clientFrame != null) {
Insets insets = clientFrame.getInsets();
x -= insets.left;// 4
y -= insets.top;// 22
}
releasedX = x;
releasedY = y;
idleTime = 0;
clickMode2 = 0;
clickType = RELEASED;
mouseWheelDown = false;
Client.instance.releasePrayer();
}
public final void mouseClicked(MouseEvent mouseevent) {
}
public final void mouseEntered(MouseEvent mouseevent) {
}
public final void mouseExited(MouseEvent mouseevent) {
idleTime = 0;
mouseX = -1;
mouseY = -1;
}
private int mouseWheelX;
private int mouseWheelY;
public final void mouseDragged(MouseEvent e) {
int x = e.getX();
int y = e.getY();
if (Client.frameMode != Client.ScreenMode.FIXED && clientFrame != null) {
Insets insets = clientFrame.getInsets();
x -= insets.left;// 4
y -= insets.top;// 22
}
if (mouseWheelDown) {
int xx = mouseWheelX - x;
int yy = mouseWheelY - y;
mouseWheelDragged(xx, yy);
mouseWheelX = x;
mouseWheelY = y;
return;
}
idleTime = 0;
mouseX = x;
mouseY = y;
clickType = DRAG;
}
void mouseWheelDragged(int param1, int param2) {
}
public final void mouseMoved(MouseEvent mouseevent) {
int x = mouseevent.getX();
int y = mouseevent.getY();
if (Client.frameMode != Client.ScreenMode.FIXED && clientFrame != null) {
Insets insets = clientFrame.getInsets();
x -= insets.left;// 4
y -= insets.top;// 22
}
idleTime = 0;
mouseX = x;
mouseY = y;
clickType = MOVE;
}
public void keyPressed(KeyEvent keyevent) {
idleTime = 0;
int key_code = keyevent.getKeyCode();
int key_char = keyevent.getKeyChar();
if (keyevent.isShiftDown()) {
Client.shiftIsDown = true;
}
// keybind
Client.instance.keybindManager.handleBind(key_code);
if (key_code == 9) {
Client.instance.tabToReplyPm();
}
if (key_char == 96)
console.openConsole = !console.openConsole;
if (console.openConsole && (key_code == KeyEvent.VK_PAGE_UP || key_code == KeyEvent.VK_PAGE_DOWN))
console.chooseCommand(key_code == KeyEvent.VK_PAGE_UP);
if (keyevent.isControlDown()) {
Client.controlIsDown = true;
}
if (!Client.loggedIn) {
if (keyevent.isControlDown() && keyevent.getKeyCode() == KeyEvent.VK_Z) {
System.out.println("MouseX: " + (Client.instance.mouseX - Client.frameWidth / 2) + " Mouse Y: " + (Client.instance.mouseY - Client.frameHeight / 2));
System.out.println(Client.instance.mouseX + " - Client.frameWidth / 2, " + Client.instance.mouseY + " - Client.frameHeight / 2");
System.out.println("MouseX: " + Client.instance.mouseX + " Mouse Y: " + Client.instance.mouseY);
System.out.println(Client.instance.mouseX + ", " + Client.instance.mouseY);
System.out.println("---");
}
}
// Ctrl V
if ((keyevent.isControlDown() && keyevent.getKeyCode() == KeyEvent.VK_V)) {
String clipboard = Client.getClipboardContents();
if (Client.loggedIn) {
if (Client.inputString.length() + clipboard.length() >= 128)
return;
Client.inputString += clipboard;
} else if (Client.instance.loginRenderer.getScreen(ScreenType.MAIN)) {
if (Client.instance.loginScreenCursorPos == 0) {
Client.instance.myUsername += clipboard;
if (Client.instance.myUsername.length() > 28) {
Client.instance.myUsername = Client.instance.myUsername.substring(0, 28);
}
} else if (Client.instance.loginScreenCursorPos == 1) {
Client.instance.myPassword += clipboard;
if (Client.instance.myPassword.length() > 20) {
Client.instance.myPassword = Client.instance.myPassword.substring(0, 20);
}
}
}
}
if ((keyevent.isControlDown() && keyevent.getKeyCode() == KeyEvent.VK_X)) {
Client.setClipboardContents(Client.inputString);
Client.inputString = "";
}
if (key_char < 30)
key_char = 0;
if (key_code == 37)
key_char = 1;
if (key_code == 39)
key_char = 2;
if (key_code == 38)
key_char = 3;
if (key_code == 40)
key_char = 4;
if (key_code == 17)
key_char = 5;
if (key_code == 8)
key_char = 8;
if (key_code == 127)
key_char = 8;
if (key_code == 9)
key_char = 9;
if (key_code == 10)
key_char = 10;
if (key_code >= 112 && key_code <= 123)
key_char = (1008 + key_code) - 112;
if (key_code == 36)
key_char = 1000;
if (key_code == 35)
key_char = 1001;
if (key_code == 33)
key_char = 1002;
if (key_code == 34)
key_char = 1003;
if (key_char > 0 && key_char < 128)
keyArray[key_char] = 1;
if (key_char > 4) {
charQueue[writeIndex] = key_char;
writeIndex = writeIndex + 1 & 0x7f;
}
}
public final void keyReleased(KeyEvent keyevent) {
idleTime = 0;
int i = keyevent.getKeyCode();
char c = keyevent.getKeyChar();
if (i == KeyEvent.VK_SHIFT) {
Client.shiftIsDown = false;
}
if (c < '\036')
c = '\0';
if (i == 37)
c = '\001';
if (i == 39)
c = '\002';
if (i == 38)
c = '\003';
if (i == 40)
c = '\004';
if (i == 17)
c = '\005';
if (i == 8)
c = '\b';
if (i == 127)
c = '\b';
if (i == 9)
c = '\t';
if (i == 10)
c = '\n';
if (c > 0 && c < '\200')
keyArray[c] = 0;
if (i == KeyEvent.VK_CONTROL) {
Client.controlIsDown = false;
Client.instance.prayerGrabbed = null;
}
}
public final void keyTyped(KeyEvent keyevent) {
}
public final int readChar(int dummy) {
while (dummy >= 0) {
for (int j = 1; j > 0; j++)
;
}
int k = -1;
if (writeIndex != readIndex) {
k = charQueue[readIndex];
readIndex = readIndex + 1 & 0x7f;
}
return k;
}
public final void focusGained(FocusEvent focusevent) {
awtFocus = true;
shouldClearScreen = true;
raiseWelcomeScreen();
}
public final void focusLost(FocusEvent focusevent) {
awtFocus = false;
for (int i = 0; i < 128; i++) {
keyArray[i] = 0;
}
}
public final void windowActivated(WindowEvent windowevent) {
}
public final void windowClosed(WindowEvent windowevent) {
}
public final void windowClosing(WindowEvent windowevent) {
destroy();
}
public final void windowDeactivated(WindowEvent windowevent) {
}
public final void windowDeiconified(WindowEvent windowevent) {
}
public final void windowIconified(WindowEvent windowevent) {
}
public final void windowOpened(WindowEvent windowevent) {
}
void startUp() {
}
void processGameLoop() {
}
void cleanUpForQuit() {
}
void processDrawing() {
}
void raiseWelcomeScreen() {
}
Component getGameComponent() {
if (clientFrame != null && !isApplet) {
return clientFrame;
} else {
return this;
}
}
public void startRunnable(Runnable runnable, int i) {
Thread thread = new Thread(runnable);
thread.start();
thread.setPriority(i);
}
void drawLoadingText(int percentage, String loadingText) {
while (graphics == null) {
graphics = (isApplet ? this : clientFrame).getGraphics();
try {
getGameComponent().repaint();
} catch (Exception ignored) {
ignored.printStackTrace();
}
try {
Thread.sleep(1000L);
} catch (Exception ignored) {
ignored.printStackTrace();
}
}
Font font = new Font("Helvetica", 1, 13);
FontMetrics fontmetrics = getGameComponent().getFontMetrics(font);
Font font1 = new Font("Helvetica", 0, 13);
FontMetrics fontmetrics1 = getGameComponent().getFontMetrics(font1);
if (shouldClearScreen) {
graphics.setColor(Color.black);
graphics.fillRect(0, 0, Client.frameWidth, Client.frameHeight);
shouldClearScreen = false;
}
Color color = new Color(140, 17, 17);
int y = Client.frameHeight / 2 - 18;
graphics.setColor(color);
graphics.drawRect(Client.frameWidth / 2 - 152, y, 304, 34);
graphics.fillRect(Client.frameWidth / 2 - 150, y + 2, percentage * 3, 30);
graphics.setColor(Color.black);
graphics.fillRect((Client.frameWidth / 2 - 150) + percentage * 3, y + 2, 300 - percentage * 3, 30);
graphics.setFont(font);
graphics.setColor(Color.white);
graphics.drawString(loadingText, (Client.frameWidth - fontmetrics.stringWidth(loadingText)) / 2, y + 22);
graphics.drawString("", (Client.frameWidth - fontmetrics1.stringWidth("")) / 2, y - 8);
}
GameApplet() {
delayTime = 20;
minDelay = 1;
shouldDebug = false;
shouldClearScreen = true;
awtFocus = true;
}
}
and my client.java...
Code:
/*
* Copyright (c) 2016-2017, Adam <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.api;
import java.awt.Canvas;
import java.awt.Dimension;
import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import javax.annotation.Nullable;
import net.runelite.api.annotations.VisibleForDevtools;
import net.runelite.api.coords.LocalPoint;
import net.runelite.api.coords.WorldPoint;
import net.runelite.api.hooks.Callbacks;
import net.runelite.api.vars.AccountType;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
import org.slf4j.Logger;
/**
* Represents the RuneScape client.
*/
public interface Client extends GameEngine
{
/**
* The client invokes these callbacks to communicate to
* @Return
*/
Callbacks getCallbacks();
/**
* Retrieve a global logger for the client.
* This is most useful for mixins which can't have their own.
* @Return
*/
Logger getLogger();
/**
* Gets a list of all valid players from the player cache.
*
* @Return a list of all players
*/
List<Player> getPlayers();
/**
* Gets a list of all valid NPCs from the NPC cache.
*
* @Return a list of all NPCs
*/
List<NPC> getNpcs();
/**
* Gets an array of all cached NPCs.
*
* @Return cached NPCs
*/
NPC[] getCachedNPCs();
/**
* Gets an array of all cached players.
*
* @Return cached players
*/
Player[] getCachedPlayers();
/**
* Gets the current modified level of a skill.
*
* @Param skill the skill
* @Return the modified skill level
*/
int getBoostedSkillLevel(Skill skill);
/**
* Gets the real level of a skill.
*
* @Param skill the skill
* @Return the skill level
*/
int getRealSkillLevel(Skill skill);
/**
* Adds a new chat message to the chatbox.
*
* @Param type the type of message
* @Param name the name of the player that sent the message
* @Param message the message contents
* @Param sender the sender/channel name
*/
void addChatMessage(ChatMessageType type, String name, String message, String sender);
/**
* Gets the current game state.
*
* @Return the game state
*/
GameState getGameState();
/**
* Gets the current logged in username.
*
* @Return the logged in username
*/
String getUsername();
/**
* Sets the current logged in username.
*
* @Param name the logged in username
*/
void setUsername(String name);
/**
* Gets the account type of the logged in player.
*
* @Return the account type
*/
AccountType getAccountType();
@Override
Canvas getCanvas();
/**
* Gets the current FPS (frames per second).
*
* @Return the FPS
*/
int getFPS();
/**
* Gets the x-axis coordinate of the camera.
* <p>
* This value is a local coordinate value similar to
* {@link #getLocalDestinationLocation()}.
*
* @Return the camera x coordinate
*/
int getCameraX();
/**
* Gets the y-axis coordinate of the camera.
* <p>
* This value is a local coordinate value similar to
* {@link #getLocalDestinationLocation()}.
*
* @Return the camera y coordinate
*/
int getCameraY();
/**
* Gets the z-axis coordinate of the camera.
* <p>
* This value is a local coordinate value similar to
* {@link #getLocalDestinationLocation()}.
*
* @Return the camera z coordinate
*/
int getCameraZ();
/**
* Gets the actual pitch of the camera.
* <p>
* The value returned by this method is measured in JAU, or Jagex
* Angle Unit, which is 1/1024 of a revolution.
*
* @Return the camera pitch
*/
int getCameraPitch();
/**
* Gets the yaw of the camera.
*
* @Return the camera yaw
*/
int getCameraYaw();
/**
* Gets the current world number of the logged in player.
*
* @Return the logged in world number
*/
int getWorld();
/**
* Gets the height of the viewport.
*
* @Return the viewport height
*/
int getViewportHeight();
/**
* Gets the width of the viewport.
*
* @Return the viewport width
*/
int getViewportWidth();
/**
* Gets the x-axis offset of the viewport.
*
* @Return the x-axis offset
*/
int getViewportXOffset();
/**
* Gets the y-axis offset of the viewport.
*
* @Return the y-axis offset
*/
int getViewportYOffset();
/**
* Gets the scale of the world (zoom value).
*
* @Return the world scale
*/
int getScale();
/**
* Gets the current position of the mouse on the canvas.
*
* @Return the mouse canvas position
*/
Point getMouseCanvasPosition();
/**
* Gets a 3D array containing the heights of tiles in the
* current scene.
*
* @Return the tile heights
*/
int[][][] getTileHeights();
/**
* Gets a 3D array containing the settings of tiles in the
* current scene.
*
* @Return the tile settings
*/
byte[][][] getTileSettings();
/**
* Gets the current plane the player is on.
* <p>
* This value indicates the current map level above ground level, where
* ground level is 0. For example, going up a ladder in Lumbridge castle
* will put the player on plane 1.
* <p>
* Note: This value will never be below 0. Basements and caves below ground
* level use a tile offset and are still considered plane 0 by the game.
*
* @Return the plane
*/
int getPlane();
/**
* Gets the current scene
*/
Scene getScene();
/**
* Gets the logged in player instance.
*
* @Return the logged in player
*/
Player getLocalPlayer();
/**
* Gets the item composition corresponding to an items ID.
*
* @Param id the item ID
* @Return the corresponding item composition
* @see ItemID
*/
ItemComposition getItemDefinition(int id);
/**
* Creates an item icon sprite with passed variables.
*
* @Param itemId the item ID
* @Param quantity the item quantity
* @Param border whether to draw a border
* @Param shadowColor the shadow color
* @Param stackable whether the item is stackable
* @Param noted whether the item is noted
* @Param scale the scale of the sprite
* @Return the created sprite
*/
SpritePixels createItemSprite(int itemId, int quantity, int border, int shadowColor, int stackable, boolean noted, int scale);
/**
* Loads and creates the sprite image of the passed archive and file IDs.
*
* @Param source the sprite database
* @Param archiveId the sprites archive ID
* @Param fileId the sprites file ID
* @Return the sprite image of the file
*/
SpritePixels getSprite(IndexDataBase source, int archiveId, int fileId);
/**
* Gets the sprite index database.
*
* @Return the sprite database
*/
IndexDataBase getIndexSprites();
/**
* Returns the x-axis base coordinate.
* <p>
* This value is the x-axis world coordinate of tile (0, 0) in
* the current scene (ie. the bottom-left most coordinates in the scene).
*
* @Return the base x-axis coordinate
*/
int getBaseX();
/**
* Returns the y-axis base coordinate.
* <p>
* This value is the y-axis world coordinate of tile (0, 0) in
* the current scene (ie. the bottom-left most coordinates in the scene).
*
* @Return the base y-axis coordinate
*/
int getBaseY();
/**
* Gets the current mouse button that is pressed.
*
* @Return the pressed mouse button
*/
int getMouseCurrentButton();
/**
* Gets the currently selected tile (ie. last right clicked tile).
*
* @Return the selected tile
*/
Tile getSelectedSceneTile();
/**
* Checks whether a widget is currently being dragged.
*
* @Return true if dragging a widget, false otherwise
*/
boolean isDraggingWidget();
/**
* Gets the widget currently being dragged.
*
* @Return the dragged widget, null if not dragging any widget
*/
Widget getDraggedWidget();
/**
* Gets the widget that is being dragged on.
* <p>
* The widget being dragged has the {@link net.runelite.api.widgets.WidgetConfig#DRAG_ON}
* flag set, and is the widget currently under the dragged widget.
*
* @Return the dragged on widget, null if not dragging any widget
*/
Widget getDraggedOnWidget();
/**
* Sets the widget that is being dragged on.
*
* @Param widget the new dragged on widget
*/
void setDraggedOnWidget(Widget widget);
/**
* Gets the root widgets.
*
* @Return the root widgets
*/
Widget[] getWidgetRoots();
/**
* Gets a widget corresponding to the passed widget info.
*
* @Param widget the widget info
* @Return the widget
*/
Widget getWidget(WidgetInfo widget);
/**
* Gets a widget by its raw group ID and child ID.
* <p>
* Note: Use {@link #getWidget(WidgetInfo)} for a more human-readable
* version of this method.
*
* @Param groupId the group ID
* @Param childId the child widget ID
* @Return the widget corresponding to the group and child pair
*/
Widget getWidget(int groupId, int childId);
/**
* Gets an array containing the x-axis canvas positions
* of all widgets.
*
* @Return array of x-axis widget coordinates
*/
int[] getWidgetPositionsX();
/**
* Gets an array containing the y-axis canvas positions
* of all widgets.
*
* @Return array of y-axis widget coordinates
*/
int[] getWidgetPositionsY();
/**
* Gets the current run energy of the logged in player.
*
* @Return the run energy
*/
int getEnergy();
/**
* Gets an array of options that can currently be used on other players.
* <p>
* For example, if the player is in a PVP area the "Attack" option
* will become available in the array. Otherwise, it won't be there.
*
* @Return an array of options
*/
String[] getPlayerOptions();
/**
* Gets an array of whether an option is enabled or not.
*
* @Return the option priorities
*/
boolean[] getPlayerOptionsPriorities();
/**
* Gets an array of player menu types.
*
* @Return the player menu types
*/
int[] getPlayerMenuTypes();
/**
* Gets a list of all RuneScape worlds.
*
* @Return world list
*/
World[] getWorldList();
/**
* Gets an array of currently open right-click menu entries that can be
* clicked and activated.
*
* @Return array of open menu entries
*/
MenuEntry[] getMenuEntries();
/**
* Sets the array of open menu entries.
* <p>
* This method should typically be used in the context of the {@link net.runelite.api.events.MenuOpened}
* event, since setting the menu entries will be overwritten the next
* time the menu entries are calculated.
*
* @Param entries new array of open menu entries
*/
void setMenuEntries(MenuEntry[] entries);
/**
* Checks whether a right-click menu is currently open.
*
* @Return true if a menu is open, false otherwise
*/
boolean isMenuOpen();
/**
* Gets the angle of the map, or camera yaw.
*
* @Return the map angle
*/
int getMapAngle();
/**
* Checks whether the client window is currently resized.
*
* @Return true if resized, false otherwise
*/
boolean isResized();
/**
* Gets the client revision number.
*
* @Return the revision
*/
int getRevision();
/**
* Gets an array of map region IDs that are currently loaded.
*
* @Return the map regions
*/
int[] getMapRegions();
/**
* Contains a 3D array of template chunks for instanced areas.
* <p>
* The array returned is of format [z][x][y], where z is the
* plane, x and y the x-axis and y-axis coordinates of a tile
* divided by the size of a chunk.
* <p>
* The bits of the int value held by the coordinates are structured
* with the following format:
* <ul>
* <li>Bits 7 and 8 correspond to the plane</li>
* <li>Bits 9 to 18 correspond to the x-axis coordinate of the chunk</li>
* <li>Bits 19 to 29 correspond to the y-axis coordinate of the chunk</li>
* <li>Bits 30 and 31 correspond to the chunks rotation</li>
* </ul>
* Note: The above positions assume that the left-most bit of an integer
* is bit position 1, and the right-most bit 32.
* ie.
* 0000 0000 0000 0000 0000 0000 0000 0000
* PP XXXX XXXX XXYY YYYY YYYY YRR
* Where P is the plane, X and Y the x/y axis coordinates, and R the chunks
* rotation.
*
* @Return the array of instance template chunks
* @see Constants#CHUNK_SIZE
* @see InstanceTemplates
*/
int[][][] getInstanceTemplateChunks();
/**
* Returns a 2D array containing XTEA encryption keys used to decrypt
* map region files.
* <p>
* The array maps the region keys at index {@code n} to the region
* ID held in {@link #getMapRegions()} at {@code n}.
* <p>
* The array of keys for the region make up a 128-bit encryption key
* spread across 4 integers.
*
* @Return the XTEA encryption keys
*/
int[][] getXteaKeys();
/**
* Gets an array of all client variables.
*
* @Return local player variables
*/
@VisibleForDevtools
int[] getVarps();
/**
* Gets an array of all integer client variables.
*
* @Return local variables
*/
@VisibleForDevtools
int[] getIntVarcs();
/**
* Gets an array of all string client variables.
*
* @Return local variables
*/
@VisibleForDevtools
String[] getStrVarcs();
/**
* Gets the value corresponding to the passed player variable.
*
* @Param varPlayer the player variable
* @Return the value
*/
int getVar(VarPlayer varPlayer);
/**
* Gets a value corresponding to the passed variable.
*
* @Param varbit the variable
* @Return the value
*/
int getVar(Varbits varbit);
/**
* Gets an int value corresponding to the passed variable.
*
* @Param varClientInt the variable
* @Return the value
*/
int getVar(VarClientInt varClientInt);
/**
* Gets a String value corresponding to the passed variable.
*
* @Param varClientStr the variable
* @Return the value
*/
String getVar(VarClientStr varClientStr);
/**
* Sets the given variable
*
* @Param varClientStr
* @Param value
*/
void setVar(VarClientStr varClientStr, String value);
/**
* Sets the value of a given variable.
*
* @Param varbit the variable
* @Param value the new value
*/
@VisibleForDevtools
void setSetting(Varbits varbit, int value);
/**
* Gets the value of a given variable.
*
* @Param varps passed varbits
* @Param varbitId the variable ID
* @Return the value
* @see Varbits#id
*/
@VisibleForDevtools
int getVarbitValue(int[] varps, int varbitId);
/**
* Gets the value of a given VarPlayer.
*
* @Param varps passed varps
* @Param varpId the VarpPlayer id
* @Return the value
* @see VarPlayer#id
*/
@VisibleForDevtools
int getVarpValue(int[] varps, int varpId);
/**
* Sets the value of a given VarPlayer.
*
* @Param varps passed varps
* @Param varpId the VarpPlayer id
* @Param value the value
* @see VarPlayer#id
*/
@VisibleForDevtools
void setVarpValue(int[] varps, int varpId, int value);
/**
* Sets the value of a given variable.
*
* @Param varps passed varbits
* @Param varbit the variable
* @Param value the value
* @see Varbits#id
*/
@VisibleForDevtools
void setVarbitValue(int[] varps, int varbit, int value);
/**
* Gets the widget flags table.
*
* @Return the widget flags table
*/
HashTable getWidgetFlags();
/**
* Gets the widget node component table.
*
* @Return the widget node component table
* @see WidgetNode
*/
HashTable<WidgetNode> getComponentTable();
/**
* Gets an array of current grand exchange offers.
*
* @Return all grand exchange offers
*/
GrandExchangeOffer[] getGrandExchangeOffers();
/**
* Checks whether or not a prayer is currently active.
*
* @Param prayer the prayer
* @Return true if the prayer is active, false otherwise
*/
boolean isPrayerActive(Prayer prayer);
/**
* Gets the current experience towards a skill.
*
* @Param skill the skill
* @Return the experience
*/
int getSkillExperience(Skill skill);
/**
* Gets the game drawing mode.
*
* @Return the game drawing mode
*/
int getGameDrawingMode();
/**
* Sets the games drawing mode.
*
* @Param gameDrawingMode the new drawing mode
*/
void setGameDrawingMode(int gameDrawingMode);
/**
* Refreshes the chat.
*/
void refreshChat();
/**
* Gets the map of chat buffers.
*
* @Return the chat buffers
*/
Map<Integer, ChatLineBuffer> getChatLineMap();
/**
* Gets the viewport widget.
* <p>
* The viewport is the area of the game above the chatbox
* and to the left of the mini-map.
*
* @Return the viewport widget
*/
Widget getViewportWidget();
/**
* Gets the object composition corresponding to an objects ID.
*
* @Param objectId the object ID
* @Return the corresponding object composition
* @see ObjectID
*/
ObjectComposition getObjectDefinition(int objectId);
/**
* Gets the NPC composition corresponding to an NPCs ID.
*
* @Param npcId the npc ID
* @Return the corresponding NPC composition
* @see NpcID
*/
NPCComposition getNpcDefinition(int npcId);
/**
* Gets an array of all world areas
*
* @Return the world areas
*/
Area[] getMapAreas();
/**
* Gets a sprite of the map scene
*
* @Return the sprite
*/
IndexedSprite[] getMapScene();
/**
* Gets an array of currently drawn mini-map dots.
*
* @Return all mini-map dots
*/
SpritePixels[] getMapDots();
/**
* Gets the local clients game cycle.
* <p>
* Note: This value is incremented every 20ms.
*
* @Return the game cycle
*/
int getGameCycle();
/**
* Gets an array of current map icon sprites.
*
* @Return the map icons
*/
SpritePixels[] getMapIcons();
/**
* Gets an array of mod icon sprites.
*
* @Return the mod icons
*/
IndexedSprite[] getModIcons();
/**
* Replaces the current mod icons with a new array.
*
* @Param modIcons the new mod icons
*/
void setModIcons(IndexedSprite[] modIcons);
/**
* Creates an empty indexed sprite.
*
* @Return the sprite
*/
IndexedSprite createIndexedSprite();
/**
* Creates a sprite image with given width and height containing the
* pixels.
*
* @Param pixels the pixels
* @Param width the width
* @Param height the height
* @Return the sprite image
*/
SpritePixels createSpritePixels(int[] pixels, int width, int height);
/**
* Gets the location of the local player.
*
* @Return the local player location
*/
@nullable
LocalPoint getLocalDestinationLocation();
/**
* Gets a list of all projectiles currently spawned.
*
* @Return all projectiles
*/
List<Projectile> getProjectiles();
/**
* Gets a list of all graphics objects currently drawn.
*
* @Return all graphics objects
*/
List<GraphicsObject> getGraphicsObjects();
/**
* Play a sound effect at the player's current location. This is how UI,
* and player-generated (e.g. mining, woodcutting) sound effects are
* normally played.
*
* @Param id the ID of the sound to play. Any int is allowed, but see
* {@link SoundEffectID} for some common ones
*/
void playSoundEffect(int id);
/**
* Play a sound effect from some point in the world.
*
* @Param id the ID of the sound to play. Any int is allowed, but see
* {@link SoundEffectID} for some common ones
* @Param x the ground coordinate on the x axis
* @Param y the ground coordinate on the y axis
* @Param range the number of tiles away that the sound can be heard
* from
*/
void playSoundEffect(int id, int x, int y, int range);
/**
* Gets the clients graphic buffer provider.
*
* @Return the buffer provider
*/
BufferProvider getBufferProvider();
/**
* Gets the amount of ticks since the last mouse movement occurred.
*
* @Return amount of idle mouse ticks
*/
int getMouseIdleTicks();
/**
* Gets the amount of ticks since the last keyboard press occurred.
*
* @Return amount of idle keyboard ticks
*/
int getKeyboardIdleTicks();
/**
* Changes how game behaves based on memory mode. Low memory mode skips
* drawing of all floors and renders ground textures in low quality.
*
* @Param lowMemory if we are running in low memory mode or not
*/
void changeMemoryMode(boolean lowMemory);
/**
* Get the item container for an inventory.
*
* @Param inventory the inventory type
* @Return the item container
*/
@nullable
ItemContainer getItemContainer(InventoryID inventory);
/**
* Gets the index of the last integer added to the
* {@link #getIntStack()} array.
*
* @Return the array index
*/
int getIntStackSize();
/**
* Sets the index of the last integer added to the
* {@link #getIntStack()} array.
*
* @Param stackSize the array index
*/
void setIntStackSize(int stackSize);
/**
* Gets the integer stack
*
* @Return the array
*/
int[] getIntStack();
/**
* Gets the index of the last string added to the
* {@link #getStringStack()} array.
*
* @Return the array index
*/
int getStringStackSize();
/**
* Sets the index of the last string added to the
* {@link #getStringStack()} array.
*
* @Param stackSize the array index
*/
void setStringStackSize(int stackSize);
/**
* Gets the string stack
*
* @Return the string stack
*/
String[] getStringStack();
/**
* Checks whether a player is on the friends list.
*
* @Param name the name of the player
* @Param mustBeLoggedIn if they player is online
* @Return true if the player is friends
*/
boolean isFriended(String name, boolean mustBeLoggedIn);
/**
* Gets the number of players in the clan chat.
*
* @Return the number of clan chat members
*/
int getClanChatCount();
/**
* Gets an array of players in the clan chat.
*
* @Return the clan chat members, null if not in a clan
*/
ClanMember[] getClanMembers();
/**
* Gets an array of players in the friends list.
*
* @Return the friends list
*/
Friend[] getFriends();
/**
* Checks whether a player is in the same clan chat.
*
* @Param name the name of the player
* @Return true if the player is in clan chat
*/
boolean isClanMember(String name);
/**
* Gets the clients saved preferences.
*
* @Return the client preferences
*/
Preferences getPreferences();
/**
* Sets whether the camera pitch can exceed the normal limits set
* by the RuneScape client.
*
* @Param enabled new camera pitch relaxer value
*/
void setCameraPitchRelaxerEnabled(boolean enabled);
/**
* Gets the world map overview.
*
* @Return the world map overview
*/
RenderOverview getRenderOverview();
/**
* Checked whether the client is in stretched mode.
*
* @Return true if the client is in stretched, false otherwise
*/
boolean isStretchedEnabled();
/**
* Sets the client stretched mode state.
*
* @Param state new stretched mode state
*/
void setStretchedEnabled(boolean state);
/**
* Checks whether the client is using fast rendering techniques when
* stretching the client in fixed mode.
*
* @Return true if client is fast rendering, false otherwise
*/
boolean isStretchedFast();
/**
* Sets whether to use fast rendering techniques when in stretch
* fixed mode.
*
* @Param state new fast rendering state
*/
void setStretchedFast(boolean state);
/**
* Sets whether to force integer scale factor by rounding scale
* factors towards {@code zero} when stretching fixed mode.
*
* @Param state new integer scaling state
*/
void setStretchedIntegerScaling(boolean state);
/**
* Sets whether to keep aspect ratio when stretching fixed mode.
*
* @Param state new keep aspect ratio state
*/
void setStretchedKeepAspectRatio(boolean state);
/**
* Gets the current stretched dimensions of the client.
*
* @Return the stretched dimensions
*/
Dimension getStretchedDimensions();
/**
* Gets the real dimensions of the client before being stretched.
*
* @Return the real dimensions
*/
Dimension getRealDimensions();
/**
* Changes the selected world to log in to.
* <p>
* Note: this method will have no effect unless {@link GameState}
* is {@link GameState#LOGIN_SCREEN}.
*
* @Param world the world to switch to
*/
void changeWorld(World world);
/**
* Creates a new instance of a world.
*
* @Return the created world
*/
World createWorld();
/**
* Draws an instance map for the current viewed plane.
*
* @Param z the plane
* @Return the map sprite
*/
SpritePixels drawInstanceMap(int z);
/**
* Runs a RuneLite script.
*
* @Param id the script ID
* @Param args additional arguments to execute the script with
* @see ScriptID
*/
void runScript(int id, Object... args);
/**
* Checks whether or not there is any active hint arrow.
*
* @Return true if there is a hint arrow, false otherwise
*/
boolean hasHintArrow();
/**
* Gets the type of hint arrow currently displayed.
*
* @Return the hint arrow type
*/
HintArrowType getHintArrowType();
/**
* Clears the current hint arrow.
*/
void clearHintArrow();
/**
* Sets a hint arrow to point to the passed location.
*
* @Param point the location
*/
void setHintArrow(WorldPoint point);
/**
* Sets a hint arrow to point to the passed player.
*
* @Param player the player
*/
void setHintArrow(Player player);
/**
* Sets a hint arrow to point to the passed NPC.
*
* @Param npc the NPC
*/
void setHintArrow(NPC npc);
/**
* Gets the world point that the hint arrow is directed at.
*
* @Return hint arrow target
*/
WorldPoint getHintArrowPoint();
/**
* Gets the player that the hint arrow is directed at.
*
* @Return hint arrow target
*/
Player getHintArrowPlayer();
/**
* Gets the NPC that the hint arrow is directed at.
*
* @Return hint arrow target
*/
NPC getHintArrowNpc();
/**
* Checks whether animation smoothing is enabled for players.
*
* @Return true if player animation smoothing is enabled, false otherwise
*/
boolean isInterpolatePlayerAnimations();
/**
* Sets the animation smoothing state for players.
*
* @Param interpolate the new smoothing state
*/
void setInterpolatePlayerAnimations(boolean interpolate);
/**
* Checks whether animation smoothing is enabled for NPC.
*
* @Return true if NPC animation smoothing is enabled, false otherwise
*/
boolean isInterpolateNpcAnimations();
/**
* Sets the animation smoothing state for NPCs.
*
* @Param interpolate the new smoothing state
*/
void setInterpolateNpcAnimations(boolean interpolate);
/**
* Checks whether animation smoothing is enabled for objects.
*
* @Return true if object animation smoothing is enabled, false otherwise
*/
boolean isInterpolateObjectAnimations();
/**
* Sets the animation smoothing state for objects.
*
* @Param interpolate the new smoothing state
*/
void setInterpolateObjectAnimations(boolean interpolate);
/**
* Checks whether the logged in player is in an instanced region.
*
* @Return true if the player is in instanced region, false otherwise
*/
boolean isInInstancedRegion();
/**
* Sets whether the client is hiding entities.
* <p>
* This method does not itself hide any entities. It behaves as a master
* switch for whether or not any of the related entities are hidden or
* shown. If this method is set to false, changing the configurations for
* specific entities will have no effect.
*
* @Param state new entity hiding state
*/
void setIsHidingEntities(boolean state);
/**
* Sets whether or not other players are hidden.
*
* @Param state the new player hidden state
*/
void setPlayersHidden(boolean state);
/**
* Sets whether 2D sprites (ie. overhead prayers, PK skull) related to
* the other players are hidden.
*
* @Param state the new player 2D hidden state
*/
void setPlayersHidden2D(boolean state);
/**
* Sets whether or not friends are hidden.
*
* @Param state the new friends hidden state
*/
void setFriendsHidden(boolean state);
/**
* Sets whether or not clan mates are hidden.
*
* @Param state the new clan mates hidden state
*/
void setClanMatesHidden(boolean state);
/**
* Sets whether the local player is hidden.
*
* @Param state new local player hidden state
*/
void setLocalPlayerHidden(boolean state);
/**
* Sets whether 2D sprites (ie. overhead prayers, PK skull) related to
* the local player are hidden.
*
* @Param state new local player 2D hidden state
*/
void setLocalPlayerHidden2D(boolean state);
/**
* Sets whether NPCs are hidden.
*
* @Param state new NPC hidden state
*/
void setNPCsHidden(boolean state);
/**
* Sets whether 2D sprites (ie. overhead prayers) related to
* the NPCs are hidden.
*
* @Param state new NPC 2D hidden state
*/
void setNPCsHidden2D(boolean state);
/**
* Sets whether attacking players or NPCs are hidden.
*
* @Param state new attacker hidden state
*/
void setAttackersHidden(boolean state);
/**
* Sets whether projectiles are hidden.
*
* @Param state new projectile hidden state
*/
void setProjectilesHidden(boolean state);
/**
* Gets an array of tile collision data.
* <p>
* The index into the array is the plane/z-axis coordinate.
*
* @Return the collision data
*/
CollisionData[] getCollisionMaps();
@VisibleForDevtools
int[] getBoostedSkillLevels();
@VisibleForDevtools
int[] getRealSkillLevels();
@VisibleForDevtools
int[] getSkillExperiences();
@VisibleForDevtools
int[] getChangedSkills();
@VisibleForDevtools
int getChangedSkillsCount();
@VisibleForDevtools
void setChangedSkillsCount(int i);
/**
* Sets a mapping of sprites to override.
* <p>
* The key value in the map corresponds to the ID of the sprite,
* and the value the sprite to replace it with.
*
* @Param overrides the sprites to override
*/
void setSpriteOverrides(Map<Integer, SpritePixels> overrides);
/**
* Sets a mapping of widget sprites to override.
* <p>
* The key value in the map corresponds to the packed widget ID,
* and the value the sprite to replace the widgets sprite with.
*
* @Param overrides the sprites to override
*/
void setWidgetSpriteOverrides(Map<Integer, SpritePixels> overrides);
/**
* Sets the compass sprite.
*
* @Param spritePixels the new sprite
*/
void setCompass(SpritePixels spritePixels);
/**
* Gets the current server tick count.
*
* @Return the tick count
*/
int getTickCount();
/**
* Sets the current server tick count.
*
* @Param tickCount the new tick count
*/
void setTickCount(int tickCount);
/**
* Sets the inventory drag delay in client game cycles (20ms).
*
* @Param delay the number of game cycles to delay dragging
*/
void setInventoryDragDelay(int delay);
/**
* Gets a set of current world types that apply to the logged in world.
*
* @Return the types for current world
*/
EnumSet<WorldType> getWorldType();
/**
* Sets the enabled state for the Oculus orb state
*
* @Param state boolean enabled value
*/
void setOculusOrbState(int state);
/**
* Sets the normal moving speed when using oculus orb (default value is 12)
*
* @Param speed speed
*/
void setOculusOrbNormalSpeed(int speed);
}
Thanks for anyone that has any ideas!!!