假人完整示例 » 历史记录 » 版本 3
tejie, 2023-08-29 09:02
1 | 1 | tejie | h4. 假人完整示例 |
---|---|---|---|
2 | |||
3 | - |
||
4 | - |
||
5 | |||
6 | *自定义假人名称处理* |
||
7 | |||
8 | ..\Mir200\Envir\DummyNameList.txt |
||
9 | 请重命名为 |
||
10 | ..\Mir200\Envir\DummyNameListTJ.txt |
||
11 | |||
12 | [[假人调试模块]] |
||
13 | 3 | tejie | |
14 | [[假人配置文件]] |
||
15 | 配置项的值支持变量,举例job=<$str(n1)> |
||
16 | 配合命令 [[setDummyConfigFileName]] 使用 |
||
17 | 1 | tejie | |
18 | 本示例相关数据表及脚本文件,请从本页面 *文件* 附件下载。 |
||
19 | |||
20 | - |
||
21 | - |
||
22 | |||
23 | |||
24 | |^. %{color:fireBrick}--..\Mir200\Envir\MapQuest_Def\QManage.txt% |
||
25 | *<notextile>[@Startup]</notextile>* |
||
26 | <notextile>#call [\qm模块\服务器启动.txt] @服务器启动</notextile> |
||
27 | <notextile></notextile> |
||
28 | %{color:fireBrick}--..\Mir200\Envir\QuestDiary\qm模块\服务器启动.txt% |
||
29 | *<notextile>[@服务器启动]</notextile>* |
||
30 | %{color:lightGrey};--服务器首次启动处理% |
||
31 | #if |
||
32 | [[equal]] g$服务器首次启动 0 |
||
33 | #act |
||
34 | [[mov]] g$服务器首次启动 1 |
||
35 | %{color:lightGrey};--假人数据初始化% |
||
36 | [[mov]] a$假人_登录地图 XRJD |
||
37 | [[mov]] a$假人_登录坐标X 77 |
||
38 | [[mov]] a$假人_登录坐标Y 29 |
||
39 | [[mov]] g$假人_登录上限 1 |
||
40 | <notextile></notextile> |
||
41 | #if |
||
42 | #act |
||
43 | [[tbl_load]] 假人等级地图对应表 \假人\假人等级地图对应表.csv |
||
44 | <notextile></notextile> |
||
45 | %{color:fireBrick}--..\Mir200\Envir\Robot_def\AutoRunRobot.txt% |
||
46 | <notextile>#AutoRun NPC SEC 10 @10秒触发</notextile> |
||
47 | <notextile></notextile> |
||
48 | %{color:fireBrick}--..\Mir200\Envir\Robot_def\RobotManage.txt% |
||
49 | *<notextile>[@10秒触发]</notextile>* |
||
50 | <notextile>#call [\假人\假人登录.txt] @发起假人登录</notextile> |
||
51 | <notextile></notextile> |
||
52 | %{color:fireBrick}--..\Mir200\Envir\MapQuest_Def\QManage.txt% |
||
53 | *<notextile>[@login]</notextile>* |
||
54 | #if |
||
55 | [[isDummy]] |
||
56 | <notextile>#call [\假人\假人登录.txt] @执行假人登录</notextile> |
||
57 | <notextile></notextile> |
||
58 | |/3^. %{color:firebrick}--..\Mir200\Envir\QuestDiary\假人\假人登录.txt% |
||
59 | *<notextile>[@发起假人登录]</notextile>* |
||
60 | %{color:lightGrey};--RobotManage.txt [@10秒触发]调用% |
||
61 | #if |
||
62 | [[checkDummyCount]] < g$假人_登录上限 |
||
63 | #act |
||
64 | [[dummyLogon]] <$str(a$假人_登录地图)> <$str(a$假人_登录坐标X)> <$str(a$假人_登录坐标X)> 1 |
||
65 | <notextile></notextile> |
||
66 | *<notextile>[@执行假人登录]</notextile>* |
||
67 | %{color:lightGrey};--QManage.txt [@login]调用% |
||
68 | #act |
||
69 | [[setDummyConfigFileName]] ..\QuestDiary\调试模块\假人\新人配置.txt |
||
70 | [[loadDummyConfigfile]] |
||
71 | <notextile></notextile> |
||
72 | %{color:lightGrey};--创建表--% |
||
73 | #if |
||
74 | not [[tbl_exist]] 登录假人表 |
||
75 | #act |
||
76 | [[tbl_create_global]] 登录假人表 关键字 假人名称 |
||
77 | [[tbl_add]] 登录假人表 <$userName> <$userName> |
||
78 | [[tbl_save]] 登录假人表 |
||
79 | <notextile>goto @新登假人配置</notextile> |
||
80 | <notextile></notextile> |
||
81 | %{color:lightGrey};--保存新登录假人--% |
||
82 | #if |
||
83 | not [[tbl_has_key]] 登录假人表 <$userName> |
||
84 | #act |
||
85 | [[tbl_add]] 登录假人表 <$userName> <$userName> |
||
86 | [[tbl_save]] 登录假人表 |
||
87 | <notextile>goto @新登假人配置</notextile> |
||
88 | <notextile></notextile> |
||
89 | #if |
||
90 | [[tbl_has_key]] 登录假人表 <$userName> |
||
91 | #act |
||
92 | %{color:lightGrey};--todo--登录过的假人% |
||
93 | <notextile></notextile> |
||
94 | #if |
||
95 | #act |
||
96 | <notextile>goto @假人下图处理</notextile> |
||
97 | <notextile></notextile> |
||
98 | *<notextile>[@新登假人配置]</notextile>* |
||
99 | #if |
||
100 | #act |
||
101 | %{color:lightGrey};--处理新假人装备,请根据版本自行调整% |
||
102 | [[mov]] s$key 1 |
||
103 | <notextile>goto @假人换装</notextile> |
||
104 | <notextile></notextile> |
||
105 | *<notextile>[@假人下图处理]</notextile>* |
||
106 | %{color:lightGrey};--根据“假人等级地图对应表”下图 |
||
107 | ;举例 |
||
108 | ;0<lv<=10 地图1 |
||
109 | ;10<lv<=20 地图2 |
||
110 | ;20<lv<=30 地图3 |
||
111 | ;... |
||
112 | ;**假人等级遍历上表,是否不大于等级上限% |
||
113 | #if tbl 假人等级地图对应表 s$key |
||
114 | [[small]] <$level> <$tbl(假人等级地图对应表,s$key,等级上限)> |
||
115 | #act |
||
116 | [[map]] <$tbl(假人等级地图对应表,s$key,地图编号)> |
||
117 | [[gotoNow]] |
||
118 | #elseAct |
||
119 | [[map]] <$tbl(假人等级地图对应表,s$key,地图编号)> |
||
120 | [[gotoNow]] |
||
121 | <notextile></notextile> |
||
122 | <notextile></notextile> |
||
123 | *<notextile>[@获得物品触发]</notextile>* |
||
124 | %{color:lightGrey}<notextile>;--qf [@pickUpItemEX]触发调用</notextile> |
||
125 | ;--todo--处理假人出图逻辑% |
||
126 | #if |
||
127 | %{color:lightGrey};背包满了% |
||
128 | not [[checkBagSize]] 2 |
||
129 | #act |
||
130 | <notextile>goto @假人主动回城处理</notextile> |
||
131 | <notextile></notextile> |
||
132 | <notextile></notextile> |
||
133 | *<notextile>[@假人被真人击处理]</notextile>* |
||
134 | %{color:lightGrey};--todo--qf被击触发调用,处理假人被击逻辑 |
||
135 | ;被击触发器,检查被真人攻击:假人血量低于<notextile>40%:50%几率回城;50%几率逃跑</notextile>% |
||
136 | #if |
||
137 | not [[checkHpPer]] < 40 |
||
138 | #act |
||
139 | break |
||
140 | <notextile></notextile> |
||
141 | #if |
||
142 | [[checkCurrTargetRace]] = 0 |
||
143 | [[checkHPPer]] < 40 |
||
144 | #act |
||
145 | [[movR]] n1 0 2 |
||
146 | #if |
||
147 | [[equal]] n1 0 |
||
148 | #act |
||
149 | [[gotoNow]] |
||
150 | [[delayGoto]] 20000 <notextile>@假人挂机</notextile> |
||
151 | <notextile></notextile> |
||
152 | #if |
||
153 | [[equal]] n1 1 |
||
154 | #act |
||
155 | [[gohome]] |
||
156 | <notextile></notextile> |
||
157 | *<notextile>[@假人挂机]</notextile>* |
||
158 | #act |
||
159 | [[dummyStart]] |
||
160 | <notextile></notextile> |
||
161 | <notextile></notextile> |
||
162 | *<notextile>[@假人死亡处理]</notextile>* |
||
163 | %{color:lightGrey};qf角色死亡触发调用--todo--处理假人死亡逻辑% |
||
164 | #if |
||
165 | #act |
||
166 | [[realive]] 100 1 |
||
167 | [[gohome]] |
||
168 | <notextile></notextile> |
||
169 | %{color:lightGrey};主城随便逛逛% |
||
170 | [[gotoNow]] |
||
171 | <notextile></notextile> |
||
172 | [[goto]] <notextile>@假人下图处理</notextile> |
||
173 | <notextile></notextile> |
||
174 | <notextile></notextile> |
||
175 | *<notextile>[@假人主动回城处理]</notextile>* |
||
176 | #if |
||
177 | #act |
||
178 | [[gohome]] |
||
179 | %{color:lightGrey};--todo--处理假人主动回城逻辑 |
||
180 | ;执行清理背包% |
||
181 | [[gmExeCute]] clearBag self |
||
182 | <notextile></notextile> |
||
183 | %{color:lightGrey};执行假人升级% |
||
184 | #if |
||
185 | #act |
||
186 | <notextile>goto @假人升级处理</notextile> |
||
187 | <notextile></notextile> |
||
188 | %{color:lightGrey};主城随便逛逛% |
||
189 | [[gotoNow]] |
||
190 | <notextile></notextile> |
||
191 | [[goto]] <notextile>@假人下图处理</notextile> |
||
192 | <notextile></notextile> |
||
193 | <notextile></notextile> |
||
194 | *<notextile>[@假人升级处理]</notextile>* |
||
195 | #if |
||
196 | [[large]] <$rankingLevel> 10 |
||
197 | #act |
||
198 | %{color:lightGrey};--todo--处理假人升级逻辑% |
||
199 | [[movR]] n1 1 6 |
||
200 | [[changeLevel]] + n1 |
||
201 | <notextile></notextile> |
||
202 | [[delayGoto]] 500 <notextile>@假人升级处理</notextile> |
||
203 | #elseAct |
||
204 | %{color:lightGrey};--根据升级后等级,穿戴对应装备 |
||
205 | ;--换装前后清空一下背包% |
||
206 | [[gmExeCute]] clearBag self |
||
207 | [[goto]] <notextile>@假人升级换装</notextile> |
||
208 | [[gmExeCute]] clearBag self |
||
209 | <notextile></notextile> |
||
210 | <notextile></notextile> |
||
211 | *<notextile>[@假人升级换装]</notextile>* |
||
212 | #if tbl 假人等级地图对应表 s$key |
||
213 | [[small]] <$level> <$tbl(假人等级地图对应表,s$key,等级上限)> |
||
214 | #act |
||
215 | goto <notextile>@假人换装</notextile> |
||
216 | #elseAct |
||
217 | goto <notextile>@假人换装</notextile> |
||
218 | <notextile></notextile> |
||
219 | <notextile></notextile> |
||
220 | *<notextile>[@假人换装]</notextile>* |
||
221 | #if |
||
222 | #act |
||
223 | [[give]] <$tbl(假人等级地图对应表,s$key,衣服)> 1 |
||
224 | [[give]] <$tbl(假人等级地图对应表,s$key,武器)> 1 |
||
225 | [[give]] <$tbl(假人等级地图对应表,s$key,项链)> 1 |
||
226 | [[give]] <$tbl(假人等级地图对应表,s$key,头盔)> 1 |
||
227 | [[give]] <$tbl(假人等级地图对应表,s$key,左镯)> 1 |
||
228 | [[give]] <$tbl(假人等级地图对应表,s$key,右镯)> 1 |
||
229 | [[give]] <$tbl(假人等级地图对应表,s$key,左戒)> 1 |
||
230 | [[give]] <$tbl(假人等级地图对应表,s$key,右戒)> 1 |
||
231 | [[give]] <$tbl(假人等级地图对应表,s$key,腰带)> 1 |
||
232 | [[give]] <$tbl(假人等级地图对应表,s$key,靴子)> 1 |
||
233 | <notextile></notextile> |
||
234 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,衣服)> 0 |
||
235 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,武器)> 1 |
||
236 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,项链)> 3 |
||
237 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,头盔)> 4 |
||
238 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,左镯)> 5 |
||
239 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,右镯)> 6 |
||
240 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,左戒)> 7 |
||
241 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,右戒)> 8 |
||
242 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,腰带)> 10 |
||
243 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,靴子)> 11 |
||
244 | <notextile></notextile> |
||
245 | %{color:lightGrey};--假人扩展背包页% |
||
246 | #if |
||
247 | [[equal]] s$key 2 |
||
248 | #act |
||
249 | [[setBagOpen]] 2 1 |
||
250 | <notextile></notextile> |
||
251 | #if |
||
252 | [[equal]] s$key 3 |
||
253 | #act |
||
254 | [[setBagOpen]] 3 1 |
||
255 | <notextile></notextile> |
||
256 | #if |
||
257 | [[equal]] s$key 4 |
||
258 | #act |
||
259 | [[setBagOpen]] 4 1 |
||
260 | | |
||
261 | |^. %{color:fireBrick}--..\Mir200\Envir\Market_Def\QFunction-0.txt% |
||
262 | *<notextile>[@pickUpItemEX]</notextile>* |
||
263 | #call [\qf模块\拾取触发.txt] @拾取触发 |
||
264 | <notextile></notextile> |
||
265 | %{color:fireBrick}--..\Mir200\Envir\QuestDiary\qf模块\拾取触发.txt% |
||
266 | *<notextile>[@拾取触发]</notextile>* |
||
267 | #if |
||
268 | [[isDummy]] |
||
269 | #act |
||
270 | <notextile>#call [\假人\假人登录.txt] @获得物品触发</notextile> |
||
271 | <notextile></notextile> |
||
272 | %{color:fireBrick}--..\Mir200\Envir\Market_Def\QFunction-0.txt% |
||
273 | *<notextile>[@struck]</notextile>* |
||
274 | <notextile>#call [\qf模块\被击触发.txt] @被击触发</notextile> |
||
275 | <notextile></notextile> |
||
276 | *<notextile>[@magicStruck]</notextile>* |
||
277 | <notextile>#call [\qf模块\被击触发.txt] @被击触发</notextile> |
||
278 | <notextile></notextile> |
||
279 | %{color:fireBrick}--..\Mir200\Envir\QuestDiary\qf模块\被击触发.txt% |
||
280 | *<notextile>[@被击触发]</notextile>* |
||
281 | #if |
||
282 | [[isDummy]] |
||
283 | #act |
||
284 | <notextile>#call [\假人\假人登录.txt] @假人被真人击处理</notextile> |
||
285 | <notextile></notextile> |
||
286 | <notextile></notextile> |
||
287 | %{color:fireBrick}--..\Mir200\Envir\Market_Def\QFunction-0.txt% |
||
288 | *<notextile>[@playDie]</notextile>* |
||
289 | <notextile>#call [\qf模块\角色死亡.txt] @角色死亡</notextile> |
||
290 | <notextile></notextile> |
||
291 | <notextile></notextile> |
||
292 | %{color:fireBrick}--..\Mir200\Envir\QuestDiary\qf模块\角色死亡.txt% |
||
293 | *<notextile>[@角色死亡]</notextile>* |
||
294 | #if |
||
295 | [[isDummy]] |
||
296 | #act |
||
297 | <notextile>#call [\假人\假人登录.txt] @假人死亡处理</notextile>| |
||
298 | |<notextile></notextile> |
||
299 | <notextile></notextile> |
||
300 | <notextile></notextile> |
||
301 | <notextile></notextile> |
||
302 | <notextile></notextile> |
||
303 | <notextile></notextile> |
||
304 | <notextile></notextile> |
||
305 | <notextile></notextile> |
||
306 | <notextile></notextile> |
||
307 | <notextile></notextile> |
||
308 | <notextile></notextile> |
||
309 | <notextile></notextile> |
||
310 | <notextile></notextile> |
||
311 | <notextile></notextile> |
||
312 | <notextile></notextile> |
||
313 | <notextile></notextile> |
||
314 | <notextile></notextile> |
||
315 | <notextile></notextile> |
||
316 | <notextile></notextile> |
||
317 | <notextile></notextile> |
||
318 | <notextile></notextile> |
||
319 | <notextile></notextile> |
||
320 | <notextile></notextile> |
||
321 | <notextile></notextile> |
||
322 | <notextile></notextile> |
||
323 | <notextile></notextile> |
||
324 | <notextile></notextile> |
||
325 | <notextile></notextile> |
||
326 | <notextile></notextile> |
||
327 | <notextile></notextile> |
||
328 | <notextile></notextile> |
||
329 | <notextile></notextile> |
||
330 | <notextile></notextile> |
||
331 | <notextile></notextile> |
||
332 | <notextile></notextile> |
||
333 | <notextile></notextile> |
||
334 | <notextile></notextile> |
||
335 | <notextile></notextile> |
||
336 | <notextile></notextile> |
||
337 | <notextile></notextile> |
||
338 | <notextile></notextile> |
||
339 | <notextile></notextile> |
||
340 | <notextile></notextile> |
||
341 | <notextile></notextile> |
||
342 | <notextile></notextile> |
||
343 | <notextile></notextile> |
||
344 | <notextile></notextile> |
||
345 | <notextile></notextile> |
||
346 | <notextile></notextile> |
||
347 | <notextile></notextile> |
||
348 | <notextile></notextile> |
||
349 | <notextile></notextile> |
||
350 | <notextile></notextile> |
||
351 | <notextile></notextile> |
||
352 | <notextile></notextile> |
||
353 | <notextile></notextile> |
||
354 | <notextile></notextile> |
||
355 | <notextile></notextile> |
||
356 | <notextile></notextile> |
||
357 | <notextile></notextile> |
||
358 | <notextile></notextile> |
||
359 | <notextile></notextile> |
||
360 | <notextile></notextile> |
||
361 | <notextile></notextile> |
||
362 | <notextile></notextile> |
||
363 | <notextile></notextile> |
||
364 | <notextile></notextile> |
||
365 | <notextile></notextile> |
||
366 | <notextile></notextile> |
||
367 | <notextile></notextile> |
||
368 | <notextile></notextile> |
||
369 | <notextile></notextile> |
||
370 | <notextile></notextile> |
||
371 | <notextile></notextile> |
||
372 | <notextile></notextile> |
||
373 | <notextile></notextile> |
||
374 | <notextile></notextile> |
||
375 | <notextile></notextile> |
||
376 | <notextile></notextile> |
||
377 | <notextile></notextile> |
||
378 | <notextile></notextile> |
||
379 | <notextile></notextile> |
||
380 | <notextile></notextile> |
||
381 | <notextile></notextile> |
||
382 | <notextile></notextile> |
||
383 | <notextile></notextile> |
||
384 | <notextile></notextile> |
||
385 | <notextile></notextile> |
||
386 | <notextile></notextile> |
||
387 | <notextile></notextile> |
||
388 | <notextile></notextile> |
||
389 | <notextile></notextile> |
||
390 | <notextile></notextile> |
||
391 | <notextile></notextile> |
||
392 | <notextile></notextile> |
||
393 | <notextile></notextile> |
||
394 | <notextile></notextile> |
||
395 | <notextile></notextile> |
||
396 | <notextile></notextile> |
||
397 | <notextile></notextile> |
||
398 | <notextile></notextile> |
||
399 | <notextile></notextile> |
||
400 | <notextile></notextile> |
||
401 | <notextile></notextile> |
||
402 | <notextile></notextile> |
||
403 | <notextile></notextile> |
||
404 | <notextile></notextile> |
||
405 | <notextile></notextile> |
||
406 | <notextile></notextile> |
||
407 | <notextile></notextile> |
||
408 | <notextile></notextile> |
||
409 | <notextile></notextile> |
||
410 | <notextile></notextile> |
||
411 | <notextile></notextile> |
||
412 | <notextile></notextile> |
||
413 | <notextile></notextile> |
||
414 | <notextile></notextile> |
||
415 | <notextile></notextile> |
||
416 | <notextile></notextile> |
||
417 | <notextile></notextile> |
||
418 | <notextile></notextile> |
||
419 | | |