tellomichmich / PokeNoxBot

Slow but safe Pokemon GO Bot
23 stars 19 forks source link

Automate game restart when communication with server is lost #36

Closed Bolo30 closed 8 years ago

Bolo30 commented 8 years ago

Hi,

When communication is lost with server, we can see a small pokeball logo spinning (in the top left corner) on the screen. When this problem occur script does not stop/restart game but no more pokemon spawn and all pokestop are empty. It is possible to add an automatic restart when this behaviour occur ?

2016-08-22_101638

2016-08-22_101705

putuoka commented 8 years ago

you can modify this part in pokenoxbot.py to this one and any others part similar to that -----------#skip#------------- clickfailed = 0
def PokestopWorker(PokeStopPosition): global waitingformap global clickfailed print "[!] Working on Pokestop %d %d" % (PokeStopPosition[0], PokeStopPosition[1]) Tap(PokeStopPosition[0], PokeStopPosition[1]) time.sleep(0.6) ClearScreen() if IsOnMap() == True: clickfailed += 1 print "[!] Click failed ! # %d" % (clickfailed) if clickfailed >= 10: clickfailed = 0 RestartApplication() return False clickfailed = 0 -- next line of code ---

tellomichmich commented 8 years ago

I will do that in few hours :)

tellomichmich commented 8 years ago

Should be ok ! Waiting for review .

Bolo30 commented 8 years ago

Ok thank you, test in progress !

Bolo30 commented 8 years ago

Test done, it's ok now ! script do the restart when game is not correctly connected to server !

Thank you