285
edits
ByteFoolish (talk | contribs) (getRunecraftingComboRunes) |
ByteFoolish (talk | contribs) (Make getRunecraftingTable generic) |
||
Line 140: | Line 140: | ||
end | end | ||
function p. | function p.getRunecraftingTable(frame) | ||
local | local category = frame.args ~= nil and frame.args[1] or frame | ||
local data = nil | |||
if category == "Runes" then data = SkillData.Runecrafting.Runes | |||
elseif category == "ComboRunes" then data = SkillData.Runecrafting.ComboRunes | |||
elseif category == "Weapons" then data = SkillData.Runecrafting.Weapons | |||
elseif category == "AirGear" then data = SkillData.Runecrafting.AirGear | |||
elseif category == "WaterGear" then data = SkillData.Runecrafting.WaterGear | |||
elseif category == "EarthGear" then data = SkillData.Runecrafting.EarthGear | |||
elseif category == "FireGear" then data = SkillData.Runecrafting.FireGear | |||
end | end | ||
if data == nil then | |||
return "ERROR: Invalid area name.[[Category:Pages with script errors]]" | |||
end | end | ||
local result = '{| class="wikitable sortable stickyHeader"' | local result = '{| class="wikitable sortable stickyHeader"' | ||
result = result..'\r\n|- class="headerRow-0"' | result = result..'\r\n|- class="headerRow-0"' | ||
Line 185: | Line 162: | ||
local rcArray = {} | local rcArray = {} | ||
for i, rc in Shared.skpairs( | for i, rc in Shared.skpairs(data) do | ||
table.insert(rcArray, rc) | table.insert(rcArray, rc) | ||
end | end |
edits