Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Lua
➜ Triggers, Variables, Priorities, Coloring
Triggers, Variables, Priorities, Coloring
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Caelan
Vanuatu (12 posts) Bio
|
Date
| Sat 20 Jan 2007 02:50 PM (UTC) |
Message
| 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? | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sat 20 Jan 2007 06:44 PM (UTC) |
Message
| 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. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Caelan
Vanuatu (12 posts) Bio
|
Date
| Reply #2 on Sat 20 Jan 2007 07:12 PM (UTC) |
Message
| 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. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
11,095 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top