Bladeren bron

!2 add participate team2

pcacc 3 weken geleden
bovenliggende
commit
37bb3a4674
5 gewijzigde bestanden met toevoegingen van 57 en 4 verwijderingen
  1. 8 4
      app_dongri.py
  2. BIN
      dongri_img/check/bear_add.png
  3. BIN
      dongri_img/check/bear_team.png
  4. 5 0
      dongri_pic.py
  5. 44 0
      dongri_task.py

+ 8 - 4
app_dongri.py

@@ -54,7 +54,10 @@ def thread_runTask():
             task_queue.pop()
             print(f"{task.name} 开始执行")
             last_process = task.name
-            task.run()
+            try:
+                task.run()
+            except Exception as e:
+                print(f"{task.name} 执行失败,错误原因:{e}")
             cost_time = int(time.time() - current_time)
             send_status(f"{task.name} 执行完成,耗时{cost_time}秒")
             print(f"{task.name} 执行完成,耗时{cost_time}秒")
@@ -283,8 +286,8 @@ def add_auto_task(isMaxCollect, isJina, isSimple = False, isAddStrengh = False,
     if len(collectArr) == 1:
         collectArr = collectArr[0]
     while not event.is_set():
-        config = read_Dailycfg()
-        print("config, check daily", config)
+        #config = read_Dailycfg()
+        #print("config, check daily", config)
         
         if isSimple == False and is_within_n_minutes(get_todo_time("巨熊行动"), 20, 30):
             print("in fight bear")
@@ -308,7 +311,8 @@ def add_auto_task(isMaxCollect, isJina, isSimple = False, isAddStrengh = False,
         elif isSimple == False and is_within_n_minutes(get_todo_time("巨熊行动"), 60, 0):
             # 设置无尽运行和启动的游戏为0
             always = True
-            update_rungame_type(0)
+            #if g_switch:
+                #update_rungame_type(0)
             send_status(f'巨熊行动:在60min内,切换到无尽模式')
         stop_recording()
         

BIN
dongri_img/check/bear_add.png


BIN
dongri_img/check/bear_team.png


+ 5 - 0
dongri_pic.py

@@ -225,6 +225,11 @@ class check_img:
     union_gain = R'dongri_img\check\union_gain.png'
     union_bigtreasure = R'dongri_img\check\union_bigtreasure.png'
 
+    # bear
+    bear_add = R'dongri_img\check\bear_add.png'
+    bear_team = R'dongri_img\check\bear_team.png'
+
+
 
 
 

+ 44 - 0
dongri_task.py

@@ -1042,6 +1042,50 @@ class task_returnAllLine(dongri_task):
                 break
         return True
 
+class task_paticipateInTeam2(dongri_task):
+    def __init__(self):
+        typeArr = [1,3,4]
+        type = typeArr[random.randint(0, len(typeArr) - 1)]
+        if type == 1:
+            self.line = monster_img.line1
+        elif type == 2:
+            self.line = monster_img.line2
+        elif type == 3:
+            self.line = monster_img.line3
+        elif type == 4:
+            self.line = monster_img.line4
+        super().__init__(f"参与队伍2")
+    def run(self):
+        basic_operate.go_outside()
+        if waitClickImg_noWait_withBool((check_img.talk_in,check_img.talk_in2, check_img.talk_in3), 2, 1) == False:
+            return False
+        waitClickImg_noWait_withBool(check_img.talkin_union, 1, 0)
+
+        if waitClickImg_noWait_withBool(check_img.bear_team, 1, 1) == False:
+            return False
+        if waitClickImg_noWait_withBool(check_img.bear_add, 1, 1) == False:
+            return False
+        
+        waitClickImg_noWait_withBool(self.line, 0.1, 1)
+        maxTryTimes = 3
+        while maxTryTimes > 0:
+            maxTryTimes -= 1
+            if waitFindImg_withBool(special_activity_img.power0, 1, 0.5) == False:# 实力不为0
+                powerCount = task_checkPower().run()
+                if powerCount < 21234567:
+                    return False
+                
+                waitClickImg_withBool([monster_img.fight, monster_img.fight2, monster_img.fight3], 1, 0.5)
+                return True
+            else:
+                if False == waitClickImg_noWait_withBool(monster_img.all_select, 1, 0.5):
+                    break
+                myTimeSleep_small()
+        return True      
+
+
+
+
 class task_paticipateInTeam(dongri_task):
     def __init__(self, checkPower=True):
         typeArr = [1,3,4]