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.
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.
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.
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.
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
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?
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.