Multiple commands

Posted by Mike Kilian on Mon 14 Jan 2002 07:15 AM — 11 posts, 46,814 views.

#0

I'm use to being able to type multiple commands seperating them by a semi-colon. It is quick and easy, especially considering my typing skills are sub-par. Using Mush Client, to do what I use to be able to do I need #, multiple paranthesis, and I cannot use my aliases. "w;blind orc;e" has turned into "#w(cast 'blind' orc)e" as an example.

Is there a way to change the way this is typed in? I know the # character can be reconfigured, but can it be eliminated? What about changing the paranthesis to a semi-colon and allowing multiple commands to use predefined aliases?

Mike
Australia Forum Administrator #1
Unless I have misunderstood the question, yes, go to world configuration, Commands, and enable "command stacking". Then you can use a semicolon to do what you describe.
#2
Just like NICK said, I can type commands like this: command1;command2;command3
#3
sorry about type "enter" so quick. :(

Then another qustion: how can i send command from script with one line code?

like this: world.send "command1;command2;command3"
not this: world.send "command1"
........."command2"

now my script has so many lines...
USA #4
if you really wanted to send lines stacked you could use world.execute instead of send. But really theres nothing wrong with scripts having a lot of lines.
#5
Oh, world.execute works good, i am a newbie of this software.

hmm, i think it's realy big script file, and, grow fast

thanks
USA #6
Are those script routines unique one per trigger/alias? If so, you can put the script in the trigger itself (in the send box, then send to "script"). Or, if its just straight sending, you can just send straight from the trigger/alias.
Australia Forum Administrator #7
Quote:

Then another qustion: how can i send command from script with one line code?

like this: world.send "command1;command2;command3"


Or, you can build in the extra lines yourself like this:


world.send "command1" & vbCrLf & "command2" & _
           vbCrLf & "command3"


However using:


world.Execute "command1;command2;command3"


is probably easier.

Amended on Tue 06 Jul 2004 10:44 PM by Nick Gammon
#8
Would this work even when you have to wait for your character to regain balance prior to being able to send your next command?

For example:

Emote begins singing in a hauntingly soft contralto,
!OnBal: emote sings %%<stuff>%%

(have to pause and wait for a few moments before sending, which makes things choppy on the viewers end.)

emote sings %%<stuff>%%

~~~~~~~~~~~~~~~~~~~~~~~~~~~
The %% are used to denote what's being said/sung/whispered etc
Amended on Thu 13 Jan 2011 01:43 AM by Andriel
Australia Forum Administrator #9
Not precisely, because it sends things immediately. However using techniques described here you can:

http://www.gammon.com.au/forum/?id=4957

An example that lets you emote two things is:


<aliases>
  <alias
   match="sing *|*"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>

require "wait"

wait.make (function ()  --- coroutine below here

  Send ("emote %1")   -- send first part

  wait.match ("You regain balance on all limbs.", 10)  -- wait or timeout after 10 seconds

  Send ("emote %2")   -- send second part

end)  -- end of coroutine

</send>
  </alias>
</aliases>


Template:pasting
For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.

#10
Hey,i am newbie here....