toggle trigger group off and on

Posted by Warbit on Fri 09 Sep 2011 02:21 PM — 3 posts, 16,575 views.

USA #0
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>
Amended on Fri 09 Sep 2011 02:27 PM by Warbit
USA #1
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!
USA #2
thanks daniel