diff --git a/FreshShit/FriendTracker/event.lua b/FreshShit/FriendTracker/event.lua new file mode 100644 index 0000000..c939846 --- /dev/null +++ b/FreshShit/FriendTracker/event.lua @@ -0,0 +1,5 @@ +-- FRIENDLIST_UPDATE +function(e) + -- Event triggered by ShowFriends() + aura_env.FileFriends() +end \ No newline at end of file diff --git a/FreshShit/FriendTracker/init.lua b/FreshShit/FriendTracker/init.lua new file mode 100644 index 0000000..e986d32 --- /dev/null +++ b/FreshShit/FriendTracker/init.lua @@ -0,0 +1,19 @@ +if not WeakAurasSaved.Cyka then WeakAurasSaved.Cyka = {} end +if not WeakAurasSaved.Cyka.Friends then WeakAurasSaved.Cyka.Friends = {} end + +aura_env.FileFriends = function() + local info = {} + local now = date("%y-%m-%dT%H:%M:%S") + local friends = GetNumFriends() + for i = 1, friends do + local name, level, class, area, connected, status, note, noteType = GetFriendInfo(i) + table.insert(info, { + ["name"] = name, + ["connected"] = connected, + ["area"] = area, + ["status"] = status, + }) + end + DevTools_Dump(info) + WeakAurasSaved.Cyka.Friends[now] = info +end \ No newline at end of file