Class TreeScript

  • All Implemented Interfaces:
    java.lang.Runnable, java.util.EventListener, PaintListener

    public abstract class TreeScript
    extends AbstractScript
    Framework implementation of AbstractScript based on the Tree Branch Leaf framework created by LostVirt https://github.com/LostVirt/Dreambot-Tree-Branch-Framework Creates a Root node, which has a linked list of Branch, each of which has a linked list of Leaf
    • Constructor Detail

      • TreeScript

        public TreeScript()
        Creates a default root node, setting the root's parent to this tree
    • Method Detail

      • addBranches

        public final Root addBranches​(Leaf... leaves)
        Add Branchs or Leaf nodes to the root Returns the root node to allow chained adds if desired.
        Parameters:
        leaves - can be Branch or Leaf nodes
        Returns:
        this tree's root node
      • clear

        public final void clear()
        Clears the root's children See Branch.clear()
      • onLoop

        public int onLoop()
        Primary execution loop of the script See Branch.onLoop()
        Specified by:
        onLoop in class AbstractScript
        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)