Advertisement
Xzempt

Untitled

Apr 3rd, 2012
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. function GetAlts(msg)
  2. local count = 0
  3. SetGuildRosterShowOffline(true)
  4. print("Searching for alts of " ..msg.. " ...")
  5. for x = 1, GetNumGuildMembers() do
  6.     name, rank, rankIndex, level, class, zone, note, officernote, online, status, classFileName, achievementPoints, achievementRank, isMobile = GetGuildRosterInfo(x)
  7.         if name then
  8.             if (rank == "Alt") and (string.match(note, msg)) then
  9.                 print("Character Name: |cffff00ff" ..name.. "|r Rank: |cffff00ff" ..rank.. "|r Note: |cffff00ff" ..note.. "|r")
  10.                 count = count + 1
  11.             end
  12.             if (rank ~= "Alt") and (string.match(note, msg)) then
  13.                 print("Character Name: |cffff00ff" ..name.. "|r Rank: |cffff00ff" ..rank.. "|r Note: |cffff00ff" ..note.. "|r")
  14.                 count = count + 1
  15.             end
  16.         end
  17.         if (count == 0) and (x == GetNumGuildMembers()) then
  18.             print("Nothing Found.")
  19.         end
  20.     end
  21. end
  22.  
  23. SLASH_gi1 = '/gi'
  24. function SlashCmdList.gi(msg, editbox)
  25.     GetAlts(msg)
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement