Advertisement
alexdubovyck

лп и озноб для дк адон типа wa ntk

Mar 16th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.00 KB | None | 0 0
  1. https://i.imgur.com/VDZIFq5.png
  2. https://i.imgur.com/FDWrIx0.png
  3.  
  4. if not _mor then
  5. -- if UnitGUID("player") == "0x00000000002EDF06" then
  6. -- 0x00000000002EDF06
  7.  
  8. ---------------------------------------------
  9. -- Раскол брони
  10. ---------------------------------------------
  11. -- local fire = CreateFrame("Frame", nil, UIParent)
  12. -- fire:SetParent(ActionButton1)
  13. -- fire:SetPoint("CENTER", 0, 43)
  14. -- fire:SetSize(512/2, 256/2)
  15. -- fire = fire:CreateTexture("warrior")
  16. -- fire:SetAllPoints()
  17. -- fire:SetAlpha(1)
  18. -- fire:SetTexture("Interface\\AddOns\\Diablo\\figure_left")
  19. --
  20. ---------------------------------------------
  21. -- ЛП
  22. ---------------------------------------------
  23. local color = {0, 0, 255}
  24. local f = CreateFrame("StatusBar", "sealofmastery", UIParent) --frameType, frameName, frameParent
  25. f:SetPoint("CENTER", 0, -250)
  26. f:SetSize(220, 40)
  27.  
  28. --Шоб двигать
  29. f:EnableMouse(true)
  30. f:SetMovable(true)
  31. f:RegisterForDrag("RightButton")
  32. f:SetScript("OnDragStart", f.StartMoving)
  33. f:SetScript("OnDragStop", f.StopMovingOrSizing)
  34.  
  35. --statusbar background
  36. f.bg = f:CreateTexture()
  37. f.bg:SetAllPoints(f)
  38. f.bg:SetTexture(unpack(color))
  39. f.bg:SetAlpha(0.2)
  40. --statusbar texture
  41. local tex = f:CreateTexture()
  42. tex:SetTexture(unpack(color))
  43. f:SetStatusBarTexture(tex)
  44. f:SetStatusBarColor(unpack(color))
  45. --values
  46. f:SetMinMaxValues(1, 20)
  47. f.minValue, f.maxValue = f:GetMinMaxValues()
  48. -- statusbar:SetValue(50)
  49. --20x20 иконка
  50. local f = CreateFrame("Frame", nil, UIParent)
  51. f:SetParent(sealofmastery)
  52. f:SetPoint("LEFT", sealofmastery, -40, 0)
  53. f:SetSize(40, 40)
  54. f = f:CreateTexture()
  55. f:SetAllPoints()
  56. f:SetAlpha(1)
  57. f:SetTexture("Interface\\Icons\\Spell_DeathKnight_IceTouch")
  58. -- Text любой по центру
  59. local sealofmastery_text = sealofmastery:CreateFontString()
  60. sealofmastery_text:SetPoint("CENTER", sealofmastery, 0, 0)
  61. sealofmastery_text:SetFontObject("CombatLogFont")
  62. -- sealofplague_text:SetText("Удар чумы")
  63.  
  64.  
  65. ---------------------------------------------
  66. -- Чума
  67. ---------------------------------------------
  68. local color = {0, 255, 0}
  69. local f = CreateFrame("StatusBar", "sealofplague", UIParent) --frameType, frameName, frameParent
  70. f:SetPoint("CENTER", 0, -290)
  71. f:SetSize(220, 40)
  72.  
  73. --Шоб двигать
  74. f:EnableMouse(true)
  75. f:SetMovable(true)
  76. f:RegisterForDrag("RightButton")
  77. f:SetScript("OnDragStart", f.StartMoving)
  78. f:SetScript("OnDragStop", f.StopMovingOrSizing)
  79.  
  80. --statusbar background
  81. f.bg = f:CreateTexture()
  82. f.bg:SetAllPoints(f)
  83. f.bg:SetTexture(unpack(color))
  84. f.bg:SetAlpha(0.2)
  85. --statusbar texture
  86. local tex = f:CreateTexture()
  87. tex:SetTexture(unpack(color))
  88. f:SetStatusBarTexture(tex)
  89. f:SetStatusBarColor(unpack(color))
  90. --values
  91. f:SetMinMaxValues(1, 20)
  92. f.minValue, f.maxValue = f:GetMinMaxValues()
  93. -- statusbar:SetValue(50)
  94. --20x20 иконка
  95. local f = CreateFrame("Frame", nil, UIParent)
  96. f:SetParent(sealofplague)
  97. f:SetPoint("LEFT", sealofplague, -40, 0)
  98. f:SetSize(40, 40)
  99. f = f:CreateTexture()
  100. f:SetAllPoints()
  101. f:SetAlpha(1)
  102. f:SetTexture("Interface\\Icons\\Spell_DeathKnight_EmpowerRuneBlade")
  103. -- Text любой по центру
  104. local sealofplague_text = sealofplague:CreateFontString()
  105. sealofplague_text:SetPoint("CENTER", sealofplague, 0, 0)
  106. sealofplague_text:SetFontObject("CombatLogFont")
  107. -- sealofplague_text:SetText("Удар чумы")
  108.  
  109. -- Text 1-е секунды + 2-е секунды(чаще всего)
  110. local both_text = sealofplague:CreateFontString()
  111. both_text:SetPoint("RIGHT", sealofplague, 16, 20)
  112. both_text:SetFontObject("CombatLogFont")
  113. -- both_text:SetText("12")
  114. ---------------------------------------------
  115. -- Функция
  116. ---------------------------------------------
  117. local function onUpdate()
  118. --start
  119.  
  120. if UnitDebuff("target", "Озноб", nil, "Player") == nil then
  121. sealofmastery:SetValue(0)
  122. sealofmastery_text:SetText("Отсутствует")
  123. else
  124. local lp = (select(7, UnitDebuff("target", "Озноб", nil, "Player")) - GetTime())
  125. sealofmastery:SetValue(lp)
  126. sealofmastery_text:SetText(floor(lp))
  127. end;
  128.  
  129. if UnitDebuff("target", "Кровавая чума", nil, "Player") == nil then
  130. sealofplague:SetValue(0)
  131. sealofplague_text:SetText("Отсутствует")
  132. else
  133. local pl = (select(7, UnitDebuff("target", "Кровавая чума", nil, "Player")) - GetTime())
  134. sealofplague:SetValue(pl)
  135. sealofplague_text:SetText(floor(pl))
  136. end;
  137.  
  138. if UnitDebuff("target", "Озноб", nil, "Player") == nil
  139. and UnitDebuff("target", "Кровавая чума", nil, "Player") == nil then
  140. both_text:SetText("0")
  141. elseif UnitDebuff("target", "Озноб", nil, "Player")
  142. and UnitDebuff("target", "Кровавая чума", nil, "Player") then
  143. local lp = (select(7, UnitDebuff("target", "Озноб", nil, "Player")) - GetTime())
  144. local pl = (select(7, UnitDebuff("target", "Кровавая чума", nil, "Player")) - GetTime())
  145. local both = (lp + pl)
  146. both_text:SetText(floor(both))
  147. end
  148.  
  149.  
  150.  
  151. --finish
  152. end;
  153. local f = CreateFrame("Frame")
  154. f:SetScript("OnUpdate", onUpdate)
  155.  
  156.  
  157.  
  158. _mor = true end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement