Commands across Multiple Windows & muilti line sending

Posted by Yohan on Fri 03 May 2002 04:25 AM — 3 posts, 13,439 views.

#0
Hi Everyone,

I have just started using Mushclient and have a few questions

1. I play Fallout MUD. You are allowed to have 3 characters at the same time. In fact it is a requirement to get into the more dangerous areas.

How do I set it up so when I type a command in one window it automatically sends the same command to the other 2?

e.g Move south (In the first window) - And then all 3 charcters move south at the same time.


The second question is about muiltiple command sending.

Can you create a switch where you press one key and it does the following:

open pack <enter>
get food <enter>
eat food <enter>
close pack <enter>

I was a bit confused as to how to set this sort of thing up.
Australia Forum Administrator #1
The quick way of sending to all worlds is to use the Game menu -> Send To All Worlds (Ctrl+Alt+S).

You could use this for general things like "kill dragon".

For moving, you could be more sophisticated and set up an alias and a bit of scripting.

For the world where you are doing the typing (or to all worlds if necessary), set up an alias like this:


Alias: ^(n|north|s|south|e|east|w|west|u|up|d|down|ne|nw|se|sw)$
Regular expression: checked
Label: all
Script: SendToAll


Then add a small routine to the script file (exampscript.vbs), at the end ...



Sub SendToAll (AliasName, AliasLine, arrWildcard) 
  For Each name In world.GetWorldList
    world.getworld (name).send arrWildcard (1)
  Next
End Sub



What this will do, is every time you type "north" (or "n"), "south" etc. the alias will trap it, and then using "GetWorldList" find the names of all open worlds, and send the command to all of them.

The words between the vertical bars in the alias are what will be matched on. For instance, you could add "flee" like this:


Alias: ^(n|north|s|south|e|east|w|west|u|up|d|down|ne|nw|se|sw|flee)$


Quote:

Can you create a switch where you press one key and it does the following:

open pack <enter>
get food <enter>
eat food <enter>
close pack <enter>


Use the world configuration, "macros" dialog, choose a key (eg F3) and then just type that into what is to be sent when you press F3.
#2
Thanks Nick, Im pleased it can do these things.

I have tried zMud and a few others and Mushclient is definately the fastest of them all, and is more user friendly.

30 Aussie dollars coming your way soon.