How to track commands being sent to the mud?

Posted by Zack on Mon 31 Jan 2022 06:31 PM — 8 posts, 25,555 views.

#0
I'm typing patterns into a mud like green, red, blue, black, green etc. When I type each color the mud doesn't have a trackable output like you press the red button. It just says you enter the code.
So how can I send what I type to a variable? I want it so that when it sees I typed blue it sends green next or at least gives me the ability to recall my last command in a script.
I appreciate your help!
USA Global Moderator #1
https://www.mushclient.com/scripts/doc.php?function=GetCommandList lets you get the list of recent commands that you sent.

In Lua, GetCommandList(1)[1] will be the most recently sent command.
Amended on Mon 31 Jan 2022 07:19 PM by Fiendish
#2
Well that's pretty sweet. WHen I copy it exactly it at least prints them. I'm not smart enough to adapt the code to send it into a variable. I tried SetVariable("cmd" where print is. I'm not sure what V and K are for?
Cheers.
Australia Forum Administrator #3
Like this:


SetVariable ("recent_command", GetCommandList(1)[1])


The variables k and v were just for looping through recent commands. k was the key (ie. 1, 2, 3, 4, 5) and v was the value (eg. "look", "north" ...).
Amended on Tue 01 Feb 2022 05:29 AM by Nick Gammon
#4
sounds like a possible culprit. Set to true, or remove the second part to see the commands getting sent.


IT department [url="https://www.worktime.com/employee-time-tracking-software"]employee time tracker[/url]
Amended on Mon 13 Jun 2022 06:45 AM by Johnwilson
Australia Forum Administrator #5
Where do the posts above mention: send("command goes here", false)?
Amended on Thu 03 Feb 2022 09:11 AM by Nick Gammon
#6
I just want to thank you all for helping me out.
I absolutely love mush client and it's giving me limited coding experience which is fantastic. There isn't a lot of accessible coding tools for the blind that I've found. Mush serves as a pretty unique environment to code in.
If it ever gets ported to android I'll die super happy.
USA Global Moderator #7
Porting MUSHclient to Android is unfortunately not possible without completely rewriting the whole thing from scratch.