I'm always opening a Quick Connect, and entering the same address and port as my current world, as of I need to test things with another character. What about in the Quick Connect dialog box, you add a drop down box, that has all the open worlds listed, and a button that if clicked, will fill in the address, port, world name of the selected open world?
Quick Connect, this world's data
Posted by Zeno on Tue 15 Jun 2004 03:10 PM — 6 posts, 17,617 views.
How about this? This is an alias that will do that if you type "newworld".
You may like to change the first line in the "send" text (the filename) to be something better (eg. add a number to it or something).
What this does is write a small text file like this:
It then uses the world.Open command to open it, thus effectively creating a new world with the same settings as the world from which you execute it.
In a couple of minutes' work you could bang the whole thing into a plugin, make it a global plugin, and then the "newworld" alias will work in whatever world you have currently open.
<aliases>
<alias
match="newworld"
enabled="y"
echo_alias="y"
send_to="12"
sequence="100"
>
<send>filename = "c:\\newworld.mcl"
Set fs = CreateObject("Scripting.FileSystemObject")
Set file = fs.CreateTextFile(filename, vbTrue )
file.Write "<?xml version=""1.0"" encoding=""iso-8859-1""?>" & vbCrLf
file.Write "<!DOCTYPE muclient>" & vbCrLf
file.Write "<muclient>" & vbCrLf
file.Write "<world defaults=""y"" " & vbCrLf
file.Write " name=""" & WorldName & " (copy)"" " & vbCrLf
file.Write " site=""" & WorldAddress & """ " & vbCrLf
file.Write " port=""" & WorldPort & """ " & vbCrLf
file.Write "/>" & vbCrLf
file.Write "</muclient>" & vbCrLf
file.Close
Set fs = Nothing
world.Open filename</send>
</alias>
</aliases>
You may like to change the first line in the "send" text (the filename) to be something better (eg. add a number to it or something).
What this does is write a small text file like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<world defaults="y"
name="Your current world name (copy)"
site="your.current.world.address"
port="4000"
/>
</muclient>
It then uses the world.Open command to open it, thus effectively creating a new world with the same settings as the world from which you execute it.
In a couple of minutes' work you could bang the whole thing into a plugin, make it a global plugin, and then the "newworld" alias will work in whatever world you have currently open.
Is that alias suppose to work without changing it?
Error number: -2146827284
Event: Execution of line 2 column 5
Description: Expected ';'
Line in error:
Set fs = CreateObject("Scripting.FileSystemObject")
Called by: Immediate execution
That particular alias was written to use VBscript - is that the language you have the scripting set to?
If not, I can turn it into a plugin that will use VBscript (or, change the script language yourself).
If not, I can turn it into a plugin that will use VBscript (or, change the script language yourself).
Ah, it was set to Jscript. Not sure why. Alright it works, I'll make a plugin of it sometime soon, thanks.
Made the plugin. Thanks.
Made the plugin. Thanks.
Here is a Lua version of the same thing:
This one uses GetWorld (67) to open the world file in the current MUSHclient worlds directory.
<aliases>
<alias
match="newworld"
enabled="y"
echo_alias="y"
send_to="12"
sequence="100"
>
<send>
do -- keep variables local
local filename = GetInfo (67) .. "newworld.mcl"
local f = io.output (filename) -- create world file
assert (f:write [[
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<world defaults="y"
name="Your current world name (copy)"
site="your.current.world.address"
port="4000"
/>
</muclient>
]])
f:close () -- close world file now
Open (filename) -- now get MUSHclient to open the world
end -- of do
</send>
</alias>
</aliases>
This one uses GetWorld (67) to open the world file in the current MUSHclient worlds directory.