|
Jaiven Wanderer
Joined: 03 Oct 2007 Posts: 66
|
Posted: Sun Jun 24, 2012 8:10 pm
Multi Line Triggers (Cont) |
Ok, so from my research I have found that you can use $ to specify another line on a trigger. I also found the #condition command but I don't completely understand that. Can you also just copy the entire line of strings into the pattern part of the XML version of the trigger tp have it work? I am looking to have about 10 lines trigger a command.
|
|
|
|
Jaiven Wanderer
Joined: 03 Oct 2007 Posts: 66
|
Posted: Sun Jun 24, 2012 8:40 pm |
Will this work?
Trigger:
^Identify the letters below ?both uppercase/lowercase are accepted?:$
Value of trigger:
#condition { #} {#condition} { # #} {#condition} { ##### ######} {#condition} { ###### ######} {#condition} { ### # #} {bot cd}
For the string of text
Identify the letters below (both uppercase/lowercase are accepted):
#
# #
##### ######
###### ######
### # # |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Jun 24, 2012 9:41 pm |
We don't help with defeating botchecks.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Jaiven Wanderer
Joined: 03 Oct 2007 Posts: 66
|
Posted: Sun Jun 24, 2012 9:51 pm |
MattLofton wrote: |
We don't help with defeating botchecks. |
Ah, sorry I didn't mean to offend you. I'm one of those people who takes everything apart and puts it back together just to try it once (has modded every system I've ever gotten my hands on) and this was the last thing I have left to do on the mud I play. I decided to set it up as a challenge to myself and I will keep my questions regarding this off the forums. Once again, I apologize. |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Mon Jun 25, 2012 4:47 pm |
#condition has the same syntax as the trigger command - it actually makes a trigger, you don't want to put it in the value of the trigger. When making multi-state triggers on the command line with #condition, it would look something like this:
Code: |
#trigger {pattern1} {code1}
#condition {pattern2} {code2}
#condition {pattern3} {code3} |
An easier way to make multistate triggers is through the package editor, just go to New -> Trigger state after making your first trigger. In this case, you probably want to change the type of the states to within lines 1 at the bottom of the editor. This means that the second state (and subsequent ones) will only fire on the line immediately following the line that fired the previous state. If it doesn't match, the state resets and the first trigger becomes active. This will help eliminate false positives, and prevent your trigger getting "stuck" on one of the states. (If you wanted to set the type on the command line with #condition, you'd add {within|param=1} at the end.) |
|
|
|
|
|