Package com.epicbot.api.shared.script
Class TreeScript
- java.lang.Object
-
- com.epicbot.api.shared.script.Script
-
- com.epicbot.api.shared.script.LoopScript
-
- com.epicbot.api.shared.script.TreeScript
-
public abstract class TreeScript extends LoopScript
-
-
Field Summary
Fields Modifier and Type Field Description static LeafTask
EMPTY_LEAF
-
Constructor Summary
Constructors Constructor Description TreeScript()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
loop()
The script loop function.void
setRootTask(TreeTask rootTask)
-
Methods inherited from class com.epicbot.api.shared.script.Script
addTask, antiRandom, getAPIContext, getIterationDelay, getLogger, getManifest, getRandomHandler, getScriptProfile, getScriptType, getSettingsDirectory, getState, getTaskContainer, init, isPaused, isRunning, isStopping, onBreak, onChatMessage, onGameTick, onPaint, onPause, onResume, onStart, onStop, pause, removeTask, removeTask, resume, setIterationDelay, startBreak, stop, submitTask
-
-
-
-
Field Detail
-
EMPTY_LEAF
public static final LeafTask EMPTY_LEAF
-
-
Method Detail
-
setRootTask
public void setRootTask(TreeTask rootTask)
-
loop
protected int loop()
The script loop function.By default returns a random number between 50-300. Override this and call super.loop() to override the return value.
- Specified by:
loop
in classLoopScript
- Returns:
- a positive number of the amount the script should sleep or a negative number to the stop script
-
-