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
➜ Multiple Windows for Newbies?
Multiple Windows for Newbies?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Smoothfonzo
(10 posts) Bio
|
Date
| Wed 04 Feb 2009 04:02 AM (UTC) |
Message
| Hello,
I play DuneMud, and we have a lot of channels for everything, and I'd really like to be able to have channel output on one screen, and battle output on the main screen, since it's very easy to miss what someone is saying if you're not paying attention. In the past, I tried following the instructions, but I wasn't getting very far. I figure, if I know the syntax to have it capture the channels, I could add some channels on my own.
As it is, channels have brackets as prefixes, such as:
[chat]
[atreid] for my guild
[acom] and [hawk] also for my guild.
I'd also like to have tells and replies, as well as when a person says something in the same room (such as <Name> says blah blah blah, <You> say blah blah blah), in a seperate window from channels.
Can anyone help me? | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Wed 04 Feb 2009 05:25 AM (UTC) |
Message
| |
Posted by
| Smoothfonzo
(10 posts) Bio
|
Date
| Reply #2 on Thu 05 Feb 2009 11:09 PM (UTC) Amended on Thu 05 Feb 2009 11:10 PM (UTC) by Smoothfonzo
|
Message
| Ok, I've got it working on two channels in seperate windows. But, let's say I want all my guild related channels to go to one channel, how do I do that?
I'm also noticing that for some reason, it's not autowrapping to the window size and text gets cut off. Even when I have it set to autowrap to window size. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #3 on Fri 06 Feb 2009 02:31 AM (UTC) |
Message
| You can control the notepad window name by using a script and SendToNotepad. Then multiple triggers can send to the same place. Another way would be to use a single trigger with a regular expression to match something or something else.
For example, using SendToNotepad:
<triggers>
<trigger
enabled="y"
match="<chat> *"
send_to="12"
sequence="100"
>
<send>
SendToNotepad ("chats", [=[%1]=])
</send>
</trigger>
</triggers>
As for the wrapping, you mean the main world window? Or the notepad window? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Smoothfonzo
(10 posts) Bio
|
Date
| Reply #4 on Sat 07 Feb 2009 05:01 AM (UTC) |
Message
| Actually, I guess I should have clarified. I'm not using notepad at all. Instead, I used the script you pointed me to to have the channels intercepted to their own windows.
Currently it looks like this: http://img.photobucket.com/albums/v11/tricorder/mcmulti.jpg
In that screenshot, you can see the text being cut off.
So, I guess what I'm wondering is, if there's a way to have multiple channels go to one window.
Currently the two scripts look like this:
<triggers>
<trigger
enabled="y"
match="[chat] *"
send_to="14"
sequence="100"
>
<send>
local w = GetWorld ("[chat]") -- get "[chat]" world
if w then -- if present
for _, v in ipairs (TriggerStyleRuns) do
w:ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
v.text)
end -- for each style run
w:Note ("") -- wrap up line
end -- world found
</send>
</trigger>
</triggers>
<triggers>
<trigger
enabled="y"
match="[atreid] *"
send_to="14"
sequence="100"
>
<send>
local w = GetWorld ("[atreid]") -- get "[atreid]" world
if w then -- if present
for _, v in ipairs (TriggerStyleRuns) do
w:ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
v.text)
end -- for each style run
w:Note ("") -- wrap up line
end -- world found
</send>
</trigger>
</triggers>
Does that allow me to tell it to look for multiple channels? If not, how can I do that easily? Do I have to make seperate triggers to tell it to go to one window? | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #5 on Sat 07 Feb 2009 05:25 AM (UTC) |
Message
| Well in your case it is easiest to look for both channels with a regular expression, like this:
<triggers>
<trigger
enabled="y"
match="^\[(chat|atreid)\] (.*)$"
regexp="y"
send_to="14"
sequence="100"
>
<send>
local w = GetWorld ("[chat]") -- get "[chat]" world
if w then -- if present
w:SetCommandWindowHeight (0)
for _, v in ipairs (TriggerStyleRuns) do
w:ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
v.text)
end -- for each style run
w:Note ("") -- wrap up line
end -- world found
</send>
</trigger>
</triggers>
I have added "w:SetCommandWindowHeight (0)" which gets rid of the command box in the extra windows, which saves space.
As for the wrapping, in your chat world, if you set the wrap column appropriately (by getting the width right, and then clicking on the "Adjust width to size" button) it should wrap properly. It did when I tested it. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Smoothfonzo
(10 posts) Bio
|
Date
| Reply #6 on Sat 07 Feb 2009 06:36 AM (UTC) |
Message
| Wow, thanks. That's exactly what I wanted. Didn't know it was so simple :)
Thanks for the quick response. I do love how you stand by your product :) | 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.
17,921 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top