Alias that can switch between windows

Posted by Nodri on Fri 26 Jul 2024 01:35 AM — 3 posts, 6,786 views.

#0
Anyone know how to do this?
I am on a mud where I can play two players at the same time.
I want to be able to control my healer from my main's window.

In zmud I can create an alias, for example sov and give it a value of:
Moiraine:cast 'sov' %1
Lan:

What this does is switches to my alt's window "Moraine" and casts sov on who I specify from my main's window, then it switches back to my main "Lan".

I am looking to do similar in MUSHClient

Thanks!
Australia Forum Administrator #1
Template:function=GetWorld
GetWorld

The documentation for the GetWorld script function is available online. It is also in the MUSHclient help file.



From that page, using Lua, your example might be:


function SendToWorld (name, message)

local otherworld

  otherworld = GetWorld (name)

  if otherworld == nil then
    Note ("World " .. name .. " is not open")
    return
  end

  Send (otherworld, message)

end -- of SendToWorld

SendToWorld ("Moiraine", "cast 'sov' whatever")


So, turn that into an alias and you are done. :)
#2
Thanks,

Exactly what I was looking for.

It took me a second to figure out the name of the world but you can just go to File > World Properties > name the world whatever you want.

Works like a charm!