|
发表于 2018-5-21 19:38:18
|
显示全部楼层
测试过不少办法,都不怎么靠谱。 目前可以用这个稍微节省点look地点的时间,大概每次go能节省1秒多吧,sId 可以填可以不填,填 比如huanghe/road3 就直接按照这个走,不look当前地点了。用于各种ask job的时候
function go(job,area,room,sId)
--map.rooms["sld/lgxroom"].ways["#outSld"]="huanghe/huanghe8"
tmp.goto = nil
sour.id=sId
dest.id = nil
if area~=nil then
dest.area=area
end
if room~=nil then
dest.room=room
end
if string.find(dest.area,"/") then
dest.id = dest.area
--Note(dest.id)
dest.room = map.rooms[dest.id].name
--Note(dest.room)
end
if job==nil then
job=test
end
flag.find=0
flag.wait=0
road.act=job
road.i=0
flag.dw=1
tmp.find = nil
if sour.id ~= nil then
return check_busy(path_consider)
else
return check_halt(go_locate)
end
end |
评分
-
1
查看全部评分
-
|