|
绝情谷总出问题,经过分析,感觉应该时checkBags函数运算时间太多导致的。所以我这边干脆把负重触发重新制作,成为独立函数。因为不用checkBags,也是函数写的复杂了,不管怎么样……能用就行把。欢迎门派兄弟们帮忙测试一下。
- dropstone=0
- function shuitan_check(n,l,w)
- EnableTimer("shuitan_check",false)
- DeleteTimer("shuitan_check")
- fuzhongbfb=0
- local t = tonumber(w[3])
- fuzhongbfb=t
- print(fuzhongbfb)
- if fuzhongbfb == 0 then
- return check_busy(shuitan_checkpre,1)
- else
- return jqg_checktrigger()
- end
- end
- function jqg_checktrigger()
- DeleteTriggerGroup("dashikuai")
- create_trigger_t('dashikuai1','^>*\\s*你身上没有这样东西。,'','dropstone_false')
- create_trigger_t('dashikuai2','^>*\\s*你丢下一块','','dropstone_true')
- for i = 1,2 do SetTriggerOption('dashikuai'..i,'group','dashikuai') end
- EnableTriggerGroup("dashikuai",false)
- return jqg_checkMdo()
- end
- function jqg_checkMdo()
- if fuzhongbfb>100 then
- dropstone=1
- return dashikuai_dg()
- else if fuzhongbfb>80 then
- exe('tiao tan')
- return jgq_qiandown()
- else
- exe('#3(jian shi)')
- return shuitan_checkpre()
- end
- end
- end
- function dashikuai_dg()
- EnableTriggerGroup("dashikuai",true)
- if dropstone==1 then
- exe('drop da shikuai')
- end
- if dropstone==2 then
- exe('drop xiao shitou')
- end
- if dropstone==3 then
- exe('drop e luanshi')
- end
- if dropstone==4 then
- dropstone=1
- return Totanan()
- end
- end
- function dropstone_true()
- EnableTriggerGroup("dashikuai",false)
- return shuitan_checkpre()
- end
- function dropstone_false()
- dropstone=dropstone+1
- return dashikuai_dg()
- end
- function shuitan_checkpre()
- exe('i')
- EnableTimer("shuitan_check",true)
- end
- function Totanan()
- DeleteTimer("shuitan_check")
- DeleteTriggerGroup("qqs")
- create_trigger_t('qqs1','^>*\\s*你要往哪里潜?,'','qQydok')
- create_trigger_t('qqs2','^>*\\s*由于重力不够,你无法继续下潜!,'','qQyderorr')
- create_trigger_t('qqs3','^>*\\s*你一个猛栽,潜了下去。,'','jgq_qiandown')
- SetTriggerOption("qqs1","group","qqs")
- SetTriggerOption("qqs2","group","qqs")
- SetTriggerOption("qqs3","group","qqs")
- EnableTriggerGroup("qqs",true)
- create_trigger_t('shuitan_bags','^(> )*你身上带着(\\D*)件东西\\(负重\\s*(\\d*)\\.\\d*\\%\\):','','shuitan_check')
- EnableTrigger("shuitan_bags",true)
- exe('unwield taiji sword;unwield changjian;unwield yunny jian')
- exe('#10(jian shi)')
-
- create_timer_s('shuitan_check',1,'shuitan_checkpre')
- EnableTimer("shuitan_check",true)
- end
- function jgq_qiandown()
- EnableTriggerGroup("dashikuai",false)
- DeleteTriggerGroup("dashikuai")
- DeleteTimer("shuitan_check")
- EnableTrigger("shuitan_bags",false)
- DeleteTrigger("shuitan_bags")
- check_busy(function() exe('qian down') end,1)
- end
- function jqg_qianup()
- check_busy(function() exe('qian up') end,1)
- end
- function qQyderorr()
- EnableTriggerGroup("qqs",false)
- check_halt(qQyderorrgetstone)
- end
- function qQyderorrgetstone()
- exe('pa up')
- return Totanan()
- --[[ exe('pa up;#2(jian shi)')
- EnableTriggerGroup("qqs",true)
- checkBags()
- return check_busy(jqg_checktiaotan)--]]
- end
- function qQydok()
- DeleteTriggerGroup("qqs")
- --checkBags()
- check_busy(qQyd_dropstone)
- end
- function qQyd_dropstone()
- if not Bag["ENCB"] or not Bag["ENCB"].value then
- exe('#20(drop stone)')
- else
- if Bag['大石块'] and Bag['大石块'].cnt then
- exe('#' .. Bag['大石块'].cnt .. '(drop da shikuai)')
- end
- if Bag['鹅卵石'] and Bag['鹅卵石'].cnt then
- exe('#' .. Bag['鹅卵石'].cnt .. '(drop e luanshi)')
- end
- if Bag['小石头'] and Bag['小石头'].cnt then
- exe('#' .. Bag['小石头'].cnt .. '(drop xiao shitou)')
- end
- end
- return check_busy(totanan_check_qqup)
- end
- function totanan_check_qqup()
- create_trigger_t('qqs1','^>*\\s*你身子沉重,用尽全力也无法向上面游去!,'','totanan_check_qqup')
- create_trigger_t('qqs2','^>*\\s*你两腿用力一蹬,向左上方浮去。,'','qQup')
- create_trigger_t('qqs3','^>*\\s*你要往哪里潜?,'','Hyadi')
- SetTriggerOption("qqs1","group","qqs")
- SetTriggerOption("qqs2","group","qqs")
- SetTriggerOption("qqs3","group","qqs")
- exe('#20(drop stone);qian zuoshang')
- end
- function qQup()
- check_busy(function() exe('qian up') return check_busy(qQsover) end,1)
- end
- function qQsover()
- DeleteTriggerGroup("qqs")
- exe("pa up")
- exe("#10(drop stone)")
- return walk_wait()
- end
- function Hgudi()
- DeleteTriggerGroup("qqs")
- create_trigger_t('qqs1','^>*\\s*你要往哪里潜?,'','Hyadi')
- create_trigger_t('qqs2','^>*\\s*由于重力不够,你无法继续下潜!,'','qQyderorr')
- create_trigger_t('qqs3','^>*\\s*你一个猛栽,潜了下去。,'','jgq_qiandown')
- SetTriggerOption("qqs1","group","qqs")
- SetTriggerOption("qqs2","group","qqs")
- SetTriggerOption("qqs3","group","qqs")
- EnableTriggerGroup("qqs",true)
- create_trigger_t('shuitan_bags','^(> )*你身上带着(\\D*)件东西\\(负重\\s*(\\d*)\\.\\d*\\%\\):','','shuitan_check')
- EnableTrigger("shuitan_bags",true)
- exe('unwield taiji sword;unwield changjian;unwield yunny jian')
- exe('#10(jian shi)')
-
- create_timer_s('shuitan_check',1,'shuitan_checkpre')
- EnableTimer("shuitan_check",true)
- --[[ exe('#10(jian shi)')
- checkBags()
- return check_busy(jqg_checktiaotan)--]]
- end
- function Hyadi()
- DeleteTriggerGroup("qqs")
- --checkBags()
- check_busy(hhq_dropstone,1)
- end
- function hhq_dropstone()
- if not Bag["ENCB"] or not Bag["ENCB"].value then
- exe('#20(drop stone)')
- else
- if Bag['大石块'] and Bag['大石块'].cnt then
- exe('#' .. Bag['大石块'].cnt .. '(drop da shikuai)')
- end
- if Bag['鹅卵石'] and Bag['鹅卵石'].cnt then
- exe('#' .. Bag['鹅卵石'].cnt .. '(drop e luanshi)')
- end
- if Bag['小石头'] and Bag['小石头'].cnt then
- exe('#' .. Bag['小石头'].cnt .. '(drop xiao shitou)')
- end
- end
- return check_busy(Hyadiup)
- end
- function Hyadiup()
- DeleteTriggerGroup("qqs")
- create_trigger_t('qqs1','^>*\\s*你身子沉重,用尽全力也无法向上面游去!,'','Hyadiup')
- create_trigger_t('qqs2','^>*\\s*你(两腿用力一蹬,向上面浮去|手脚齐划,顺着水势向上面浮去)','','jqg_qianup')
- create_trigger_t('qqs3','^>*\\s*你要往哪里潜?,'','hhqover')
- SetTriggerOption("qqs1","group","qqs")
- SetTriggerOption("qqs2","group","qqs")
- SetTriggerOption("qqs3","group","qqs")
- exe('#5(drop stone);qian up')
- end
- function hhqover()
- exe('#10(drop stone);pa up')
- DeleteTriggerGroup("qqs")
- return walk_wait()
- end
复制代码 |
评分
-
1
查看全部评分
-
|