Package com.epicbot.api.shared.script
Class Script
java.lang.Object
com.epicbot.api.shared.script.Script
- Direct Known Subclasses:
LoopScript
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTask(ScriptTask task) final voidantiRandom(String reason) intSet the time to sleep after running/checking all tasks.final org.apache.logging.log4j.Loggerfinal ScriptManifestGet the profile/settings this script was started with by the script scheduler.final ScriptTypefinal FileGet the settings directory for this script.final ScriptStategetState()voidinit()final booleanisPaused()final booleanfinal booleanprotected voidonBreak()protected voidonChatMessage(ChatMessageEvent event) protected voidonGameTick(GameTickEvent event) protected voidonPaint(PaintContext paintContext, APIContext ctx) protected voidonPause()protected voidonResume()abstract booleanprotected voidonStop()final voidvoidremoveTask(LoopScriptTask task) voidremoveTask(ScriptTask task) final voidresume()voidsetIterationDelay(int iterationDelay) The time to sleep after running/checking all tasks.final voidfinal voidvoidsubmitTask(LoopScriptTask task)
-
Constructor Details
-
Script
public Script()
-
-
Method Details
-
init
@Inject public void init() -
onStart
-
onBreak
protected void onBreak() -
onPause
protected void onPause() -
onResume
protected void onResume() -
onStop
protected void onStop() -
getManifest
-
isRunning
public final boolean isRunning() -
isPaused
public final boolean isPaused() -
isStopping
public final boolean isStopping() -
getState
-
getLogger
public final org.apache.logging.log4j.Logger getLogger() -
resume
public final void resume() -
pause
-
startBreak
public final void startBreak() -
stop
-
antiRandom
-
setIterationDelay
public void setIterationDelay(int iterationDelay) The time to sleep after running/checking all tasks.Note: set to 0 when using
LoopScriptsinceLoopScript.loop()decides how long to sleep.Note: when using
TreeScriptthis will be used as the time to sleep after each loop.- Parameters:
iterationDelay- the iteration delay/sleep
-
getIterationDelay
public int getIterationDelay()Set the time to sleep after running/checking all tasks.- Returns:
- int
- See Also:
-
getAPIContext
-
getTaskContainer
-
getRandomHandler
-
getScriptType
-
getScriptProfile
Get the profile/settings this script was started with by the script scheduler.- Returns:
File
-
getSettingsDirectory
Get the settings directory for this script.- Returns:
- the directory, for example
C:/Users/John/EpicBot/ScriptSettings/Pro Agility/
-