|
boy_icon Newbie
Joined: 07 May 2009 Posts: 7
|
Posted: Fri Jan 20, 2012 3:28 am
Capturing exits |
I am having trouble capturing the exits in any given room (while keeping it robust and consistent). The mapper doesn't do a good job of seeing the exits. Here are the conditions:
The exits are mixed in the room description.
The exits span multiple lines, dependant on the surrounding text in the paragraph
The exits are always between "You can progress (exits here)" and the next period. So only one sentence.
Here is an example:
Code: |
Rear of the main entrance hall
You stand in the southern part of the entrance hall, directly below the main
staircase that dominates this room, although you would need to move north
around the staircase to its foot if you wished to ascend it. The walls of the
hallway are panelled in oak, interrupted only by doors in each wall providing
access deeper into the mansion, while between the doors hang a row of
pictures, former heads of the Forsaken guild depicted in them, their haughty
stares seeming almost to weigh up whether you are worthy to stand here, the
line of pictures continuing further along the hall to the north. You can
progress north, east (an open door), south (an open door) and west (an open
door).
120/120h 0/15m > |
I am able to do as much as find the period, but the #TAG command needs something more useful than this. It needs the whole sentence, since the line with the period may not hold any relevant information, as in the above example.
I searched the site and came up with nothing useful. Can anybody point me in the right direction? |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Jan 20, 2012 2:22 pm |
First question: does your mud have an option to turn off internal line wrapping? If it does, turn internal wrapping off and let Cmud handle line wrapping. By doing this, you will turn the entire paragraph into a single line that Cmud can parse, making it much easier.
If you can't turn off internal line wrapping, you will have to grab the entire description paragraph through triggers and turn it into a single line yourself before parsing out the exits. |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|