Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Chat redirect

Chat redirect

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


Posted by Lukant   (3 posts)  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
Top

Posted by Nick Gammon   Australia  (23,173 posts)  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
Top

Posted by Lukant   (3 posts)  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>
Top

Posted by Lukant   (3 posts)  Bio
Date Reply #3 on Sat 04 Feb 2017 05:57 PM (UTC)
Message
http://imgur.com/a/W6hlZ
Top

Posted by Nick Gammon   Australia  (23,173 posts)  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
Top

Posted by Nick Gammon   Australia  (23,173 posts)  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
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.


22,004 views.

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

Go to topic:           Search the forum


[Go to top] top

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