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

2次划定圆心,解决襄阳城空地搜索问题!

[复制链接]
门派:天龙寺
发表于 2019-2-22 00:18:38 | 显示全部楼层
但是现在公版的lujing文件好像无法顺利进出这个迷宫
门派:明教
发表于 2019-2-22 14:45:11 | 显示全部楼层
刚看到,这个不错哈                                       
门派:桃花岛
 楼主| 发表于 2019-2-22 14:58:28 | 显示全部楼层
xlang@tj 发表于 2019-2-22 00:18
但是现在公版的lujing文件好像无法顺利进出这个迷宫

用岛主的襄阳树林code就行!
门派:桃花岛
发表于 2019-2-22 16:30:50 | 显示全部楼层
呃,要改这么多,太深奥了。
门派:天龙寺
发表于 2019-2-22 20:06:54 | 显示全部楼层
liumaisj@tj 发表于 2019-2-22 14:58
用岛主的襄阳树林code就行!

我试过岛主的code,好像有点水土不服,可否发个链接过来,谢谢!
门派:明教
发表于 2019-2-22 22:35:26 | 显示全部楼层
xlang@tj 发表于 2019-2-22 20:06
我试过岛主的code,好像有点水土不服,可否发个链接过来,谢谢!

lujing.lua

function goXtj()
   exe('n')
   if flag.find==1 then return end
   locate_finish='goxtjck'
   return fastLocate()
end
function goxtjck()
   locate_finish=0
   if flag.find==1 then return end
   wait.make(function()
        wait.time(0.15)
   if locl.room_relation=='山路|树林-----树林-----树林|树林树林' or locl.room_relation=='山路↑山路|山路山路' then
           return goXtjOver()
   end
   if locl.room_relation=='山路|山路↘山间空地山路' then
       exe('n')
       return goXtj()
   end
   return goXtjGo()
   end)
end
function goXtjGo()
    local l_set={'e','s','w','n'}
    local l_cnt=math.random(1,table.getn(l_set))
    exe(l_set[l_cnt])
    --fastLocate()
    --check_halt(goXtjCheck)
        return goXtj()
end
function goXtjOver()
    EnableTriggerGroup("goxtj",false)
    DeleteTriggerGroup("goxtj")
    walk_wait()
end
function outXtj()
   exe('s')
   if flag.find==1 then return end
   locate_finish='outxtjck'
   return fastLocate()
end
function outxtjck()
   locate_finish=0
   if flag.find==1 then return end
   wait.make(function()
        wait.time(0.1)
   if locl.room_relation=='山路|树林-----树林-----树林|树林树林' or locl.room_relation=='山路↑山路|山路山路' then
           exe('s')
           return outXtj()
   end
   if locl.room_relation=='山路|山路↘山间空地山路' or locl.room_relation=='树林|树林-----树林-----树林|山路树林' then
       exe('s')
       return outXtjOver()
   end
   return outXtjGo()
   end)
end
function outXtjGo()
    local l_set={'e','s','w','n'}
    local l_cnt=math.random(1,table.getn(l_set))
    exe(l_set[l_cnt])
        return outXtj()
end
function outXtjOver()
    walk_wait()
end
门派:明教
发表于 2019-2-22 22:38:07 | 显示全部楼层
xlang@tj 发表于 2019-2-22 20:06
我试过岛主的code,好像有点水土不服,可否发个链接过来,谢谢!

rooms

Room {
        id = "gumu/xuantie/linhain",
        name = "树林",
        ways = {
                ["#goXtj"] = "gumu/xuantie/dongkou",
                ["#outXtj"] = "gumu/xuantie/xiaolu4",
        },
        nolooks = {
                ["east"] = true,
                ["west"] = true,
                ["south"] = true,
                ["north"] = true,
        },
}
Room {
        id = "gumu/xuantie/linhain1",
        name = "树林",
        ways = {
                ["south"] = "gumu/xuantie/linhain1",
                ["north"] = "gumu/xuantie/linhain2",
                ["east"] = "gumu/xuantie/linhain1",
                ["west"] = "gumu/xuantie/linhain1",
                ["#outXtj"] = "gumu/xuantie/xiaolu4",
        },
        nolooks = {
                ["east"] = true,
                ["west"] = true,
                ["south"] = true,
                ["north"] = true,
        },
}
Room {
        id = "gumu/xuantie/linhain2",
        name = "树林",
        ways = {
                ["south"] = "gumu/xuantie/linhain2",
                ["north"] = "gumu/xuantie/linhain2",
                ["east"] = "gumu/xuantie/linhain3",
                ["west"] = "gumu/xuantie/linhain2",
                ["#outXtj"] = "gumu/xuantie/xiaolu4",
        },
        nolooks = {
                ["east"] = true,
                ["west"] = true,
                ["south"] = true,
                ["north"] = true,
        },
}
Room {
        id = "gumu/xuantie/linhain3",
        name = "树林",
        ways = {
                ["south"] = "gumu/xuantie/linhain3",
                ["north"] = "gumu/xuantie/linhain3",
                ["east"] = "gumu/xuantie/linhain3",
                ["west"] = "gumu/xuantie/linhain3",
                ["#outXtj"] = "gumu/xuantie/xiaolu4",
                ["#goXtj"] = "gumu/xuantie/dongkou",
        },
        nolooks = {
                ["east"] = true,
                ["west"] = true,
                ["south"] = true,
                ["north"] = true,
        },
}

Room {
        id = "gumu/xuantie/xiaolu4",
        name = "山路",
        ways = {
                ["southeast"] = "xiangyang/conglin4",
                --["north"]     = "gumu/xuantie/xiaolu1",
                ["north"]     = "gumu/xuantie/linhain1",
                },
        nolooks = {
                ["north"] = true,
                --["n"] = true,
        },
        lengths = {
                --["north"] = "if score.party and score.party=='古墓派' then return 1 else return false end",
                        --["n"] = "if score.party and score.party=='古墓派' then return false else return 1 end",
                },
                room_relative='山路|山路↘山间空地山路',
}
门派:武当派
发表于 2019-2-23 09:00:16 | 显示全部楼层
学习了,这个真的非常好用
门派:铁掌帮
发表于 2019-2-23 09:13:52 | 显示全部楼层
看了半天才明白一点儿,这个思路真巧妙
门派:天龙寺
发表于 2019-2-23 20:05:39 | 显示全部楼层

收到,多谢了!!!                              
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-6-8 22:47 , Processed in 0.043943 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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