Dark Legacy MUD Forum
http://forums.dark-legacy.com/phpBB3/

MUSHclient chats in another window.
http://forums.dark-legacy.com/phpBB3/viewtopic.php?f=1&t=7580
Page 1 of 1

Author:  Raolas [ Tue Mar 18, 2008 12:48 pm ]
Post subject:  MUSHclient chats in another window.

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:
<?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

Author:  Raolas [ Tue Mar 18, 2008 5:24 pm ]
Post subject:  Re: MUSHclient chats in another window.

Image

Author:  Chilliwack [ Wed Mar 19, 2008 11:08 am ]
Post subject:  Re: MUSHclient chats in another window.

or, in zmud,
Code:
#TRIGG {*oocs '*'} {#CAP chat}

!!!

Author:  lingolas [ Wed May 07, 2008 6:24 pm ]
Post subject:  Re: MUSHclient chats in another window.

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"

Author:  Chilliwack [ Sun May 18, 2008 2:34 pm ]
Post subject:  Re: MUSHclient chats in another window.

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

Author:  Raolas [ Tue Jun 17, 2008 10:29 am ]
Post subject:  Re: MUSHclient chats in another window.

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.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/