From 0ae3301af2cd327e3db6e24fb9eeb9de80366dfe Mon Sep 17 00:00:00 2001
From: Arcidayne <9382522b@opayq.com>
Date: Fri, 30 Oct 2015 16:05:08 -0700
Subject: [PATCH] See who's not in your room... or area!
---
.../Epic_Not_Here_Counter.xml | 71 ++++++++++++++++++-
1 file changed, 70 insertions(+), 1 deletion(-)
diff --git a/Epic_Not_Here_Counter/Epic_Not_Here_Counter.xml b/Epic_Not_Here_Counter/Epic_Not_Here_Counter.xml
index f4975b1..779ea4c 100644
--- a/Epic_Not_Here_Counter/Epic_Not_Here_Counter.xml
+++ b/Epic_Not_Here_Counter/Epic_Not_Here_Counter.xml
@@ -19,7 +19,7 @@
>
@@ -66,6 +66,50 @@ EnableTrigger("Start_Group",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)
+
+ 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)
+
+Send("gt @W" .. #not_in_area .. " @Ymember(s) not in the area: @W" .. table.concat(not_in_area, ", ") .. "$C")
+
+
+ if group_table["%1"] then
+ group_table["%1"] = 1
+end
+
+
+ EnableTrigger("Get_Names", true)
+EnableTrigger("PlayersNear", false)
+EnableTrigger("End_Area", true)
+
@@ -83,6 +127,23 @@ EnableTrigger("End_Group",false)
Send("group")
Send("echo ")
+
+ group_table = {}
+
+for _,v in ipairs(epic_group_members) do
+ group_table[v.name] = 0
+end
+EnableTrigger("PlayersNear", true)
+Send("where")
+Send("echo")
+
@@ -101,6 +162,14 @@ Send("echo ")
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.members")
+
+ assert( loadstring( "epic_group_members = " .. group or "")) ()
+ end
+end
]]>