Guest User

PQR Internal Lua

a guest
Aug 18th, 2020
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 24.31 KB | None | 0 0
  1. --Beginning of first load
  2.        
  3.         function PQR_Debug(strText)
  4.             if PQR_DebugEnabled == true then
  5.                 PQR_WriteToChat(\"[DEBUG] \"..strText);
  6.            end
  7.        end
  8.  
  9.        function PQR_SetDebug(enabled)
  10.            if enabled == true then
  11.                PQR_DebugEnabled = true
  12.            else
  13.                PQR_DebugEnabled = false
  14.            end
  15.        end
  16.  
  17.        function PQR_WriteToChat(strText)
  18.            if PQR_ShowChat == true then
  19.                print(\"|cffff7d0a<|r|cffffd200PQR|r|cffff7d0a>|r \"..strText)
  20.            end
  21.        end
  22.  
  23.        function PQR_EventFrame_OnUpdate(self, elapsed)
  24.             PQR_totalElapsed = PQR_totalElapsed + elapsed;
  25.             PQR_totalElapsed2 = PQR_totalElapsed2 + elapsed;
  26.            while (PQR_totalElapsed2 > PQR_UpdateInterval2) do
  27.                PQR_RegisterMovement(PQR_totalElapsed2)
  28.                PQR_SetRecastDelay()
  29.                PQR_ExecuteInterrupt()
  30.                PQR_totalElapsed2 = PQR_totalElapsed2 - PQR_UpdateInterval2
  31.            end
  32.            if PQR_ChangeIntervalFlag == 1 then
  33.                PQR_UpdateInterval = PQR_NewInterval
  34.                PQR_ChangeIntervalFlag = 0
  35.                PQR_totalElapsed = 0
  36.            else
  37.                while (PQR_totalElapsed > PQR_UpdateInterval) do
  38.                    PQR_RegisterMovement(PQR_totalElapsed)
  39.                    PQR_SetRecastDelay()
  40.                    PQR_ExecuteBot()
  41.                    PQR_totalElapsed = PQR_totalElapsed - PQR_UpdateInterval
  42.                end
  43.            end
  44.        end
  45.  
  46.        function PQR_EventFrame_OnEvent(self,event,...)
  47.            if event == \"PLAYER_ENTERING_WORLD\" then
  48.                PQR_EventFrame:Show()
  49.                SetMapToCurrentZone()
  50.                PQR_Debug(\"Setting Map to Current Zone.\")
  51.            elseif event ==\"PLAYER_REGEN_DISABLED\" then
  52.                SetMapToCurrentZone()
  53.                PQR_Debug(\"Setting Map to Current Zone.\")
  54.            elseif event == \"PLAYER_LOGOUT\" then
  55.                PQR_EnableInterrupt(false)
  56.                PQR_EnableBot(\"\")
  57.            elseif event == \"UNIT_SPELLCAST_FAILED\" then
  58.                local source, spellName = ...
  59.                PQR_DropThreat(\"FAILED\", source, spellName)
  60.            elseif event == \"UNIT_SPELLCAST_FAILED_QUIET\" then
  61.                local source, spellName = ...
  62.                PQR_DropThreat(\"FAILED\", source, spellName)
  63.            elseif event == \"UI_ERROR_MESSAGE\" then
  64.                local errorMessage = ...
  65.                if errorMessage == SPELL_FAILED_NOT_BEHIND then
  66.                    PQR_BehindTime = GetTime()
  67.                elseif errorMessage == SPELL_FAILED_LINE_OF_SIGHT then
  68.                    if PQR_LastTarget ~= nil then
  69.                        if PQR_LastTarget ~= \"none\" and PQR_LastTime > GetTime() - 1 then
  70.                            --LOS message in the last 1 second. Register it.
  71.                            for i=1,10000 do
  72.                                if PQR.losTable.name[i] == nil or PQR.losTable.name[i] == PQR_LastTarget then
  73.                                    --we got to an empty slot in the table
  74.                                    PQR.losTable.name[i] = PQR_LastTarget
  75.                                    PQR.losTable.time[i] = PQR_LastTime
  76.                                    PQR_Debug(\"Added LOS for unit \"..PQR_LastTarget..\" at index \"..i)
  77.                                    break
  78.                                end
  79.                            end
  80.                            PQR_LastTarget = \"none\"
  81.                            PQR_LastTime = 0
  82.                        end
  83.                    end
  84.                end
  85.            elseif event == \"UNIT_SPELLCAST_SUCCEEDED\" then
  86.                local unitCaster, unitSpell, _, _, unitSpellID = ...
  87.                if unitCaster == \"player\" then
  88.                    PQR_SetRecastDelay(unitSpell)
  89.                end
  90.                if unitCaster ~= \"player\" then
  91.                    return
  92.                end
  93.                if unitSpellID ~= 75 then --Auto Shot
  94.                    if unitSpellID == 56641 or unitSpellID == 77767 then --Steady or Cobra
  95.                        PQR_SteadyCount = PQR_SteadyCount + 1
  96.                        PQR_LastCasted = unitSpellID
  97.                    else
  98.                        PQR_SteadyCount = 0
  99.                        PQR_LastCasted = unitSpellID
  100.                    end
  101.                end
  102.            elseif event == \"UNIT_SPELLCAST_SENT\" then
  103.                local unitCaster, unitSpell = ...
  104.                local vanishName = GetSpellInfo(1856)
  105.                local mdName = GetSpellInfo(34477)
  106.                local feignName = GetSpellInfo(5384)
  107.                if unitSpell == vanishName then
  108.                    PQR_DropDelay = GetTime() + 0.5
  109.                end
  110.                if unitSpell == feignName then
  111.                    PQR_DropDelay = GetTime() + 1
  112.                end
  113.                if unitSpell == mdName then
  114.                    PQR_DropDelay = GetTime() + 2.0
  115.                end
  116.            end
  117.        end
  118.        
  119.        function PQR_ExecuteBot()
  120.            --this is the main bot execution function.
  121.            if UnitAffectingCombat ~= nil then
  122.                --make sure we arent at a loading screen, DCd, etc.
  123.                 PQR_Combat = UnitAffectingCombat(\"player\")
  124.                if PQR_Combat == nil then
  125.                    PQR_Combat = UnitAffectingCombat(\"pet\")
  126.                end
  127.                if PQR_RequireCombat == false and PQR_RotationDesignation == false then
  128.                    PQR_Combat = 1
  129.                end
  130.                if PQR ~= nil then
  131.                    if PQR_RotationDesignation == true and PQR[0].priorityTable.requireCombat == false then
  132.                        PQR_Combat = 1
  133.                    end
  134.                end
  135.                local PQR_ExecuteNext = GetCVar(\"violenceLevel\")
  136.                if tonumber(PQR_ExecuteNext) ~= nil then
  137.                    PQR_ExecuteNext = PQR_ExecuteNext - 5
  138.                    SetCVar(\"violenceLevel\", 2)
  139.                else
  140.                    PQR_ExecuteNext = 0
  141.                end
  142.  
  143.                if PQR_ExecuteNext > 0 then
  144.                    --cast the next ability in X queue.
  145.                    PQR_Interrupt()
  146.                    PQR_CastNext(PQR_ExecuteNext)
  147.                else
  148.                    if PQR_ManualMode == false and PQR_BotEnabled == true and PQR_Combat ~= nil then
  149.                        --auto rotation mode is running... execute next.
  150.                        PQR_CastNext(0)
  151.                    end
  152.                end
  153.            end
  154.        end
  155.  
  156.        function PQR_CastNext(rotation)
  157.            if PQR[rotation] == nil then
  158.                return
  159.            end
  160.  
  161.            local nextAbility = PQR_NextAbility(rotation)
  162.            if nextAbility ~= -1 then
  163.  
  164.                --Run luaBefore
  165.                PQR[rotation].priorityTable.luaBefore[nextAbility]()
  166.  
  167.                --split actions and send RunMacroText
  168.                    if PQR[rotation].priorityTable.actn[nextAbility] ~= \"\" and PQR[rotation].priorityTable.actn[nextAbility] ~= nil then
  169.                        local tbl = { strsplit(\"|\", PQR[rotation].priorityTable.actn[nextAbility]) }
  170.                        for i=1,100 do
  171.                            if tbl[i] == nil then
  172.                                break
  173.                            end
  174.                            if tbl[i] ~= \"\" then
  175.                                PQR_Debug(\"Running Action: \"..tbl[i])
  176.                                RunMacroText(tbl[i])
  177.                            end
  178.                        end
  179.                    end
  180.                --send spell ID
  181.                    local castingID = PQR[rotation].priorityTable.spid[nextAbility]
  182.                    if castingID ~= 0 then
  183.                        local castingName = GetSpellInfo(PQR[rotation].priorityTable.spid[nextAbility])
  184.                        PQR_LastTime = GetTime()
  185.                        if PQR[rotation].priorityTable.targetCast[nextAbility] == \"player\" then
  186.                            PQR_Debug(\"Casting Spell \"..castingName..\" (\"..castingID..\") on PLAYER\")
  187.                            PQR_LastTarget = UnitName(PQR[rotation].priorityTable.targetCast[nextAbility])
  188.                            CastSpellByID(castingID, \"player\")
  189.                        elseif PQR[rotation].priorityTable.targetCast[nextAbility] == \"focus\" then
  190.                            PQR_Debug(\"Casting Spell \"..castingName..\" (\"..castingID..\") on FOCUS\")
  191.                            PQR_LastTarget = UnitName(PQR[rotation].priorityTable.targetCast[nextAbility])
  192.                            CastSpellByID(castingID, \"focus\")
  193.                        elseif PQR[rotation].priorityTable.targetCast[nextAbility] == \"pet\" then
  194.                            PQR_Debug(\"Casting Spell \"..castingName..\" (\"..castingID..\") on PET\")
  195.                            PQR_LastTarget = UnitName(PQR[rotation].priorityTable.targetCast[nextAbility])
  196.                            CastSpellByID(castingID, \"pet\")
  197.                        elseif PQR[rotation].priorityTable.targetCast[nextAbility] == \"mouseover\" then
  198.                            PQR_Debug(\"Casting Spell \"..castingName..\" (\"..castingID..\") on MOUSEOVER\")
  199.                            PQR_LastTarget = UnitName(PQR[rotation].priorityTable.targetCast[nextAbility])
  200.                            CastSpellByID(castingID, \"mouseover\")
  201.                        elseif PQR[rotation].priorityTable.targetCast[nextAbility] == \"click\" then
  202.                            PQR_Debug(\"Casting Spell \"..castingName..\" (\"..castingID..\") on MOUSE LOCATION\")
  203.                            PQR_LastTarget = \"none\"
  204.                            CastSpellByID(castingID)
  205.                            local PQR_TargetName = UnitName(\"target\")
  206.                            CameraOrSelectOrMoveStart()
  207.                            CameraOrSelectOrMoveStop()
  208.                            local PQR_TargetNameNew = UnitName(\"target\")
  209.                            if PQR_TargetName ~= nil then
  210.                                if PQR_TargetName ~= PQR_TargetNameNew then
  211.                                    TargetLastTarget()
  212.                                end
  213.                            end
  214.                        elseif PQR[rotation].priorityTable.targetCast[nextAbility] == \"custom\" then
  215.                            PQR_Debug(\"Casting Spell \"..castingName..\" (\"..castingID..\") on CUSTOM TARGET \"..PQR_CustomTarget)
  216.                            if UnitExists(PQR_CustomTarget) then
  217.                                PQR_LastTarget = UnitName(PQR_CustomTarget)
  218.                                CastSpellByID(castingID, PQR_CustomTarget)
  219.                            else
  220.                                PQR_Debug(\"Custom Target does not exist!\")
  221.                            end
  222.                            PQR_CustomTarget = \"\"
  223.                        else
  224.                            PQR_Debug(\"Casting Spell \"..castingName..\" (\"..castingID..\") on TARGET\")
  225.                            PQR_LastTarget = UnitName(PQR[rotation].priorityTable.targetCast[nextAbility])
  226.                            CastSpellByID(castingID, \"target\")
  227.                        end
  228.                    end
  229.  
  230.                --Run luaAfter
  231.                PQR[rotation].priorityTable.luaAfter[nextAbility]()
  232.  
  233.            end            
  234.        end
  235.  
  236.        function PQR_NextAbility(rotation)    
  237.             if PQR[rotation] ~= nil then
  238.                 local _, _, _, _, _, playerChanneling = UnitChannelInfo(\"player\")
  239.                 if playerChanneling ~= nil then
  240.                     local currentTime = GetTime() * 1000
  241.                     if (playerChanneling - currentTime) > 100 then
  242.                        PQR_IsChanneling = true
  243.                    else
  244.                        PQR_IsChanneling = false
  245.                     end
  246.                else
  247.                    PQR_IsChanneling = false
  248.                 end
  249.  
  250.                 for i=0,1023 do
  251.                     if PQR[rotation].priorityTable.index[i] ~= nil then
  252.                        if PQR_DropDelay <= GetTime() then
  253.                             if PQR[rotation].priorityTable.spid[i] ~= 0 then
  254.                                 if PQR_SpellAvailable(PQR[rotation].priorityTable.spid[i]) == true and PQR[rotation].priorityTable.delay[i] <= (GetTime() * 1000) then
  255.                                     local PQR_Result = PQR[rotation].priorityTable.test[i]()
  256.                                     if PQR_Result == true then
  257.                                        if PQR_IsChanneling == true then
  258.                                            if PQR[rotation].priorityTable.cancelChannel[i] == true then
  259.                                                 return i
  260.                                            end
  261.                                        else
  262.                                            return i
  263.                                        end
  264.                                     end
  265.                                 end
  266.                             else
  267.                                 local PQR_Result = PQR[rotation].priorityTable.test[i]()
  268.                                     if PQR_Result == true then
  269.                                        if PQR_IsChanneling == true then
  270.                                            if PQR[rotation].priorityTable.cancelChannel[i] == true then
  271.                                                 return i
  272.                                            end
  273.                                        else
  274.                                            return i
  275.                                        end
  276.                                     end
  277.                             end
  278.                        end
  279.                     end
  280.                 end
  281.             end
  282.             return -1
  283.        end
  284.  
  285.        function PQR_ExecuteInterrupt()
  286.            if UnitAffectingCombat ~= nil then
  287.                PQR_Interrupt()
  288.            end
  289.        end
  290.  
  291.        function PQR_Interrupt()
  292.            if PQR_InterruptEnabled == false or PQR_InterruptEnabled == nil then
  293.                return
  294.            end
  295.  
  296.            if PQR == nil then
  297.                return
  298.            end
  299.  
  300.            if PQR.interruptTable == nil then
  301.                return
  302.            end
  303.            
  304.             if PQR_InterruptTest() == true then
  305.                PQR_Debug(\"Casting Interrupt...\")
  306.                 CastSpellByID(PQR_MyInterruptSpell())
  307.             end
  308.        end
  309.  
  310.        function PQR_InterruptTest()
  311.             local pq_castingName, _, _, _, pq_castingStartTime, _, _, _, pq_castingInterrupt = UnitCastingInfo(\"target\")
  312.             if pq_castingInterrupt ~= nil then
  313.                 if pq_castingInterrupt == true then
  314.                     pq_castingInterrupt = false
  315.                 else
  316.                     pq_castingInterrupt = true
  317.                 end
  318.             end
  319.  
  320.             local pq_channelName, _, _, _, pq_channelStartTime, _, _, pq_channelInterrupt = UnitChannelInfo(\"target\")
  321.             if pq_channelInterrupt ~= nil then
  322.                 pq_castingName = pq_channelName
  323.                pq_castingStartTime = pq_channelStartTime
  324.                 if pq_channelInterrupt == true then
  325.                     pq_castingInterrupt = false
  326.                 else
  327.                     pq_castingInterrupt = true
  328.                 end
  329.             end
  330.  
  331.            
  332.  
  333.             if pq_castingName == nil then
  334.                 pq_castingName = \"\"
  335.             end
  336.  
  337.             if pq_castingInterrupt == nil then
  338.                 pq_castingInterrupt = false
  339.            else
  340.                local PQR_msCastingSpell = GetTime() * 1000 - pq_castingStartTime
  341.                if PQR_msCastingSpell < PQR_InterruptDelay then
  342.                    pq_castingInterrupt = false
  343.                end
  344.             end
  345.  
  346.            if UnitCanAttack(\"player\", \"target\") == nil then
  347.                --we cannot attack/interrupt the target.
  348.                pq_castingInterrupt = false
  349.            end
  350.          
  351.             local PQR_CastInterrupt = false
  352.             if pq_castingInterrupt == true then
  353.                 local _, InterruptCD, _ = GetSpellCooldown(PQR_MyInterruptSpell())
  354.                 if InterruptCD == 0 then
  355.                     if PQR_InterruptAllSpells == true then
  356.                         PQR_CastInterrupt = true
  357.                     end
  358.            
  359.                     for i=0,1023 do
  360.                         --check to see if any abilities need to be cast.
  361.                         if PQR.interruptTable.spell[i] ~= nil then
  362.                             if strupper(PQR.interruptTable.spell[i]) == strupper(pq_castingName) then
  363.                                 PQR_CastInterrupt = true
  364.                                break
  365.                             end
  366.                         else
  367.                             break
  368.                         end
  369.                     end
  370.                 end
  371.             end
  372.    
  373.             if PQR_CastInterrupt == true then
  374.                 return true
  375.             else
  376.                 return false
  377.             end
  378.        end
  379.  
  380.        function PQR_MyInterruptSpell()
  381.             if UnitClass ~= nil then
  382.                 local _, PQR_UnitClass = UnitClass(\"player\")
  383.        
  384.                 if PQR_UnitClass == \"DEATHKNIGHT\" then
  385.                     return 47528
  386.                 elseif PQR_UnitClass == \"DRUID\" then
  387.                     local catForm = UnitBuffID(\"player\", 768)
  388.                     if catForm ~= nil then
  389.                         return 80965
  390.                     else
  391.                         return 80964
  392.                     end
  393.                 elseif PQR_UnitClass == \"HUNTER\" then
  394.                     return 34490
  395.                 elseif PQR_UnitClass == \"MAGE\" then
  396.                     return 2139
  397.                 elseif PQR_UnitClass == \"PALADIN\" then
  398.                     return 96231
  399.                 elseif PQR_UnitClass == \"PRIEST\" then
  400.                     return 15487
  401.                 elseif PQR_UnitClass == \"ROGUE\" then
  402.                     return 1766
  403.                 elseif PQR_UnitClass == \"SHAMAN\" then
  404.                     return 57994
  405.                 elseif PQR_UnitClass == \"WARLOCK\" then
  406.                     return 19647
  407.                 elseif PQR_UnitClass == \"WARRIOR\" then
  408.                     return 6552
  409.                 else
  410.                     return 0
  411.                 end
  412.             else
  413.                 return 0
  414.             end
  415.        end
  416.  
  417.        function PQR_SetRecastDelay(manualSpellName)
  418.          
  419.           local PQR_CurrentSpellName = UnitCastingInfo(\"player\")
  420.           if PQR_CurrentSpellName == nil then
  421.                PQR_CurrentSpellName = UnitCastingInfo(\"player\")
  422.            end
  423.            if manualSpellName ~= nil then
  424.                PQR_CurrentSpellName = manualSpellName
  425.            end
  426.            if PQR_CurrentSpellName == nil then
  427.                return
  428.            end
  429.            PQR_Debug(\"SetRecastDelay called for spell: \"..PQR_CurrentSpellName)
  430.  
  431.            if PQR_ManualMode == false and PQR_BotEnabled == true then
  432.                --PQR[0]
  433.                for i=0,1023 do
  434.                    if PQR[0].priorityTable.index[i] == nil then
  435.                        break
  436.                    else
  437.                        if PQR[0].priorityTable.spid[i] ~= 0 then
  438.                            local PQR_LookupSpell = GetSpellInfo(PQR[0].priorityTable.spid[i])
  439.                            if PQR_LookupSpell == PQR_CurrentSpellName then
  440.                                PQR[0].priorityTable.delay[i] = (GetTime() * 1000) + PQR[0].priorityTable.recast[i]
  441.                            end
  442.                        end
  443.                    end
  444.                end
  445.            else
  446.                --PQR[1]
  447.                for i=0,1023 do
  448.                    if PQR[1].priorityTable.index[i] == nil then
  449.                        break
  450.                    else
  451.                        if PQR[1].priorityTable.spid[i] ~= 1 then
  452.                            local PQR_LookupSpell = GetSpellInfo(PQR[1].priorityTable.spid[i])
  453.                            if PQR_LookupSpell == PQR_CurrentSpellName then
  454.                                PQR[1].priorityTable.delay[i] = (GetTime() * 1000) + PQR[1].priorityTable.recast[i]
  455.                            end
  456.                        end
  457.                    end
  458.                end
  459.  
  460.                --PQR[2]
  461.                for i=0,1023 do
  462.                    if PQR[2].priorityTable.index[[...string is too long...]
  463. --In the assembly this string is actually cut short here for that function
  464.  
  465.  
  466. --Scripting Functions
  467.  
  468.        function PQR_IsCastingSpell(spellID)
  469.            local spellName = GetSpellInfo(spellID)
  470.            local spellCasting = UnitCastingInfo(\"player\")
  471.                if spellCasting == nil then
  472.                    spellCasting = UnitChannelInfo(\"player\")
  473.                end
  474.                if spellCasting == spellName then
  475.                    return true
  476.                else
  477.                    return false
  478.                end
  479.        end
  480.  
  481.        function PQR_NotBehindTarget()
  482.            if PQR_BehindTime + 3 > GetTime() then
  483.                return true
  484.            else
  485.                return false
  486.            end
  487.        end
  488.  
  489.        function PQR_IsMoving(seconds)
  490.            local PQR_MoltenFeathers = UnitBuffID(\"player\", 98767)
  491.            if PQR_CurrentMovingTime >= seconds and PQR_MoltenFeathers == nil then
  492.                return true
  493.            else
  494.                return false
  495.            end
  496.        end
  497.  
  498.        function PQR_IsOutOfSight(unit, seconds)
  499.            local secondsCheck = seconds
  500.            if secondsCheck == nil then
  501.                secondsCheck = 3
  502.            end
  503.            local unitCheck = unit
  504.            if unitCheck == nil then
  505.                unitCheck = \"target\"
  506.            end
  507.            local PQR_TargetName = UnitName(unitCheck)
  508.  
  509.            if PQR_TargetName ~= nil then
  510.                for i=1,10000 do
  511.                    if PQR.losTable.name[i] == nil then
  512.                        return false
  513.                    end
  514.                    if PQR.losTable.name[i] == PQR_TargetName then
  515.                        if PQR.losTable.time[i] > GetTime() - secondsCheck then
  516.                            return true
  517.                        else
  518.                            return false
  519.                        end
  520.                    end
  521.                end
  522.            end
  523.            return false
  524.        end
  525.  
  526.        function UnitBuffID(unit, spellID, filter)
  527.             local spellName = GetSpellInfo(spellID)
  528.             if filter == nil then
  529.                 return UnitBuff(unit, spellName)
  530.             else
  531.                 return UnitBuff(unit, spellName, nil, filter)
  532.             end
  533.        end
  534.  
  535.        function UnitDebuffID(unit, spellID, filter)
  536.             local spellName = GetSpellInfo(spellID)
  537.             if filter == nil then
  538.                 return UnitDebuff(unit, spellName)
  539.             else
  540.                 return UnitDebuff(unit, spellName, nil, filter)
  541.             end
  542.        end
  543.  
  544. --Table Setup
  545.  
  546.  
  547.        function PQR_SetupTables()
  548.            PQR = {}
  549.            for i=0,4 do
  550.                PQR[i] = {}
  551.                PQR[i].priorityTable = {}
  552.                 PQR[i].priorityTable.index = {}
  553.                 PQR[i].priorityTable.spid = {}
  554.                 PQR[i].priorityTable.actn = {}
  555.                 PQR[i].priorityTable.test = {}
  556.                PQR[i].priorityTable.recast = {}
  557.                PQR[i].priorityTable.targetCast = {}
  558.                PQR[i].priorityTable.delay = {}
  559.                PQR[i].priorityTable.cancelChannel = {}
  560.                PQR[i].priorityTable.requireCombat = true
  561.                PQR[i].priorityTable.luaBefore = {}
  562.                PQR[i].priorityTable.luaAfter = {}
  563.                 PQR.interruptTable = {}
  564.                 PQR.interruptTable.spell = {}
  565.                PQR.losTable = {}
  566.                PQR.losTable.name = {}
  567.                PQR.losTable.time = {}
  568.            end
  569.        end
  570.  
  571.        function PQR_AddAbility(rotationNumber, index, spid, actn, testCode, recastDelay, targetCast, cancelChannel, luaBefore, luaAfter)
  572.             PQR[rotationNumber].priorityTable.index[index] = index
  573.             PQR[rotationNumber].priorityTable.spid[index] = spid
  574.             PQR[rotationNumber].priorityTable.actn[index] = actn
  575.             PQR[rotationNumber].priorityTable.test[index] = testCode
  576.            PQR[rotationNumber].priorityTable.recast[index] = recastDelay
  577.            PQR[rotationNumber].priorityTable.targetCast[index] = targetCast
  578.            PQR[rotationNumber].priorityTable.delay[index] = rotationNumber
  579.            PQR[rotationNumber].priorityTable.cancelChannel[index] = cancelChannel
  580.            PQR[rotationNumber].priorityTable.luaBefore[index] = luaBefore
  581.            PQR[rotationNumber].priorityTable.luaAfter[index] = luaAfter
  582.        end
  583.  
  584.        function PQR_AddInterrupt(spellName)
  585.            for i=0,1023 do
  586.                 if PQR.interruptTable.spell[i] == nil then
  587.                     PQR.interruptTable.spell[i] = spellName
  588.                    return
  589.                 end
  590.            end
  591.        end
  592.  
Advertisement
Add Comment
Please, Sign In to add comment