OSRS Plugin API
    Preparing search index...

    Enumeration ON_COMPONENT_OP

    Event id for taking an action on an element in the player UI. Calls the OnComponentOpCallback.

    -- Create a function
    local 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)
    end
    end
    -- Subscribe to the function
    osrs.Events.subscribe(componentOp, osrs.Events.ON_COMPONENT_OP)