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


Joined: 25 Nov 2006
Posts: 2

PostPosted: Sat Aug 16, 2008 8:14 am   

Is there a way to change the background color of a line from the mud?
 
Hi. I'm trying to zebra stripe the output from the MUD and tried a trigger that did '#color background,$202020' but that alsoly changes the foregrond color to black.

Is thare a way to change just the BG color and leave the FG unchanged?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sat Aug 16, 2008 3:34 pm   
 
#COLOR could do what you want. The reason it changed the foreground to black is because 'background' isn't a recognized color. And that command and the %ansi both assume you're supplying the back ground and foreground component.

This bit of code should do what you want
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <trigger priority="2320" copy="yes">
    <pattern>(*)</pattern>
    <value>#PSUB {%1} %x1
</value>
  </trigger>
</cmud>

Although I think I found a bug that may make it less useful for you if use #CW. I'll post about that shortly.
_________________
Asati di tempari!
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sat Aug 16, 2008 3:55 pm   
 
Ooops.. just noticed this was a zMUD question. Here is the zMUD version.

Code:
#trigger {(*)} {#PSUB {<color back="$202020">%1</color>} %x1}


It's possible that's it's not a bug, and I've written some poor code. I've always had a bit of trouble with PSUB and have never used it often enough to master it.
_________________
Asati di tempari!
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