public class ScriptPaint
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
MAX_DRAW_DISTANCE |
Constructor and Description |
---|
ScriptPaint(ClientContext ctx) |
Modifier and Type | Method and Description |
---|---|
boolean |
drawNpcMatrix(java.awt.Graphics2D graphics2D,
SimpleNpc simpleNpc)
Draws a specified simplenpc's click bounds in-game
|
boolean |
drawObjectMatrix(java.awt.Graphics2D graphics2D,
SimpleObject simpleObject)
Draws a specified simplenpc's click bounds in-game
|
boolean |
drawTileMatrix(java.awt.Graphics2D graphics2D,
net.runelite.api.coords.WorldPoint point,
java.awt.Color color)
Draws a specified world point's bounds in game
|
java.lang.String |
formatTime(long timeInMillis)
Will return a formatted string of time given a number in milliseconds
|
java.awt.image.BufferedImage |
getImage(java.lang.String url)
Retrieves an image from the given website {url}, caches the image for you so you don't have to
|
int |
valuePerHour(int value,
long startTime)
Will return the hourly rate of the specified {value}
|
public static final int MAX_DRAW_DISTANCE
public ScriptPaint(ClientContext ctx)
public java.lang.String formatTime(long timeInMillis)
timeInMillis
- the number of milliseconds to format usually will be {System.currentTimeMillis() - startTime}public int valuePerHour(int value, long startTime)
value
- value to get hourly rate ofstartTime
- the starting time for this calculationpublic boolean drawTileMatrix(java.awt.Graphics2D graphics2D, net.runelite.api.coords.WorldPoint point, java.awt.Color color)
graphics2D
- the graphics object to use for painting the pointpoint
- the world point to drawcolor
- the outline color of the world pointpublic boolean drawNpcMatrix(java.awt.Graphics2D graphics2D, SimpleNpc simpleNpc)
graphics2D
- the graphics object to use for painting the pointsimpleNpc
- the npc to drawpublic boolean drawObjectMatrix(java.awt.Graphics2D graphics2D, SimpleObject simpleObject)
graphics2D
- the graphics object to use for painting the pointsimpleObject
- the npc to drawpublic java.awt.image.BufferedImage getImage(java.lang.String url)
url
- the url to grab the image from