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
➜ Simple question about triggers
|
Simple question about triggers
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Penguin
(46 posts) Bio
|
| Date
| Sun 14 Jul 2002 01:06 AM (UTC) |
| Message
| Hi,
I have problems dealing with my prompt when I trigger on a room name. If I were to trigger on a room name like for example "A tavern", sometimes it will just show "A tavern" but sometimes it appears as "HP:200 EP:200 A tavern"
Currently I'm setting two triggers.. one for "A tavern" and another for "HP:* EP:* A tavern" It's getting pretty troublesome and I was wondering if there's any way to just set 1 trigger.
Thanks | | Top |
|
| Posted by
| Magnum
Canada (580 posts) Bio
|
| Date
| Reply #1 on Mon 15 Jul 2002 04:26 PM (UTC) |
| Message
| Regular Expressions can solve your dilema... but they can be tough to learn.
Try taking the second trigger, and click the "Convert to regular expression" button on that triggers screen.
Now, take what is optional text, and wrap it in brackets, then place a ? immediately after the closing bracket. In this case, what you want may look like this:
^(HP\:(.*?) EP\:(.*?) )?A tavern$
Learning the regular expression syntax can be a bit daunting, but once you get a grasp of it, you can build much better triggers and aliases that are more full-proof and more flexable. Start by clicking help on the trigger menu and following the appropriate links in the help file.
I believe there is a standalone file in the MUSHclient directory that is helpful as well. Yes, I just checked. It's called "RegularExpressions.txt". Read it for more help. :) |
Get my plugins here: http://www.magnumsworld.com/muds/
Constantly proving I don't know what I am doing...
Magnum. | | 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.
10,896 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top