OSRS Plugin API
    Preparing search index...

    Type Alias OnIfLoadCallback

    OnIfLoadCallback: (ifTypeId: number, componentId: number) => void

    Callback invoked from Events.ON_IF_LOAD when subscribed from Events.subscribe.

    Type Declaration

      • (ifTypeId: number, componentId: number): void
      • Parameters

        • ifTypeId: number

          The id of the IfType, which can be identified from gamevals.

        • componentId: number

          The id of the subcomponent of the IfType. 0 is the base component.

        Returns void

    -- Create a function
    local iftypeLoadCallback = function(ifTypeId, componentId)
    if(group == osrs.gamevals.iftypes.xptracker.id and id == 0) then
    osrs.print("EXP Tracker opened.")
    end

    if(group == osrs.gamevals.iftypes.loottools.id and id == 0) then
    osrs.print("Loot tools opened.")
    end
    end