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
Theragil
Apprentice


Joined: 13 Feb 2004
Posts: 157
Location: USA

PostPosted: Fri Mar 12, 2004 7:09 pm   

Capturing multi-line chats
 
I'm using a trigger like this:

^~(Sentinels~)~: &sChanName &sChanVerb, "&sChanText"$

To capture and store channel chats like this:

(Sentinels): Someone says, "Hello!"

I'd like to also be able to catch multi-line versions of the same, like:

(Sentinels): Someone says, "Hello! I was wondering if anyone
knows what the status of this year's wilderness patrols is, since
mine isn't ready yet."

What's the best way to do this, and be able to handle numbers of lines up to, say, six, for each of a half-dozen channels?
Reply with quote
quicksilver85
Beginner


Joined: 16 Jan 2004
Posts: 15
Location: USA

PostPosted: Sun Mar 14, 2004 8:14 am   
 
Try this:

Pattern: ^((.*)):(.*)says, "
Command: #t+ cap

Class cap:
Pattern: (*)
Command: #Capture <window name>

Pattern: (whatever your prompt is)(Your on achaea yes?)
Command: #t- Cap


That should work for you, holler if it don't.
Reply with quote
Theragil
Apprentice


Joined: 13 Feb 2004
Posts: 157
Location: USA

PostPosted: Sun Mar 14, 2004 4:11 pm   
 
That appears to be redirecting text into a window, which isn't what I'm trying to do at all.

Seems like the implication, though, is it's not possible to make a trigger which captures a multi-line chunk of text into a variable, so I'll have to use a similar approach to build the text up manually line by line.

(And actually, Aetolia, but close enough.)
Reply with quote
Kaine
Beginner


Joined: 04 Feb 2002
Posts: 21
Location: Ireland

PostPosted: Sun Mar 14, 2004 10:36 pm   
 
I had trouble with this too, and the solution I found was a config setting on the mud I play, rather than within zmud - with any luck your mud might have something similar. It was something like config screenwidth 0, which stopped linewrapping and made Zmud see the chat as one long line - much easier to capture.
Kaine
Reply with quote
Theragil
Apprentice


Joined: 13 Feb 2004
Posts: 157
Location: USA

PostPosted: Mon Mar 15, 2004 1:08 pm   
 
Unfortunately I can't find any such setting on Aetolia, though that'd help with so many things. I've coded the multiline capture, but until I get another problem with this script fixed (discussed in another thread) I can't really tell if it's working yet.
Reply with quote
Fewyn
Wanderer


Joined: 27 Sep 2002
Posts: 83

PostPosted: Mon Mar 15, 2004 2:00 pm   
 
Hmmm.... so you just want to capture and store the latest chat in a variable? Not put them in a new window?
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