|
楼主 |
发表于 2019-3-8 15:04:38
|
显示全部楼层
这个要结合我另一个帖子中的内容,加一个标志,我上代码:
- function walk_wait()
- EnableTriggerGroup("walk",true)
- EnableTrigger("hp12",true)
- if isFlood then
- wait.make(function()
- wait.time(1)
- end)
- end
- if tmp.find then
- create_timer_s('walkWait',0.5,'walkTimer')
- if cntr1() > 0 then
- exe('alias action 正在赶路中')
- else
- cntr1 = countR(15)
- end
- else
- exe('alias action 正在赶路中') --增加此指令,快速赶路 by freely
- antiFlood="walkTimer"
- DoAfterSpecial(0.35,'return AntiFloodTimer()',12)
- --create_timer_s('walkWait',0.35,'walkTimer') --0.1改为0.35 by freely
- end
- end
- function walkTimer()
- --EnableTriggerGroup("walk",true)
- exe('alias action 正在赶路中')
- end
- function walk_goon()
- antiFlood=""
- EnableTriggerGroup("walk",false)
- EnableTimer('walkwait',false)
- EnableTrigger("hp12",false)
- if tmp.find then
- return searchFunc()
- end
- EnableTrigger("hp12",true)
- create_timer_s('roadWait',road.wait,'path_start')
- end
复制代码
然后定义AntiFloodTimer
- --Anti Flood
- function AntiFloodTimer()
- print('Anti Flood Sucessful! antiFlood='..antiFlood)
- if antiFlood=="" then
- return
- elseif antiFlood=="duCjiang_start"then
- if string.find(locl.room,'长江') then
- check_busy(duCjiang_start())
- else
- walk.make(function()
- wait.time(1)
- check_bei(walk_wait())
- end)
- end
- elseif antiFlood=="duhe"then
- if string.find(locl.room,'渡口') then
- check_bei(duHhe_start())
- else
- walk.make(function()
- wait.time(1)
- check_bei(walk_wait())
- end)
- end
- elseif antiFlood=="hqgzc_askNPC" then
- if flag.find==1 then
- exe('look')
- else
- return walk_wait()
- end
- else
- return _G[antiFlood]()
- end
- end
复制代码 |
评分
-
1
查看全部评分
-
|