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
➜ * trouble
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Octavo
(4 posts) Bio
|
| Date
| Wed 18 Aug 2004 04:16 AM (UTC) |
| Message
| Hi, I am trying to get the following trigger to work:
** You gain a practice point from *. **
Send to: Notepad(append) -> Prac from %3
The first and last two ** are sent by the mud, and the third * is the variable. Ive tried using reg expression like this:
^\*\* You gain a practice point from *. \*\*$
Send to: Notepad(append) -> Prac from %1
But it doesnt seem to work... What am I missing? | | Top |
|
| Posted by
| Flannel
USA (1,230 posts) Bio
|
| Date
| Reply #1 on Wed 18 Aug 2004 05:27 AM (UTC) |
| Message
| When using regexps, you have other things meaning special things as well (* are no longer wildcards, instead a quantifier, read the regexp help)
try this:
^\* \* You gain a practice point from (.*?)\. \* \*$
Thats assuming theres spaces between the asterisks and such.
And youll use %1 to return the value. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | | Top |
|
| Posted by
| Jlzink
USA (15 posts) Bio
|
| Date
| Reply #2 on Wed 18 Aug 2004 05:36 AM (UTC) Amended on Wed 18 Aug 2004 05:38 AM (UTC) by Jlzink
|
| Message
| Trigger: ** You gain a practice point from *. **
and the * you want is %# where # is the number in numerical order which the * appears. For example.
You lose * points and your opponent loses * points.
%1 would be your points lost and %2 would be your opponents. Hope that clears it up for ya.
| | Top |
|
| Posted by
| Flannel
USA (1,230 posts) Bio
|
| Date
| Reply #3 on Wed 18 Aug 2004 06:17 AM (UTC) |
| Message
| Then youll use:
^\*\* You gain a practice point from (.*?)\. \*\*$
with %1 being the thing.
And:
^You lose (.*?) points and your opponent loses (.*?) points\.$
This wont match on singular points (unless they keep the s), you might want to try this instead:
^You lose (.*?) points? and your opponent loses (.*?) points?\.$
or if you want to get really picky and only match on digits, you could do this:
^You lose (\d+) points and your opponent loses (\d+) points\.$
And once again, that wont match if they drop the 's'. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | | Top |
|
| Posted by
| Octavo
(4 posts) Bio
|
| Date
| Reply #4 on Thu 19 Aug 2004 10:47 AM (UTC) |
| Message
| Thanks Flannel, that worked.
Jlzink, I used to have that as my old trigger, but the latest version of mushclient doesnt allow it anymore. | | 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.
16,897 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top