diff --git a/src/modules/commands/pb.lua b/src/modules/commands/pb.lua index 87120a0..0ad3d8d 100644 --- a/src/modules/commands/pb.lua +++ b/src/modules/commands/pb.lua @@ -12,7 +12,7 @@ commands:Add('pb', {}, 'get placement on map', function(t) 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 game = API.GAMES[args[2]] local style = API.STYLES[args[3]] @@ -37,12 +37,12 @@ commands:Add('pb', {}, 'get placement on map', function(t) count = 1 end - local time_formatted = API:FormatTime(time.Time) + local time_formatted = API.FormatTime(time.Time) local date = os.date("%x", time.Date) local placement = 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) .. '| ' .. pad('Date:', d_n + 1) .. '| ' diff --git a/src/modules/strafes_net.lua b/src/modules/strafes_net.lua index fb9440a..b292d52 100644 --- a/src/modules/strafes_net.lua +++ b/src/modules/strafes_net.lua @@ -189,7 +189,7 @@ function API:GetMapCompletionCount(MAP_ID,STYLE_ID) return ((pages-1)*200)+#res end --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) end