Module:ItemsByStat: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
local data = mw.loadJsonData("Data:ItemData.json")
local data = mw.loadJsonData("Data:ItemData.json")


p.select = function(frame)
local selectByStat = function(stat)
local stat = frame.args[1]
local Item,Value = {},{}
local Item,Value = {},{}
local i = 1
local i = 1
Line 19: Line 18:
local b = {Item, Value}
local b = {Item, Value}
return b
return b
end
p.tablefy = function(frame)
local stat = frame.args[1]
local tabledata = selectByStat(stat)
return "Name: "..tabledata[1][1].." Weapon Damage:"..tabledata[2][1]
end
end


return p
return p