Class TreeBot


  • public abstract class TreeBot
    extends LoopingBot
    This is an extension of the LoopingBot class in the same way that TaskBot was. This class aims to provide a more robust implementation than TaskBot did by allowing Tasks to be executed on not only a successful validation, but also on a validation failure.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.runemate.game.api.script.framework.AbstractBot

        com.runemate.game.api.script.framework.AbstractBot.State
    • Field Summary

      • Fields inherited from class com.runemate.game.api.script.framework.AbstractBot

        cache, configuration, state
    • Constructor Summary

      Constructors 
      Constructor Description
      TreeBot()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract TreeTask createRootTask()
      Creates the root task, invoked exactly one time per instance of the bot.
      void onLoop()
      This is where the magic happens.
      • Methods inherited from class com.runemate.game.api.script.framework.AbstractBot

        addWebServicesContext, completeRestart, equals, getBridgeService, getCache, getCacheController, getConfiguration, getEmbeddableUI, getEventDispatcher, getFpsRegulator, getGameEventController, getInputManager, getLogger, getMetaData, getPlatform, getSettings, getSettingsManager, getState, hashCode, IiIIiiiiiIIiIi, initiateRestart, isPaused, isRestarting, isRunning, isSafeToPause, isSafeToStop, isStopped, isUnstarted, onPause, onResume, onStart, onStop, onStop, pause, pause, removeWebServicesContext, resume, setEmbeddableUI, setEmbeddableUI, start, stop, stop
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TreeBot

        public TreeBot()
    • Method Detail

      • createRootTask

        public abstract TreeTask createRootTask()
        Creates the root task, invoked exactly one time per instance of the bot.
        Returns:
        A non-null TreeTask
      • onLoop

        public final void onLoop()
        This is where the magic happens. Performs a sort of in-order traversal of the Task tree based on the validator. When a leaf node is reached, it will be executed instead of validated.
        Specified by:
        onLoop in class LoopingBot