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
➜ A trigger that takes 2 lines of input
|
A trigger that takes 2 lines of input
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Shteven
(1 post) Bio
|
| Date
| Fri 30 May 2003 06:09 AM (UTC) |
| Message
| How can I create a trigger which takes two lines of input and only matches when both are exactly correct?
I want to create a trigger to roll my stats perfectly (or near-perfect), with text looking like this:
Your ability scores:
Str: good Dex: decent Int: bad
Wis: below average Con: decent Cha: poor
I was planning on having a timer which would output no every second or two, and then a trigger which would output yes if a match was found (along with enough text to finish creating the character and quit off the mud). Can this be done without scripting? If not, I'd need help making the script, which is sad because I am a computer science major.
I want the trigger to match on:
Your ability scores:
Str: excellent Dex: excellent Int: excellent
Wis: excellent Con: excellent Cha: excellent
or
Your ability scores:
Str: excellent Dex: excellent Int: excellent
Wis: excellent Con: excellent Cha: very good
There are some blank spaces at the end of the lines. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Fri 30 May 2003 08:33 AM (UTC) |
| Message
| This has been covered quite a few times in the past, try a search.
However the simple answer is that triggers are matched when a line ends, if they waited for two lines they might have a long wait.
However your case is simple. In the case of the first line, make a trigger that simply saves the values (eg. in 3 variables).
Then make a trigger that matches the second line, and looks at the 3 values for that trigger, and taking into account the 3 saved values, makes a decision. |
- 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.
10,749 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top