OSRS Plugin API
    Preparing search index...

    Type Alias OnClientscriptCallback

    OnClientscriptCallback: (clientscript_id: number, arguments: []) => void

    The callback for Events.ON_CLIENTSCRIPT events.

    Type Declaration

      • (clientscript_id: number, arguments: []): void
      • Parameters

        • clientscript_id: number

          The id of the clientscript being run.

        • arguments: []

          The arguments passed with the clientscript.

          Arguments can be three different types:

        Returns void

    callback = function(id, argument)
    osrs.print("Clientscript ID: " .. id)
    for index, value in ipairs(argument) do
    osrs.print("Argument number " .. index .. ": " .. tostring(type(value)))
    end
    end

    osrs.Events.subscribe(callback, osrs.Events.ON_CLIENTSCRIPT, true)