Hi, I'm after an alias that outputs a command to the mud and then the next time it's run, outputs the next command in the list to the mud, until reaching the end of the list where it will go back to the beginning and start again.
So as an example:
I have a list of three commands: command1, command2, command3
[I press the * button]
The alias outputs "command1" to the mud
[I press the * button]
The alias outputs "command2" to the mud
[I press the * button]
The alias outputs "command3" to the mud
[I press the * button]
The alias outputs "command1" to the mud
etc...
It's been a long time since I attempted any sort of coding (and my mind has been a bit ravaged by time since then), but I'm guessing the alias would need:
A list or array of strings
A counter which resets to 0 when reaching the end of the list
I've tried searching for some sort of similar alias which I could butcher into something suitable for my own purposes but without any luck (which must be down to my poor searching abilities as I would assume there must plenty of examples of something like this floating about, I'm just not sure what search terms to use...)
Any pointers in the right direction would be gratefully appreciated!
Many thanks,
Sinule
So as an example:
I have a list of three commands: command1, command2, command3
[I press the * button]
The alias outputs "command1" to the mud
[I press the * button]
The alias outputs "command2" to the mud
[I press the * button]
The alias outputs "command3" to the mud
[I press the * button]
The alias outputs "command1" to the mud
etc...
It's been a long time since I attempted any sort of coding (and my mind has been a bit ravaged by time since then), but I'm guessing the alias would need:
A list or array of strings
A counter which resets to 0 when reaching the end of the list
I've tried searching for some sort of similar alias which I could butcher into something suitable for my own purposes but without any luck (which must be down to my poor searching abilities as I would assume there must plenty of examples of something like this floating about, I'm just not sure what search terms to use...)
Any pointers in the right direction would be gratefully appreciated!
Many thanks,
Sinule