Prot Warrior Lua Script menu

Shout-Out

User Tag List

Results 1 to 9 of 9
  1. #1
    CrazyCactuaR's Avatar Contributor
    Reputation
    84
    Join Date
    Sep 2008
    Posts
    201
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Prot Warrior Lua Script

    Requires: Hack addon

    [Donate]

    Single Target Macro
    Code:
    /run Hack.Run("Warrior.Prot","0")
    AoE Group Macro
    Code:
    /run Hack.Run("Warrior.Prot","1")

    Code Block
    Code:
    local AoEMode = ...
    cast=CastSpellByName
    function check(sp,unit)
       unit = unit or "target";
       spell = string.format("%s",sp)
       if GetSpellCooldown(spell)==0 and IsUsableSpell(spell) then 
          if SpellHasRange(spell)==1 then
             if IsSpellInRange(spell,unit)~=1 then
                return false
             end
          end
       else 
          return false
       end
       return true
    end
    
    local PartyNum = GetNumPartyMembers()
    if PartyNum~=0 then
       if check("Commanding Shout") then cast("Commanding Shout") return end
    else
       if check("Battle Shout") then cast("Battle Shout") return end
    end 
    
    if check("Intercept")==false and check("Charge") then cast("Charge") return end
    if check("Intercept") then cast("Intercept") return end
    if UnitAffectingCombat("player")~=1 then return end
    
    if GetInventoryItemCooldown(13)==0 then UseInventoryItem(13) end
    if GetInventoryItemCooldown(14)==0 then UseInventoryItem(14) end
    
    local uch={UnitChannelInfo("target")}
    local uca={UnitCastingInfo("target")}
    
    -- Spell Reflection
    if (UnitChannelInfo("target")~=nil or UnitCastingInfo("target")~=nil) and UnitName("targettarget")==UnitName("player") and check("Spell Reflection") then cast("Spell Reflection") return end
    -- BWD Interuption
    if UnitName("target")=="Maloriak" and (uca[1]=="Arcane Storm" or uch[1]=="Arcane Storm") and check("Pummel") then cast ("Pummel") return end
    -- ZulGurub Interuption
    if (UnitName("target")=="High Priest Venoxis" or UnitName("target")=="Venomancer Mauri" or UnitName("target")=="Venomancer T'Kulu") and (uca[1]=="Whispers of Hethiss" or uch[1]=="Whispers of Hethiss") and check("Pummel") then cast("Pummel") return end
    -- General Interupt
    if (UnitName("target")~="Maloriak" and UnitName("target")~="High Priest Venoxis" and UnitName("target")~="Venomancer Mauri" and UnitName("target")~="Venomancer T'Kulu") and (uca[9]==false or uch[8]==false) and check("Pummel") then cast("Pummel") return end
    -- Nefarian Debuff
    if (UnitName("target")=="Nefarian" or UnitName("target")=="Onyxia") and UnitDebuff("target", "Demoralizing Shout")~="Demoralizing Shout" and check("Demoralizing Shout") then cast("Demoralizing Shout") return end
    ---------------------
    
    local playerHP=UnitHealth("player")/UnitHealthMax("player")
    if playerHP<=0.30 and check("Last Stand") then cast("Last Stand") return end
    if playerHP<=0.50 and check("Shield Wall") then cast("Shield Wall") return end
    if playerHP<=0.40 and check("Enraged Regeneration") then cast("Enraged Regeneration") return end
    if playerHP<=0.10 and check("Rallying Cry") then cast("Rallying Cry") return end
    
    if check("Berserker Rage") then cast("Berserker Rage") return end
    if check("Inner Rage") then cast("Inner Rage") return end
    if check("Victory Rush") then cast("Victory Rush") return end
    
    if AoEMode=="0" then
    	if check("Devastate") then cast("Devastate") return end
    	if check("Revenge") then cast("Revenge") return end
    
    	if check("Concussion Blow") then cast("Concussion Blow") return end
    	if check("Shield Block") then cast("Shield Block") return end
    	if check("Shield Slam") then cast("Shield Slam") return end
    
    	local Power=UnitPower("player")/UnitPowerMax("player")
    	if Power > 0.4 and check("Heroic Strike") then cast("Heroic Strike") return end
    	if UnitDebuff("target", "Rend")~="Rend" and check("rend") then cast("Rend") return end
    end
    
    if AoEMode=="1" then
    	_, TCCD=GetSpellCooldown("Thunder Clap")
    	if check("Shield Block") and TCCD>2 then cast("Shield Block") return end
    	if UnitDebuff("target", "Rend")~="Rend" and check("rend") then cast("Rend") return end
    	if check("Thunder Clap") and IsSpellInRange("Heroic Strike","target")==1 then cast("Thunder Clap") return end
    	if check("Cleave") and TCCD>2 then cast("Cleave") return end
    
    	if check("Revenge") and TCCD>2 then cast("Revenge") return end
    	if check("Shockwave") and TCCD>2 and IsSpellInRange("Heroic Strike","target")==1 then cast("Shockwave") return end
    	if UnitDebuff("target", "Demoralizing Shout")~="Demoralizing Shout" and check("Demoralizing Shout") then cast("Demoralizing Shout") return end
    end
    Last edited by CrazyCactuaR; 07-13-2011 at 05:34 AM.
    (╯°□°)╯︵┻━┻ ლ(ಠ益ಠლ

    Prot Warrior Lua Script
  2. #2
    sed-'s Avatar ★ Elder ★
    Reputation
    1114
    Join Date
    Mar 2010
    Posts
    1,566
    Thanks G/R
    52/151
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    amazing job man! glad to start to see more lua scripts starting to come out now that every free hack has lua remover ;p. Glad to see you back at it ;p. Cant wait till you make a blood/frost dk or fire mage script ;p. Keep up the great work man!
    Last edited by sed-; 07-13-2011 at 10:34 AM.

  3. #3
    jereminion's Avatar Active Member
    Reputation
    28
    Join Date
    Jun 2007
    Posts
    308
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks ur the bomb diggity dawg
    my artist web sizzle www.jeremynative.com

  4. #4
    jereminion's Avatar Active Member
    Reputation
    28
    Join Date
    Jun 2007
    Posts
    308
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is it possible for you to do feral tanking aoe and single target
    my artist web sizzle www.jeremynative.com

  5. #5
    sed-'s Avatar ★ Elder ★
    Reputation
    1114
    Join Date
    Mar 2010
    Posts
    1,566
    Thanks G/R
    52/151
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol you got an edit button for a reason, to prevent double posting ;p

  6. #6
    CrazyCactuaR's Avatar Contributor
    Reputation
    84
    Join Date
    Sep 2008
    Posts
    201
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by jereminion View Post
    is it possible for you to do feral tanking aoe and single target
    Sorry, I dont do requests.

  7. #7
    k4hn's Avatar Sergeant
    Reputation
    15
    Join Date
    Sep 2010
    Posts
    43
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Got it working, looks good. Cheers CactuaR
    Last edited by k4hn; 08-06-2011 at 07:01 AM.

  8. #8
    Hex00010's Avatar Master Sergeant
    Reputation
    45
    Join Date
    Feb 2010
    Posts
    98
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how do i import this into the game using that hack addon

  9. #9
    sooji's Avatar Member
    Reputation
    1
    Join Date
    Oct 2007
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is the Lua code for WoW version 1.12.1.
    You may need to adjust the variable local AoEMode = 1 according to your specific needs.

    Code:
    local AoEMode = 1
    cast = CastSpellByName
    
    
    function GetSpellIndex(spellName)
       local i = 1
       while true do
          local spell, rank = GetSpellName(i, BOOKTYPE_SPELL)
          if not spell then
             break
          end
          if spell == spellName then
             return i
          end
          i = i + 1
       end
       return nil
    end
    
    
    function check(sp, unit)
       unit = unit or "target"
       
       local spellIndex = GetSpellIndex(sp)
       if not spellIndex then
          return false
       end
    
    
       local start, duration, enabled = GetSpellCooldown(spellIndex, BOOKTYPE_SPELL)
       if enabled == 0 or (start > 0 and duration > 0) then
          return false
       end
    
    
       if CheckInteractDistance(unit, 3) then
          return true
       end
    
    
       return false
    end
    
    
    local PartyNum = GetNumPartyMembers()
    if PartyNum ~= 0 then
       if check("Commanding Shout") then
          cast("Commanding Shout")
          return
       end
    else
       if check("Battle Shout") then
          cast("Battle Shout")
          return
       end
    end
    
    
    if check("Intercept") == false and check("Charge") then
       cast("Charge")
       return
    end
    if check("Intercept") then
       cast("Intercept")
       return
    end
    if UnitAffectingCombat("player") ~= 1 then
       return
    end
    
    
    if GetInventoryItemCooldown(13) == 0 then
       UseInventoryItem(13)
    end
    if GetInventoryItemCooldown(14) == 0 then
       UseInventoryItem(14)
    end
    
    
    local function OnEvent(self, event, arg1)
       if event == "UNIT_SPELLCAST_START" and arg1 == "target" then
          if check("Pummel") then
             cast("Pummel")
          end
       end
    end
    
    
    local frame = CreateFrame("Frame")
    frame:RegisterEvent("UNIT_SPELLCAST_START")
    frame:SetScript("OnEvent", OnEvent)
    
    
    local playerHP = UnitHealth("player") / UnitHealthMax("player")
    if playerHP <= 0.30 and check("Last Stand") then
       cast("Last Stand")
       return
    end
    if playerHP <= 0.50 and check("Shield Wall") then
       cast("Shield Wall")
       return
    end
    if playerHP <= 0.40 and check("Enraged Regeneration") then
       cast("Enraged Regeneration")
       return
    end
    if playerHP <= 0.10 and check("Rallying Cry") then
       cast("Rallying Cry")
       return
    end
    
    
    if AoEMode == 0 then
       if check("Devastate") then
          cast("Devastate")
          return
       end
       if check("Revenge") then
          cast("Revenge")
          return
       end
       if check("Concussion Blow") then
          cast("Concussion Blow")
          return
       end
       if check("Shield Block") then
          cast("Shield Block")
          return
       end
       if check("Shield Slam") then
          cast("Shield Slam")
          return
       end
    
    
       local Power = UnitPower("player") / UnitPowerMax("player")
       if Power > 0.4 and check("Heroic Strike") then
          cast("Heroic Strike")
          return
       end
       if UnitDebuff("target", "Rend") ~= "Rend" and check("Rend") then
          cast("Rend")
          return
       end
    end
    
    
    if AoEMode == 1 then
       _, TCCD = GetSpellCooldown(GetSpellIndex("Thunder Clap"))
       if check("Shield Block") and TCCD > 2 then
          cast("Shield Block")
          return
       end
       if UnitDebuff("target", "Rend") ~= "Rend" and check("Rend") then
          cast("Rend")
          return
       end
       if check("Thunder Clap") and CheckInteractDistance("target", 3) then
          cast("Thunder Clap")
          return
       end
       if check("Cleave") and TCCD > 2 then
          cast("Cleave")
          return
       end
       if check("Revenge") and TCCD > 2 then
          cast("Revenge")
          return
       end
       if check("Shockwave") and TCCD > 2 and CheckInteractDistance("target", 3) then
          cast("Shockwave")
          return
       end
       if UnitDebuff("target", "Demoralizing Shout") ~= "Demoralizing Shout" and check("Demoralizing Shout") then
          cast("Demoralizing Shout")
          return
       end
    end

Similar Threads

  1. Replies: 1
    Last Post: 03-20-2016, 04:30 AM
  2. Replies: 0
    Last Post: 05-19-2015, 06:56 PM
  3. Fury Warrior Lua Script
    By CrazyCactuaR in forum WoW UI, Macros and Talent Specs
    Replies: 12
    Last Post: 08-04-2011, 09:36 AM
  4. Arms Warrior Lua Script
    By CrazyCactuaR in forum WoW UI, Macros and Talent Specs
    Replies: 10
    Last Post: 07-09-2011, 07:58 PM
  5. Lvl 70 prot warrior spec
    By Demon666 in forum WoW UI, Macros and Talent Specs
    Replies: 2
    Last Post: 10-13-2007, 08:18 AM
All times are GMT -5. The time now is 03:10 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