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


Joined: 04 Feb 2004
Posts: 5
Location: Germany

PostPosted: Wed Feb 04, 2004 9:38 pm   

Ansi Codes in Variable
 
Hi,

I want to capture the multiline channels of my mud to a seperate window. I've read some articles about it in this forum. The first standard solution with an initial trigger that enables a class and a T- in this class that disables this class after capturing the end of a channel message doesn't work.

Each channel has a different color. I tried to capture the ANSI code and store it in a Variable. I changed the * trigger from the solution in the "finished scripts forum" to @AnsiCodeChar and added to the initial trigger, that enables the "capture" class, a second state. It's a wait (500ms) trigger without pattern.

#TRIGGER {^&AnsiChanCode~[%w~]} {#class cap 1}
#COND {} {#class cap 0} {Wait|Param=500}

in class cap
#TRIGGER {@AnsiChanCode} {#CAPTURE Channels #GAG}

channels start with e.g.: [L] bla or [laber] bla

my problem is the variable that should contain the ansicode. but it doesn't. Ansi Trigger is selected for sure.

Marius
Reply with quote
M_Hennecke
Newbie


Joined: 04 Feb 2004
Posts: 5
Location: Germany

PostPosted: Tue Feb 10, 2004 12:52 pm   
 
No one an idea!?[V]
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Tue Feb 10, 2004 12:58 pm   
 
quote:
Originally posted by M_Hennecke

No one an idea!?[V]


You need to write down an example on how the channels look. Like how does it look when it is multiline? What comes after? Ideally such information includes a bit of text surrounding the channel lines.

This is the most likely reason no one have replied to your question. Good luck Smile
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Feb 10, 2004 4:40 pm   
 
ANSI control codes frequently contain special characters which aren't captured by the * wildcard, which is the default wildcard for &varname.

In addition, if an ANSI control code sequence contains more than one attribute, which is frequently the case, the ANSI sequence from the MUD won't necessarily be in the same order as the ANSI sequence used by zMUD, and it's the ANSI sequence used by zMUD which you need to match.

In order to use color matching, you'll need a separate trigger for each channel with the appropriate pattern for that channel's color.

I'm a little surprised by your first comment. The #T- method always works if you are able to find an accurate method of identifying the end of the channel line and I've always been able to do so.
Reply with quote
M_Hennecke
Newbie


Joined: 04 Feb 2004
Posts: 5
Location: Germany

PostPosted: Tue Feb 10, 2004 5:10 pm   
 
To the "T- doesn't work": It's not possible to capture the end of a channel message. People can wrote what they want and the mud just send the message to everyone without manipulating it at the end.

example:
"[L]: Hammerhead labert lauthals: grats"
Multiline:
"[L]: Hammerhead labert lauthals: blablabla................whatever"
" and another line"

Lightbulb: creation of seperate triggers for each channel is the worst case solution but perhaps the only one.

capturing ANSI sequences from ZMUD: How could I capture them!? Just copy the line from zmud window to an ANSI trigger!?

Thanks
Marius
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Feb 11, 2004 1:06 am   
 
Ah, then multilines always begin and end with "? That should be pretty easy to do a trigger for.

Highlight the text in the main window. Paste it to the pattern box in the editor with CRTL V. You must already have the ANSI option selected for this 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