You need a "world reference" which you can get by name or world ID code. Safer is the ID string, because that won't change if you rename the world. With scripting enabled, and "/" as the "script" character, type:
(Or use the Immediate Window (Ctrl+I) and leave out the slash.
You should see something like this in your output window:
That is the "world ID" (in my case, for my test world).
Now you can, in the command window (and again, assuming scripting is active and you have "/" as the scripting prefix) type:
/GetWorldById ("f52a5090c219b0efebe1b521"):Activate ()
That gets a "world reference" to that particular ID, and then calls the Activate function for that world, bringing that world to the front.
To switch back, you need the ID of the other word, eg.
/GetWorldById ("8c1e6fc91017ec9408ced4c0"):Activate ()
Now you can make an alias, if wanted, to save all that typing, eg.
<aliases>
<alias
match="world3"
enabled="y"
send_to="12"
sequence="100"
>
<send>GetWorldById ("f52a5090c219b0efebe1b521"):Activate ()</send>
</alias>
</aliases>
For advice on how to copy the above, and paste it into MUSHclient, please see
Pasting XML.
This simple approach will give an error message if the wanted world is not open. You could make the alias "smarter" and test if GetWorldById returns nil or not:
<aliases>
<alias
match="world3"
enabled="y"
send_to="12"
sequence="100"
>
<send>
local w = GetWorldById ("f52a5090c219b0efebe1b521")
if w then
w:Activate ()
else
ColourNote ("red", "", "Requested world is not available")
end
</send>
</alias>
</aliases>
For advice on how to copy the above, and paste it into MUSHclient, please see
Pasting XML.