 |
DungeonCrawler Newbie
Joined: 29 Jul 2004 Posts: 4
|
Posted: Sun Sep 26, 2004 5:44 pm
#TRIGGER, #CONDITION on a prompt, and Within problems |
An example of the two possible sequences of text I can see:
You focus your mind intently on curing your mental maladies.
You are no longer such an idiot.
H:1234 M:4567 [eb]
Or:
You focus your mind intently on curing your mental maladies.
H:1234 M:4567 [eb]
I am trying to test for the second possibility, the 'You focus...' line with nothing following it but my prompt, with the following trigger:
#TRIGGER {^You focus your mind intently on curing your mental maladies.$} {}
#COND {^H~:%d M~:%d} {DoStuffHere} {within|param=1|nocr|prompt}
The trigger works as I want it to. However, it also will fire the second state if it sees the first example I cited, even though my prompt is not within one line. What I want is for the second state to fire only if the prompt immediately follows the 'You focus...' with no lines between. I can do this with other tricks, but I believ #COND is the most elegant solution for what I am trying to do. |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Sep 26, 2004 6:50 pm |
Unfortunately, your prompt is within one line since only one newline has been received. I think you'll have to find another solution.
The simplest solution is to remove the prompt and nocr options. You'll probably be in combat whenever you need this, so waiting for a newline after the prompt won't take long. |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5182
|
Posted: Mon Sep 27, 2004 12:07 am |
I think without any sort of testing that the nocr option is causing the trigger to not be tested when your "You are no longer such an idiot." line is received. Since the trigger was tested it line counter did not increment and the within option was not checked. Simply remove the nocr, leave the prompt and give it a shot. As I say I didn't play with it at all, but I think that is how it works.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
 |
|
|