Event id for taking an action on an element in the player UI. Calls the OnComponentOpCallback.
-- Create a functionlocal componentOp = function(op, id, obj) local example = osrs.Engine.Decoders.decodeObjType(obj) if(id ~= -1) then local usedItem = osrs.Engine.Decoders.decodeObjType(id) osrs.printf("Used Object %s with Action: %s on Object %s", usedItem:getName(), op, example:getName(), id) else osrs.printf("Action: %s on Object %s with minimenu id %d", op, example:getName(), id) endend-- Subscribe to the functionosrs.Events.subscribe(componentOp, osrs.Events.ON_COMPONENT_OP) Copy
-- Create a functionlocal componentOp = function(op, id, obj) local example = osrs.Engine.Decoders.decodeObjType(obj) if(id ~= -1) then local usedItem = osrs.Engine.Decoders.decodeObjType(id) osrs.printf("Used Object %s with Action: %s on Object %s", usedItem:getName(), op, example:getName(), id) else osrs.printf("Action: %s on Object %s with minimenu id %d", op, example:getName(), id) endend-- Subscribe to the functionosrs.Events.subscribe(componentOp, osrs.Events.ON_COMPONENT_OP)
Event id for taking an action on an element in the player UI. Calls the OnComponentOpCallback.
Example