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
Anders
Novice


Joined: 14 Jul 2003
Posts: 31
Location: USA

PostPosted: Sat Jan 14, 2006 9:16 am   

ANSI trigger trouble
 
I got a trigger looking like this:
Code:
#TRIGGER {^(*%e[32m ~[(*)~]%e[0m.)$} {
  #tag {name,exit} {%1} {%2}
  currentroom="%1"
  #ok
  } "" {color}

The lines I try to catch with it is like this:
Code:
The Lower Commons [n,e,s,w,u,d].

How do I do so that the variable currentroom includes the [ and ] around the exits?

Further more, how do I make it fire when the room name has many colors in it? Is there any way to make * match colors or is there any other wildcard I could use?


While asking about colors... How do I get the status line (Not status window) background color to be black?
Reply with quote
digits
Beginner


Joined: 17 Jul 2004
Posts: 15

PostPosted: Sat Jan 14, 2006 9:57 am   
 
Code:

#TRIGGER {^(%*)%e[32m ~[(%*)~]%e[0m.$} {
  #TAG {name} %1                    // Tag room name
  exits=%replace(%2,",","|");       // Magic to make
  #FORALL {@exits} {#tag {exit} %i} // sure exits are found
} "" {color}
Reply with quote
Anders
Novice


Joined: 14 Jul 2003
Posts: 31
Location: USA

PostPosted: Sat Jan 14, 2006 10:00 am   
 
That seems like a good idea. But does that add unusual exits (like path, i, out and things like that) as well? If not, what can I do to make it add them?
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