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
➜ Triggering with "maybe" variables
Triggering with "maybe" variables
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Codenoob
(1 post) Bio
|
Date
| Thu 02 Feb 2012 12:33 AM (UTC) |
Message
| I'm a complete noob when it comes to these sort of things, but I checked the forum and some other sites and I can't quite find the answer to my problem.
I have the following trigger thing set up:
* reports: */* hp.
if %2 < %3 then
world.Send "operate %1"
end
that's basically it in a nutshell. The problem begins at %1. If a player is named 'Bob' and the match is "Bob reports: 10/10 hp", then everything works fine. However, if it's "Bob, king of the jungle reports: 10/10 hp", the trigger doesn't work because it tries to operate on "Bob, king of the jungle", even though the only keyword that works is, and the only one needed is "Bob". Similarly, his name could be "King Bob of the jungle" in which case there is both a pretitle and a posttitle to work with.
I tried:
*, * reports: (but this doesn't work if it's just "Bob" without a comma)
I also tried:
** * reports: (but this doesn't work because mushclient doesn't allow adjacent wildcards like that)
So my question is... is there any way to write "(there might be something here) Bob (there might be something here) reports: 10/10 hp"?
It's so complicated to explain; sorry if it doesn't make much sense. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Thu 02 Feb 2012 02:32 AM (UTC) |
Message
| Have a look at this for a start:
|
- 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,597 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top