OSRS Plugin API
    Preparing search index...

    Function clearInterval

    • Clears an interval created by setInterval. Will do nothing if the id passed in is invalid.

      Parameters

      • callbackId: number

        The id value returned by setInterval. Will fail if not an integer.

      Returns void

      function heave ()
      osrs.print("HEAVE")
      return true
      end

      -- This will cause HEAVE to print out every 2 seconds and will generate a callback id since one is not already given
      heaveId = osrs.setInterval(heave, 2)

      -- The HEAVE printing will cease as the call back id returned by setInterval is used to clear the interval
      osrs.clearInterval(heaveId)