Help with an alias..

Posted by Tsinghahla on Tue 07 Jun 2005 08:22 PM — 3 posts, 17,950 views.

Sweden #0

In the client I used to have, I could simply make an alias and add text after it, let me do an example to explain better..

I had an alias "vili" which did "vodun illusion"
And I could simply do "vili boo", and the alias would execute as "vodun illusion boo".

How would I go about doing it in MUSH?
Do I need to make a script for this, or is there an easier way to do it?

I've tried to do the same thing, but it won't work as I want it to, as the alias will only do "Vodun Illusion" and nothing more after that.
#1
You would make an alias with a wildcard match after it. You can use * for the general alias syntax, or use something more specific, if you prefer regular expressions.

Alias: vili *
Send to world: vodun illusion %0

(I think it's %0, but might be %1...)

Alternative (regular expression) alias: ^vili (?P<illusion>.+)$
Send to world: vodun illusion %<illusion>
USA #2
It is %1, %0 is the whole matched line.

%1 for the first wildcard, %2 for the second, etc.

And yeah, you'll simply need to add the wildcard.