Repeat last command

Posted by Fluffles on Sun 26 Apr 2020 12:13 PM — 2 posts, 11,664 views.

#0
Hi ALL,

Sorry if this is covered somewhere but I've been searching the forums with no luck.

I wan to set a trigger to resend the previous command if given a specific prompt. I can make a trigger to "You lost your concentration!" and that solves the issue for any 1 spell but then only casts the triggered spell if I fail anything else.
example:


c 'nox' self
You lost your concentration!

or

c 'wraithform' self
You lost your concentration!
Australia Forum Administrator #1
The function GetCommandList returns a table of the most recent x commands you sent (where x is an argument). So this would send the most recent command:


Send (GetCommandList (1) [1])


The "1" in square brackets is extracting the first (and only, in this case) item from the table.

Template:function=GetCommandList
GetCommandList

The documentation for the GetCommandList script function is available online. It is also in the MUSHclient help file.