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


Joined: 17 May 2002
Posts: 0

PostPosted: Wed Apr 17, 2002 4:25 am   

filtering emotes
 
I have a simple trigger that goes:
Pattern: (%w) just stole ~$%d from you.
Value: blahblahwhatever
There are a few people that love to emote and mess with me. How do I go about filtering out the emotes?
They look like this:
Emoter Person just stole $50 from you.
Reply with quote
Userfaulty
Beginner


Joined: 16 Jun 2001
Posts: 20
Location: Germany

PostPosted: Wed Apr 17, 2002 4:52 am   
 
I don't think you could do that unless the output emoted is different than a real command. If you really wanted to get technical you would have to code it to check your current gold against a counter that zmud keeps.

Userfaulty
Reply with quote
necropsian
Beginner


Joined: 29 Jan 2002
Posts: 14
Location: USA

PostPosted: Thu Apr 18, 2002 1:54 am   
 
I think you'd have to have parentheses around the %d also.
ex. (%w) just stole ~$(%d) from you.
Reply with quote
farfguy
Newbie


Joined: 17 May 2002
Posts: 4

PostPosted: Thu Apr 18, 2002 5:51 am   
 
If it's just those few people messing with you, you can try to code it such that the same people doing it will NEVER show up on your screen.

Pattern: (%w) just stole ~$%d from you.
Value: If (%ismember(%1,@blacklist)) {#gag}

Just update your @blacklist with a list of people who does it all the time. This of course, would also gag out the actual attempts of them stealing from you, if that isn't a worry though, this should work.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Apr 18, 2002 4:26 pm   
 
Yes, there's a way. Check out the Line Color option of triggers. Just specify the color of the line and the trigger will only try to match the pattern when the line received is of that color.

However, since what you want to capture is when the line is not an emote, perhaps you should set the Line Color option to the color of the real message, not the emote message.

Kjata
Reply with quote
EnigmaticWolf
Newbie


Joined: 17 May 2002
Posts: 0

PostPosted: Thu Apr 18, 2002 11:37 pm   
 
hrmm... i just reread my post.. thanks for the replies... i didn't get my point across...
The emote text looks like this:
<emoter> Bob just stole $34 from you.

The regular text looks like this:
Bob just stole $34 from you.

Same problem.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Apr 19, 2002 3:29 am   
 
Start your pattern with ^.
Pattern: ^(%w) just stole ~$%d from you.

The ^ marks the beginning of the line, so only one word can come before " just", and that means it will ignore the lines that start with Emoter.

LightBulb
Vague questions get vague answers
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