OSRS Plugin API
    Preparing search index...

    Function ocName

    • Gets the name of the object idenfitied by the provided id

      Parameters

      • objId: number

        the Id of an object

      Returns string

      the name of the object identified by the id.

      local BACKPACK = 93;
      local size = osrs.ClientOp.invSize(BACKPACK);
      for i=0, size-1, 1 do
      local id = osrs.ClientOp.invGetObjId(BACKPACK, i)
      osrs.printf("Slot %d contains the item: %s", i, osrs.ClientOp.ocName(id))
      end