Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GetAlts(msg)
- print("GetAlts() function called with parameters: " ..msg)
- local total = GetNumGuildMembers()
- local count = 0
- local guild = { }
- local x = 1
- local name, rank, rankIndex, level, class, zone, note, officernote, online, status, classFileName, achievementPoints, achievementRank, isMobile = GetGuildRosterInfo(x)
- SetGuildRosterShowOffline(true)
- if msg and name then
- for x = 1, total do
- local name, rank, rankIndex, level, class, zone, note, officernote, online, status, classFileName, achievementPoints, achievementRank, isMobile = GetGuildRosterInfo(x)
- if (string.match(note, msg)) then
- SendChatMessage("Character Name: |cffff00ff" ..name.. "|r Rank: |cffff00ff" ..rank.. "|r Note: |cffff00ff" ..note.. "|r", "OFFICER")
- count = count + 1
- end
- end
- if (count == 0) and (x == total) then
- print("Nothing Found.")
- end
- end
- end
- if (msg == "clean") then
- for x = 1, total do
- local name, rank, rankIndex, level, class, zone, note, officernote, online, status, classFileName, achievementPoints, achievementRank, isMobile = GetGuildRosterInfo(x)
- if (daysOffline >= 15) or (monthsOffline >= 1) or (yearsOffline >= 1) and (x ~= total) then
- count = 1
- GuildUninvite(name)
- end
- if (count == 0) and (x == total) then
- print("Nothing Found...")
- end
- end
- end
- if (msg == "resetnotes") then
- for x = 1, total do
- local yearsOffline, monthsOffline, daysOffline, hoursOffline = GetGuildRosterLastOnline(x);
- local name, rank, rankIndex, level, class, zone, note, officernote, online, status, classFileName, achievementPoints, achievementRank, isMobile = GetGuildRosterInfo(x)
- table.insert(guild, name)
- if (x == total) then
- print("Found: " ..#guild.. " entries")
- for x = 1, total do
- GuildRosterSetPublicNote(x, guild[x])
- GuildRosterSetOfficerNote(x, guild[x])
- end
- end
- end
- end
- --end
- SLASH_gi1 = '/gi'
- function SlashCmdList.gi(msg, editbox)
- if (msg ~= "clean") and (msg ~= "resetnotes") then
- SendChatMessage("Searching for alts of " ..msg.. " ...", "OFFICER")
- GetAlts(msg)
- else
- GetAlts(msg)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement