A trigger that takes 2 lines of input

Posted by Shteven on Fri 30 May 2003 06:09 AM — 2 posts, 11,256 views.

#0
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.
Australia Forum Administrator #1
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.