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 ➜ Trigger nor executing.

Trigger nor executing.

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


Posted by Slurp   (6 posts)  Bio
Date Wed 19 Apr 2006 12:51 PM (UTC)

Amended on Wed 19 Apr 2006 01:03 PM (UTC) by Slurp

Message
<triggers>
<trigger
custom_colour="16"
enabled="y"
group="Highlighted Words"
ignore_case="y"
keep_evaluating="y"
match="\bdies\.\b"
regexp="y"
repeat="y"
sequence="90"
other_text_colour="silver"
>
<send>/SetVariable ("test", (GetVariable ("test") or 0) + 1)
Note ("Saved count is now " .. GetVariable ("test"))</send>
</trigger>
</triggers>
I'm trying to make count of all mobs killed, unfortunatly this trigger won't execute with the code given. It just dosen't do anything,

the output is like this.

"You got 363 xp.
Badger died horribly.
Badger drops a badger skin.
Badger dies."
or

You got 2160 xp.
Grizzly bear died horribly.
Grizzly bear dies.
etc
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 19 Apr 2006 09:11 PM (UTC)
Message
Your problem is the final \b. That is a "match on word boundary" assertion, however it is after a period, so there is no word boundary there.

This worked for me:


Match: \bdies\.


Your next problem is that you are sending the script "to world" so the script is sent to the MUD, which doesn't understand it. Change "send to" to "script" and get rid of the very first slash.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


8,372 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.