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
Tactics_Bob
Newbie


Joined: 08 Jun 2002
Posts: 3
Location: USA

PostPosted: Thu Jun 13, 2002 3:18 pm   

Advanced Captureing Triggers
 
I am relativly experienced with zmud and have been using it for a about six months. However I am not very familiar with multi-state triggers so I am not quite sure why the catpuring triggers I have don't work.

Here is what I have so far:
#trigger {You tell (%w),} {#cap tell;#gag}
#trigger {(%w) tells you,} {#cap tell;#gag}

Those will capture one-line tell's just fine, and gag them from the main window. But it will not capture the second third or fourth lines because they don't match the pattern. I was planning on making a second-state that would have a pattern {*} and only match text that was high red on red (the ansii sent by the mud for the tells.)

The problem is that there may be up to 4 lines after the initial line of the tell (You tell (%w),) because there is a 75 character limit per line for tells.

To recap:
The Problem: To capture mutliple lines of a tell and gag them.


Tactics Bob
Reply with quote
dacheeba
Adept


Joined: 29 Oct 2001
Posts: 250

PostPosted: Thu Jun 13, 2002 3:27 pm   
 
#trigger {You tell (%w),(%*)$^(%*)$} {#cap tell;#gag} // This will capture 2 line tells.

#trigger {You tell (%w),(%*)$^(%*)$^(%*)$} {#cap tell;#gag} //This will capture 3 line tells.

#trigger {You tell (%w),(%*)$^(%*)$^(%*)$^(%*)$} {#cap tell;#gag} //This will capture 4 line tells.

May not work, and need some playing around with, but thats the general idea.Good Luck!
Reply with quote
Tactics_Bob
Newbie


Joined: 08 Jun 2002
Posts: 3
Location: USA

PostPosted: Thu Jun 13, 2002 3:54 pm   
 
Hmm I think I understand your triggers, but they don't match the pattern from the mud anyway.

Here is some more information on what the tells look like.
Multiple line triggers are indented five spaces:

You tell Fred, "Bla bla bla bla bla bla bla bla bla bla bla bla bla bla
     bla bla bla bla, guess what? This is called spam!!!!"

Wheather this affects the pattern or not, I don't know.



This is the trigger I had:
#trigger {~(Secretly to (%w)~) (%w) (%*)$^(%*)$} {#cap tell}

this was the text:
(Secretly to Fred) Bob bids you farewell, muttering an incantation to
     Xeraphena blessing your passage from the realm of Astaria.

and it didn't match that.

Tactics Bob
Reply with quote
dacheeba
Adept


Joined: 29 Oct 2001
Posts: 250

PostPosted: Thu Jun 13, 2002 4:27 pm   
 
Take out the '^' and see if that works.
Reply with quote
Tactics_Bob
Newbie


Joined: 08 Jun 2002
Posts: 3
Location: USA

PostPosted: Thu Jun 13, 2002 8:33 pm   
 
yup thanks.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Jun 13, 2002 11:42 pm   
 
#CLASS Multiline "disable"
#TRIGGER {^%*$} {#IF (%ascii(%trigger)=32} {#CAP tell;#GAG} {#T- MultiLine}}
#CLASS 0

That is a class you can use for all your multiline tells irregardless of format. It would also work for any other type of communication. It operates based on the space indent the mud sends and just has to be turned on with "#T+ MultiLine" in your regular captures.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Mon Jun 24, 2002 10:46 pm   
 
I just turned off word wrapping in my mud and just let zmud do the word wrqapping for me. Just something to think about if you still cant get multline capturing to work
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