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 ➜ General ➜ Aardwolf Disarm Trigger

Aardwolf Disarm Trigger

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


Posted by Doomfyre   (12 posts)  Bio
Date Sun 15 Feb 2009 09:06 PM (UTC)
Message
I'm sure this is something very simple to fix, but i'm not finding the solution, despite forum and google searches.

I am having trouble with the following trigger:

<triggers>
<trigger
bold="y"
enabled="y"
inverse="y"
italic="y"
match="^(.*?) DISARMS you and you struggle not to drop your weapon\!$"
match_bold="y"
match_inverse="y"
match_italic="y"
sequence="100"
>
<send>wield dagger
dual dagger</send>
</trigger>
</triggers>

It fails to fire, and gives no error message at all.

An example that i feel should match is:

A gardener DISARMS you and you struggle not to drop your weapon!

Thanks for any insight.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 15 Feb 2009 09:28 PM (UTC)
Message
You have made a regular expression, but not checked the "regular expression" checkbox.

- Nick Gammon

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

Posted by Doomfyre   (12 posts)  Bio
Date Reply #2 on Sun 15 Feb 2009 09:56 PM (UTC)
Message
Alrighty, i've checked regular expression, here's the trigger again with the fix, just to keep me honest:

<triggers>
<trigger
bold="y"
enabled="y"
inverse="y"
italic="y"
match="^(.*?) DISARMS you and you struggle not to drop your weapon\!$"
match_bold="y"
match_inverse="y"
match_italic="y"
regexp="y"
sequence="100"
>
<send>wield dagger
dual dagger</send>
</trigger>
</triggers>


and here's some mud output, prompt to prompt:

<2982/4602hp 1964/4005m 2392/3945mv [2308tnl] Dbl: 7 14tq> Enemy: 33%


Your pierce <-+-><-*-> CREMATES <-*-><-+-> a gardener! [237]
Your shadow <->*<=> WASTES <=>*<-> a gardener! [205]
Your pierce <*><*><*><*> ANNIHILATES <*><*><*><*> a gardener! [260]
Your pierce <*><*><*><*> ANNIHILATES <*><*><*><*> a gardener! [259]
A gardener's chop MASSACRES you! [67]
A gardener's chop misses you. [0]
A gardener's chop misses you. [0]
A gardener DISARMS you and you struggle not to drop your weapon!
A gardener has some very nasty wounds.

<2915/4602hp 1964/4005m 2392/3945mv [2308tnl] Dbl: 7 14tq> Enemy: 29%


still not firing
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #3 on Sun 15 Feb 2009 10:32 PM (UTC)
Message
You have requested a match on bold, inverse and italic. Is the first character of the matching text bold, inverse and italic?

If you aren't sure, select that character and go to Display menu -> Text Attributes.

Once I unchecked those boxes, and tried with your test data, it matched.

- Nick Gammon

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

Posted by Doomfyre   (12 posts)  Bio
Date Reply #4 on Sun 15 Feb 2009 10:34 PM (UTC)
Message
ahh, i see. i thought leaving those options checked would broaden the match possibilities, not limit them. that should fix it.

thanks very much for your time
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #5 on Sun 15 Feb 2009 11:08 PM (UTC)
Message
When you make a new trigger those checkboxes are in the "don't care" state which is a sort-of filled-in colour (not checked, and not empty). They are tri-state checkboxes.

If unchecked, the matching line must not be bold (italic/inverse).
If checked, the matching line must be bold (italic/inverse).
If in the third (default) state, the state of bold (italic/inverse) is irrelevant.

- Nick Gammon

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

Posted by Doomfyre   (12 posts)  Bio
Date Reply #6 on Mon 16 Feb 2009 12:10 AM (UTC)
Message
that fixed it, thanks again.

i also checked "Ignore Case" just for the sake of it...
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.


18,842 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.