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


Joined: 18 Mar 2004
Posts: 1

PostPosted: Thu Mar 18, 2004 12:16 pm   

Catching colour from a prompt
 
Heyas all...im pretty new to zmud, having spent last 2 years using mm2k.

Im trying to import some scripts across (mainly to prove that it can be done). The main area im struggling with at the moment is capturing the colour of my hps. My current prompt is:

[STUFF]<999hp 999mana 999br 999mv>[STUFF]

But all the colours are metered (provided by the MUD i.e. Red when they are low, yellow when ok and blue when near full)....i want to capture these colours so i can relay my condition on chat (without having to include things like max hps in my prompt).

Thanks

-Lorrin
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Mar 18, 2004 12:29 pm   
 
Yes, you can capture the color. Just make sure the trigger is an Ansi Trigger (in the Options) and then you can use * to match the color codes. Example:
#TRIGGER {~<(*)%dhp *%dmana *%dbr *%dmv~>} {...} "" {color|prompt}

Now, %1 should have the correct color code.
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