Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, 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.
Entire forum
➜ MUSHclient
➜ Lua
➜ toggle trigger group off and on
toggle trigger group off and on
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Warbit
USA (47 posts) Bio
|
Date
| Fri 09 Sep 2011 02:21 PM (UTC) Amended on Fri 09 Sep 2011 02:27 PM (UTC) by Warbit
|
Message
| I had allot of triggers. Some where good for grouping with people some where .. we shall say solo triggers. I got tired of turning triggers off manually whenever i was in a group.
So last night I looked on site to try to figure out how to do it.
Basically you name your trigger Groups. I grouped mine as Solo, Group and Either.
After the triggers groups are named you add this alias. And change the word Solo to whatever group you want to toggle off and on.
Hope its clear. Why am I posting it here. because last night I learned how to make this alias and didn't save it and I had to relearn how to do it again this morning.
The code works. Not pretty but functional.
<aliases>
<alias
match="OO"
enabled="y"
expand_variables="y"
variable="OO"
send_to="12"
ignore_case="y"
sequence="100"
>
<send>
if OO == "true" then
SetVariable("OO","false")
OO = "false"
EnableTriggerGroup ("Solo", false) -- enable the group
Send("Say Solo Group is Off.")
else
SetVariable("OO","true")
OO = "true"
EnableTriggerGroup ("Solo", true) -- disable the group
Send("Say Solo Group is On.")
end--if</send>
</alias>
</aliases>
| Top |
|
Posted by
| Daniel P
USA (97 posts) Bio
|
Date
| Reply #1 on Fri 09 Sep 2011 05:29 PM (UTC) |
Message
| It doesn't need to be pretty. Apart from the Send("say stuff") commands and what seems to be the redundant local variable "00", it's about as simple and straightforward as it can be! | Top |
|
Posted by
| Warbit
USA (47 posts) Bio
|
Date
| Reply #2 on Mon 12 Sep 2011 12:09 AM (UTC) |
Message
| |
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.
12,401 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top