Module:Items: Difference between revisions

Made Arrow Shaft exception
(Bolding the quantity of the item)
(Made Arrow Shaft exception)
Line 946: Line 946:
       for j, req in pairs(item2.fletchReq) do
       for j, req in pairs(item2.fletchReq) do
         if req.id == item.id then
         if req.id == item.id then
          local mat = item2.fletchReq
           local xp = item2.fletchingXP
           local xp = item2.fletchingXP
           local rowReq = item2.fletchingLevel
           local rowReq = item2.fletchingLevel
          --Arrow Shafts are special and have to be treated specially
           local qty = item2.fletchQty
           local qty = item2.fletchQty
          local mat = item2.fletchReq
          if item2.name == 'Arrow Shafts' then
            mat = {{id = item.id, qty = 1}}
            qty =  qty + (qty * item.id)
          end
           table.insert(useArray, {item = item2, qty = qty, mats = mat, skill = 'Fletching', req = rowReq, xp = xp})
           table.insert(useArray, {item = item2, qty = qty, mats = mat, skill = 'Fletching', req = rowReq, xp = xp})
           break
           break