Anonymous

Module:Skills/Gathering: Difference between revisions

From Melvor Idle
m
formatting fix
(_getThievingNPCLootTables: Format quantity for area unique drops)
m (formatting fix)
(6 intermediate revisions by the same user not shown)
Line 703: Line 703:
result = result..'\r\n|- class="headerRow-0"'
result = result..'\r\n|- class="headerRow-0"'
result = result..'\r\n!colspan="2"|Constellation!!'..Icons.Icon({"Astrology", type='skill', notext='true'})..' Level'
result = result..'\r\n!colspan="2"|Constellation!!'..Icons.Icon({"Astrology", type='skill', notext='true'})..' Level'
result = result..'!!XP!!Skills!!Standard Modifiers!!Unique Modifiers'
result = result..'!!XP!!Skills!!Standard Modifiers!!Unique Modifiers!!XP/s!!Time to next constellation'
   
    function SecondsToClock(seconds)
        local seconds = tonumber(seconds)
     
        if seconds <= 0 then
            return "00:00:00";
        else
            hours = string.format("%02.f", math.floor(seconds/3600));
            mins = string.format("%02.f", math.floor(seconds/60 - (hours*60)));
            secs = string.format("%02.f", math.floor(seconds - hours*3600 - mins *60));
            return hours..":"..mins..":"..secs
        end
    end


for i, cons in ipairs(SkillData.Astrology.Constellations) do
for i, cons in ipairs(SkillData.Astrology.Constellations) do
local xpByThreshold = {0, 1154, 3316, 8893, 23861, 64109, 172409, 463885, 1248441, 3360264, 3425226}
local name = cons.name
local name = cons.name
result = result..'\r\n|-'
result = result..'\r\n|-'
Line 732: Line 746:
end
end
result = result..'||'..table.concat(uMods, '<br/>')
result = result..'||'..table.concat(uMods, '<br/>')
        local xpPs = string.format("%.2f",cons.provides.xp/3)
        result = result..'||'..xpPs
mw.logObject(xpPs)
        local time = SecondsToClock(xpByThreshold[i])
        result = result..'||'..time
       
end
end
result = result..'\r\n|}'
result = result..'\r\n|}'
8

edits