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
➜ General
➜ Trigger Subgroups?
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| VBMeireles
Brazil (47 posts) Bio
|
| Date
| Mon 08 Feb 2016 02:41 PM (UTC) |
| Message
| Is it possible to create groups of triggers which contain whole groups of triggers?
E.g:
char1_triggergroup
char1_farmingtriggers
trig1
trig2
char1_pvptriggers
trig3
trig4
char2_triggergroup
char2_farmingtriggers
trig5
trig6
char2_pvptriggers
trig7
trig8
From what I've seen only first level trigger groups can be created, but I was wondering if there is some kind of workaround where I'd name my trigger groups with a common prefix and be able to, through scripting, manipulate (turn on and off) all groups starting with, say, "char1_" or "char2_".
Help? :) |
Vinícius | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Mon 08 Feb 2016 07:31 PM (UTC) |
| Message
| You could certainly do that in a script. After all, a trigger group is really just a name that EnableTriggerGroup uses to decide whether or not to enable/disable a particular trigger.
You could make your own version in a few lines of code that could use a regular expression to break the name into parts.
Use GetTriggerList to find all triggers, and then GetTriggerInfo to find its group name. Use whatever tests you want on the group, and then call EnableTrigger as required. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | 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.
10,754 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top