I made some simple aliases. They work fine. But they fire when other text uses the same letters. For instance I aliased ds for draw sword. Later when I tried to look woods, the alias fired instead.
My guess is that I have made some mistake. I cannot imagine what it is. In the end I ended up turning all the aliases off.
I found a strange alias issue
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: I found a strange alias issue
You need to modify the alias's idea of what to trigger off of - in the box where you typed "ds" to be the thing to trigger your alias to work you need to change that to be "^ds$" - the extra symbols mean:
'^' = "match the start of the line"
'$' = "match the end of the line"
this makes it so that the alias only gets activated if the 'd' is the FIRST letter on the line and 's' the LAST - otherwise the alias will trigger whereever it sees the two letter pair "ds" in your input.
This is what is known as a regex - a contraction of "regular expression" and can be a very powerful way to specify what you do and don't what to be found out of a whole lot of text...
P.S. for any really new to MUD type text games people the '^' character is known as a "caret" typically on shifted 6 key on a keyboard, and the '$' is the dollar symbol, which I can find on shifted-4 on my UK keyboard.
'^' = "match the start of the line"
'$' = "match the end of the line"
this makes it so that the alias only gets activated if the 'd' is the FIRST letter on the line and 's' the LAST - otherwise the alias will trigger whereever it sees the two letter pair "ds" in your input.
This is what is known as a regex - a contraction of "regular expression" and can be a very powerful way to specify what you do and don't what to be found out of a whole lot of text...
P.S. for any really new to MUD type text games people the '^' character is known as a "caret" typically on shifted 6 key on a keyboard, and the '$' is the dollar symbol, which I can find on shifted-4 on my UK keyboard.
-
- Posts: 21
- Joined: Tue Jun 17, 2014 10:17 pm
Re: I found a strange alias issue
You! You are my hero!
-
- Posts: 21
- Joined: Tue Jun 17, 2014 10:17 pm
Re: I found a strange alias issue
I have a similar problem with the semicolons. When speaking on the mud, if I type a semicolon as part of the sentence, the mud things I'm asking for it to go to a new line. How do you get the client to differentiate between punctuation in commands and punctuation in "speech?'
Re: I found a strange alias issue
Speech is also commands. So it is actually impossible to make such a distinction. But, you can avoid the difficulty by changing the command separator. I made mine ;; rather than ;, because I never use ;; for any other purpose.
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: I found a strange alias issue
You may also find that a leading '\' works e.g. use "\;" to switch off the special meaning of "end the current command and start another one":
* HP:50/50 MV:85/90 > say hello pussy; stroke cat
You say: 'hello pussy'
You caress their thigh
* HP:50/50 MV:85/90 > say hello pussy\; stroke cat
You say: 'hello pussy; stroke cat'
* HP:50/50 MV:85/90 >
* HP:50/50 MV:85/90 > say hello pussy; stroke cat
You say: 'hello pussy'
You caress their thigh
* HP:50/50 MV:85/90 > say hello pussy\; stroke cat
You say: 'hello pussy; stroke cat'
* HP:50/50 MV:85/90 >
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: I found a strange alias issue
I found that emote response by accident on the main MUD I play when I met a player who successfully role plays (no verbal responses other than yowls, hisses and purrs) a feline
-
- Posts: 21
- Joined: Tue Jun 17, 2014 10:17 pm
-
- Posts: 21
- Joined: Tue Jun 17, 2014 10:17 pm
Re: I found a strange alias issue
I'm so pleased. Apart from figuring out what to do about that semicolon issue (I'm thinking the / is the way to go) mudlet now does everything I need it to do in the way I want it done. I used cmud for years, but windows 8 said it had to go. Transitioning was hard. You guys made it much easier.