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
mercatroid
Wanderer


Joined: 06 Dec 2004
Posts: 59

PostPosted: Mon Dec 06, 2004 4:22 pm   

capture windows
 
i've got what is probably a really easy problem i'm just not seeing:

i want to capture the chat channel and the clanchat channel to two different windows.

the problem is, when someone talks over chat channel, the output is:
Bob chats ' hi '

and for clanchat, it's:
Bob clanchats ' hi '

so the obvious problem is that clanchats get interpreted as chats (because the word 'chats' also appears in the word 'clanchats')!

the clanchats channel gets captured by both the 'chats' window, and the 'clanchats' window.

anyone know of an easy way to remedy this?

-Merc
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Dec 06, 2004 10:18 pm   
 
Include the spaces in your " chats " and your " clanchats " triggers.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
mercatroid
Wanderer


Joined: 06 Dec 2004
Posts: 59

PostPosted: Tue Dec 07, 2004 2:11 am   
 
worked, lol...took some tweaking around...just the spaces didn't do it...but adding the first ' did it.....

thx
Reply with quote
mercatroid
Wanderer


Joined: 06 Dec 2004
Posts: 59

PostPosted: Fri Oct 20, 2006 11:29 pm   
 
Okay Vijilante....here's another one for you...:)

My chat windows all work fine. There's just one problem:

Dumbass immortals on my game like to take dumb things people say over chat and place them at the top of the "Who" list.

With the chat captures active, everytime I look at the Who list, it captures the string just as if it was actually just said over the chat channel.

I thought about adding a ^ at the beginning of the capture, to make sure it only worked on strings that started the line, but that screwed up the whole capture.

I would just do something like this:
Code:
^%1 chats
but there's another issue. Sometimes the player's name is followed by a sobriquet like "the werewolf" or "the demon", etc...at which point that capture doesn't work anymore.

So to recap, here are the patterns to match (all begin their own line):

Quote:
Player chats 'example'
Player the something chats 'example'


Any help you got (or anyone else who reads this) would be appreciated.

Merc
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Oct 21, 2006 6:07 am   
 
%1 is supposed to equate to *, and should in fact be capturing "Name the werewolf". Typical users don't want all this captured, which is why we say not to use it in trigger patterns.

One trick you could try would be to use a pattern that matches the name portion followed by a stringlist pattern to match the possible inclusion/exclusion of the sobriquet:

^%w{ the %w|} chats 'example'
_________________
EDIT: I didn't like my old signature
Reply with quote
mercatroid
Wanderer


Joined: 06 Dec 2004
Posts: 59

PostPosted: Sun Oct 22, 2006 1:11 am   
 
See, that's what I thought too. In the Pattern Matching tutorial on this site (which is the same as the helpfile in zMud) it says that * is for
Quote:
any number (even none) of characters or white space
I thought it would've been perfect but of course it doesn't work at all.

I'll try the
Code:
^%w{ the %w|} chats 'example'
and let you know.

Thx!

-Merc
Reply with quote
Sylmannemo
Beginner


Joined: 20 Oct 2006
Posts: 18

PostPosted: Mon Oct 23, 2006 6:54 am   
 
Well, simplest method for me to do would be to put your triggers for Bob chats 'blah.' and bob clanchats 'blah.' in a separate class fold.
#alias wholist {#t- classfolder;#alarm +1.5 {#t+ classfolder}}
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