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


Joined: 19 Feb 2011
Posts: 2

PostPosted: Sat Feb 19, 2011 9:19 pm   

Triggering on default colored text
 
I've searched high and low, and can't seem to find anything on this, or even if it is possible.

I have pretty much everything colored while my hunting scripts are active. I'd like to be able to set up some sort of audible alarm trigger if something pops up that I've not run into before. If it's a new enemy, or a rare item, or whatever. Currently something like that generally gets lost in the scroll.

Any help would be appreciated.

Thanks!
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Feb 19, 2011 10:10 pm   
 
You will need to do the color match explicitly via ANSI trigger:

Code:

#trigger {^%e~[##m(*)%e~[0m$} {
  #beep
  #additem NewStuff "%1"
}


The ## is where you put the exact ansi color code needed. Also, the ansi trigger option is not something you can set through script/code, so make sure you check that.
_________________
EDIT: I didn't like my old signature
Reply with quote
taisharmoridin
Newbie


Joined: 19 Feb 2011
Posts: 2

PostPosted: Sat Feb 19, 2011 10:33 pm   
 
I tried something similar to that and had no luck. I've tried your code and it doesn't seem to be firing either. I imagine it's an issue with my color code. I'm using the default black background, green foreground. The color picker thing tells me the ANSI code is 2. I tried putting in "^%e~[2m(*)%e~[0m$" and "^%e~[02m(*)%e~[0m$" and neither seems to work.

Code:

kill ant
invoke 8
delay
You may act in 2 seconds
health
HP:  190/190  Ftg:  57/78  MP:  18/45
kill ant
invoke 4
kill ant
invoke 4
kill ant


This is what I get from the editor. The line "You may act in 2 seconds" is the default color as set by zmud. That's the type of thing I want to trigger on. Not that string specifically, I just put in a command that I knew I didn't have the output of colored.

Any ideas ?

Thanks for the help!
Reply with quote
Myrkul
Wanderer


Joined: 21 Aug 2008
Posts: 85

PostPosted: Sun Feb 20, 2011 4:13 am   
 
[edit][/edit]
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