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
➜ Resending lines through triggers
|
Resending lines through triggers
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Dlanod
(2 posts) Bio
|
| Date
| Sat 02 Oct 2004 04:21 AM (UTC) |
| Message
| I have a pattern in the form:
Line 1 - can be quite a few different values
Line 2 - always the same
and I have triggers set up on the various values of Line 1 (all assigned to the same trigger group). So far so good. However, I only want the triggers on Line 1 to fire if Line 2 is present. I have a multi-line trigger set up that catches the pattern, and rather than copy all the triggers into the multi-line trigger I was wondering if there was a more elegant way - for instance using the multi-line trigger to enable the trigger group and then sending Line 1 to be reevaluated by the triggers? | | Top |
|
| Posted by
| Gore
(207 posts) Bio
|
| Date
| Reply #1 on Sat 02 Oct 2004 04:27 AM (UTC) |
| Message
| I think I might have a clue as to what you're asking..
What I would do, if I'm understanding you correctly, is have Line 2 always disenabled. Keep Line 1 enabled, don't do a multi-line trigger, if you don't want to, but what you can do is have line 1 enable the line 2 trigger, and if the line 2 trigger fires, then have whatever it is you want to do, do. (if that makes sense)
An example would be easier, heh. Multi-line triggers were made so that you didn't have to do this type of cascading trigger.
| | Top |
|
| Posted by
| Dlanod
(2 posts) Bio
|
| Date
| Reply #2 on Sat 02 Oct 2004 04:54 AM (UTC) |
| Message
| Ok, that sounds like it should work.
To give an example:
Small spaces no longer frighten you.
You feel the musical healing energy of the Song of Therapeutics draw an affliction from your body.
The first line is the curing message of an affliction for which I have triggers recording whether or not I have it. Usually I know exactly when these will be cured so I only enable them specifically when trying to cure to avoid illusions stuffing me up. However there is a skill which periodically does the above and because the skill message is after the curing message, it makes it a fair bit more difficult to handle. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Tue 05 Oct 2004 02:17 AM (UTC) |
| Message
| Or, have line 1 merely save its results somewhere (eg. a variable), and then if line 2 fires, it can retrieve the saved line 1 line.
However a simpler method might be to use GetLineInfo in the Line 2 trigger, which will then give you what was in line 1 (ie. get the second-last line from the output buffer). |
- 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.
18,217 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top