|
quigbrew Novice
Joined: 04 Jun 2002 Posts: 31
|
Posted: Fri Jul 16, 2004 12:06 am
Help with conditions |
This example is oversimplified just to make it easier to understand, but here's what I want to do.
I'm trying to create a trigger that when activated does nothing until it recieves the next line. If the next line is the prompt, I want it to reset a variable.
Here's an Example:
State 0:
Pattern: You slap your thigh, laughing hysterically.
Value:
State 1:
Pattern: (%d)h, (%d)m (%w)-
Value: #var test 0
I used within 1 and looplines 1 and both don't really work right. The problem is if I type any command on the prompt that I want the 1 state to recognize it won't recognize it. On the otherhand, if I do nothing on that prompt, the trigger seems to work fine. But, that's not really realistic, I need to be able to enter commands and not have to wait for text from the mud to advance the mud.
Just to clarify what works and doesn't I'll give a couple of examples:
This example would work:
Code: |
2687h, 4535m cexkdb-slap
You slap your thigh, laughing hysterically.
2687h, 4535m cexkdb-
Joey says, "Hi." |
This example doesn't work:
Code: |
2687h, 4535m cexkdb-slap
You slap your thigh, laughing hysterically
2687h, 4535m cexkdb-glance
You look at your surroundings. |
The glance is a command that I entered, so I don't understand why it would mess up the states from recognizing the prompt. As always I appreciate all the help any of you can give me. |
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Fri Jul 16, 2004 12:18 am |
Quick reply before heading to work, untested.
State 1:
Pattern: ^(%d)h, (%d)m (%w)-* |
|
|
|
Serentus Apprentice
Joined: 28 Sep 2001 Posts: 103 Location: USA
|
Posted: Fri Jul 16, 2004 4:16 am |
If you want the second state to fire on both
2687h, 4535m cexkdb-
and
2687h, 4535m cexkdb-glance
use a within lines 1 and set it to fire on both prompt and newline. |
|
_________________ -Serentus- |
|
|
|
Nexes Beginner
Joined: 23 Mar 2003 Posts: 28
|
Posted: Sun Jul 18, 2004 10:34 pm |
I don't understand why what comes after the prompt will matter
unless you use the end line symbol, I have a prompt trigger like
that and it works fine without any wildcard after the dash. |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|