Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
billaben
Wanderer


Joined: 02 Sep 2005
Posts: 60

PostPosted: Sun Sep 11, 2005 12:12 am   

More problems with capturing text
 
I thought I had this working. *cries* Until I noticed what it did to these two paragraphs. Apparently a quote mark will foul things up still.

Pay close attention to the quotation marks.

Code:
On a long wooden desk nearby sit several order forms detailing flavours and
quantities of donuts to be delivered each day by the local pastry girl. On
the wall just behind this, apparently a jest of questionable humor, a
skeleton smiles from behind a glass window, and a plaque boasts: "the late
baker, who ran out of donuts too fast".

An ornate weapon rack sits against the opposite wall, holding polearms of
many different shapes and sizes. There is a space where one, apparently the
occupant's favoured weapon, is missing.


The Text from the mud, meets the script....


Code:
#TRIGGER {^%e[44m(*)%e[0m$} {
  #VAR DescLine %concat( %literal( "%1"), "%lf")
  #TAG desc @DescLine
  #COLOR "#80FFFF,#000080"
  } "" {color}
#TRIGGER {^$} {
  #VAR DescLine {%lf}
  #TAG desc {@DescLine}
  }


And turns it into....

Code:

On a long wooden desk nearby sit several order forms detailing flavours and
 quantities of donuts to be delivered each day by the local pastry girl. On
 the wall just behind this, apparently a jest of questionable humor, a
 skeleton smiles from behind a glass window, and a plaque boasts: the late"%lf baker, who ran out of donuts too fast."%lf
 An ornate weapon rack sits against the opposite wall, holding polearms of
 many different shapes and sizes. There is a space where one, apparently the
 occupant's favoured weapon, is missing.


I've again tried every thing I could think of to simply make it keep the string without it being hacked to ribbons by zMUD and am out of ideas, AGAIN. *sigh*

*Cries* Why zMUD!? Why do you hate me so!?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Sep 11, 2005 10:30 am   
 
Code:
#TRIGGER {^%e[44m&DescLine%e[0m$} {
  #VAR DescLine {%concat( %replace(@DescLine,%char(34),"'"), %crlf)}
  #TAG desc @DescLine
  #COLOR "#80FFFF,#000080"
  } "" {color}
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
billaben
Wanderer


Joined: 02 Sep 2005
Posts: 60

PostPosted: Sun Sep 11, 2005 6:21 pm   
 
Oooh.... This looks nice...

However, you trimmed out my %literal function which is going to actually cause more problems than it solves. I really need to eliminate ALL problems with special characters.

Hummmmmm......
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net