359
edits
(rank table data) |
m (you're supposed to return the module lol) |
||
Line 3: | Line 3: | ||
p. | p.RankDataStructure = { | ||
[l] = 1, | [l] = 1, | ||
[s] = 15, | [s] = 15, | ||
Line 11: | Line 11: | ||
} | } | ||
p. | p.RankData = { | ||
[1] = p. | [1] = p.RankDataStructure | ||
} | } | ||
-- Functions -- | -- Functions -- | ||
function p: | function p:AddRankData( level, team, friend, expreq, stamdelt ) | ||
self. | self.RankData[ level ] = { | ||
[l] = level, | [l] = level, | ||
[s] = self. | [s] = self.RankData[ level - 1 ][ s ] + ( stamdelt or 1 ) , | ||
[t] = team, | [t] = team, | ||
[f] = friend or self. | [f] = friend or self.RankData[ level - 1 ][ f ], | ||
[e] = expreq, | [e] = expreq, | ||
} | } | ||
end | end | ||
function p: | function p:AddRankExp( level, expreq, teamdelt, stamdelt ) | ||
self. | self.RankData[ level ] = { | ||
[l] = level, | [l] = level, | ||
[s] = self. | [s] = self.RankData[ level - 1 ][ s ] + ( stamdelt or 1 ), | ||
[t] = self. | [t] = self.RankData[ level - 1 ][ t ] + ( teamdelt or 0 ), | ||
[f] = self. | [f] = self.RankData[ level - 1 ][ f ], | ||
[e] = expreq, | [e] = expreq, | ||
} | } | ||
end | end | ||
function p: | function p:AddRankExpLoop( levelstart, expreqs, teamgap ) | ||
local gapcount = 0 | local gapcount = 0 | ||
Line 44: | Line 44: | ||
if 0 >= gapcount then | if 0 >= gapcount then | ||
p: | p:AddRankExp( levelstart + i, expreqs[i+1], 1 ) | ||
gapcount = teamgap | gapcount = teamgap | ||
else | else | ||
p: | p:AddRankExp( levelstart + i, expreqs[i+1], 0 ) | ||
end | end | ||
end | end | ||
end | |||
function p:RankDataReturn( frame ) | |||
return p.RankData | |||
end | end | ||
-- Data -- | -- Data -- | ||
p: | p:AddRankData( 2, 37, 11, 5, 0 ) | ||
local expreqs = { 6, 12, 20, 25, 30, 45, 54, 70 } | local expreqs = { 6, 12, 20, 25, 30, 45, 54, 70 } | ||
for i = 0, #expreqs-1 do | for i = 0, #expreqs-1 do | ||
p: | p:AddRankData( 3 + i, 38 + i, 12 + i, expreqs[i+1] ) | ||
end | end | ||
-- p: | -- p:AddRankDataLoop( 2, { 5, 6, 12, 20, 25, 30, 45, 54, 70 }, 1, 1 ) | ||
p: | p:AddRankData( 11, 45, 20, 90 ) | ||
p: | p:AddRankExpLoop( 12, { 110, 130, 150, 170, 190, 210, 230, 250 }, 2 ) --12, 19 | ||
p: | p:AddRankExpLoop( 20, { 280, 320, 360, 410, 460, 520 }, 3 ) --20, 25 | ||
p: | p:AddRankExpLoop( 26, { | ||
580, 640, 700, 760, 820, --26, 30 | 580, 640, 700, 760, 820, --26, 30 | ||
880, 940, 1000, 1060, 1120, --31, 35 | 880, 940, 1000, 1060, 1120, --31, 35 | ||
Line 73: | Line 77: | ||
}, 5 ) | }, 5 ) | ||
p: | p:AddRankData( 51, 57, 21, 8500 ) | ||
p: | p:AddRankData( 52, 57, 22, 10000 ) | ||
p: | p:AddRankData( 53, 58, 22, 12000 ) | ||
p: | p:AddRankData( 54, 58, 23, 14000 ) | ||
p: | p:AddRankExp( 55, 16500 ) | ||
p: | p:AddRankData( 56, 59, 24, 19500 ) | ||
p: | p:AddRankExp( 57, 22500 ) | ||
p: | p:AddRankData( 58, 59, 25, 22500 ) | ||
p: | p:AddRankExp( 59, 30500 ) | ||
p: | p:AddRankExp( 60, 36000 ) | ||
return p | return p |
edits