Module:Sandbox/User:Alsang: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
No edit summary |
No edit summary |
||
Line 120: | Line 120: | ||
:wikitext('sell price<br>per action') |
:wikitext('sell price<br>per action') |
||
:done() |
:done() |
||
:tag('th') |
|||
:wikitext('Duration') |
|||
:done() |
|||
:tag('th') |
|||
:wikitext('XP/hr') |
|||
:done() |
|||
:done() |
:done() |
||
Line 153: | Line 153: | ||
:wikitext(item.productSellPrice) |
:wikitext(item.productSellPrice) |
||
:done() |
:done() |
||
:tag('td') |
|||
:wikitext(item.duration) |
|||
:done() |
|||
:tag('td') |
|||
:wikitext(item.XPperHour) |
|||
:done() |
|||
:done() |
:done() |
||
Line 164: | Line 164: | ||
return out |
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 |
end |
||