285
edits
ByteFoolish (talk | contribs) m (Get fletching data from Items directly) |
ByteFoolish (talk | contribs) (Get runecrafting data from Items directly) |
||
Line 143: | Line 143: | ||
local category = frame.args ~= nil and frame.args[1] or frame | local category = frame.args ~= nil and frame.args[1] or frame | ||
local data = nil | local data = nil | ||
if category == "Runes" then data = | |||
elseif category == "ComboRunes" then data = | if category == "Runes" then data = | ||
elseif category == "Weapons" then data = | Items.getItems(function(item) return item.runecraftingCategory == 0 end) | ||
elseif category == "AirGear" then data = | elseif category == "ComboRunes" then data = | ||
elseif category == "WaterGear" then data = | Items.getItems(function(item) return item.runecraftingCategory == 1 end) | ||
elseif category == "EarthGear" then data = | elseif category == "Weapons" then data = | ||
elseif category == "FireGear" then data = | Items.getItems(function(item) return item.runecraftingCategory == 2 and item.runecraftingID end) | ||
elseif category == "AirGear" then data = | |||
Items.getItems(function(item) return item.runecraftingCategory == 3 end) | |||
elseif category == "WaterGear" then data = | |||
Items.getItems(function(item) return item.runecraftingCategory == 4 end) | |||
elseif category == "EarthGear" then data = | |||
Items.getItems(function(item) return item.runecraftingCategory == 5 end) | |||
elseif category == "FireGear" then data = | |||
Items.getItems(function(item) return item.runecraftingCategory == 6 end) | |||
end | end | ||
Line 161: | Line 169: | ||
result = result..'\r\n!Item Price\r\n!Ingredients\r\n!XP/s\r\n!GP/s' | result = result..'\r\n!Item Price\r\n!Ingredients\r\n!XP/s\r\n!GP/s' | ||
table.sort(data, function(a, b) return (a.runecraftingLevel == b.runecraftingLevel and a.id < b.id) | |||
or a.runecraftingLevel < b.runecraftingLevel end) | |||
table.sort( | |||
for i, rune in Shared.skpairs( | for i, rune in Shared.skpairs(data) do | ||
result = result..'\r\n|-' | result = result..'\r\n|-' | ||
result = result..'\r\n| style="text-align: left;" | '..Icons.Icon({rune.name, type='item', size='50', notext=true}) | result = result..'\r\n| style="text-align: left;" | '..Icons.Icon({rune.name, type='item', size='50', notext=true}) | ||
Line 221: | Line 226: | ||
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 |
edits