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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Separate Chat Window

Separate Chat Window

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


Posted by Kaine   (4 posts)  [Biography] 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.
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] 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
[Go to top] top

Posted by Kaine   (4 posts)  [Biography] 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>
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] 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
[Go to top] top

Posted by Kaine   (4 posts)  [Biography] 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?
[Go to top] top

Posted by Kaine   (4 posts)  [Biography] 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.
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] 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
[Go to top] top

Posted by SierraK   (8 posts)  [Biography] 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.
[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.


23,347 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 HostDash]