Dark Legacy MUD Forum


Multi User Fantasy Text Game
It is currently Mon Dec 06, 2021 11:54 am

All times are UTC





Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: MUSHclient chats in another window.
PostPosted: Tue Mar 18, 2008 12:48 pm 
Offline
Newbie
 Profile

Joined: Fri Jun 01, 2007 1:16 pm
Posts: 29
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


Last edited by Raolas on Wed Mar 19, 2008 10:59 am, edited 2 times in total.

Top
 

 Post subject: Re: MUSHclient chats in another window.
PostPosted: Tue Mar 18, 2008 5:24 pm 
Offline
Newbie
 Profile

Joined: Fri Jun 01, 2007 1:16 pm
Posts: 29
Image


Top
 

 Post subject: Re: MUSHclient chats in another window.
PostPosted: Wed Mar 19, 2008 11:08 am 
Offline
Tri-Avatar
User avatar
 E-mail  WWW  Profile

Joined: Tue Aug 02, 2005 4:46 am
Posts: 705
Location: Ottawa, Ontario
or, in zmud,
Code:
#TRIGG {*oocs '*'} {#CAP chat}

!!!

_________________
Check it ouuuuut


Top
 

 Post subject: Re: MUSHclient chats in another window.
PostPosted: Wed May 07, 2008 6:24 pm 
Offline
Dual-Avatar
User avatar
 WWW  Profile

Joined: Tue Sep 21, 2004 12:28 am
Posts: 449
Location: Irvine, orange county, California
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"


Top
 

 Post subject: Re: MUSHclient chats in another window.
PostPosted: Sun May 18, 2008 2:34 pm 
Offline
Tri-Avatar
User avatar
 E-mail  WWW  Profile

Joined: Tue Aug 02, 2005 4:46 am
Posts: 705
Location: Ottawa, Ontario
shouldn't it be an xml? (i don't know anything about MUSH, but i think they do use xml)

_________________
Check it ouuuuut


Top
 

 Post subject: Re: MUSHclient chats in another window.
PostPosted: Tue Jun 17, 2008 10:29 am 
Offline
Newbie
 Profile

Joined: Fri Jun 01, 2007 1:16 pm
Posts: 29
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.


Top
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC



Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group  
Design By Poker Bandits