Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
-Sorbitol-
Newbie


Joined: 18 Jan 2003
Posts: 2

PostPosted: 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)
Reply with quote
-Sorbitol-
Newbie


Joined: 18 Jan 2003
Posts: 2

PostPosted: 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.
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: 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.
Reply with quote
Bromax
Wanderer


Joined: 03 Jan 2002
Posts: 66

PostPosted: 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?
Reply with quote
Charbal
GURU


Joined: 15 Jun 2001
Posts: 654
Location: USA

PostPosted: 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}
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net