Generic Mapping Script

All and any discussion and development of the Mudlet Mapper.
Posts: 2
Joined: Fri Jun 19, 2020 6:09 am

Re: Generic Mapping Script

Post by Tehuti »

Vadi wrote:
Fri Jun 19, 2020 1:19 pm
The ignore command uses Lua patterns, so try

Code: Select all

map ignore ^You walk .+
Thank you! I learned something new too.

Posts: 1
Joined: Wed Aug 26, 2020 12:27 am

Re: Generic Mapping Script

Post by Taneg »

I have something of a newbie question to this script--I've tweaked it to capture the prompt and room exits on the MUD I play well, but I keep running into an issue with capturing the room name. The MUD I'm playing usually but not always has the first line after the prompt as the room name. A large number of system messages ("you wade out into water," "you're getting hungry", etc) frequently are the first line after the prompt though and get mistaken for the room name, messing up any map that's been made. There are far too many to make adding ignore filters for all of them viable.

I did notice that the room names are always one of a handful of colors, so I created a few color triggers to try and capture the room name that way. The code I've been using on a foreground color match is:

Code: Select all

if not map.prompt. name then
   map.prompt. name = true
   map.prompt. room = matches[1]
Since there's other text in between prompts that can be the same colors (e.g. exits and room names can both be magenta) the idea is to set map.prompt. name at the first "catch" of the text color so that map.prompt. room can't be overwritten if the color appears a second time. Either way it's not working and I'm still always getting the first line after the prompt saved as the room name. (Also there are no spaces in those variable names)

I feel like I'm missing something obvious here--any suggestions? I'm a rank LUA beginner unfortunately.

Posts: 2
Joined: Tue Sep 29, 2020 2:10 pm

Re: Generic Mapping Script

Post by jtg0285 »

Is there any way to make the generic mapping script look at gmcp info for the room name or perhaps capture part of the room description to help differentiate the rooms? I am playing AVATAR MUD and the room names are very commonly duplicated, which makes the script get confused and keep adding rooms where they don't belong. Here is an example of a GMCP room info:

RoomInfo {
"name":"Approaching Wayward Marina, Unofficial \"Bank\"",
"zone":"{23 30} Zahri Mervue",

Posts: 24
Joined: Sun Jul 26, 2020 1:39 am

Re: Generic Mapping Script

Post by breakone9r »

Use the IRE mapper script, it uses gmcp. The generic one uses triggers, rather than gmcp events.

Post Reply