map drawer (pre-alpha)

Share your scripts and packages with other Mudlet users.
Post Reply
onetimeonly
Posts: 5
Joined: Wed Jul 21, 2010 4:26 am

map drawer (pre-alpha)

Post by onetimeonly »

Don't know if this is the right forum or not, but anyways.

I made a little coordinate-based map-drawer for those in muds that don't send you any maps.

What it does:
You type in
>mapwin somewindowname
and it creates a miniconsole.
Then you type in
> ms
and it creates and displays a lua table (used as a [28][58] array).
Then you type in
> mapdraw somewindowname 0 0 0 0 0 0
And it draws a neat little thingy on the mini-console!

The mapdraw alias works as follows:
> mapdraw <console_name> <x> <y> <n> <s> <w> <e>
console_name: name of the window you chose
x: coordinate x of the room you want, accepts negative or positive integers
y: coordinate y of the room you want, accepts negative or positive integers
n: does the room have an exit to the north? 1 if yes, 0 if no.
s: does the room have an exit to the south? 1 if yes, 0 if no.
w: does the room have an exit to the west? 1 if yes, 0 if no.
e: does the room have an exit to the east? 1 if yes, 0 if no.
Typing "ms" again will allow you to clear the map.

Finer points:
- It's an ugly hack
- Only n,s,w,e, no fancy directions, no u-d
- All values are fixed
- Lots of ugly debug/misc code left in it
- it's bad up and down
- not gonna update, probably
- forgot to add an option to say if the char is in the room.............
I know there's an automapper feature coming out, just thought I'd share this in the meantime, just for the heck of it.

Image


autom_for_show_only.xml.xml.xml
(8.96 KiB) Downloaded 340 times

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: map drawer (pre-alpha)

Post by Vadi »

neat

Post Reply