forked from aethys256/AethysTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBroken_Isles.lua
53 lines (51 loc) · 1.65 KB
/
Broken_Isles.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--- ============================ HEADER ============================
--- ======= LOCALIZE =======
-- Addon
local addonName, AT = ...;
-- AethysCore
local AC = AethysCore;
local Cache = AethysCache;
local Unit = AC.Unit;
local Player = Unit.Player;
local Target = Unit.Target;
local Spell = AC.Spell;
local Item = AC.Item;
-- Lua
local stringlower = string.lower;
-- File Locals
local NickTag = _G.NickTag;
--- ============================ CONTENT ============================
-- Print with AT Prefix
function AT.Print (...)
print("[|cFFFF6600Aethys Tools|r]", ...);
end
-- Command Handler
local Argument1, Argument2, Argument3;
function AT.CmdHandler (Message)
Argument1, Argument2, Argument3 = strsplit(" ", stringlower(Message));
if Argument1 == "bi" then
local Name, State, Time;
for i = 1, 4 do
Name = C_ContributionCollector.GetName(i);
if Name ~= "" then
State, _, Time = C_ContributionCollector.GetState(i);
AT.Print(Name, ":"
,State == 2 and"Attack"
or State == 3 and"Destroyed"
or State == 4 and "Reset"
or "Building"
,Time and date("%a %d %b %X", Time) or "");
end
end
elseif Argument1 == "help" then
AT.Print("|cffffff00--[Infos]--|r");
AT.Print(" BrokenIsles: |cff8888ff/aet bi|r");
AT.Print(" Button Anchor Reset : |cff8888ff/aer resetbuttons|r");
else
AT.Print("Invalid arguments.");
AT.Print("Type |cff8888ff/aet help|r for more infos.");
end
end
SLASH_AETHYSTOOLS1 = "/aet"
SLASH_AETHYSTOOLS2 = "/at"
SlashCmdList["AETHYSTOOLS"] = AT.CmdHandler;