Module:Itemlist

local getArgs = require('Module:Arguments').getArgs local p = {}

function p.main(frame) local args = getArgs(frame) return p._main(args) end

function p._main(args)

local i = 0 local list = {} local IS = require('Module:IS').main local pages = mw.loadData('Module:IS/pages')

for _, arg in pairs(args) do		i = i+1 local item = args[i] local sprite = args[i] if string.match(item, "^%d+") then quantity = tonumber(string.match(item, "^%d+")) for _,page in pairs(pages) do				for _, i in pairs (page.items) do					if string.match(item, "^%d* "..i.."s?") then sprite = string.gsub(item, "^%d+ ".."("..i..")".."s?", "%1") end end end end local sprite = IS({sprite}) table.insert(list, "*"..sprite.." "..item) end

list = table.concat(list, "\n") return list end return p

-- print(p.main)