Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function UnisAround(unit)
- local total = 0
- for i=1, #NeP.Healing.Units do
- local Obj = NeP.Healing.Units[i]
- if Obj.distance <= 30 and then
- total = total + 1
- end
- end
- return total >= num
- end
- local function BuildRoster()
- local groups = {}
- local prefix = (IsInRaid() and 'raid') or 'party'
- for i = 1, GetNumGroupMembers() do
- local group = select(3, GetRaidRosterInfo(i))
- if not groups[group] then groups[group] = {} end
- local unit = prefix..i
- table.insert(groups[group], {
- health = UnitHealth(unit),
- key = unit,
- units = UnisAround(unit)
- })
- table.sort(groups[group], function(a,b) return a.units < b.units end)
- end
- return groups
- end
- function partyFindUnit()
- if IsInGroup() or IsInRaid() then
- local groups = BuildRoster()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement