Class TreeScript
- java.lang.Object
-
- org.dreambot.api.methods.MethodProvider
-
- org.dreambot.api.script.AbstractScript
-
- org.dreambot.api.script.frameworks.treebranch.TreeScript
-
- All Implemented Interfaces:
java.lang.Runnable
,java.util.EventListener
,PaintListener
public abstract class TreeScript extends AbstractScript
Framework implementation ofAbstractScript
based on the Tree Branch Leaf framework created by LostVirt https://github.com/LostVirt/Dreambot-Tree-Branch-Framework Creates aRoot
node, which has a linked list ofBranch
, each of which has a linked list ofLeaf
-
-
Constructor Summary
Constructors Constructor Description TreeScript()
Creates a default root node, setting the root's parent to this tree
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Root
addBranches(Leaf... leaves)
void
clear()
Clears the root's children SeeBranch.clear()
java.lang.String
getCurrentBranchName()
java.lang.String
getCurrentLeafName()
Root
getRoot()
int
onLoop()
Primary execution loop of the script SeeBranch.onLoop()
void
setCurrentBranchName(java.lang.String currentBranchName)
void
setCurrentLeafName(java.lang.String currentLeafName)
-
Methods inherited from class org.dreambot.api.script.AbstractScript
buildRandomManager, getCurrentState, getManifest, getRandomManager, getRandomThread, getScriptId, getSDNName, getSDNParameters, getStoreId, getThreadURL, getVersion, isPaused, onExit, onPaint, onPaint, onPause, onResume, onScheduledStop, onSolverEnd, onSolverStart, onStart, onStart, run, setState, stop
-
Methods inherited from class org.dreambot.api.methods.MethodProvider
debug, error, getScriptManager, info, isUserSponsor, isUserVIP, log, print, sleep, sleep, sleepUntil, sleepUntil, sleepWhile, sleepWhile
-
-
-
-
Method Detail
-
clear
public final void clear()
Clears the root's children SeeBranch.clear()
-
onLoop
public int onLoop()
Primary execution loop of the script SeeBranch.onLoop()
- Specified by:
onLoop
in classAbstractScript
- Returns:
- root's onLoop return, < 0 stops script, else script sleeps for return amount
-
getRoot
public Root getRoot()
-
getCurrentBranchName
public java.lang.String getCurrentBranchName()
-
setCurrentBranchName
public void setCurrentBranchName(java.lang.String currentBranchName)
-
getCurrentLeafName
public java.lang.String getCurrentLeafName()
-
setCurrentLeafName
public void setCurrentLeafName(java.lang.String currentLeafName)
-
-