[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Chat redirect
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Chat redirect

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Lukant   (3 posts)  [Biography] bio
Date Sat 04 Feb 2017 06:15 AM (UTC)
Message
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
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sat 04 Feb 2017 06:22 AM (UTC)
Message
Can you give more details? What does chat look like exactly? (Copy and paste).

What redirect plugin are you using? (link)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Lukant   (3 posts)  [Biography] bio
Date Reply #2 on Sat 04 Feb 2017 04:28 PM (UTC)

Amended on Sat 04 Feb 2017 09:41 PM (UTC) by Nick Gammon

Message

<?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>
[Go to top] top

Posted by Lukant   (3 posts)  [Biography] bio
Date Reply #3 on Sat 04 Feb 2017 05:57 PM (UTC)
Message
http://imgur.com/a/W6hlZ
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Mon 06 Feb 2017 11:17 PM (UTC)
Message
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".

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Mon 06 Feb 2017 11:19 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


1,877 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]