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('table')
:wikitext('L = level; A = Album XP; K = Knowledge XP; D = floor(K / 10) - A')
:addClass('wikitable sortable')
:tag('trtable')
:addClass('wikitable sortable')
:tag('th'):wikitext('L'):done()
:tag('thtr'):wikitext('XP'):done()
:tag('th'):wikitext('AlbumL'):done()
:tag('th'):wikitext('RatioA'):done()
:tag('th'):wikitext('K'):done()
:tag('th'):wikitext('LD'):done()
: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(needed):done()
:tag('td'):wikitext(data.album[i]):done()
:tag('td'):wikitext(needed / data.albumknowledge[i]):done()
: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 }
697

edits