OSRS Plugin API
    Preparing search index...

    Type Alias OnObjOpCallback

    OnObjOpCallback: (
        opName: string,
        usedItemType: any,
        objType: number,
        objInfoCount: number,
        coordinate: MapCoord,
    ) => void

    The callback for Events.ON_OBJ_OP events.

    Type Declaration

      • (
            opName: string,
            usedItemType: any,
            objType: number,
            objInfoCount: number,
            coordinate: MapCoord,
        ): void
      • Parameters

        • opName: string

          The action selected by the player.

        • usedItemType: any

          the type of the item used on the selected Obj, if any. -1 if none.

        • objType: number

          The type of the selected item.

        • objInfoCount: number

          The quantity of the selected item's stack.

        • coordinate: MapCoord

          The coordinate of the selected item.

        Returns void

    osrs.printf("Operation: %s on item %s with ID %d with quantity: %d, coordinates: %d,%d,%d",opName,osrs.ClientOp.ocName(objType),objType,objInfoCount,coordX,coordLevel,coordZ)