Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Tips and tricks ➜ Trigger on everything except...

Trigger on everything except...

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by ErockMahan   (81 posts)  Bio
Date Tue 27 Nov 2007 11:37 PM (UTC)
Message
I have a very basic trigger that will trigger on the following line:

* tells you *

and appends this to a notepad:

%1 told you %2


But there is one person (and only one person) that sends me tells that I do NOT want to append. Is there any way it can be omitted or squelched or whatever?
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #1 on Tue 27 Nov 2007 11:40 PM (UTC)
Message
Sure, just do an ifcheck on %1 against the player name you don't want the tell from.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Wed 28 Nov 2007 04:06 AM (UTC)
Message
You can also do it with a regular expression. See:

http://www.mushclient.com/regexp

Scroll down to the part about "negative lookbehind assertions".

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by ErockMahan   (81 posts)  Bio
Date Reply #3 on Fri 14 Dec 2007 11:49 PM (UTC)
Message
For those of you who want to know how I did it:

<triggers>
<trigger
enabled="y"
keep_evaluating="y"
match="(.+)(?&lt;!asper) tells you (.*?)$"
name="stuff"
regexp="y"
send_to="12"
sequence="100"
>
<send>AppendToNotepad "stuff", vbcrlf
AppendToNotepad "stuff", "%1 tells you %2"
AppendToNotepad "stuff", vbcrlf</send>
</trigger>
</triggers>

Now Jasper will not activate the trigger.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


15,079 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.