|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
|
|
<!DOCTYPE muclient>
|
|
|
|
<!-- Saved on Sunday, October 25, 2015, 12:03 PM -->
|
|
|
|
<!-- MuClient version 4.98 -->
|
|
|
|
|
|
|
|
<!-- Plugin "Epic_Not_Here_Counter" generated by Plugin Wizard -->
|
|
|
|
|
|
|
|
<muclient>
|
|
|
|
<plugin
|
|
|
|
name="Epic_Not_Here_Counter"
|
|
|
|
author="Arcidayne"
|
|
|
|
id="e6cd5104e883a1dd9c4362e2"
|
|
|
|
language="Lua"
|
|
|
|
purpose="Identifies players not in your current room. Useful for leaders on Epics."
|
|
|
|
save_state="y"
|
|
|
|
date_written="2015-10-25 12:00:38"
|
|
|
|
requires="4.00"
|
|
|
|
version="2.0"
|
|
|
|
>
|
|
|
|
<description trim="y">
|
|
|
|
<![CDATA[
|
|
|
|
Simple command. Use 'grhere' to identify people missing from your group in the room, or 'grarea' to find people missing in the area.
|
|
|
|
]]>
|
|
|
|
</description>
|
|
|
|
|
|
|
|
</plugin>
|
|
|
|
|
|
|
|
<!-- Triggers -->
|
|
|
|
|
|
|
|
<triggers>
|
|
|
|
<trigger
|
|
|
|
group="Epic_Not_Here"
|
|
|
|
keep_evaluating="y"
|
|
|
|
match="^Lvl\/Gld\s+Name\s+Hp\s+Mana\s+Moves\s+Align\s+TNL\s+Qt\s+Here\?$"
|
|
|
|
name="Start_Group"
|
|
|
|
regexp="y"
|
|
|
|
send_to="12"
|
|
|
|
sequence="100"
|
|
|
|
>
|
|
|
|
<send>epic_group_not_in_room = {}
|
|
|
|
EnableTrigger("In_Room",true)
|
|
|
|
EnableTrigger("End_Group",true)
|
|
|
|
EnableTrigger("Start_Group",false)</send>
|
|
|
|
</trigger>
|
|
|
|
<trigger
|
|
|
|
group="Epic_Not_Here"
|
|
|
|
keep_evaluating="y"
|
|
|
|
match="^(?:200|201)\s.{3}\s+\*?(\w+)\s+\d+/\d+\s+\d+/\d+\s+\d+/\d+\s+-?\d+\s+\d+\s+\d+\*?\s+[\W]$"
|
|
|
|
name="In_Room"
|
|
|
|
regexp="y"
|
|
|
|
send_to="12"
|
|
|
|
sequence="100"
|
|
|
|
>
|
|
|
|
<send>table.insert(epic_group_not_in_room,"%1")</send>
|
|
|
|
</trigger>
|
|
|
|
<trigger
|
|
|
|
group="Epic_Not_Here"
|
|
|
|
keep_evaluating="y"
|
|
|
|
match="^$"
|
|
|
|
name="End_Group"
|
|
|
|
regexp="y"
|
|
|
|
send_to="12"
|
|
|
|
sequence="100"
|
|
|
|
>
|
|
|
|
<send>EnableTrigger("In_Room",false)
|
|
|
|
Send("gt @Y" .. #epic_group_not_in_room .. " @CPlayer(s) Missing: @W" .. table.concat(epic_group_not_in_room, ", ") .. "$C")
|
|
|
|
EnableTrigger("End_Group",false)</send>
|
|
|
|
</trigger>
|
|
|
|
<trigger
|
|
|
|
group="Epic_Not_Here"
|
|
|
|
match="^$"
|
|
|
|
name="End_Area"
|
|
|
|
regexp="y"
|
|
|
|
send_to="12"
|
|
|
|
sequence="100"
|
|
|
|
>
|
|
|
|
<send>local not_in_area = {}
|
|
|
|
EnableTrigger("Get_Names", false)
|
|
|
|
|
|
|
|
for k,v in pairs(group_table) do
|
|
|
|
if v == 0 then
|
|
|
|
table.insert(not_in_area, k)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
EnableTrigger("End_Area", false)
|
|
|
|
|
|
|
|
if SetCounterDebug == 0 then
|
|
|
|
Send("gt @W" .. #not_in_area .. " @Ymember(s) not in the area: @W" .. table.concat(not_in_area, ", ") .. "$C")
|
|
|
|
else
|
|
|
|
ColourNote("white", "darkcyan", "Epic Not Here debugging information!")
|
|
|
|
print("Epic Group")
|
|
|
|
for _,v in ipairs(epicgroup.members) do
|
|
|
|
print(v.name)
|
|
|
|
end
|
|
|
|
print("Group Table")
|
|
|
|
for k,v in pairs(group_table) do
|
|
|
|
print(k, v)
|
|
|
|
end
|
|
|
|
print("Not in Area")
|
|
|
|
print(table.concat(not_in_area, ", "))
|
|
|
|
end</send>
|
|
|
|
</trigger>
|
|
|
|
<trigger
|
|
|
|
group="Epic_Not_Here"
|
|
|
|
match="^(\w+)\s"
|
|
|
|
name="Get_Names"
|
|
|
|
regexp="y"
|
|
|
|
send_to="12"
|
|
|
|
sequence="100"
|
|
|
|
>
|
|
|
|
<send>if group_table["%1"] then
|
|
|
|
group_table["%1"] = 1
|
|
|
|
end
|
|
|
|
</send>
|
|
|
|
</trigger>
|
|
|
|
<trigger
|
|
|
|
group="Epic_Not_Here"
|
|
|
|
match="^Players near you\:$"
|
|
|
|
name="PlayersNear"
|
|
|
|
regexp="y"
|
|
|
|
send_to="12"
|
|
|
|
sequence="100"
|
|
|
|
>
|
|
|
|
<send>EnableTrigger("Get_Names", true)
|
|
|
|
EnableTrigger("PlayersNear", false)
|
|
|
|
EnableTrigger("End_Area", true)</send>
|
|
|
|
</trigger>
|
|
|
|
</triggers>
|
|
|
|
|
|
|
|
<!-- Aliases -->
|
|
|
|
|
|
|
|
<aliases>
|
|
|
|
<alias
|
|
|
|
match="^grhere$"
|
|
|
|
enabled="y"
|
|
|
|
group="Epic_Not_Here"
|
|
|
|
regexp="y"
|
|
|
|
send_to="12"
|
|
|
|
sequence="100"
|
|
|
|
>
|
|
|
|
<send>EnableTrigger("Start_Group",true)
|
|
|
|
Send("group")
|
|
|
|
Send("echo ")</send>
|
|
|
|
</alias>
|
|
|
|
<alias
|
|
|
|
match="^grupdate$"
|
|
|
|
enabled="y"
|
|
|
|
group="Epic_Not_Here"
|
|
|
|
regexp="y"
|
|
|
|
script="update_plugin"
|
|
|
|
sequence="100"
|
|
|
|
>
|
|
|
|
</alias>
|
|
|
|
<alias
|
|
|
|
match="^grarea$"
|
|
|
|
enabled="y"
|
|
|
|
group="Epic_Not_Here"
|
|
|
|
regexp="y"
|
|
|
|
send_to="12"
|
|
|
|
sequence="100"
|
|
|
|
>
|
|
|
|
<send>group_table = {}
|
|
|
|
|
|
|
|
for _,v in ipairs(epicgroup.members) do
|
|
|
|
group_table[v.name] = 0
|
|
|
|
print(v.name)
|
|
|
|
end
|
|
|
|
EnableTrigger("PlayersNear", true)
|
|
|
|
Send("where")
|
|
|
|
Send("echo")</send>
|
|
|
|
</alias>
|
|
|
|
<alias
|
|
|
|
match="^grdebug (on|off)$"
|
|
|
|
enabled="y"
|
|
|
|
group="Epic_Not_Here"
|
|
|
|
regexp="y"
|
|
|
|
send_to="12"
|
|
|
|
sequence="100"
|
|
|
|
>
|
|
|
|
<send>if "%1" == "on" then
|
|
|
|
SetCounterDebug = 1
|
|
|
|
ColourNote("white", "darkcyan", "Epic Not Here debugging on!")
|
|
|
|
else
|
|
|
|
SetCounterDebug = 0
|
|
|
|
ColourNote("white", "darkcyan", "Epic Not Here debugging off!")
|
|
|
|
end
|
|
|
|
</send>
|
|
|
|
</alias>
|
|
|
|
</aliases>
|
|
|
|
|
|
|
|
<!-- Plugin help -->
|
|
|
|
|
|
|
|
<aliases>
|
|
|
|
<alias
|
|
|
|
script="OnHelp"
|
|
|
|
match="^(?:enh|gr)help$"
|
|
|
|
enabled="y"
|
|
|
|
regexp="y"
|
|
|
|
>
|
|
|
|
</alias>
|
|
|
|
</aliases>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<![CDATA[
|
|
|
|
function OnHelp ()
|
|
|
|
world.Note (world.GetPluginInfo (world.GetPluginID (), 3))
|
|
|
|
end
|
|
|
|
|
|
|
|
function OnPluginBroadcast(msg, id, name, text)
|
|
|
|
if (id == '3e7dedbe37e44942dd46d264') and (text == 'group') then
|
|
|
|
local res, group = CallPlugin("3e7dedbe37e44942dd46d264", "gmcpval", "group")
|
|
|
|
|
|
|
|
if group then
|
|
|
|
assert( loadstring( "epicgroup = " .. group or "")) ()
|
|
|
|
else
|
|
|
|
epicgroup = {}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function OnPluginInstall()
|
|
|
|
SetCounterDebug = 0
|
|
|
|
end
|
|
|
|
|
|
|
|
function update_plugin ()
|
|
|
|
local pid = GetPluginID ()
|
|
|
|
local pfile, pversion = GetPluginInfo(pid, 6), GetPluginInfo(pid, 19)
|
|
|
|
local raw = "https://raw.githubusercontent.com/Arcidayne/Aardwolf-Scripts/master/Epic_Not_Here_Counter/Epic_Not_Here_Counter.xml"
|
|
|
|
async_ok, async = pcall (require, "async")
|
|
|
|
|
|
|
|
if async_ok then
|
|
|
|
plugin_page = async.request(raw, "HTTPS")
|
|
|
|
end
|
|
|
|
|
|
|
|
retval, page, status, headers, full_status = plugin_page:join()
|
|
|
|
plugin_page = nil
|
|
|
|
|
|
|
|
if status == 200 then
|
|
|
|
raw_version = tonumber(string.match(page, '%s%s+version="([0-9%.]+)"')) -- Pulls version number
|
|
|
|
end
|
|
|
|
|
|
|
|
if raw_version == pversion then
|
|
|
|
ColourNote("white", "blue", GetPluginInfo(pid, 1) .. " is up-to-date.")
|
|
|
|
elseif raw_version > pversion then
|
|
|
|
ColourNote("white", "blue", "Updating from version " .. pversion .. " to " .. raw_version .. ". Do not touch anything.")
|
|
|
|
local file = io.open(pfile, "w")
|
|
|
|
file:write(page)
|
|
|
|
file:close()
|
|
|
|
end
|
|
|
|
|
|
|
|
raw_version = nil
|
|
|
|
if "" == GetAlphaOption("script_prefix") then
|
|
|
|
SetAlphaOption("script_prefix", "\\\\\\")
|
|
|
|
end
|
|
|
|
|
|
|
|
Execute(GetAlphaOption("script_prefix").."DoAfterSpecial(1, \"ReloadPlugin('"..GetPluginID().."')\", sendto.script)")
|
|
|
|
end
|
|
|
|
]]>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</muclient>
|