LUA Code: 1 button Macro for Cataclysm Paladin Tank (req. protected function calls) menu

Shout-Out

User Tag List

Results 1 to 12 of 12
  1. #1
    noctural's Avatar Active Member Captain Copypasta CoreCoins Purchaser
    Reputation
    26
    Join Date
    Apr 2009
    Posts
    76
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    LUA Code: 1 button Macro for Cataclysm Paladin Tank (req. protected function calls)

    Disclaimer:
    You *must* already have the ability to call protected LUA functions or these functions will not work. There are many other posts regarding the topic, but I'm not qualified to instruct on how to make protected methods available. I am decent at writing LUA, so I will try to help anyone in that regard.


    Hello all,
    I've played many classes and keep up to date on the latest rotations from Elitistjerks. I've put together many 1 button macros to do the rotations for various classes and thought they might be helpful to others.



    Now, on to my 1 button Cataclysm Pally Tank macro. This macro will do the most efficient rotation according to EJ, for a pally tank. The macro is intended to make the threat generation/rotation as easy as possible. It does not taunt/use racial abilities/defensive CDs, as I have found that those are best used manually for individual circumstances.

    Save the code below in a text file and name it whatever you want, e.g. PallyRotation.Lua

    Put this file in any existing addon directory. e.g. C:\World of Warcraft\Interface\AddOns\Bartender4\PallyRotation.Lua.

    Edit the .TOC file in that addon's directory. e.g. e.g. C:\World of Warcraft\Interface\AddOns\Bartender4\Bartender4.toc

    Add the line "PallyRotation.Lua" on its own line and save.

    Now, login to WoW and as long as your addon is loaded the PallyRotation.Lua will also be loaded. This gives you the ability to create a macro, that will be your 1 button you press when attacking a target.

    Create the following Macro in WoW:
    Code:
    /run CataPallyTank();

    Now that you have your macro and you have enabled protected method calls, simply target a mob and press the macro and it will cast the most efficient attack.

    I'll be happy to answer as many questions as I can!

    PallyRotation.Lua
    Code:
    function CanCast(spellname)
     local spell = UnitCastingInfo("player");
     local spell2 = UnitChannelInfo("player");
    
     if(spell or spell2) then
    	return "FALSE";
     end
     
     local start, duration, enabled = GetSpellCooldown(spellname)
     local usable = IsUsableSpell(spellname)
     local inRange = IsSpellInRange(spellname,player)
     
     if(usable and (start == 0 and duration == 0 and enabled ~= 0) and inRange ~= 0) then
         return "TRUE"
      else
         return "FALSE"
     end
    end
    
    function CataPallyTank()	
    	if(UnitName("target")) then
    		local rfury = UnitAura("player","Righteous Fury");
    		--buff righteous fury if needed
    		if(not rfury and CanCast("Righteous Fury")=="TRUE") then RunMacroText("/cast Righteous Fury"); return end
    
    		local myHealth = UnitHealth("player")/UnitHealthMax("player");
    		local myMana = UnitMana("player")/UnitManaMax("player");
    		local power = UnitPower("player","9");
        
        	-- Rotation.. Shield of the Righteous > Hammer of the Righteous > Consecration > Holy Wrath > Avenger's Shield* > Judgment
    		if(myMana < .75 and (CanCast("Divine Plea")=="TRUE")) then RunMacroText("/cast Divine Plea");
    		elseif(myHealth < .25 and CanCast("Corroded Skeleton Key")=="TRUE") then RunMacroText("/cast Corroded Skeleton Key"); 
    		elseif(power~=nil and power>=3 and CanCast("Shield of the Righteous")=="TRUE") then RunMacroText("/cast [target=target] Shield of the Righteous");
    		elseif(CanCast("Hammer of the Righteous")=="TRUE") then RunMacroText("/cast [target=target] Hammer of the Righteous");
    		elseif(myMana > .5 and (CanCast("Consecration")=="TRUE")) then RunMacroText("/cast Consecration");
    		elseif(CanCast("Holy Wrath")=="TRUE") then RunMacroText("/cast Holy Wrath");
    		elseif(CanCast("Avenger's Shield")=="TRUE") then RunMacroText("/cast Avenger's Shield");
    		elseif(CanCast("Judgement")=="TRUE") then RunMacroText("/cast [target=target] Judgement");
    		elseif(CanCast("Hammer of Wrath")=="TRUE") then RunMacroText("/cast Hammer of Wrath");
    		end
    	end
    end

    LUA Code: 1 button Macro for Cataclysm Paladin Tank (req. protected function calls)
  2. #2
    JDD's Avatar Private
    Reputation
    1
    Join Date
    Nov 2009
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If this truly works, then that's incredible. I've always thought that someone should make one of these. It's a shame I don't have a high-levelled paladin, though.

    If you could post more, and possibly add pictures, then I'm sure you'd get more response from this. I personally would love to see a druid tanking and warrior tanking macro, seeing as these are my two favorite tanking classes.
    +rep for the effort put into this.

  3. #3
    liamsmith12's Avatar Private
    Reputation
    1
    Join Date
    Feb 2010
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When i try to run the addon in wow, i'm getting a message saying " bartender4 has been blocked from an action only available to the blizzard ui"

    How do i stop this from happening so the macro works?

  4. #4
    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)
    You're not using Crusader Strike in your rotation? There are times where you don't always want to use Hammer of the Righteous in heroics/raids, as you might pull threat away.

    Otherwise, this looks good. I don't play a Prot Paladin, but I do play a Ret Paladin. The Ret Macro works perfectly too. xD;

    Trying to work on a Holy Pally macro from Viral Fly-By's previous work, but it's still broken.

  5. #5
    Zetious's Avatar Private Authenticator enabled
    Reputation
    1
    Join Date
    Jan 2011
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to

    Can anyone help me out with how to call protected LUA functions? I am getting errors when trying to get this macro to work.

  6. #6
    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 Zetious View Post
    Can anyone help me out with how to call protected LUA functions? I am getting errors when trying to get this macro to work.
    You'll need a hack to call protected LUA functions. You can either ask for help and create your own though. Or google a LUA hack and use a public/private one if you find it.

  7. #7
    Zetious's Avatar Private Authenticator enabled
    Reputation
    1
    Join Date
    Jan 2011
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anyone have a good hyper link to a site with a decent hack for this?

  8. #8
    idczar's Avatar Member
    Reputation
    1
    Join Date
    Aug 2007
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks so much for the lua post, nocturnal. Really helped me alot writing my own ret pally.

    I noticed long time ago you had some sample lua code called healzor. Do you mind posting some sample code on it? I'm trying to write addon for resto shaman.

    Thanks alot!!!

  9. #9
    Silvera's Avatar Member
    Reputation
    10
    Join Date
    Oct 2009
    Posts
    139
    Thanks G/R
    0/1
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would just like to state that a hack that enables the protected lua functions is very, very insecure.
    Search for "LuaNinja banwave" if you want some stuff to read on.

    But it is indeed incredible what you can do when there's no limits on the lua codes!

  10. #10
    gippy's Avatar Elite User
    Reputation
    436
    Join Date
    Jun 2008
    Posts
    1,323
    Thanks G/R
    293/139
    Trade Feedback
    7 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i wouldnt use another luahack, luaninja lol so much awesome dps with 1 button

    wasnt so good when i got took out in the banwave, ah well

  11. #11
    hampe98's Avatar Member
    Reputation
    1
    Join Date
    Jul 2010
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    could you possibly make a new updated version?

  12. #12
    Eunda80's Avatar Banned
    Reputation
    3
    Join Date
    Nov 2011
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cas sequence = no risk of ban same thing

Similar Threads

  1. [Macro] One Button Macro for Level 15/30/45/60/75/90 Talents
    By Classicclean in forum WoW UI, Macros and Talent Specs
    Replies: 5
    Last Post: 10-14-2014, 10:17 PM
  2. [Macro-Collection] All-In-One-Button Macro for all Classes from Level 15-90!
    By Classicclean in forum WoW UI, Macros and Talent Specs
    Replies: 21
    Last Post: 01-21-2014, 08:16 AM
  3. 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
  4. [Macros] For The Lazy Raider -=- Single Button Rotations
    By Muramasa in forum WoW UI, Macros and Talent Specs
    Replies: 12
    Last Post: 08-30-2010, 08:21 AM
All times are GMT -5. The time now is 08:44 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search