Files
weilanxingqiu/claim_guild_help.py
2026-10-04 23:02:01 +08:00

15 lines
817 B
Python

import argparse, sys, time
from pathlib import Path
from automation.engine import Matcher, load_flow
from automation.guild_help import GuildHelpRunner
from automation.offers import MacGameDesktop
ROOT=Path(__file__).resolve().parent
def main():
p=argparse.ArgumentParser(description='领取底部公会入口上方的互助奖励'); p.add_argument('--dry-run',action='store_true'); a=p.parse_args()
if sys.platform!='darwin': return 2
try:
d=MacGameDesktop(); d.activate(); print('3 秒后开始;请保持游戏在前台。',flush=True); time.sleep(3)
GuildHelpRunner(d,Matcher(ROOT/'assets'),load_flow(ROOT/'workflows/guild_help.json'),d.region_for).run(a.dry_run); return 0
except Exception as e: print('流程停止:'+str(e),file=sys.stderr); return 1
if __name__=='__main__': raise SystemExit(main())