Make interrupt for Warrior on 3.3.5a for PRQ? menu

User Tag List

Results 1 to 1 of 1
  1. #1
    DarhangeR's Avatar Active Member
    Reputation
    27
    Join Date
    Nov 2017
    Posts
    51
    Thanks G/R
    3/19
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Make interrupt for Warrior on 3.3.5a for PRQ?

    Hello, need help to modify interrupt engine with checking stances.

    Code:
    if xelperInterruptInit == nil then    xelperInterruptInit = true
            function PQR_InterruptSpell()
                local _, playerClass = UnitClass("player")
            
                if playerClass == "DEATHKNIGHT" then
                    return 47528
                elseif playerClass == "HUNTER" then
                    return 34490
                elseif playerClass == "MAGE" then
                    return 2139
                elseif playerClass == "PRIEST" then
                    return 15487
                elseif playerClass == "ROGUE" then    
                    return 1766
                elseif playerClass == "SHAMAN" then
                    return 57994
                elseif playerClass == "WARRIOR" then
                    local DS = GetShapeshiftForm()
                    if DS == 1
                        return 57755
                        end
                    else
                    local DS = GetShapeshiftForm()
                    if DS == 2
                        return 72
                        end
                    else
                    local DS = GetShapeshiftForm()
                    if DS == 3
                        return 6552
                        end
                    end
            end
    end
    Need add Heroic Throw/Pummel/Shield bash

    Full script:

    Code:
    -- New Interrupt Engine // Новый движок--
    
    if xelperInterruptInit == nil then
        xelperInterruptInit = true
            function PQR_InterruptSpell()
                local _, playerClass = UnitClass("player")
            
                if playerClass == "DEATHKNIGHT" then
                    return 47528
                elseif playerClass == "HUNTER" then
                    return 34490
                elseif playerClass == "MAGE" then
                    return 2139
                elseif playerClass == "PRIEST" then
                    return 15487
                elseif playerClass == "ROGUE" then    
                    return 1766
                elseif playerClass == "SHAMAN" then
                    return 57994
                elseif playerClass == "WARRIOR" then
                    local DS = GetShapeshiftForm()
                    if DS == 1
                        return 57755
                        end
                    else
                    local DS = GetShapeshiftForm()
                    if DS == 2
                        return 72
                        end
                    else
                    local DS = GetShapeshiftForm()
                    if DS == 3
                        return 6552
                        end
                    end
            end
    end
    
    
    -- Сore / Ядро -- 
    
    
    local customTarget = "target"
    local castName, _, _, _, castStartTime, castEndTime, _, _, castInterruptable = UnitCastingInfo(customTarget)
    local channelName, _, _, _, channelStartTime, channelEndTime, _, channelInterruptable = UnitChannelInfo(customTarget)
    
    
    if channelName ~= nil then
        --target is channeling a spell that is interruptable
        --load the channel variables into the cast variables to make logic a little easier.
        castName = channelName
        castStartTime = channelStartTime
        castEndTime = channelEndTime
        castInterruptable = channelInterruptable
    end
    
    
    --This is actually "Not Interruptable"... so lets swap it around to use in the positive.
    if castInterruptable == false then
        castInterruptable = true
    else
        castInterruptable = false
    end
    
    
    --we can't attack the target.
    if UnitCanAttack("player", customTarget) == nil then
        return false
    end
    
    
    if castInterruptable then
        --target is casting something that is interruptable.
        --the following 2 variables are named logically... value is in seconds.
        local timeSinceStart = (GetTime() * 1000 - castStartTime) / 1000
        local timeLeft = ((GetTime() * 1000 - castEndTime) * -1) / 1000
        local castTime = castEndTime - castStartTime
        local currentPercent = timeSinceStart / castTime * 100000
        
        --interrupt percentage check
        if currentPercent < PQR_InterruptPercent then
            return false
        end
    
    
        --minimum interrupt time.
        if timeSinceStart - PQR_InterruptDelay < 0 then
            return false
        end
    
    
        --make sure the interrupt spell is available
        local interruptSpell = PQR_InterruptSpell()
        if interruptSpell ~= 0 then
            
            local interruptName = GetSpellInfo(interruptSpell)
            if not PQR_SpellAvailable(interruptSpell) or not IsSpellInRange(interruptName, customTarget) then
                return false
            end
        else
            return false
        end
    
    
        --Finally, make sure the spell they are casting is on the interrupt list or interrupt all is checked
        --if PQR_IsInterruptAll() then
            PQR_Debug("Casting interrupt on "..customTarget)
            CastSpellByID(interruptSpell, customTarget)
            return true
        --end
        
    end
    
    
    --PQR_InterruptStarted is a global flag to indicate that a new interrupt rotation has started.
    
    
    if not PQR_InterruptStart then
        PQR_InterruptStart = true
    
    
        --Only interrupt these abilities:
        --PQR_AddInterrupt("Holy Light")
        --PQR_AddInterrupt("Flash of Light")
        --PQR_AddInterrupt(GetSpellInfo(16914)) --Hurricane
    
    
        --This is the delay before interrupting in seconds.
        PQR_InterruptDelay = 0.05
        
        --This is the percentage of the cast to wait before interrupting
        PQR_InterruptPercent = math.random(30,60)
    end
    
    
    if not spells then
        spells = {
            "Greater Heal", --Priest Heal
            "Penance", --Priest Direct channel heal
            "Flash Heal", --Priest quick big heal"
            "Heal", --Priest normal heal
            "Binding Heal", --Priest heal for themself and another
            "Lesser Heal", --Priest small heal
            "Prayer of Healing", --Priest AoE heal
            "Chain Heal", --Shaman AoE heal
            "Healing Wave", --Shaman heal
            "Lesser Healing Wave", --Shaman minor heal
            "Flash of Light", --Paladin quick heal
            "Holy Light", --Paladin small heal
            "Nourish", --Druid heals
            "Healing Touch", --Druid heal
            "Regrowth", --Druid AoE
            "Rebirth", --Druid brez
            "Tranquility", --Druid AoE heal
            "Hex", --Shaman CC
            "Cyclone",
            "Polymorph"
            }
    end
    DarhangeR Rotations Discord → https://discord.gg/xBFKJc6QRr


    Make interrupt for Warrior on 3.3.5a for PRQ?

Similar Threads

  1. Looking for someting to make pet following healer on arena.
    By sebaba12 in forum WoW Bots Questions & Requests
    Replies: 3
    Last Post: 09-03-2013, 09:10 AM
  2. [Trading] Account for one 85 Warrior on Alliance (Burning Blade)
    By Harant in forum World of Warcraft Buy Sell Trade
    Replies: 0
    Last Post: 01-05-2012, 02:46 PM
  3. Replies: 9
    Last Post: 11-21-2010, 07:45 AM
  4. [Sugestions and Help] Ideas on making money for a dedicated host!?
    By Darksid in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 01-30-2009, 05:13 PM
  5. Replies: 13
    Last Post: 04-12-2008, 10:48 AM
All times are GMT -5. The time now is 02:51 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