OSRS Plugin API
    Preparing search index...

    Function registerDisableCallback

    • Registers callback to be executed when switching off the lua plugin. Events where this happens include the luatoggle command disabling a plugin and logout. Only one function is called per plugin, if a callback was already registered by the plugin then that callback will be overwritten by the new one.

      Parameters

      • fn: () => void

        The function to callback on switching off of plugin.

      Returns void

      function shutDown()
      osrs.print("SHUTTING DOWN")
      end

      osrs.registerDisableCallback(shutDown)