Class LoopingBot

  • Direct Known Subclasses:
    TaskBot, TreeBot

    public abstract class LoopingBot
    extends com.runemate.game.api.script.framework.AbstractBot
    A looping implementation of AbstractBot. The majority of scripts should extend this. Override onLoop for your main logic, and optionally override onStart, onStop, onPause, and onResume for various things such as a GUI and event management.
    • 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
      LoopingBot()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      com.runemate.game.api.hybrid.util.collections.Pair<java.lang.Integer,​java.lang.Integer> getLoopDelay()
      Gets a pair of the minimum loop delay (left) and the maximum loop delay (right).
      abstract void onLoop()
      The script's entry point, all of your logic goes here.
      void run()  
      void setLoopDelay​(int delay)
      Sets the length of the delay between iterations (milliseconds)
      void setLoopDelay​(int minLoopDelay, int maxLoopDelay)
      Sets the length of the delay between loops (milliseconds)
      • 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

      • LoopingBot

        public LoopingBot()
    • Method Detail

      • onLoop

        public abstract void onLoop()
        The script's entry point, all of your logic goes here.
      • run

        public final void run()
        Specified by:
        run in class com.runemate.game.api.script.framework.AbstractBot
      • getLoopDelay

        public final com.runemate.game.api.hybrid.util.collections.Pair<java.lang.Integer,​java.lang.Integer> getLoopDelay()
        Gets a pair of the minimum loop delay (left) and the maximum loop delay (right). The default is [25, 50]
        Returns:
        a pair of the delays in milliseconds
      • setLoopDelay

        public final void setLoopDelay​(int delay)
        Sets the length of the delay between iterations (milliseconds)
      • setLoopDelay

        public final void setLoopDelay​(int minLoopDelay,
                                       int maxLoopDelay)
        Sets the length of the delay between loops (milliseconds)