Quick question about Aliases

Posted by Isildur on Sat 11 Aug 2007 03:58 PM — 7 posts, 29,218 views.

#0
I used to use MM2k and was quite used to being able to type /alias {aliasname}{commands;and;stuff} to make a quick alias. Is there a way to do this in MUSHclient?

Also, I noticed the Getting Started section. Great job, Nick. Those are awesome and I learned a few things from those. Keep 'em coming.

isildur
USA #1
Yep. You can use this script function to do so:
http://www.gammon.com.au/scripts/function.php?name=AddAlias
#2
Ok. I am close to understanding this. I am connected to Aardwolf mud and I typed this:

AddAlias("containers","lib","look in bag",alias_flag.Enabled,"")

I hit enter and got

"That is not a command."

from the mud. I have my options set to Lua as my scripting language. Am I missing something here? Is there a command symbol (/ # $) that must prefix a script command?


Thanks!
USA #3
Press ctrl-shft-6 to get the scripting configuration menu, then look at the box in the lower right-hand corner. Most people put a backslash in there so they would access the script with "/AddAlias.."
#4
That did it. Thanks!
USA #5
Here's a quick script that I made which doesn't bother dealing with script prefixes. I changed the "/alias" to "#alias" so it doesn't interfere with my scripting. Actually it was designed so I could input zmud speedwalks, but I can lie and say I did it for you. Just copy the whole block of code below and then open up the alias configuration window with ctrl-shft-9. There's a 'paste' button which will only be active if you have a valid alias in the clipboard. That should work out for you. If you do change the scripting prefix to a / and change the alias matching here to "/alias {*}{*}" then it will not work, as the client will check to see if it's a script before alias matching.

<aliases>
  <alias
   name="addalias"
   match="#alias {*}{*}"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>AddAlias("commandalias"..os.time(), "%1", "%2", alias_flag.Enabled, "")</send>
  </alias>
</aliases>
#6
lol, thanks for doing that for me. :)


isildur