About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 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
quigbrew
Novice


Joined: 04 Jun 2002
Posts: 31

PostPosted: Wed Sep 29, 2004 8:40 pm   

capturing single OR multiline text into a variable
 
Hi again,

I've been working on this for a while and haven't figured out a way to do it. I'm trying to capture text into a variable, but sometime the text is wrapped onto the next lines, and sometimes it's just on one line. Anyone know if there's a way to capture text until a certain point, like a period or quotes?

Here's the line I'm trying to capture.

(Order): Bob says, "The following people are at A PURPLE HILL: Joey, Frank, Sammy."

The number of names and the location varies, so if the location title is long, there's a good chance the names will wrap onto the next line. Similarly, if there's a bunch of names, it might wrap onto multiple lines.

Here's the trigger I'm using:
Code:
~(Order~)~: (*) says, "The following people are at (@location)~:


@location will already have the same value as what is being reported by bob.

Anyone have any ideas?
Thanks
Reply with quote
Backu
Novice


Joined: 24 Feb 2003
Posts: 36
Location: USA

PostPosted: Wed Sep 29, 2004 9:12 pm   
 
Use the "" as part of the actual trigger itself, and it will capture everything in it.
_________________
-Backu Zethara
Reply with quote
quigbrew
Novice


Joined: 04 Jun 2002
Posts: 31

PostPosted: Thu Sep 30, 2004 1:48 am   
 
I tried just adding a quotation mark on the end but it's not capturing anything if the sentence is wrapped.

Here's the pattern I tried:

~(Order~)~: * says, "The following people are at @shrdef~:(*)."
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Sep 30, 2004 2:00 am   
 
The order these triggers are created in is essential to their correct operation.
#TR lp {(*)} {#VAR people {@{people}%1}}
#TR {The following people are at @location: (*)} {#T+ lp;#VAR people {%1}}
#TR {.} {#T- lp;#VAR people {%replace( %replace( @people, %char( 34), ""), ., "")}}
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
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