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 Question
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| SWLR Deesk
USA (3 posts) Bio
|
Date
| Tue 14 Nov 2006 04:22 AM (UTC) |
Message
| Hi everyone, I'm new to MUSHclient and I'm figuring stuff out slowly but surely.
I'd like to make a trigger that searches for a certain string within a line. Specifically, every time a mob does damage to me, I want MUSHclient to input "punch" to the World.
Any ideas? |
-SWLR Deesk | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #1 on Tue 14 Nov 2006 12:13 PM (UTC) |
Message
| You can use wildcards for that. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| SWLR Deesk
USA (3 posts) Bio
|
Date
| Reply #2 on Tue 14 Nov 2006 06:20 PM (UTC) Amended on Tue 14 Nov 2006 06:36 PM (UTC) by SWLR Deesk
|
Message
| Could you be more specific?
The actual line that I want to trigger the event would look like this:
Spartan barely scratches you. Spartan does 7 points of damage.
I basically want it so anyone attacking me, doing any amount of damage will trigger it. |
-SWLR Deesk | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #3 on Tue 14 Nov 2006 07:13 PM (UTC) |
Message
| There should be a helpfile for wildcards. Here's an example:
*does * points of damage.
There is a better way to do that, of course. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #4 on Tue 14 Nov 2006 07:49 PM (UTC) |
Message
| Here is an example.
<triggers>
<trigger
enabled="y"
match="* does * points of damage."
sequence="100"
>
<send>punch</send>
</trigger>
</triggers>
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Malek
USA (27 posts) Bio
|
Date
| Reply #5 on Wed 15 Nov 2006 10:45 PM (UTC) |
Message
| This is how I would do it. So no matter how hard they hit you, it will fire on any hit.
<triggers>
<trigger
enabled="y"
match="^(.*?) (.*?) you\. (.*?) does (.*?) points of damage\.$"
regexp="y"
sequence="100"
>
<send>punch %1</send>
</trigger>
</triggers>
|
Tod ist gweiss, Lebens est nicht. | Top |
|
Posted by
| SWLR Deesk
USA (3 posts) Bio
|
Date
| Reply #6 on Thu 16 Nov 2006 02:40 AM (UTC) |
Message
| Thanks for your help guys! |
-SWLR Deesk | 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.
17,087 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top