|
@@ -495,10 +495,11 @@ class task_fightMonster(dongri_task):
|
|
|
def run(self):
|
|
|
global g_task_lineCheck
|
|
|
now = datetime.now()
|
|
|
- target_time = datetime.combine(now.date(), dt.time(20, 30))
|
|
|
+ target_time = datetime.combine(now.date(), dt.time(21, 00))
|
|
|
+ end_time = datetime.combine(now.date(), dt.time(22, 00))
|
|
|
|
|
|
# 判断当前时间是否超过20:30
|
|
|
- if now > target_time:
|
|
|
+ if now > target_time and now < end_time:
|
|
|
print("当前时间已超过20:30,不执行操作")
|
|
|
return False
|
|
|
|
|
@@ -1071,21 +1072,14 @@ class task_paticipateInTeam2(dongri_task):
|
|
|
return False
|
|
|
|
|
|
waitClickImg_noWait_withBool(self.line, 0.1, 1)
|
|
|
- maxTryTimes = 3
|
|
|
- while maxTryTimes > 0:
|
|
|
- maxTryTimes -= 1
|
|
|
- if waitFindImg_withBool(special_activity_img.power0, 1, 0.5) == False:# 实力不为0
|
|
|
- powerCount = task_checkPower().run()
|
|
|
- if powerCount < 21234567:
|
|
|
+ if waitFindImg_withBool(special_activity_img.power0, 0.1, 0) == False:# 实力不为0
|
|
|
+ if self.checkPower:
|
|
|
+ if waitFindImg_withBool(check_img.enough_soilder, 1, 0) == False:
|
|
|
return False
|
|
|
-
|
|
|
- waitClickImg_withBool([monster_img.fight, monster_img.fight2, monster_img.fight3], 1, 0.5)
|
|
|
- return True
|
|
|
- else:
|
|
|
- if False == waitClickImg_noWait_withBool(monster_img.all_select, 1, 0.5):
|
|
|
- break
|
|
|
- myTimeSleep_small()
|
|
|
- return True
|
|
|
+
|
|
|
+ waitClickImg_withBool([monster_img.fight, monster_img.fight2, monster_img.fight3], 1, 0)
|
|
|
+ return True
|
|
|
+ return False
|
|
|
|
|
|
|
|
|
|
|
@@ -1112,32 +1106,32 @@ class task_paticipateInTeam(dongri_task):
|
|
|
if waitClickImg_noWait_withBool(check_img.conflits, 2, 1) == False:
|
|
|
return False
|
|
|
myTimeSleep_big()
|
|
|
- dragTimes = random.randint(1, 3)
|
|
|
+ dragTimes = 5
|
|
|
for i in range(dragTimes):
|
|
|
yys_dragAuto(check_img.move_down)
|
|
|
myTimeSleep_small()
|
|
|
|
|
|
- ret = waitClickImg_noWait_withBool(monster_img.participate, 1, 1, True)
|
|
|
+ ret = False
|
|
|
+ for i in range(dragTimes):
|
|
|
+ ret = waitClickImg_noWait_withBool(monster_img.participate, 1, 0, True)
|
|
|
+ if ret == True:
|
|
|
+ break
|
|
|
+ else:
|
|
|
+ yys_dragAuto(check_img.move_down)
|
|
|
+ myTimeSleep_small()
|
|
|
if ret == False:
|
|
|
return False
|
|
|
|
|
|
waitClickImg_noWait_withBool(self.line, 0.1, 1)
|
|
|
- maxTryTimes = 3
|
|
|
- while maxTryTimes > 0:
|
|
|
- maxTryTimes -= 1
|
|
|
- if waitFindImg_withBool(special_activity_img.power0, 1, 0.5) == False:# 实力不为0
|
|
|
- if self.checkPower:
|
|
|
- powerCount = task_checkPower().run()
|
|
|
- if powerCount < 21234567:
|
|
|
- return False
|
|
|
-
|
|
|
- waitClickImg_withBool([monster_img.fight, monster_img.fight2, monster_img.fight3], 1, 0.5)
|
|
|
- return True
|
|
|
- else:
|
|
|
- if False == waitClickImg_noWait_withBool(monster_img.all_select, 1, 0.5):
|
|
|
- break
|
|
|
- myTimeSleep_small()
|
|
|
- return True
|
|
|
+
|
|
|
+ if waitFindImg_withBool(special_activity_img.power0, 0.1, 0) == False:# 实力不为0
|
|
|
+ if self.checkPower:
|
|
|
+ if waitFindImg_withBool(check_img.enough_soilder, 1, 0) == False:
|
|
|
+ return False
|
|
|
+
|
|
|
+ waitClickImg_withBool([monster_img.fight, monster_img.fight2, monster_img.fight3], 1, 0)
|
|
|
+ return True
|
|
|
+ return False
|
|
|
|
|
|
class task_cure(dongri_task):
|
|
|
def __init__(self, continueCure = False, cureNum = None):
|
|
@@ -1716,7 +1710,7 @@ if __name__ == '__main__':
|
|
|
#basic_operate.add_strength()
|
|
|
#task_fightMonster(False, True,False).run()
|
|
|
#task_checkHelp().run()
|
|
|
- task_checkStoreRoom().run()
|
|
|
+ #task_checkStoreRoom().run()
|
|
|
#task_start_game(1)
|
|
|
#check_safe_collect().run()
|
|
|
#task_fight_campion().run()
|
|
@@ -1732,7 +1726,7 @@ if __name__ == '__main__':
|
|
|
#task_collect(3).run()
|
|
|
#task_collect(4).run()
|
|
|
#task_returnAllLine().run()
|
|
|
- #task_paticipateInTeam().run()
|
|
|
+ task_paticipateInTeam().run()
|
|
|
#task_fight_jina(True).run()
|
|
|
#task_get_redPackage().run()
|
|
|
#task_read_mails().run()
|