public class ClientContext
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
SimpleBank |
bank |
simple.api.Bot |
bot |
SimpleChat |
chat |
SimpleClient |
client |
SimpleCombat |
combat |
SimpleDefinitions |
definitions |
SimpleDialogue |
dialogue |
SimpleEquipment |
equipment |
SimpleGame |
game |
SimpleGraphicsObjects |
graphicsObjects |
SimpleGroundItems |
groundItems |
SimpleInventory |
inventory |
simple.api.input.SimpleKeyboard |
keyboard |
java.util.logging.Logger |
logger |
SimpleMagic |
magic |
simple.api.SimpleMenuActions |
menuActions |
simple.api.input.SimpleMouse |
mouse |
SimpleNpcs |
npcs |
SimpleObjects |
objects |
ScriptPaint |
paint |
SimplePathing |
pathing |
SimplePlayers |
players |
SimplePrayers |
prayers |
SimpleProjectiles |
projectiles |
SimpleQuickGear |
quickGear |
SimpleShop |
shop |
SimpleSkills |
skills |
SimpleTeleporter |
teleporter |
SimpleVarpbits |
varpbits |
SimpleWidgets |
widgets |
Constructor and Description |
---|
ClientContext(SimpleClient client,
java.applet.Applet applet) |
Modifier and Type | Method and Description |
---|---|
simple.bot.internal.IClient |
getClient() |
static ClientContext |
instance() |
void |
log(java.lang.String log,
java.lang.Object... objects)
Will print specified formatted string {log} to console and script log inside of the bot panel
|
boolean |
onCondition(java.util.function.BooleanSupplier condition)
Will sleep the current thread for a maximum of 5 seconds whilst checking if the {condition} has been met every 500ms's
|
boolean |
onCondition(java.util.function.BooleanSupplier condition,
int timeout)
Will sleep the current thread for a maximum of {timeout}ms's whilst checking if the {condition} has been met every 500ms's
|
boolean |
onCondition(java.util.function.BooleanSupplier condition,
int timeout,
int amount)
Will sleep the current thread for the specified {timeout} * {amount} or until the {condition} is met.
|
boolean |
sendLogout()
Will log you out if you're currently logged in
|
void |
sleep(int ms)
Will sleep the current thread for {ms}ms's
|
void |
sleep(int min,
int max)
Will sleep the current thread for a random amount of time between {min} and {max}
|
boolean |
sleepCondition(java.util.function.BooleanSupplier condition)
Refer to {onCondition(BooleanSupplier condition)}
|
boolean |
sleepCondition(java.util.function.BooleanSupplier condition,
int timeout)
Refer to {onCondition(BooleanSupplier condition, int timeout)}
|
boolean |
stopScript()
Will stop the currently running script, returns {true} if it has been stopped {false} otherwise
|
void |
submitLogCapture(java.lang.String log)
Will print {log} to script log inside of the bot panel
|
public final java.util.logging.Logger logger
public final SimpleClient client
public final SimplePlayers players
public final SimpleNpcs npcs
public final SimpleDefinitions definitions
public final SimpleGroundItems groundItems
public final SimpleProjectiles projectiles
public final SimpleInventory inventory
public final SimpleEquipment equipment
public final SimpleBank bank
public final SimpleSkills skills
public final SimpleVarpbits varpbits
public final SimpleCombat combat
public final SimplePathing pathing
public final SimpleDialogue dialogue
public final SimpleObjects objects
public final SimpleGame game
public final simple.api.input.SimpleMouse mouse
public final simple.api.input.SimpleKeyboard keyboard
public final ScriptPaint paint
public final SimpleTeleporter teleporter
public final SimpleWidgets widgets
public final SimplePrayers prayers
public final SimpleChat chat
public final SimpleMagic magic
public final SimpleQuickGear quickGear
public final SimpleShop shop
public final SimpleGraphicsObjects graphicsObjects
public final simple.api.SimpleMenuActions menuActions
public final simple.api.Bot bot
public ClientContext(SimpleClient client, java.applet.Applet applet)
public static ClientContext instance()
public simple.bot.internal.IClient getClient()
public boolean stopScript()
public void log(java.lang.String log, java.lang.Object... objects)
log
- objects
- public void submitLogCapture(java.lang.String log)
log
- public boolean sendLogout()
public boolean sleepCondition(java.util.function.BooleanSupplier condition)
public boolean sleepCondition(java.util.function.BooleanSupplier condition, int timeout)
public boolean onCondition(java.util.function.BooleanSupplier condition)
condition
- the condition to sleep for until it is metpublic boolean onCondition(java.util.function.BooleanSupplier condition, int timeout)
condition
- the condition to sleep for until it is mettimeout
- the max amount of milliseconds to wait for checking the {condition}public boolean onCondition(java.util.function.BooleanSupplier condition, int timeout, int amount)
condition
- the condition to sleep for until it is mettimeout
- the amount of milliseconds to wait before checking the {condition} againamount
- the amount of times to check if the {condition} has been metpublic void sleep(int ms)
ms
- how long in milliseconds to sleep the current thread forpublic void sleep(int min, int max)
min
- minimum ms's to sleep formax
- maximum ms's to sleep for