This commit is contained in:
Lanta 2023-10-10 14:42:16 +02:00
parent 33d18c2674
commit 239b040d4d

View file

@ -30,9 +30,7 @@ function get-killstats {
$attacks = @() $attacks = @()
foreach ($action in $telemetry) { foreach ($action in $telemetry) {
if ($action.PSObject.Properties.name.contains('killer')) {
$attacks += $action $attacks += $action
}
} }
$kills = $attacks | where-object { $_.killer.name -eq $player_name } $kills = $attacks | where-object { $_.killer.name -eq $player_name }
@ -43,6 +41,8 @@ function get-killstats {
deaths = ($attacks | where-object { $_.victim.name -eq $player_name }).count deaths = ($attacks | where-object { $_.victim.name -eq $player_name }).count
gameMode = $gameMode gameMode = $gameMode
matchType = $matchType matchType = $matchType
dbno = ($attacks | where-object { $_.dBNOMaker.name -eq $player_name }).count
} }
} }
@ -109,6 +109,7 @@ foreach ($player in $all_player_matches.playername) {
} }
$deaths = (($killstats | where-object { $_.playername -eq $player }).deaths | Measure-Object -sum).sum $deaths = (($killstats | where-object { $_.playername -eq $player }).deaths | Measure-Object -sum).sum
$kills = (($killstats | where-object { $_.playername -eq $player }).kills | Measure-Object -sum).sum $kills = (($killstats | where-object { $_.playername -eq $player }).kills | Measure-Object -sum).sum
$dbno = (($killstats | where-object { $_.playername -eq $player }).dbno | Measure-Object -sum).sum
$humankills = (($killstats | where-object { $_.playername -eq $player }).humankills | Measure-Object -sum).sum $humankills = (($killstats | where-object { $_.playername -eq $player }).humankills | Measure-Object -sum).sum
$player_matches = ($all_player_matches | where-object { $_.playername -eq $player }).player_matches.count $player_matches = ($all_player_matches | where-object { $_.playername -eq $player }).player_matches.count
$player_wins = ($all_player_matches | where-object { $_.playername -eq $player } | ForEach-Object { $_.player_matches } | where-object { $_.stats.winPlace -eq 1 }).count $player_wins = ($all_player_matches | where-object { $_.playername -eq $player } | ForEach-Object { $_.player_matches } | where-object { $_.stats.winPlace -eq 1 }).count
@ -132,6 +133,7 @@ foreach ($player in $all_player_matches.playername) {
KD_ALL = $kills / $deaths KD_ALL = $kills / $deaths
winratio = $winratio winratio = $winratio
wins = $player_wins wins = $player_wins
dbno = $dbno
change = $change change = $change
} }
@ -147,6 +149,7 @@ foreach ($player in $all_player_matches.playername) {
} }
$deaths = (($killstats | where-object { $_.playername -eq $player -and $_.gameMode -eq 'ibr' -and $_.matchType -eq 'event' }).deaths | Measure-Object -sum).sum $deaths = (($killstats | where-object { $_.playername -eq $player -and $_.gameMode -eq 'ibr' -and $_.matchType -eq 'event' }).deaths | Measure-Object -sum).sum
$kills = (($killstats | where-object { $_.playername -eq $player -and $_.gameMode -eq 'ibr' -and $_.matchType -eq 'event' }).kills | Measure-Object -sum).sum $kills = (($killstats | where-object { $_.playername -eq $player -and $_.gameMode -eq 'ibr' -and $_.matchType -eq 'event' }).kills | Measure-Object -sum).sum
$dbno = (($killstats | where-object { $_.playername -eq $player -and $_.gameMode -eq 'ibr' -and $_.matchType -eq 'event' }).dbno | Measure-Object -sum).sum
$humankills = (($killstats | where-object { $_.playername -eq $player -and $_.gameMode -eq 'ibr' -and $_.matchType -eq 'event' }).humankills | Measure-Object -sum).sum $humankills = (($killstats | where-object { $_.playername -eq $player -and $_.gameMode -eq 'ibr' -and $_.matchType -eq 'event' }).humankills | Measure-Object -sum).sum
$player_matches = ((($all_player_matches | where-object { $_.playername -eq $player }).player_matches | Where-Object { $_.matchType -eq 'event' -and $_.gameMode -eq 'ibr' }).count) $player_matches = ((($all_player_matches | where-object { $_.playername -eq $player }).player_matches | Where-Object { $_.matchType -eq 'event' -and $_.gameMode -eq 'ibr' }).count)
$player_wins = ($all_player_matches | where-object { $_.playername -eq $player } | ForEach-Object { $_.player_matches } | where-object { $_.stats.winPlace -eq 1 } | Where-Object { $_.matchType -eq 'event' -and $_.gameMode -eq 'ibr' }).count $player_wins = ($all_player_matches | where-object { $_.playername -eq $player } | ForEach-Object { $_.player_matches } | where-object { $_.stats.winPlace -eq 1 } | Where-Object { $_.matchType -eq 'event' -and $_.gameMode -eq 'ibr' }).count
@ -170,6 +173,7 @@ foreach ($player in $all_player_matches.playername) {
KD_ALL = $kills / $deaths KD_ALL = $kills / $deaths
winratio = ($player_wins / $player_matches) * 100 winratio = ($player_wins / $player_matches) * 100
wins = $player_wins wins = $player_wins
dbno = $dbno
change = $change change = $change
} }
} }
@ -183,6 +187,7 @@ foreach ($player in $all_player_matches.playername) {
} }
$deaths = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'airoyale' }).deaths | Measure-Object -sum).sum $deaths = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'airoyale' }).deaths | Measure-Object -sum).sum
$kills = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'airoyale' }).kills | Measure-Object -sum).sum $kills = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'airoyale' }).kills | Measure-Object -sum).sum
$dbno = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'airoyale' }).dbno | Measure-Object -sum).sum
$humankills = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'airoyale' }).humankills | Measure-Object -sum).sum $humankills = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'airoyale' }).humankills | Measure-Object -sum).sum
$player_matches = ((($all_player_matches | where-object { $_.playername -eq $player }).player_matches | Where-Object { $_.matchType -eq 'airoyale' }).count) $player_matches = ((($all_player_matches | where-object { $_.playername -eq $player }).player_matches | Where-Object { $_.matchType -eq 'airoyale' }).count)
$player_wins = ($all_player_matches | where-object { $_.playername -eq $player } | ForEach-Object { $_.player_matches } | where-object { $_.stats.winPlace -eq 1 } | Where-Object { $_.matchType -eq 'airoyale' }).count $player_wins = ($all_player_matches | where-object { $_.playername -eq $player } | ForEach-Object { $_.player_matches } | where-object { $_.stats.winPlace -eq 1 } | Where-Object { $_.matchType -eq 'airoyale' }).count
@ -207,6 +212,7 @@ foreach ($player in $all_player_matches.playername) {
KD_ALL = $kills / $deaths KD_ALL = $kills / $deaths
winratio = ($player_wins / $player_matches) * 100 winratio = ($player_wins / $player_matches) * 100
wins = $player_wins wins = $player_wins
dbno = $dbno
change = $change change = $change
} }
} }
@ -219,6 +225,7 @@ foreach ($player in $all_player_matches.playername) {
} }
$deaths = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'official' }).deaths | Measure-Object -sum).sum $deaths = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'official' }).deaths | Measure-Object -sum).sum
$kills = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'official' }).kills | Measure-Object -sum).sum $kills = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'official' }).kills | Measure-Object -sum).sum
$dbno = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'official' }).dbno | Measure-Object -sum).sum
$humankills = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'official' }).humankills | Measure-Object -sum).sum $humankills = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'official' }).humankills | Measure-Object -sum).sum
$player_matches = ((($all_player_matches | where-object { $_.playername -eq $player }).player_matches | Where-Object { $_.matchType -eq 'official' }).count) $player_matches = ((($all_player_matches | where-object { $_.playername -eq $player }).player_matches | Where-Object { $_.matchType -eq 'official' }).count)
$player_wins = ($all_player_matches | where-object { $_.playername -eq $player } | ForEach-Object { $_.player_matches } | where-object { $_.stats.winPlace -eq 1 } | Where-Object { $_.matchType -eq 'official' }).count $player_wins = ($all_player_matches | where-object { $_.playername -eq $player } | ForEach-Object { $_.player_matches } | where-object { $_.stats.winPlace -eq 1 } | Where-Object { $_.matchType -eq 'official' }).count
@ -241,6 +248,7 @@ foreach ($player in $all_player_matches.playername) {
KD_ALL = $kills / $deaths KD_ALL = $kills / $deaths
winratio = ($player_wins / $player_matches) * 100 winratio = ($player_wins / $player_matches) * 100
wins = $player_wins wins = $player_wins
dbno = $dbno
change = $change change = $change
} }
} }
@ -255,6 +263,7 @@ foreach ($player in $all_player_matches.playername) {
} }
$deaths = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'custom' }).deaths | Measure-Object -sum).sum $deaths = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'custom' }).deaths | Measure-Object -sum).sum
$kills = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'custom' }).kills | Measure-Object -sum).sum $kills = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'custom' }).kills | Measure-Object -sum).sum
$dbno = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'custom' }).dbno | Measure-Object -sum).sum
$humankills = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'custom' }).humankills | Measure-Object -sum).sum $humankills = (($killstats | where-object { $_.playername -eq $player -and $_.matchType -eq 'custom' }).humankills | Measure-Object -sum).sum
$player_matches = ((($all_player_matches | where-object { $_.playername -eq $player }).player_matches | Where-Object { $_.matchType -eq 'custom' }).count) $player_matches = ((($all_player_matches | where-object { $_.playername -eq $player }).player_matches | Where-Object { $_.matchType -eq 'custom' }).count)
$player_wins = ($all_player_matches | where-object { $_.playername -eq $player } | ForEach-Object { $_.player_matches } | where-object { $_.stats.winPlace -eq 1 } | Where-Object { $_.matchType -eq 'custom' }).count $player_wins = ($all_player_matches | where-object { $_.playername -eq $player } | ForEach-Object { $_.player_matches } | where-object { $_.stats.winPlace -eq 1 } | Where-Object { $_.matchType -eq 'custom' }).count
@ -277,6 +286,7 @@ foreach ($player in $all_player_matches.playername) {
KD_ALL = $kills / $deaths KD_ALL = $kills / $deaths
winratio = ($player_wins / $player_matches) * 100 winratio = ($player_wins / $player_matches) * 100
wins = $player_wins wins = $player_wins
dbno = $dbno
change = $change change = $change
} }
} }