Triggers, Variables, Priorities, Coloring

Posted by Caelan on Sat 20 Jan 2007 02:50 PM — 3 posts, 14,253 views.

Vanuatu #0
First, allow me to say the standard "I am a complete MUSH newb". Now...with that in mind;

With the help of a good friend, I got something working on MUSH that I like.

All my house members(guild) are colored one color. All my City members are colored another. All my Order members are colored another. And all my enemies are colored yet another.

What he had me do, was put each group of names into a 'string' variable so it would look like:

VAR NAME: City_Members
CONTENTS: Johnny|Sugarcube|Smacks|etc....

Then I made the trigger:
\b(@!City_Members)\b to do the coloring.

The problem arises with conflicting items. For instance, if Johnny is in my House * AND * my City, it doesn't color it the way I want.

Basically what I wanted was the House to always show up it's color, even if they are in the city, order, enemies, too. I messed with the priorities, but it didn't work out right since if I set the House list to a higher priority (99 instead of 100) it would only color the House members and no one else. But now, it's all back to 100 and works right EXCEPT the house members, who show up the city color (since most are in the same city).

How can I fix this? Or can I?
Australia Forum Administrator #1
You are on the right track with the sequence numbers. Make sure that "keep evaluating" is checked, so that each line is considered by each trigger. Then make the more important one have a higher number, so it is done last, overriding earlier colouring.
Vanuatu #2
AHA! Thanks. I figured it was stupid, and that makes perfect sense. I guess I just went in the wrong direction with the priorities. Thanks again, it works like a gem.