fix whatever i fucked up lol

This commit is contained in:
tommy aka doge 2022-09-10 19:29:30 -04:00
parent 6dda6334b6
commit 6aa464cafb
2 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ commands:Add('pb', {}, 'get placement on map', function(t)
if #args < 4 then return message:reply('invalid arguments') end if #args < 4 then return message:reply('invalid arguments') end
local user = API:GetUserFromAny(args[1]) local user = API:GetUserFromAny(args[1],message)
local sn_info = API:GetUser(user.id) local sn_info = API:GetUser(user.id)
local game = API.GAMES[args[2]] local game = API.GAMES[args[2]]
local style = API.STYLES[args[3]] local style = API.STYLES[args[3]]
@ -37,12 +37,12 @@ commands:Add('pb', {}, 'get placement on map', function(t)
count = 1 count = 1
end end
local time_formatted = API:FormatTime(time.Time) local time_formatted = API.FormatTime(time.Time)
local date = os.date("%x", time.Date) local date = os.date("%x", time.Date)
local placement = rank .. '/' .. count local placement = rank .. '/' .. count
local points = API:CalculatePoint(rank, count) local points = API:CalculatePoint(rank, count)
local t_n, d_n, p_n= #time_formatted, 8, math.min(#placement, 10) local t_n, d_n, p_n= #time_formatted, 8, math.max(#placement, 10)
local first_line = pad('Time:', t_n + 1) .. '| ' local first_line = pad('Time:', t_n + 1) .. '| '
.. pad('Date:', d_n + 1) .. '| ' .. pad('Date:', d_n + 1) .. '| '

View File

@ -189,7 +189,7 @@ function API:GetMapCompletionCount(MAP_ID,STYLE_ID)
return ((pages-1)*200)+#res return ((pages-1)*200)+#res
end end
--cool doggo, aidan and me --cool doggo, aidan and me
function API.CalculatePoint(rank,count) function API.CalculatePoint(self,rank,count) --??wtf
return RANK_CONSTANT_A*(math.exp(RANK_CONSTANT_B)-1)/(1-math.exp(math.max(-700, -RANK_CONSTANT_C*count)))*math.exp(math.max(-700, -RANK_CONSTANT_D*rank))+(1-RANK_CONSTANT_E)*(1+2*(count-rank))/(count*count) return RANK_CONSTANT_A*(math.exp(RANK_CONSTANT_B)-1)/(1-math.exp(math.max(-700, -RANK_CONSTANT_C*count)))*math.exp(math.max(-700, -RANK_CONSTANT_D*rank))+(1-RANK_CONSTANT_E)*(1+2*(count-rank))/(count*count)
end end