-
C# Bot Stop & Restart Script (VBS)
This will terminate and restart the C# bot every 10 minutes.
Throw this code in a text document and change the extension of the text document to ".vbs". Make sure to change the BotPath variable to were your 'PokemonGo.RocketAPI.Console.exe' is located. Adjust the WaitMinute to your liking too.
Code:
Dim BotPath : BotPath = "C:\Users\Chancey\Desktop\Pokemon-Go-Rocket-API-master\PokemonGo\RocketAPI\Console\bin\Debug\PokemonGo.RocketAPI.Console.exe"
Dim WaitMinutes : WaitMinutes = 10
While 1
RestartPokemonGoConsole
WScript.Sleep(1000 * 60 * WaitMinutes)
WEnd
Function RestartPokemonGoConsole()
Dim objWMIService, colProcessList
Dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'PokemonGo.RocketAPI.Console.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
objShell.Run(BotPath)
End Function
Last edited by chancity; 07-20-2016 at 09:57 AM.
-
Post Thanks / Like - 2 Thanks
-
Originally Posted by
chancity
This will terminate and restart the C# bot every 5 minutes.
Throw this code in a text document and change the extension of the text document to ".vbs". Make sure to change the BotPath variable to were your 'PokemonGo.RocketAPI.Console.exe' is located. Adjust the WaitMinute to your liking too.
Code:
Dim BotPath : BotPath = "C:\Users\Chancey\Desktop\Pokemon-Go-Rocket-API-master\PokemonGo\RocketAPI\Console\bin\Debug\PokemonGo.RocketAPI.Console.exe"
Dim WaitMinutes : WaitMinutes = 5
While 1
RestartPokemonGoConsole
WScript.Sleep(1000 * 60 * WaitMinutes)
WEnd
Function RestartPokemonGoConsole()
Dim objWMIService, colProcessList
Dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'PokemonGo.RocketAPI.Console.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
objShell.Run(BotPath)
End Function
Really nice solution, but this will be fixed in the next version that will be posted soonTM
-
Post Thanks / Like - 1 Thanks
BackTracking (1 members gave Thanks to Neer for this useful post)
-
Originally Posted by
Neer
Really nice solution, but this will be fixed in the next version that will be posted soonTM
Quick fix I made last night, so it would run while I sleep. Going to dig into the C# project today .
-
Member
does this auto input the correct google account and code?
-
Knight
Originally Posted by
chancity
This will terminate and restart the C# bot every 10 minutes.
Throw this code in a text document and change the extension of the text document to ".vbs". Make sure to change the BotPath variable to were your 'PokemonGo.RocketAPI.Console.exe' is located. Adjust the WaitMinute to your liking too.
Code:
Dim BotPath : BotPath = "C:\Users\Chancey\Desktop\Pokemon-Go-Rocket-API-master\PokemonGo\RocketAPI\Console\bin\Debug\PokemonGo.RocketAPI.Console.exe"
Dim WaitMinutes : WaitMinutes = 10
While 1
RestartPokemonGoConsole
WScript.Sleep(1000 * 60 * WaitMinutes)
WEnd
Function RestartPokemonGoConsole()
Dim objWMIService, colProcessList
Dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'PokemonGo.RocketAPI.Console.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
objShell.Run(BotPath)
End Function
this is good if it accepts your google authenticate every 10 minutes
-
Tipp: Dont use spaces in bot path
-
-
Member
Your script kill too this ? https://i.imgur.com/TyXtKc9.jpg
For the moment i create a bat
@ECHO OFF
:start
timeout /t 300
TASKKILL /F /IM "PokemonGo.RocketAPI.Console.exe"
timeout /t 3
start "PokemonGo.RocketAPI.Console.exe" ""E:\Compressed\Pokemon-Go-Rocket-API-master_8\Pokemon-Go-Rocket-API-master\PokemonGo\RocketAPI\Console\bin\Debug\PokemonGo.RocketAPI.Console.exe""
goto start
REM pause
-
Member
Originally Posted by
chancity
This will terminate and restart the C# bot every 10 minutes.
Throw this code in a text document and change the extension of the text document to ".vbs". Make sure to change the BotPath variable to were your 'PokemonGo.RocketAPI.Console.exe' is located. Adjust the WaitMinute to your liking too.
Code:
Dim BotPath : BotPath = "C:\Users\Chancey\Desktop\Pokemon-Go-Rocket-API-master\PokemonGo\RocketAPI\Console\bin\Debug\PokemonGo.RocketAPI.Console.exe"
Dim WaitMinutes : WaitMinutes = 10
While 1
RestartPokemonGoConsole
WScript.Sleep(1000 * 60 * WaitMinutes)
WEnd
Function RestartPokemonGoConsole()
Dim objWMIService, colProcessList
Dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'PokemonGo.RocketAPI.Console.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
objShell.Run(BotPath)
End Function
how add many instance I have 4 bots
Last edited by cedricdu94; 07-24-2016 at 06:32 PM.
-
Member
it won't use saved settings for pokefast
-
-
Member
how to ?
-
Member