public abstract class Script
extends java.lang.Object
Constructor and Description |
---|
Script() |
Modifier and Type | Method and Description |
---|---|
void |
addTask(ScriptTask task) |
void |
antiRandom(java.lang.String reason) |
APIContext |
getAPIContext() |
int |
getIterationDelay()
Set the time to sleep after running/checking all tasks.
|
org.apache.logging.log4j.Logger |
getLogger() |
ScriptManifest |
getManifest() |
RandomHandler |
getRandomHandler() |
java.util.Optional<java.io.File> |
getScriptProfile()
Get the profile/settings this script was started with by the script scheduler.
|
ScriptType |
getScriptType() |
java.io.File |
getSettingsDirectory()
Get the settings directory for this script.
|
ScriptState |
getState() |
ScriptTaskContainer |
getTaskContainer() |
void |
init() |
boolean |
isPaused() |
boolean |
isRunning() |
boolean |
isStopping() |
protected void |
onBreak() |
protected void |
onChatMessage(ChatMessageEvent event) |
protected void |
onGameTick(GameTickEvent event) |
protected void |
onPaint(java.awt.Graphics2D g2d,
APIContext ctx) |
protected void |
onPause() |
protected void |
onResume() |
abstract boolean |
onStart(java.lang.String... args) |
protected void |
onStop() |
void |
pause(java.lang.String reason) |
void |
removeTask(LoopScriptTask task) |
void |
removeTask(ScriptTask task) |
void |
resume() |
void |
setIterationDelay(int iterationDelay)
The time to sleep after running/checking all tasks.
|
void |
startBreak() |
void |
stop(java.lang.String reason) |
void |
submitTask(LoopScriptTask task) |
@Inject public void init()
public abstract boolean onStart(java.lang.String... args)
protected void onBreak()
protected void onPause()
protected void onResume()
protected void onStop()
protected void onGameTick(GameTickEvent event)
protected void onChatMessage(ChatMessageEvent event)
protected void onPaint(java.awt.Graphics2D g2d, APIContext ctx)
public final ScriptManifest getManifest()
public final boolean isRunning()
public final boolean isPaused()
public final boolean isStopping()
public final ScriptState getState()
public final org.apache.logging.log4j.Logger getLogger()
public final void resume()
public final void pause(java.lang.String reason)
public final void startBreak()
public final void stop(java.lang.String reason)
public final void antiRandom(java.lang.String reason)
public void addTask(ScriptTask task)
public void removeTask(ScriptTask task)
public void submitTask(LoopScriptTask task)
public void removeTask(LoopScriptTask task)
public void setIterationDelay(int iterationDelay)
Note: set to 0 when using LoopScript
since LoopScript.loop()
decides how long to sleep.
Note: when using TreeScript
this will be used as the time to sleep after each loop.
iterationDelay
- the iteration delay/sleeppublic int getIterationDelay()
setIterationDelay(int)
public APIContext getAPIContext()
public ScriptTaskContainer getTaskContainer()
public RandomHandler getRandomHandler()
public final ScriptType getScriptType()
public final java.util.Optional<java.io.File> getScriptProfile()
File
public final java.io.File getSettingsDirectory()
C:/Users/John/EpicBot/ScriptSettings/Pro Agility/