Package com.epicbot.api.shared.script
Class LoopScript
java.lang.Object
com.epicbot.api.shared.script.Script
com.epicbot.api.shared.script.LoopScript
- Direct Known Subclasses:
TreeScript
A script that loops until a negative number is returned by
loop(), otherwise this will run for ever.
This script has one ScriptTask that calls the loop() function.
The amount to sleep is determined by the result of loop(). Therefore Script.setIterationDelay(int) is set to 0.
-
Constructor Summary
Constructors -
Method Summary
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
-
Constructor Details
-
LoopScript
public LoopScript()
-
-
Method Details
-
loop
protected abstract int loop()The script loop function.- Returns:
- a positive number of the amount the script should sleep or a negative number to the stop script
-