moonlightgaming

MW Script

Apr 23rd, 2020
4,340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. :: Simple script to rename the file ModernWarfare.exe to ModernWarfare1.exe to prevent chrashes
  2. @ECHO off
  3. :: Change your install path here
  4. set place=E:\Call of Duty Modern Warfare
  5. set PROCNAME="ModernWarfare.exe"
  6.  
  7. :initialbattlenet
  8. CHOICE /M "Start Battle.Net Client?"
  9. if "%ERRORLEVEL%" == "1" GOTO startbattlenet
  10. if "%ERRORLEVEL%" == "2" echo Then why are you clicking me?
  11. goto exitscript
  12.  
  13. :startbattlenet
  14. Echo Start Battle.net...
  15. "%place%\Modern Warfare Launcher.exe"
  16. @ping -n 5 localhost> nul
  17. cls
  18. :checkstart
  19. TaskList|Find "Blizzard Battle.net App" >NUL || If Errorlevel 1 Goto startgame
  20. Goto checkstart
  21.  
  22.  
  23. :startgame
  24. echo checking game status...
  25. tasklist /FI "IMAGENAME eq %PROCNAME%*" 2>NUL | find /I /N %PROCNAME%>NUL
  26. if "%ERRORLEVEL%"=="0" (
  27. Goto gameruns
  28. )
  29. cls
  30. Goto startgame
  31.  
  32.  
  33. :exitgame
  34. CHOICE /M "Did you quit playing?"
  35. if "%ERRORLEVEL%" == "1" GOTO gamequits
  36. if "%ERRORLEVEL%" == "2" GOTO exitgame
  37. @PAUSE
  38.  
  39. :gameruns
  40. @ping -n 5 localhost> nul
  41. ren "%place%\ModernWarfare.exe" ModernWarfare1.exe >nul
  42. if exist "%place%\ModernWarfare1.exe" goto startrenameok
  43. echo Oops, something went wrong. Let's try it again
  44. @pause
  45. goto startgame
  46.  
  47. :startrenameok
  48. cls
  49. ECHO File renamed successfully!
  50. ECHO Have fun playing
  51. @ping -n 5 localhost> nul
  52. cls
  53. GOTO exitgame
  54.  
  55. :gamequits
  56. ren "%place%\ModernWarfare1.exe" ModernWarfare.exe >nul
  57. if exist "%place%\ModernWarfare.exe" goto quitrenameok
  58. echo Oops, something went wrong. Let's try it again
  59. goto startgame
  60.  
  61. :quitrenameok
  62. cls
  63. ECHO File renamed successfully!
  64. ECHO I hope it was fun.
  65. GOTO exitscript
  66.  
  67. :exitscript
  68. echo.
  69. echo Script will be terminated...
  70. @ping -n 3 localhost> nul
  71. exit
Add Comment
Please, Sign In to add comment