Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ MUSHclient
➜ General
➜ Alias Matching a Shorter Alias That Begins the Same Way
Alias Matching a Shorter Alias That Begins the Same Way
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Jai
(4 posts) Bio
|
Date
| Wed 03 Jun 2009 04:09 PM (UTC) |
Message
| If I have an alias that begins in a way that matches another alias, the shorter alias is matched instead of the longer alias.
So if I have this to play a minorsecond at my variable target:
<aliases>
<alias
match="pmis"
enabled="y"
expand_variables="y"
regexp="y"
sequence="100"
>
<send>play minorsecond @kill_target</send>
</alias>
</aliases>
And this to play a minorsecond at something I only need to attack once and don't want to change targets:
<aliases>
<alias
match="pmisf *"
enabled="y"
expand_variables="y"
regexp="y"
sequence="100"
>
<send>play minorsecond %1</send>
</alias>
</aliases>
Trying to use the pmisf * alias only sets off the pmis alias. Is there a way to stop this? This is how I had all my aliases set up in zMUD, and I don't want to memorize (and unavoidably confuse myself with) a new system. | Top |
|
Posted by
| Bast
(78 posts) Bio
|
Date
| Reply #1 on Wed 03 Jun 2009 04:13 PM (UTC) Amended on Wed 03 Jun 2009 04:15 PM (UTC) by Bast
|
Message
| Try this,
<aliases>
<alias
match="^pmis$"
enabled="y"
regexp="y"
sequence="100"
>
<send>play minorsecond @kill_target</send>
</alias>
</aliases>
Bast |
Bast
Scripts: http://github.com/endavis | Top |
|
Posted by
| WillFa
USA (525 posts) Bio
|
Date
| Reply #2 on Wed 03 Jun 2009 05:30 PM (UTC) |
Message
| Bast's suggestion is what I'd use. Anchoring the alias wih ^ and $ (start of and end of line markers) avoids all confusion.
An alternate method though would be to lower the sequence number for the longer alias.
The pmisf isn't isn't going to work like you expect, either. You have it flagged as a regular expression but are using non-regexp syntax. If you uncheck the regular expression checkbox in the properties of the alias, and then click "Convert to Regular Expression" you'll see the pattern change from "pmisf *" to "^pmisf (.*?)$" | Top |
|
Posted by
| Jai
(4 posts) Bio
|
Date
| Reply #3 on Thu 04 Jun 2009 03:49 AM (UTC) |
Message
| |
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
15,243 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top