Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. local function UnisAround(unit)
  2. local total = 0
  3. for i=1, #NeP.Healing.Units do
  4. local Obj = NeP.Healing.Units[i]
  5. if Obj.distance <= 30 and then
  6. total = total + 1
  7. end
  8. end
  9. return total >= num
  10. end
  11.  
  12. local function BuildRoster()
  13. local groups = {}
  14. local prefix = (IsInRaid() and 'raid') or 'party'
  15. for i = 1, GetNumGroupMembers() do
  16. local group = select(3, GetRaidRosterInfo(i))
  17. if not groups[group] then groups[group] = {} end
  18. local unit = prefix..i
  19. table.insert(groups[group], {
  20. health = UnitHealth(unit),
  21. key = unit,
  22. units = UnisAround(unit)
  23. })
  24. table.sort(groups[group], function(a,b) return a.units < b.units end)
  25. end
  26. return groups
  27. end
  28.  
  29. function partyFindUnit()
  30. if IsInGroup() or IsInRaid() then
  31. local groups = BuildRoster()
  32. end
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement