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.
Dillon_Stuff/Aardwolf_Repop_Reporter.xml

187 lines
4.0 KiB

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Wednesday, August 06, 2008, 1:13 PM -->
<!-- MuClient version 4.35 -->
<!-- Plugin "Consider_info" generated by Plugin Wizard -->
<muclient>
<plugin
name="Aardwolf_Repop_Reporter"
author="Mendaloth"
id="ad43a1419028c304a45ef532"
language="Lua"
purpose="Reports when a repop happens to the set channel."
date_written="2008-10-15 07:35"
requires="4.30"
version="1.0"
save_state="y"
>
<description trim="y">
<![CDATA[
Repop Reporter v 1.0
-------------------------------------------------------------------------------
repop help - Displays this message
repop setchan <channel name> - Sets the channel that repop will be reported on.
repop setcolor1 <colorcode> - Sets first color code.
repop setcolor2 <colorcode> - Sets second color code.
-------------------------------------------------------------------------------
]]>
</description>
</plugin>
<!-- Triggers -->
<triggers>
</triggers>
<aliases>
<alias
match="repop help"
enabled="y"
echo_alias="y"
send_to="12"
sequence="101">
<send>
Note(GetPluginInfo(GetPluginID(), 3))
</send>
</alias>
<alias
match="repop setchan *"
enabled="y"
echo_alias="y"
send_to="12"
sequence="101">
<send>
SetVariable("reporting_channel", "%1")
reporting_channel = "%1"
Note("The reporting channel has been set to '".. reporting_channel.. "'.")
</send>
</alias>
<alias
match="repop setcolor1 *"
enabled="y"
echo_alias="y"
send_to="12"
sequence="101">
<send>
SetVariable ("color1", "%1")
color1 = "%1"
Note("Color 1 has been set to '".. color1.. "'.")
</send>
</alias>
<alias
match="repop setcolor2 *"
enabled="y"
echo_alias="y"
send_to="12"
sequence="101">
<send>
SetVariable ("color2", "%1")
color2 = "%1"
Note("Color 2 has been set to '".. color2.. "'.")
</send>
</alias>
</aliases>
<!-- Triggers -->
<triggers>
<trigger
enabled="y"
match="Corrupted horrors and genies rise from the dead to heed the general's call."
omit_from_output="y"
send_to="12"
script="genierepop"
sequence="100"
>
</trigger>
<trigger
enabled="y"
match="The Avalanche Slalom is covered with dry powder snow."
omit_from_output="y"
send_to="12"
script="Icefallslopes"
sequence="100"
>
</trigger>
<trigger
enabled="y"
match="Darkness bleeds across Icefall."
omit_from_output="y"
send_to="12"
script="Icefallfloor"
sequence="100"
>
</trigger>
</triggers>
<!-- Script -->
<script>
<![CDATA[
function OnPluginBroadcast (msg, id, name, text)
if (id == '3e7dedbe37e44942dd46d264') then --gmcp plugin
if (text == "comm.repop") then
SendNoEcho(string.format(reporting_channel .. " ".. color1 .. "|".. color2 .. "Repop" .. color1 .. "|@w %s "..color2.. "@@ @w%s", Get_Current_Room_Zone(), os.date ("%X")))
end
end
end
function Get_Current_Room_Zone()
local res
local current_zone
res, current_zone = CallPlugin("3e7dedbe37e44942dd46d264","gmcpval","room.info.zone")
return current_zone
end
function OnPluginSaveState ()
SetVariable ("reporting_channel", reporting_channel)
SetVariable ("color1", color1)
SetVariable ("color2", color2)
end -- function OnPluginSaveState
function OnPluginInstall ()
reporting_channel = (GetVariable ("reporting_channel") or "gt")
color1 = (GetVariable ("color1") or "@Y")
color2 = (GetVariable ("color2") or "@R")
end
function Icefallfloor()
SendNoEcho(reporting_channel .. " @R|@CIcefall@R|: @R[@GFloor Repop@R] @w", os.date ("%X"))
end
function Icefallslopes()
SendNoEcho(reporting_channel .. " @R|@CIcefall@R|: @R[@WSlopes Repop@R] @w", os.date ("%X"))
end
function genierepop()
SendNoEcho(reporting_channel .. " @R|@CGenie Repop@R| @w", os.date ("%X"))
end
]]>
</script>
</muclient>