Skip to content

Instantly share code, notes, and snippets.

@drwasho
Created November 7, 2019 00:06
Show Gist options
  • Save drwasho/0fd07fea7863778f0769f1c7c264b432 to your computer and use it in GitHub Desktop.
Save drwasho/0fd07fea7863778f0769f1c7c264b432 to your computer and use it in GitHub Desktop.
War of Rights audio kill indicator
GET-Content .\game.log -Tail 1 -Wait | ForEach-Object { # Add this script to C:\Program Files (x86)\Steam\steamapps\common\War of Rights
If($_ -like '*steamUsername killed*') { # Replace 'steamUsername' with your Steam username
Write-Host "Enemy killed" -ForegroundColor Green
$player = New-Object -TypeName System.Media.SoundPlayer
$player.SoundLocation = "$PSScriptRoot\burp_x.wav" # Use your own wave file to play a sound when you kill someone and update the filename here; put it in the same directory as the script
$player.Play()
}
}
@drwasho
Copy link
Author

drwasho commented Nov 7, 2019

For instructions on how to run a powershell script: https://www.windowscentral.com/how-create-and-run-your-first-powershell-script-file-windows-10

The basic procedure is:

  1. Open the powershell as administrator
  2. Navigate to C:\Program Files (x86)\Steam\steamapps\common\War of Rights
  3. Type the following command and press enter: Set-ExecutionPolicy RemoteSigned (this allows you to run scripts made on your machine only, or from trusted publishers)
  4. Type .\killIndicator.ps1 and the script should run. Leave it run in the Powershell console.
  5. Open Steam, play 'War of Rights', and enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment