I'm new to things of this nature in general, but I've been looking for a way to set up a function in response to a trigger but I can't seem to figure out how to set it up in Mushclient, and can't find an example in the forums. Basically I'm trying to just add 1 number to a set. For example say I want to send @action @target @11111, then when I receive a response, for a digit to be added to the original set, ex. @action @target @11112, and so on. Also a way to reset the counter, but I can't for the life of me figure it out on mush. Could someone lend a hand or if I missed it, a link?
Trigger function difficulty for Mush
Posted by Quicksilver on Tue 14 Apr 2015 05:55 PM — 4 posts, 16,450 views.
The target needs to be a variable. Use that variable in the trigger (check "expand variables").
When you detect this response add one to the variable.
Quote:
when I receive a response, for a digit to be added to the original set
when I receive a response, for a digit to be added to the original set
When you detect this response add one to the variable.
Thanks for the prompt response, but my question is how do I set it up to automatically add one? As far as I'm aware mushclient doesn't have a native add feature.
Edit: Additional information. I'm trying to get a command cycle sequence to run numbers at five digits from 10000 to 99999, in response to an echo from the mud, sort of a bruteforce version of getting a specific key sequence. So it would start with 10000 and add 1 to that each time, but like I previously mentioned, as far as I'm aware, there isn't a native function for that in mushclient like #add for Zmud. If I'm wrong it would be greatly helpful if it could be explained how to utilize one.
Edit: Additional information. I'm trying to get a command cycle sequence to run numbers at five digits from 10000 to 99999, in response to an echo from the mud, sort of a bruteforce version of getting a specific key sequence. So it would start with 10000 and add 1 to that each time, but like I previously mentioned, as far as I'm aware, there isn't a native function for that in mushclient like #add for Zmud. If I'm wrong it would be greatly helpful if it could be explained how to utilize one.
Adding one to something is pretty trivial.
http://www.gammon.com.au/forum/?id=8411
If you set the trigger to "send to script" you have the whole power of Lua (and other languages) at your disposal.
http://www.gammon.com.au/forum/?id=8411
If you set the trigger to "send to script" you have the whole power of Lua (and other languages) at your disposal.