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
Kyote
Novice


Joined: 13 Jan 2002
Posts: 36
Location: USA

PostPosted: Tue Aug 20, 2002 8:44 pm   

Capturing text to another window
 
I'm trying to capture all tells to my TELL window(tabbed). But it only seems to capture some tells sent my way. Heres my trigger;

#TRIGGER {(*) tells you (*)} {#if (%2 = "Pull that again and I'm gonna kick your ass ..") {} {#cap {tell};#speak {%1 tells you %2}}} "Speak"

Now it works perfectly if I do it this way;

#TRIGGER {(*) tells you (*)} {#cap {tell};#speak {%1 tells you %2}} "Speak"

Does anyone have any ideas why it won't catch every tell? I just wanted to filter out ones with;
Pull that again and I'm gonna kick your ass ..



Kyote
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Aug 20, 2002 10:31 pm   
 
Try this
#TRIGGER {(*) tells you (*)} {#if ("%2" = "Pull that again and I'm gonna kick your ass ..") {} {#cap {tell};#speak {%1 tells you %2}}} "Speak"



LightBulb
Senior Member
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Aug 20, 2002 10:39 pm   
 
quote:

I'm trying to capture all tells to my TELL window(tabbed). But it only seems to capture some tells sent my way. Heres my trigger;

#TRIGGER {(*) tells you (*)} {#if (%2 = "Pull that again and I'm gonna kick your ass ..") {} {#cap {tell};#speak {%1 tells you %2}}} "Speak"

Now it works perfectly if I do it this way;

#TRIGGER {(*) tells you (*)} {#cap {tell};#speak {%1 tells you %2}} "Speak"

Does anyone have any ideas why it won't catch every tell? I just wanted to filter out ones with;
Pull that again and I'm gonna kick your ass ..



Kyote



LB beat me to it.

What is happening is that %2 will only refer to the first word in a multi-word combination, rather than the entire phrase (thus, the #IF logic becomes "Pull = Pull that again...", which is obviously a false statement).

li'l shmoe of Dragon's Gate MUD
Reply with quote
Kyote
Novice


Joined: 13 Jan 2002
Posts: 36
Location: USA

PostPosted: Wed Aug 21, 2002 4:00 pm   
 
Thanks Guys. It works like a dream!!!



Kyote
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