it's loosely based on Omit's and Heiko's mappers. thank you both for giving me something to start with.
it works as follows:
an eventhandler catches all commands that could be moves.
triggers are set up for failure of movement, ex: You are too exhausted.
a chained color-trigger triggers on the room name, which then grabs the room's description and the exits.
this last one starts the main script: onRoomInfo()
this script will check if it the room is already mapped end otherwise will create a new room.
it then also makes additional "fake"-rooms,(in dark purple!) just to make you aware of unvisited rooms.
these fakes will be deleted if you use the exit on which they are connected to.
rooms are saved with roomname and full description combined.
exits are only saved on the room you come from. this is done because of possible one way exits.
So if you want to have a very complete map you will have to use every exit of every room at least once.
there is a whole bunch of alias's with which you can move a single room or even groups of rooms.
and also some aliases and triggers that color rooms.
better check these out so they won't interfere with any other alias's you are using!
some known issues:
- it doesn't work in "brief" mode. it could be done though with some extra scripting.but then only in a fully mapped world. you would need to depend on getExitsFromID alot.
- it grabs the room description but doesn't add an extra space at the end of the line. so grammar is dead.
since i had it like this from the start it would force me to redo all my mapping so far. so i kept it like this.
- it's important to have the "get Room Description"-trigger on top of the list. just to make sure no other triggers change the room's description before grabbing it.
- when you're blinded the map can't help you. nothing implemented for that yet.
- one-way exits ain't visually different than normal connections.
- also i'm still waiting for room userdata to be working so i can store doornames
- it could be that more triggers are needed!
- colors are still to be worked on.
- area's are not used optimally.
- if you come from a dark room into a lighted unmapped room it creates a room at 0,0,0 coords. (around EF..) it's kinda annoying at times.
-my level of scripting is far from perfect so this is just a rough working version for the time being.
So: do NOT expect everything to work as expected ;P
- As further updates of mudlet will hopefully include changes to some mapper functions, things could be done much better in the future. and it may be that you will have to remap everything by then. (be warned)
- tons of silly echo messages in there too
if you have any questions or improvements or comments, please post them here.
any advice on the scripting is very welcome! (probably lots of silly/bad coding in there)
how to get it started is really simple.
OR you change your color settings so that room descriptions are shown in pure white.
OR click on the Triggers, find the "roomdescget" trigger inside the "get Room Description"folder and change the 5th line in the script of that trigger:
so that it matches the color you use.if r == 255 and g == 255 and b == 255 then
click the map icon in the toolbar, drag it open and then just start moving and whenever a room is detected that is unknown it will create that room. if no echos after the obvious exits appear then make sure the color trigger inside the "get Room Description" folder has the correct color.
all rooms are standard green. except rooms with any kind of "road" word in its room name.
if a new room is made and it turns yellow than that means there is already another room at the same coords. so you would have to move some around.
some basic commands to control the map:
- mm "dir" =move the current room in any direction.examples: "mm n" will move the room 1 north. "mm se" will make it move it to the southeast.
- mri =make room inside. will turn the color of the room to grey. this happens automatically when trying to ride a horse inside a house. There are more alias's or triggers like this.
- mrn = make room normal. will turn the color of the room to standard green.
- collectid =collects all rooms that can be reached through mapped exits starting with the room you are in.
- mfix =adds this room's id to a table so it wont get collected with the collectid command
- colud "true/false" =if set to true collectid will continue collecting when encountering up/down exits. if set to false it will not do that and only collect rooms on the same level.