File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 134134 # [pt_BR]
135135 # Tempo que o Bot pode ficar sem executar nenhuma ação. Após esse tempo o bot reinicia o Jogo
136136 # Valor padrão: 10
137- Check_Bot_Work : 2
137+ Check_Bot_Work : 5
138138
139139 # [en_US]
140140 # Type Refresh page
Original file line number Diff line number Diff line change @@ -411,6 +411,9 @@ def refreshSpaceships(qtd):
411411 count_nexList = 1
412412
413413def goToFight ():
414+ logger ("Go fight" )
415+ CheckBotWork (SetWorking = True )
416+
414417 clickBtn (images ['spg-go-to-boss' ])
415418 time .sleep (1 )
416419 clickBtn (images ['spg-confirm' ])
@@ -422,13 +425,12 @@ def surrenderFight():
422425 clickBtn (images ['spg-confirm-surrender' ])
423426 global count_victory
424427 count_victory = 0
428+ CheckBotWork (SetWorking = True )
425429
426430def endFight ():
427431 logger ("End fight" )
428-
429- global bot_working
430- bot_working = True
431-
432+ CheckBotWork (SetWorking = True )
433+
432434 time .sleep (3 )
433435 returnBase ()
434436 time .sleep (15 )
@@ -538,10 +540,13 @@ def checkProcessing():
538540 if len (positions (images ['spg-processing' ], threshold = ct ['commom_position' ])) > 0 :
539541 return True
540542
541- def CheckBotWork ():
543+ def CheckBotWork (SetWorking = False ):
542544 global bot_working
543545 global last
544546 now = time .time ()
547+
548+ if SetWorking == True :
549+ bot_working = True
545550
546551 if bot_working == False :
547552 logger ('Bot is not performing any action.' )
You can’t perform that action at this time.
0 commit comments