OSRS Plugin API
    Preparing search index...

    Function invTotal

    • Gets the total quantity of the specified item in the specified inventory.

      Parameters

      • invId: number

        id of the inventory to read from.

      • objId: number

        id of the object to scan the inventory for.

      Returns number

      quantity of the item in the inventory.

      local BACKPACK = 93;
      local objId = 1511;
      local quantity = osrs.ClientOp.invTotal(BACKPACK, objId)
      osrs.printf("Item id %d has a quantity of %d.", objId, tostring(quantity))