Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mudlet:chat_capture_window [2021/07/11 20:30] – Adding copy/pasteable LUA code. paradox | mudlet:chat_capture_window [2023/11/05 22:08] (current) – [Advanced: Adding Timestamps] math | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Chat Capture Window Mudlet Script ====== | ====== Chat Capture Window Mudlet Script ====== | ||
- | | + | |
+ | Let's walk through setting up Mudlet to separate channel output for '' | ||
+ | |||
+ | ===== Create a Window Script ===== | ||
+ | |||
+ | - Connect to the MUD with your existing Mudlet profile | ||
+ | | ||
+ | - Click the "add item" button to create a new script. | ||
+ | - Enter a name, like //" | ||
+ | - In //"Add User Event Handler:"// | ||
+ | - Click the " | ||
+ | - Copy in the following source code to the text area.< | ||
function make_chat_window() | function make_chat_window() | ||
chat_window = Geyser.UserWindow: | chat_window = Geyser.UserWindow: | ||
Line 8: | Line 19: | ||
height = " | height = " | ||
dockPosition = " | dockPosition = " | ||
+ | autoWrap = true, | ||
}) | }) | ||
chat_window: | chat_window: | ||
Line 16: | Line 28: | ||
</ | </ | ||
- Your scripts setting pages should now look exactly like this: {{mudlet: | - Your scripts setting pages should now look exactly like this: {{mudlet: | ||
- | - Open the " | + | - Click the "Save Item" button |
+ | |||
+ | ===== Create a [chat] Capture Trigger ===== | ||
+ | |||
+ | - Click the " | ||
+ | - Click the "add item" button. | ||
+ | - Give your trigger | ||
+ | - In the first pattern, enter a channel name as it appears in game: < | ||
+ | - Leave everything else empty. | ||
+ | - Copy in the following code to the textarea: < | ||
if(chat_window) | if(chat_window) | ||
then | then | ||
Line 25: | Line 46: | ||
</ | </ | ||
- Your triggers settings page should now look exactly like this: {{mudlet: | - Your triggers settings page should now look exactly like this: {{mudlet: | ||
+ | - Click save item. | ||
- You may need to reconnect to the MUD to get the window to appear. | - You may need to reconnect to the MUD to get the window to appear. | ||
- | - Add other patterns | + | |
+ | ===== Advanced: Adding Timestamps ===== | ||
+ | |||
+ | To add timestamps | ||
+ | < | ||
+ | copy() | ||
+ | chat_window: | ||
+ | </ | ||
+ | in the previous examples with | ||
+ | < | ||
+ | echo(" | ||
+ | </ | ||
+ | Check the Mudlet Lua documentation to see more formatting options | ||
+ | |||
+ | ===== Capture Additional Channels ===== | ||
+ | |||
+ | To capture additional | ||
+ | |||
+ | ===== Styling the Capture Window ===== | ||
+ | |||
+ | Here's an example of adding additional styling to the chat capture window. | ||
+ | |||
+ | **NOTE: Requires Mudlet 4.10+ and Linux - will not work on older Mudlet or MacOS/ | ||
+ | |||
+ | - Open the " | ||
+ | - Change your "Chat Capture Window" | ||
+ | chat_window = Geyser.UserWindow: | ||
+ | name = " | ||
+ | titleText = " | ||
+ | docked = true, | ||
+ | height = " | ||
+ | dockPosition = " | ||
+ | }) | ||
+ | |||
+ | chat_window: | ||
+ | background-color: | ||
+ | border-width: | ||
+ | border-color: | ||
+ | border-style: | ||
+ | border-radius: | ||
+ | ]]) | ||
+ | |||
+ | chat_window: | ||
+ | return 1 | ||
+ | end | ||
+ | |||
+ | make_chat_window() | ||
+ | </ |