Module:Sandbox/User:Alsang: Difference between revisions
no edit summary
No edit summary |
No edit summary |
||
Line 120:
:wikitext('sell price<br>per action')
:done()
:done()
Line 153:
:wikitext(item.productSellPrice)
:done()
:done()
Line 164:
return out
end
function p.fisherPages()
local query = {
'[[Variant of::Flounder||Eel||Pufferfish||Gurnard||Bass||Ray||Cod]]',
'? #- = name',
'?Profession Level A = level',
'?Variant of = variant',
'sort = Variant of,Profession Level A',
'limit = 500'
}
local results = mw.smw.ask(query)
for _,page in ipairs(results) do
local result = mw.smw.ask('[['..page.name..']]|Activity JSON = data')
page.JSON = (result and result[1] and result[1].data) or ''
end
local out = mw.html.create('table')
:addClass('wikitable sortable')
:tag('tr')
:tag('th')
:wikitext('Variant')
:done()
:tag('th')
:wikitext('Level')
:done()
:tag('th')
:wikitext('Page')
:done()
:tag('th')
:wikitext('Node')
:done()
:tag('th')
:wikitext('Node JSON')
:done()
:done()
for i, item in ipairs(results) do
local row = out:tag('tr')
--level
:tag('td')
:wikitext(item.variant)
:done()
:tag('td')
:wikitext(item.level)
:done()
:tag('td')
:wikitext('[['..item.name..']]')
:done()
:tag('td')
:wikitext('[['..item.name..' (skill node)]]')
:done()
:tag('td')
:wikitext(item.JSON)
:done()
end
return out
end
|