分享下我的经验
js是javascript代码
mush的机器人主要有两个文件组成,mct是触发器,符合触发条件调用js文件中的函数
朱熹机器人我当时修改是为了猜数成功后的40秒内自动回发呆室学习读书写字(当时有人把朱熹搬到发呆室了,否则这个不能正常使用)
question.mct 修改了这里,自己找一下,覆盖。注意enabled="y",我当时改完发现不触发,找了半天才发现这个问题 (把所有花括号换成尖括号,发尖括号不能正常显示,我懒得转换>什么的了)- {trigger
- enabled="y"
- group="question"
- match="^朱熹对你竖起了大拇指.*$"
- regexp="y"
- send_to="12"
- sequence="100"
- }
- {send}do_after2();{/send}
- {/trigger}
复制代码 question.js增加do_after2()这个函数。注意带有空格的命令要用括号括起来,否则mush会当作多条指令执行。这个地方其实用循环更好,不过拷贝粘贴更简单,达到目的就行了,嘿嘿
每次读5是我当时以为升级时,多出的次数会浪费,后来发现不是的,所以无视吧- function do_after2()
- {
- world.DoAfterSpeedWalk (0.1,"s w s s w (drink) e n n d (out)");
- world.DoAfterSpeedWalk (2.5,"(xue zhu for literate 5) (xue zhu for literate 5) (xue zhu for literate 5) (fadai)");
- world.DoAfterSpeedWalk (5,"(xue zhu for literate 5) (xue zhu for literate 5) (xue zhu for literate 5) (fadai)");
- world.DoAfterSpeedWalk (7.5,"(xue zhu for literate 5) (xue zhu for literate 5) (xue zhu for literate 5) (fadai)");
- world.DoAfterSpeedWalk (10,"(xue zhu for literate 5) (xue zhu for literate 5) (xue zhu for literate 5) (fadai)");
- world.DoAfterSpeedWalk (12.5,"(xue zhu for literate 5) (xue zhu for literate 5) (xue zhu for literate 5) (fadai)");
- world.DoAfterSpeedWalk (15,"(xue zhu for literate 5) (xue zhu for literate 5) (xue zhu for literate 5) (fadai)");
- world.DoAfterSpeedWalk (17.5,"(xue zhu for literate 5) (xue zhu for literate 5) (xue zhu for literate 5) (fadai)");
- world.DoAfterSpeedWalk (20,"(xue zhu for literate 5) (xue zhu for literate 5) (xue zhu for literate 5) (fadai)");
- world.DoAfterSpeedWalk (22.5,"(xue zhu for literate 5) (xue zhu for literate 5) (xue zhu for literate 5) (fadai)");
- world.DoAfterSpeedWalk (25,"(xue zhu for literate 5) (xue zhu for literate 5) (xue zhu for literate 5) (fadai)");
- world.DoAfterSpeedWalk (27.5,"(xue zhu for literate 5) (xue zhu for literate 5) (xue zhu for literate 5) (fadai)");
- world.DoAfterSpeedWalk (30,"(xue zhu for literate 5) (xue zhu for literate 5) (xue zhu for literate 5) (fadai)");
- world.DoAfterSpeedWalk (32.5,"(xue zhu for literate 5) (xue zhu for literate 5) (xue zhu for literate 5) (fadai)");
- world.DoAfterSpeedWalk (35,"(xue zhu for literate 5) (xue zhu for literate 5) (xue zhu for literate 5) (fadai)");
- world.DoAfterSpeedWalk (37,"(enter) u e n (chi liang)");
- }
复制代码
[ 本帖最后由 zleo 于 2009-8-1 01:34 PM 编辑 ] |