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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Able to dis/enable all aliases at once?

Able to dis/enable all aliases at once?

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Zylo4   USA  (9 posts)  [Biography] bio
Date Mon 07 Feb 2011 05:27 PM (UTC)
Message
I know that, with Lua coding, you're able to enable a single alias or a group of aliases.
My question is, is it possible to make a command to turn ALL aliases off? There's that generic 'Enable Aliases' checkbox in the configuration, I'd like something to check or uncheck that I can run off of a trigger.
If possible, what line of code would I need to do this?

Thanks
[Go to top] top

Posted by Nick Gammon   Australia  (22,982 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Mon 07 Feb 2011 07:30 PM (UTC)
Message
To disable all aliases:


<triggers>
  <trigger
   enabled="y"
   match="You enter battle."
   send_to="12"
   sequence="100"
  >
  <send>

SetOption ("enable_aliases", false)
ColourNote ("white", "orange", "All aliases disabled.")

</send>
  </trigger>
</triggers>


To enable them again:


<triggers>
  <trigger
   enabled="y"
   match="You leave battle."
   send_to="12"
   sequence="100"
  >
  <send>

SetOption ("enable_aliases", true)
ColourNote ("white", "green", "All aliases enabled.")

</send>
  </trigger>
</triggers>


Template:pasting For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[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.


8,905 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

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

[Best viewed with any browser - 2K]    [Hosted at HostDash]