About control MUSHclient

Posted by Willen on Mon 21 Jan 2019 03:32 AM — 9 posts, 29,857 views.

#0
I'm wondering if there is a way to remote control MUSHclient by command or scripts instead of GUI operations. Actions like login to a certain server, loading a LUA profile and some other basics are requested to be executed automactically and controlled by a stand-alone program.


The scenario is that I intend to develop an app on mobile to communicate with this stand-alone program on server side. The program is in charge of command and management of multiple threads on MUSHclient (multiple accounts and operation accordingly).


Nick, hope you would read my post.
Amended on Mon 21 Jan 2019 05:40 AM by Willen
USA Global Moderator #1
How to control a program with another program feels like more of a StackOverflow question.
Amended on Tue 22 Jan 2019 11:58 AM by Fiendish
Australia Forum Administrator #2
It sounds like you are possibly trying to set up a lot of bots. :)

Certainly by using scripting you can do most things in MUSHclient without the GUI interface. Telling it to do those things from somewhere else would be harder. Possibly you could use LuaSocket to wait for incoming commands and do something with them. However as each world file represents one connection to a MUD, you would need a lot of connections.

Why not just make your mobile app actually send the commands to the MUD(s) without interposing MUSHclient in the middle?
#3
Thanks for the reply, Nick.

What is most valuable for the setup is the scripts run on MUSHclient that make bots behave smarter. That will allow all bots run in 24x7 manner while operator can be offline to have a normal life. If app is designed to communicate with Mud server directly, it seems a not good idea to run bots on the phones.

Back to the topic I started, are there any existing documents for developers contain description of each command and function so that I may write scripts to replace GUI interface? Since I have no knowledge developing MUSHclient, what will you suggest to get things started?

Thank you again.
USA Global Moderator #4
Quote:
all bots run in 24x7 manner while operator can be offline to have a normal life

I dislike this mentality. If you don't want to play the game, then it seems like the better decision is to go find a game that you do want to play.

Anyway, I still say that controlling a program with another program is a question for a different forum since it has nothing to do with MUSHclient itself.
#5
Fiendish said:

I dislike this mentality. If you don't want to play the game, then it seems like the better decision is to go find a game that you do want to play.

Anyway, I still say that controlling a program with another program is a question for a different forum since it has nothing to do with MUSHclient itself.


Sorry if it caused any confusion. We will usually have different views on Mud-type games. Since it somehow belongs to last decade, we could re-define the gameplay more casually based on what game itself provides. Farming and bots are popular options given to players who are expecting no time wasting.

We actually are able to see various prototypes through Mud games, which have developed into many online games by years.

I agree that developing a third-party program is not relevant to this forum. But I am seeking the possible solution from Nick, the creator. Indeed it needs full codes support from MUSHclient side.
Australia Forum Administrator #6
Willen said:

Back to the topic I started, are there any existing documents for developers contain description of each command and function so that I may write scripts to replace GUI interface? Since I have no knowledge developing MUSHclient, what will you suggest to get things started?


There is documentation here:

http://www.gammon.com.au/scripts/doc.php

Also all functions documented:

http://www.gammon.com.au/scripts/function.php
#7
I've got stuck with this problem again.
Is it possible to make MUSHclient forward certain input texts(as triggered) to another webapp using luasocket?
I'm intending to use lua scripts only to make this function work.

Workflow is supposed to be:
monitor income texts from game server -> event triggered -> open socket to communicate with another app -> send notification over and forward part of texts -> close socket

Thanks.
Amended on Wed 13 Mar 2019 10:01 AM by Willen
USA Global Moderator #8
Try
https://github.com/diegonehab/luasocket/blob/master/samples/listener.lua
https://github.com/diegonehab/luasocket/blob/master/samples/talker.lua

Your web search terms for this question are "interprocess communication lua"