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
user0101
Apprentice


Joined: 01 Aug 2003
Posts: 100
Location: USA

PostPosted: Sat Jun 05, 2004 1:11 am   

ANSI Trigger
 
I would like to create a flexible ANSI trigger, similar to this:

#VAR colortype {~[1~;32m}
#TRIGGER {{@colortype}You stumble and poke yourself in the eye.} {code} "" {color}

This doesn't work. This trigger will fire off any similar pattern regardless of the color tags before it. This works:

#TRIGGER {~[1~;32mYou stumble and poke yourself in the eye.} {code} "" {color}

I would like to be able to change the color tags on the fly however. Is this possible?
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sat Jun 05, 2004 1:31 am   
 
Your forgeting %e so this mut be more of something you need

colortype="%e[1;32m"
#TR {{@colortype}You stumble and poke yourself in the eye.} {} {code} "" {color}

That is untested but I think it would work just make sure to quote your var with "" and zmud will store it as-is
Reply with quote
user0101
Apprentice


Joined: 01 Aug 2003
Posts: 100
Location: USA

PostPosted: Sat Jun 05, 2004 1:34 am   
 
Works perfect thank you.
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