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

Post Reply
Dariusknight
Posts: 2
Joined: Sat Sep 19, 2015 3:01 am

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

Post 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?

twixt
Posts: 10
Joined: Sun Aug 23, 2015 8:15 pm

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

Post 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.

Dariusknight
Posts: 2
Joined: Sat Sep 19, 2015 3:01 am

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

Post 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?

twixt
Posts: 10
Joined: Sun Aug 23, 2015 8:15 pm

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

Post 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

Post Reply