|
@@ -1,5 +1,4 @@
|
|
|
# -*- coding: utf-8 -*-
|
|
|
-from datetime import datetime
|
|
|
from flask import Flask, render_template
|
|
|
from flask_socketio import SocketIO, emit
|
|
|
from scriptBase.comon import *
|
|
@@ -62,8 +61,7 @@ def thread_runTask():
|
|
|
isReset = False
|
|
|
cfg = read_cfg()
|
|
|
if cfg['switch']:
|
|
|
- config = read_Dailycfg()
|
|
|
- type = update_rungame_type(config)
|
|
|
+ type = update_rungame_type()
|
|
|
print(f'启动游戏{type}')
|
|
|
restart_game(type)
|
|
|
else:
|
|
@@ -211,7 +209,6 @@ def auto_participate():
|
|
|
task_queue.appendleft(task_paticipateInTeam())
|
|
|
task_queue.appendleft(task_paticipateInTeam())
|
|
|
task_queue.appendleft(task_paticipateInTeam())
|
|
|
- task_queue.appendleft(task_checkHelp(True))
|
|
|
myTimeSleep_big()
|
|
|
# 每次循环检查已用时间
|
|
|
current_time = time.time()
|
|
@@ -245,9 +242,7 @@ def auto_palace():
|
|
|
if len(task_queue) < 4:
|
|
|
task_queue.appendleft(task_cure(True, g_cureNum))
|
|
|
task_queue.appendleft(task_cure(True, g_cureNum))
|
|
|
- task_queue.appendleft(task_checkHelp())
|
|
|
task_queue.appendleft(task_fight_enemy())
|
|
|
- task_queue.appendleft(task_checkHelp())
|
|
|
|
|
|
myTimeSleep_big()
|
|
|
current_time = time.time()
|
|
@@ -296,8 +291,20 @@ def add_auto_task(isMaxCollect, isJina, isSimple = False, isAddStrengh = False,
|
|
|
set_fight_big_monster_times(config, fight_big_monster_times + 1)
|
|
|
write_Dailycfg(config)
|
|
|
|
|
|
+ if is_within_n_minutes(get_todo_time("巨熊行动", 60, 0)):
|
|
|
+ # 设置无尽运行和启动的游戏为0
|
|
|
+ always = True
|
|
|
+ update_rungame_type(0)
|
|
|
+ elif is_within_n_minutes(get_todo_time("巨熊行动", 10, 40)):
|
|
|
+ task_queue.appendleft(task_returnAllLine())
|
|
|
+ if len(task_queue) < 5:
|
|
|
+ task_queue.appendleft(task_paticipateInTeam())
|
|
|
+ task_queue.appendleft(task_paticipateInTeam())
|
|
|
+ task_queue.appendleft(task_paticipateInTeam())
|
|
|
+ myTimeSleep_big()
|
|
|
+ continue
|
|
|
+
|
|
|
|
|
|
-
|
|
|
if activity == 'lianmeng':
|
|
|
task_queue.appendleft(task_activity_lianmeng())
|
|
|
elif activity == 'cure':
|
|
@@ -352,15 +359,12 @@ def add_auto_task(isMaxCollect, isJina, isSimple = False, isAddStrengh = False,
|
|
|
task_queue.appendleft(task_collect(collectArr, isSimple, isAddStrengh))
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
if g_times % 3 == 0:
|
|
|
task_queue.appendleft(task_checkDonata())
|
|
|
task_queue.appendleft(task_checkMaster())
|
|
|
task_queue.appendleft(task_checkAdventure())
|
|
|
task_queue.appendleft(task_train(train_type))
|
|
|
task_queue.appendleft(task_useAnnimalSkill())
|
|
|
- #task_queue.appendleft(task_checkHelp(False))
|
|
|
task_queue.appendleft(task_read_mails())
|
|
|
if auto_participate:
|
|
|
task_queue.appendleft(task_checkConfilits())
|
|
@@ -416,16 +420,23 @@ def check_daily_config(config):
|
|
|
print(f"Today's config found: {today}") # 调试信息
|
|
|
return True
|
|
|
|
|
|
-def update_rungame_type(config):
|
|
|
+def update_rungame_type(dstType=None):
|
|
|
+ config = read_Dailycfg()
|
|
|
runTypeStr = 'runType'
|
|
|
if runTypeStr not in config:
|
|
|
- config[runTypeStr] = 1
|
|
|
+ if dstType is not None:
|
|
|
+ config[runTypeStr] = dstType
|
|
|
+ else:
|
|
|
+ config[runTypeStr] = 1
|
|
|
write_Dailycfg(config)
|
|
|
print(f"更新下次启动{config[runTypeStr]}")
|
|
|
return 0
|
|
|
else:
|
|
|
value = config[runTypeStr]
|
|
|
- config[runTypeStr] = (value + 1) % 2
|
|
|
+ if dstType is not None:
|
|
|
+ config[runTypeStr] = dstType
|
|
|
+ else:
|
|
|
+ config[runTypeStr] = (value + 1) % 2
|
|
|
write_Dailycfg(config)
|
|
|
print(f"更新下次启动{config[runTypeStr]}")
|
|
|
return value
|