Mapping without Protocalls

Share your scripts and packages with other Mudlet users.
Post Reply
eforen
Posts: 4
Joined: Fri Jan 22, 2016 10:40 pm

Mapping without Protocalls

Post by eforen »

Aloha Everyone!

I have been trying to find a way to setup auto mapping for a mud that does not have any serverside help for pulling room data. I made a regex that would use some help from custom prompts the problem is that I can't get a trigger to bind to it because each line is a new trigger and yeah... Any how I am kinda stumped not sure where to go from here...

Any help would be very much appreciated

I am very skilled with lua and regex so I need some help
\@PmE\@\n(.*)\n *((?s:.*?))Obvious exits:((\n(North|South|East|West|Ne|Nw|Se|Sw) *- *(.*))+?)( *\n)*\@PmS\@
You will notice that some of the room names are the same but are different rooms my current plan is to have the code check for any rooms with the same name in a side database that contains the room numbers if a room name is not in there it just adds it with the next room id available and then adds it to the map otherwise it checks the room desc agenst any other rooms with the same name and so forth.

This is an example of the descriptions I am trying to grab from.
@PmS@ {4AM} [10/10M|10/10P (0/7/7)] Ammo:0/0 @PmE@
l
The Ninth Hell
The outer rim of the Ninth Circle is a trafficway between the many private
rooms that surround it. In the center of the circle is a bar selling a vast
array of drinks, beverages and food. Just west of here is a closeable door,
leading into a private room that has been cut into the bedrock.
Obvious exits:
North - The Ninth Hell
Se - The Ninth Hell
West - A closed door

@PmS@ {4AM} [10/10M|10/10P (0/7/7)] Ammo:0/0 @PmE@
n
The Ninth Hell
The outer rim of the Ninth Circle is lined with private booths, doorways
created for privacy. Behind the doorways could be anything from a ruthless
Yakuza boss, to a joygirl with a client, to the greatest of deckers eating
Renraku's most ruthless IC like candy. This place is considered a neutral
zone amongst the criminal underground, and amongst corporations who are
engaged in shadow wars.
Obvious exits:
North - The Ninth Hell
East - The Ninth Hell
South - The Ninth Hell
West - A closed door

@PmS@ {4AM} [10/10M|10/10P (0/7/7)] Ammo:0/0 @PmE@
e
The Ninth Hell
The Ninth Circle of Dante's Inferno was created from an already existing
cavern deep underground, and has been carved to suit the needs of the
nightclub. Many of the darkest deals are made here in the lowest level,
affecting corporations and crime families alike. Lone Star never shows their
face down here, except to cut a deal.
Obvious exits:
East - The Bottom of the Abyss
West - The Ninth Hell

@PmS@ {4AM} [10/10M|10/10P (0/7/7)] Ammo:0/0 @PmE@
Please help me I am pulling out my hair trying to figure it out...

Mahalo and thank you in advanced!

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Mapping without Protocalls

Post by SlySven »

That is the sort of output you get from a fairly standard DikuMud (or derivative) - it will be helpful to you if you can turn on colouration - then the room names come up in one colour, the description in another and the exits (and other parties in the room in yet more foreground colours. You can then use a sequence of colour based triggers to capture each bit (the description part would use a multi-line trigger and then be ended by the "Obvious exits:" line which in your case starts a series of lines with known start of line contents - and it looks like a blank line to end those - but that might be different if there are other parties present.

eforen
Posts: 4
Joined: Fri Jan 22, 2016 10:40 pm

Re: Mapping without Protocalls

Post by eforen »

SlySven wrote:That is the sort of output you get from a fairly standard DikuMud (or derivative) - it will be helpful to you if you can turn on colouration - then the room names come up in one colour, the description in another and the exits (and other parties in the room in yet more foreground colours. You can then use a sequence of colour based triggers to capture each bit (the description part would use a multi-line trigger and then be ended by the "Obvious exits:" line which in your case starts a series of lines with known start of line contents - and it looks like a blank line to end those - but that might be different if there are other parties present.
Good call yes it is a DikuMud Derivative and Color mode is on how ever how do I get it to do the stuff with the colors? I have never done triggers based on colors also how do I get them to bind together because the room desc is the same color as the chat and some other stuff... Also thank you so much!

I have been trying to get the color trigger stuff to work but I can't seem to get it working and I don't seem to be able to find any help about it online...

eforen
Posts: 4
Joined: Fri Jan 22, 2016 10:40 pm

Re: Mapping without Protocalls

Post by eforen »

eforen wrote:I have been trying to get the color trigger stuff to work but I can't seem to get it working and I don't seem to be able to find any help about it online...
I have gotten almost no where I tried a lot of things and this is the one that got the closest.

This is what I have sofar other then a lot of frustration. I almost rage quit several times.
Image
Trying to trigger on this text/colors.
Image

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Mapping without Protocalls

Post by SlySven »

I think you need a chain (nested triggers) to do this - use the trigger that captures the room name to switch on the (multi-line) room description one which gets switched off by the "^Obvious exits:$" one that switches on the one for the Exits which ends as soon as you get a line that doesn't begin with "West - " or "East - " or whatever (and captures the remainder of the line)... must confess I need one of these for the MUD I once played and keep meaning to get back to but I have been coding so long that I haven't played a MUD for a very long time. 8-(

eforen
Posts: 4
Joined: Fri Jan 22, 2016 10:40 pm

Re: Mapping without Protocalls

Post by eforen »

SlySven wrote:I think you need a chain (nested triggers) to do this - use the trigger that captures the room name to switch on the (multi-line) room description one which gets switched off by the "^Obvious exits:$" one that switches on the one for the Exits which ends as soon as you get a line that doesn't begin with "West - " or "East - " or whatever (and captures the remainder of the line)... must confess I need one of these for the MUD I once played and keep meaning to get back to but I have been coding so long that I haven't played a MUD for a very long time. 8-(
I don't seem to understand how to chain them I tried that it did not work out at all just ended up grabing only the room name as the desc >.<

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: Mapping without Protocalls

Post by Nyyrazzilyss »

I play a diku myself that has 0 support for mapping - No room numbers, non-grid maps, loop/teleports, etc.

I have written a mapping script however for it. A link to the mudlet package can be found at http://www.torilmud.com/phpBB3/viewtopi ... =4&t=25455

You may wish to look at the script to see how I handle the mapper. In particular, I don't create the map in mudlet - I'm using a pre-existing cmud map, and just rendering it in mudlet.

Post Reply