소스 검색

!2 speed up return game

pcacc 1 개월 전
부모
커밋
d865d5c399
2개의 변경된 파일7개의 추가작업 그리고 8개의 파일을 삭제
  1. 1 1
      app_dongri.py
  2. 6 7
      dongri_task.py

+ 1 - 1
app_dongri.py

@@ -138,7 +138,7 @@ def monitor_begin():
         task_arr.append(last_process)
     for item in reversed(task_queue):
         task_arr.append(item.name)
-    latest_tasks = task_arr[-5:] # only show the last 5 tasks
+    latest_tasks = task_arr[:5] # only show the last 5 tasks
     send_hint(json.dumps(latest_tasks, ensure_ascii=False))
     send_todo()
     send_status('')

+ 6 - 7
dongri_task.py

@@ -108,12 +108,14 @@ class basic_operate:
     def do_back():
         task_return_game()
         ret = False
+        if waitFindImg_withBool([place_img.outside, place_img.town], 0.1, 0) == True:
+            return True
         ret |= waitClickImg_noWait_withBool(place_img.back1, 0.6, 0)
         if ret:
-            return
+            return ret
         ret |= waitClickImg_noWait_withBool([place_img.back2, place_img.back4], 0.6, 0)
         if ret:
-            return
+            return ret
         ret, pos = waitFindImg(place_img.title, 1, 0)
         if ret:
             pcacc_mouse.click(pos[0] + 20, pos[1] + 80)
@@ -221,7 +223,7 @@ class basic_operate:
 def task_return_game():
     tryTimes = 3
     while tryTimes > 0:
-        if False == waitFindImg_withBool([place_img.title], 1, 1):
+        if False == waitFindImg_withBool([place_img.title], 2, 0):
             waitClickImg_noWait([place_img.ico, place_img.ico2], 1, 0)
             myTimeSleep_big()
             tryTimes -= 1
@@ -1248,11 +1250,8 @@ class task_checkActivities(dongri_task):
         basic_operate.go_outside()
         if waitClickImg_noWait_withBool(check_img.activity_open, 2, 1) == False:
             return False
-        if waitFindImg_withBool(check_img.todoList, 2, 1) == False:
+        if waitFindImg_withBool(check_img.todoList, 2, 0) == False:
             return False
-        
-        if waitFindImg_withBool(special_activity_img.beijing_time, 1, 0) == True:
-            waitClickImg_noWait_withBool(special_activity_img.task_refresh, 1, 0)
 
         myTimeSleep_small()
         yys_dragAuto(check_img.move_down)