Module:ItemsByStat: Difference between revisions

Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 5: Line 5:
local Name,Tier,Value = {},{},{}
local Name,Tier,Value = {},{},{}
local outData = {Name,Tier,Value}
local outData = {Name,Tier,Value}
local inKeys = {"Name","Tier",stat};
local inKeys = {"Name","Tier",stat}
local i = 1
local i = 1
Line 13: Line 13:
for x = 1,3 do
for x = 1,3 do
outData[x][i] = itemData[inKeys[x]]
outData[x][i] = itemData[inKeys[x]]
i = i+1;
end
end
i = i+1
break
break
end
end
Line 26: Line 26:
local tableData = selectByStat(stat)
local tableData = selectByStat(stat)
local outString = ""
local outString = ""
return(tableData[2][1])
for i=1,#tableData[1] do
-- for i=1,#tableData[1] do
outString = outString.."Name: [["..tableData[1][i].."]] Increased Weapon Damage: "..tableData[3][i].."\n\n"
-- outString = outString.."Name: [["..tableData[1][i].."]] Increased Weapon Damage: "..tableData[3][i].."\n\n"
end
-- end
return outString
-- return outString
end
end


return p
return p