-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5cc5a2c
commit 99e418d
Showing
3 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,31 @@ | ||
# TarkovSpawnNotifier | ||
マッチメイキング完了時に通知を出します。 | ||
Notify when your matching completed. | ||
|
||
# How To Use (JP) | ||
1. [TarkovSpawnNotifier.zip]()をダウンロードし、展開します。 | ||
2. `TarkovSpawnNotifier.ps1` をメモ帳などで開き、以下の行を編集します。 | ||
```PowerShell | ||
$eft = "D:\Battlestate Games\eft\Logs" | ||
``` | ||
EFTをインストールしたパスを書いて上書き保存してください。 | ||
3. Escape From Tarkovの起動が完了した後、`start.bat`をダブルクリックして開始します。 | ||
- PowerShellスクリプトを初めて使う場合、「実行ポリシーの変更」画面が表示されます。 | ||
- [Y]キーを押して、変更を許可してください。 | ||
4. `Activated` が表示されれば、動作が開始しています! | ||
- マッチメイキング完了時に、バルーン通知が表示されます。 | ||
- カウントダウン開始時に、バルーン通知が表示されます。(PMC出撃時のみ) | ||
|
||
# How To Use (EN) | ||
1. Download [TarkovSpawnNotifier.zip]() and Extract it.. | ||
2. Open `TarkovSpawnNotifier.ps1` with Notepad and Edit as below. | ||
```PowerShell | ||
$eft = "D:\Battlestate Games\eft\Logs" | ||
``` | ||
Over-Write your EFT installed Path in this line. | ||
3. Execute `start.bat` after launched "Escape from Tarkov". | ||
* When it's first time to use PowerShell Script, "Execution Policy Change" prompt will be shown. | ||
* Press [Y] key and Accept the execution policy. | ||
4. When you can see `Activated`, it's Working! | ||
* When match making is finished, Baloon notification will be shown. | ||
* When starting countdown, Baloon notification will be shown. (ONLY PMC) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
################################################## | ||
# EFTインストール先の「eft」フォルダのパスを書く。 | ||
# Edit your EFT Installed path, and Save. | ||
|
||
$eft = "D:\Battlestate Games\eft\Logs" | ||
|
||
################################################## | ||
|
||
Write-Host "Escape From Tarkov Spawn Notifier`r`n © 2021 advanced_bear" -ForegroundColor Cyan | ||
|
||
if(-not(Test-Path $eft)) { | ||
Write-Host "------------- ERROR -------------" -ForegroundColor White -BackgroundColor Red | ||
Write-Host " $`eft Path Does not Exist. " -ForegroundColor White -BackgroundColor Red | ||
Write-Host "Check and Edit `$eft in .ps1 file." -ForegroundColor White -BackgroundColor Red | ||
pause | ||
exit | ||
} | ||
|
||
## Add Notification Icon in Toolbar | ||
[reflection.assembly]::loadwithpartialname('System.Windows.Forms') > $null | ||
[reflection.assembly]::loadwithpartialname('System.Drawing') > $null | ||
$notify = new-object system.windows.forms.notifyicon | ||
$notify.icon = [System.Drawing.SystemIcons]::Information | ||
$notify.visible = $true | ||
|
||
## Define Target Log File (Latest "trace.log") | ||
$latest = (Get-ChildItem $eft | Sort-Object LastWriteTime -Descending)[0].FullName | ||
$target = (Get-ChildItem $latest\*traces*.log | Sort-Object LastWriteTime -Descending)[0].FullName | ||
|
||
## Reading Tail line for Monitoring | ||
Write-Host "----------- Activated -----------" -ForegroundColor White -BackgroundColor DarkCyan | ||
Get-Content -Wait -Tail 10 -Path $target | ForEach-Object { | ||
$now = Get-Date -format "yyyy/MM/dd HH:mm" | ||
If($_ -like "*MatchingCompleted*") { | ||
Write-Host "$now`tMatching Completed!" | ||
$notify.showballoontip(10,'Tarkov Spawn Notifier','Matching Completed!',[system.windows.forms.tooltipicon]::None) | ||
} elseif ($_ -like "*GameStarting*") { | ||
Write-Host "$now`tGame Starting!" | ||
$notify.showballoontip(10,'Tarkov Spawn Notifier','Game Starting!',[system.windows.forms.tooltipicon]::None) | ||
} elseif ($_ -like "*profileStatus*") { | ||
$_ -match "(Location: .*?)," > $null | ||
Write-Host "$now`t$Matches[1]" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@echo off | ||
powershell -NoProfile -ExecutionPolicy Unrestricted .\TarkovSpawnNotifier.ps1 |