发个zmud版的朱熹question机器人
1、根据sure的mush机器人思路改写而成。对sure表示崇高的敬意。2、适合对mush不熟悉的新人使用,老鸟估计也看不见这点潜能了。
3、在zmud721版测试通过,不清楚462如何,有兴趣的同学可以导入看看。
4、限于程序本身问题,zmud的运算速度完全比不上JS.不过,朱老太爷45秒才给一个任务,在此时间内计算出来还是没有问题的。
5、我没有做过朱熹的任务,对朱熹任务还有什么变数,比如“让你出去”等等的触发没有加上,请使用的同学注意。如果还有什么不足,希望大家指出来,利于改进。
[ 本帖最后由 zmeng 于 2009-8-26 09:39 AM 编辑 ] 导出的文件
#CLASS {System|Pueblo}
#CLASS {zhuxi}
#CLASS {login}
#CLASS {防发呆}
#CLASS 0
#VAR daxie {一|二|三|四|五|六|七|八|九|零} {_nodef} "zhuxi"
#VAR xiaoxie {1|2|3|4|5|6|7|8|9|0} {_nodef} "zhuxi"
#VAR c {6} {_nodef} "zhuxi"
#VAR temp1 {2768|3765|4768|5783|5863|6753|7563|8167|8365|8467|8573|8653|8716|8726|8746} {_nodef} "zhuxi"
#VAR i {1} {_nodef} "zhuxi"
#VAR temp {2768|3765|4768|5783|5863|6753|7563|8167|8365|8467|8573|8653|8716|8726|8746} {_nodef} "zhuxi"
#VAR guess {8746} {_nodef} "zhuxi"
#VAR n {0} {_nodef} "zhuxi"
#VAR zz {8763} {_nodef} "zhuxi"
#VAR a {8} {_nodef} "zhuxi"
#VAR b {7} {_nodef} "zhuxi"
#VAR d {3} {_nodef} "zhuxi"
#VAR z {8763} {_nodef} "zhuxi"
#VAR t {1280} {_nodef} "zhuxi"
#VAR j {0} {_nodef} "zhuxi"
#VAR a1 {8} {_nodef} "zhuxi"
#VAR b1 {7} {_nodef} "zhuxi"
#VAR c1 {6} {_nodef} "zhuxi"
#VAR d1 {3} {_nodef} "zhuxi"
#VAR tempa {1234|1235|1236|1237|1238|1243|...|8761|8762|8763|8764|8765} {_nodef} "zhuxi"
//高中的数学老师告诉我们,把四本书放在八个书架上有1680种方法。
//限于篇幅,在此不一一列举,生成办法在后面...
#VAR quandui {2} {_nodef} "zhuxi"
#VAR shujia {1} {_nodef} "zhuxi"
#VAR quandui1 {4} {_nodef} "zhuxi"
#VAR shujia1 {0} {_nodef} "zhuxi"
#VAR zhanghao {} {_nodef} "zhuxi"
#VAR mima {} {_nodef} "zhuxi"
#VAR fadai {0}
#TRIGGER {欢迎来到北大侠客行!} {#wa 1000;#timer on;w;s;e;n;#t+ zhuxi;ask zhu about question}
#TRIGGER {朱熹道*题目是这样的} {#var fadai 0;#var temp {};#var guess 1234;#var n 1;guess @guess} "zhuxi"
#TRIGGER {朱熹道*全对的有(*)个,只有书架对的有(*)个} {#var fadai 0;#var quandui %1;#var shujia %2;#var quandui %item( @xiaoxie, %ismember( @quandui, @daxie));#var shujia %item( @xiaoxie, %ismember( @shujia, @daxie));#var temp1 {};#var a 0;#var b 0;#var c 0;#var d 0;#var j 0;#var zz @guess;#math a1 @zz/1000;#math b1 @zz/100-@a1*10;#math c1 @zz/10-@a1*100-@b1*10;#math d1 @zz-@a1*1000-@b1*100-@c1*10;#if @n=1 {#var temp {};#var temp @tempa};#forall @temp {#var z %i;#math a @z/1000;#math b @z/100-@a*10;#math c @z/10-@a*100-@b*10;#math d @z-@a*1000-@b*100-@c*10;#var quandui1 0;#var shujia1 0;#if (@a=@a1) {#add quandui1 1};#if (@a=@b1) {#add shujia1 1};#if (@a=@c1) {#add shujia1 1};#if (@a=@d1) {#add shujia1 1};#if (@b=@b1) {#add quandui1 1};#if (@b=@a1) {#add shujia1 1};#if (@b=@c1) {#add shujia1 1};#if (@b=@d1) {#add shujia1 1};#if (@c=@c1) {#add quandui1 1};#if (@c=@a1) {#add shujia1 1};#if (@c=@b1) {#add shujia1 1};#if (@c=@d1) {#add shujia1 1};#if (@d=@d1) {#add quandui1 1};#if (@d=@a1) {#add shujia1 1};#if (@d=@b1) {#add shujia1 1};#if (@d=@c1) {#add shujia1 1};#if (@quandui1=@quandui and @shujia1=@shujia) {#var guess @z;#var temp1 %addItem( @z, @temp1)}};#var temp {};#var temp @temp1;#var n 0;#wa 1000;guess @guess} "zhuxi"
//这个后面单独占楼,看得比较清楚
#TRIGGER {重新连线完毕} {#wa 100;halt;quit} "login"
#TRIGGER {朱熹对你摇了摇头} {#var fadai 0;#wa 1000;ask zhu about question} "zhuxi"
#TRIGGER {朱熹对你竖起了大拇指*道*你真行。} {#var fadai 0;#wa 30000;ask zhu about question} "zhuxi"
#TRIGGER {朱熹道*下次再猜吧!} {#var fadai 0;#wa 30000;ask zhu about question} "zhuxi"
#TRIGGER {☆ 飞雪连天射白鹿,笑书神侠倚碧鸳 ☆} {@zhanghao;@mima;y} "login"
#TRIGGER {你对着空气踢了一脚。} {#add fadai 1;#if @fadai>5 {halt;quit}} "防发呆"
#BUTTON 1 {修改帐号} {#pr zhanghao "你的帐号";#pr mima "你的密码" "*"} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} "" {} {} {}
[ 本帖最后由 zmeng 于 2009-8-26 09:42 AM 编辑 ] #TRIGGER {朱熹道*全对的有(*)个,只有书架对的有(*)个} {
#var fadai 0
//防止发呆的,@fadai每分钟增加1,遇动作清零,到5时quit
#var quandui %1
#var shujia %2
#var quandui %item( @xiaoxie, %ismember( @quandui, @daxie))
#var shujia %item( @xiaoxie, %ismember( @shujia, @daxie))
//把大写变成数字
//后面的基本跟sure的机器人一样,不做介绍。
#var temp1 {}
#var a 0
#var b 0
#var c 0
#var d 0
#var j 0
#var zz @guess
#math a1 @zz/1000
#math b1 @zz/100-@a1*10
#math c1 @zz/10-@a1*100-@b1*10
#math d1 @zz-@a1*1000-@b1*100-@c1*10
#if @n=1 {
#var temp {}
#var temp @tempa
}
#forall @temp {
#var z %i
#math a @z/1000
#math b @z/100-@a*10
#math c @z/10-@a*100-@b*10
#math d @z-@a*1000-@b*100-@c*10
#var quandui1 0
#var shujia1 0
#if (@a=@a1) {#add quandui1 1}
#if (@a=@b1) {#add shujia1 1}
#if (@a=@c1) {#add shujia1 1}
#if (@a=@d1) {#add shujia1 1}
#if (@b=@b1) {#add quandui1 1}
#if (@b=@a1) {#add shujia1 1}
#if (@b=@c1) {#add shujia1 1}
#if (@b=@d1) {#add shujia1 1}
#if (@c=@c1) {#add quandui1 1}
#if (@c=@a1) {#add shujia1 1}
#if (@c=@b1) {#add shujia1 1}
#if (@c=@d1) {#add shujia1 1}
#if (@d=@d1) {#add quandui1 1}
#if (@d=@a1) {#add shujia1 1}
#if (@d=@b1) {#add shujia1 1}
#if (@d=@c1) {#add shujia1 1}
#if (@quandui1=@quandui and @shujia1=@shujia) {
#var guess @z
#var temp1 %addItem( @z, @temp1)
}
}
#var temp {}
#var temp @temp1
#var n 0
#wa 1000
guess @guess
} "zhuxi"
[ 本帖最后由 zmeng 于 2009-8-26 09:45 AM 编辑 ] @tempa的生成办法
#var a 1
#wh (a<9) {
#var b 1
#wh (b<9) {
#if (b<>a) {
#var c 1
#wh (c<9) {
#if (c<>a and c<>b) {
#var d 1
#wh (d<9) {
#if (d<>a and d<>b and d<>c) {
#var tempa {}
#math z a+1000+b*100+c*10+d
#var tempa %additem( @z, @tempa)
}
#add d 1
}
}
#add c 1
}
}
#add b 1
}
#add a 1
}
[ 本帖最后由 zmeng 于 2009-8-26 09:45 AM 编辑 ] tempa 流程
[ 本帖最后由 zmeng 于 2009-8-26 09:46 AM 编辑 ] 只占楼不编辑 占楼不编辑 买楼投资
占楼不编辑 前排占位 是个好东西啊,先顶了,不过为什么我导入到4.62的时候出错了。。。。用不了555555555555