请问有人用过mapper.lua吗
最近看官方的mapper.lua很棒。我想问问这个是需要自己调用它画地图?还是通过设置就可以工作了?这个里面包括寻路算法和数据库结构吗?
还是只起到图形化作用,需要自己做好地图数据库再调用呢
北大侠客行MUD,中国最好的MUD 我按照官方给的代码
require "mapper"
config={}
function get_room (uid)
local room = load_room_from_database (uid)
if not room then
return nil-- room does not exist
end -- if
room.hovermessage = room.name -- for hovering the mouse
-- desired colours
room.bordercolour = ColourNameToRGB "lightseagreen"
room.borderpen = 0 -- solid
room.borderpenwidth = 1
room.fillcolour = ColourNameToRGB "green"
room.fillbrush = 0 -- solid
-- obviously you would look these up in practice
room.area = "Darkhaven"
room.exits = { n = 21001, s = 21002, se = 21003 }
return room
end -- function
mapper.init { config = config, get_room = get_room, show_help = OnHelp, room_click = room_click}
mapper.mapprint (string.format ("MUSHclient mapper installed, version %0.1f", mapper.VERSION))
可以出现一个地图窗口。但是如何画地图,还有指定地图的数据库结构呢?
我看到有个mapper.draw(uid) 是不是这个插件只是一个框架,要自己实现很多代码来调用呢? 竟然无人解答。。。
mush高手们快快现身~
页:
[1]