Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ General ➜ Alias that can switch between windows

Alias that can switch between windows

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Nodri   (2 posts)  Bio
Date Fri 26 Jul 2024 01:35 AM (UTC)
Message
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!
Top

Posted by Nick Gammon   Australia  (23,057 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 26 Jul 2024 06:35 AM (UTC)
Message
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. :)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nodri   (2 posts)  Bio
Date Reply #2 on Fri 26 Jul 2024 07:22 AM (UTC)

Amended on Fri 26 Jul 2024 07:29 AM (UTC) by Nodri

Message
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!
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


791 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.