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.
Entire forum
➜ MUSHclient
➜ General
➜ Subwindows
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| BlueEyes
(28 posts) Bio
|
Date
| Fri 14 Aug 2009 02:09 AM (UTC) |
Message
| I have made a seperate Mushclient window that captures all my says/tells/yells/city/etc. now in my chat window rather than having a space between each "segment" it gets all bunched together like this.
(Skeleton Hearth): -- says, "Cause I forgot about the sub."
(Skeleton Hearth): -- says, "So if I said you were a cow you wouldn't be offended?"
(Market): -- says, "Adept alchemist for hire!"
(Skeleton Hearth): -- says, "I can't even tell if you said I was a crow."
(Skeleton Hearth): -- says, "Or a cow."
(Dawneye Tribe): -- says, "I bet -- did it!"
Now what I want to do is have it put a space between it all..... also I have made another window that captures stuff when I am attacking my own target so I'm not consumed with spam. The problem I am having is the trigger in window everything is sent to works.. I can sent the text, but I want it to ColourNote or something so I can see it easier. | Top |
|
Posted by
| Blainer
(191 posts) Bio
|
Date
| Reply #1 on Fri 14 Aug 2009 02:15 AM (UTC) |
Message
| What do you mean segment? | Top |
|
Posted by
| BlueEyes
(28 posts) Bio
|
Date
| Reply #2 on Fri 14 Aug 2009 03:44 AM (UTC) |
Message
| So it would look like
(Talky): Talk talk talk
(Talky): Talk talk talk
(Talky): Talk talk talk
(Talky): Talk talk talk
(Talky): Talk talk talk | Top |
|
Posted by
| Blainer
(191 posts) Bio
|
Date
| Reply #3 on Fri 14 Aug 2009 04:31 AM (UTC) Amended on Fri 14 Aug 2009 04:33 AM (UTC) by Blainer
|
Message
| Can you post what you have so far?
It looks like you just want a blank line after each message?
| Top |
|
Posted by
| BlueEyes
(28 posts) Bio
|
Date
| Reply #4 on Fri 14 Aug 2009 05:06 AM (UTC) Amended on Fri 14 Aug 2009 05:19 AM (UTC) by BlueEyes
|
Message
| Exactly
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Thursday, August 13, 2009, 5:40 AM -->
<!-- MuClient version 4.40 -->
<!-- Plugin "Chats" generated by Plugin Wizard -->
<muclient>
<plugin
name="Chats"
author="Liam"
id="a4384ef6e87b564e4d9a9396"
language="Lua"
purpose="Chat funnel"
date_written="2009-08-13 05:39:57"
requires="4.40"
version="1.0"
>
</plugin>
<!-- Get our standard constants -->
<include name="constants.lua"/>
<!-- Triggers -->
<triggers>
<trigger
enabled="y"
match="(*): *"
omit_from_output="y"
script="chat"
send_to="12"
sequence="100"
>
<send>a
</send>
</trigger>
<trigger
enabled="y"
match="*, "*""
omit_from_output="y"
script="chat"
send_to="12"
sequence="100"
>
<send>a
</send>
</trigger>
</triggers>
<!-- Script -->
<script>
<![CDATA[
function chat (name, line, wildcards, styles)
local w = GetWorld ("chat")
if w then
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
]]>
</script>
</muclient>
| Top |
|
Posted by
| Twisol
USA (2,257 posts) Bio
|
Date
| Reply #5 on Fri 14 Aug 2009 05:30 PM (UTC) |
Message
| Instead of w:Note(""), try w:Note("\n"), or just have two w:Note() calls. That'll effectively put out two newlines. |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | Top |
|
Posted by
| BlueEyes
(28 posts) Bio
|
Date
| Reply #6 on Sat 15 Aug 2009 04:26 AM (UTC) |
Message
| Didn't work. I tryed it with the triggers and with the script. | Top |
|
Posted by
| Nick Gammon
Australia (23,121 posts) Bio
Forum Administrator |
Date
| Reply #7 on Sat 15 Aug 2009 04:37 AM (UTC) |
Message
| This does a single line:
if w then
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
Adding a new Note should add a blank line. It *will* add a blank line. ;)
if w then
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
w:Note ("") -- add a blank line
end -- world found
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| BlueEyes
(28 posts) Bio
|
Date
| Reply #8 on Sat 15 Aug 2009 09:12 AM (UTC) |
Message
| Ah there we go, it wasn't working for a bit, but I forgot to reinstall the plugin, thanks for the help! Now is it possible for me chat world to capture triggers and do like a ColourNote or something? | Top |
|
Posted by
| Nick Gammon
Australia (23,121 posts) Bio
Forum Administrator |
Date
| Reply #9 on Sat 15 Aug 2009 09:20 PM (UTC) |
Message
| Triggers are not triggered on notes, so that wouldn't work directly (otherwise they might go into a loop, if a trigger fired on a note, and did another note).
If you want the chat messages in a different colour you could do that in the main world plugin. In other words, instead of RGBColourToName (v.textcolour) you could do something like see what sort of chat it is and change the colour to something else. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| BlueEyes
(28 posts) Bio
|
Date
| Reply #10 on Sun 16 Aug 2009 03:44 AM (UTC) Amended on Sun 16 Aug 2009 04:30 AM (UTC) by Nick Gammon
|
Message
| Well what I want is for combat so here is an example.
<triggers>
<trigger
enabled="y"
match="^(.*?) knocking him to the ground\.$"
regexp="y"
send_to="12"
sequence="100"
>
<send>colourtell "red", "black", "--------------"
colourtell "red", "black", " KNOCKDOWN!!!!! "
colourtell "red", "black", "--------------"
colourtell "red", "black", " "</send>
</trigger>
</triggers>
Thats my trigger for my main world... now I want it to show up in a seperate window so I dont get spammed to death. | Top |
|
Posted by
| Nick Gammon
Australia (23,121 posts) Bio
Forum Administrator |
Date
| Reply #11 on Sun 16 Aug 2009 04:32 AM (UTC) |
Message
| Have you switched to VBscript, or is that just a very rough example? ColourTell has to be spelt with the correct capitalization.
And you probably want ColourNote anyway, otherwise it all goes on the same line.
Anyway, you just can do the same general idea:
local w = GetWorld ("chat")
if w then
w:ColourNote ( "red", "black", "--------------")
w:ColourNote ( "red", "black", " KNOCKDOWN!!!!! ")
w:ColourNote ( "red", "black", "--------------")
w:ColourNote ( "red", "black", " ")
end -- if world exists
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| BlueEyes
(28 posts) Bio
|
Date
| Reply #12 on Sun 16 Aug 2009 09:28 PM (UTC) |
Message
| Sorry about the scripting mix up. I forgot my main world was in VB script were I was testing ideas, I'm making a new one with Lua and starting from nothing to cure faster... etc.etc. | 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.
30,696 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top