wlwind 发表于 2013-8-30 14:57:44

MUSH入门机器人:朱熹学习literate,等待的时候练习武功

拷贝代码到一个后缀名.lua的文件。
注意文件编码:ANSI
MUSH里面脚本载入。
南昌朱熹处: szhuxi 开始 ezhuxi 结束

require "wait"

Note("---Wlwind-北侠机器人---")
SetSpeedWalkDelay(50)       

---triggers---
addTri = function(name, str, content, func, group)
        AddTriggerEx (name, str,
       content,
       bit.bor(trigger_flag.Enabled,trigger_flag.Temporary,trigger_flag.Replace,trigger_flag.RegularExpression),
       custom_colour.Custom15, 0, "", func, 10, 50)
        SetTriggerOption (name, "group", group)
end

---Account login---
login = function()
        local playId,playPasswd        --playId
        playId = GetVariable("player")
        playPasswd = GetVariable("passwd")
        DoAfterSpeedWalk(1, "("..playId..")("..playPasswd..")(Y)")
        Note("Login success")
end

----xue zhu xi ----
go_eat_drink_zhuxi = function()
        local lian_skill
        lian_skill = GetVariable("lian_skill")

        DoAfterSpeedWalk(0.1, "(lian "..lian_skill.." 50) 2w (eat)" )
        DoAfterSpeedWalk(4, "e n (drink)" )
        DoAfterSpeedWalk(7, "s (xue zhu xi for literate 50)" )
end

wait_zhu_xi = function()
        local lian_skill
        lian_skill = GetVariable("lian_skill")

        DoAfterSpeedWalk(10, "(lian "..lian_skill.." 50) (xue zhu xi for literate 50)" )
end

zhuxi = function()
        SetVariable ("lian_skill", "parry")
        local lian_skill
        lian_skill = GetVariable("lian_skill")
       
        addTri("zhuxi_1", "^[> ]*你听了朱熹的指导,似乎有些心得。","yun regenerate","","zhuxi")
        addTri("zhuxi_2", "^[> ]*你略一凝神,精神看起来好多了。","xue zhu xi for literate 50","","zhuxi")
        addTri("zhuxi_3", "^[> ]*你的内力不够。","e;sleep","","zhuxi")
        addTri("zhuxi_4", "^[> ]*你一觉醒来,精神抖擞地活动了几下手脚。","","go_eat_drink_zhuxi","zhuxi")
        addTri("zhuxi_5", "^[> ]*你刚在三分钟内睡过一觉, 多睡对身体有害无益! ","w","wait_zhu_xi","zhuxi")
        addTri("zhuxi_6", "^[> ]*嗯....你得先把朱熹弄醒再说。 ","","wait_zhu_xi","zhuxi")
        addTri("zhuxi_7", "^[> ]*你附近没有 zhu xi 这个人,请用 id here 指令看看周围人物 id 。","","wait_zhu_xi","zhuxi")
               
        DoAfterSpeedWalk(1, "(xue zhu xi for literate 50)")
end
endzhuxi = function()
        DeleteTriggerGroup ("zhuxi")
end
----end xue zhu xi ----

---cmds----
AddAlias("s_xuezhuxi", "szhuxi", "", bit.bor(trigger_flag.Enabled,trigger_flag.Temporary,trigger_flag.Replace), "zhuxi")
AddAlias("d_xuezhuxi", "dzhuxi", "", bit.bor(trigger_flag.Enabled,trigger_flag.Temporary,trigger_flag.Replace), "endzhuxi")

北大侠客行MUD,中国最好的MUD

hahh 发表于 2013-9-12 01:34:36

现在不是没有朱熹了吗

alucar 发表于 2013-9-12 15:23:53

这只是学读书写字的机器人,被cut的是猜数字
页: [1]
查看完整版本: MUSH入门机器人:朱熹学习literate,等待的时候练习武功