Read only forum archive; join us on Discord for live discussions!

MUSHclient chats in another window.

Started by Raolas on Mar 18, 2008 · 6 posts in thread

Raolas (#1)

#1
First, you need to make a new world called Dark-Legacy Chats with TCP/IP settings to 0.0.0.0 and the port does not matter. This world also is required to be saved with the name "Dark-Legacy Chats.mcl" without the " marks of course.

this will give us the window to put the chats into.

hit CTRL+ALT+G to open global preferences, go to worlds, and hit the add button. then browse to where your worlds are and make sure both the default world (character playing world) and the chat world load up on mushstart.

then take the following text, open a notepad file (NOT WORDPAD) and paste it in, saving it as an XML file: Chat_Redirector.xml
CODE · MUD Output
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<plugin
   name="Chat_Redirector"
   id="cb84a526b476f69f403517da"
   language="Lua"
   purpose="Redirects chat messages to another world"
   date_written="2008-03-18 09:46:35"
   requires="4.08"
   version="1.0"
   >
<description trim="y">
<![CDATA[
Redirects chats to the specified world.

Add or modify "chat" triggers to capture different sorts of message.

Change the variable "chat_world" to be the name of the world chats are to go to.
]]>
</description>

</plugin>

<triggers>
  <trigger
   enabled="y"
   keep_evaluating="y"
   match="^\((.*)\/(.*)\)\:(.*)$"
   omit_from_output="y"
   regexp="y"
   script="redirect"
   sequence="100"
  >
  <send></send>
  </trigger>
  <trigger
   enabled="y"
   group="LogChat"
   keep_evaluating="y"
   match="^\* (.*) (.*)$"
   omit_from_output="y"
   regexp="y"
   script="redirect"
   sequence="100"
  >
  <send></send>
  </trigger>
  <trigger
   enabled="y"
   match="^(.*?) (say|ooc|yell|shout|ghosttalk|tell)(.*?)$"
   omit_from_output="y"
   regexp="y"
   script="redirect"
   sequence="100"
  >
  </trigger>
</triggers>

<!--  Script  -->


<script>
<![CDATA[
chat_world = "Dark-Legacy Chats"
local first_time = true

function redirect (name, line, wildcards, styles)

  local w = GetWorld (chat_world)

  if first_time and not w then
    local filename = GetInfo (67) .. chat_world .. ".mcl"
    Open (filename)
    w = GetWorld (chat_world)
    if not w then
      ColourNote ("white", "red", "Can't open chat world file: " .. filename)
      first_time = false
    end
  end

  if w then
    for _, v in ipairs (styles) do
      w:ColourTell (RGBColourToName (v.textcolour),
                    RGBColourToName (v.backcolour),
                    v.text) 
    end
    w:Note ("")

  end

end

]]>
</script>
</muclient>

once you have done that, the rest is simple just go back to MUSH, go to CTRL+ALT+G (global preferences) again and this time open the plugins tab, import the xml file, restart mushclient and TADA. now just configure the output of the new world to your liking.


NOTE1: if you want chats to be visible in the main world, then remove the " omit_from_output="y"" line from the triggers individually...

NOTE2: if you want to add in other chat support, simply add the appropriate triggers to the trigger section and have them set to redirect where applicable (the script="" line).

THIS DOES WORK IN LINUX THROUGH WINE KERPWN

Raolas (#2)

#2
🖼 Archived external image reference (img507.imageshack.us/screenshotiv3.png)

Chilliwack (#3)

#3
or, in zmud,
CODE · MUD Output
#TRIGG {*oocs '*'} {#CAP chat}
!!!
Check it ouuuuut

lingolas (#4)

#4
i'm using mushclient right now but i cant get it right.
It keeps on saying "Can't open chat world file: C:\Program Files\MUSHclient\worlds\Dark-Legacy Chats.ml"

Chilliwack (#5)

#5
shouldn't it be an xml? (i don't know anything about MUSH, but i think they do use xml)

Raolas (#6)

#6
well, to reply to lingolas thats because of your typo...


it's not .ml it's .mcl


and to reply to chilli...

it does use XMLs however, it only uses them as the plug-in file, the output is to a secondary MCL file that you have running in Mush at the same time.