0325更改

This commit is contained in:
jinghaibing 2025-03-25 17:01:16 +08:00
parent e8d912a4e7
commit 6146f19551
3 changed files with 82 additions and 46 deletions

View File

@ -122,9 +122,12 @@ def execute_all_tasks():
print("执行任务: 师门任务")
shimen.shimenrenwu()
if "宝图任务" in renwuliebiao:
print("执行任务: 宝图任务")
baotu.baoturenwu()
if "自动挖宝" in renwuliebiao:
print("执行任务: 自动挖宝")
baotu.baoturenwu()
baotu.wabaotu()
if "秘境降妖" in renwuliebiao:

View File

@ -54,16 +54,14 @@ def baoturenwu():
def wabaotu():
while True:
if common.isfire():
print("战斗中,等待战斗完成")
sleep(60)
res_last = common.zhaotu("包裹.png")
if res_last is not None:
common.findandclick(res_last)
sleep(1)
if openbeibao():
num =0
while True:
res_baotu = common.zhaotu("宝图任务.png")
if res_baotu is not None:
common.findandclick(res_baotu)
@ -76,17 +74,17 @@ def wabaotu():
wabaoisover = False
while True:
sleep(10)
if common.isfire():
print("战斗中,等待战斗完成")
sleep(60)
res_shiyong = common.zhaotu("使用按钮.png")
if res_shiyong is not None:
common.findandclick(res_shiyong)
sleep(5)
else:
print("8秒后再次查找使用按钮")
sleep(8)
print("10秒后再次查找使用按钮")
sleep(10)
res_shiyong = common.zhaotu("使用按钮.png")
if res_shiyong is not None:
print("2次查询找到使用按钮")
@ -100,13 +98,48 @@ def wabaotu():
sleep(60)
else:
print("没在战斗中")
openbeibao()
zhenglibb()
res_baotu = common.zhaotu("宝图任务.png")
if res_baotu is None:
wabaoisover = True
print("******背包中没有宝图,挖宝任务完成******")
return
else:
break
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)
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():
res_btrw = common.zhaotu("日常-宝图任务.png")

View File

@ -66,7 +66,7 @@ def xiahua():
def zhaobtn(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):
time.sleep(num)