Advertisement
Guest User

Untitled

a guest
May 2nd, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. function()
  2. local x, y = 0
  3. local e = aura_env
  4. local distance = "??m"
  5.  
  6. if WeakAuras.IsOptionsOpen() then
  7. e.group_id = 3
  8. e.mark_expires = GetTime()+5
  9. return ("%s\n%.1f"):format(e.group_desc[e.group_id]:gsub("{rt([1-8])}", e.icon), e.mark_expires- GetTime()) .. "s"
  10.  
  11. end
  12.  
  13.  
  14. if e.group_id > 0 and e.mark_expires and e.mark_expires > GetTime() then
  15. local ricon = e.group_desc[e.group_id]:gsub("{rt([1-8])}", e.icon)
  16. local mexp = e.mark_expires - GetTime()
  17. local posx, posy = UnitPosition("player")
  18. local soakdebuff = ""
  19.  
  20.  
  21. if e.debuff then
  22. x = e.motl_debuff_pos_x[e.group_id]
  23. y = e.motl_debuff_pos_y[e.group_id]
  24. distance = math.floor(math.sqrt(math.pow((x-posx), 2) + math.pow((y-posy), 2)) + 0.5)
  25. soakdebuff = string.gsub(e.debuff_string, "@T", e.mark_timer .. "s")
  26.  
  27. if GExRT == nil or e.disable_all_arrow == true or e.disable_debuff_arrows == true then
  28. return ("%s\n%s\n%.1f"):format(ricon, soakdebuff, mexp) .. "s"
  29. else
  30. return ("%s\n%s\n%s\n%.1f"):format(ricon, soakdebuff, distance .. "m" .. GExRT.F.ArrowTextCoord(y, x), mexp) .. "s"
  31. end
  32. else
  33. local mytarget = e.color_name(e.debuff_person)
  34. x, y = UnitPosition(e.debuff_person)
  35.  
  36. if x == nil then -- This should only happen in testing
  37. x = 0
  38. y = 0
  39. distance = "??"
  40. else
  41.  
  42. distance = math.floor(math.sqrt(math.pow((x-posx), 2) + math.pow((y-posy), 2)) + 0.5)
  43. end
  44.  
  45. soakdebuff = e.soak_string
  46. if GExRT == nil or e.disable_all_arrows == true then
  47. return ("%s\n%s\n%.1f"):format(ricon, soakdebuff, mexp) .. "s"
  48. else
  49. return ("%s\n%s\n%s\n%.1f"):format(ricon, soakdebuff, mytarget .. " " .. distance .. "m" .. GExRT.F.ArrowTextPlayer(e.debuff_person), mexp) .. "s"
  50. end
  51. end
  52.  
  53. end
  54. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement