请先了解:
import os
from autowsgr.fight.event.event_2024_0930 import EventFightPlan20240930
from autowsgr.scripts.main import start_script
timer = start_script(f"{os.path.dirname(os.path.abspath(__file__))}/user_settings.yaml") # 注册一个 timer 来管理模拟器和游戏
plan = EventFightPlan20240930(
timer, plan_path=r"C:\\Users\\huany\\Desktop\\Projects\\Auto-WSGR-dev\\Auto-WSGR\\tests\\plans\\event\\20240930\\E10ADF.yaml", fleet_id=4
) # 注册一个 plan, 功能是在 10 周年活动图 E10 的 ADF 三连夜战点练级
plan.run_for_times(500) # 执行 500 次
plan_path=
后面所填写的就是文件绝对路径。
注意!如果斜杠是 \\
,必须在左引号前加上一个字母 r
。
当然,你也可以把所有的 \\
替换为 /
,使用 /
不需要加上字母 r
。
下面这样也是可以的:
plan = EventFightPlan20240930(
timer, plan_path="C:/Users/huany/Desktop/Projects/Auto-WSGR-dev/Auto-WSGR/tests/plans/event/20240930/E10ADF.yaml", fleet_id=4
)
相对路径指相对于 PLAN_ROOT 文件夹的路径。