Events
Reacting to changes in the game.
Last updated
Reacting to changes in the game.
Last updated
Events are a highly efficient way of reacting to changes in the game engine, such as Npcs spawning and despawning, Skill level-ups, or Varps changing. RuneMate offers a variety of listeners that can be leveraged to this end.
The interfaces can be implemented in order to react to various events in-game. For example, we can use the to run some code every tick:
The EventDispatcher is the core of the event framework, and all listeners must be registered with it. An instance of the EventDispatcher is provided by your bot instance: