[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  How to track commands being sent to the mud?

How to track commands being sent to the mud?

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Zack   (23 posts)  [Biography] bio
Date Mon 31 Jan 2022 06:31 PM (UTC)
Message
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!
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #1 on Mon 31 Jan 2022 07:18 PM (UTC)

Amended on Mon 31 Jan 2022 07:19 PM (UTC) by Fiendish

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

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Zack   (23 posts)  [Biography] bio
Date Reply #2 on Mon 31 Jan 2022 07:46 PM (UTC)
Message
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.
[Go to top] top

Posted by Nick Gammon   Australia  (22,966 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Tue 01 Feb 2022 05:28 AM (UTC)

Amended on Tue 01 Feb 2022 05:29 AM (UTC) by Nick Gammon

Message
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" ...).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Johnwilson   (1 post)  [Biography] bio
Date Reply #4 on Thu 03 Feb 2022 06:04 AM (UTC)

Amended on Mon 13 Jun 2022 06:45 AM (UTC) by Johnwilson

Message
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]
[Go to top] top

Posted by Nick Gammon   Australia  (22,966 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Thu 03 Feb 2022 09:10 AM (UTC)

Amended on Thu 03 Feb 2022 09:11 AM (UTC) by Nick Gammon

Message
Where do the posts above mention: send("command goes here", false)?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Zack   (23 posts)  [Biography] bio
Date Reply #6 on Thu 03 Feb 2022 11:01 AM (UTC)
Message
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.
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #7 on Thu 03 Feb 2022 09:11 PM (UTC)
Message
Porting MUSHclient to Android is unfortunately not possible without completely rewriting the whole thing from scratch.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


10,429 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]