Hi.
Sometimes i code some alias in mudlet for clessidra (italian mud).
I want to start one of these aliases from a button.
How can i start an alias from a button (i don't want to replicate code)?
Thanks.
Andrea
Start aliases from Mudlet Buttons
Re: Start aliases from Mudlet Buttons
You should put the code from the alias into a function in a Script, and then call that function from both the alias and the button. For example, if the alias does
There is a function called expandAlias you can use to call an alias, but there are several reasons not to, as outlined HERE
Then you could put a function like this in a script
And use castArmor(matches[2]) in the alias, and castArmor("Ted") or whatever in the button.
There is a function called expandAlias you can use to call an alias, but there are several reasons not to, as outlined HERE
Re: Start aliases from Mudlet Buttons
Thank you!
Re: Start aliases from Mudlet Buttons
Happy to help =)