Files
Mush-Soundpack/cosmic rage/worlds/plugins/CaptureMudOutput.xml

111 lines
2.5 KiB
XML
Raw Normal View History

2025-07-01 23:28:00 +03:00
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Sunday, March 08, 2009, 1:14 PM -->
<!-- MuClient version 4.40 -->
<!-- Plugin "CaptureMudOutput" generated by Plugin Wizard -->
<muclient>
<plugin
name="CaptureMudOutput"
author="Sean randall"
id="fb1229fd8aa21fed1531db5c"
language="lua"
purpose="Allows quick logging of text from the connected world to a notepad window."
date_written="2009-03-08 13:09:30"
requires="4.40"
version="1.0"
>
<description trim="y">
<![CDATA[
I used this code as a script on a few MOOs I played.
The Plugin has one command, which is the abbreviation cmo. This needs to be typed by itself, without the period, in lower case.
Typing it once sets the plugin to "on" and anything received from the MUD that you haven't gagged will be appended to a notepad window. if you type it again, the appending will stop and the notepad will be activated.
The next time you turn it on, it will append - if the notepad was closed meantime it will create a new one.
At present this only works in one world at a time and doesn't check for an overfull notepad but it works welle enough for code listings, lists (from skills, spells, shops) etc.
]]>
</description>
</plugin>
<!-- Get our standard constants -->
<include name="constants.lua"/>
<!-- Aliases -->
<aliases>
<alias
script="CMOProcessor"
match="^cmo$"
enabled="y"
omit_from_command_history="y"
omit_from_log="y"
regexp="y"
omit_from_output="y"
sequence="100"
>
</alias>
</aliases>
<!-- Script -->
<script>
<![CDATA[
pad=""
cmostate = 0
function CMOProcessor(name, line, wildcards)
if line ~= "cmo" then return end
pad = "Output from "..world.GetInfo(2)
if cmostate == 0 then
Note("Now capturing Output.")
if world.GetNotepadLength(pad) > 0 then
Note("Output will be appended to the existing notepad.")
end
cmostate = 1
else
cmostate = 0
Note("Capturing has been turned off.")
if world.GetNotepadLength(pad) > 0 then
world.ActivateNotepad(pad)
else
Note("Nothing was captured.")
end
end
end
function OnPluginScreendraw (t, log, line)
if cmostate ~= 1 then return end
pad = "Output from "..world.GetInfo(2)
world.AppendToNotepad(pad,line.."\r\n")
end
]]>
</script>
<!-- Plugin help -->
<aliases>
<alias
script="OnHelp"
match="cmo:help"
enabled="y"
>
</alias>
</aliases>
<script>
<![CDATA[
function OnHelp (sName, sLine, wildcards)
world.Note (world.GetPluginInfo (world.GetPluginID, 3))
end
]]>
</script>
</muclient>