Page 1 of 1

Help with using multiple commands in one trigger/alias/etc

Posted: Sat Sep 19, 2015 3:17 am
by Dariusknight
Hi there,

I am a lua noob and I'd like to know, how do you set up either an alias, trigger, timer, etc to send out multiple commands to the mud like if you want to have a button set up to send your attack pattern:

punch
kick
elbow
axehandle
knee
uppercut

and so on and so forth...

How is that done?

Re: Help with using multiple commands in one trigger/alias/e

Posted: Sun Sep 20, 2015 7:18 pm
by twixt
Unfamiliar with buttons but if you make it as an alias you can put whatever you like into 'alias name' and 'pattern' - for instance, call it 'brawling' and make the pattern 'brawl' (unless that's already a command in your game, in which case try something that isn't)

Then in the larger text box below put

send("punch")
send("kick")
send("elbow")
send("axehandle")
send("knee")
send("uppercut")

then when you type 'brawl' (or whatever the 'pattern' is defined as) the alias will send those commands to the mud.

Re: Help with using multiple commands in one trigger/alias/e

Posted: Sun Sep 20, 2015 8:52 pm
by Dariusknight
Thanks! That helps so much! Is there a way to make the alias wait a period of time between each command before executing them?

Re: Help with using multiple commands in one trigger/alias/e

Posted: Mon Sep 21, 2015 6:18 am
by twixt
You can set a temporary timer, so like

temptimer( .5, [[send("punch")]] )

will wait half a second and then send punch.

More info @ http://wiki.mudlet.org/w/Manual:Lua_Functions#tempTimer