Alias question

Posted by Frederic on Sat 24 Nov 2001 03:08 AM — 2 posts, 11,077 views.

Canada #0
Hi.

I want to switch the aliases I have on a MUD to the alias list in MUSHclient.
The problem that comes to mind is I tried one and it didnt work too well.

alias: ba *
send: cast 'ballistic attack' %1

If I do ba (target) to start a battle, it works fine.
But during a battle, just using ba, the MUD returns a "Cast spell on who?" message.

I have a bunch of aliases similar to that one, and I don't really feel like making 2 aliases for 1 spell.

Just wondering what you could suggest for that.

Appreciate the help,
Frederic
Australia Forum Administrator #1
It says that because your alias has a space in it. Thus is is looking for:


ba(space)(something)


You can work around that by using a regular expression, like this:


Alias: ^(ba|ba (.*))$
Send: cast 'ballistic attack' %2
Regular expression: checked


This says to look for "ba" only, or "ba" followed by a space, followed by other things. Thus it covers both cases. You have to change %1 to %2 because of the way the regular expression works.