MUSHclient chats in another window.

This is the area for general chatting and discussion

Moderators: Moderators, Caretakers, Imps

Post Reply
Raolas
Newbie
Posts: 29
Joined: Fri Jun 01, 2007 1:16 pm

MUSHclient chats in another window.

Post by Raolas »

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: Select all

<?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
Last edited by Raolas on Wed Mar 19, 2008 10:59 am, edited 2 times in total.
Raolas
Newbie
Posts: 29
Joined: Fri Jun 01, 2007 1:16 pm

Re: MUSHclient chats in another window.

Post by Raolas »

Image
User avatar
Chilliwack
Tri-Avatar
Posts: 705
Joined: Tue Aug 02, 2005 4:46 am
Main Char: Chilliwack
Location: Ottawa, Ontario
Contact:

Re: MUSHclient chats in another window.

Post by Chilliwack »

or, in zmud,

Code: Select all

#TRIGG {*oocs '*'} {#CAP chat}
!!!
Check it ouuuuut
User avatar
lingolas
Dual-Avatar
Posts: 449
Joined: Tue Sep 21, 2004 12:28 am
Location: Irvine, orange county, California
Contact:

Re: MUSHclient chats in another window.

Post by lingolas »

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"
User avatar
Chilliwack
Tri-Avatar
Posts: 705
Joined: Tue Aug 02, 2005 4:46 am
Main Char: Chilliwack
Location: Ottawa, Ontario
Contact:

Re: MUSHclient chats in another window.

Post by Chilliwack »

shouldn't it be an xml? (i don't know anything about MUSH, but i think they do use xml)
Check it ouuuuut
Raolas
Newbie
Posts: 29
Joined: Fri Jun 01, 2007 1:16 pm

Re: MUSHclient chats in another window.

Post by Raolas »

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.
Post Reply