0325更改
This commit is contained in:
		
							parent
							
								
									e8d912a4e7
								
							
						
					
					
						commit
						6146f19551
					
				@ -122,9 +122,12 @@ def execute_all_tasks():
 | 
				
			|||||||
        print("执行任务: 师门任务")
 | 
					        print("执行任务: 师门任务")
 | 
				
			||||||
        shimen.shimenrenwu()
 | 
					        shimen.shimenrenwu()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if "宝图任务" in renwuliebiao:
 | 
				
			||||||
 | 
					        print("执行任务: 宝图任务")
 | 
				
			||||||
 | 
					        baotu.baoturenwu()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if "自动挖宝" in renwuliebiao:
 | 
					    if "自动挖宝" in renwuliebiao:
 | 
				
			||||||
        print("执行任务: 自动挖宝")
 | 
					        print("执行任务: 自动挖宝")
 | 
				
			||||||
        baotu.baoturenwu()
 | 
					 | 
				
			||||||
        baotu.wabaotu()
 | 
					        baotu.wabaotu()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if "秘境降妖" in renwuliebiao:
 | 
					    if "秘境降妖" in renwuliebiao:
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										53
									
								
								baotu.py
									
									
									
									
									
								
							
							
						
						
									
										53
									
								
								baotu.py
									
									
									
									
									
								
							@ -54,16 +54,14 @@ def baoturenwu():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def wabaotu():
 | 
					def wabaotu():
 | 
				
			||||||
    while True:
 | 
					
 | 
				
			||||||
    if common.isfire():
 | 
					    if common.isfire():
 | 
				
			||||||
        print("战斗中,等待战斗完成")
 | 
					        print("战斗中,等待战斗完成")
 | 
				
			||||||
        sleep(60)
 | 
					        sleep(60)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        res_last = common.zhaotu("包裹.png")
 | 
					    if openbeibao():
 | 
				
			||||||
        if res_last is not None:
 | 
					        num =0
 | 
				
			||||||
            common.findandclick(res_last)
 | 
					        while True:
 | 
				
			||||||
            sleep(1)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            res_baotu = common.zhaotu("宝图任务.png")
 | 
					            res_baotu = common.zhaotu("宝图任务.png")
 | 
				
			||||||
            if res_baotu is not None:
 | 
					            if res_baotu is not None:
 | 
				
			||||||
                common.findandclick(res_baotu)
 | 
					                common.findandclick(res_baotu)
 | 
				
			||||||
@ -76,17 +74,17 @@ def wabaotu():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                    wabaoisover = False
 | 
					                    wabaoisover = False
 | 
				
			||||||
                    while True:
 | 
					                    while True:
 | 
				
			||||||
 | 
					                        sleep(10)
 | 
				
			||||||
                        if common.isfire():
 | 
					                        if common.isfire():
 | 
				
			||||||
                            print("战斗中,等待战斗完成")
 | 
					                            print("战斗中,等待战斗完成")
 | 
				
			||||||
                            sleep(60)
 | 
					                            sleep(60)
 | 
				
			||||||
 | 
					 | 
				
			||||||
                        res_shiyong = common.zhaotu("使用按钮.png")
 | 
					                        res_shiyong = common.zhaotu("使用按钮.png")
 | 
				
			||||||
                        if res_shiyong is not None:
 | 
					                        if res_shiyong is not None:
 | 
				
			||||||
                            common.findandclick(res_shiyong)
 | 
					                            common.findandclick(res_shiyong)
 | 
				
			||||||
                            sleep(5)
 | 
					                            sleep(5)
 | 
				
			||||||
                        else:
 | 
					                        else:
 | 
				
			||||||
                    print("8秒后再次查找使用按钮")
 | 
					                            print("10秒后再次查找使用按钮")
 | 
				
			||||||
                    sleep(8)
 | 
					                            sleep(10)
 | 
				
			||||||
                            res_shiyong = common.zhaotu("使用按钮.png")
 | 
					                            res_shiyong = common.zhaotu("使用按钮.png")
 | 
				
			||||||
                            if res_shiyong is not None:
 | 
					                            if res_shiyong is not None:
 | 
				
			||||||
                                print("2次查询,找到使用按钮")
 | 
					                                print("2次查询,找到使用按钮")
 | 
				
			||||||
@ -100,13 +98,48 @@ def wabaotu():
 | 
				
			|||||||
                                sleep(60)
 | 
					                                sleep(60)
 | 
				
			||||||
                            else:
 | 
					                            else:
 | 
				
			||||||
                                print("没在战斗中")
 | 
					                                print("没在战斗中")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                openbeibao()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                zhenglibb()
 | 
				
			||||||
 | 
					                                res_baotu = common.zhaotu("宝图任务.png")
 | 
				
			||||||
 | 
					                                if res_baotu is None:
 | 
				
			||||||
                                    wabaoisover = True
 | 
					                                    wabaoisover = True
 | 
				
			||||||
 | 
					                                    print("******背包中没有宝图,挖宝任务完成******")
 | 
				
			||||||
                                    return
 | 
					                                    return
 | 
				
			||||||
 | 
					                                else:
 | 
				
			||||||
 | 
					                                    break
 | 
				
			||||||
                        sleep(8)
 | 
					                        sleep(8)
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if num >1:
 | 
				
			||||||
 | 
					                    wabaoisover = True
 | 
				
			||||||
 | 
					                    print("******背包中没有宝图,挖宝任务完成******")
 | 
				
			||||||
 | 
					                    return
 | 
				
			||||||
 | 
					                zhenglibb()
 | 
				
			||||||
 | 
					                num+=1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def openbeibao():
 | 
				
			||||||
 | 
					    res_last = FindImages.find(
 | 
				
			||||||
 | 
					        [
 | 
				
			||||||
 | 
					            R.img("包裹.png"),
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					        confidence=0.9,
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					    if res_last is not None:
 | 
				
			||||||
 | 
					        common.findandclick(res_last)
 | 
				
			||||||
        sleep(1)
 | 
					        sleep(1)
 | 
				
			||||||
 | 
					        return True
 | 
				
			||||||
 | 
					    else:
 | 
				
			||||||
 | 
					        return False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def zhenglibb():
 | 
				
			||||||
 | 
					    res_bbzl = common.zhaotu("背包-整理.png")
 | 
				
			||||||
 | 
					    if res_bbzl is not None:
 | 
				
			||||||
 | 
					        common.findandclick(res_bbzl)
 | 
				
			||||||
 | 
					        sleep(3)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def dianjirenwu():
 | 
					def dianjirenwu():
 | 
				
			||||||
    res_btrw = common.zhaotu("日常-宝图任务.png")
 | 
					    res_btrw = common.zhaotu("日常-宝图任务.png")
 | 
				
			||||||
 | 
				
			|||||||
@ -66,7 +66,7 @@ def xiahua():
 | 
				
			|||||||
def zhaobtn(pngs):
 | 
					def zhaobtn(pngs):
 | 
				
			||||||
    # 找各种任务按钮
 | 
					    # 找各种任务按钮
 | 
				
			||||||
    images = [R.img(png + ".png") for png in pngs]
 | 
					    images = [R.img(png + ".png") for png in pngs]
 | 
				
			||||||
    return FindImages.find(images, confidence=0.95)
 | 
					    return FindImages.find(images, confidence=0.9)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def sleep(num):
 | 
					def sleep(num):
 | 
				
			||||||
    time.sleep(num)
 | 
					    time.sleep(num)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user