Package rs.kreme.ksbot.api
Class KSContext
- java.lang.Object
-
- rs.kreme.ksbot.api.KSContext
-
public class KSContext extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description AntiBan
antiBan
Bank
bank
Chat
chat
Combat
combat
Consumables
consumables
Dialog
dialog
Equipment
equipment
GraphicsObjects
graphicsObjects
GroundItems
groundItems
GameObjects
groundObjects
Inventory
inventory
Keyboard
keyboard
Lootable
lootable
Magic
magic
NPCs
npcs
Paint
paint
Pathing
pathing
Players
players
Prayer
prayer
Production
production
java.util.List<rs.kreme.ksbot.api.scripts.randoms.RandomEvent>
randomEvents
rs.kreme.ksbot.api.game.AutoReply
reply
Shop
shop
Skills
skills
Teleporter
teleporter
Tiles
tiles
Trade
trade
User
user
Vars
vars
Widgets
widgets
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
destroy()
static KSContext
getInstance()
void
init()
void
log(java.lang.Object message, java.lang.Object... args)
boolean
onCondition(java.util.function.BooleanSupplier condition, int pollRate, int pollAmount)
Sleeps until the given condition is met or the maximum number of polling attempts is reached.boolean
onProcess()
void
sendLogout()
boolean
sleep(int min, int max)
boolean
sleep(long ms)
boolean
sleepTick()
boolean
sleepTicks(int ticks)
boolean
sleepTicksUntil(java.util.function.BooleanSupplier supplier, int ticks)
boolean
sleepUntil(java.util.function.BooleanSupplier supplier, int timeOut)
boolean
sleepUntil(java.util.function.BooleanSupplier supplier, int pollingRate, int timeOut)
boolean
sleepUntil(java.util.function.BooleanSupplier supplier, java.util.function.BooleanSupplier resetSupplier, int timeOut)
boolean
sleepUntil(java.util.function.BooleanSupplier supplier, java.util.function.BooleanSupplier resetSupplier, int pollingRate, int timeOut)
void
stopScript()
void
stopScript(java.lang.String message)
-
-
-
Field Detail
-
randomEvents
public java.util.List<rs.kreme.ksbot.api.scripts.randoms.RandomEvent> randomEvents
-
antiBan
public AntiBan antiBan
-
reply
public rs.kreme.ksbot.api.game.AutoReply reply
-
bank
public Bank bank
-
chat
public Chat chat
-
combat
public Combat combat
-
consumables
public Consumables consumables
-
dialog
public Dialog dialog
-
equipment
public Equipment equipment
-
graphicsObjects
public GraphicsObjects graphicsObjects
-
inventory
public Inventory inventory
-
keyboard
public Keyboard keyboard
-
lootable
public Lootable lootable
-
magic
public Magic magic
-
npcs
public NPCs npcs
-
paint
public Paint paint
-
pathing
public Pathing pathing
-
players
public Players players
-
prayer
public Prayer prayer
-
shop
public Shop shop
-
skills
public Skills skills
-
teleporter
public Teleporter teleporter
-
groundItems
public GroundItems groundItems
-
groundObjects
public GameObjects groundObjects
-
production
public Production production
-
tiles
public Tiles tiles
-
trade
public Trade trade
-
widgets
public Widgets widgets
-
user
public User user
-
vars
public Vars vars
-
-
Constructor Detail
-
KSContext
public KSContext(User user)
-
KSContext
public KSContext(java.lang.String string)
-
-
Method Detail
-
getInstance
public static KSContext getInstance()
-
destroy
public static void destroy()
-
init
public void init()
-
sendLogout
public void sendLogout()
-
onProcess
public boolean onProcess()
-
log
public void log(java.lang.Object message, java.lang.Object... args)
-
sleep
public boolean sleep(long ms)
-
sleep
public boolean sleep(int min, int max)
-
sleepUntil
public boolean sleepUntil(java.util.function.BooleanSupplier supplier, java.util.function.BooleanSupplier resetSupplier, int pollingRate, int timeOut)
-
onCondition
public boolean onCondition(java.util.function.BooleanSupplier condition, int pollRate, int pollAmount)
Sleeps until the given condition is met or the maximum number of polling attempts is reached.- Parameters:
condition
- The condition to evaluate.pollRate
- The interval in milliseconds to wait between checks.pollAmount
- The maximum number of times to check the condition.- Returns:
- true if the condition was met within the poll attempts; false otherwise.
-
sleepUntil
public boolean sleepUntil(java.util.function.BooleanSupplier supplier, java.util.function.BooleanSupplier resetSupplier, int timeOut)
-
sleepUntil
public boolean sleepUntil(java.util.function.BooleanSupplier supplier, int pollingRate, int timeOut)
-
sleepUntil
public boolean sleepUntil(java.util.function.BooleanSupplier supplier, int timeOut)
-
sleepTicks
public boolean sleepTicks(int ticks)
-
sleepTick
public boolean sleepTick()
-
sleepTicksUntil
public boolean sleepTicksUntil(java.util.function.BooleanSupplier supplier, int ticks)
-
stopScript
public void stopScript()
-
stopScript
public void stopScript(java.lang.String message)
-
-