[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  toggle trigger group off and on
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

toggle trigger group off and on

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Warbit   USA  (47 posts)  [Biography] bio
Date Fri 09 Sep 2011 02:21 PM (UTC)  quote  ]

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>
[Go to top] top

Posted by Daniel P   USA  (86 posts)  [Biography] bio
Date Reply #1 on Fri 09 Sep 2011 05:29 PM (UTC)  quote  ]
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!
[Go to top] top

Posted by Warbit   USA  (47 posts)  [Biography] bio
Date Reply #2 on Mon 12 Sep 2011 12:09 AM (UTC)  quote  ]
Message
thanks daniel
[Go to top] 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.


1,363 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]