[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  Plugin to redirect typing to another world

Plugin to redirect typing to another world

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


Posted by Nick Gammon   Australia  (22,989 posts)  [Biography] bio   Forum Administrator
Date Thu 10 Jul 2008 06:41 AM (UTC)
Message
Nowadays you can use "dummy" MUSHclient worlds to be holders for extra information, like your inventory, chat windows, and so on. You make them a "dummy" world by putting the IP address of 0.0.0.0 in the world TCP/IP address field, thus stopping it from trying to connect.

However one problem is, that if the dummy world has the focus, and you type something, then it just disappears, because the world is not connected.

To work around this, install the plugin below on your dummy worlds, and if it detects a command, it redirects it to your "main" world (by name).

In my example the main world name is Aardwolf, but you simply change that on line 3 of the plugin to redirect to any name of your choosing.

To use, copy from between the lines below, save as Send_Input_To_Main_World.xml in your MUSHclient -> Worlds -> Plugins folder, and then use the File menu -> Plugins to install it.



<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient [
  <!ENTITY world_name "Aardwolf" > 
]>
<!-- Saved on Sunday, June 22, 2008, 11:53 AM -->
<!-- MuClient version 4.29 -->

<!-- Plugin "Send_Input_To_Main_World" generated by Plugin Wizard -->

<muclient>
<plugin
   name="Send_Input_To_Main_World"
   author="Nick Gammon"
   id="703dbfca1548310658c386a2"
   language="Lua"
   purpose="Redirects typing to the main world"
   date_written="2008-06-22 11:02:24"
   requires="4.29"
   version="1.0"
   >

</plugin>


<!--  Aliases  -->

<aliases>
  <alias
   match="*"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>
  require "getworld"

w = get_a_world ("&world_name;")

if w:GetWorldID () == GetWorldID () then
  ColourNote ("white", "red", 
   "Cannot use Send_Input_To_Main_World plugin on main world")
  EnablePlugin (GetPluginID (), false)
  return
end -- if

if w then
  w:Execute [====[%1]====]
  w:Activate ()
end -- if world exists
</send>
  </alias>
</aliases>

</muclient>



- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] 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.


5,944 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]