Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. function()
  2. local color = "FFFFFFFF"
  3. local coloredName = function(name)
  4. local _, class = UnitClass(name)
  5. return string.format("|c%s%s", RAID_CLASS_COLORS[class].colorStr, name)
  6. end
  7. function rangecheck(uId)
  8. local range = 0
  9. if IsItemInRange(37727, uId) then range = 5--Ruby Acorn
  10. elseif IsItemInRange(63427, uId) then range = 8--Worgsaw
  11. elseif CheckInteractDistance(uId, 3) then range = 10
  12. elseif CheckInteractDistance(uId, 2) then range = 11
  13. elseif IsItemInRange(32321, uId) then range = 13--reports 12 but actual range tested is 13
  14. elseif IsItemInRange(6450, uId) then range = 18--Bandages.
  15. elseif IsItemInRange(21519, uId) then range = 22--Item says 20, returns true until 22.
  16. elseif CheckInteractDistance(uId, 1) then range = 30
  17. elseif UnitInRange(uId) then range = 43
  18. elseif IsItemInRange(116139, uId) then range = 50
  19. elseif IsItemInRange(32825, uId) then range = 60
  20. elseif IsItemInRange(35278, uId) then range = 80
  21. else range = 1000 end--Just so it has a numeric value, even if it's unknown to protect from nil errors
  22. return range
  23. end
  24. local inrange = 0
  25. local spell = GetSpellInfo(209973)
  26. local result = ""
  27. local bond_dmg = 12000000
  28. for i=1,GetNumGroupMembers() do
  29. local player = GetRaidRosterInfo(i)
  30. if UnitName("player") ~= player then
  31. if rangecheck(player) <=8 then
  32. inrange = inrange+1
  33. end
  34. end
  35.  
  36. end
  37. if inrange == 0 then
  38. result = math.floor(bond_dmg/100)/10 .."k Bond dmg"
  39. elseif inrange >= 1 then
  40. result = math.floor((bond_dmg / inrange)/100)/10 .."k Bond dmg"
  41. aura_env.check = false
  42. end
  43.  
  44. return result
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement