Explorar el Código

!2 upgrade detail

pcacc hace 5 meses
padre
commit
c19ec32ce2
Se han modificado 5 ficheros con 12 adiciones y 8 borrados
  1. 4 1
      app_dongri.py
  2. BIN
      dongri_img/check/detail.png
  3. BIN
      dongri_img/check/detail2.png
  4. 1 0
      dongri_pic.py
  5. 7 7
      dongri_task.py

+ 4 - 1
app_dongri.py

@@ -184,7 +184,10 @@ def add_auto_task(isMaxCollect, isSimple = False):
         task_queue.appendleft(task_train(False))
         task_queue.appendleft(task_collect(collectType, isSimple))
         task_queue.appendleft(task_train(False))
-        task_queue.appendleft(task_collect(collectType, isSimple))
+        if isSimple:
+            task_queue.appendleft(check_buildOrResearch())
+        else:
+            task_queue.appendleft(task_collect(collectType, isSimple))
         task_queue.appendleft(task_checkStoreRoom())
         if not isSimple:
             task_queue.appendleft(task_checkConfilits())

BIN
dongri_img/check/detail.png


BIN
dongri_img/check/detail2.png


+ 1 - 0
dongri_pic.py

@@ -71,6 +71,7 @@ class check_img:
     research = R'dongri_img\check\research.png'
     hand = R'dongri_img\check\hand.png'
     detail = R'dongri_img\check\detail.png'
+    detail2 = R'dongri_img\check\detail2.png'
     upgrade_done = R'dongri_img\check\upgrade_done.png'
     upgrade_done2 = R'dongri_img\check\upgrade_done2.png'
     upgrade_done3 = R'dongri_img\check\upgrade_done3.png'

+ 7 - 7
dongri_task.py

@@ -427,7 +427,7 @@ class check_buildOrResearch(dongri_task):
             if not handRet:
                 return False
             
-            detailRet, detailPos = waitFindImg(check_img.detail, 2, 1)
+            detailRet, detailPos = waitFindImg((check_img.detail,check_img.detail2), 2, 1)
             dstPos = [0, 0]
             if not detailRet:
                 # 如果找不到详细信息,兵营之类的,需点中间
@@ -441,12 +441,12 @@ class check_buildOrResearch(dongri_task):
                 tryTimes -= 1
                 myTimeSleep_big()
                 pcacc_mouse.click(dst_x=dstPos[0], dst_y=dstPos[1])
-                if waitClickImg_noWait_withBool(check_img.research, 2, 1):
-                    dstType = 'research'
-                    break
-                elif waitClickImg_noWait_withBool(check_img.build_upgrade, 2, 1):
+                if waitClickImg_noWait_withBool(check_img.build_upgrade, 2, 1):
                     dstType = 'build'
                     break
+                elif waitClickImg_noWait_withBool(check_img.research, 2, 1):
+                    dstType = 'research'
+                    break
             break
         if dstType == 'none':
             print('没有找到建筑或研究')
@@ -585,7 +585,7 @@ if __name__ == '__main__':
     #task_collect().run()
     #task_train().run()
     #task_information().run()
-    #check_buildOrResearch().run()
+    check_buildOrResearch().run()
     #task_checkDonata().run()
     #task_collect(1).run()
     #task_collect(2).run()
@@ -593,4 +593,4 @@ if __name__ == '__main__':
     #task_collect(4).run()
     #task_returnAllLine().run()
     #task_paticipateInTeam().run()
-    task_train(True).run()
+    #task_train(True).run()