@@ -6,7 +6,7 @@ $eft = "D:\Battlestate Games\eft\Logs"
66
77# #################################################
88
9- Write-Host " Escape From Tarkov Spawn Notifier`r`n © 2021 advanced_bear" - ForegroundColor Cyan
9+ Write-Host " Escape From Tarkov Spawn Notifier`r`n © 2021-2023 advanced_bear" - ForegroundColor Cyan
1010
1111if (-not (Test-Path $eft )) {
1212 Write-Host " ------------- ERROR -------------" - ForegroundColor White - BackgroundColor Red
@@ -26,6 +26,7 @@ $notify.visible = $true
2626# # Define Target Log File (Latest "trace.log")
2727$latest = (Get-ChildItem $eft | Sort-Object LastWriteTime - Descending)[0 ].FullName
2828$target = (Get-ChildItem $latest \* traces* .log | Sort-Object LastWriteTime - Descending)[0 ].FullName
29+
2930# # Reading Tail line for Monitoring
3031Write-Host " ----------- Activated -----------" - ForegroundColor White - BackgroundColor DarkCyan
3132Get-Content - Wait - Tail 10 - Path $target | ForEach-Object {
@@ -37,9 +38,19 @@ Get-Content -Wait -Tail 10 -Path $target | ForEach-Object {
3738 Write-Host " $now `t Game Starting!"
3839 $notify.showballoontip (10 , ' Tarkov Spawn Notifier' , ' Game Starting!' , [system.windows.forms.tooltipicon ]::None)
3940 } elseif ($_ -like " *profileStatus*" ) {
40- $_ -match " ( Location: .*?)," > $null
41+ $_ -match " Location: ( .*?)," > $null
4142 $Location = $Matches [1 ]
42- Write-Host " $now `t $Location "
43+ Write-Host " $now `t Location : $ ( $Location ) "
44+ $_ -match " Ip: (\d+\.\d+\.\d+\.\d+)" > $null
45+ $ProgressPreference = " SilentlyContinue"
46+ $TestResult = $ (ping - w 500 - n 10 $Matches [1 ] | Select-Object - Last 4 )
47+ $WhoisResult = Invoke-RestMethod " http://rdap.db.ripe.net/ip/$ ( $Matches [1 ]) "
48+ $Registrant = $WhoisResult.entities | Where-Object {$_.roles -match " registrant" }
49+ Write-Host " $now `t -------Tarkov Server Information-------"
50+ Write-Host " `t`t`t Server IPaddr : $ ( $Matches [1 ]) "
51+ Write-Host " `t`t`t Server Country: $ ( $WhoisResult.country ) "
52+ Write-Host " `t`t`t Ratency (Ping): $ ( $TestResult [3 ].Trim()) "
53+ Write-Host " `t`t`t Packet Loss : $ ( $TestResult [1 ].Trim()) "
4354 } elseif ($_ -like " *ClientMetricsEvents*" ) {
4455 Write-Host " $now `t Start Match Making!"
4556 } elseif ($_ -like " *PlayerSpawnEvent*" ) {
0 commit comments