Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. function()
  2.     local debuff_name = "Agony"
  3.     local time_remaing = ""
  4.     local t_debuff = UnitDebuff("target", debuff_name, null, "PLAYER")
  5.     if t_debuff then
  6.         local time_now = GetTime()
  7.         local time_duration = select(6, UnitDebuff("target", debuff_name, null, "PLAYER"))
  8.         local time_expires = select(7, UnitDebuff("target", debuff_name, null, "PLAYER"))
  9.         local time_left = time_expires - time_now
  10.         time_remaining = string.format("%.1f", time_left)
  11.         local pandemic = time_duration*0.3
  12.         if time_remaining < pandemic then
  13.             return true
  14.         end
  15.     end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement