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
➜ Separate Chat Window
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Kaine
(4 posts) Bio
|
Date
| Sat 29 Jul 2017 05:41 AM (UTC) Amended on Sat 29 Jul 2017 06:11 AM (UTC) by Kaine
|
Message
| Hey there,
I'm going to be 100% honest here. I am totally new to this, You are welcome to be frustrated with my incompetence. I started playing the Two Towers MUD and have been looking for a way to have a separate window for chat messages. I found the following thread: https://mushclient.com/forum/?id=7991
I followed the steps there as closely as I could but I can't seem to get it to work at all. I got all the way through seemingly without a problem however still no chat messages will appear in my RoD Chats.MCL window. I have no idea what I did wrong. I'm not even sure if this is the right place to ask for assistance, the original thread has been closed. But I don't know where else to ask. I can provide more detail as necessary if anyone is inclined to help me out.
After a while tinkering hopelessly on my own I decided to ask for help here as I clearly have no idea what I'm doing. Any help I get is very much appreciated.
I could paste what the plugin looks like here But I only copied it, so its exactly the same as what is in the link above. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sat 29 Jul 2017 05:53 AM (UTC) |
Message
| Almost certainly, the trigger isn't matching what you are seeing. To help you, we need to see an example (copy and paste) of what a chat looks like on your MUD.
Did you use the very first plugin shown on the page you linked? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Kaine
(4 posts) Bio
|
Date
| Reply #2 on Sat 29 Jul 2017 06:16 AM (UTC) Amended on Sat 29 Jul 2017 06:44 AM (UTC) by Kaine
|
Message
| Yes I used the first plugin. I will copy and paste it straight from my "Chat_Redirector.xml" that I saved in my plugins folder under "worlds" So you can see what is up.
I'm not sure what else to copy and paste here for you. Was this what you needed? Will just any chat that I have had on the MUD do? I can bring up my tell history and such if you need that. Like I said, I am new to this. I hope I understood you correctly.
I wonder if it would help if I gave a list of the chat commands that I want to be included in it?
<?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
name="Chat_Redirector"
author="Nick Gammon"
id="cb84a526b476f69f403517da"
language="Lua"
purpose="Redirects chat messages to another world"
date_written="2007-06-30 10:45: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 -->
<triggers>
<trigger
enabled="y"
match="^[A-Za-z]+ (says|chats|yells) \'(.*?)\'$"
regexp="y"
script="redirect"
sequence="100"
>
</trigger>
<trigger
enabled="y"
match="^You (say|chat|yell) \'(.*?)\'$"
regexp="y"
script="redirect"
sequence="100"
>
</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
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #3 on Sat 29 Jul 2017 02:10 PM (UTC) |
Message
| To help you, we need to see an example (copy and paste) of what a chat looks like on your MUD. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Kaine
(4 posts) Bio
|
Date
| Reply #4 on Sat 29 Jul 2017 11:43 PM (UTC) Amended on Sun 30 Jul 2017 05:58 AM (UTC) by Kaine
|
Message
| Sorry I must have misread the previous message. This is a short copy and paste of what my MUD looked like. That's both guild chat, regular "say" chat and OOC Global chat as well as emotes and the like (All of which would be cool to have included in a separate window) Can post more examples if you need.
salute
You salute in a manner befitting a Page of Dol Amroth.
HP:220 EP:220>
'Greetings
You say in Westron: Greetings
HP:220 EP:220> [ Knights ] Selen: Greetings, Sir Welsh.
[ Knights ] Welsh: Well met!
Selen says: Greetings.
[ Knights ] Welsh: Ah, good to see you both!
[ Knights ] Welsh: How is everything?
Selen smiles warmly at you.
The east door swings open.
Welsh enters.
Welsh closes the east door.
Welsh smiles warmly.
Welsh will be right back...
Welsh opens the east door.
Welsh leaves east.
The east door swings shut.
$Hope you are both well
[ Knights ] Akathor: Hope you are both well
^ (OOC) Baklen: I hate not remembering alts.
^ (OOC) Baklen: Who runs this place now? | Top |
|
Posted by
| Kaine
(4 posts) Bio
|
Date
| Reply #5 on Wed 02 Aug 2017 02:54 PM (UTC) |
Message
| I hope that's enough information for you guys, any help is still much appreciated. | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #6 on Wed 02 Aug 2017 05:17 PM (UTC) Amended on Wed 02 Aug 2017 07:15 PM (UTC) by Fiendish
|
Message
| Nick was right. Your trigger patterns aren't even close to matching what your server is sending you. Your goal should be to make the "match=" lines in your triggers be valid regular expressions accurately describing the lines that you want to capture.
^[A-Za-z]+ (says|chats|yells) \'(.*?)\'$
and^You (say|chat|yell) \'(.*?)\'$
do not accurately describe any of the lines you showed.
Maybe an interactive regex tester will help get through that part. Try something like http://regex101.com/
Nick has a descriptive guide here: http://www.mushclient.com/forum/bbshowpost.php?bbsubject_id=5089 |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #7 on Wed 02 Aug 2017 09:33 PM (UTC) Amended on Wed 02 Aug 2017 09:35 PM (UTC) by Nick Gammon
|
Message
| That link is also: http://www.gammon.com.au/regexp
I agree with Fiendish. An example line from your chat:
You say in Westron: Greetings
So a regexp that might work would be:
^[A-Za-z]+ say in [A-Za-z]+: (.*?)$
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| SierraK
(8 posts) Bio
|
Date
| Reply #8 on Tue 19 Sep 2017 07:02 PM (UTC) |
Message
| Hey. I cobbled together a thing to do exactly this and put it into that same plugin. Here's a copy of the trigger I use. I would recommend adding [knight]* and others.
<trigger
enabled="y"
match="[Civic]*"
omit_from_output="y"
regexp="n"
script="redirect"
sequence="100"
>
</trigger>
Hope this helps. If you still can't get it let me know and I'll help if I can. Email is prob better for getting in touch with me. | 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.
26,987 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top