Can be used in both Events.subscribe and IfType.subscribe
When used in Events.subscribe, calls OnIfLoadCallback.
-- Create a functionlocal iftypeLoadCallback = function(group, id) 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.") endend-- Subscribe to the functionosrs.Events.subscribe(iftypeLoadCallback, osrs.Events.ON_IF_LOAD) Copy
-- Create a functionlocal iftypeLoadCallback = function(group, id) 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.") endend-- Subscribe to the functionosrs.Events.subscribe(iftypeLoadCallback, osrs.Events.ON_IF_LOAD)
Can be used in both Events.subscribe and IfType.subscribe
When used in Events.subscribe, calls OnIfLoadCallback.
Example