Chat redirect

Posted by Lukant on Sat 04 Feb 2017 06:15 AM — 6 posts, 22,446 views.

#0
I play a M.U.D. called "Anime Planet" and would love if i could get some help get the chat redirect to work. Only music and ooc are working, any help would be lovely.

Sincerely - Lukant the code illiterate.

the games address is:

Name - anime planet
address - animeplanet.co
port - 3334
Australia Forum Administrator #1
Can you give more details? What does chat look like exactly? (Copy and paste).

What redirect plugin are you using? (link)
#2

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE muclient>

<!-- Saved on Saturday, June 30, 2007, 10:48 -->

<!-- MuClient version 4.13 -->

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

<!-- Edit plugin and change "chat_world" variable to be the name of the world you want chats to go to. -->

-<muclient>


-<plugin language="Lua" version="1.0" requires="4.08" date_written="2007-06-30 10:45:35" purpose="Redirects chat messages to another world" id="cb84a526b476f69f403517da" author="Nick Gammon" name="Chat_Redirector">


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



-<triggers>

<trigger sequence="100" script="redirect" regexp="y" match="^[A-Za-z]+ (|MUSIC:| say |yells|OOC|tells) \'(.*?)\'$" enabled="y"> </trigger>

<trigger sequence="100" script="redirect" regexp="y" match="^You ( say |yell |OOC|MUSIC:|tell ) \'(.*?)\'$" enabled="y"> </trigger>

</triggers>

<!-- Script -->



-<script>

-<![CDATA[
chat_world = "RoD chats"
local first_time = true

function redirect (name, line, wildcards, styles)

  -- try to find "chat" world
  local w = GetWorld (chat_world)  -- get "chat" world

  -- if not found, try to open it
  if first_time and not w then
    local filename = GetInfo (67) .. chat_world .. ".mcl"
    Open (filename)
    w = GetWorld (chat_world)  -- try again
    if not w then
      ColourNote ("white", "red", "Can't open chat world file: " .. filename)
      first_time = false  -- don't repeatedly show failure message
    end -- can't find world 
  end -- can't find world first time around

  if w then  -- if present
    for _, v in ipairs (styles) do
      w:ColourTell (RGBColourToName (v.textcolour), 
                    RGBColourToName (v.backcolour), 
                    v.text)  
    end -- for each style run
    w:Note ("")  -- wrap up line

  end -- world found

end -- function redirect 

]]>
</script>

</muclient>
Amended on Sat 04 Feb 2017 09:41 PM by Nick Gammon
#3
http://imgur.com/a/W6hlZ
Australia Forum Administrator #4
That screenshot doesn't seem to contain any chatting (plus the left side is cut off).

What would help would be to cut and paste the text (not a screenshot) of something that you want to appear in the chat window, so we can advise you.

For example:


Mary tells you "hello".
Australia Forum Administrator #5
You might find this one better: http://mushclient.com/forum/?id=10728&reply=5#reply5

That uses a miniwindow and is a bit easier to use. You still need to adjust how it matches on chat messages though.