Advertisement
Guest User

Doto 2 name replace

a guest
Nov 23rd, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # enter the steam.exe location
  2. $steamExe = "C:\Program Files (x86)\Steam\Steam.exe"
  3.  
  4. # enter the resource file
  5. $dotoResource = "C:\Program Files (x86)\Steam\SteamApps\common\dota 2 beta\dota\resource\dota_english.txt"
  6.  
  7.  
  8. # verify the steam.exe location is valid
  9. if (Test-Path $steamExe)
  10. {
  11.     Write-Host "Found: steam.exe location." -ForegroundColor Green
  12. }
  13. else
  14. {
  15.     Write-Host "`nThe steam.exe location is invalid:" -ForegroundColor Red
  16.     Write-Host "$steamExe" -ForegroundColor Red
  17.     pause
  18.     exit
  19. }
  20.  
  21.  
  22. # verify the resource location is valid
  23. if (Test-Path $dotoResource)
  24. {
  25.     Write-Host "Found: resource file." -ForegroundColor Green
  26. }
  27. else
  28. {
  29.     Write-Host "`nThe ressource file is missing:" -ForegroundColor Red
  30.     Write-Host "$dotoResource" -ForegroundColor Red
  31.     pause
  32.     exit
  33. }
  34.  
  35.  
  36. Write-Host "`n`nPatching file:" (get-item $dotoResource).Name
  37.  
  38. Write-Host "`nReplacing:"
  39. Write-Host "Windranger -> Windrunner"
  40.  
  41. (Get-Content $dotoResource) | Foreach-Object {
  42.         $_ -replace 'Windranger', 'Windrunner' `
  43.         } | Set-Content $dotoResource -Encoding Unicode
  44.  
  45.  
  46. Write-Host "`n`nLaunching dota 2..."
  47.  
  48. Start-Process "$steamExe" "steam://rungameid/570"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement