Multiple Windows for Newbies?

Posted by Smoothfonzo on Wed 04 Feb 2009 04:02 AM — 7 posts, 26,135 views.

#0
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?
Australia Forum Administrator #1
See http://mushclient.com/faq point 23.
#2
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.
Amended on Thu 05 Feb 2009 11:10 PM by Smoothfonzo
Australia Forum Administrator #3
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="&lt;chat&gt; *"
   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?
#4
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?
Australia Forum Administrator #5
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.
#6
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 :)