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
peewee
Wanderer


Joined: 22 Oct 2000
Posts: 90
Location: Sweden

PostPosted: Thu Jun 27, 2002 1:28 pm   

Catching on to someone's health....
 
Greeeetings y'all!
I was looking to put some color to the health of NPC's on my MUD.
When you send the "health all" command, you can see the following:
You are physically somewhat hurt and mentally in full vigour.

The foot soldier is physically in a very bad shape and has a multi-colored swollen left hip.
The foot soldier is physically feeling very well.
What I want to color code is the
in a very bad shape
and
feeling very well
with different colors depending on their physical state: at death's door, barely alive, terribly hurt, in a very bad shape,in a bad shape, very hurt, feeling rather hurt, hurt, somewhat hurt, slightly hurt and feeling very well.

So I would like the result to be something like:
You are physically somewhat hurt and mentally in full vigour.

The foot soldier is physically at death's door and has a multi-colored swollen left hip.
The foot soldier is physically feeling very well.
The grim knight is physically in a very bad shape.
What I tried to do was creating a trigger that catches everthing in between but not including "is physically" and either "." or " and has", and then match the caputured string with an array to get the corresponding color I want. With no luck... And I thought it was going to be a walk in the park...

Anyone whou could assist in this task of mine? Mayhap point me in the right direction?


"May the Force be with you"
[url]peewee@mars11.net[/url]
Reply with quote
seamer
Magician


Joined: 26 Feb 2001
Posts: 358
Location: Australia

PostPosted: Thu Jun 27, 2002 3:26 pm   
 
#co {is physically feeling very well.$} white

try this out, simple but effective :)
if you read #help color, you'll see a good list of colours and values to play with
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Jun 27, 2002 3:31 pm   
 
Since you only want to color part of the line, the easiest method is individual triggers. Note that there may be some overlap (hurt, terribly hurt} and that these triggers will affect non-combat messages also, when active. I've placed them all in the "combatcolor" class so they can be quickly disabled/enabled.

#CW {feeling very well|slightly hurt|somewhat hurt} {green} {combatcolor}
#CW {hurt|feeling rather hurt|very hurt|in a bad shape|in a very bad shape} {yellow} {combatcolor}
#CW {terribly hurt|barely alive|at death's door} {red} {combatcolor}

LightBulb
Senior Member
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