Merge branch 'dev' of https://github.com/OpzekerIT/pubg into dev
This commit is contained in:
commit
fdbce31ffb
2 changed files with 11 additions and 2 deletions
|
|
@ -1,3 +1,6 @@
|
||||||
|
. .\..\includes\ps1\lockfile.ps1
|
||||||
|
|
||||||
|
new-lock
|
||||||
|
|
||||||
if ($PSScriptRoot.length -eq 0) {
|
if ($PSScriptRoot.length -eq 0) {
|
||||||
$scriptroot = Get-Location
|
$scriptroot = Get-Location
|
||||||
|
|
@ -91,7 +94,7 @@ map $($map_map[$winmatches[0].mapName])
|
||||||
'Human Kills' = "$(($telemetry | Where-Object { $_._T -eq 'LOGPLAYERKILLV2' -and $_.killer.name -eq $player -and $_.victim.accountId -notlike "ai.*" }).count)"
|
'Human Kills' = "$(($telemetry | Where-Object { $_._T -eq 'LOGPLAYERKILLV2' -and $_.killer.name -eq $player -and $_.victim.accountId -notlike "ai.*" }).count)"
|
||||||
'Dmg' = "$([math]::Round(($all_winners_of_match | Where-Object { $_.name -eq $player }).damageDealt))"
|
'Dmg' = "$([math]::Round(($all_winners_of_match | Where-Object { $_.name -eq $player }).damageDealt))"
|
||||||
'Kills' = "$(($all_winners_of_match | Where-Object { $_.name -eq $player }).kills)"
|
'Kills' = "$(($all_winners_of_match | Where-Object { $_.name -eq $player }).kills)"
|
||||||
'alive minutes' = "$([math]::Round((($all_winners_of_match | Where-Object { $_.name -eq $player }).timeSurvived /60 )))"
|
'alive' = "$([math]::Round((($all_winners_of_match | Where-Object { $_.name -eq $player }).timeSurvived /60 )))"
|
||||||
}
|
}
|
||||||
$teamdmg = $telemetry | Where-Object {
|
$teamdmg = $telemetry | Where-Object {
|
||||||
$_._T -eq 'LOGPLAYERTAKEDAMAGE' -and
|
$_._T -eq 'LOGPLAYERTAKEDAMAGE' -and
|
||||||
|
|
@ -151,3 +154,5 @@ $newJson = $player_matches | ConvertTo-Json -Depth 100
|
||||||
|
|
||||||
# Display the updated JSON
|
# Display the updated JSON
|
||||||
$newJson | out-file "$scriptroot/../data/player_matches.json"
|
$newJson | out-file "$scriptroot/../data/player_matches.json"
|
||||||
|
|
||||||
|
remove-lock
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
|
|
||||||
|
. .\..\includes\ps1\lockfile.ps1
|
||||||
|
|
||||||
|
new-lock
|
||||||
|
|
||||||
if ($PSScriptRoot.length -eq 0) {
|
if ($PSScriptRoot.length -eq 0) {
|
||||||
$scriptroot = Get-Location
|
$scriptroot = Get-Location
|
||||||
|
|
@ -96,3 +99,4 @@ $payload = [PSCustomObject]@{
|
||||||
}
|
}
|
||||||
|
|
||||||
Invoke-RestMethod -Uri $webhookurl -Method Post -Body ($payload | ConvertTo-Json) -ContentType 'Application/Json'
|
Invoke-RestMethod -Uri $webhookurl -Method Post -Body ($payload | ConvertTo-Json) -ContentType 'Application/Json'
|
||||||
|
remove-lock
|
||||||
Loading…
Add table
Add a link
Reference in a new issue