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,Loggable,Sleepable,PaintListener
public abstract class TreeScript extends AbstractScript
Framework implementation ofAbstractScriptbased on the Tree Branch Leaf framework created by LostVirt https://github.com/LostVirt/Dreambot-Tree-Branch-Framework Creates aRootnode, 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 RootaddBranches(Leaf... leaves)voidclear()Clears the root's children SeeBranch.clear()java.lang.StringgetCurrentBranchName()java.lang.StringgetCurrentLeafName()RootgetRoot()intonLoop()Primary execution loop of the script SeeBranch.onLoop()voidsetCurrentBranchName(java.lang.String currentBranchName)voidsetCurrentLeafName(java.lang.String currentLeafName)-
Methods inherited from class org.dreambot.api.script.AbstractScript
buildRandomManager, getCurrentState, getManifest, getRandomManager, getRandomThread, getScriptId, getScriptManager, getScriptTimer, getSDNName, getSDNParameters, getStoreId, getThreadURL, getVersion, isPaused, isUserSponsor, isUserVIP, onExit, onPaint, onPaint, onPause, onResume, onScheduledStop, onSolverEnd, onSolverStart, onStart, onStart, run, setState, stop
-
Methods inherited from class org.dreambot.api.methods.MethodProvider
debug, error, info, log, print, sleep, sleep, sleepUntil, sleepUntil, sleepWhile, sleepWhile
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.dreambot.api.script.frameworks.utility.Loggable
debug, debug, error, error, error, info, info, log, log, log, print, warn
-
Methods inherited from interface org.dreambot.api.script.frameworks.utility.Sleepable
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:
onLoopin 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)
-
-