Anonymous

Module:Skills/Gathering: Difference between revisions

From Melvor Idle
m
more bug fix for the astrology table
m (fixed an index error)
m (more bug fix for the astrology table)
Line 704: Line 704:
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!!XP/s!!Time to next constellation'
result = result..'!!XP!!Skills!!Standard Modifiers!!Unique Modifiers!!XP/s!!Time to next constellation'
     local xpByThreshold = {1154, 4470, 13363, 37224, 101333, 273742, 737627, 1986068, 5346332}
     local xpByThreshold = {1154, 3316, 8893, 23861, 64109, 172409, 463885, 1248441, 3360264}


     function SecondsToClock(seconds)
     function SecondsToClock(seconds)
Line 750: Line 750:
         result = result..'||'..xpPs
         result = result..'||'..xpPs


         if i == 0 then
         local seconds = xpByThreshold[i] / xpPs
            local seconds = xpByThreshold[i] / xpPs
         result = result..'||'..SecondsToClock(seconds)
            result = result..'||'..SecondsToClock(seconds)
         else
            local seconds = (xpByThreshold[i] - xpByThreshold[i-1]) / xpPs
            result = result..'||'..SecondsToClock(seconds)
        end


end
end
8

edits