Module:Sandbox/User:Artoire: Difference between revisions
no edit summary
(Created page with "local data = require('Module:Experience/data') local last_seen = 0 for i = 0, 500 do if data.album[i] ~= nil then if data.album[i] <= last_seen then error(('Level %s is not strictly greater than the previous value (%s <= %s)'):format(i, data.album[i], last_seen)) end last_seen = data.album[i] end end local output = mw.html.create('table') :addClass('wikitable sortable') :tag('tr') :tag('th'):wikitext('L'):done() :tag('th'):wikitext('XP'):done() :tag(...") |
No edit summary |
||
Line 11:
end
local output = mw.html.create(
:wikitext('L = level; A = Album XP; K = Knowledge XP; D = floor(K / 10) - A')
:addClass('wikitable sortable')▼
:tag('
:tag('th'):wikitext('L'):done()▼
:tag('
:tag('th'):wikitext('
:tag('th'):wikitext('
:done()
for i = 0, 499 do
if data.album[i] ~= nil then
local needed = data.level[i+1]-data.level[i]
local k = data.knowledge[i]
output:tag('tr')
:tag('td'):wikitext(i):done()
:tag('td'):wikitext(data.album[i]):done()
:tag('td'):wikitext(
:tag('td'):wikitext(data.knowledge[i] and math.floor(data.knowledge[i] / 10) - data.album[i]):done()
:done()
end
end
return { main = function() return output:done() end }
|