Module:SearchOption/SkillCat

local p = {} function p.group( frame ) local skillcatdata = mw.loadData("Module:SkillCatData")

local tabbercat = tostring(frame.args[1])

cat = { ['1'] = {100, 200},       ['2'] = {200, 300},        ['3'] = {300, 400},        ['4'] = {400, 500},        ['5'] = {500, 600},        ['6'] = {600, 700}    }

outputArray = {} for _, v in ipairs(skillcatdata) do       if tonumber(v.catid) >= cat[tabbercat][1] and tonumber(v.catid) < cat[tabbercat][2] then table.insert(outputArray, frame:expandTemplate{ title = 'SearchOption', args = { 'skillcatid', v.catid, v.desc } }) end end return table.concat(outputArray) end return p