![](templates/Classic/images/spacer.gif) |
Shipmate Newbie
Joined: 25 May 2011 Posts: 3
|
Posted: Wed May 25, 2011 5:34 pm
Mapper Help |
Alright in order to solve some issues I'm having with the mapper and the Forgotten Kingdoms MUD I need to create some #TAG triggers that use the ANSI colors to create the room name and description. The rooms look like this:
Tower March
E-Tower March W-High Road
The street is clean and soldier patrol the streets on a regular
basis keeping it safe for its noble denizens. Lanterns hang
above doorways keeping the street well lit. The houses are large
and grand. Shops are few and far between, as are Taverns.
The sky is rainy and a warm southerly breeze blows.
<100%hp 50m 79%mv>
So I need it to recognize the green text as the room name and the gold text as the room description.
How would I go about doing this? I'm brand new to CMUD so dont hestitate to break it down for me, Thanks. |
|
|
![](templates/Classic/images/spacer.gif) |
Mixsel Wanderer
Joined: 02 Feb 2003 Posts: 99 Location: Seattle, Wa
|
Posted: Thu May 26, 2011 2:10 am |
I'm not positive but if you want to capture the ansi code for the room name, just highlight it then make a new trigger, select ANSI trigger first then paste the line in the pattern field.
That would capture the ansi codes, just delete the actual text part so you just have the green ansi code at the begining.
test it with a #ECHO MATCH or something first and if it works #TAG name
not sure about the Exits, might be able to config the mapper to look in room description.
~<&{hp}~%hp would probably be good enough for #TAG prompt
hopefully someone else has some better skills in the mapper and can answer ![Cool](images/smiles/icon_cool.gif) |
|
_________________ Spin |
|
|
![](templates/Classic/images/spacer.gif) |
shalimar GURU
![](images/avatars/114658559147aeed8fee539.gif)
Joined: 04 Aug 2002 Posts: 4685 Location: Pensacola, FL, USA
|
Posted: Thu May 26, 2011 6:16 am |
you might want to give the name a condition to match the exit line....
something like...
Code: |
#TR {the ansi pattern from above} {#TAG Name}
#COND {^{n|ne|e|se|s|sw|w|nw|u|d}-%x} {#TAG exit} {within|param=1} |
|
|
_________________ Discord: Shalimarwildcat |
|
|
![](templates/Classic/images/spacer.gif) |
Shipmate Newbie
Joined: 25 May 2011 Posts: 3
|
Posted: Thu May 26, 2011 6:12 pm |
The only problem I'm having is with the room description. CMUD is including things that arnt part of the description (i.e. weather info, objects, guards, other players). All of these objects appear after the weather which is blue. Is there anyway to have CMUD recognize that the blue text and everything after it are not part of the room description? For example:
Ivory Street
N-Ivory Street S-Ivory Street
The road is heavily traversed and the cobblestones are worn smooth.
However for its careworn appearance the road is well maintained.
Many shops line the way with homes above them. The shops sell all
manner of wares, from food to armour. Interspersed between the shops
are the taverns that are so typical of Waterdeep.
The sky is cool sleeting and a cold northern gust blows.
A soldier of the Wyvern Company patrols here.
<100%hp 70m 96%mv> |
|
|
![](templates/Classic/images/spacer.gif) |
shalimar GURU
![](images/avatars/114658559147aeed8fee539.gif)
Joined: 04 Aug 2002 Posts: 4685 Location: Pensacola, FL, USA
|
Posted: Thu May 26, 2011 6:20 pm |
#TR {The sky is cool sleeting and a cold northern gust blows.} {#NOMAP}
odds are you will want a pattern that captures more weather types
P.S. dont forget to reconfigure the mapper |
|
_________________ Discord: Shalimarwildcat |
|
|
![](templates/Classic/images/spacer.gif) |
Shipmate Newbie
Joined: 25 May 2011 Posts: 3
|
Posted: Thu May 26, 2011 6:43 pm |
I would have to do that for every item, weather condition, and player in the game... Is there anyway to tell the mapper to ignore EVERYTHING below and including the blue line?
|
|
|
![](templates/Classic/images/spacer.gif) |
shalimar GURU
![](images/avatars/114658559147aeed8fee539.gif)
Joined: 04 Aug 2002 Posts: 4685 Location: Pensacola, FL, USA
|
Posted: Thu May 26, 2011 7:22 pm |
from the two messages of weather you have shown...
#TR {The sky is * blows.} {#NOMAP}
Would hit both of them, but i cant be sure all the other messages would.
Something like this for mobs in the room:
#TR {{patrols|stands} here.} {#NOMAP} |
|
_________________ Discord: Shalimarwildcat |
|
|
![](templates/Classic/images/spacer.gif) |
chamenas Wizard
![](images/avatars/602076375506b9fe557f91.gif)
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu May 26, 2011 11:28 pm |
Shipmate wrote: |
The only problem I'm having is with the room description. CMUD is including things that arnt part of the description (i.e. weather info, objects, guards, other players). All of these objects appear after the weather which is blue. Is there anyway to have CMUD recognize that the blue text and everything after it are not part of the room description? For example:
Ivory Street
N-Ivory Street S-Ivory Street
The road is heavily traversed and the cobblestones are worn smooth.
However for its careworn appearance the road is well maintained.
Many shops line the way with homes above them. The shops sell all
manner of wares, from food to armour. Interspersed between the shops
are the taverns that are so typical of Waterdeep.
The sky is cool sleeting and a cold northern gust blows.
A soldier of the Wyvern Company patrols here.
<100%hp 70m 96%mv> |
You have it capture the blue line, and have the trigger turn off immediately upon firing.
Conditionals work here, but I would be tempted to simply have a trigger find out if we're in a room, have that turn on a new trigger. The new trigger checks for ansi blue, captures what you need in the line while turning itself off and turning your room finding trigger back on. Voila. |
|
|
![](templates/Classic/images/spacer.gif) |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri May 27, 2011 1:39 am |
Another possibility is to see whether your mud has an option to turn off internal linewraps. If it does, turn it off and see whether the description is all one line. If so, you can tell Cmud that the description will just be one line long.
|
|
|
![](templates/Classic/images/spacer.gif) |
|
|