假人完整示例 » 历史记录 » 版本 1
tejie, 2023-08-28 10:24
1 | 1 | tejie | h4. 假人完整示例 |
---|---|---|---|
2 | |||
3 | - |
||
4 | - |
||
5 | |||
6 | *自定义假人名称处理* |
||
7 | |||
8 | ..\Mir200\Envir\DummyNameList.txt |
||
9 | 请重命名为 |
||
10 | ..\Mir200\Envir\DummyNameListTJ.txt |
||
11 | |||
12 | [[假人调试模块]] |
||
13 | |||
14 | 本示例相关数据表及脚本文件,请从本页面 *文件* 附件下载。 |
||
15 | |||
16 | - |
||
17 | - |
||
18 | |||
19 | |||
20 | |^. %{color:fireBrick}--..\Mir200\Envir\MapQuest_Def\QManage.txt% |
||
21 | *<notextile>[@Startup]</notextile>* |
||
22 | <notextile>#call [\qm模块\服务器启动.txt] @服务器启动</notextile> |
||
23 | <notextile></notextile> |
||
24 | %{color:fireBrick}--..\Mir200\Envir\QuestDiary\qm模块\服务器启动.txt% |
||
25 | *<notextile>[@服务器启动]</notextile>* |
||
26 | %{color:lightGrey};--服务器首次启动处理% |
||
27 | #if |
||
28 | [[equal]] g$服务器首次启动 0 |
||
29 | #act |
||
30 | [[mov]] g$服务器首次启动 1 |
||
31 | %{color:lightGrey};--假人数据初始化% |
||
32 | [[mov]] a$假人_登录地图 XRJD |
||
33 | [[mov]] a$假人_登录坐标X 77 |
||
34 | [[mov]] a$假人_登录坐标Y 29 |
||
35 | [[mov]] g$假人_登录上限 1 |
||
36 | <notextile></notextile> |
||
37 | #if |
||
38 | #act |
||
39 | [[tbl_load]] 假人等级地图对应表 \假人\假人等级地图对应表.csv |
||
40 | <notextile></notextile> |
||
41 | %{color:fireBrick}--..\Mir200\Envir\Robot_def\AutoRunRobot.txt% |
||
42 | <notextile>#AutoRun NPC SEC 10 @10秒触发</notextile> |
||
43 | <notextile></notextile> |
||
44 | %{color:fireBrick}--..\Mir200\Envir\Robot_def\RobotManage.txt% |
||
45 | *<notextile>[@10秒触发]</notextile>* |
||
46 | <notextile>#call [\假人\假人登录.txt] @发起假人登录</notextile> |
||
47 | <notextile></notextile> |
||
48 | %{color:fireBrick}--..\Mir200\Envir\MapQuest_Def\QManage.txt% |
||
49 | *<notextile>[@login]</notextile>* |
||
50 | #if |
||
51 | [[isDummy]] |
||
52 | <notextile>#call [\假人\假人登录.txt] @执行假人登录</notextile> |
||
53 | <notextile></notextile> |
||
54 | |/3^. %{color:firebrick}--..\Mir200\Envir\QuestDiary\假人\假人登录.txt% |
||
55 | *<notextile>[@发起假人登录]</notextile>* |
||
56 | %{color:lightGrey};--RobotManage.txt [@10秒触发]调用% |
||
57 | #if |
||
58 | [[checkDummyCount]] < g$假人_登录上限 |
||
59 | #act |
||
60 | [[dummyLogon]] <$str(a$假人_登录地图)> <$str(a$假人_登录坐标X)> <$str(a$假人_登录坐标X)> 1 |
||
61 | <notextile></notextile> |
||
62 | *<notextile>[@执行假人登录]</notextile>* |
||
63 | %{color:lightGrey};--QManage.txt [@login]调用% |
||
64 | #act |
||
65 | [[setDummyConfigFileName]] ..\QuestDiary\调试模块\假人\新人配置.txt |
||
66 | [[loadDummyConfigfile]] |
||
67 | <notextile></notextile> |
||
68 | %{color:lightGrey};--创建表--% |
||
69 | #if |
||
70 | not [[tbl_exist]] 登录假人表 |
||
71 | #act |
||
72 | [[tbl_create_global]] 登录假人表 关键字 假人名称 |
||
73 | [[tbl_add]] 登录假人表 <$userName> <$userName> |
||
74 | [[tbl_save]] 登录假人表 |
||
75 | <notextile>goto @新登假人配置</notextile> |
||
76 | <notextile></notextile> |
||
77 | %{color:lightGrey};--保存新登录假人--% |
||
78 | #if |
||
79 | not [[tbl_has_key]] 登录假人表 <$userName> |
||
80 | #act |
||
81 | [[tbl_add]] 登录假人表 <$userName> <$userName> |
||
82 | [[tbl_save]] 登录假人表 |
||
83 | <notextile>goto @新登假人配置</notextile> |
||
84 | <notextile></notextile> |
||
85 | #if |
||
86 | [[tbl_has_key]] 登录假人表 <$userName> |
||
87 | #act |
||
88 | %{color:lightGrey};--todo--登录过的假人% |
||
89 | <notextile></notextile> |
||
90 | #if |
||
91 | #act |
||
92 | <notextile>goto @假人下图处理</notextile> |
||
93 | <notextile></notextile> |
||
94 | *<notextile>[@新登假人配置]</notextile>* |
||
95 | #if |
||
96 | #act |
||
97 | %{color:lightGrey};--处理新假人装备,请根据版本自行调整% |
||
98 | [[mov]] s$key 1 |
||
99 | <notextile>goto @假人换装</notextile> |
||
100 | <notextile></notextile> |
||
101 | *<notextile>[@假人下图处理]</notextile>* |
||
102 | %{color:lightGrey};--根据“假人等级地图对应表”下图 |
||
103 | ;举例 |
||
104 | ;0<lv<=10 地图1 |
||
105 | ;10<lv<=20 地图2 |
||
106 | ;20<lv<=30 地图3 |
||
107 | ;... |
||
108 | ;**假人等级遍历上表,是否不大于等级上限% |
||
109 | #if tbl 假人等级地图对应表 s$key |
||
110 | [[small]] <$level> <$tbl(假人等级地图对应表,s$key,等级上限)> |
||
111 | #act |
||
112 | [[map]] <$tbl(假人等级地图对应表,s$key,地图编号)> |
||
113 | [[gotoNow]] |
||
114 | #elseAct |
||
115 | [[map]] <$tbl(假人等级地图对应表,s$key,地图编号)> |
||
116 | [[gotoNow]] |
||
117 | <notextile></notextile> |
||
118 | <notextile></notextile> |
||
119 | *<notextile>[@获得物品触发]</notextile>* |
||
120 | %{color:lightGrey}<notextile>;--qf [@pickUpItemEX]触发调用</notextile> |
||
121 | ;--todo--处理假人出图逻辑% |
||
122 | #if |
||
123 | %{color:lightGrey};背包满了% |
||
124 | not [[checkBagSize]] 2 |
||
125 | #act |
||
126 | <notextile>goto @假人主动回城处理</notextile> |
||
127 | <notextile></notextile> |
||
128 | <notextile></notextile> |
||
129 | *<notextile>[@假人被真人击处理]</notextile>* |
||
130 | %{color:lightGrey};--todo--qf被击触发调用,处理假人被击逻辑 |
||
131 | ;被击触发器,检查被真人攻击:假人血量低于<notextile>40%:50%几率回城;50%几率逃跑</notextile>% |
||
132 | #if |
||
133 | not [[checkHpPer]] < 40 |
||
134 | #act |
||
135 | break |
||
136 | <notextile></notextile> |
||
137 | #if |
||
138 | [[checkCurrTargetRace]] = 0 |
||
139 | [[checkHPPer]] < 40 |
||
140 | #act |
||
141 | [[movR]] n1 0 2 |
||
142 | #if |
||
143 | [[equal]] n1 0 |
||
144 | #act |
||
145 | [[gotoNow]] |
||
146 | [[delayGoto]] 20000 <notextile>@假人挂机</notextile> |
||
147 | <notextile></notextile> |
||
148 | #if |
||
149 | [[equal]] n1 1 |
||
150 | #act |
||
151 | [[gohome]] |
||
152 | <notextile></notextile> |
||
153 | *<notextile>[@假人挂机]</notextile>* |
||
154 | #act |
||
155 | [[dummyStart]] |
||
156 | <notextile></notextile> |
||
157 | <notextile></notextile> |
||
158 | *<notextile>[@假人死亡处理]</notextile>* |
||
159 | %{color:lightGrey};qf角色死亡触发调用--todo--处理假人死亡逻辑% |
||
160 | #if |
||
161 | #act |
||
162 | [[realive]] 100 1 |
||
163 | [[gohome]] |
||
164 | <notextile></notextile> |
||
165 | %{color:lightGrey};主城随便逛逛% |
||
166 | [[gotoNow]] |
||
167 | <notextile></notextile> |
||
168 | [[goto]] <notextile>@假人下图处理</notextile> |
||
169 | <notextile></notextile> |
||
170 | <notextile></notextile> |
||
171 | *<notextile>[@假人主动回城处理]</notextile>* |
||
172 | #if |
||
173 | #act |
||
174 | [[gohome]] |
||
175 | %{color:lightGrey};--todo--处理假人主动回城逻辑 |
||
176 | ;执行清理背包% |
||
177 | [[gmExeCute]] clearBag self |
||
178 | <notextile></notextile> |
||
179 | %{color:lightGrey};执行假人升级% |
||
180 | #if |
||
181 | #act |
||
182 | <notextile>goto @假人升级处理</notextile> |
||
183 | <notextile></notextile> |
||
184 | %{color:lightGrey};主城随便逛逛% |
||
185 | [[gotoNow]] |
||
186 | <notextile></notextile> |
||
187 | [[goto]] <notextile>@假人下图处理</notextile> |
||
188 | <notextile></notextile> |
||
189 | <notextile></notextile> |
||
190 | *<notextile>[@假人升级处理]</notextile>* |
||
191 | #if |
||
192 | [[large]] <$rankingLevel> 10 |
||
193 | #act |
||
194 | %{color:lightGrey};--todo--处理假人升级逻辑% |
||
195 | [[movR]] n1 1 6 |
||
196 | [[changeLevel]] + n1 |
||
197 | <notextile></notextile> |
||
198 | [[delayGoto]] 500 <notextile>@假人升级处理</notextile> |
||
199 | #elseAct |
||
200 | %{color:lightGrey};--根据升级后等级,穿戴对应装备 |
||
201 | ;--换装前后清空一下背包% |
||
202 | [[gmExeCute]] clearBag self |
||
203 | [[goto]] <notextile>@假人升级换装</notextile> |
||
204 | [[gmExeCute]] clearBag self |
||
205 | <notextile></notextile> |
||
206 | <notextile></notextile> |
||
207 | *<notextile>[@假人升级换装]</notextile>* |
||
208 | #if tbl 假人等级地图对应表 s$key |
||
209 | [[small]] <$level> <$tbl(假人等级地图对应表,s$key,等级上限)> |
||
210 | #act |
||
211 | goto <notextile>@假人换装</notextile> |
||
212 | #elseAct |
||
213 | goto <notextile>@假人换装</notextile> |
||
214 | <notextile></notextile> |
||
215 | <notextile></notextile> |
||
216 | *<notextile>[@假人换装]</notextile>* |
||
217 | #if |
||
218 | #act |
||
219 | [[give]] <$tbl(假人等级地图对应表,s$key,衣服)> 1 |
||
220 | [[give]] <$tbl(假人等级地图对应表,s$key,武器)> 1 |
||
221 | [[give]] <$tbl(假人等级地图对应表,s$key,项链)> 1 |
||
222 | [[give]] <$tbl(假人等级地图对应表,s$key,头盔)> 1 |
||
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 | <notextile></notextile> |
||
230 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,衣服)> 0 |
||
231 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,武器)> 1 |
||
232 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,项链)> 3 |
||
233 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,头盔)> 4 |
||
234 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,左镯)> 5 |
||
235 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,右镯)> 6 |
||
236 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,左戒)> 7 |
||
237 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,右戒)> 8 |
||
238 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,腰带)> 10 |
||
239 | [[takeOnItem]] <$tbl(假人等级地图对应表,s$key,靴子)> 11 |
||
240 | <notextile></notextile> |
||
241 | %{color:lightGrey};--假人扩展背包页% |
||
242 | #if |
||
243 | [[equal]] s$key 2 |
||
244 | #act |
||
245 | [[setBagOpen]] 2 1 |
||
246 | <notextile></notextile> |
||
247 | #if |
||
248 | [[equal]] s$key 3 |
||
249 | #act |
||
250 | [[setBagOpen]] 3 1 |
||
251 | <notextile></notextile> |
||
252 | #if |
||
253 | [[equal]] s$key 4 |
||
254 | #act |
||
255 | [[setBagOpen]] 4 1 |
||
256 | | |
||
257 | |^. %{color:fireBrick}--..\Mir200\Envir\Market_Def\QFunction-0.txt% |
||
258 | *<notextile>[@pickUpItemEX]</notextile>* |
||
259 | #call [\qf模块\拾取触发.txt] @拾取触发 |
||
260 | <notextile></notextile> |
||
261 | %{color:fireBrick}--..\Mir200\Envir\QuestDiary\qf模块\拾取触发.txt% |
||
262 | *<notextile>[@拾取触发]</notextile>* |
||
263 | #if |
||
264 | [[isDummy]] |
||
265 | #act |
||
266 | <notextile>#call [\假人\假人登录.txt] @获得物品触发</notextile> |
||
267 | <notextile></notextile> |
||
268 | %{color:fireBrick}--..\Mir200\Envir\Market_Def\QFunction-0.txt% |
||
269 | *<notextile>[@struck]</notextile>* |
||
270 | <notextile>#call [\qf模块\被击触发.txt] @被击触发</notextile> |
||
271 | <notextile></notextile> |
||
272 | *<notextile>[@magicStruck]</notextile>* |
||
273 | <notextile>#call [\qf模块\被击触发.txt] @被击触发</notextile> |
||
274 | <notextile></notextile> |
||
275 | %{color:fireBrick}--..\Mir200\Envir\QuestDiary\qf模块\被击触发.txt% |
||
276 | *<notextile>[@被击触发]</notextile>* |
||
277 | #if |
||
278 | [[isDummy]] |
||
279 | #act |
||
280 | <notextile>#call [\假人\假人登录.txt] @假人被真人击处理</notextile> |
||
281 | <notextile></notextile> |
||
282 | <notextile></notextile> |
||
283 | %{color:fireBrick}--..\Mir200\Envir\Market_Def\QFunction-0.txt% |
||
284 | *<notextile>[@playDie]</notextile>* |
||
285 | <notextile>#call [\qf模块\角色死亡.txt] @角色死亡</notextile> |
||
286 | <notextile></notextile> |
||
287 | <notextile></notextile> |
||
288 | %{color:fireBrick}--..\Mir200\Envir\QuestDiary\qf模块\角色死亡.txt% |
||
289 | *<notextile>[@角色死亡]</notextile>* |
||
290 | #if |
||
291 | [[isDummy]] |
||
292 | #act |
||
293 | <notextile>#call [\假人\假人登录.txt] @假人死亡处理</notextile>| |
||
294 | |<notextile></notextile> |
||
295 | <notextile></notextile> |
||
296 | <notextile></notextile> |
||
297 | <notextile></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 | | |