0325更改
This commit is contained in:
parent
e8d912a4e7
commit
6146f19551
@ -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:
|
||||
|
57
baotu.py
57
baotu.py
@ -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)
|
||||
@ -74,19 +72,19 @@ def wabaotu():
|
||||
common.findandclick(res_shiyong_beibao)
|
||||
sleep(1)
|
||||
|
||||
wabaoisover=False
|
||||
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("没在战斗中")
|
||||
wabaoisover =True
|
||||
|
||||
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")
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user