Re: wbgmapper -- and another setup question
Bartosz <[email protected]> Sat, 13 Aug 2005 23:35:46 +0200
| Newsgroups | gmane.comp.games.mud.client.lyntin |
|---|---|
| Message-ID | <[email protected]> |
Dnia sobota, 13 sierpnia 2005 15:28, Ned Imming napisaĆ:
> I just starting using lyntin again. I am interested in using wbgmapper
> but I am having a hard time find an easy setup guide. Do you know of one?
i'm useing wbgmapper for some time and i wrote some functions for me, i didn't publish them because i'm not good in python programing and i want to polish them firs
you can allways get help on mapper commands with #help wbgmapper
short wbgmapper guide:
1. creating map
1.1. starting mapper
#mstart
1.2. make map by adding room's
#madd [X:INT] [Y:INT] where x and y are room coordinates
example for automatic adding location which is at south-west from the location you are in:
#alias {VK_NUMPAD1} {sw;#math {x} {$$x-1} {1};#math {y} {$$y-1} {1};#madd $$x $$y;#mmove -1 -1} {1} <-- in that form you can save it in your config
or
#alias {VK_NUMPAD1} {sw;#math {x} {$x-1} {1};#math {y} {$y-1} {1};#madd $x $y;#mmove -1 -1} {1} <-- this you can put directly into lyntin
1.3. setind location exits
#msetexits [<EXITS>]
example:
#msetexits {e,w,sw}
1.4. save map with
#msave [MAPNAME]
2. walking on map
2.1. stoping mapper if it was started
#mstop
2.2. loading map
#mload [MAPNAME]
2.3. moving from one location to another
#mmove [X:INT] [Y:INT]
2.4. seting coordinates after you load map but you are standing in diferent location than that on map
#msetcoord [X:INT] [Y:INT]
you have to save this code into wbgmapper.py:
def msetcoord_cmd(ses, args, input):
"""
Sets coordinates.
category: mapper
"""
global mapper
x = int(args['x'])
y = int(args['y'])
if mapper._map.has_key((x, y)):
mapper._x = x
mapper._y = y
vm = exported.get_manager("variable")
vm.addVariable(ses, "x", mapper._x)
vm.addVariable(ses, "y", mapper._y)
exported.write_message("coordinates set to x%s, y%s." % (mapper._x, mapper._y))
else:
exported.write_error("wrong coordinates: room x%s, y%s doesn't exist." % (x, y))
commands_dict["msetcoord"] = (msetcoord_cmd, "x= y=")
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf