From f1d147e261915ac43274493699f302e31d264d92 Mon Sep 17 00:00:00 2001 From: gr00tie Date: Mon, 9 Oct 2023 21:35:05 +0200 Subject: [PATCH 1/4] Update footer.php --- includes/footer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/footer.php b/includes/footer.php index 6c20c21..b2a81fe 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -1,3 +1,3 @@ From b42ac3b938c1689e9e66bcd6801d0048ff993e5f Mon Sep 17 00:00:00 2001 From: gr00tie Date: Mon, 9 Oct 2023 21:36:57 +0200 Subject: [PATCH 2/4] Update footer.php --- includes/footer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/footer.php b/includes/footer.php index b2a81fe..dad7519 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -1,3 +1,3 @@
-

© DTCH Clan. All rights reserved.

+

© DTCH Clan. All rights reserved.

From 33d18c2674700389deb48ddf405be030311880a2 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 10 Oct 2023 12:23:58 +0200 Subject: [PATCH 3/4] custom --- update/matchparser.ps1 | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/update/matchparser.ps1 b/update/matchparser.ps1 index 8f71686..e5af1a6 100644 --- a/update/matchparser.ps1 +++ b/update/matchparser.ps1 @@ -246,6 +246,42 @@ foreach ($player in $all_player_matches.playername) { } $playerstats_official = $playerstats_official | Sort-Object winratio -Descending +##CUSTOM GAMES + +$playerstats_custom = @() +foreach ($player in $all_player_matches.playername) { + if ($null -eq $player) { + continue + } + $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 + $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_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 + $winratio = ($player_wins / $player_matches) * 100 + $winratio_old = (($oldstats.official | Where-Object { $_.playername -eq $player }).winratio) + $change = get-change -OldWinRatio $winratio_old -NewWinRatio $winratio + write-output 'custom' + write-output "Calculating for player $player" + write-output "new winratio $winratio" + write-output "Old winratio $winratio_old" + write-output $change + + $playerstats_custom += [PSCustomObject]@{ + playername = $player + deaths = $deaths + kills = $kills + humankills = $humankills + matches = ((($all_player_matches | where-object { $_.playername -eq $player }).player_matches | Where-Object { $_.matchType -eq 'custom' }).count) + KD_H = $humankills / $deaths + KD_ALL = $kills / $deaths + winratio = ($player_wins / $player_matches) * 100 + wins = $player_wins + change = $change + } +} +$playerstats_custom = $playerstats_custom | Sort-Object winratio -Descending + $currentDateTime = Get-Date # Get current timezone @@ -261,6 +297,7 @@ $playerstats = [PSCustomObject]@{ Intense = $playerstats_event_ibr Casual = $playerstats_airoyale official = $playerstats_official + custom = $playerstats_custom updated = $formattedString } From 239b040d4d39b51ec6953d84427506c198a752d0 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 10 Oct 2023 14:42:16 +0200 Subject: [PATCH 4/4] knocks --- update/matchparser.ps1 | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/update/matchparser.ps1 b/update/matchparser.ps1 index e5af1a6..f60dc9a 100644 --- a/update/matchparser.ps1 +++ b/update/matchparser.ps1 @@ -30,10 +30,8 @@ function get-killstats { $attacks = @() foreach ($action in $telemetry) { - if ($action.PSObject.Properties.name.contains('killer')) { - $attacks += $action - } - + $attacks += $action + } $kills = $attacks | where-object { $_.killer.name -eq $player_name } return @{ @@ -43,6 +41,8 @@ function get-killstats { deaths = ($attacks | where-object { $_.victim.name -eq $player_name }).count gameMode = $gameMode 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 $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 $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 @@ -132,6 +133,7 @@ foreach ($player in $all_player_matches.playername) { KD_ALL = $kills / $deaths winratio = $winratio wins = $player_wins + dbno = $dbno 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 $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 $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 @@ -170,6 +173,7 @@ foreach ($player in $all_player_matches.playername) { KD_ALL = $kills / $deaths winratio = ($player_wins / $player_matches) * 100 wins = $player_wins + dbno = $dbno 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 $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 $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 @@ -207,6 +212,7 @@ foreach ($player in $all_player_matches.playername) { KD_ALL = $kills / $deaths winratio = ($player_wins / $player_matches) * 100 wins = $player_wins + dbno = $dbno 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 $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 $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 @@ -241,6 +248,7 @@ foreach ($player in $all_player_matches.playername) { KD_ALL = $kills / $deaths winratio = ($player_wins / $player_matches) * 100 wins = $player_wins + dbno = $dbno 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 $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 $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 @@ -277,6 +286,7 @@ foreach ($player in $all_player_matches.playername) { KD_ALL = $kills / $deaths winratio = ($player_wins / $player_matches) * 100 wins = $player_wins + dbno = $dbno change = $change } }