mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-08 12:07:36 +08:00
commit
d621a48ebc
@ -312,6 +312,7 @@ pre.rich-traceback-code {
|
||||
}
|
||||
|
||||
#pywebio-scope-group__info>p {
|
||||
font-size: .80rem !important;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
|
BIN
assets/shop/voucher/LoggerUnlockT1.png
Normal file
BIN
assets/shop/voucher/LoggerUnlockT1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
BIN
assets/shop/voucher/LoggerUnlockT2.png
Normal file
BIN
assets/shop/voucher/LoggerUnlockT2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
BIN
assets/tw/freebies/MAIL_COLLECT.png
Normal file
BIN
assets/tw/freebies/MAIL_COLLECT.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
assets/tw/freebies/MAIL_COLLECTED.png
Normal file
BIN
assets/tw/freebies/MAIL_COLLECTED.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.9 KiB |
BIN
assets/tw/freebies/MAIL_DELETE.png
Normal file
BIN
assets/tw/freebies/MAIL_DELETE.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@ -1050,7 +1050,7 @@
|
||||
"Commission": {
|
||||
"DoMajorCommission": false,
|
||||
"PresetFilter": "cube",
|
||||
"CustomFilter": "DailyEvent > Gem-4 > Gem-2 > Gem-8 > ExtraCube-0:30\n> UrgentCube-1:30 > UrgentCube-1:45 > UrgentCube-3 \n> ExtraDrill-5:20 > ExtraDrill-2 > ExtraDrill-3:20 \n> UrgentCube-2:15 > UrgentCube-4\n> ExtraDrill-1 > UrgentCube-6 > ExtraCube-1:30 \n> ExtraDrill-2:40 > ExtraDrill-0:20 \n> Major > DailyChip > DailyResource\n> ExtraPart-0:30 > ExtraOil-1 > UrgentBox-6 \n> ExtraCube-3 > ExtraPart-1 > UrgentBox-3\n> ExtraCube-4 > ExtraPart-1:30 > ExtraOil-4\n> UrgentBox-1 > ExtraCube-5 > UrgentBox-1\n> ExtraCube-8 > ExtraOil-8\n> UrgentDrill-4 > UrgentDrill-2:40 > UrgentDrill-2 \n> UrgentDrill-1 > UrgentDrill-1:30 > UrgentDrill-1:10\n> Extra-0:20 > Extra-0:30 > Extra-1:00 > Extra-1:30 > Extra-2:00\n> shortest"
|
||||
"CustomFilter": "DailyEvent > Gem-4 > Gem-2 > Gem-8 > ExtraCube-0:30\n> UrgentCube-1:30 > UrgentCube-1:45 > UrgentCube-3\n> ExtraDrill-5:20 > ExtraDrill-2 > ExtraDrill-3:20\n> UrgentCube-2:15 > UrgentCube-4\n> ExtraDrill-1 > UrgentCube-6 > ExtraCube-1:30\n> ExtraDrill-2:40 > ExtraDrill-0:20\n> Major > DailyChip > DailyResource\n> ExtraPart-0:30 > ExtraOil-1 > UrgentBox-6\n> ExtraCube-3 > ExtraPart-1 > UrgentBox-3\n> ExtraCube-4 > ExtraPart-1:30 > ExtraOil-4\n> UrgentBox-1 > ExtraCube-5 > UrgentBox-1\n> ExtraCube-8 > ExtraOil-8\n> UrgentDrill-4 > UrgentDrill-2:40 > UrgentDrill-2\n> UrgentDrill-1 > UrgentDrill-1:30 > UrgentDrill-1:10\n> Extra-0:20 > Extra-0:30 > Extra-1:00 > Extra-1:30 > Extra-2:00\n> shortest"
|
||||
},
|
||||
"Storage": {
|
||||
"Storage": {}
|
||||
@ -1706,6 +1706,23 @@
|
||||
"Storage": {}
|
||||
}
|
||||
},
|
||||
"OpsiArchive": {
|
||||
"Scheduler": {
|
||||
"Enable": false,
|
||||
"NextRun": "2020-01-01 00:00:00",
|
||||
"Command": "OpsiArchive",
|
||||
"SuccessInterval": 60,
|
||||
"FailureInterval": 60,
|
||||
"ServerUpdate": "00:00"
|
||||
},
|
||||
"OpsiFleet": {
|
||||
"Fleet": 1,
|
||||
"Submarine": false
|
||||
},
|
||||
"Storage": {
|
||||
"Storage": {}
|
||||
}
|
||||
},
|
||||
"OpsiStronghold": {
|
||||
"Scheduler": {
|
||||
"Enable": false,
|
||||
|
@ -145,18 +145,19 @@ class DeployConfig(ConfigModel):
|
||||
return False
|
||||
else:
|
||||
logger.info(f"[ failure ], error_code: {error_code}")
|
||||
self.show_error(command, error_code)
|
||||
self.show_error(command)
|
||||
raise ExecutionError
|
||||
else:
|
||||
logger.info(f"[ success ]")
|
||||
return True
|
||||
|
||||
def show_error(self, command=None, error_code=None):
|
||||
def show_error(self, command=None):
|
||||
logger.hr("Update failed", 0)
|
||||
self.show_config()
|
||||
logger.info("")
|
||||
logger.info(f"Last command: {command}\nerror_code: {error_code}")
|
||||
logger.info(f"Last command: {command}")
|
||||
logger.info(
|
||||
"Please check your deploy settings in config/deploy.yaml "
|
||||
"and re-open Alas.exe"
|
||||
)
|
||||
logger.info("Take the screenshot of entire window if you need help")
|
||||
|
@ -5607,7 +5607,7 @@
|
||||
},
|
||||
"CustomFilter": {
|
||||
"type": "textarea",
|
||||
"value": "DailyEvent > Gem-4 > Gem-2 > Gem-8 > ExtraCube-0:30\n> UrgentCube-1:30 > UrgentCube-1:45 > UrgentCube-3 \n> ExtraDrill-5:20 > ExtraDrill-2 > ExtraDrill-3:20 \n> UrgentCube-2:15 > UrgentCube-4\n> ExtraDrill-1 > UrgentCube-6 > ExtraCube-1:30 \n> ExtraDrill-2:40 > ExtraDrill-0:20 \n> Major > DailyChip > DailyResource\n> ExtraPart-0:30 > ExtraOil-1 > UrgentBox-6 \n> ExtraCube-3 > ExtraPart-1 > UrgentBox-3\n> ExtraCube-4 > ExtraPart-1:30 > ExtraOil-4\n> UrgentBox-1 > ExtraCube-5 > UrgentBox-1\n> ExtraCube-8 > ExtraOil-8\n> UrgentDrill-4 > UrgentDrill-2:40 > UrgentDrill-2 \n> UrgentDrill-1 > UrgentDrill-1:30 > UrgentDrill-1:10\n> Extra-0:20 > Extra-0:30 > Extra-1:00 > Extra-1:30 > Extra-2:00\n> shortest"
|
||||
"value": "DailyEvent > Gem-4 > Gem-2 > Gem-8 > ExtraCube-0:30\n> UrgentCube-1:30 > UrgentCube-1:45 > UrgentCube-3\n> ExtraDrill-5:20 > ExtraDrill-2 > ExtraDrill-3:20\n> UrgentCube-2:15 > UrgentCube-4\n> ExtraDrill-1 > UrgentCube-6 > ExtraCube-1:30\n> ExtraDrill-2:40 > ExtraDrill-0:20\n> Major > DailyChip > DailyResource\n> ExtraPart-0:30 > ExtraOil-1 > UrgentBox-6\n> ExtraCube-3 > ExtraPart-1 > UrgentBox-3\n> ExtraCube-4 > ExtraPart-1:30 > ExtraOil-4\n> UrgentBox-1 > ExtraCube-5 > UrgentBox-1\n> ExtraCube-8 > ExtraOil-8\n> UrgentDrill-4 > UrgentDrill-2:40 > UrgentDrill-2\n> UrgentDrill-1 > UrgentDrill-1:30 > UrgentDrill-1:10\n> Extra-0:20 > Extra-0:30 > Extra-1:00 > Extra-1:30 > Extra-2:00\n> shortest"
|
||||
}
|
||||
},
|
||||
"Storage": {
|
||||
@ -8215,6 +8215,63 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"OpsiArchive": {
|
||||
"Scheduler": {
|
||||
"Enable": {
|
||||
"type": "checkbox",
|
||||
"value": false
|
||||
},
|
||||
"NextRun": {
|
||||
"type": "datetime",
|
||||
"value": "2020-01-01 00:00:00",
|
||||
"validate": "datetime"
|
||||
},
|
||||
"Command": {
|
||||
"type": "input",
|
||||
"value": "OpsiArchive",
|
||||
"display": "hide"
|
||||
},
|
||||
"SuccessInterval": {
|
||||
"type": "input",
|
||||
"value": 60,
|
||||
"display": "hide"
|
||||
},
|
||||
"FailureInterval": {
|
||||
"type": "input",
|
||||
"value": 60,
|
||||
"display": "hide"
|
||||
},
|
||||
"ServerUpdate": {
|
||||
"type": "input",
|
||||
"value": "00:00",
|
||||
"display": "hide"
|
||||
}
|
||||
},
|
||||
"OpsiFleet": {
|
||||
"Fleet": {
|
||||
"type": "select",
|
||||
"value": 1,
|
||||
"option": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4
|
||||
]
|
||||
},
|
||||
"Submarine": {
|
||||
"type": "checkbox",
|
||||
"value": false
|
||||
}
|
||||
},
|
||||
"Storage": {
|
||||
"Storage": {
|
||||
"type": "storage",
|
||||
"value": {},
|
||||
"valuetype": "ignore",
|
||||
"display": "disabled"
|
||||
}
|
||||
}
|
||||
},
|
||||
"OpsiStronghold": {
|
||||
"Scheduler": {
|
||||
"Enable": {
|
||||
|
@ -269,18 +269,18 @@ Commission:
|
||||
- custom
|
||||
CustomFilter: |-
|
||||
DailyEvent > Gem-4 > Gem-2 > Gem-8 > ExtraCube-0:30
|
||||
> UrgentCube-1:30 > UrgentCube-1:45 > UrgentCube-3
|
||||
> ExtraDrill-5:20 > ExtraDrill-2 > ExtraDrill-3:20
|
||||
> UrgentCube-1:30 > UrgentCube-1:45 > UrgentCube-3
|
||||
> ExtraDrill-5:20 > ExtraDrill-2 > ExtraDrill-3:20
|
||||
> UrgentCube-2:15 > UrgentCube-4
|
||||
> ExtraDrill-1 > UrgentCube-6 > ExtraCube-1:30
|
||||
> ExtraDrill-2:40 > ExtraDrill-0:20
|
||||
> ExtraDrill-1 > UrgentCube-6 > ExtraCube-1:30
|
||||
> ExtraDrill-2:40 > ExtraDrill-0:20
|
||||
> Major > DailyChip > DailyResource
|
||||
> ExtraPart-0:30 > ExtraOil-1 > UrgentBox-6
|
||||
> ExtraPart-0:30 > ExtraOil-1 > UrgentBox-6
|
||||
> ExtraCube-3 > ExtraPart-1 > UrgentBox-3
|
||||
> ExtraCube-4 > ExtraPart-1:30 > ExtraOil-4
|
||||
> UrgentBox-1 > ExtraCube-5 > UrgentBox-1
|
||||
> ExtraCube-8 > ExtraOil-8
|
||||
> UrgentDrill-4 > UrgentDrill-2:40 > UrgentDrill-2
|
||||
> UrgentDrill-4 > UrgentDrill-2:40 > UrgentDrill-2
|
||||
> UrgentDrill-1 > UrgentDrill-1:30 > UrgentDrill-1:10
|
||||
> Extra-0:20 > Extra-0:30 > Extra-1:00 > Extra-1:30 > Extra-2:00
|
||||
> shortest
|
||||
|
@ -57,6 +57,7 @@
|
||||
"OpsiDaily",
|
||||
"OpsiObscure",
|
||||
"OpsiAbyssal",
|
||||
"OpsiArchive",
|
||||
"OpsiStronghold",
|
||||
"OpsiMeowfficerFarming",
|
||||
"OpsiHazard1Leveling",
|
||||
|
@ -356,6 +356,11 @@ OpsiAbyssal:
|
||||
SuccessInterval: 60
|
||||
FailureInterval: 60
|
||||
ServerUpdate: 00:00, 12:00
|
||||
OpsiArchive:
|
||||
Scheduler:
|
||||
SuccessInterval: 60
|
||||
FailureInterval: 60
|
||||
ServerUpdate: 00:00
|
||||
OpsiStronghold:
|
||||
Scheduler:
|
||||
SuccessInterval: 60
|
||||
|
@ -258,6 +258,10 @@ OpsiAbyssal:
|
||||
- Scheduler
|
||||
- OpsiAbyssal
|
||||
- OpsiFleetFilter
|
||||
OpsiArchive:
|
||||
- Scheduler
|
||||
- OpsiArchive
|
||||
- OpsiFleet
|
||||
OpsiStronghold:
|
||||
- Scheduler
|
||||
- OpsiStronghold
|
||||
|
@ -290,6 +290,7 @@ class AzurLaneConfig(ConfigUpdater, ManualConfig, GeneratedConfig, ConfigWatcher
|
||||
limit_next_run(["Commission", "Reward"], limit=now + timedelta(hours=12, seconds=-1))
|
||||
limit_next_run(["Research"], limit=now + timedelta(hours=24, seconds=-1))
|
||||
limit_next_run(["OpsiExplore", "OpsiCrossMonth", "OpsiVoucher"], limit=now + timedelta(days=31, seconds=-1))
|
||||
limit_next_run(["OpsiArchive"], limit=now + timedelta(days=7, seconds=-1))
|
||||
limit_next_run(self.args.keys(), limit=now + timedelta(hours=24, seconds=-1))
|
||||
|
||||
def override(self, **kwargs):
|
||||
|
@ -177,7 +177,7 @@ class GeneratedConfig:
|
||||
# Group `Commission`
|
||||
Commission_DoMajorCommission = False
|
||||
Commission_PresetFilter = 'cube' # chip, chip_24h, cube, cube_24h, oil, custom
|
||||
Commission_CustomFilter = 'DailyEvent > Gem-4 > Gem-2 > Gem-8 > ExtraCube-0:30\n> UrgentCube-1:30 > UrgentCube-1:45 > UrgentCube-3 \n> ExtraDrill-5:20 > ExtraDrill-2 > ExtraDrill-3:20 \n> UrgentCube-2:15 > UrgentCube-4\n> ExtraDrill-1 > UrgentCube-6 > ExtraCube-1:30 \n> ExtraDrill-2:40 > ExtraDrill-0:20 \n> Major > DailyChip > DailyResource\n> ExtraPart-0:30 > ExtraOil-1 > UrgentBox-6 \n> ExtraCube-3 > ExtraPart-1 > UrgentBox-3\n> ExtraCube-4 > ExtraPart-1:30 > ExtraOil-4\n> UrgentBox-1 > ExtraCube-5 > UrgentBox-1\n> ExtraCube-8 > ExtraOil-8\n> UrgentDrill-4 > UrgentDrill-2:40 > UrgentDrill-2 \n> UrgentDrill-1 > UrgentDrill-1:30 > UrgentDrill-1:10\n> Extra-0:20 > Extra-0:30 > Extra-1:00 > Extra-1:30 > Extra-2:00\n> shortest'
|
||||
Commission_CustomFilter = 'DailyEvent > Gem-4 > Gem-2 > Gem-8 > ExtraCube-0:30\n> UrgentCube-1:30 > UrgentCube-1:45 > UrgentCube-3\n> ExtraDrill-5:20 > ExtraDrill-2 > ExtraDrill-3:20\n> UrgentCube-2:15 > UrgentCube-4\n> ExtraDrill-1 > UrgentCube-6 > ExtraCube-1:30\n> ExtraDrill-2:40 > ExtraDrill-0:20\n> Major > DailyChip > DailyResource\n> ExtraPart-0:30 > ExtraOil-1 > UrgentBox-6\n> ExtraCube-3 > ExtraPart-1 > UrgentBox-3\n> ExtraCube-4 > ExtraPart-1:30 > ExtraOil-4\n> UrgentBox-1 > ExtraCube-5 > UrgentBox-1\n> ExtraCube-8 > ExtraOil-8\n> UrgentDrill-4 > UrgentDrill-2:40 > UrgentDrill-2\n> UrgentDrill-1 > UrgentDrill-1:30 > UrgentDrill-1:10\n> Extra-0:20 > Extra-0:30 > Extra-1:00 > Extra-1:30 > Extra-2:00\n> shortest'
|
||||
|
||||
# Group `Tactical`
|
||||
Tactical_TacticalFilter = 'SameT4 > SameT3 > SameT2 > SameT1\n> BlueT2 > YellowT2 > RedT2\n> BlueT3 > YellowT3 > RedT3\n> BlueT4 > YellowT4 > RedT4\n> BlueT1 > YellowT1 > RedT1\n> first'
|
||||
|
@ -19,7 +19,7 @@ class ManualConfig:
|
||||
> OpsiExplore
|
||||
> OpsiAshBeacon
|
||||
> OpsiDaily > OpsiShop > OpsiVoucher
|
||||
> OpsiAbyssal > OpsiStronghold > OpsiObscure
|
||||
> OpsiAbyssal > OpsiStronghold > OpsiObscure > OpsiArchive
|
||||
> Daily > Hard > OpsiAshBeacon > OpsiAshAssist
|
||||
> Sos > EventSp > EventA > EventB > EventC > EventD > RaidDaily > WarArchives > MaritimeEscort
|
||||
> Event > Event2 > Raid > Main > Main2 > Main3
|
||||
|
@ -214,6 +214,10 @@
|
||||
"name": "Abyssal Zones",
|
||||
"help": ""
|
||||
},
|
||||
"OpsiArchive": {
|
||||
"name": "Archive Zones",
|
||||
"help": "Clear archive zones. Archive zones are AP free.\nThe following must be satisfied:\n- OpSi story must be complete\n- Task OpSi Explore enabled or consuming 5000 oil for special radar in OpSi voucher shop"
|
||||
},
|
||||
"OpsiStronghold": {
|
||||
"name": "Siren Strongholds",
|
||||
"help": ""
|
||||
@ -228,7 +232,7 @@
|
||||
},
|
||||
"OpsiCrossMonth": {
|
||||
"name": "Cross Month Daily",
|
||||
"help": " ALAS will enter OpSi 10min before OpSi reset, wait until OpSi reset but not exit OpSi. Then do the daily, obscure, abyssal and meowfficer farming to get extra gold plates. When running dailies, settings in task \"OpsiDaily\" are used, the rest function are the same.\n IMPORTANT: Please do not touch the game while ALAS is waiting for OpSi reset."
|
||||
"help": " ALAS will enter OpSi 10min before OpSi reset, wait until OpSi reset but not exit OpSi. Then do the daily, obscure, abyssal and meowfficer farming to get extra gold plates. When running dailies, settings in task \"OpSiDaily\" are used, the rest function are the same.\n IMPORTANT: Please do not touch the game while ALAS is waiting for OpSi reset."
|
||||
},
|
||||
"Daemon": {
|
||||
"name": "Normal Semi-auto",
|
||||
@ -517,7 +521,7 @@
|
||||
"save": "Save"
|
||||
},
|
||||
"OpsiRecord": {
|
||||
"name": "Opsi Record",
|
||||
"name": "OpSi Record",
|
||||
"help": "",
|
||||
"do_not": "Do nothing",
|
||||
"save": "Save",
|
||||
@ -1237,16 +1241,16 @@
|
||||
},
|
||||
"AddNewStudent": {
|
||||
"_info": {
|
||||
"name": "learn new skills",
|
||||
"help": "When there is a vacant position in the Tactical Academy, a ship girl will be automatically assigned and the first under-level skill will be learned"
|
||||
"name": "Level Skills",
|
||||
"help": "When there is a vacant position in the Tactical Academy, the 1st slot ship girl in dock will be assigned as a student and improve any non-max level skill"
|
||||
},
|
||||
"Enable": {
|
||||
"name": "Enable",
|
||||
"help": ""
|
||||
},
|
||||
"Favorite": {
|
||||
"name": "Use Favorite Filter for Tactical",
|
||||
"help": ""
|
||||
"name": "Use Favorite Filter",
|
||||
"help": "During student selection apply the favorite filter\nThereby, giving priority to certain ship girls\nApply the favorite status to a ship girl in-game"
|
||||
}
|
||||
},
|
||||
"Research": {
|
||||
@ -2072,7 +2076,7 @@
|
||||
"OpsiShop": {
|
||||
"_info": {
|
||||
"name": "OpSi Shop Settings",
|
||||
"help": "Completes OpSi daily activities\nThe following must be satisfied:\n- OpSi story must be complete\n- Task Opsi Explore enabled or consuming 5000 oil for special radar in OpSi voucher shop"
|
||||
"help": "Completes OpSi daily activities\nThe following must be satisfied:\n- OpSi story must be complete\n- Task OpSi Explore enabled or consuming 5000 oil for special radar in OpSi voucher shop"
|
||||
},
|
||||
"BuySupply": {
|
||||
"name": "Buy From Port Shops",
|
||||
@ -2092,7 +2096,7 @@
|
||||
"OpsiDaily": {
|
||||
"_info": {
|
||||
"name": "OpSi Daily Settings",
|
||||
"help": "Completes OpSi daily activities\nThe following must be satisfied:\n- OpSi story must be complete\n- Task Opsi Explore enabled or consuming 5000 oil for special radar in OpSi voucher shop"
|
||||
"help": "Completes OpSi daily activities\nThe following must be satisfied:\n- OpSi story must be complete\n- Task OpSi Explore enabled or consuming 5000 oil for special radar in OpSi voucher shop"
|
||||
},
|
||||
"DoMission": {
|
||||
"name": "Do Port Mission(s)",
|
||||
@ -2106,7 +2110,7 @@
|
||||
"OpsiObscure": {
|
||||
"_info": {
|
||||
"name": "OpSi Obscure Settings",
|
||||
"help": "Clear obscure zones every 27 minutes\nThe following must be satisfied:\n- OpSi story must be complete\n- Task Opsi Explore enabled or consuming 5000 oil for special radar in OpSi voucher shop"
|
||||
"help": "Clear obscure zones every 27 minutes\nThe following must be satisfied:\n- OpSi story must be complete\n- Task OpSi Explore enabled or consuming 5000 oil for special radar in OpSi voucher shop"
|
||||
},
|
||||
"ForceRun": {
|
||||
"name": "Force Run",
|
||||
@ -2116,7 +2120,7 @@
|
||||
"OpsiAbyssal": {
|
||||
"_info": {
|
||||
"name": "OpSi Abyssal Settings",
|
||||
"help": "Clear abyssal zones\nThe following must be satisfied:\n- OpSi story must be complete\n- Task Opsi Explore enabled or consuming 5000 oil for special radar in OpSi voucher shop"
|
||||
"help": "Clear abyssal zones\nThe following must be satisfied:\n- OpSi story must be complete\n- Task OpSi Explore enabled or consuming 5000 oil for special radar in OpSi voucher shop"
|
||||
},
|
||||
"ForceRun": {
|
||||
"name": "Force Run",
|
||||
@ -2126,7 +2130,7 @@
|
||||
"OpsiStronghold": {
|
||||
"_info": {
|
||||
"name": "OpSi Siren Stronghold Settings",
|
||||
"help": "Clear the weekly siren strongholds.\nThe following must be satisfied:\n- OpSi story must be complete\n- Task Opsi Explore enabled or consuming 5000 oil for special radar in OpSi shop"
|
||||
"help": "Clear the weekly siren strongholds\nThe following must be satisfied:\n- OpSi story must be complete\n- Task OpSi Explore enabled or consuming 5000 oil for special radar in OpSi voucher shop"
|
||||
},
|
||||
"ForceRun": {
|
||||
"name": "Force Run",
|
||||
@ -2136,7 +2140,7 @@
|
||||
"OpsiMeowfficerFarming": {
|
||||
"_info": {
|
||||
"name": "OpSi Meowfficer Farm Settings",
|
||||
"help": "Attack target zones of the specified hazard level in a clockwise direction\nThe following must be satisfied:\n- OpSi story must be complete\n- Task Opsi Explore enabled or consuming 5000 oil for special radar in OpSi voucher shop"
|
||||
"help": "Attack target zones of the specified hazard level in a clockwise direction\nThe following must be satisfied:\n- OpSi story must be complete\n- Task OpSi Explore enabled or consuming 5000 oil for special radar in OpSi voucher shop"
|
||||
},
|
||||
"ActionPointPreserve": {
|
||||
"name": "Keep X Amount of AP",
|
||||
|
@ -214,6 +214,10 @@
|
||||
"name": "Task.OpsiAbyssal.name",
|
||||
"help": "Task.OpsiAbyssal.help"
|
||||
},
|
||||
"OpsiArchive": {
|
||||
"name": "Task.OpsiArchive.name",
|
||||
"help": "Task.OpsiArchive.help"
|
||||
},
|
||||
"OpsiStronghold": {
|
||||
"name": "Task.OpsiStronghold.name",
|
||||
"help": "Task.OpsiStronghold.help"
|
||||
|
@ -214,6 +214,10 @@
|
||||
"name": "深渊海域",
|
||||
"help": ""
|
||||
},
|
||||
"OpsiArchive": {
|
||||
"name": "档案坐标",
|
||||
"help": "从白票商店购买档案坐标并运行,档案海域不消耗行动力\n使用此功能前必须满足以下条件:\n- 通关大世界主线任务\n- 启用大世界开荒任务或使用战役信息记录仪(5000油道具)"
|
||||
},
|
||||
"OpsiStronghold": {
|
||||
"name": "塞壬要塞",
|
||||
"help": ""
|
||||
|
@ -214,6 +214,10 @@
|
||||
"name": "深淵海域",
|
||||
"help": ""
|
||||
},
|
||||
"OpsiArchive": {
|
||||
"name": "檔案坐標",
|
||||
"help": "從白票商店購買檔案坐標並運行,檔案海域不消耗行動力\n使用此功能前必須滿足以下條件:\n- 通關大世界主線任務\n- 啟用大世界開荒任務或使用戰役信息記錄儀(5000油道具)"
|
||||
},
|
||||
"OpsiStronghold": {
|
||||
"name": "塞壬要塞",
|
||||
"help": ""
|
||||
|
@ -48,7 +48,7 @@ def bp_redirect(value):
|
||||
FILTER_REGEX_VOUCHER = re.compile(
|
||||
'(logger)'
|
||||
|
||||
'(archive)?'
|
||||
'(archive|unlock)?'
|
||||
|
||||
'(t[1-6])?',
|
||||
flags=re.IGNORECASE)
|
||||
@ -82,4 +82,4 @@ def voucher_redirect(value):
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(bp_redirect('PlateGeneralT1 > DRAgirBP > CatT3 > PROdinBP > Chip > PR1BP > PRBP > DRDrakeBP > DR2BP'))
|
||||
print(voucher_redirect('Coin > HECombatPlan > LoggerArchive > TuningCombatT2 > LoggerArchiveT1 > LoggerT6 > Logger'))
|
||||
print(voucher_redirect('Coin > HECombatPlan > LoggerArchive > TuningCombatT2 > LoggerArchiveT1 > LoggerT6 > Logger > LoggerUnlockT2'))
|
||||
|
@ -564,6 +564,32 @@ def nearest_future(future, interval=120):
|
||||
return next_run
|
||||
|
||||
|
||||
def get_nearest_weekday_date(target):
|
||||
"""
|
||||
Get nearest weekday date starting
|
||||
from current date
|
||||
|
||||
Args:
|
||||
target (int): target weekday to
|
||||
calculate
|
||||
|
||||
Returns:
|
||||
datetime.datetime
|
||||
"""
|
||||
diff = server_time_offset()
|
||||
server_now = datetime.now() - diff
|
||||
|
||||
days_ahead = target - server_now.weekday()
|
||||
if days_ahead <= 0:
|
||||
# Target day has already happened
|
||||
days_ahead += 7
|
||||
server_reset = (server_now + timedelta(days=days_ahead)) \
|
||||
.replace(hour=0, minute=0, second=0, microsecond=0)
|
||||
|
||||
local_reset = server_reset + diff
|
||||
return local_reset
|
||||
|
||||
|
||||
def random_id(length=32):
|
||||
"""
|
||||
Args:
|
||||
|
@ -9,9 +9,9 @@ BUY_CONFIRM = Button(area={'cn': (698, 579, 871, 636), 'en': (710, 583, 860, 633
|
||||
DATA_KEY_COLLECT = Button(area={'cn': (251, 38, 339, 73), 'en': (256, 42, 337, 68), 'jp': (254, 40, 340, 72), 'tw': (251, 38, 339, 73)}, color={'cn': (144, 116, 77), 'en': (145, 109, 72), 'jp': (144, 111, 69), 'tw': (144, 116, 77)}, button={'cn': (251, 38, 339, 73), 'en': (256, 42, 337, 68), 'jp': (254, 40, 340, 72), 'tw': (251, 38, 339, 73)}, file={'cn': './assets/cn/freebies/DATA_KEY_COLLECT.png', 'en': './assets/en/freebies/DATA_KEY_COLLECT.png', 'jp': './assets/jp/freebies/DATA_KEY_COLLECT.png', 'tw': './assets/tw/freebies/DATA_KEY_COLLECT.png'})
|
||||
DATA_KEY_COLLECTED = Button(area={'cn': (251, 38, 339, 73), 'en': (255, 42, 338, 68), 'jp': (254, 41, 340, 71), 'tw': (251, 38, 339, 73)}, color={'cn': (102, 103, 103), 'en': (113, 113, 115), 'jp': (102, 103, 103), 'tw': (102, 103, 103)}, button={'cn': (251, 38, 339, 73), 'en': (255, 42, 338, 68), 'jp': (254, 41, 340, 71), 'tw': (251, 38, 339, 73)}, file={'cn': './assets/cn/freebies/DATA_KEY_COLLECTED.png', 'en': './assets/en/freebies/DATA_KEY_COLLECTED.png', 'jp': './assets/jp/freebies/DATA_KEY_COLLECTED.png', 'tw': './assets/tw/freebies/DATA_KEY_COLLECTED.png'})
|
||||
FREE_SUPPLY_PACK = Button(area={'cn': (525, 533, 579, 560), 'en': (523, 533, 582, 553), 'jp': (523, 530, 583, 559), 'tw': (524, 532, 582, 562)}, color={'cn': (144, 154, 164), 'en': (150, 160, 169), 'jp': (123, 137, 148), 'tw': (130, 143, 154)}, button={'cn': (378, 155, 577, 352), 'en': (426, 181, 557, 319), 'jp': (373, 177, 583, 356), 'tw': (388, 194, 554, 352)}, file={'cn': './assets/cn/freebies/FREE_SUPPLY_PACK.png', 'en': './assets/en/freebies/FREE_SUPPLY_PACK.png', 'jp': './assets/jp/freebies/FREE_SUPPLY_PACK.png', 'tw': './assets/tw/freebies/FREE_SUPPLY_PACK.png'})
|
||||
MAIL_COLLECT = Button(area={'cn': (841, 577, 970, 608), 'en': (865, 583, 947, 601), 'jp': (842, 575, 964, 609), 'tw': (841, 577, 970, 608)}, color={'cn': (155, 184, 219), 'en': (151, 180, 216), 'jp': (116, 154, 203), 'tw': (155, 184, 219)}, button={'cn': (841, 577, 970, 608), 'en': (865, 583, 947, 601), 'jp': (842, 575, 964, 609), 'tw': (841, 577, 970, 608)}, file={'cn': './assets/cn/freebies/MAIL_COLLECT.png', 'en': './assets/en/freebies/MAIL_COLLECT.png', 'jp': './assets/jp/freebies/MAIL_COLLECT.png', 'tw': './assets/cn/freebies/MAIL_COLLECT.png'})
|
||||
MAIL_COLLECTED = Button(area={'cn': (893, 578, 986, 607), 'en': (835, 578, 975, 606), 'jp': (861, 575, 951, 608), 'tw': (893, 578, 986, 607)}, color={'cn': (55, 61, 70), 'en': (54, 63, 71), 'jp': (48, 57, 65), 'tw': (55, 61, 70)}, button={'cn': (893, 578, 986, 607), 'en': (835, 578, 975, 606), 'jp': (861, 575, 951, 608), 'tw': (893, 578, 986, 607)}, file={'cn': './assets/cn/freebies/MAIL_COLLECTED.png', 'en': './assets/en/freebies/MAIL_COLLECTED.png', 'jp': './assets/jp/freebies/MAIL_COLLECTED.png', 'tw': './assets/cn/freebies/MAIL_COLLECTED.png'})
|
||||
MAIL_DELETE = Button(area={'cn': (176, 560, 306, 590), 'en': (428, 567, 500, 584), 'jp': (177, 556, 307, 591), 'tw': (176, 560, 306, 590)}, color={'cn': (221, 171, 166), 'en': (216, 173, 169), 'jp': (210, 151, 146), 'tw': (221, 171, 166)}, button={'cn': (176, 560, 306, 590), 'en': (428, 567, 500, 584), 'jp': (177, 556, 307, 591), 'tw': (176, 560, 306, 590)}, file={'cn': './assets/cn/freebies/MAIL_DELETE.png', 'en': './assets/en/freebies/MAIL_DELETE.png', 'jp': './assets/jp/freebies/MAIL_DELETE.png', 'tw': './assets/cn/freebies/MAIL_DELETE.png'})
|
||||
MAIL_COLLECT = Button(area={'cn': (841, 577, 970, 608), 'en': (865, 583, 947, 601), 'jp': (842, 575, 964, 609), 'tw': (838, 575, 973, 611)}, color={'cn': (155, 184, 219), 'en': (151, 180, 216), 'jp': (116, 154, 203), 'tw': (145, 174, 212)}, button={'cn': (841, 577, 970, 608), 'en': (865, 583, 947, 601), 'jp': (842, 575, 964, 609), 'tw': (838, 575, 973, 611)}, file={'cn': './assets/cn/freebies/MAIL_COLLECT.png', 'en': './assets/en/freebies/MAIL_COLLECT.png', 'jp': './assets/jp/freebies/MAIL_COLLECT.png', 'tw': './assets/tw/freebies/MAIL_COLLECT.png'})
|
||||
MAIL_COLLECTED = Button(area={'cn': (893, 578, 986, 607), 'en': (835, 578, 975, 606), 'jp': (861, 575, 951, 608), 'tw': (891, 576, 987, 609)}, color={'cn': (55, 61, 70), 'en': (54, 63, 71), 'jp': (48, 57, 65), 'tw': (55, 62, 72)}, button={'cn': (893, 578, 986, 607), 'en': (835, 578, 975, 606), 'jp': (861, 575, 951, 608), 'tw': (891, 576, 987, 609)}, file={'cn': './assets/cn/freebies/MAIL_COLLECTED.png', 'en': './assets/en/freebies/MAIL_COLLECTED.png', 'jp': './assets/jp/freebies/MAIL_COLLECTED.png', 'tw': './assets/tw/freebies/MAIL_COLLECTED.png'})
|
||||
MAIL_DELETE = Button(area={'cn': (176, 560, 306, 590), 'en': (428, 567, 500, 584), 'jp': (177, 556, 307, 591), 'tw': (175, 559, 308, 592)}, color={'cn': (221, 171, 166), 'en': (216, 173, 169), 'jp': (210, 151, 146), 'tw': (217, 166, 162)}, button={'cn': (176, 560, 306, 590), 'en': (428, 567, 500, 584), 'jp': (177, 556, 307, 591), 'tw': (175, 559, 308, 592)}, file={'cn': './assets/cn/freebies/MAIL_DELETE.png', 'en': './assets/en/freebies/MAIL_DELETE.png', 'jp': './assets/jp/freebies/MAIL_DELETE.png', 'tw': './assets/tw/freebies/MAIL_DELETE.png'})
|
||||
MAIL_EMPTY = Button(area={'cn': (617, 341, 665, 365), 'en': (476, 366, 606, 390), 'jp': (656, 340, 784, 365), 'tw': (617, 341, 665, 365)}, color={'cn': (185, 187, 194), 'en': (191, 193, 199), 'jp': (148, 150, 162), 'tw': (185, 187, 194)}, button={'cn': (617, 341, 665, 365), 'en': (476, 366, 606, 390), 'jp': (656, 340, 784, 365), 'tw': (617, 341, 665, 365)}, file={'cn': './assets/cn/freebies/MAIL_EMPTY.png', 'en': './assets/en/freebies/MAIL_EMPTY.png', 'jp': './assets/jp/freebies/MAIL_EMPTY.png', 'tw': './assets/cn/freebies/MAIL_EMPTY.png'})
|
||||
MAIL_ENTER = Button(area={'cn': (1207, 393, 1253, 429), 'en': (1207, 393, 1253, 429), 'jp': (1207, 393, 1253, 429), 'tw': (1207, 393, 1253, 429)}, color={'cn': (109, 107, 95), 'en': (109, 107, 95), 'jp': (109, 107, 95), 'tw': (109, 107, 95)}, button={'cn': (1207, 393, 1253, 429), 'en': (1207, 393, 1253, 429), 'jp': (1207, 393, 1253, 429), 'tw': (1207, 393, 1253, 429)}, file={'cn': './assets/cn/freebies/MAIL_ENTER.png', 'en': './assets/en/freebies/MAIL_ENTER.png', 'jp': './assets/jp/freebies/MAIL_ENTER.png', 'tw': './assets/tw/freebies/MAIL_ENTER.png'})
|
||||
OCR_DATA_KEY = Button(area={'cn': (132, 42, 233, 70), 'en': (132, 42, 233, 70), 'jp': (132, 42, 233, 70), 'tw': (132, 42, 233, 70)}, color={'cn': (74, 75, 86), 'en': (74, 75, 86), 'jp': (74, 75, 86), 'tw': (74, 75, 86)}, button={'cn': (132, 42, 233, 70), 'en': (132, 42, 233, 70), 'jp': (132, 42, 233, 70), 'tw': (132, 42, 233, 70)}, file={'cn': './assets/cn/freebies/OCR_DATA_KEY.png', 'en': './assets/en/freebies/OCR_DATA_KEY.png', 'jp': './assets/jp/freebies/OCR_DATA_KEY.png', 'tw': './assets/tw/freebies/OCR_DATA_KEY.png'})
|
||||
|
@ -21,10 +21,7 @@ class Freebies(ModuleBase):
|
||||
|
||||
if self.config.Mail_Collect:
|
||||
logger.hr('Mail', level=1)
|
||||
if self.config.SERVER in ['cn', 'en', 'jp']:
|
||||
Mail(self.config, self.device).run()
|
||||
else:
|
||||
logger.info(f'Mail collect is not supported in {self.config.SERVER}, please contact server maintainers')
|
||||
Mail(self.config, self.device).run()
|
||||
|
||||
if self.config.SupplyPack_Collect:
|
||||
logger.hr('Supply pack', level=1)
|
||||
|
@ -3,7 +3,8 @@ from datetime import datetime, timedelta
|
||||
import numpy as np
|
||||
|
||||
from module.base.timer import Timer
|
||||
from module.config.utils import (get_os_next_reset,
|
||||
from module.config.utils import (get_nearest_weekday_date,
|
||||
get_os_next_reset,
|
||||
get_os_reset_remain,
|
||||
DEFAULT_TIME)
|
||||
from module.exception import RequestHumanTakeover, GameStuckError, ScriptError
|
||||
@ -283,6 +284,7 @@ class OperationSiren(OSMap):
|
||||
if preserve == 0:
|
||||
self.config.override(OpsiFleet_Submarine=False)
|
||||
|
||||
ap_checked = False
|
||||
while 1:
|
||||
self.config.OS_ACTION_POINT_PRESERVE = preserve
|
||||
if self.config.OpsiAshBeacon_AshAttack \
|
||||
@ -291,6 +293,10 @@ class OperationSiren(OSMap):
|
||||
logger.info('Ash beacon not fully collected, ignore action point limit temporarily')
|
||||
self.config.OS_ACTION_POINT_PRESERVE = 0
|
||||
logger.attr('OS_ACTION_POINT_PRESERVE', self.config.OS_ACTION_POINT_PRESERVE)
|
||||
if not ap_checked:
|
||||
# Check action points first to avoid using remaining AP when it not enough for tomorrow's daily
|
||||
self.set_action_point(cost=0)
|
||||
ap_checked = True
|
||||
|
||||
# (1252, 1012) is the coordinate of zone 134 (the center zone) in os_globe_map.png
|
||||
if self.config.OpsiMeowfficerFarming_TargetZone != 0:
|
||||
@ -382,7 +388,7 @@ class OperationSiren(OSMap):
|
||||
logger.info('Delay other OpSi tasks during OpsiExplore')
|
||||
with self.config.multi_set():
|
||||
next_run = self.config.Scheduler_NextRun
|
||||
for task in ['OpsiObscure', 'OpsiAbyssal', 'OpsiStronghold', 'OpsiMeowfficerFarming']:
|
||||
for task in ['OpsiObscure', 'OpsiAbyssal', 'OpsiArchive', 'OpsiStronghold', 'OpsiMeowfficerFarming']:
|
||||
keys = f'{task}.Scheduler.NextRun'
|
||||
current = self.config.cross_get(keys=keys, default=DEFAULT_TIME)
|
||||
if current < next_run:
|
||||
@ -561,12 +567,12 @@ class OperationSiren(OSMap):
|
||||
|
||||
def os_archive(self):
|
||||
"""
|
||||
Unused func, not currently a monthly trend
|
||||
Retain in case AL devs add as official feature
|
||||
|
||||
Complete active archive zone in daily mission
|
||||
Purchase next available logger archive then repeat
|
||||
until exhausted
|
||||
|
||||
Run on weekly basis, AL devs seemingly add new logger
|
||||
archives after random scheduled maintenances
|
||||
"""
|
||||
shop = VoucherShop(self.config, self.device)
|
||||
while 1:
|
||||
@ -581,7 +587,8 @@ class OperationSiren(OSMap):
|
||||
if not bought:
|
||||
break
|
||||
|
||||
next_reset = get_os_next_reset()
|
||||
# Reset to nearest 'Wednesday' date
|
||||
next_reset = get_nearest_weekday_date(target=2)
|
||||
logger.info('All archive zones finished, delay to next reset')
|
||||
logger.attr('OpsiNextReset', next_reset)
|
||||
self.config.task_delay(target=next_reset)
|
||||
|
@ -1,5 +1,4 @@
|
||||
from module.base.utils import get_color
|
||||
from module.exception import GameStuckError
|
||||
from module.logger import logger
|
||||
from module.os_handler.assets import *
|
||||
from module.os_handler.enemy_searching import EnemySearchingHandler
|
||||
@ -30,8 +29,6 @@ class StrategicSearchHandler(EnemySearchingHandler):
|
||||
skip_first_screenshot = False
|
||||
else:
|
||||
self.device.screenshot()
|
||||
if not self.appear(STRATEGIC_SEARCH_POPUP_CHECK, offset=(20, 20)):
|
||||
return False
|
||||
|
||||
if get_color(self.device.image, STRATEGIC_SEARCH_TAB_SECURED.area)[2] <= 150:
|
||||
self.device.click(STRATEGIC_SEARCH_TAB_SECURED)
|
||||
@ -45,8 +42,6 @@ class StrategicSearchHandler(EnemySearchingHandler):
|
||||
skip_first_screenshot = False
|
||||
else:
|
||||
self.device.screenshot()
|
||||
if not self.appear(STRATEGIC_SEARCH_POPUP_CHECK, offset=(20, 20)):
|
||||
return False
|
||||
|
||||
if self.appear(STRATEGIC_SEARCH_ZONEMODE_RANDOM):
|
||||
logger.attr('zone_mode', 'random')
|
||||
@ -69,8 +64,6 @@ class StrategicSearchHandler(EnemySearchingHandler):
|
||||
skip_first_screenshot = False
|
||||
else:
|
||||
self.device.screenshot()
|
||||
if not self.appear(STRATEGIC_SEARCH_POPUP_CHECK, offset=(20, 20)):
|
||||
return False
|
||||
|
||||
self.appear(STRATEGIC_SEARCH_DEVICE_CHECK, offset=(20, 200), threshold=0.7)
|
||||
STRATEGIC_SEARCH_DEVICE_STOP.load_offset(STRATEGIC_SEARCH_DEVICE_CHECK)
|
||||
@ -93,8 +86,6 @@ class StrategicSearchHandler(EnemySearchingHandler):
|
||||
skip_first_screenshot = False
|
||||
else:
|
||||
self.device.screenshot()
|
||||
if not self.appear(STRATEGIC_SEARCH_POPUP_CHECK, offset=(20, 20)):
|
||||
return False
|
||||
|
||||
self.appear(STRATEGIC_SEARCH_SUBMIT_CHECK, offset=(20, 20), threshold=0.7)
|
||||
STRATEGIC_SEARCH_SUBMIT_OFF.load_offset(STRATEGIC_SEARCH_SUBMIT_CHECK)
|
||||
@ -108,8 +99,6 @@ class StrategicSearchHandler(EnemySearchingHandler):
|
||||
logger.attr('auto_submit', 'on')
|
||||
break
|
||||
|
||||
return True
|
||||
|
||||
def strategic_search_confirm(self, skip_first_screenshot=False):
|
||||
logger.info('Strategic search confirm')
|
||||
while 1:
|
||||
@ -122,12 +111,8 @@ class StrategicSearchHandler(EnemySearchingHandler):
|
||||
and self.handle_popup_confirm(offset=(30, 30), name='STRATEGIC_SEARCH'):
|
||||
continue
|
||||
|
||||
if self.appear(AUTO_SEARCH_OS_MAP_OPTION_ON, offset=(5, 120), interval=3) \
|
||||
and AUTO_SEARCH_OS_MAP_OPTION_ON.match_appear_on(self.device.image):
|
||||
if self.is_in_map():
|
||||
return True
|
||||
if self.appear(AUTO_SEARCH_OS_MAP_OPTION_OFF, offset=(5, 120), interval=3) \
|
||||
and AUTO_SEARCH_OS_MAP_OPTION_OFF.match_appear_on(self.device.image):
|
||||
return False
|
||||
|
||||
def strategic_search_start(self, skip_first_screenshot=False):
|
||||
"""
|
||||
@ -136,16 +121,6 @@ class StrategicSearchHandler(EnemySearchingHandler):
|
||||
out: IN_MAP, with strategic search running
|
||||
"""
|
||||
logger.hr('Strategic search start')
|
||||
while 1:
|
||||
flag = True
|
||||
flag &= self.strategy_search_enter(skip_first_screenshot=skip_first_screenshot)
|
||||
flag &= self.strategic_search_set_option(skip_first_screenshot=True)
|
||||
if flag:
|
||||
flag = self.strategic_search_confirm(skip_first_screenshot=True)
|
||||
|
||||
if flag:
|
||||
return True
|
||||
if self.appear(STRATEGIC_SEARCH_POPUP_CHECK, offset=(20, 20)) or self.is_in_map():
|
||||
skip_first_screenshot = True
|
||||
else:
|
||||
raise GameStuckError
|
||||
self.strategy_search_enter(skip_first_screenshot=skip_first_screenshot)
|
||||
self.strategic_search_set_option(skip_first_screenshot=True)
|
||||
self.strategic_search_confirm(skip_first_screenshot=True)
|
||||
|
@ -28,7 +28,7 @@ FILTER_REGEX = re.compile(
|
||||
'|red|blue|yellow'
|
||||
'|general|gun|torpedo|antiair|plane|wild'
|
||||
'|dd|cl|bb|cv'
|
||||
'|abyssal|archive|obscure'
|
||||
'|abyssal|archive|obscure|unlock'
|
||||
'|combat|offense|survival)?'
|
||||
|
||||
'(s[1-5]|t[1-6])?$',
|
||||
|
@ -969,7 +969,7 @@ class AlasGUI(Frame):
|
||||
put_error(t("Gui.AddAlas.FileExist"), scope=s)
|
||||
return
|
||||
|
||||
r = State.config_updater.read_file(origin)
|
||||
r = load_config(origin).read_file(origin)
|
||||
State.config_updater.write_file(name, r, get_config_mod(origin))
|
||||
self.set_aside()
|
||||
self.active_button("aside", self.alas_name)
|
||||
|
Loading…
Reference in New Issue
Block a user