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


Joined: 23 Jun 2002
Posts: 2
Location: USA

PostPosted: Sun Jun 23, 2002 5:36 am   

Problem with simple trigger
 
I have a trigger for coloring the amount of experience i get which looks like this...

Pattern: You receive (%d) experience points.
#CW %1 yellow

my problem is that it creates a new trigger in the trigger window for that number which is..

Pattern: (whatever number it captured)
#CW yellow

And every instance of that number it will color yellow. It creates a new trigger for the experience after all of my kills like this. I've also tried with &exp in the pattern and @exp as well, and it will make a trigger for @exp instead and it'll only make the one new trigger in the trigger window, but it will still color all instances of that number. What have I done wrong? It doesn't even do this on my friends copy of zmud. We're both using 6.26.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sun Jun 23, 2002 5:53 am   
 
You can't choose which part of the trigger to #CW as it will color the entire
thing. #CW is good for highlighting things like peoples names:
#TRIGGER {{Zugg|Vulcanus}} {#CW red}

You can use a #SUB command to do what you are looking for.

#TRIGGER {^You receive (%d) experience points.} {#SUB {You receive %ansi(yellow,bold)%1%ansi(grey) experience points.}}

Change the above %ansi(grey) to match your line color.

Ton Diening
Providing untested answers that tend to be
more complicated than others.
Reply with quote
Vulcanus
Newbie


Joined: 23 Jun 2002
Posts: 2
Location: USA

PostPosted: Sun Jun 23, 2002 6:18 am   
 
All right, i don't understand. The current trigger I'm using

Pattern: You receive (%d) experience points.
#CW %1 yellow

works just fine, it just adds a trigger for each number it captures. Now what's bugging me most is that it's doing this on MY copy of zmud and not on my friends copy when he is using the exact same trigger, which would lead me to believe that I have a setting off somewhere?

BTW, I can't get your trigger to work :(
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Jun 23, 2002 6:34 am   
 
You're using the wrong syntax for #CW. What your line:

#CW %1 yellow

is doing is what it's supposed to be doing (that is, creating a trigger which colors yellow everything that matches %1).

What you need to do is shorten the trigger you're using to just the number, which will color EVERY number that color, or use a #SUBSTITUTE like TonDiening said:

#TRIGGER {You receive (%d) experience points.} {#SUBSTITUTE {You receive %ansi(yellow)%1 %ansi(default)experience points~.}}

%ansi(default) will return the color back to your normal text color. The reason TonDiening's trigger didn't work is because he didn't quote the period (which is the path character by default).

li'l shmoe of Dragon's Gate MUD
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