Creating an alias to unlock a group

Post Reply
Dragonsbane
Posts: 2
Joined: Fri Sep 04, 2020 10:05 pm

Creating an alias to unlock a group

Post 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.

Dragonsbane
Posts: 2
Joined: Fri Sep 04, 2020 10:05 pm

Re: Creating an alias to unlock a group

Post 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")

User avatar
SlySven
Posts: 974
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Creating an alias to unlock a group

Post 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!

Post Reply