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
➜ Complicated trigger
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Gore
(207 posts) Bio
|
Date
| Thu 08 Jan 2004 03:50 PM (UTC) |
Message
| Hello, I'm having trouble trying to trigger a paticular phrase.
A prickly stinging overcomes your body, fading away into numbness.
Now, the problem is, *'s replace random letters in the pattern. In ZMud, I'd trigger it like this:
{A|*}{ |*}{p|*}{r|*}{i|*}{c|*}{k|*}{l|*}{y|*}{ |*}{s|*}{t|*}{i|*}{n|*}{g|*}{i|*}{n|*}{g|*}{ |*}{o|*}{v|*}{e|*}{r|*}{c|*}{o|*}{m|*}{e|*}{s|*}{ |*}{y|*}{o|*}{u|*}{r|*}{ |*}{b|*}{o|*}{d|*}{y|*}{,|*}{ |*}{f|*}{a|*}{d|*}{i|*}{n|*}{g|*}{ |*}{a|*}{w|*}{a|*}{y|*}{ |*}{i|*}{n|*}{t|*}{o|*}{ |*}{n|*}{u|*}{m|*}{b|*}{n|*}{e|*}{s|*}{s|*}{.|*}
Meaning, that it looked for the letter or *, so it'd pick up
A *rickly st*ngi*g overcomes*your body, *adi*g away into numb*ess.
like that. This is what I tried in MUSHClient,
^(A|\*)( |\*)(p|\*)(r|\*)(i|\*)(c|\*)(k|\*)(l|\*)(y|\*)( |\*)(s|\*)(t|\*)(i|\*)(n|\*)(g|\*)(i|\*)(n|\*)(g|\*)( |\*)(o|\*)(v|\*)(e|\*)(r|\*)(c|\*)(o\*)(m|\*)(e|\*)(s|\*)( |\*)(y|\*)(o|\*)(u|\*)(r|\*)( |\*)(b|\*)(o|\*)(d|\*)(y|\*)(,|\*)( |\*)(f|\*)(a|\*)(d|\*)(i|\*)(n|\*)(g|\*)( |\*)(a|\*)(w|\*)(a|\*)(y|\*)( |\*)(i|\*)(n|\*)(t|\*)
But I guess (|) Will only work for words, instead of letters/spaces, any help, please? | Top |
|
Posted by
| Shadowfyr
USA (1,791 posts) Bio
|
Date
| Reply #1 on Thu 08 Jan 2004 05:42 PM (UTC) |
Message
| Hmm... First off, are you sure you set it to use regular expressions? Second, I got this to work:
^(A|\*)( |\*)(p|\*)(r|\*)(i|\*)(c|\*)(k|\*)(l|\*)(y|\*)( |\*)(s|\*)(t|\*)(i|\*)(n|\*)
Apparently the regular expression parser Mushclient uses doesn't like more than 14 sub strings. When I add (g|\*) to that it fails with a message "Too many substrings in regular expression". :( | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #2 on Thu 08 Jan 2004 06:46 PM (UTC) |
Message
| Try without the parentheses. They may not be necessary. After all you're not trying to pick up the matched parts, you're just trying to match things.
You could also try using the character class notation, which would be using square brackets and without the | (or bar) if I remember correctly.
Wasn't there another post on this exact same phrase not too long ago? |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #3 on Thu 08 Jan 2004 07:48 PM (UTC) Amended on Thu 08 Jan 2004 07:49 PM (UTC) by Nick Gammon
|
Message
| This has indeed been discussed a few times. Try searching for 'prickly' on this forum. The most recent, and rather exhaustive, reply is at Converting triggers and what they mean. My own reply (at or near the bottom) shows a nice readable way of doing it. |
- 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.
13,596 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top