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
Gustival
Newbie


Joined: 14 Aug 2001
Posts: 4
Location: Canada

PostPosted: Fri Mar 28, 2003 11:34 am   

[?] Capturing multi-line tells into another window
 
I used to have this figured out about two years ago but have totally forgotten how to do it. What I want to do is capture mutli-line tells to another window. I would also like to set it up so that a chime sounds every time a tell is captured. An example on what the tells look like would be:

Belzar tells you 'How are you doing?'
You tell Belzar 'Pretty good tonight.'

I realize that those two messages will require two different captures.
I would like the capture window to display exactly what I showed above, capturing the name of the person who sent me the tell as well as their message. I would also like to record the responses that I send back to them.
I have tried setting a trigger with the Pattern as:
You tell
and the Value as:
#CAP tell
All I currently get in the tell window is [You tell-> #CAP tell] with no other text following it.
I would also like to just see the tell that I have recieved or sent without the code being echoed in the new window, if it is possible.
If anyone can tell me what I should be doing to get this to work I would appreciate it greatly.
In case it helps, the MUD I play is Materia Magica.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Fri Mar 28, 2003 1:10 pm   
 
You shouldn't be getting the code in the other window. Perhaps, you have some option turned on in the Preferences that you shouldn't have. Anyway, let's first try to create a trigger for capturing the tells:
#TRIGGER {%w {tell|tells} %w '*} {#T+ capTells}
#TRIGGER capTells {(*)} {#CAP tell;#GAG;#IF (%ends("%1", "'")) {#T- capTells}} "" {disable}

The first trigger looks for the start of a tell and enables the second trigger. The second trigger then fires on every line (including the one that set off the first trigger) and captures every line until it finds a line than ends with a '.

Kjata
Reply with quote
ZooMetropolis
Newbie


Joined: 29 Mar 2003
Posts: 7

PostPosted: Sat Mar 29, 2003 2:41 am   
 
I don't want to start another thread for this, so:

I used the commands you gave and i can't get it to work. The new window it opens keeps open forever, and everything in the MUD goes there.

In the MUD I get this new triggers:
Pattern: %w {tells you|responds} %w '*
Value: #T+ capTells

Pattern: (*)
Value: #CAP tell
#GAG
#IF (0) {#T- capTells}

I hope that helps. If you need more details I'll be glad to give them

ZooTV
Reply with quote
Gustival
Newbie


Joined: 14 Aug 2001
Posts: 4
Location: Canada

PostPosted: Sat Mar 29, 2003 2:48 am   
 
Thanks for the help. With help from here and from friends in the game I have managed to get it to work. I found out that the reason I was only getting the trigger comment was that I had View Triggers selected in my preferences. Once I deselected it everything worked just fine with the plain and simple commands of:
Pattern: You tell (or tells you)
Value: #CAP Tells
#BEEP

It captured the whole tell as well as making the chiming noise I was wanting.
I will now see if I can make it work for the various other sorts of talk used in the game.
Reply with quote
ZooMetropolis
Newbie


Joined: 29 Mar 2003
Posts: 7

PostPosted: Sat Mar 29, 2003 8:57 am   
 
I got it to work, but in the MUD I play, you can emote in the channel (I'm using this same triggers in the channels) and instead of being like this:
<channel> Someone says 'bla bla'

It's like this:
<channel> Someone is confused

So it doesn't end with a '. Any other way around it?

ZooTV
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sat Mar 29, 2003 12:18 pm   
 
You're going to have to find another method. Do the other lines in the message start with some whitespace when the message is longer than one line? Or perhaps there is some other indication. In the worst case, is it safe to assume that there will be a blank line at the end of the multi0line message?

Kjata
Reply with quote
ZooMetropolis
Newbie


Joined: 29 Mar 2003
Posts: 7

PostPosted: Sat Mar 29, 2003 7:14 pm   
 
The only indication seems that there is a blank line at the end of the message

ZooTV
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Mar 30, 2003 1:33 am   
 
Then you want something like this:
#TRIGGER {^<chat>} {#T+ getChats}
#TRIGGER {$} {#T- getChats} "getChats"
#TRIGGER {*} {#CAP chat;#GAG} "getChats"

Be sure to initially disable the getChats class when it is first created.

Kjata
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