Page 1 of 4

(mapping script) Base Mapping script for LP muds

Posted: Tue Jan 25, 2011 2:17 am
by Omit
Here is my working copy of my mapper....(very rough at the moment but works)

I apologize that it is not commented better.
The room trigger will be MUD specific and the one that is setup is for The Two Towers (brief mode on and the room glance is set to have a background color in order to identify rooms more accurately)
Only one movement alias is setup (any command preceded by a capital O and a space will pass through the mapper.. example: O north or O climb boulder)... but it will now use the last command sent to the mud as the movement command if a new room is received without the movement being specified

Trigger created to allow map to work when following the leader of a party and to track your movement when using 'wimpy'(run from battle when HP gets low)
Trigger created to capture movement fails

I am not happy with my colors it uses, your location is not stored (so is useless after you close mudlet and reopen,,, the map doesn't know where you are and will screw up), I don't think the color table is being saved yet....Color table is being saved in a database, as is the last room ID created and last color id created... when logging out and logging back in, it puts you in a 'Lost' mode(does not map) and tries to find the room you are in by the room name(considered found when you enter a room that has a unique room name)... if it finds it, the map starts working again
A new alias was added, Omove dir (example: Omove s, this moves the room you are currently in south on the map.) Mapper will now map the return dir(to last room visited) when you map a new room if it is clear what dir that is.
Added event handlers to handle the loading and saving of tables.
Map now uses 13 rooms for placeholders not just one(3d map will display the unmapped exits)

In short, this is still incomplete but.... it does map and seems to do so reliably.... and will give those that need a good place to start an example to look at, I will update this in the weeks and months to come.... If you have any questions, I will do my best to answer them.

Updated file on 2/3/2011, all updates in red... P.S. I make no guarantee that the same map file will work from update to update
Updated file on 2/5/2011, all updates in blue...getting close... only a couple more things are needed(functions to merge rooms, to change areas, color functions need reworked)
Updated file on May 6th, 2011, script will register itself as a mapping one so Mudlet will know

Re: Base Mapping script for LP muds

Posted: Fri Jan 28, 2011 7:45 am
by Omit
One minor error(so far)

if the function 'NewDirs' (in the process_map_data script)...
the line
Code: [show] | [select all] lua
			addSpecialExit( id, 1, X )
should be
Code: [show] | [select all] lua
			addSpecialExit( id, 1, command )
all for now... when I have more significant changes I will repost the entire thing.

Re: Base Mapping script for LP muds

Posted: Tue Feb 01, 2011 7:12 am
by killergate

Im curious as to how I'll get this working on the current LPmud Im playing on. I've changed the trigger to grab the short_room description from my mud, but that doesnt seem to be enough. Any hints?


Re: Base Mapping script for LP muds

Posted: Tue Feb 01, 2011 8:40 pm
by Omit
are you sending the movement commands through the mapper? (only have one way to do it.... precede any movement command with an 'O ', example: O north)

The mapper only begins to process and display the map if it has a movement/room pair.
(the posted script is incomplete and does not restore correctly yet, this means you will need to delete the map file and the database files that are created or start with an empty profile, I have fixed this in a local version but have not posted it yet. I will post it soon but it is still not a finished product.)

Re: Base Mapping script for LP muds

Posted: Tue Feb 01, 2011 8:47 pm
by Vadi
Omit, you could fix it so that people on 1.2.0-pre5+ who have the 'sysDataSendRequest' event wouldn't need to do it - that event is raised, with the command, whenever anything is sent to the MUD (either via send or command line)

Re: Base Mapping script for LP muds

Posted: Tue Feb 01, 2011 9:16 pm
by Omit
Thank you Vadi, I will look at that (was just looking for an event or any way to track commands). With the right logic and a couple timers, I should be able to isolate the movement commands without the need for any aliases.(That will make the whole thing a lot more user friendly)

Re: Base Mapping script for LP muds

Posted: Tue Feb 01, 2011 9:20 pm
by Vadi
That's the idea...

Re: Base Mapping script for LP muds

Posted: Fri Feb 04, 2011 1:15 am
by Omit
Updated file on 2/3/2011 and with this post the thread will show as new as well.

Re: Base Mapping script for LP muds

Posted: Fri Feb 04, 2011 2:48 am
by syrik
Hrm, the startmapper script says this when I try to activate it:

..."]:15: attempt to index field '?' (a nil value)

Re: Base Mapping script for LP muds

Posted: Fri Feb 04, 2011 3:51 am
by Omit
really? what version of mudlet are you running? (also might be a good idea to start with a fresh profile)