|
@@ -1129,18 +1129,19 @@ class task_fight_enemy(dongri_task):
|
|
firstPos = get_yys_random_point(special_activity_img.first_enemy_region)
|
|
firstPos = get_yys_random_point(special_activity_img.first_enemy_region)
|
|
pcacc_mouse.click(firstPos[0], firstPos[1])
|
|
pcacc_mouse.click(firstPos[0], firstPos[1])
|
|
maxTryTimes = 5
|
|
maxTryTimes = 5
|
|
- while waitFindImg_withBool(attackArr, 2, 1) == False and maxTryTimes > 0:
|
|
|
|
|
|
+ if waitFindImg_withBool(special_activity_img.visit_island, 1, 1) == True:
|
|
|
|
+ return False
|
|
|
|
+ while waitFindImg_withBool(attackArr, 1, 0) == False and maxTryTimes > 0:
|
|
maxTryTimes -= 1
|
|
maxTryTimes -= 1
|
|
myTimeSleep_big()
|
|
myTimeSleep_big()
|
|
mid_enemy_pos = get_yys_random_point(special_activity_img.mid_enemy_region)
|
|
mid_enemy_pos = get_yys_random_point(special_activity_img.mid_enemy_region)
|
|
pcacc_mouse.click(mid_enemy_pos[0], mid_enemy_pos[1])
|
|
pcacc_mouse.click(mid_enemy_pos[0], mid_enemy_pos[1])
|
|
myTimeSleep_big()
|
|
myTimeSleep_big()
|
|
-
|
|
|
|
- if waitClickImg_noWait_withBool(attackArr, 2, 1) == False:
|
|
|
|
|
|
+ if waitFindImg_withBool(special_activity_img.visit_island, 1, 1) == True:
|
|
return False
|
|
return False
|
|
- if waitClickImg_noWait_withBool(monster_img.line1, 2, 1) == False:
|
|
|
|
|
|
+ if waitClickImg_noWait_withBool(attackArr, 1, 0) == False:
|
|
return False
|
|
return False
|
|
- if waitFindImg_withBool(monster_img.no_hero, 2, 1) == True:
|
|
|
|
|
|
+ if waitClickImg_noWait_withBool(monster_img.line1, 2, 1) == False:
|
|
return False
|
|
return False
|
|
|
|
|
|
if waitClickImg_noWait_withBool([monster_img.fight, monster_img.fight2], 2, 1) == False:
|
|
if waitClickImg_noWait_withBool([monster_img.fight, monster_img.fight2], 2, 1) == False:
|
|
@@ -1186,6 +1187,28 @@ class task_read_mails(dongri_task):
|
|
if waitClickImg_noWait_withBool(check_img.mail_read, 2, 1) == False:
|
|
if waitClickImg_noWait_withBool(check_img.mail_read, 2, 1) == False:
|
|
return False
|
|
return False
|
|
return True
|
|
return True
|
|
|
|
+
|
|
|
|
+class task_checkBenifitStatus(dongri_task):
|
|
|
|
+ def __init__(self):
|
|
|
|
+ super().__init__(f"查看增益状态")
|
|
|
|
+ def run(self):
|
|
|
|
+ basic_operate.go_town()
|
|
|
|
+ if waitFindImg_withBool(check_img.benefit_collect, 2, 1) == True:
|
|
|
|
+ return True
|
|
|
|
+ if waitClickImg_noWait_withBool(check_img.add_benefit, 2, 1) == False:
|
|
|
|
+ return False
|
|
|
|
+ waitClickImg_noWait_withBool(check_img.benefit_evolve, 2, 1)
|
|
|
|
+ if waitClickImg_noWait_withBool(check_img.benefit_collect_info, 2, 1) == False:
|
|
|
|
+ return False
|
|
|
|
+ myTimeSleep_big()
|
|
|
|
+ dstPos = get_yys_random_point(check_img.benefit_use_region)
|
|
|
|
+ pcacc_mouse.click(dstPos[0], dstPos[1])
|
|
|
|
+ myTimeSleep_big()
|
|
|
|
+ if waitClickImg_noWait_withBool(check_img.benefit_buy, 2, 1) == False:
|
|
|
|
+ return False
|
|
|
|
+ waitClickImg_noWait_withBool(check_img.buy_enter, 2, 1)
|
|
|
|
+
|
|
|
|
+ return True
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|
|
@@ -1219,4 +1242,5 @@ if __name__ == '__main__':
|
|
#task_paticipateInTeam().run()
|
|
#task_paticipateInTeam().run()
|
|
#task_fight_jina(True).run()
|
|
#task_fight_jina(True).run()
|
|
#task_get_redPackage().run()
|
|
#task_get_redPackage().run()
|
|
- task_read_mails().run()
|
|
|
|
|
|
+ #task_read_mails().run()
|
|
|
|
+ task_checkBenifitStatus().run()
|