|
imagery Newbie
Joined: 25 Aug 2007 Posts: 1
|
Posted: Sat Aug 25, 2007 12:15 am
Question about Triggers |
Hi, I've encountered a strange situation. The pattern is something like this:
----------------------------------------------------------------
To get your reward, please "claim" the secret password.
The password is:
AkOj
DKloe
----------------------------------------------------------------
and then player should enter "claim AkOjDKloe"
I set 2 triggers,
#TR {The password is:%s$(%x)} {#var string1 %1;#t+ pw1;#SH Word 1 is:} {pw0}
#TR {Word 1 is:%s$(%x)} {#t- pw1;claim @(string1)%1} {pw1}
However, the second trigger never gets to work.......
I wonder how to set a trigger under this circumstance........ |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Aug 25, 2007 1:05 am |
The reason this doesn't fire is because you end up with a blank line between "Word 1 is:" and the second password. There's a much easier way to do this using multistate triggers:
#trig {The password is:} {}
#cond {^(%x)} {}
#cond {^(%x)} {claim %concat(%t1,%t2)}
You might want to reconsider using %x and replacing it with %a or %w, which are more specific, but if %x is working, don't worry about it. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sat Aug 25, 2007 1:11 am |
Try this
#TRIGGER "claim" {^The password is:} {#T+ "capclaim";claim=""}
#COND {^----------------------------------------------------------------} {#T- "capclaim";claim @claim}
#TRIGGER "capclaim" {(*)} {claim=%concat(@claim,%trim("%1"))} |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sat Aug 25, 2007 1:14 am |
Fang's example is the example I was gonna post and his will work if there are always 2 lines of the password
My example should work if it is a random amount
Also remember if your mud is doing it this way in order to make it harder to trigger on then you are possibly breaking the rules |
|
|
|
|
|