找回密码
 注册
搜索
楼主: noob@tj

嵩山任务问题

[复制链接]
门派:嵩山派
 楼主| 发表于 2019-3-7 19:24:36 | 显示全部楼层
<!-- Produced by MUSHclient v 4.84 --->


north
alias action 正在赶路中
> 土路 - northwest、southeast、west
TRACE: Matched trigger hp12
TRACE: 正在执行 trigger 脚本 "resetWait"
  钢刀(Blade)
TRACE: Matched trigger hp12
TRACE: 正在执行 trigger 脚本 "resetWait"
  夜行衣(Yexing yi)
TRACE: Matched trigger hp12
TRACE: 正在执行 trigger 脚本 "resetWait"
> 你把 "action" 设定为 "正在赶路中" 成功完成。
TRACE: Matched trigger walk1
TRACE: 正在执行 trigger 脚本 "walk_goon"
west
alias action 正在赶路中
> 土路 - north、northwest、southeast
TRACE: Matched trigger hp12
TRACE: 正在执行 trigger 脚本 "resetWait"
  慕容图书馆大理分馆「少林领悟达摩院后殿」本鹰(Sbkwd)
TRACE: Matched trigger hp12
TRACE: 正在执行 trigger 脚本 "resetWait"
  「赶路中」美猴王(Monking)
TRACE: Matched trigger hp12
TRACE: 正在执行 trigger 脚本 "resetWait"
  神龙教第二代弟子 十字路口(Rrrr) <战斗中>
TRACE: Matched trigger hp12
TRACE: 正在执行 trigger 脚本 "resetWait"
  江南护院 余曼玉(Yu manyu) <战斗中>
TRACE: Matched trigger hp12
TRACE: 正在执行 trigger 脚本 "resetWait"
  薛格格(Beauty)
TRACE: Matched trigger hp12
TRACE: 正在执行 trigger 脚本 "resetWait"
  独行大侠(Duxing daxia)
TRACE: Matched trigger songshanFind1
TRACE: 正在执行 trigger 脚本 "songshanTarget"
halt
follow duxing daxia
kill duxing daxia
set wimpycmd pfmpfm\hp
set wimpy 100
  邓蓉春的尸体(Corpse)
TRACE: Matched trigger hp12
TRACE: 正在执行 trigger 脚本 "resetWait"
  丐帮帮众 中年乞丐(Qi gai)
TRACE: Matched trigger hp12
TRACE: 正在执行 trigger 脚本 "resetWait"
> 你把 "action" 设定为 "正在赶路中" 成功完成。
TRACE: Matched trigger walk1
TRACE: 正在执行 trigger 脚本 "walk_goon"
> 薛格格面露娇羞之色,悄悄的低下头去。
蓝田 - north、southeast
> 你把 "action" 设定为 "正在赶路中" 成功完成。
> 官道 - north、south、west
> 你把 "action" 设定为 "正在赶路中" 成功完成。
> 蔡邕庄 - east、north
  腐烂的男尸(Nan shi)
> 你把 "action" 设定为 "正在赶路中" 成功完成。
> 你现在不忙。
> 这里没有 duxing daxia。
TRACE: Matched trigger songshanFight3
TRACE: 正在执行 trigger 脚本 "songshanLost"
wield tiandi whip
i
remove biao
jiali max
yield no
unwield tiandi whip 1
uweapon shape zhanlu sword
unwield sword
unwield dagger
unwield whip
unwield xiao
unwield ansha bishou
unwield shizi
unwield coin
i
wield tiandi whip
i
bei none
jifa hand songyang-shou
bei hand
set wimpycmd pfmpfm\hp
set wimpy 100
yield no
yun huti
halt
> 这里没有这个人。


门派:嵩山派
 楼主| 发表于 2019-3-7 19:25:37 | 显示全部楼层
独行大侠(Duxing daxia)
TRACE: Matched trigger songshanFind1
TRACE: 正在执行 trigger 脚本 "songshanTarget

有触发但是没有停下来。所以走过了。嵩山任务早job.lua 里面
门派:明教
发表于 2019-3-7 19:55:06 | 显示全部楼层
  独行大侠(Duxing daxia)
TRACE: Matched trigger songshanFind1--嵩山任务触发器正常触发了,下边指令也出来了
TRACE: 正在执行 trigger 脚本 "songshanTarget"
halt
follow duxing daxia
kill duxing daxia
set wimpycmd pfmpfm\hp
门派:明教
发表于 2019-3-7 19:56:15 | 显示全部楼层
  邓蓉春的尸体(Corpse)
TRACE: Matched trigger hp12
TRACE: 正在执行 trigger 脚本 "resetWait"
  丐帮帮众 中年乞丐(Qi gai)
TRACE: Matched trigger hp12
TRACE: 正在执行 trigger 脚本 "resetWait"
> 你把 "action" 设定为 "正在赶路中" 成功完成。--这个赶路中是walk_wait()里的,是让你的机器人停下来,做出响应
门派:明教
发表于 2019-3-7 19:58:59 | 显示全部楼层
接下来调用函数——

function walk_goon()
        flag.walk=1
    EnableTriggerGroup("walk",false)
    EnableTimer('walkwait',false)
        EnableTrigger("hp12",false)
        if tmp.find then
       return searchFunc()--如果是搜索状态,会继续调用searchFunc()
        end
        EnableTrigger("hp12",true)
    create_timer_s('roadWait',road.wait,'path_start')
end
门派:明教
发表于 2019-3-7 20:02:30 | 显示全部楼层
function searchFunc(path)
        --Note("run searchFunc")
    if flag.find==1 then return end
    if flag.wait==1 then return end
--这2个情况下,就会返回,一个是找到目标,一个是等待标记启动。
    road.pathset = road.pathset or {}
门派:明教
发表于 2019-3-7 20:04:18 | 显示全部楼层
function songshanTarget(n,l,w)
    EnableTriggerGroup("songshanFind",false)
    EnableTriggerGroup("songshanFight",true)
    EnableTrigger("hpheqi1",true)
    flag.wait=0
    flag.find=1
--嵩山函数找到目标后,设置flag.find=1,这就应该停下了啊!
    thread_resume(lookfor)
    job.id=string.lower(w[2])
    job.killer[job.target]=job.id
    exe('halt;follow '..job.id)
    if job.type and job.type=="qing" then
       killPfm(job.id,"qing")
    else
       killPfm(job.id)
    end
end
门派:明教
发表于 2019-3-7 20:08:42 | 显示全部楼层
function walk_wait()
       EnableTriggerGroup("walk",true)
           EnableTrigger("hp12",true)
           if tmp.find then
                 create_timer_s('walkWait',0.4,'walkTimer')--你看看是不是等待时间太短了?机器人来不及反应?公版是0.5秒等待,我用的是0.4,如果你的比这个时间还短,就会来不及反应
                  if cntr1() > 0 then
                     exe('alias action 正在赶路中')
                  else
                     cntr1 = countR(15)
                  end
           else
             create_timer_s('walkWait',0.1,'walkTimer')
           end
end
门派:嵩山派
 楼主| 发表于 2019-3-7 20:28:42 | 显示全部楼层
非常感谢, 我回去试试
门派:嵩山派
 楼主| 发表于 2019-3-8 05:52:00 | 显示全部楼层
create_timer_s('walkWait',0.4,'walkTimer')-- 提高到0.5 然后重新打开mush后回复正常。
非常感谢。不然300次任务永远做不完
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|书剑永恒MUD ( 闽ICP备14012032号|闽公网安备 35050202000162号 )

GMT+8, 2025-6-9 01:01 , Processed in 0.029188 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表