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


Joined: 02 May 2002
Posts: 4
Location: USA

PostPosted: Sat Apr 13, 2002 12:29 am   

Color Trigger (#sub)
 
Example Input from the mud:
Your flaming bite wounds a rat.
the 'wounds' is red
any time wounds is in red,
I want to append to the line
[19-23]
For example
Your flaming bite wounds a rat.
becomes
Your flaming bite wounds a rat. [19-23]
A big bad flag wounds you.
becomes
A big bad flag wounds you. [19-23]
I want it to happen ONLY if wounds is red
equivalent to %ansi(high, red) in zmud
The control codes sent from the mud for the high red, and to turn it back to normal are
(I got this by turning off emulate control codes)
For example
Gnome's magic <27>[1;31mwounds<27>[0;37m the human mercenary!
where <27>[1;31m is the high red, and the
<27>[0;37m is the gray
<27> is obviously the 27th ascii character,
not actually sent like that.
I think I need to use #sub, but I've been having a lot of trouble.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sat Apr 13, 2002 5:56 am   
 
Biggest issue will be trigger speed perhaps.


Perhaps have a folder that toggles on fighting
and not fighting.

#TIGGER {wounds (%*).$} {#SUB {%ansi(bold, red)wounds %ansi(grey)"%1" %ansi(bold, red)~[19~-23~]}}

Or something to that effect. Untested.



Ton Diening
Reply with quote
Forlarren
Newbie


Joined: 02 May 2002
Posts: 4
Location: USA

PostPosted: Sat Apr 13, 2002 6:08 am   
 
I'm using 6.16, no trigger states.
If thats a trigger state, I have no clue what thats showing..
'wounds (%*).$'
Plus, how does this only work on red 'wounds'
It looks like if there is a room description:
A human is here with bleeding wounds. The floor.. etc..
It looks like it will fire on that.
the 'wounds' has to be red, and the rest has to be gray.
Reply with quote
Forlarren
Newbie


Joined: 02 May 2002
Posts: 4
Location: USA

PostPosted: Sat Apr 13, 2002 6:15 am   
 
This is what I was using, (it works except the following) but for some reason, any time it substituted, it wouldn't go into the log
(I have logging to a file on constantly)

#trigger {^(*)%e[1;31mwounds%e[0m (*).} {#subst {%1%ansi(high,red)wounds%ansi(gray) %2. ~[19~-23~]%{cr}}}
If I don't have the %{cr} at the end, it completely messes up the screen, and I have no clue why.
Also, if I remove the first *, and match with the starting of the ansi color,
it completely messes up the screen as well..
Reply with quote
Forlarren
Newbie


Joined: 02 May 2002
Posts: 4
Location: USA

PostPosted: Sat Apr 13, 2002 6:17 am   
 
If I have 'log after triggers' on,
it doesn't log rather, (to explain from above)
If I have 'log after triggers' off,
it logs the original line,
and the subbed line, so I have doubles
Reply with quote
Forlarren
Newbie


Joined: 02 May 2002
Posts: 4
Location: USA

PostPosted: Sat Apr 13, 2002 6:17 am   
 
.
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