|
本帖最后由 eblisade 于 2018-4-17 05:42 AM 编辑
感觉这对各位大佬们来说都是小case,不过我还搞了挺久才搞明白...分享几个关键trigger出来得瑟一下。大佬们肯定有更好的思路,请不吝拍砖。
话说我理解这样应该不违规?bow
思路是这样的:
1. 水贼爬上船=》look
2. 抓取水贼id,分别look各个水贼
3. look到拿着圣火令的水贼则将其名称存为@mingjiao_name,id存为@mingjiao_id
4. 之后就可以定向对着明教水贼发化学pfm了
5. 打退明教水贼后再次look,如果船上还有明教水贼则重复以上2-4步
唯一一个比较特殊的trigger是loop line,zmud官网说这个功能只有6.20以后版本才有,所以462上用不了。
官网对loop lines介绍如下:
Loop Lines
The "Loop Lines" type will fire the trigger whenever the pattern is matched during the next N lines. Once N lines have been received, the trigger state is automatically incremented. For example:
#TRIGGER {Zugg} {#CW high,red}
#COND {Hello} {#CW high,blue} {LoopLines|Param=5}
Once the "Zugg" text is received from the MUD, the trigger will then look at the next 5 lines from the MUD. If any of those lines contains the "Hello" text, it will get colored bright blue. Once the 5 lines have been received, it increments to the next trigger state, and wraps back to the beginning.
这个功能实际上是多阶段触发的一种。若在trigger第一次被触发并执行第一阶段命令后若干行内出现特定字句,则执行第二阶段命令。若第一次触发后若干行内未出现特定字句,则重置trigger。
我设置的是look水贼之后,出现“^鄱阳??水贼%s(%x)~(%x (%x)~)????战斗中”时,将%1存为@shuizei_name,%2存为@shuizei_id。如果这一行之后5行内出现"圣火令",则mingjiao_name=@shuizei_name;mingjiao_id=@shuizei_id。
几个主要trigger如下:
- #TRIGGER {一个鄱阳水贼爬上了你的小船。} {l}
- #TRIGGER {%s鄱阳??水贼*~(%x (*)~)????战斗中} {tanz %1;l %1}
- #TRIGGER {^鄱阳??水贼%s(%x)~(%x (%x)~)????战斗中} {shuizei_name=%1;shuizei_id=%2}
- #COND {圣火令} {mingjiao_name=@shuizei_name;mingjiao_id=@shuizei_id;mingjiao=1;jiali=100;#say 有明教!!;#say 有明教!!;#say 有明教!!;#play knock.wav;uw} {looplines|param=5}
- #TRIGGER {{这是一位鄱阳湖|看起来|生得|身上带|的武艺看上去}} {#gag}
- #TRIGGER {^??你在攻击中不断积蓄攻势。~(气势:%d~%~)} {yun qimen;#if @mingjiao=1 {jiali max;perform luoying-zhang.pikong @mingjiao_id;jiali @jiali;perform yuxiao-jian.xiaohua @mingjiao_id;perform tanzhi-shengong.tan @mingjiao_id} {perform yuxiao-jian.xiaohua;perform tanzhi-shengong.tan}}
- #TRIGGER {你终于打退了(*)的攻击} {#if %1=@mingjiao_name {mingjiao=0;jiali max};l}
复制代码
北大侠客行MUD,中国最好的MUD |
|