-
Notifications
You must be signed in to change notification settings - Fork 33
/
config.bat
272 lines (272 loc) · 10.3 KB
/
config.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
@echo off
mode con cols=81 lines=25
echo 请确认已将本脚本放于FGO-Automata目录中
if exist core/Automata.py (pause&&goto :init) else (goto wrong)
:init
echo ---------------------------------------------------------------------------------
echo 1=配置.py文件(国服)[必须] 2=重复运行.py文件
set /p zero=请选择(输入对应数字):
if %zero%==1 (goto :create) else if %zero%==2 (goto :end) else (goto :init)
:wrong
echo 错误!请将本脚本放于FGO-Automata目录中
pause
exit
:create
echo ---------------------------------------------------------------------------------
set /p name=请设置文件名(无需添加默认后缀.py,按Enter确认):
echo from core.Automata import Automata > %name%.py
echo # start >> %name%.py
echo 请设置游戏画面偏移坐标(若为1920x1080则x,y均填0):
set /p x=x=
set /p y=y=
set /p support=请设置助战图片(放于assets中,png格式,无需输入后缀):
echo 是否进行高级助战设置? 1=是 2=否
echo 高级助战选择,自动将所填写图片与前三个助战匹配,匹配不上则进行滚动检查
echo 如果仍然没有任何匹配项,它将进行列表更新(5s),重复循环。
set /p supportselect=请选择(输入对应数字):
goto :select
:end
set /p lim=请设置重复次数:
set num=0
:main
set /p namezero=请输入要运行的文件名(无需添加默认后缀.py,按Enter确认):
echo 开始运行,次数为%lim%次
goto :re1
:re1
if %num%==%lim% (pause&&echo.循环已完成&&exit) else (goto :re2)
:re2
py %namezero%.py
set /a num+=1
echo 第%num%次运行完成
goto :re1
:select
cls
echo ---------------------------------------------------------------------------------
echo 请选择每日副本
echo 1=狗粮 2=修炼场 3=QP本 4=自定义
set /p stage=请选择(输入对应数字):
if %stage%==1 (goto :ember) else if %stage%==2 (goto :training) else if %stage%==3 (goto :qp) else if %stage%==4 (goto :custom) else (goto :select)
:ember
echo 1=狗粮初级 2=狗粮中级 3=狗粮上级 4=狗粮超级
echo ---------------------------------------------------------------------------------
set /p start1=请选择等级(输入对应数字):
echo fgo = Automata("assets/cn/Ember%start1%.png", "assets/%support%.png", sft=(%x%, %y%)) >> %name%.py
goto :appleconfirm
:training
echo ---------------------------------------------------------------------------------
echo 1=修炼场初级 2=修炼场中级 3=修炼场上级 4=修炼场超级
set /p start2=请选择等级(输入对应数字):
echo fgo = Automata("assets/cn/Training%start2%.png", "assets/%support%.png", sft=(%x%, %y%)) >> %name%.py
goto :appleconfirm
:qp
echo ---------------------------------------------------------------------------------
echo 1=QP本初级 2=QP本中级 3=QP本上级 4=QP本超级
set /p start3=请选择等级(输入对应数字):
echo fgo = Automata("assets/cn/Qp%start3%.png", "assets/%support%.png", sft=(%x%, %y%)) >> %name%.py
goto :appleconfirm
:custom
echo ---------------------------------------------------------------------------------
set /p start4=请输入自定义关卡图片名(png,请放置于assets目录中,不需要输入后缀)
echo fgo = Automata("assets/%start4%.png", "assets/%support%.png", sft=(%x%, %y%)) >> %name%.py
goto :appleconfirm
:appleconfirm
set /p apple=是否使用苹果 是输入1 否输入2:
if %apple% gtr 2 (goto :applewrong) else (goto :applenext)
:applewrong
echo 请输入1或2!
pause
goto :appleconfirm
:applenext
if %apple%==1 (goto :eat) else if %apple%==2 (goto :game) else (goto :game)
:eat
set /p a1=金苹果输入1 银苹果输入2 铜苹果输入3 圣晶石输入4:
if %a1%==1 (goto :gold) else if %a1%==2 (goto :silver) else if %a1%==3 (goto :bronze) else if %a1%==4 (goto :quartz) else (goto :eat)
:gold
echo fgo.set_apples(1, "gold")>>%name%.py
goto :game
:silver
echo fgo.set_apples(1, "silver")>>%name%.py
goto :game
:bronze
echo fgo.set_apples(1, "bronze")>>%name%.py
goto :game
:quartz
echo fgo.set_apples(1, "quartz")>>%name%.py
goto :game
:game
if %supportselect%==1 (goto :advancegame) else (goto :normalgame)
:advancegame
echo fgo.quick_start(advance=True) >> %name%.py
goto :battle
:normalgame
echo fgo.quick_start(advance=False) >> %name%.py
goto :battle
:battle
cls
echo ---------------------------------------------------------------------------------
echo 请按顺序输入回合数(不可未设置第二回合直接设置第一回合!)
echo 1=Battle_1 2=Battle_2 3=Battle_3 4=结束设置[必须]
set /p ro=请输入数字:
if %ro%==1 (goto :battle1) else if %ro%==2 (goto :battle2) else if %ro%==3 (goto :battle3) else if %ro%==4 (goto :finish) else (goto :battle)
:battle1
cls
echo # battle1 >> %name%.py
goto :menu
:battle2
cls
echo # battle2 >> %name%.py
goto :menu
:battle3
cls
echo # battle3 >> %name%.py
goto :menu
:menu
cls
echo ---------------------------------------------------------------------------------
echo [注意] 请在设置出卡顺序前进行添加技能等设定
echo 1=添加从者技能[可选]
echo 2=添加御主技能[可选]
echo 3=设置出卡顺序[必须]
echo 4=完成回合设置
echo 5=其他设置
echo 6=添加自动战斗[请勿设置出卡顺序][可选]
set /p num=请输入数字:
if %num%==1 (goto :skill) else if %num%==2 (goto :master) else if %num%==3 (goto :card) else if %num%==4 (goto :battle) else if %num%==5 (goto :extra) else if %num%==6 (goto :dynamica) else (goto :menu)
:skill
cls
echo ---------------------------------------------------------------------------------
echo 使用前请关闭技能使用确认!
echo 输入1为没有目标从者的技能,输入2为有目标从者的技能,输入其它返回菜单:
set /p sc=请输入数字:
if %sc%==1 (goto :1) else if %sc%==2 (goto :2) else (goto :menu)
:1
echo 对于没有目标从者的技能(如“直死之魔眼”)则输入数字1~9,从左往右数。
set /p s1=请输入数字:
echo fgo.select_servant_skill(%s1%) >> %name%.py
echo 添加完成
set /p sc1=是否继续添加从者技能 1为是 2为否:
echo ---------------------------------------------------------------------------------
if %sc1%==1 (goto :skill) else (goto :menu)
:2
echo 对于有目标从者的技能(如“初始的卢恩”)需要提供两个数字
echo 第一个为技能数字,输入数字1~9,从左往右数
echo 第二个为目标从者(1~3,从左到右对应的从者)
set /p n1=第一个数字:
set /p n2=第二个数字:
echo fgo.select_servant_skill(%n1%, %n2%) >> %name%.py
echo 添加完成
set /p sc1=是否继续添加从者技能 1为是 2为否:
echo ---------------------------------------------------------------------------------
if %sc1%==1 (goto :skill) else (goto :menu)
:master
cls
echo ---------------------------------------------------------------------------------
echo 输入1为没有目标从者的御主技能,输入2为有目标从者的御主技能
echo 输入3添加Order Change技能(需要礼装),输入其它返回菜单:
set /p sc=请输入数字:
if %sc%==1 (goto :3) else if %sc%==2 (goto :4) else if %sc%==3 (goto :oc) else (goto :menu)
:3
echo 对于没有目标从者的御主技能,则输入数字1~3,从左往右数。
set /p s1=请输入数字:
echo fgo.select_master_skill(%s1%) >> %name%.py
echo 添加完成
set /p sc2=是否继续添加御主技能 1为是 2为否:
echo ---------------------------------------------------------------------------------
if %sc2%==1 (goto :master) else (goto :menu)
:4
echo 对于有目标从者的御主技能,需要提供两个数字
echo 第一个为技能数字输入数字1~3,从左往右数
echo 第二个为目标从者(1~3,从左到右对应的从者)
set /p n1=第一个数字:
set /p n2=第二个数字:
echo fgo.select_master_skill(%n1%, %n2%) >> %name%.py
echo 添加完成
set /p sc3=是否继续添加御主技能 1为是 2为否:
echo ---------------------------------------------------------------------------------
if %sc3%==1 (goto :master) else (goto :menu)
:oc
echo 请确保礼装正确!
set /p o1=请输入被替换的从者(1~3,前三个从左到右对应的从者):
set /p o2=请输入上场的从者(1~3,后三个从左到右对应的从者):
echo fgo.select_master_skill(3, %o1%, %o2%) >> %name%.py
echo Order Change添加完成
set /p sc4=是否继续添加御主技能 1为是 2为否:
echo ---------------------------------------------------------------------------------
if %sc4%==1 (goto :master) else (goto :menu)
:card
cls
echo ---------------------------------------------------------------------------------
echo 您需要提供一个最多3个元素的数组
echo 数字1~5为从左到右的五张普通指令卡
echo 6~8为从左到右的3张宝具卡
echo 您也可以不选满,这样剩下的卡会随机补充。
echo 格式:若只有一张卡则输入单个数字
echo 若多张卡请用半角英文符号[ , ]分隔 如 1, 2, 3
set /p sel=请输入:
echo fgo.select_cards([%sel%]) >> %name%.py
echo 出卡顺序完成
pause
echo ---------------------------------------------------------------------------------
goto :menu
:extra
cls
echo ---------------------------------------------------------------------------------
echo 1=场景等待
echo 2=点击屏幕
echo 3=打开/关闭御主技能面板(无确认)
echo 4=返回菜单
set /p ex=请输入数字:
if %ex%==1 (goto :wait) else if %ex%==2 (goto :tap) else if %ex%==3 (goto :panel) else (goto :menu)
:wait
echo It allows you idle the script till a certain scene
echo It receives an argument of the path of the template image.
echo Example assets/checkpoint.png
set /p wa=Enter the path:
echo ---------------------------------------------------------------------------------
echo fgo.wait("%wa%") >> %name%.py
goto :menu
:tap
echo Allows to tap a certain point in the screen
echo The first arg is a tuple of the coordinate (x, y)
echo The 2nd and the 3rd args are random shifts in x and y,
echo if you don't want have any shifts, replace with 0
echo Example (100, 100), 0, 0 You only need enter the number
set /p tax=Enter the number x:
set /p tay=Enter the number y:
set /p ta2=Enter the number 2nd:
set /p ta3=Enter the number 3rd:
echo ---------------------------------------------------------------------------------
echo fgo.tap((%tax%, %tay%), %ta2%, %ta3%) >> %name%.py
goto :menu
:panel
echo You can use this function to turn on/off the Master skill panel.
echo ---------------------------------------------------------------------------------
echo fgo.toggle_master_skill() >> %name%.py
goto :menu
:dynamica
cls
echo ---------------------------------------------------------------------------------
echo # use_dynamica >> %name%.py
echo [注意] 动态战斗经常会发生错误
echo [注意] 动态战斗请勿设置出卡顺序
echo 动态战斗 会忽略技能,连击以及宝具
set /p round=请输入使用动态战斗的回合数[Battle id](1~3):
echo fgo.use_dynamica(%round%) >> %name%.py
echo 添加完成
pause
goto :menu
:finish
cls
echo #finish >> %name%.py
echo ---------------------------------------------------------------------------------
echo fgo.finish_battle() >> %name%.py
echo 完成 如需重复运行请运行该文件 正常运行请py %name%.py
echo 是否即刻运行? 1=是 2=否
set /p run=请输入数字:
if %run%==1 (goto :end) else (goto :complete)
:complete
pause
exit
echo ---------------------------------------------------------------------------------
pause
exit