You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
196 lines
7.0 KiB
196 lines
7.0 KiB
2 years ago
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||
|
<!DOCTYPE muclient>
|
||
|
<!-- Saved on Wednesday, March 09, 2022, 11:04 AM -->
|
||
|
<!-- MuClient version 5.07-pre -->
|
||
|
|
||
|
<!-- Plugin "RoomCharWindow" generated by Plugin Wizard -->
|
||
|
|
||
|
<muclient>
|
||
|
<plugin
|
||
|
name="RoomWindow"
|
||
|
author="Crowley"
|
||
|
id="456ef9dc8cbbde2bfb90f5a6"
|
||
|
language="Lua"
|
||
|
purpose="Room items output"
|
||
|
save_state="y"
|
||
|
date_written="2022-03-09 11:02:09"
|
||
|
requires="5.07"
|
||
|
version="1.0"
|
||
|
>
|
||
|
|
||
|
</plugin>
|
||
|
|
||
|
|
||
|
<!-- Triggers -->
|
||
|
|
||
|
<triggers>
|
||
|
<trigger
|
||
|
group="RoomChars"
|
||
|
keep_evaluating="y"
|
||
|
match="^(.*?)$"
|
||
|
name="charCapture"
|
||
|
omit_from_output="y"
|
||
|
regexp="y"
|
||
|
send_to="14"
|
||
|
sequence="100"
|
||
|
>
|
||
|
<send>if not string.find("%1", "roomchars") then
|
||
|
roomCharsWin:add_text(TriggerStyleRuns, false)
|
||
|
end</send>
|
||
|
</trigger>
|
||
|
<trigger
|
||
|
group="RoomChars"
|
||
|
keep_evaluating="y"
|
||
|
match="{/roomchars}"
|
||
|
name="charEnd"
|
||
|
send_to="12"
|
||
|
sequence="100"
|
||
|
>
|
||
|
<send>
|
||
|
EnableTrigger("charCapture", false)
|
||
|
EnableTrigger("charEnd", false)
|
||
|
|
||
|
if #roomCharsWin:get_text() == 0 then
|
||
|
roomCharsWin:add_text("No room characters to display.", false)
|
||
|
end
|
||
|
roomCharsWin:fit_contents(835, 250)
|
||
|
roomCharsWin:set_scroll(1)
|
||
|
roomCharsWin:show()
|
||
|
</send>
|
||
|
</trigger>
|
||
|
<trigger
|
||
|
group="RoomChars"
|
||
|
keep_evaluating="y"
|
||
|
match="{roomchars}"
|
||
|
name="charStart"
|
||
|
omit_from_output="y"
|
||
|
send_to="12"
|
||
|
sequence="100"
|
||
|
>
|
||
|
<send>
|
||
|
EnableTrigger("charStart", false)
|
||
|
EnableTrigger("charCapture")
|
||
|
EnableTrigger("charEnd")
|
||
|
</send>
|
||
|
</trigger>
|
||
|
|
||
|
<trigger
|
||
|
group="RoomObjs"
|
||
|
keep_evaluating="y"
|
||
|
match="^(.*?)$"
|
||
|
name="objCapture"
|
||
|
omit_from_output="y"
|
||
|
regexp="y"
|
||
|
send_to="14"
|
||
|
sequence="100"
|
||
|
>
|
||
|
<send>if not string.find("%1", "roomobjs") then
|
||
|
roomObjsWin:add_text(TriggerStyleRuns, false)
|
||
|
end</send>
|
||
|
</trigger>
|
||
|
<trigger
|
||
|
group="RoomObjs"
|
||
|
keep_evaluating="y"
|
||
|
match="{/roomobjs}"
|
||
|
name="objEnd"
|
||
|
send_to="12"
|
||
|
sequence="100"
|
||
|
>
|
||
|
<send>
|
||
|
EnableTrigger("objCapture", false)
|
||
|
EnableTrigger("objEnd", false)
|
||
|
|
||
|
if #roomObjsWin:get_text() == 0 then
|
||
|
roomObjsWin:add_text("No room objects to display.", false)
|
||
|
end
|
||
|
roomObjsWin:fit_contents(835, 250)
|
||
|
roomObjsWin:set_scroll(1)
|
||
|
roomObjsWin:show()
|
||
|
</send>
|
||
|
</trigger>
|
||
|
<trigger
|
||
|
enabled="n"
|
||
|
group="RoomObjs"
|
||
|
keep_evaluating="y"
|
||
|
match="{roomobjs}"
|
||
|
name="objStart"
|
||
|
omit_from_output="y"
|
||
|
send_to="12"
|
||
|
sequence="100"
|
||
|
>
|
||
|
<send>
|
||
|
EnableTrigger("objStart", false)
|
||
|
EnableTrigger("objCapture")
|
||
|
EnableTrigger("objEnd")
|
||
|
</send>
|
||
|
</trigger>
|
||
|
</triggers>
|
||
|
|
||
|
<script>
|
||
|
<![CDATA[
|
||
|
require 'themed_miniwindows'
|
||
|
|
||
|
|
||
|
function onPluginInstall()
|
||
|
roomCharsWin = ThemedTextWindow(
|
||
|
"RoomChars", -- string, required, a unique identifier for this window
|
||
|
200, -- integer, required, where to put it if the player hasn't moved it
|
||
|
200, -- integer, required, where to put it if the player hasn't moved it
|
||
|
835, -- integer, required, how big to make it if the player hasn't moved it
|
||
|
250, -- integer, required, how big to make it if the player hasn't moved it
|
||
|
"Room Characters", -- string, optional (nil means no titlebar), text to put into the title
|
||
|
"center", -- string, optional (default is "center"), "left", "center", or "right"
|
||
|
true, -- boolean, optional (default is false), true adds a close button in the top left
|
||
|
false, -- boolean, optional (default is false), make the window resizeable
|
||
|
true, -- boolean, optional (default is false), add a scrollbar and mousewheel scrolling
|
||
|
true, -- boolean, optional (default is false), make the text selectable
|
||
|
true, -- boolean, optional (default is false), make the text copyable via right-click
|
||
|
false, -- boolean, optional (default is false), turn detected URLs into clickable links
|
||
|
true, -- boolean, optional (default is false), automatically wrap text lines that are too wide
|
||
|
"Bitstream Vera Sans Mono", -- string, optional (default is Dina), override the title font name
|
||
|
10, -- integer, optional (default is 10), override the title font size
|
||
|
"Bitstream Vera Sans Mono", -- string, optional (default is Dina), override the body text font name
|
||
|
10, -- integer, optional (default is 10), override the body text font size
|
||
|
1000, -- integer, optional (default is 1000), maximum number of text lines to keep
|
||
|
5, -- integer, optional (default is 5 pixels), space between text and miniwindow frame
|
||
|
true -- boolean, optional (default is false), true will prevent the window from appearing until you call :show() on it
|
||
|
)
|
||
|
|
||
|
roomObjsWin = ThemedTextWindow(
|
||
|
"RoomObjs", -- string, required, a unique identifier for this window
|
||
|
200, -- integer, required, where to put it if the player hasn't moved it
|
||
|
200, -- integer, required, where to put it if the player hasn't moved it
|
||
|
835, -- integer, required, how big to make it if the player hasn't moved it
|
||
|
250, -- integer, required, how big to make it if the player hasn't moved it
|
||
|
"Room Objects", -- string, optional (nil means no titlebar), text to put into the title
|
||
|
"center", -- string, optional (default is "center"), "left", "center", or "right"
|
||
|
true, -- boolean, optional (default is false), true adds a close button in the top left
|
||
|
false, -- boolean, optional (default is false), make the window resizeable
|
||
|
true, -- boolean, optional (default is false), add a scrollbar and mousewheel scrolling
|
||
|
true, -- boolean, optional (default is false), make the text selectable
|
||
|
true, -- boolean, optional (default is false), make the text copyable via right-click
|
||
|
false, -- boolean, optional (default is false), turn detected URLs into clickable links
|
||
|
true, -- boolean, optional (default is false), automatically wrap text lines that are too wide
|
||
|
"Bitstream Vera Sans Mono", -- string, optional (default is Dina), override the title font name
|
||
|
10, -- integer, optional (default is 10), override the title font size
|
||
|
"Bitstream Vera Sans Mono", -- string, optional (default is Dina), override the body text font name
|
||
|
10, -- integer, optional (default is 10), override the body text font size
|
||
|
1000, -- integer, optional (default is 1000), maximum number of text lines to keep
|
||
|
5, -- integer, optional (default is 5 pixels), space between text and miniwindow frame
|
||
|
true -- boolean, optional (default is false), true will prevent the window from appearing until you call :show() on it
|
||
|
)
|
||
|
end
|
||
|
|
||
|
function OnPluginBroadcast(msg, id, name, text)
|
||
|
if (text == 'room.info') then
|
||
|
EnableTrigger("charStart")
|
||
|
EnableTrigger("objStart")
|
||
|
if not WindowInfo("RoomChars", 1) or not WindowInfo("RoomObjs", 1) then onPluginInstall() end
|
||
|
roomCharsWin:clear()
|
||
|
roomObjsWin:clear()
|
||
|
end
|
||
|
end
|
||
|
]]>
|
||
|
</script>
|
||
|
</muclient>
|