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


Joined: 20 Jul 2008
Posts: 1

PostPosted: Sun Jul 20, 2008 11:35 pm   

Putting colors in #cap
 
I'm on a mud that allows you alts as long as they're separate so I might have them all on at the same time. I also have a
trigger that captures tells/alliance talk/clan talk/form talk etc but all the stuff from all the characters get captured in one screen. I don't really mind this, it makes it fewer windows to worry about, but I would like to be able to color each character's captures differently. I tried to #color magenta;#cap tell but that turned everything in my main window that color too, which wasn't helpful. How do I set it up so that all the info sent from a character to the tell is put in in one color only so I can differentiate better?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Jul 21, 2008 11:10 pm   
 
The short and simple answer is to stop using #CAPTURE. #CAPTURE doesn't allow any changes to the line at all, which is why it can send everything to the other window as-is.

Since you don't seem too concerned about partial-line coloration, I would just use #WINDOW paired with %ansi() or MXP's <color> tag:

#window YourWindowName {%ansi(color_you_want)%1}

You will need to reconstruct the line as you want it to appear, so be aware that you might not be able to color certain parts of the line exactly how you want.
_________________
EDIT: I didn't like my old signature
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Tue Jul 22, 2008 3:22 pm   
 
Here, this is my basic chatlogger that is along the lines of what Matt is talking about - without the color (should be easy enough to add from his example)
You'll notice that it is coded for the MUD I played when I wrote it, and that I've gone to the trouble of time stamping it :)

Code:
#CLASS {logger}
#VAR chans {Clan|Auction|AvNet|LordNet|Chat|Newbie|Grats}
#TRIGGER {~{(%w)~} (%w)(*)} {
  #IF (%window( logger) = 0 & %ismember( %1, @chans)) {#WIN logger}
  #if (%ismember( %1, @chans)) {:logger:#SAY %time( aaa h:m:s) ~{%1~} %2%3}
  }
#TRIGGER {(*) the group, '(*)'} {
  #IF (%window( logger) = 0) {#WIN logger}
  #IF (%2 = "reload" | %pos( "f ", %2) = 1) {#ABORT 1}
  :logger:#SAY %time( aaa h:m:s) %1 the group, '%2'
  }
#TRIGGER {(*) says, '(*)'} {
  #IF (%window( logger) = 0) {#WIN logger}
  #IF (%pos( "Help me find the intruder", %2) = 1 | %pos( "I will help find the intruder", %2) = 1 | %1 = "Esper Guard") {#ABORT 1}
  :logger:#SAY %time( aaa h:m:s) %1 says, '%2'
  }
#TRIGGER {You say, '(*)'} {
  #IF (%window( logger) = 0) {#WIN logger}
  :logger:#SAY %time( aaa h:m:s) You say, '%1'
  }
#TRIGGER {(%w) tells you, '(*)'} {
  #IF (%window( logger) = 0) {#WIN logger}
  :logger:#SAY %time( aaa h:m:s) %1 tells you, '%2'
  }
#TRIGGER {You tell (%w), '(*)'} {
  #IF (%window( logger) = 0) {#WIN logger}
  :logger:#SAY %time( aaa h:m:s) You tell %1, '%2'
  }
#CLASS 0
Reply with quote
Qaiia
Wanderer


Joined: 06 Apr 2007
Posts: 59

PostPosted: Tue Jul 22, 2008 7:06 pm   
 
Thanks, ralgith. You inadvertently helped me format a 2-line "tell" situation into a neat one-line deal with a timestamp.
_________________
Citrus: The Juicy Alternative
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