Jump to content

  • Curse Sites
Help

Priest PvP Scripts and Macros


  • Please log in to reply
21 replies to this topic

#21 Vengeance

Vengeance
  • Junkies
  • Humanclass_name
  • US-Sargeras
  • Shadowburn
  • Posts: 111
  • Talents: Subtlety 0/2/2/0/0/.

Posted 21 April 2012 - 06:20 PM

View PostTalbadar, on 07 September 2011 - 05:50 AM, said:

Show Percent HP AND Health Number on Target and Focus Frame
Macro 1:
/run TF=CreateFrame("Frame")TFHB=TargetFrameHealthBar.TextString;TTSB=TextStatusBar_CapDisplayOfNumericValue
/run FF=CreateFrame("Frame")FFHB=FocusFrameHealthBar.TextString;TTSB=TextStatusBar_CapDisplayOfNumericValue
Macro 2:
/run TF:SetScript("OnUpdate", function(target)TFHB:SetText(TTSB(UnitHealth("target")).."/"..TTSB(UnitHealthMax("target")).." ("..format("%.0f", ((UnitHealth("target")/UnitHealthMax("target"))*100)).."%)") end)
Macro 3:
/run FF:SetScript("OnUpdate", function(focus)FFHB:SetText(TTSB(UnitHealth("focus")).."/"..TTSB(UnitHealthMax("focus")).." ("..format("%.0f", ((UnitHealth("focus")/UnitHealthMax("focus"))*100)).."%)") end)

I gave you those a while ago on your stream, but they cause high CPU cycles.

Here's an updated version I created(can also be found in the new Default UI Scripts thread if you want it for an addon.)
Macro 1:
V=TextStatusBar_CapDisplayOfNumericValue;function Z(...)for i=1,3 do W=(select(i,"Player","Target","Focus"))Y=UnitHealth(W)X=UnitHealthMax(W)H=V(Y)M=V(X)P=(Y/X)*100;_G[W.."FrameHealthBar"].TextString:SetText(H.."/"..M.." ("..format("%.0f",P).."%)")end;end

Macro 2:
hooksecurefunc("TextStatusBar_UpdateTextStringWithValues",Z)

By default this will show HP and Percents for Player, Target, and Focus.
To remove one just change the bolded parts in macro 1:
for i=1,3 do  W=(select(i,"Player","Target","Focus"))
to:
for i=1,2 do  W=(select(i,"Target","Focus"))

So Macro 1 would now read:
V=TextStatusBar_CapDisplayOfNumericValue;function Z(...)for i=1,2 do W=(select(i,"Target","Focus"))Y=UnitHealth(W)X=UnitHealthMax(W)H=V(Y)M=V(X)P=(Y/X)*100;_G[W.."FrameHealthBar"].TextString:SetText(H.."/"..M.."  ("..format("%.0f",P).."%)")end;end

Unfortunately you cannot add anything else to the original macro because it is exactly 255 characters long, if you need to add another frame, let me know and I can help you out.

Edited by Vengeance, 21 April 2012 - 06:22 PM.


#22 samppax

samppax
  • Junkies
  • Undeadclass_name
  • EU-Stormreaver
  • Cyclone / Wirbelsturm
  • Posts: 161
  • Talents: Shadow 1/1/0/1/2/1
  • 2v2: 1436
  • 3v3: 1714
  • RBG: 384

Posted 09 March 2013 - 12:25 PM

whats up with stopwatch macro:
/run StopwatchFrame:SetScale(.01)
/run StopwatchFrame:SetPoint("TOPLEFT",81000,0)
/run StopwatchTicker:SetScale(100)
/run StopwatchTicker:SetPoint("TOPLEFT",-430,-730) -- problem here i can move it up-down side but not left-right side--
/run StopwatchFrame:SetMovable(false)

any tips for it ?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

<