commit
eb6a60fab5
2 changed files with 17 additions and 8 deletions
|
|
@ -79,9 +79,10 @@ error_reporting(E_ALL);
|
||||||
: "0")); // or any other default string for non-numerical values
|
: "0")); // or any other default string for non-numerical values
|
||||||
$wins = number_format($player_data['wins'], 2, ',', '');
|
$wins = number_format($player_data['wins'], 2, ',', '');
|
||||||
$winratio = number_format($player_data['winratio'], 2, ',', '');
|
$winratio = number_format($player_data['winratio'], 2, ',', '');
|
||||||
|
$originalChange = $player_data['change'];
|
||||||
$change = number_format($player_data['change'], 2, ',', '');
|
$change = number_format($player_data['change'], 2, ',', '');
|
||||||
|
|
||||||
if ($change < 0) {
|
if ($originalChange < 0) {
|
||||||
$imagePath = 'images\red.png';
|
$imagePath = 'images\red.png';
|
||||||
} elseif ($change > 0) {
|
} elseif ($change > 0) {
|
||||||
$imagePath = 'images\green.png';
|
$imagePath = 'images\green.png';
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,9 @@ foreach ($player in ($all_player_matches)) {
|
||||||
|
|
||||||
$playerstats_all = @()
|
$playerstats_all = @()
|
||||||
foreach ($player in $all_player_matches.playername) {
|
foreach ($player in $all_player_matches.playername) {
|
||||||
|
if ($null -eq $player) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
$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
|
||||||
$humankills = (($killstats | where-object { $_.playername -eq $player }).humankills | Measure-Object -sum).sum
|
$humankills = (($killstats | where-object { $_.playername -eq $player }).humankills | Measure-Object -sum).sum
|
||||||
|
|
@ -148,14 +150,16 @@ $playerstats_all = $playerstats_all | Sort-Object winratio -Descending
|
||||||
|
|
||||||
$playerstats_event_ibr = @()
|
$playerstats_event_ibr = @()
|
||||||
foreach ($player in $all_player_matches.playername) {
|
foreach ($player in $all_player_matches.playername) {
|
||||||
|
if ($null -eq $player) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
$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
|
||||||
$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
|
||||||
$winratio = ($player_wins / $player_matches) * 100
|
$winratio = ($player_wins / $player_matches) * 100
|
||||||
$winratio_old = (($oldstats.all | Where-Object { $_.playername -eq $player }).winratio)
|
$winratio_old = (($oldstats.Intense | Where-Object { $_.playername -eq $player }).winratio)
|
||||||
$change = get-change -winratio_old $winratio_old -winratio $winratio
|
$change = get-change -winratio_old $winratio_old -winratio $winratio
|
||||||
|
|
||||||
write-output 'event'
|
write-output 'event'
|
||||||
|
|
@ -182,14 +186,16 @@ $playerstats_event_ibr = $playerstats_event_ibr | Sort-Object winratio -Descendi
|
||||||
##airoyale
|
##airoyale
|
||||||
$playerstats_airoyale = @()
|
$playerstats_airoyale = @()
|
||||||
foreach ($player in $all_player_matches.playername) {
|
foreach ($player in $all_player_matches.playername) {
|
||||||
|
if ($null -eq $player) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
$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
|
||||||
$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
|
||||||
$winratio = ($player_wins / $player_matches) * 100
|
$winratio = ($player_wins / $player_matches) * 100
|
||||||
$winratio_old = (($oldstats.all | Where-Object { $_.playername -eq $player }).winratio)
|
$winratio_old = (($oldstats.Casual | Where-Object { $_.playername -eq $player }).winratio)
|
||||||
$change = get-change -winratio_old $winratio_old -winratio $winratio
|
$change = get-change -winratio_old $winratio_old -winratio $winratio
|
||||||
|
|
||||||
write-output 'airoyale'
|
write-output 'airoyale'
|
||||||
|
|
@ -216,14 +222,16 @@ $playerstats_airoyale = $playerstats_airoyale | Sort-Object winratio -Descending
|
||||||
|
|
||||||
$playerstats_official = @()
|
$playerstats_official = @()
|
||||||
foreach ($player in $all_player_matches.playername) {
|
foreach ($player in $all_player_matches.playername) {
|
||||||
|
if ($null -eq $player) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
$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
|
||||||
$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
|
||||||
$winratio = ($player_wins / $player_matches) * 100
|
$winratio = ($player_wins / $player_matches) * 100
|
||||||
$winratio_old = (($oldstats.all | Where-Object { $_.playername -eq $player }).winratio)
|
$winratio_old = (($oldstats.official | Where-Object { $_.playername -eq $player }).winratio)
|
||||||
$change = get-change -winratio_old $winratio_old -winratio $winratio
|
$change = get-change -winratio_old $winratio_old -winratio $winratio
|
||||||
write-output 'official'
|
write-output 'official'
|
||||||
write-output "Calculating for player $player"
|
write-output "Calculating for player $player"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue