Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
slash_2_2000
Beginner


Joined: 27 Jul 2005
Posts: 20

PostPosted: Wed May 12, 2010 6:02 am   

Sending multiple commands to MUD simultaneously - possible?
 
G'day all.

What I am essentially trying to find out if it is possible to send more than one command to a MUD simultaneously. They have to be seperate commands. The best I have come up with thus far is:

Code:
#sendraw {command1%lf command2%lf command3}


Which is much faster than just using

Code:
command1
command2
command3


However even with the #sendraw method it still sends the commands one at a time. There is an obvious delay in the MUD registering command1, command2 then command3. Imagine that I am using CMUD right now. If I activated the script, the MUD would respond thusly:

    (Time passes)

    Command 1!

    (Time passes)

    Command 2!

    (Time passes)

    Command 3!


What I really need is for command1, command2 and command3 to occur instantly one after the other, without delay. So, I would use the script, and the MUD would respond thusly:

    (Time passes)

    Command 1!
    Command 2!
    Command 3!


With absolutely no delay - a big wall of text to appearing at once.

Is this possible? If so, how would I accomplish it? If not in zScript, then could any of the supported languages do it?

Thank you all in advance.
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Wed May 12, 2010 7:01 am   
 
The answer can't be this easy, but from the help... http://forums.zuggsoft.com/modules/mx_kb/kb.php?page=3&mode=doc&k=2671

You can enter multiple commands on the same line using the Separator character, which defaults to semi-colon (;). Thus, eat bread;drink water will send the two commands eat bread and drink water to the MUD in quick succession. Also, when commands are sent to the MUD from the command line, a newline (CR/LF) is always added to the end automatically.

command1;command2;command3

#ALIAS fastsend {#SENDRAW command1;#SENDRAW command2;#SENDRAW command3}

If the MUD hesitates using either of those, then most likely the MUD is limited in how fast it will process your commands. There is no way to truly send multiple commands to the MUD simultaneously but close enough as to not matter is almost always possible.
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Wed May 12, 2010 8:34 am   
 
The MUD itself might delay the commands as well.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed May 12, 2010 3:00 pm   
 
You might also check your settings. Click Options. In the Preferences window, click Scripting. Check the value of Delay Between Sending Lines. By default, that should be zero, but you may have accidentally changed it.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed May 12, 2010 5:16 pm   
 
Quote:
#sendraw {command1%lf command2%lf command3}

Also, that is wrong. Telnet clients must terminate command line with CR LF and not just LF. So if you need to use the above method for some reason, it should be:
Code:
#sendraw {command1%{crlf}command2%{crlf}command3}

The {} around the crlf tells CMUD where the name of the %function ends so that you don't need to put an extra space after it like you were doing with the %lf.
Reply with quote
slash_2_2000
Beginner


Joined: 27 Jul 2005
Posts: 20

PostPosted: Thu May 13, 2010 10:43 pm   
 
Thank you everybody.

Also, thank you Zugg for that tip there. It's still slower than I need it to be but I wasn't aware that you could use brackets to sort functions out.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net