|
楼主 |
发表于 2015-5-25 09:10:58
|
显示全部楼层
贴一下打坐模块吧
仅仅是打坐罢了......隶属于sit模块,sit模块分为:主体、打坐、吐纳、练功、练内功、判断是否需要练功、判断是否需要练内功,共7部分
function sit_dazuo()
printd(debug_sit,"开始打坐")
local dzmovea="^>* *\\s*你还是专心拱猪吧!\\s*$"
local dzmoveb="^>* *\\s*此地不宜修练!\\s*$"
local dzmovec="^>* *\\s*卧室不能打坐,会影响别人休息。\\s*$"
local dzmoved="^>* *\\s*这里不准战斗,也不准打坐。\\s*$"
local dzbusya="^>* *\\s*你现在正忙着呢。\\s*$"
local dzbusyb="^>* *\\s*你刚施用过内功,不能马上打坐。\\s*$"
local dzbusyc="^>* *\\s*你感到体内气息乱窜,无法聚气打坐!\\s*$"
local dzfight="^>* *\\s*战斗中不能练内功,会走火入魔。\\s*$"
local dzjifa="^>* *\\s*你必须先用 enable 选择你要用的特殊内功。\\s*$"
local dzcosta="^>* *\\s*你要花多少气练功?\\s*$"
local dzcostb="^>* *\\s*你至少需要.*点的气来打坐!\\s*$"
local dznoqi="^>* *\\s*你没有那么多的气来产生内息运行全身经脉。\\s*$"
local dznojing="^>* *\\s*你现在精不够,无法控制内息的流动!\\s*$"
Execute("mush_dz")
local l,w,o=wait_quest(dzmovea .. "|" .. dzmoveb .. "|" .. dzmovec .. "|" ..dzmoved .. "|" .. dzbusya .. "|" .. dzbusyb .. "|" .. dzbusyc .. "|" .. dzfight .. "|" .. dzjifa .. "|" .. dzcosta .. "|" .. dzcostb .. "|" .. dznoqi .. "|" .. dznojing .. "|" .. config.sit.dazuo_b,vil,"yes")
print(l)
print(o)
if o~= "ok" then
return o
end
if string.find(l,"拱猪") or string.find(l,"不宜修练") or string.find(l,"卧室不能打坐") or string.find(l,"也不准打坐") then
return "move"
end
if string.find(l,"你现在正忙着呢") or string.find(l,"不能马上打坐") or string.find(l,"无法聚气打坐") then
local o=wait_time(1,"yes")
printd(debug_sit,"有点忙")
if o~="ok" then
sta.quest.sit=""
return o
end
return "ok"
end
if string.find(l,"战斗中不能练内功") then
local o=wait_time(1,"yes")
printd(debug_sit,"有战斗?那怎么还打坐?有问题")
if o~="ok" then
sta.quest.sit=""
return o
end
return "ok"
end
if string.find(l,"你要花多少气练功") or string.find(l,"你至少需要") then
local o=wait_time(1,"yes")
printd(debug_sit,"打坐信息设置出错")
quest_list.go_reset.can="yes"
if o~="ok" then
sta.quest.sit=""
return o
end
return "abort"
end
if string.find(l,"你没有那么多的气来产生内息运行全身经脉") then
local o=wait_time(1,"yes")
printd(debug_sit,"打坐气血不够")
if o~="ok" then
sta.quest.sit=""
return o
end
if sta.hp.qixue*2*sta.hp.qixue_pst>sta.hp.qixue_max*100 then
quest_list.go_reset.can="yes"
return "abort"
else
return "ok"
end
end
if string.find(l,"选择你要用的特殊内功") then
local o=wait_time(1,"yes")
printd(debug_sit,"重新激发内力再试")
if o~="ok" then
sta.quest.sit=""
return o
end
Execute("jifa force " .. config.jifa.force)
return "ok"
end
if string.find(l,"你现在精不够") then
local o=wait_time(1,"yes")
printd(debug_sit,"精血不足?回头再看一下状态好了")
if o~="ok" then
sta.quest.sit=""
return o
end
return "ok"
end
printd(debug_sit,"开始打坐了")
local l,w,o=wait_quest(config.sit.dazuo_o,vil,"yes")
printd(debug_sit,"打坐完毕了")
if o~="ok" then
sta.quest.sit=""
return o
end
return "ok"
end |
|