Module:Sandbox/User:Alsang: Difference between revisions
no edit summary
(make table to check pages and recipes for stonemason) |
No edit summary |
||
Line 1:
p = {}
function p.main(args)
local variants = {'Basic','Moderate','Fine','Strong','Superior','Perfect'}
Line 14:
for i,item in ipairs(variants) do
for j,jtem in ipairs(weapons) do
table.insert(allWeapons,{
end
end
Line 21 ⟶ 20:
for i,item in ipairs(allWeapons) do
local query = mw.smw.ask(
if type(query)=='table' then
allWeapons[i].facility = query[1].data
end
local query = mw.smw.ask(
if type(query)=='table' then
allWeapons[i].XP = query[1].data
end
local query = mw.smw.ask(
if type(query)=='table' then
allWeapons[i].duration = query[1].data
end
local query = mw.smw.ask(
if type(query)=='table' then
allWeapons[i].KP = query[1].data
end
local query = mw.smw.ask(
if type(query)=='table' then
allWeapons[i].output = query[1].data
end
local query = mw.smw.ask(item.pagename .. '|?Name #- = data|mainlabel=-')
if type(query)=='table' then
allWeapons[i].name = query[1].data
end
Line 49 ⟶ 54:
local out = mw.html.create('table')
:wikitext('Facility')
out:done()▼
:tag('th')
for i,item in ipairs(allWeapons) do
local row = out:tag('
:wikitext(item.pagename)
▲ out:done()
:tag('td')
:tag('td')
out:wikitext(allWeapons[i].facility)▼
▲ out:done()
:tag('td')
▲ out:wikitext(allWeapons[i].duration)
:done()
:tag('td')
:wikitext(item.duration)
:done()
:done()
:done()
end
|