Module:SelectServiceAward and Module:SelectServiceAward/sandbox: Difference between pages
(Difference between pages)
imported>Vanisaac now 38 incremental levels |
imported>Jkudlick correction |
||
Line 2: | Line 2: | ||
--A table with the edit requirements for each stage (descending order) | --A table with the edit requirements for each stage (descending order) | ||
local editreq = { | local editreq = {175000, 150000, 132000, 114000, 96000, 78000, 60000, 51000, 42000, 33000, 28500, 24000, 20000, 16000, 12000, 8000, 6000, 5500, 5000, 4500, | ||
4000, 3500, 3000, 2500, 2000, 1750, 1500, 1250, 1000, 800, 600, 400, 200, 150, 100, 50, 1} | 4000, 3500, 3000, 2500, 2000, 1750, 1500, 1250, 1000, 800, 600, 400, 200, 150, 100, 50, 1} | ||
--A table with the account age requirements for each stage (descending order) | --A table with the account age requirements for each stage (descending order) | ||
local edittime = { | local edittime = {'20 years', '18 years', '16 years', '14 years', '12 years', '10 years', '8 years', '7 years', '6 years', '5 years', '4 years + 6 months', | ||
'4 years', '3 years + 6 months', '3 years', '2 years + 6 months', '2 years', '1 year + 6 months', '1 year + 4 months + 15 days', '1 year + 3 months', | '4 years', '3 years + 6 months', '3 years', '2 years + 6 months', '2 years', '1 year + 6 months', '1 year + 4 months + 15 days', '1 year + 3 months', | ||
'1 year + 1 month + 15 days', '1 year', '10 months + 15 days', '9 months', '7 months + 15 days', '6 months', '5 months + 8 days', '4 months + 15 days', | '1 year + 1 month + 15 days', '1 year', '10 months + 15 days', '9 months', '7 months + 15 days', '6 months', '5 months + 8 days', '4 months + 15 days', | ||
Line 19: | Line 19: | ||
local time = tonumber(frame:callParserFunction('#time', 'U')) | local time = tonumber(frame:callParserFunction('#time', 'U')) | ||
for i=1, | for i=1, 37 do | ||
if numedits >= editreq[i] and numpos == 0 then | if numedits >= editreq[i] and numpos == 0 then | ||
local timestr = date .. " + " .. edittime[i] | local timestr = date .. " + " .. edittime[i] | ||
local acctime = tonumber(frame:callParserFunction('#time', 'U', timestr)) | local acctime = tonumber(frame:callParserFunction('#time', 'U', timestr)) | ||
if time >= acctime then | if time >= acctime then | ||
numpos = ( | numpos = (38 - i) | ||
end | end | ||
end | end |