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


Joined: 30 Jan 2002
Posts: 20

PostPosted: Mon Feb 03, 2003 2:52 am   

Not match
 
Anyone know a quick and easy way to make something not match? For example, I don't want anything within quotation marks to be parsed and triggered off of.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Feb 03, 2003 4:48 am   
 
quote:

Anyone know a quick and easy way to make something not match? For example, I don't want anything within quotation marks to be parsed and triggered off of.



There is simply no quick and easy way to do this. Provide examples of what you're talking about and we can perhaps figure something out for you or help you discover a new way of thinking.

Of course, if you don't want a trigger to match and parse anything in quotation marks, simply don't make triggers that match that stuff.

li'l shmoe of Dragon's Gate MUD
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Mon Feb 03, 2003 6:28 am   
 
It sounds like you do not wish to trigger on what someone says. The best way to do this is to use the ^ and $ anchors with your triggers.

^ will anchor a pattern to the beginning of a line; $ will anchor a pattern to the end of line.

Hence if your pattern is:
^You are affected by poison.$

Then the message:
Bobby says, "You are affected by poison."

does not match because the pattern includes the beginning of line and the end of line.

Troubadour
(Win 98, Pentium III, 550 MHz)
Reply with quote
greenman
Beginner


Joined: 30 Jan 2002
Posts: 20

PostPosted: Mon Feb 03, 2003 1:19 pm   
 
quote:

It sounds like you do not wish to trigger on what someone says. The best way to do this is to use the ^ and $ anchors with your triggers.

^ will anchor a pattern to the beginning of a line; $ will anchor a pattern to the end of line.

Hence if your pattern is:
^You are affected by poison.$

Then the message:
Bobby says, "You are affected by poison."

does not match because the pattern includes the beginning of line and the end of line.

Troubadour
(Win 98, Pentium III, 550 MHz)



That is exactly what I want to do, however the lines that I need to match (health, etc.) do not start from the beginning of the line. I haven't tried the $ to anchor it to the end of the line yet though. I might have to change a few things, but that may work. Thanks.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Feb 03, 2003 2:03 pm   
 
Then you might want to try, as much as possible, to make the pattern include the text from the beggining of the line. You might also want to try looking into matching lines of specific color too.

Kjata
Reply with quote
greenman
Beginner


Joined: 30 Jan 2002
Posts: 20

PostPosted: Mon Feb 03, 2003 4:57 pm   
 
quote:

Then you might want to try, as much as possible, to make the pattern include the text from the beggining of the line. You might also want to try looking into matching lines of specific color too.

Kjata



The string goes something like this...

> [You are battered, your spirit is full, you have good balance.]

Now, there are about 15 different combinations for each, balance, spirit, health. So, there are no definite ending and starting for the string that I can match.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Feb 03, 2003 6:07 pm   
 
Sure there is, you can use the brackets and the > at the beggining:
#TRIGGER {^> ~[You are (*), *.~]$} {commands}

just look for pieces of repeating text, no matter how small they are.

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