Package rsb.botLauncher
Class RuneLite
java.lang.Object
net.runelite.client.RuneLite
rsb.botLauncher.RuneLite
@Singleton
public class RuneLite
extends net.runelite.client.RuneLite
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Filenet.runelite.client.ui.ClientUIstatic final Filestatic final Filebooleanwhether the login screen anti-random is enabled.booleanwhether the canvas is enabled.booleanwhether all anti-randoms are enabled.booleanwhether rendering is enabled.intDefines what types of input are enabled when overrideInput is false.static final Filebooleanwhether user input is allowed despite a script's preference.static final Filestatic final Filestatic final Filestatic final Filestatic String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(Class<?> clazz) voidSet the canvas to the opposite stategetBufferGraphics(net.runelite.api.MainBufferProvider mainBufferProvider) Grabs the graphics visible on the canvas from the main buffer using the associated providerGets the canvas object while checking to make sure we don't do this before it has actually loadednet.runelite.api.ClientgetImage()net.runelite.client.game.ItemManagergetPanel()Returns the size of the panel that clients should be drawn into.static voidhandleOptions(joptsimple.OptionParser parser, joptsimple.ArgumentAcceptingOptionSpec<?>[] optionSpecs, joptsimple.OptionSet options) static joptsimple.ArgumentAcceptingOptionSpec<?>[]handleParsing(joptsimple.OptionParser parser) Handles the command-line arguments using the OptionParser passed through and assigns our option specs accordingly and then returns them for usebooleanhasListener(Class<?> clazz) voidinit()The actual method associated with initializing the client-related data.static voidinitializeClient(joptsimple.ArgumentAcceptingOptionSpec<?>[] optionSpecs, joptsimple.OptionSet options) Initializes the RuneLite processes after having parsed and handled the command line argumentsstatic voidlaunch(joptsimple.OptionParser parser, joptsimple.ArgumentAcceptingOptionSpec<?>[] optionSpecs, joptsimple.OptionSet options) Launches a single instance of RuneLitevoidremoveListener(Class<?> clazz) booleansetAccount(String name) Sets an account for the RuneLite (Bot) instancestatic voidCreates a thread to handle uncaught exceptions created by RuneLitestatic voidvoidAssigns this instance of the RuneLite (Bot) a method context for calling bot api methods as well as assigns bank constants here.voidvoidshutdown()Stops and shuts down the current bot instanceMethods inherited from class net.runelite.client.RuneLite
getInjector, main, setInjector, start
-
Field Details
-
RUNELITE_DIR
-
CACHE_DIR
-
PLUGINS_DIR
-
PROFILES_DIR
-
SCREENSHOT_DIR
-
LOGS_DIR
-
DEFAULT_SESSION_FILE
-
DEFAULT_CONFIG_FILE
-
USER_AGENT
-
clientUI
@Inject public net.runelite.client.ui.ClientUI clientUI -
inputFlags
public volatile int inputFlagsDefines what types of input are enabled when overrideInput is false. Defaults to 'keyboard only' whenever a script is started. -
overrideInput
public volatile boolean overrideInputwhether user input is allowed despite a script's preference. -
disableRandoms
public volatile boolean disableRandomswhether all anti-randoms are enabled. -
disableAutoLogin
public volatile boolean disableAutoLoginwhether the login screen anti-random is enabled. -
disableRendering
public volatile boolean disableRenderingwhether rendering is enabled. -
disableCanvas
public volatile boolean disableCanvaswhether the canvas is enabled.
-
-
Constructor Details
-
RuneLite
public RuneLite()
-
-
Method Details
-
changeCanvasState
public void changeCanvasState()Set the canvas to the opposite state -
getAccountName
-
getClient
public net.runelite.api.Client getClient() -
getItemManager
public net.runelite.client.game.ItemManager getItemManager() -
getMethodContext
-
getEventManager
-
getInputManager
-
getBreakHandler
-
getScriptHandler
-
getPassiveScriptHandler
-
addListener
-
removeListener
-
hasListener
-
getImage
-
getPanel
-
setPanel
-
setAccount
Sets an account for the RuneLite (Bot) instance- Parameters:
name- The name of the account- Returns:
- If the account existed already
-
getCanvas
Gets the canvas object while checking to make sure we don't do this before it has actually loaded- Returns:
- The Canvas if the client is loaded otherwise null
-
getBufferGraphics
Grabs the graphics visible on the canvas from the main buffer using the associated provider- Parameters:
mainBufferProvider- An object that provides the main buffer (canvas info) for this client instance- Returns:
- The graphics of the Canvas
-
getLoader
-
launch
public static void launch(joptsimple.OptionParser parser, joptsimple.ArgumentAcceptingOptionSpec<?>[] optionSpecs, joptsimple.OptionSet options) throws Exception Launches a single instance of RuneLite- Parameters:
parser- The command-line parser for the programoptionSpecs- The option specs for the programoptions- The option set for the program- Throws:
Exception- Any exception the client or RuneLite might throw
-
handleParsing
public static joptsimple.ArgumentAcceptingOptionSpec<?>[] handleParsing(joptsimple.OptionParser parser) Handles the command-line arguments using the OptionParser passed through and assigns our option specs accordingly and then returns them for use- Parameters:
parser- The parser to use for handling the command-line arguments- Returns:
- The ArgumentAcceptingOptionSpec array (the fields for our options)
-
handleOptions
public static void handleOptions(joptsimple.OptionParser parser, joptsimple.ArgumentAcceptingOptionSpec<?>[] optionSpecs, joptsimple.OptionSet options) throws IOException - Parameters:
parser- The parser responsible for reading the command-line argumentsoptionSpecs- The associated fields to the corresponding optionsoptions- The actual set of options required for initialization- Throws:
IOException- Any input/output exception
-
setDefaultUncaughtExceptionHandler
public static void setDefaultUncaughtExceptionHandler()Creates a thread to handle uncaught exceptions created by RuneLite -
initializeClient
public static void initializeClient(joptsimple.ArgumentAcceptingOptionSpec<?>[] optionSpecs, joptsimple.OptionSet options) Initializes the RuneLite processes after having parsed and handled the command line arguments- Parameters:
optionSpecs- The associated fields to the corresponding optionsoptions- The actual set of options required for initialization
-
getPanelSize
Returns the size of the panel that clients should be drawn into. For internal use.- Returns:
- The client panel size.
-
init
The actual method associated with initializing the client-related data. Such as creating the client sizing and binding the plethora of handlers, listeners, and managers to this particular RuneLite instance (outside the injector binding)- Throws:
Exception- Any exception the client, bot, or RuneLite might throw.
-
setMethodContext
public void setMethodContext()Assigns this instance of the RuneLite (Bot) a method context for calling bot api methods as well as assigns bank constants here. -
shutdown
public void shutdown()Stops and shuts down the current bot instance -
setInjector
public static void setInjector()
-