[REQ] Holy Paladin LUA Macro Needs Update! menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Sikas's Avatar Active Member
    Reputation
    69
    Join Date
    Feb 2007
    Posts
    386
    Thanks G/R
    6/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [REQ] Holy Paladin LUA Macro Needs Update!

    Hey,

    Viral-Fly-By's old Holy Paladin macro worked like a beast pre-Cata, and I can't get it to work like it used to. Not sure if something is broken with the macro now that it's Cata, or perhaps NA (NoAddiction) somehow changed something and is restricting the macro...

    But anyways, my request is that someone or people help convert this macro to a working one which uses all the same functions as this macro. In turn, I will share my PERSONAL 100% WORKING RETRIBUTION PALADIN MACRO. Only three people currently have it, but I've personally coded it from the ground up, using examples from other fine people and building upon it. Right now, I'm ranked on World of Logs at least 4-5 times now in current normal modes. In raids, I'm always #1-#3 spot, and I have to compete with a MM Hunter, Destro Lock, Fire Mage, Assassin Rogue, Enhance Shammy, etc. This macro WILL make you top tier, no problem. In iLvl 362 gear, I'm easily capable of pulling 18k-22k DPS, burst is 24k-27k DPS. It will Salv yourself as well, but does not use any major CDs, you use them yourself.

    So, if anyone wants to take it upon themselves to help make this work, you'll get my RET MACRO in return.

    [code]#showtooltip Seal of Insight
    #VARIABLES
    /run vFoL=3000; vHS=6000; vHL=8000; vHOPhp=0.2; vHOPmana=18000; vDFavor=0.2; vIllumNum=0.2; vIllumDmg=5000;

    #RAID OR GROUP
    /run vGroup="raid"; vNPS=1; vNPE=GetNumRaidMembers(); if vNPE==0 then vGroup="party"; vNPS=0; vNPE=GetNumPartyMembers() end;

    #DIVINE SHIELD [Sub 10% Health]
    /run if UnitHealth("player")/UnitHealthMax("player")<0.10 and GetSpellCooldown("Divine Shield")==0 and IsUsableSpell("Divine Shield") then SpellStopCasting() CastSpellByName("Divine Shield") end;

    #DIVINE PLEA [Sub 50% Mana]
    /run if GetSpellCooldown("Divine Plea")==0 and UnitPower("player")/UnitPowerMax("player")<=0.50 then CastSpellByName("Divine Plea") end;

    #BEACON OF LIGHT [FOCUS]
    /run local f=0; if UnitExists("focus") and UnitInRange("focus")==1 and UnitIsDeadOrGhost("focus")~=1 then for i=1,40 do local d={UnitBuff("focus",i)}; if d[1]=="Beacon of Light" and d[8]=="player" and d[7]-GetTime()>=3 then f=1; break end end if f==0 then RunMacroText("/cast [@focus] Beacon of Light") end end;

    #DIVINE ILLUMINATION
    /run local a,n,d=0,0,0; for i=vNPS,vNPE do local tt="player"; if i>0 then tt=vGroup..i end; if UnitExists(tt) and UnitInRange(tt)==1 and UnitIsDeadOrGhost(tt)~=1 then a=UnitHealthMax(tt)-UnitHealth(tt) end; if a>1000 then n=n+1 d=d+a end end; if n>(vNPE*vIllumNum) and d/n>vIllumDmg and GetSpellCooldown("Divine Illumination")==0 then CastSpellByName("Divine Illumination") end;

    #HEALING LOGIC
    /run local e,n,h,hm=UnitExists,UnitName,UnitHealth,UnitHealthMax; local f,w,fh,m="focus","focus",0,0; if e(f) then fh=hm(f)-h(f) end; for i=vNPS,vNPE do local a,tt=0,"player"; if i>0 then tt=vGroup..i end; if n(tt)~=n(f) then a=hm(tt)-h(tt) end; if a>m and UnitInRange(tt)==1 and UnitIsDeadOrGhost(tt)~=1 then m=a w=tt end end; if fh>2*m then m=fh end; if m>0 then vHealTarget=w vHealDmg=m else vHealTarget=nil vHealDmg=0 end

    #HEALS AND MISC
    /run local w,m=vHealTarget,vHealDmg; if w~=nil then local n,cd,ud,sp=UnitName,GetSpellCooldown,UnitDebuff,GetUnitSpeed("player"); local p=UnitHealth(w)/UnitHealthMax(w); local s=nil; if n(w)~=n("player") and p<vHOPhp and IsSpellInRange("Hand of Protection",w)==1 and UnitPowerMax(w)>vHOPmana and cd("Hand of Protection")==0 and UnitAffectingCombat(w)==1 and not ud(w,"Forbearance") and not ud(w,"Ice Block") then s="Hand of Protection" else if p<vDFavor and cd("Divine Favor")==0 then CastSpellByName("Divine Favor") end if cd("Holy Shock")==0 and (m>=vHS or (sp>0 and m>=vFoL)) then s="Holy Shock" elseif sp>0 and m>=vFoL and UnitBuff("player","Infusion of Light") then s="Flash of Light" elseif sp==0 then if m>=vHL then s="Holy Light" elseif m>=vFoL then s="Flash of Light" end end end; if s~=nil then RunMacroText("/cast [@"..w.."] "..s) end end

    #JUDGEMENT
    /run if UnitExists("focustarget") and UnitInRange("focus")==1 and UnitAffectingCombat("focus")==1 and GetSpellCooldown("Judgement of Light") == 0 then RunMacroText("/cast [@focustarget] Judgement of Light") end;

    #SACRED SHIELD [DON'T NEED THIS ANYMORE.]
    /run local f=0; if UnitExists("focus") and UnitInRange("focus")==1 and UnitIsDeadOrGhost("focus")~=1 then for i=1,40 do local d={UnitBuff("focus",i)}; if d[1]=="Sacred Shield" and d[8]=="player" and d[7]-GetTime()>=3 then f=1; break end end if f==0 then RunMacroText("/cast [@focus] Sacred Shield") end end;

    #CLEANSE RAID/PARTY [OPTIONAL]
    /run local w=nil; local m=0; for i=vNPS,vNPE do local tt="player"; if i>0 then tt=vGroup..i end; if UnitExists(tt) and UnitInRange(tt)==1 and UnitIsDeadOrGhost(tt)~=1 then for j=1,40 do local d={UnitDebuff(tt,j)}; if (d[5]=="Magic" or d[5]=="Poison" or d[5]=="Disease") and d[7]>m then w=tt; m=d[7] end end end end; if w~=nil then RunMacroText("/cast [@"..w.."] Cleanse") end;

    /run StaticPopup_Hide("MACRO_ACTION_FORBIDDEN")
    /script CombatLogClearEntries()[code]

    The Overall Logic:

    1. If you are under 10% health and Divine Shield is available, then stop casting and Divine Shield.
    2. If you are under 50% mana and Divine Plea is available, then Divine Plea.
    3. If you have a focus in range and your Beacon of Light is either not present or has 3 seconds or less remaining, then Beacon of Light your focus.
    4. If at least 20% of the party/raid have taken at least 1000 damage and the average damage per person is over 5000, use Divine Illumination if available.
    5. If a party/raid member needs healing, heal them.
    6. If your focus is in range and has a target and Judgement of Light is ready, then Judge your focus's target.
    7. If your you have a focus in range and Sacred Shield is either not present or has 3 seconds or less remaining, then Sacred Shield your focus.
    8. If a party/raid member has a debuff, Cleanse.


    The Healing Logic:

    1. If the target is below 20% hp, within 30yds, is a caster (max power > 18K), and doesn't have Forbearance, then Hand of Protection.
    2. If the target is under 10% hp and Divine Favor is available, then Divine Favor for the heal.
    3. If Holy Shock is ready and the target needs 6000 or more healing, then Holy Shock.
    4. If target needs 8000 or more healing, then Holy Light.
    5. If target needs 3000 or more healing, then Flash of Light.
    6. If no target needs at least 3000 healing, do nothing.


    Customization:
    There are 8 variables at the beginning of the 1st line. These control which spell is chosen for which situation and should be adjusted for how big your heals hit.

    1. vFoL: The minimum damage taken to be healed by a Flash of Light (3000 in code above).
    2. vHS: The minimum damage taken to be healed by Holy Shock (6000 in code above).
    3. vHL: The minimum damage taken to be healed by Holy Light (8000 in code above).
    4. vHOPhp: The percentage health at which Hand of Protection will be used on a caster (0.20 for 20% in code above).
    5. vHOPmana: The amount of "max power" a target must have to be considered for Hand of Protection (18000 in code above).
    6. vDFavor: The percentage health at which Divine Favor will be used for the next heal (0.1 for 10% in code above).
    7. vIllumNum: The percentage of party/raid members that must have taken damage to trigger use of Divine Illumination (0.2 for 20% in code above).
    8. vIllumDmg: The average per-person damage taken that must exist to trigger use of Divine Illumination (5000 in code above).

    ---------- Post added at 04:12 AM ---------- Previous post was at 04:09 AM ----------

    This is what I'd preferably would want the macro do in terms of logic!

    Overall Logic:
    1. If you don't have Seal of Insight on you, then Seal of Insight.
    2. If you are under 10% health and Divine Shield is available, then stop casting and Divine Shield.
    3. If you are under 10% health and Divine Shield is NOT available, use Healthstone.
    4. If you are under 50% health and Divine Protection is available, then stop casting and Divine Protection.
    5. If you are under 50% mana and Divine Plea is available, then Divine Plea.
    6. If you are under the effect of Divine Plea, then Avenging Wrath.
    7. If you are under the effect of Avenging Wrath, then use trinket (1st slot, then 2nd slot).
    8. If you have a focus and your Beacon of Light is either not present or has 3 seconds or less remaining, then Beacon of Light your focus. (NOTE: Beacon of Light target only receives 50% of healing, not 100%!)
    9. If you have a focus in range (30 yrds) and focus has taken damage to reduce health below 10% then Hand of Sacrifice your focus if available.
    10. If a party/raid member that is below 150k health and has 100% threat from boss, then Hand of Salvation if available.
    11. If a party/raid member's speed is below normal running speed, and NOT backpeddling, then Hand of Freedom if available.
    12. If at least 20% of the party/raid have taken at least 10000 damage and the average damage per person is over 5000 and Holy Power is >2 or =3, use Light of Dawn.
    13. If at least 40% of the party/raid have taken at least 25000 damage and the average damage per person is over 15000, use Holy Radiance if available.
    14. If at least 60% of the party/raid have taken at least 50000 damage and the average damage per person is over 35000, use Divine Favor if available.
    15. If at least 100% of the party/raid have taken at least 90000 damage and the average damage per person is over 50000, use Guardian of Ancient Kings if available.
    16. If a party/raid member needs healing, heal them.
    17. If your focus is in range and has a target and Judgement is ready, then Judge your focus's target.


    The Healing Logic:
    1. If the target is below 20% hp, within 30yds, is a caster (max power > 75K), and doesn't have Forbearance, then Hand of Protection.
    2. If Holy Shock is ready and the target needs 10000 or more healing and caster is or is not moving, then Holy Shock.
    3. If target needs 35000 or more healing [and mana is above 50%?], then Divine Light. (This is used for periods of heavy damage, semi mana efficient.)
    4. If target needs 15000 or more healing [and mana is above 10%?], then Holy Light. (This is used as filler, mana efficient and heals in 2 seconds.)
    5. If target needs 25000 or more healing [and mana is above 75%?], then Flash of Light. (This is used for when target suddenly falls below a certain threshold, and needs to be topped off to a certain point. 1.5 second cast time. NOT mana efficient. Do not spam.)
    6. If target needs 20000 or more healing [and mana is above 5%?] and caster is or is not moving and Holy Power is >2 or =3 then cast Word of Glory.
    7. If no target needs at least 5000 healing, do nothing.


    Customization:
    There are variables at the beginning of the 1st line. These control which spell is chosen for which situation and should be adjusted for how big your heals hit.

    1. vHS: The minimum damage taken to be healed by Holy Shock (10000 in code above).
    2. vHL: The minimum damage taken to be healed by Holy Light (15000 in code above).
    3. vDL: The minimum damage taken to be healed by Divine Light (35000 in code above).
    4. vFoL: The minimum damage taken to be healed by a Flash of Light (25000 in code above).
    5. vHOPhp: The percentage health at which Hand of Protection will be used on a caster (0.20 for 20% in code above).
    6. vHOPmana: The amount of "max power" a target must have to be considered for Hand of Protection (75000 in code above).
    7. vLoD: The percentage of party/raid members that must have taken damage to trigger use of Light of Dawn (0.2 for 20% in code above).
    8. vLoDDmg: The average per-person damage taken that must exist to trigger use of Light of Dawn (5000 in code above).
    9. vHR: The percentage of party/raid members that must have taken damage to trigger use of Holy Radiance (0.4 for 40% in code above).
    10. vHRDmg: The average per-person damage taken that must exist to trigger use of Holy Radiance (15000 in code above).
    11. vDFavor: The percentage of party/raid members that must have taken damage to trigger use of Divine Favor (0.6 for 60% in code above).
    12. vDFavorDmg: The average per-person damage taken that must exist to trigger use of Divine Favor (35000 in code above).
    13. vGoAK: The percentage of party/raid members that must have taken damage to trigger use of Guardian of Ancient Kings (1 for 100% in code above).
    14. vGoAKDmg: The average per-person damage taken that must exist to trigger use of Guardian of Ancient Kings (50000 in code above).

    [REQ] Holy Paladin LUA Macro Needs Update!
  2. #2
    Ultraviolence's Avatar Active Member
    Reputation
    15
    Join Date
    Aug 2008
    Posts
    102
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you explain a bit more on how it doesn't work? Have you already written the updated logic? Try turning on lua errors display and post here what you get when running the script.

  3. #3
    Sikas's Avatar Active Member
    Reputation
    69
    Join Date
    Feb 2007
    Posts
    386
    Thanks G/R
    6/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, when I've fixed up some of the syntax errors that LUA brings up when running the macro, it just doesn't work at all. I could remove most of it and just leave the Beacon of Light.. Nothing. Doesn't work in party or raid.

  4. #4
    Ultraviolence's Avatar Active Member
    Reputation
    15
    Join Date
    Aug 2008
    Posts
    102
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this (I just removed what I thought to be non-working or redundant and reformatted, sucks that I can't test it though):

    Code:
    	if UnitHealth("player")/UnitHealthMax("player")<0.20 and GetSpellCooldown("Divine Shield")==0 and IsUsableSpell("Divine Shield") then
    		CastSpellByName("Divine Shield")
    		return
    	end;
    	
    	if GetSpellCooldown("Divine Plea") ==0 and UnitPower("player")/UnitPowerMax("player")<=0.10 then
    		CastSpellByName("Divine Plea")
    		return
    	end;
    
    	f=0;
    	if UnitExists("focus") and UnitHealth("focus") > 1 then
    		for i=1,40 do
    			d={UnitBuff("focus",i)};
    			if d~=nil and d[1]=="Beacon of Light" and d[8]=="player" and d[7]-GetTime()>=3 then
    				f=1;
    				break
    			end
    		end
    		if f==0 and UnitInRange("focus") then
    			RunMacroText("/cast [@focus] Beacon of Light")
    			return
    		end
    	end;
    
    	vDL=18000;
    	vHS=5000;
    	vHL=7000;
    	vWoG=14000;
    	vDPhp=0.2;
    	vGuard=0.2;
    	vDFNum=0.2;
    	vDFDmg=50000;
    	vHR=20000;
    
    	t="raid"; nps=1;
    	npe=GetNumRaidMembers();
    	if npe==0 then 
    		t="party"; nps=0; npe=GetNumPartyMembers() 
    	end;
    
    	m=0;
    	b=0;
    	c=0;
    	d=0;
    	n=0;
    	w=f;
    	s=nil;
    	fh=0;
    
    	if UnitExists("focus") then
    		fh=UnitHealthMax("focus")-UnitHealth("focus")
    	end
    
    	for i=nps,npe do 
    		if i==0 then tt="player" else tt=t..i end;
    
    
    	if UnitExists(tt) and UnitInRange(tt)==1 and UnitIsDeadOrGhost(tt)~=1 then
    		a=UnitHealthMax(tt)-UnitHealth(tt);
    
    		if a>m then
    
    			m=a w=tt
    			end
    		end
    	end;
    
    
    	if m>10000 and UnitExists(w) and UnitInRange(w)==1 then
    
    	local w,m=vHealTarget,vHealDmg;
    	if w~=nil then
    		local n,cd,ud,sp=UnitName,GetSpellCooldown,UnitDebuff,GetUnitSpeed("player");
    		local p=UnitHealth(w)/UnitHealthMax(w);
    
    	if n(w)~=n("player") and p<vDPhp and IsSpellInRange("Divine Protection",w)==1 and cd("Divine Protection")==0 and UnitAffectingCombat(w)==1 and not ud(w,"Ice Block") and not UnitBuff(w,"Divine Shield") then
    		s="Divine Protection"
    	end
    
    	if cd("Holy Shock")==0 and (m>=vHS or (sp>=0 and m<=vHL)) then
    		s="Holy Shock"
    	elseif sp>0 and m>=vWoG and UnitPower("player",9)>2 then
    		s="Word of Glory"
    	elseif sp>=0 and m>=vHL then
    		s="Holy Light"
    	elseif sp>=0 then
    		if m>=vDL then
    			s="Divine Light"
    		end
    	end
    	end;
    
    	if s~=nil and UnitInRange(w) then
    		RunMacroText("/cast [@"..w.."] "..s)
    	end
    	end
    
    	if UnitExists("focustarget") and UnitInRange("focus")==1 and UnitAffectingCombat("focus")==1 and GetSpellCooldown("Judgement") == 0 then
    		RunMacroText("/cast [@focustarget] Judgement")
    	end
    It doesn't make sense that you're not getting lua errors. Do you get any frame lag when you try to run the macro?
    Last edited by Ultraviolence; 04-16-2011 at 08:31 PM.

  5. #5
    Sikas's Avatar Active Member
    Reputation
    69
    Join Date
    Feb 2007
    Posts
    386
    Thanks G/R
    6/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    #showtooltip Holy Light
    #VARIABLES
    /run vDL=18000; vHS=5000; vHL=7000; vWoG=14000; vDPhp=0.2; vGuard=0.2; vDFNum=0.2 vDFDmg=50000; vHR=20000;
    
    #SEAL
    /run if not IsMounted() and not UnitBuff("player","Seal of Insight") then CastSpellByName("Seal of Insight") end
    
    #BLESSINGS
    /run if not IsMounted() and GetSpellCooldown(GetCVar("blessing"))==0 and not UnitBuff("player",GetCVar("blessing")) then CastSpellByName(GetCVar("blessing")) end;
    
    #REBUKE
    /run if select(9,UnitCastingInfo('target'))==false and GetSpellCooldown("Rebuke")==0 and IsSpellInRange("Rebuke")==1 then CastSpellByName("Rebuke") end;
    /run if select(8,UnitChannelInfo('target'))==false and GetSpellCooldown("Rebuke")==0 and IsSpellInRange("Rebuke")==1 then CastSpellByName("Rebuke") end;
    
    #DIVINE SHIELD
    /run if UnitHealth("player")/UnitHealthMax("player")<0.20 and GetSpellCooldown("Divine Shield")==0 and IsUsableSpell("Divine Shield") then CastSpellByName("Divine Shield") return end;
        
    #DIVINE PLEA
    /run if GetSpellCooldown("Divine Plea")==0 and UnitPower("player")/UnitPowerMax("player")<=0.10 then CastSpellByName("Divine Plea") return end;
    
    #BEACON OF LIGHT
    /run f=0; if UnitExists("focus") and UnitHealth("focus")>1 then for i=1,40 do d={UnitBuff("focus",i)}; if d~=nil and d[1]=="Beacon of Light" and d[8]=="player" and d[7]-GetTime()>=3 then f=1; break end end if f==0 and UnitInRange("focus") then RunMacroText("/cast [@focus] Beacon of Light") return end end;
    
    #RAID/PARTY
    /run t="raid"; nps=1; npe=GetNumRaidMembers(); if npe==0 then t="party"; nps=0 npe=GetNumPartyMembers() end;
    
    #HEALING LOGIC?
    /run m=0; b=0; c=0; d=0; n=0; w=f; s=nil; fh=0; if UnitExists("focus") then fh=UnitHealthMax("focus")-UnitHealth("focus") end for i=nps,npe do if i==0 then tt="player" else tt=t..i end;
    
    #CHECK IF UNIT EXISTS?
    /run if UnitExists(tt) and UnitInRange(tt)==1 and UnitIsDeadOrGhost(tt)~=1 then a=UnitHealthMax(tt)-UnitHealth(tt); if a>m then m=a w=tt end end end;
    
    #DIVINE PROTECTION
    /run if m>10000 and UnitExists(w) and UnitInRange(w)==1 then w,m=vHealTarget,vHealDmg; if w~=nil then n,cd,ud,sp=UnitName,GetSpellCooldown,UnitDebuff,GetUnitSpeed("player"); p=UnitHealth(w)/UnitHealthMax(w); if n(w)~=n("player") and p<vDPhp and IsSpellInRange("Divine Protection",w)==1 and cd("Divine Protection")==0 and UnitAffectingCombat(w)==1 and not ud(w,"Ice Block") and not UnitBuff(w,"Divine Shield") then s="Divine Protection" end
    
    #HEALING
    /run if GetSpellCooldown("Holy Shock")==0 and (m>=vHS or (GetUnitSpeed("player")>=0 and m<=vHL)) then s="Holy Shock" elseif GetUnitSpeed("player")>0 and m>=vWoG and UnitPower("player",9)>2 then s="Word of Glory" elseif GetUnitSpeed("player")>=0 and m>=vHL and GetSpellCooldown("Holy Light")==0 then s="Holy Light" elseif GetUnitSpeed("player")>=0 and GetSpellCooldown("Divine Light")==0 then if m>=vDL then s="Divine Light" end end;
    
    #???
    /run if s~=nil and UnitInRange(w) then RunMacroText("/cast [@"..w.."] "..s) end
    
    #JUDGEMENT
    /run if UnitExists("focustarget") and UnitInRange("focus")==1 and UnitAffectingCombat("focus")==1 and GetSpellCooldown("Judgement")==0 then RunMacroText("/cast [@focustarget] Judgement") end
    
    /script CombatLogClearEntries();
    /run UIErrorsFrame:Clear();
    /run StaticPopup_Hide("MACRO_ACTION_FORBIDDEN");
    Thus far, Beacon of Light, Divine Plea and Divine Shield works.. everything else doesn't seem to. When people are at 50% health, which is like 50k or more health gone, it doesn't heal. No LUA errors. Doesn't even cast Judgement on my focus' target. I don't get it.
    Last edited by Sikas; 04-17-2011 at 08:28 AM.

  6. #6
    Ultraviolence's Avatar Active Member
    Reputation
    15
    Join Date
    Aug 2008
    Posts
    102
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Then let's try it a little differently:

    Code:
    -- Seal
    /run if not IsMounted() and not UnitBuff("player","Seal of Insight") then CastSpellByName("Seal of Insight") end
    
    -- Divine Shield
    /run if UnitHealth("player")/UnitHealthMax("player")<0.10 and GetSpellCooldown("Divine Shield")==0 and IsUsableSpell("Divine Shield")==1 and not UnitDebuff("player", "Forbearance") then CastSpellByName("Divine Shield") end
        
    -- Healthstone if needed and Divine Shield on cd
    /run if UnitHealth("player")/UnitHealthMax("player")<0.10 and GetSpellCooldown("Divine Shield")>0 and (GetItemCount("Healthstone")==1 and GetItemCooldown(19005)==0) then RunMacroText("/use Healthstone") end
    
    -- Divine Protection @ <50% hp
    /run if UnitHealth("player")/UnitHealthMax("player")<0.50 and GetSpellCooldown("Divine Protection")==0 then SpellStopCasting() CastSpellByName("Divine Protection") end
    
    -- Divine Plea
    /run if GetSpellCooldown("Divine Plea")==0 and UnitPower("player")/UnitPowerMax("player")<=0.50 then CastSpellByName("Divine Plea") return end;
    
    -- Avenging Wrath if Divine Plea
    /run if UnitBuff("player", "Divine Plea") and GetSpellCooldown("Avenging Wrath")==0 not UnitDebuff("player", "Forbearance") then CastSpellByName("Avenging Wrath") end
    
    -- Beacon on focus
    /run f=0; if UnitExists("focus") and UnitHealth("focus")>1 then for i=1,40 do d={UnitBuff("focus",i)}; if d~=nil and d[1]=="Beacon of Light" and d[8]=="player" and d[7]-GetTime()>=3 then f=1; break end end if f==0 and UnitInRange("focus") then RunMacroText("/cast [@focus] Beacon of Light") return end end;
    
    -- Judgemant focus-target
    /run if UnitExists("focustarget") and UnitInRange("focus")==1 and UnitAffectingCombat("focus")==1 and GetSpellCooldown("Judgement")==0 then CastSpellByName("Judgement", "focustarget") end
    
    -- Get party/raid members
    /run t="raid"; nps=1;npe=GetNumRaidMembers();if npe==0 then t="party"; nps=0; npe=GetNumPartyMembers() end;m=0;w=f;for i=nps,npe do if i==0 then tt="player" else tt=t..i end; if UnitExists(tt) and UnitInRange(tt)==1 and UnitIsDeadOrGhost(tt)~=1 then a=UnitHealthMax(tt)-UnitHealth(tt);if a>m then m=a w=tt end end end;
    
    -- Main healing
    /run if UnitExists(w) and UnitInRange(w)==1 then if m>=10000 and GetSpellCooldown("Holy Shock")==0 and GetUnitSpeed("player")>=0 then RunMacroText("/cast [@"..w.."] Holy Shock") elseif m>=15000 and UnitPower("player")/UnitPowerMax("player")>0.10 and GetSpellCooldown("Holy Light")==0 then RunMacroText("/cast [@"..w.."] Holy Light") elseif m>=35000 and UnitPower("player")/UnitPowerMax("player")>0.50 and GetSpellCooldown("Divine Light")==0 then RunMacroText("/cast [@"..w.."] Divine Light") elseif m>=25000 and UnitPower("player")/UnitPowerMax("player")>0.75 then RunMacroText("/cast [@"..w.."] Flash of Light") elseif (m<=0.20 and UnitPowerMax(w)>=75000) and GetSpellCooldown("Hand of Protection")==0 and IsSpellInRange("Hand of Protection",w)==1 and UnitAffectingCombat(w)==1 and not UnitDebuff(w,"Forbearance") and not UnitDebuff(w,"Ice Block") then RunMacroText("/cast [@"..w.."] Hand of Protection") end local d,n=0,0; if (n>(npe*0.2) and d/n>5000) and GetSpellCooldown("Light of Dawn")==0 then CastSpellByName("Light of Dawn") elseif (n>(npe*0.4) and d/n>15000) and GetSpellCooldown("Holy Radiance")==0 then CastSpellByName("Holy Radiance") elseif (n>(npe*1) and d/n>50000) and GetSpellCooldown("Guardian of Ancient Kings")==0 then CastSpellByName("Guardian of Ancient Kings") elseif (n>(npe*0.6) and d/n>35000) and GetSpellCooldown("Divine Favor")==0 then CastSpellByName("Divine Favor") elseif m>=20000 and GetUnitSpeed("player")>=0 and GetSpellCooldown("Word of Glory")==0 and (UnitPower("player", 9)>2 or UnitPower("player", 9)==3) then RunMacroText("/cast [@"..w.."] Word of Glory") end end
    Last edited by Ultraviolence; 04-17-2011 at 06:46 PM.

  7. #7
    Sikas's Avatar Active Member
    Reputation
    69
    Join Date
    Feb 2007
    Posts
    386
    Thanks G/R
    6/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still the same thing... I had to shorten the huge /run you have.. It was too long. :P

    Code:
    #showtooltip Holy Light
    /run cd=GetSpellCooldown c=CastSpellByName r=IsSpellInRange sp=GetUnitSpeed("player") mana=UnitPower("player")/UnitPowerMax("player") hs="Holy Shock" hl="Holy Light" dl="Divine Light" fol="Flash of Light" wog="Word of Glory" lod="Light of Dawn" hr="Holy Radiance" goak="Guardian of Ancient Kings" rmt=RunMacroText df="Divine Favor" hop="Hand of Protection"
    
    #SEAL
    /run if not IsMounted() and not UnitBuff("player","Seal of Insight") then CastSpellByName("Seal of Insight") end
    
    #BLESSINGS
    /run if not IsMounted() and GetSpellCooldown(GetCVar("blessing"))==0 and not UnitBuff("player",GetCVar("blessing")) then CastSpellByName(GetCVar("blessing")) end;
    
    #REBUKE
    /run if select(9,UnitCastingInfo('target'))==false and GetSpellCooldown("Rebuke")==0 and IsSpellInRange("Rebuke")==1 then CastSpellByName("Rebuke") end;
    /run if select(8,UnitChannelInfo('target'))==false and GetSpellCooldown("Rebuke")==0 and IsSpellInRange("Rebuke")==1 then CastSpellByName("Rebuke") end;
    
    #Divine Shield
    /run if UnitHealth("player")/UnitHealthMax("player")<0.10 and GetSpellCooldown("Divine Shield")==0 and IsUsableSpell("Divine Shield")==1 and not UnitDebuff("player", "Forbearance") then CastSpellByName("Divine Shield") end
        
    #Healthstone if needed and Divine Shield on cd
    /run if UnitHealth("player")/UnitHealthMax("player")<0.10 and GetSpellCooldown("Divine Shield")>0 and (GetItemCount("Healthstone")==1 and GetItemCooldown(19005)==0) then RunMacroText("/use Healthstone") end
    
    #Divine Protection @ <50% hp
    /run if UnitHealth("player")/UnitHealthMax("player")<0.50 and GetSpellCooldown("Divine Protection")==0 then SpellStopCasting() CastSpellByName("Divine Protection") end
    
    #Divine Plea
    /run if GetSpellCooldown("Divine Plea")==0 and UnitPower("player")/UnitPowerMax("player")<=0.50 then CastSpellByName("Divine Plea") return end;
    
    #Avenging Wrath if Divine Plea
    /run if UnitBuff("player", "Divine Plea") and GetSpellCooldown("Avenging Wrath")==0 not UnitDebuff("player", "Forbearance") then CastSpellByName("Avenging Wrath") end
    
    #Beacon on focus
    /run f=0; if UnitExists("focus") and UnitHealth("focus")>1 then for i=1,40 do d={UnitBuff("focus",i)}; if d~=nil and d[1]=="Beacon of Light" and d[8]=="player" and d[7]-GetTime()>=3 then f=1; break end end if f==0 and UnitInRange("focus") then RunMacroText("/cast [@focus] Beacon of Light") return end end;
    
    #Judgement focus-target
    /run if UnitExists("focustarget") and UnitInRange("focus")==1 and UnitAffectingCombat("focus")==1 and GetSpellCooldown("Judgement")==0 then CastSpellByName("Judgement", "focustarget") end
    
    #Get party/raid members
    /run t="raid"; nps=1;npe=GetNumRaidMembers();if npe==0 then t="party"; nps=0; npe=GetNumPartyMembers() end;m=0;w=f;for i=nps,npe do if i==0 then tt="player" else tt=t..i end; if UnitExists(tt) and UnitInRange(tt)==1 and UnitIsDeadOrGhost(tt)~=1 then a=UnitHealthMax(tt)-UnitHealth(tt);if a>m then m=a w=tt end end end;
    
    #Main healing
    /run if UnitExists(w)==1 and UnitInRange(w)==1 then if m>=10000 and cd(hs)==0 and sp>=0 then rmt("/cast [@"..w.."] Holy Shock") elseif m>=15000 and mana>0.10 and cd(hl)==0 then rmt("/cast [@"..w.."] Holy Light") elseif m>=35000 and mana>0.5 and cd(dl)==0 then rmt("/cast [@"..w.."] Divine Light") elseif m>=25000 and mana>0.75 then rmt("/cast [@"..w.."] Flash of Light") elseif (m<=0.20 and UnitPowerMax(w)>=75000) and cd(hop)==0 and r(hop,w)==1 and UnitAffectingCombat(w)==1 and not UnitDebuff(w,"Forbearance") and not UnitDebuff(w,"Ice Block") then rmt("/cast [@"..w.."] Hand of Protection") end d,n=0,0; if (n>(npe*0.2) and d/n>5000) and cd(lod)==0 then c(lod) elseif (n>(npe*0.4) and d/n>15000) and cd(hr)==0 then c(hr) elseif (n>(npe*1) and d/n>50000) and cd(goak)==0 then c(goak) elseif (n>(npe*0.6) and d/n>35000) and cd(df)==0 then c(df) elseif m>=20000 and sp>=0 and cd(wog)==0 and (UnitPower("player", 9)>2 or UnitPower("player", 9)==3) then rmt("/cast [@"..w.."] Word of Glory") end end
    
    /script CombatLogClearEntries();
    /run UIErrorsFrame:Clear();
    /run StaticPopup_Hide("MACRO_ACTION_FORBIDDEN");
    Last edited by Sikas; 04-18-2011 at 07:31 AM.

  8. #8
    Ultraviolence's Avatar Active Member
    Reputation
    15
    Join Date
    Aug 2008
    Posts
    102
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lose some health and then confirm that you can at least run this very simple code which does work (don't add anything else):

    Code:
    /run t="raid"; nps=1;npe=GetNumRaidMembers();if npe==0 then t="party"; nps=0; npe=GetNumPartyMembers() end;m=0;w=f;for i=nps,npe do if i==0 then tt="player" else tt=t..i end; if UnitExists(tt) and UnitInRange(tt)==1 and UnitIsDeadOrGhost(tt)~=1 then a=UnitHealthMax(tt)-UnitHealth(tt);if a>m then m=a w=tt end end end;
    
    #Main healing
    /run if UnitExists(w)==1 and UnitInRange(w)==1 then if m>=10000 then RunMacroText("/cast [@"..w.."] Holy Shock") end end
    You know you can do this yourself. This is usually how I debug shit. I just split the entire script up into little pieces and test individually. Once you've hit something that completely stops the macro then just delete or re-check it. The previous script I posted is similar to the resto druid one I use (which works fine), so it's confusing.
    Last edited by Ultraviolence; 04-18-2011 at 02:57 PM.

  9. #9
    Sikas's Avatar Active Member
    Reputation
    69
    Join Date
    Feb 2007
    Posts
    386
    Thanks G/R
    6/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Ultraviolence View Post
    Lose some health and then confirm that you can at least run this very simple code which does work (don't add anything else):

    Code:
    /run t="raid"; nps=1;npe=GetNumRaidMembers();if npe==0 then t="party"; nps=0; npe=GetNumPartyMembers() end;m=0;w=f;for i=nps,npe do if i==0 then tt="player" else tt=t..i end; if UnitExists(tt) and UnitInRange(tt)==1 and UnitIsDeadOrGhost(tt)~=1 then a=UnitHealthMax(tt)-UnitHealth(tt);if a>m then m=a w=tt end end end;
    
    #Main healing
    /run if UnitExists(w)==1 and UnitInRange(w)==1 then if m>=10000 then RunMacroText("/cast [@"..w.."] Holy Shock") end end
    You know you can do this yourself. This is usually how I debug shit. I just split the entire script up into little pieces and test individually. Once you've hit something that completely stops the macro then just delete or re-check it. The previous script I posted is similar to the resto druid one I use (which works fine), so it's confusing.
    The macro you posted doesn't work, but I've found the solution with help from a friend.

    Code:
    /run t="raid"; nps=1;npe=GetNumRaidMembers();if npe==0 then t="party"; nps=0; npe=GetNumPartyMembers() end;m=0;w=f;for i=nps,npe do if i==0 then tt="player" else tt=t..i end; if UnitExists(tt) and UnitInRange(tt)==true and UnitIsDeadOrGhost(tt)~=1 then a=UnitHealthMax(tt)-UnitHealth(tt);if a>m then m=a w=tt end end end;
    
    #Main healing
    /run if UnitExists(w) and UnitInRange(w)==true then if m>=10000 then RunMacroText("/cast [@"..w.."] Holy Shock") end end
    Only thing that was changed was setting UnitInRange()==true. Setting it to ==1 or =="true" didn't work at all. .. Man the WoW API is ****ing weird.

  10. #10
    Ultraviolence's Avatar Active Member
    Reputation
    15
    Join Date
    Aug 2008
    Posts
    102
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Doesn't make sense, but who cares if the whole thing works now, right? Probably something wrong with NA, and that program isn't the best method of executing lua.
    Last edited by Ultraviolence; 04-19-2011 at 11:43 AM.

  11. #11
    Sikas's Avatar Active Member
    Reputation
    69
    Join Date
    Feb 2007
    Posts
    386
    Thanks G/R
    6/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Ultraviolence View Post
    Doesn't make sense, but who cares if the whole thing works now, right? Probably something wrong with NA, and that program isn't the best method of executing lua.
    Yea, it's strange indeed... but I've worked on it afterwards, and it doesn't go behond Holy Light and Holy Shock.. Even if I'm at 10% hp, it should Divine Light and Flash of Light.. but it doesn't. Is it the healing logic?

  12. #12
    Ultraviolence's Avatar Active Member
    Reputation
    15
    Join Date
    Aug 2008
    Posts
    102
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    elseif m>=35000 and mana>0.5 and cd(dl)==0 then rmt("/cast [@"..w.."] Divine Light") elseif m>=25000 and mana>0.75 then rmt("/cast [@"..w.."] Flash of Light")
    Perhaps you could change it to

    Code:
    elseif (m>=35000 and mana>0.5) and cd(dl)==0 then rmt("/cast [@"..w.."] Divine Light") elseif (m>=25000 and mana>0.75) then rmt("/cast [@"..w.."] Flash of Light")
    Simple parentheses.

    edit: but it's exactly the same as the Holy Shock line, so idk why it wouldn't work lol
    Last edited by Ultraviolence; 04-19-2011 at 01:28 PM.

  13. #13
    cdmichaelb's Avatar Contributor CoreCoins Purchaser
    Reputation
    119
    Join Date
    Jan 2011
    Posts
    368
    Thanks G/R
    21/5
    Trade Feedback
    7 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Ultraviolence View Post
    Code:
    elseif m>=35000 and mana>0.5 and cd(dl)==0 then rmt("/cast [@"..w.."] Divine Light") elseif m>=25000 and mana>0.75 then rmt("/cast [@"..w.."] Flash of Light")
    Perhaps you could change it to

    Code:
    elseif (m>=35000 and mana>0.5) and cd(dl)==0 then rmt("/cast [@"..w.."] Divine Light") elseif (m>=25000 and mana>0.75) then rmt("/cast [@"..w.."] Flash of Light")
    Simple parentheses.

    edit: but it's exactly the same as the Holy Shock line, so idk why it wouldn't work lol
    It's just Cast Holy Shock and cast Holy Light are always true, so the code never gets to anything else.

  14. #14
    Ultraviolence's Avatar Active Member
    Reputation
    15
    Join Date
    Aug 2008
    Posts
    102
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by cdmichaelb View Post
    It's just Cast Holy Shock and cast Holy Light are always true, so the code never gets to anything else.
    Right, then end everything instead of elseif.

  15. #15
    cdmichaelb's Avatar Contributor CoreCoins Purchaser
    Reputation
    119
    Join Date
    Jan 2011
    Posts
    368
    Thanks G/R
    21/5
    Trade Feedback
    7 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Ultraviolence View Post
    Right, then end everything instead of elseif.
    Even with ends it will still cast in that order and fail to work as intended. It needs to A) have the script reordered by priority and heal amount BoP/Word of glory first then Biggest first heal, smallest last.. B) change everything to have 'if m>10000 and m<25000 then', but with B you will still need to put blessing of protection and Word of Glory/Light of Dawn at the start of the healing script.

    I'm sick or I'd just rewrite the whole thing myself for him.

Page 1 of 2 12 LastLast

Similar Threads

  1. paying for a good private lua macro for holy paladin and ret paladin pvp
    By Speedracer22 in forum WoW UI, Macros and Talent Specs
    Replies: 0
    Last Post: 03-25-2012, 02:00 PM
  2. [LUA/macro] Another "need help" thread, easy rep.
    By Ssateneth in forum WoW UI, Macros and Talent Specs
    Replies: 15
    Last Post: 11-26-2010, 06:04 AM
  3. [Class] Holy Paladin Pve Guide(updated version)
    By JimmyTheGoat in forum World of Warcraft Guides
    Replies: 4
    Last Post: 06-15-2010, 06:57 PM
  4. Holy Paladin PvE Guide, updated 3.3
    By Noblebeastx in forum WoW UI, Macros and Talent Specs
    Replies: 1
    Last Post: 05-26-2010, 03:29 AM
  5. [Urgent!!] Holy Paladin pros' help needed!
    By Illidan_000 in forum World of Warcraft General
    Replies: 4
    Last Post: 08-09-2009, 09:28 PM
All times are GMT -5. The time now is 12:11 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search