Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

Mudlet - alias issues

MalianaMaliana Member Posts: 2
Hi all,

So I'm trying to throw together some basic aliases for combat - unfortunately I've created a pattern which is breaking. So one I tried to create has the alias 'con' but if I type conman it still triggers the alias. I'm assuming its because its a regex alias but I couldn't figure out how to change that. Any tips on how to fix it? 



Thanks!

Comments

  • KatalystKatalyst Member Posts: 29 ✭✭✭ - Distinguished
    ^cont$
    Dragonknight
  • DragonknightDragonknight MhaldorMember Posts: 280 ✭✭✭✭ - Eminent
    You need to use regex in the pattern to prevent the alias from firing when you don't want it to. If you sent any input to the mud that contains the string 'cont' in it anywhere it would cause that alias to fire. When in reality you want to only fire when you send just 'cont'.

    ^ = beginning of the line.  This will prevent the alias from firing if the first letter isn't c. If you have a space in front of cont it won't fire because the first thing at the beginning of the line isn't c.

    $ = end of line. So, you can't have anything trailing 'cont'. 

    \w = word. It will match any alphanumeric character. Adding a plus after means matching 1 or more.

    \d = digit. Matches numeric characters

    \s = spaces, matches spaces.

    Maliana
  • MalianaMaliana Member Posts: 2
    Thank you both!
Sign In to Comment.