Page 1 of 1

Creating an alias to unlock a group

Posted: Fri Sep 04, 2020 10:30 pm
by Dragonsbane
Hello,
I would like an alias 'fon' that, when used in the main display, will unlock a group of aliases.
The group of aliases is name FamiliarAliases. This group (or folder) contains 11 separate aliases.

After reading the wiki and the and forums, I believe the actual command to unlock the group is this:
enableAlias("FamiliarAliases")
This will not work when used in the main display.

Also, I tried to create the simple 'fon' to send the command 'enableAlias("FamiliarAliases")' to the mud.
This will not work for me either, of course.

Re: Creating an alias to unlock a group

Posted: Fri Sep 04, 2020 11:25 pm
by Dragonsbane
Okay - I have it all sorted out.
Someone on the Discord Mudlet channel gave me the line I needed. If anyone here is interested: You open the alias editor, create a new alias, the pattern is simply fon, the command is lua enableAlias("FamiliarAliases"). Then create another new alias, the pattern is simply fof and the command is lua disableAlias("FamiliarAliases")

Re: Creating an alias to unlock a group

Posted: Sat Sep 19, 2020 1:07 pm
by SlySven
As the "pattern" is a regexp I'd recommend ensuring that they are only triggered when you enter exactly the command text and nothing else - otherwise they might go off when you enter that pattern in something else - e.g. if you were chatting about text formats and happened to include something like "Well, I tend to use a monospaced font exclusively!" - to prevent this wrap your patterns in '^' and '$' - i.e. use "^fon$" and "^fof$" instead!