17,105
edits
Falterfire (talk | contribs) (added GP icon to item price column in crafting tables) |
m (Amend indentation) |
||
Line 17: | Line 17: | ||
elseif category == "Furnace" then | elseif category == "Furnace" then | ||
itemArray = Items.getItems(function(item) return item.cookingCategory == 1 and item.name ~= 'Lemon Cake' end) | itemArray = Items.getItems(function(item) return item.cookingCategory == 1 and item.name ~= 'Lemon Cake' end) | ||
elseif category == "Pot" | elseif category == "Pot" then | ||
itemArray = Items.getItems(function(item) return item.cookingCategory == 2 end) | itemArray = Items.getItems(function(item) return item.cookingCategory == 2 end) | ||
else | else | ||
Line 72: | Line 72: | ||
result = result..'||'..getHealingCell(item, qty)..'||'..getHealingCell(perfectItem, qty) | result = result..'||'..getHealingCell(item, qty)..'||'..getHealingCell(perfectItem, qty) | ||
result = result..'||'..getSaleValueCell(item, qty)..'||'..getSaleValueCell(perfectItem, qty) | result = result..'||'..getSaleValueCell(item, qty)..'||'..getSaleValueCell(perfectItem, qty) | ||
local matArray = {} | |||
for j, reqSet in pairs(item.recipeRequirements) do | |||
for k, mat in pairs(reqSet) do | |||
local matItem = Items.getItemByID(mat.id) | local matItem = Items.getItemByID(mat.id) | ||
table.insert(matArray, Icons.Icon({matItem.name, type='item', notext=true, qty=mat.qty})) | table.insert(matArray, Icons.Icon({matItem.name, type='item', notext=true, qty=mat.qty})) | ||
end | |||
end | end | ||
result = result..'\r\n|'..table.concat(matArray, ' ') | |||
end | end | ||
Line 181: | Line 181: | ||
table.sort(data, function(a, b) return (a.runecraftingLevel == b.runecraftingLevel and a.id < b.id) | table.sort(data, function(a, b) return (a.runecraftingLevel == b.runecraftingLevel and a.id < b.id) | ||
or a.runecraftingLevel < b.runecraftingLevel end) | |||
for i, rune in Shared.skpairs(data) do | for i, rune in Shared.skpairs(data) do | ||
Line 220: | Line 220: | ||
data = Items.getItems(function(item) return item.fletchingCategory == 2 end) | data = Items.getItems(function(item) return item.fletchingCategory == 2 end) | ||
elseif category == "Bolts" then | elseif category == "Bolts" then | ||
data = | data = Items.getItems(function(item) return item.fletchingCategory == 3 end) | ||
elseif category == "Crossbows" then | elseif category == "Crossbows" then | ||
data = Items.getItems(function(item) return item.fletchingCategory == 4 end) | data = Items.getItems(function(item) return item.fletchingCategory == 4 end) | ||
Line 237: | Line 237: | ||
table.sort(data, function(a, b) return (a.fletchingLevel == b.fletchingLevel and a.id < b.id) | table.sort(data, function(a, b) return (a.fletchingLevel == b.fletchingLevel and a.id < b.id) | ||
or a.fletchingLevel < b.fletchingLevel end) | |||
for i, fletch in Shared.skpairs(data) do | for i, fletch in Shared.skpairs(data) do | ||
Line 272: | Line 272: | ||
elseif category == "Necklaces" then data = | elseif category == "Necklaces" then data = | ||
Items.getItems(function(item) return (item.validSlots ~= nil and Shared.contains(item.validSlots, 'Amulet')) and item.craftingLevel ~= nil end) | Items.getItems(function(item) return (item.validSlots ~= nil and Shared.contains(item.validSlots, 'Amulet')) and item.craftingLevel ~= nil end) | ||
elseif category == "Bags" | elseif category == "Bags" then data = | ||
Items.getItems(function(item) return item.type == 'Bag' and item.craftingLevel ~= nil end) | |||
end | end | ||
Line 281: | Line 281: | ||
table.sort(data, function(a, b) return (a.craftingLevel == b.craftingLevel and a.id < b.id) | table.sort(data, function(a, b) return (a.craftingLevel == b.craftingLevel and a.id < b.id) | ||
or a.craftingLevel < b.craftingLevel end) | |||
local result = '{| class="wikitable sortable stickyHeader"' | local result = '{| class="wikitable sortable stickyHeader"' |