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
Inlocodeus
Beginner


Joined: 14 Nov 2002
Posts: 15
Location: USA

PostPosted: Thu Feb 20, 2003 4:58 am   

#Capture question
 
ok i'm trying to capture one of the channels that begins..
<Inlocodeus>
I want to capture this and only this in a seperate window so I made a trigger...
Pattern: <%w>
Value:#capture Open

Now the problem is that when i type who, some of the class names are is the same <%w> format and so they get captured too. What i want to know is how do i make it only capture the channel and not everything else?
I'm on zMUD 6.40 if that helps any.
Reply with quote
Inlocodeus
Beginner


Joined: 14 Nov 2002
Posts: 15
Location: USA

PostPosted: Thu Feb 20, 2003 5:03 am   
 
To add to this if you have any posts that have asked this already please try to point them out to me.
Reply with quote
wilh
Wanderer


Joined: 08 Feb 2001
Posts: 89
Location: USA

PostPosted: Thu Feb 20, 2003 5:05 am   
 
Can you give a few lines of sample mud output to illustrate this?

Wil

Wil Hunt
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Feb 20, 2003 5:07 am   
 
Instead of putting %w that matches any word, put the text that you want it to match specifically. So, the pattern would be:
<Inlocodeus>

Kjata
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Thu Feb 20, 2003 5:10 am   
 
output would be very helpful, but i'm going to make a guess, and say that when <word> appears in the wholist its not the first word on the line, and for the channel it is.

if this is true, then use the ^ character to anchor your capture trigger to the beginning of the line:

#tr {^~<%w~>} {#cap Open}

if in both cases the <word> appears at the start of the line, then here is a second option:

#alias who {#t- cap;~who;#wait;#t+ cap}
#tr "cap" {~<%w~>} {#cap Open}

and, in the third case, if the <word> pattern in the channel is not the first item on the line, try to use the pattern that comes before it in your capture trigger.

--------

moon.icebound.net:9000
Reply with quote
Inlocodeus
Beginner


Joined: 14 Nov 2002
Posts: 15
Location: USA

PostPosted: Thu Feb 20, 2003 5:57 am   
 
OK thank you that ^ did it
the <%w> * is actually a players name then text. Tested and now works Thank you again for your help.
Reply with quote
Inlocodeus
Beginner


Joined: 14 Nov 2002
Posts: 15
Location: USA

PostPosted: Thu Feb 20, 2003 6:19 am   
 
Somewhat new butr on the same line sorta.
different pattern imm's names are in cyan while there text color can be whatever. Is there a way to make it capture only if it is a certain color?
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Thu Feb 20, 2003 7:21 am   
 
There is an ANSI option to triggers but we'd need real output to match it.

Check the ANSI option in the trigger then cut/paste the colored output
you want to match into the trigger and modify it. You should see things with
%e's in them.

Example of a copy/paste of my health bar cyan/blue
%e[1;34m %e[1;36m100%e[1;34m/100


Ton Diening
Reply with quote
Inlocodeus
Beginner


Joined: 14 Nov 2002
Posts: 15
Location: USA

PostPosted: Thu Feb 20, 2003 8:40 am   
 
Ok not totally sure what you mean by output.
Name: test.
ok now Ladon is in a light cyan
the : it white
and the test is a dark red

Now to capture this i have:
Pattern: ^%w:
Value: #capture Open
Basically what it is, is any thing that is
^%w: gets grabbed but, I only want it to grab the ppl talking on that channel the way i have it now it picks up cyntax: and channels: but these are green. which gave me the idea why not trigger it to the color of the channel then there would be no way for it to grab the syntax: or channels:
If i'm just going in circles i'm sorry.
... Actually how would i set up a possible if statement that if its cyan in color to capture it if not do nothing? that might work but i don't know how to do that I'm still on basics.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Thu Feb 20, 2003 2:56 pm   
 
Guessing the colors here but the concept would be
quote:

Name: test.
ok now Ladon is in a light cyan
the : it white
and the test is a dark red



So a trigger with the Ansi option toggled to capture this kind of color:
Pattern ^%e[1;36m%w%e[1;37m~:%e[0;31m
Value: #capture Open
Options: [x] Ansi trigger

Same trigger you had but with the ansi color codes in it.

Ton Diening
Reply with quote
Inlocodeus
Beginner


Joined: 14 Nov 2002
Posts: 15
Location: USA

PostPosted: Thu Feb 20, 2003 9:03 pm   
 
Ok that worked great had to remove the last part cause it didn't match. I have one last question. Is there a list of what numbers match what colors? Right now, going off of what you showed me I can only find bright green, gold, dark blue, purple,
Reply with quote
Charbal
GURU


Joined: 15 Jun 2001
Posts: 654
Location: USA

PostPosted: Thu Feb 20, 2003 9:17 pm   
 
Getting such a list shouldn't be necessary... if you copy the text from the zMUD window and then paste it into a trigger pattern with Control-V _after_ selecting ANSI trigger on the options tab, then zMUD will copy the correct codes in from the output.

If you need to see these codes manually, you can turn off color emulation (View, Preferences, General, click + next to General, Emulation, uncheck Emulate control codes.) This will make it so zMUD does not parse color directives but outputs the codes to the screen so you can see them.

If you really do need a list of colors, then look here*. The reason I don't think this is an especially good way to go about this is that different color code sequences can give you the same coloring so just knowing a color sequence that will work may not be sufficient to make a trigger for it.

* In addition to the color codes listed here, zMUD will also accept colors in the 50-57 range, interpreting 5x as 3x;1. However, if a MUD uses this range then it is really only catering to zMUD since it is not standardized as this.



 - Charbal
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