|
-Sorbitol- Newbie
Joined: 18 Jan 2003 Posts: 2
|
Posted: Tue Jan 20, 2004 6:16 am
Multiline Trigger |
Alright, I've got triggers to auto-list players into specific race/org/guild lists, but some players have excessivly large titles and they are spready over 2 lines, and I am trying to figure out how to get the trigger to continue matching over those two line.
Heres an example trigger pattern: ^{@titles|}(%x)%4the %2, %3 Clan Liorinin
Heres an example output from the mud:
----------------------------------------] Players [---------------------------------------
Lady Voice Lia'Ve the Omniscient Wizard of the Ethereal Cosmos, West Wind of Clan
(8 spaces)Liorinin.
-----------------> There are forty eight players in the Realms right now. <-----------------
Any way to get it to keep going onto the second line?(spaces between start of second line and first word is always 8) |
|
|
|
-Sorbitol- Newbie
Joined: 18 Jan 2003 Posts: 2
|
Posted: Tue Jan 20, 2004 8:29 am |
I got bored and split it into two triggers, first one that got the name and a second which just looked for 'Lio'.
If anyone knows how to do multi-line triggers, or knows if its even possible, please post though. |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Tue Jan 20, 2004 9:33 am |
Sure, you can do multiline triggers, but I can't think of one that would do what you want. But for future reference:
#trigger {FirstlinePattern$Secondlinepattern} {commands}
From the look of it, you should probably be able to change your pagesize on your mud. Set it to max and have Zmud do the wordwrapping for you. |
|
|
|
Bromax Wanderer
Joined: 03 Jan 2002 Posts: 66
|
Posted: Wed Mar 17, 2004 2:58 am |
Having trouble with the multiline trigger I need it to recognize:
A deer panics, and attempts to flee!
A deer leaves north.
I have:
@target panics, and attempts to flee!$@target leaves (%*).
@target is correctly set to "a deer"
I get nothing...any help? |
|
|
|
Charbal GURU
Joined: 15 Jun 2001 Posts: 654 Location: USA
|
Posted: Wed Mar 17, 2004 3:24 am |
As this topic doesn't deal with your issue, you might be better off in the future creating a new topic instead of replying to an existing one that is only slightly similar (perhaps including a link back to the old topic if warranted).
That said, your problem may be that the fleeing line ends in one or more spaces. Also, multi-state triggers are generally preferred to multiline triggers as zMUD has to do more work to match multiline triggers. Oh, and %* is not necessary anymore as * matches everything since 6.65 and before that, the improper use of %* (as you have here) could create security issues where people could make you execute arbitrary commands. Since the text to match there seems to just be a direction, I've changed it to %w.
See if this works:
#TRIGGER {@target panics, and attempts to flee!} {#NOOP}
#COND {@target leaves (%w).} {#SAY Matched} {within|param=1} |
|
|
|
|
|