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
dark75rose
Beginner


Joined: 30 Jul 2002
Posts: 25
Location: USA

PostPosted: Fri Jan 10, 2003 6:55 am   

partial capturing
 
I'm trying to get a line to capture without dragging my status that comes before it.

I have about 6 triggers for when there are different numbers of people online and tried:

trigger pattern: {[1]} clan members heard you say, %*
trigger command: #CAP tell "%1"

same thing for the rest just changing the number like this:
trigger pattern: {[4]} clan members heard you say, %*
trigger command: #CAP tell "%1"

the actual capture looks like this:
[AWAY]<#oracle> [4] clan members heard you say, 'something''

or
<#oracle> [1] clan members heard you say, 'something else''

I'd like it to exclude everything prior to the [1] or whichever number it happens to be. So, getting rid of the <#oracle> and [AWAY] for the capture window.

Thanks in advance.

Darkrose
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Jan 10, 2003 12:24 pm   
 
#TR {~[%d~] clan members heard you say, '*'$} {#WIN tell %right(%trigger,%eval(%pos("[",%trigger)-1))}
Reply with quote
dark75rose
Beginner


Joined: 30 Jul 2002
Posts: 25
Location: USA

PostPosted: Mon Jan 13, 2003 11:04 am   
 
It didn't work, but that's ok. Thanks for the help, but I'm getting too stressed over trying to do this new, more complex stuff with Zmud, so I'm just going to drop it and deal with the extra capture. Thanks though!

Darkrose
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Jan 13, 2003 6:29 pm   
 
#CAPTURE is a line command. It either captures an entire line or it doesn't, there's no way to capture part of a line with it.
#WINDOW displays text in a different window. Therefore, it can send just a portion of a line to another window when used with a trigger that saves that portion to one of its parameters.

* is a wildcard which matches anything EXCEPT a few EASILY abused special characters. Its use is recommended.
%* is a wildcard which matches anything INCLUDING those EASILY abused special characters. Its use is strongly discouraged unless you expect to enjoy watching helplessly as someone robs you blind and then suicides your character.

%1 in a TRIGGER is a numbered parameter corresponding to the first item in the trigger's pattern that was enclosed in parentheses. Your trigger patterns don't have any parentheses, therefore %1 has no meaning to them.

[1] is a user-defined wildcard which matches any string consisting of just the character "1" (1, 111, 111111, etc).
[4] is a user-defined wildcard which matches any string consisting of just the character "4".
~[1~] is a pattern which matches the character 1 enclosed by square brackets.
~[%d~] is a pattern which matches any number enclosed by square brackets.

[AWAY] is a user-defined wildcard which matches any string made entirely out of the upper-case letters A, W, or Y (AWAY, YAW, etc)
~[AWAY~] is a pattern which matches the string "AWAY" enclosed by square brackets. Case is ignored (unless the trigger uses the case-matching option).

It does help to read at least a few helpfiles, particularly the one dealing with Pattern Matching and those that cover the commands you intend to use.

For what you said you want to do
quote:
I'd like it to exclude everything prior to the [1] or whichever number it happens to be. So, getting rid of the <#oracle> and [AWAY] for the capture window.

#TR {(~[%d~] clan members heard you say, *)$} {#WINDOW tell {%1}}
NOTE: Since this is NOT a capture, it won't include color-codes. Sorry.

LightBulb
Senior Member
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