|
楼主 |
发表于 2012-9-1 14:24:09
|
显示全部楼层
我按照官方给的代码
- 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) 是不是这个插件只是一个框架,要自己实现很多代码来调用呢? |
|