Mudlet Aliases

When writing basic aliases in MUDlet, I'm not sure how to have my prompter only look for what I type in exactly instead of searching for all possible strings.

For example:
I have an alias "ab"
I type "say ready and able" yet my MUDlet will treat it as though I typed ab.

It won't let me change the settings to anything but Regex. Not sure how to fix.

Comments

  • You'll want to encase ab with regex

    ^ab$

    ^  means beginning of the line
    $ means the end

    Without that any instance of ab will fire your alias
  • edited April 2016
    Ok.

    Another issue that I am having is that when my aliases are unlocked, it won't register anything I type into my prompter that's more than one line (look works fine, look dog will get ignored)

    Also when I try to execute my aliases now, it will only fire the first line when I have multiple send commands

    For example I have an alias which should do the following but it only recognizes the 1st line (infuse void).

    send("infuse void ")

    send("legslash " ..target.. " right ")

    send("strike " ..target.. " chin ")

  • KlendathuKlendathu Eye of the Storm
    What's the input string regex pattern for your alias? (the second white box)

    Tharos, the Announcer of Delos shouts, "It's near the end of the egghunt and I still haven't figured out how to pronounce Clean-dat-hoo."
  • @Aesh sounds to me like you haven't enabled server side queuing. Either enable that or change the second and third send to be svo.doadd("blah blah").
         He is a coward who has to bring two friends as backup to jump people hunting.

  • Xaden said:
    @Aesh sounds to me like you haven't enabled server side queuing. Either enable that or change the second and third send to be svo.doadd("blah blah").
    only works if he uses svof, which he never said he was using

    Aesh said:

    Also when I try to execute my aliases now, it will only fire the first line when I have multiple send commands

    For example I have an alias which should do the following but it only recognizes the 1st line (infuse void).

    send("infuse void ")

    send("legslash " ..target.. " right ")

    send("strike " ..target.. " chin ")


    Most likely the infuse is using up balance or eq, so you'll need to either put the additional commands into a queue (server or client side) so that they fire when you get bal/eq back.

    Additional, if you want to send multiple send commands, use sendAll() instead of multiple send commands, as it's clean and all three are sent at once (as long as there isn't any issues with balance and the like)

    sendAll("infuse void", "legslash "..target.." right", "strike "..target.." chin")

    Aesh said:
    Another issue that I am having is that when my aliases are unlocked, it won't register anything I type into my prompter that's more than one line (look works fine, look dog will get ignored)
    Depends on how you set up your regex, like Klendathu is asking about.

    You know, that one thing at that one place, with that one person.

    Yea, that one!
  • Everything seems to be working now. Thanks for all your help.

    99% of my issues with SVO have been in part to my inexperience with coding or systems in general, I feel like a fish out of water. Hell, I spent three hours trying to figure out why SVO wasn't working last night (I died b/c of it) and after almost ragequitting, I realized that I had paused the system by accident.  :s 
  • Heya guys been ages since I did any coding and trying to remember a couple things.

    I used to have an alias (I think) that was like

    Pattern ^display (.*)$

    Then would do display whatever the client had stored for that string

    So like display gmcp

    Would give you display(gmcp)

    However right now if I do display(matches[2])

    I get "gmcp" as the output instead of the table for gmcp, anyone know what I need to do or have the link to this alias as I am sure it was something I got from somewhere......

    Used to find it super helpful for coding, or it might have even been a built in Mudlet thing I can't remember, it's been a couple years lol.
  • The reason this is happening is because when you do -- display gmcp -- matches[2] is actually "gmcp" the string, and not gmcp the table.

    If you're using mudlet, just do --lua display(gmcp)--, it has a built in alias to run lua code.
  • Don't even need the display part. Just 'lua gmcp' will show it. Same for every variable.
Sign In or Register to comment.