calculate specific placement command

This commit is contained in:
tommy aka doge 2022-11-07 12:18:23 -05:00
parent 0623fe0311
commit 908792ad11

View File

@ -119,4 +119,14 @@ commands:Add('compare',{},'compare n1 n2', function(t)
local compared = API.CalculateDifference(n1,n2)
local compared_percent = API.CalculateDifferencePercent(n1,n2)
message:reply(tostring(compared)..' ('..compared_percent..')')
end)
end)
commands:Add('calc',{},nil,function(t)
local args=t.args
local message=t.message
local rank = args[1]
local count = args[2]
local points=API.CalculatePoint(rank,count)
local skill=API.FormatSkill(rank == 1 and 1 or (count-rank)/(count-1))
message:reply('```Points: '..points..'\nSkill: '..skill..'```')
end )