Forráskód Böngészése

!2 get red package

pcacc 4 hónapja
szülő
commit
97f0c10a4e

+ 2 - 1
app_dongri.py

@@ -341,7 +341,8 @@ def add_auto_task(isMaxCollect, isJina, isSimple = False, isAddStrengh = False,
             if auto_participate:
                 task_queue.appendleft(task_checkConfilits())
         
-        task_queue.appendleft(task_gotoTree())
+        #task_queue.appendleft(task_gotoTree())
+        task_queue.appendleft(task_get_redPackage())
 
         if always == False and g_times == 7:
             handle_end_game()

BIN
dongri_img/check/talk_in3.png


BIN
dongri_img/special_activity/msg_new.png


BIN
dongri_img/special_activity/red_package.png


BIN
dongri_img/special_activity/red_package2.png


BIN
dongri_img/special_activity/red_package_open.png


+ 7 - 0
dongri_pic.py

@@ -145,6 +145,7 @@ class check_img:
     share_btn = R'dongri_img\check\share_btn.png'
     talk_in = R'dongri_img\check\talk_in.png'
     talk_in2 = R'dongri_img\check\talk_in2.png'
+    talk_in3 = R'dongri_img\check\talk_in3.png'
     talkin_person = R'dongri_img\check\talkin_person.png'
     talkin_jina = R'dongri_img\check\talkin_jina.png'
     xiaohao_jina = R'dongri_img\check\xiaohao_jina.png'
@@ -208,6 +209,12 @@ class special_activity_img:
     quick_choose = R'dongri_img\special_activity\quick_choose.png'
     choose_zero = R'dongri_img\special_activity\choose_zero.png'
 
+    ## 红包
+    red_package = R'dongri_img\special_activity\red_package.png'
+    red_package2 = R'dongri_img\special_activity\red_package2.png'
+    red_package_open = R'dongri_img\special_activity\red_package_open.png'
+    msg_new = R'dongri_img\special_activity\msg_new.png'
+
 
 
 

+ 16 - 7
dongri_task.py

@@ -1152,12 +1152,20 @@ class task_fight_enemy(dongri_task):
         return True
 
 
+class task_get_redPackage(dongri_task):
+    def __init__(self):
+        super().__init__(f"领取红包")
+    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
+        oldTime = time.time()
+        while True:
+            if time.time() - oldTime > 150:
+                break
+            waitClickImg_noWait_withBool((special_activity_img.red_package, special_activity_img.red_package2, special_activity_img.msg_new, special_activity_img.red_package_open), 2, 0)
 
-        
-
-
-    
-
+        return True
 
 
 if __name__ == '__main__':
@@ -1188,5 +1196,6 @@ if __name__ == '__main__':
     #task_collect(3).run()
     #task_collect(4).run()
     #task_returnAllLine().run()
-    task_paticipateInTeam().run()
-    #task_fight_jina(True).run()
+    #task_paticipateInTeam().run()
+    #task_fight_jina(True).run()
+    task_get_redPackage().run()

+ 1 - 1
scriptBase/imgFind.py

@@ -184,7 +184,7 @@ class pcacc_img:
     def find_img(image_path):
 
         # 设置查找的置信度(confidence)阈值,范围从0到1,默认为0.999
-        confidence_threshold = 0.95
+        confidence_threshold = 0.92
 
         # 查找模糊图片在屏幕上的位置
         position = pyautogui.locateOnScreen(image_path, confidence=confidence_threshold)