Register forum user name Search FAQ

Gammon Forum

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 ➜ Lua ➜ 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 page


Posted by Zylo4   USA  (9 posts)  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
Top

Posted by Nick Gammon   Australia  (23,165 posts)  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
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.


11,374 views.

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

Go to topic:           Search the forum


[Go to top] top

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