Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local rotationName = "immy8.2"
- local fhbossPool = false
- local br = br
- br.rogueTables = {}
- local rogueTables = br.rogueTables
- rogueTables.enemyTable5, rogueTables.enemyTable20, rogueTables.burnTable20, rogueTables.burnTable5 = {}, {}, {}, {}
- local enemyTable5, enemyTable20, burnTable20, burnTable5 = rogueTables.enemyTable5, rogueTables.enemyTable20, rogueTables.burnTable20, rogueTables.burnTable5
- local keepbteEmissary = false
- local poolForBTE = false
- local forcekill = {
- [120651]=true, -- Explosive
- [136330]=true, -- Soul Thorns Waycrest Manor
- [134388]=true -- A Knot of Snakes ToS
- }
- local dispellList = {
- }
- local pvpforcekill = {
- [101398] = true -- shadowpriest menthal shit
- }
- local cloakPlayerlist = {
- [256106] = true, -- FH 1st boss
- [261440] = true, -- Virulent Pathogen WM
- [265773] = true -- Spit Gold KR
- }
- local evasionPlayerlist = {
- -- [256979] = true, -- pewpew council boss
- [266231] = true -- Severing Axe KR
- -- [256106] = true
- }
- local feintPlayerList = {
- [256979] = true -- Powder shot FH 2nd
- }
- local cloaklist = {
- [119300] = true --test rfc 2
- }
- local evasionlist = {
- }
- local feintlist = {
- -- [2561066] = true -- FH 1st boss
- }
- local turtleBuffs = {
- }
- local pveDR = {
- [272659] = true -- ToS lighningh shield thrash
- }
- local torrentDispell = {
- }
- local vanishList = {
- [260551] = true, -- Soul Thorns WM
- [261440] = true, -- Virulent Pathogen WM
- [266231] = true, --Severing Axe KR
- [258338] = true, --Barrel fh 2nd boss
- [263371] = true, --conduction
- [260741] = true --nettles wm
- }
- local stunList = { -- Stolen from feng pala
- [274400] = true, -- Duelist Dash fh
- -- [274383] = true, -- Rat Traps fh
- [276292] = true, -- Whirling Slam SotS
- [268273] = true, -- Deep Smash SotS
- [256897] = true, -- Clamping Jaws SoB
- [256957] = true,
- [272542] = true, -- Ricochet SoB
- [272888] = true, -- Ferocity SoB
- --[269266] = true, -- Slam SoB ????????? tentacle last bos?
- [258864] = true, -- Suppression Fire TD
- -- [259711] = true, -- Lockdown TD
- [264038] = true, -- Uproot WM
- [256849] = true, -- Dino Heal AD
- [269931] = true, -- Gust Slash KR ????????
- [270084] = true, -- Axe Barrage KR
- [270506] = true, -- Deadeye Shot KR
- [270507] = true, -- Poison Barrage KR
- -- [267433] = true, -- Activate Mech ML ????????????
- -- [267354] = true, -- Hail of Flechettes ML
- [269302] = true, -- Poison thrash ML
- [268702] = true, -- Furious Quake ML
- [268846] = true, -- Echo Blade ML
- [268865] = true, -- Force Cannon ML
- [258908] = true, -- Blade Flurry ToS
- [264574] = true, -- Power Shot ToS
- [272659] = true, -- Electrified Scales ToS
- [272655] = true, -- Scouring Sand ToS
- -- [277567] = true, -- infest
- [265542] = true, -- Rotten Bile UR
- [265540] = true, -- Rotten Bile UR
- [257641] = true, -- molten slug
- [265376] = true, -- FH Krag Channel heal
- [257736] = true, -- Thundering Squall FH
- [257870] = true, -- Blade Barrage FH
- [268797] = true, -- ML Transmute: Enemy to Goo
- [263066] = true, -- ML Transfiguration Serum
- [265089] = true, -- Dark Reconstitution UR
- [272183] = true, -- Raise Dead UR
- [258153] = true, -- Watery Dome Td
- [278504] = true, -- Ritual WM
- [258153] = true, -- Watery Dome Td
- [258153] = true, -- Watery Dome Td
- [258153] = true, -- Watery Dome Td
- [258153] = true, -- Watery Dome Td
- [258153] = true, -- Watery Dome Td
- [257397] = true -- Healing Balm AD
- }
- -- local kickList = {
- -- }
- local channelAsapList = {
- [257756] = true, -- Goin' Bananas FH
- [253721] = true, -- Bulwark of Juju AD
- [259572] = true, -- 2nd AD channel
- [258317] = true, --Riot Shield TD ???? only magic
- [258917] = true, -- Righteous Flames TD
- [267357] = true, -- Hail of Flechettes ML
- [267237] = true, -- Drain ToS
- [265568] = true, -- Dark Omen UR
- [250368] = true, -- Vol’kaal AD
- [265540] = true, -- Rotten Bile UR
- [257641] = true, -- molten slug
- [265542] = true, -- Rotten Bile UR
- [265376] = true, -- FH Krag Channel heal
- [267354] = true, -- Hail of Flechettes ML
- [256060] = true
- }
- local channelLateList = {
- [257739] = true, -- Fixate FH
- [270839] = true -- test
- }
- -- local frame = CreateFrame("FRAME")
- -- frame:RegisterEvent("CHAT_MSG_MONSTER_SAY")
- -- function frame:OnEvent(event, ...)
- -- print(...)
- -- frame:SetScript("OnEvent", frame.OnEvent)
- local frame = CreateFrame("FRAME")
- frame:RegisterEvent("CHAT_MSG_MONSTER_SAY")
- function frame:OnEvent(event, arg1, arg2, arg3)
- if arg2 == "Гаргток" or arg2 == "Gurgthock" and not piggiecatch then
- piggiecatch = true
- end
- end
- frame:SetScript("OnEvent", frame.OnEvent)
- ---------------
- --- Toggles ---
- ---------------
- local function createToggles()
- -- Rotation Button
- RotationModes = {
- [1] = { mode = "", value = 1 , overlay = "", tip = "", highlight = 1, icon = br.player.spell.dispatch},
- [2] = { mode = "", value = 2 , overlay = "", tip = "", highlight = 0, icon = br.player.spell.crimsonVial}
- };
- CreateButton("Rotation",1,0)
- BtEHoldCastModes = {
- [1] = { mode = "", value = 1 , overlay = "", tip = "", highlight = 1, icon = br.player.spell.betweenTheEyes},
- [2] = { mode = "", value = 2 , overlay = "", tip = "", highlight = 0, icon = br.player.spell.dispatch}
- };
- CreateButton("BtEHoldCast",1,1)
- -- Blade Flurry Button
- BladeFlurryModes = {
- [1] = { mode = "", value = 1 , overlay = "", tip = "", highlight = 1, icon = br.player.spell.bladeFlurry},
- [2] = { mode = "", value = 2 , overlay = "", tip = "", highlight = 0, icon = br.player.spell.bladeFlurry}
- };
- CreateButton("BladeFlurry",2,0)
- NoBTEModes = {
- [1] = { mode = "best", value = 1 , overlay = "", tip = "", highlight = 1, icon = br.player.spell.betweenTheEyes},
- [2] = { mode = "target", value = 2 , overlay = "", tip = "", highlight = 1, icon = br.player.spell.betweenTheEyes},
- [3] = { mode = "off", value = 3 , overlay = "", tip = "", highlight = 0, icon = br.player.spell.betweenTheEyes}
- };
- CreateButton("NoBTE",2,1)
- -- Defensive Button
- SpecialModes = {
- [1] = { mode = "", value = 1 , overlay = "", tip = "", highlight = 1, icon = br.player.spell.adrenalineRush},
- [2] = { mode = "", value = 2 , overlay = "", tip = "", highlight = 0, icon = br.player.spell.adrenalineRush},
- };
- CreateButton("Special",4,0)
- TiersevenModes = {
- [1] = { mode = "", value = 1 , overlay = "", tip = "", highlight = 1, icon = br.player.spell.bladeRush},
- [2] = { mode = "", value = 2 , overlay = "", tip = "", highlight = 0, icon = br.player.spell.bladeRush},
- };
- CreateButton("Tierseven",4,1)
- -- Interrupt Button
- InterruptModes = {
- [1] = { mode = "", value = 1 , overlay = "", tip = "", highlight = 1, icon = br.player.spell.kick},
- [2] = { mode = "", value = 2 , overlay = "", tip = "", highlight = 0, icon = br.player.spell.kick}
- };
- CreateButton("Interrupt",3,0)
- StunModes = {
- [1] = { mode = "", value = 1 , overlay = "", tip = "", highlight = 1, icon = br.player.spell.gouge},
- [2] = { mode = "", value = 2 , overlay = "", tip = "", highlight = 0, icon = br.player.spell.gouge}
- };
- CreateButton("Stun",3,1)
- BoteForceModes = {
- [1] = { mode = "On", value = 1 , overlay = "", tip = "", highlight = 1, icon = br.player.spell.vanish},
- [2] = { mode = "Off", value = 2 , overlay = "", tip = "", highlight = 0, icon = br.player.spell.crimsonVial}
- };
- CreateButton("BoteForce",5,0)
- RollforoneModes = {
- [1] = { mode = "any", value = 1 , overlay = "", tip = "", highlight = 0, icon = br.player.spell.rollTheBones},
- [2] = { mode = "simc", value = 2 , overlay = "", tip = "", highlight = 1, icon = br.player.spell.rollTheBones}
- };
- CreateButton("Rollforone",5,1)
- MFDModes = {
- [1] = { mode = "Tar", value = 1 , overlay = "", tip = "", highlight = 1, icon = br.player.spell.markedForDeath},
- [2] = { mode = "Adds", value = 2 , overlay = "", tip = "", highlight = 1, icon = br.player.spell.markedForDeath},
- [3] = { mode = "reset", value = 3 , overlay = "", tip = "", highlight = 1, icon = br.player.spell.markedForDeath},
- [4] = { mode = "Off", value = 4 , overlay = "", tip = "", highlight = 0, icon = br.player.spell.markedForDeath}
- };
- CreateButton("MFD",6,0)
- RitzaNishModes = {
- [1] = { mode = "On", value = 1 , overlay = "", tip = "", highlight = 1, icon = br.player.spell.vanish},
- [2] = { mode = "Off", value = 2 , overlay = "", tip = "", highlight = 0, icon = br.player.spell.crimsonVial}
- };
- CreateButton("RitzaNish",6,1)
- end
- -- if strmatch(select(2,BNGetInfo()), '(%d+)') == "1628" then
- forpro = true
- -- else
- -- forpro = false
- -- end
- ---------------
- --- OPTIONS ---
- ---------------
- local function createOptions()
- local optionTable
- local function rotationOptions()
- -----------------------
- --- GENERAL OPTIONS ---
- -----------------------
- section = br.ui:createSection(br.ui.window.profile, "General")
- -- br.ui:createCheckbox(section, "Opener")
- -- br.ui:createCheckbox(section, "RTB Prepull")
- br.ui:createDropdown(section, "Stealth", {"|cff00FF00Always", "|cffFF000020Yards"}, 2, "Stealthing method.")
- br.ui:createCheckbox(section, "Wownish")
- br.ui:checkSectionState(section)
- ------------------------
- --- OFFENSIVE OPTIONS ---
- ------------------------
- section = br.ui:createSection(br.ui.window.profile, "Offensive")
- br.ui:createCheckbox(section, "Trinkets")
- br.ui:createCheckbox(section, "Vanish")
- br.ui:createCheckbox(section, "Racial")
- br.ui:createSpinnerWithout(section, "BF HP Limit", 15, 0, 105, 1, "|cffFFFFFFHP *10k hp for Blade FLurry to be used")
- br.ui:createCheckbox(section, "Dont BTE kickable")
- br.ui:createSpinner(section, "Pistol Shot out of range", 85, 5, 100, 5, "|cffFFFFFFCheck to use Pistol Shot out of range and energy to use at.")
- -- br.ui:createSpinnerWithout(section, "MFD Sniping", 1, 0.5, 3, 0.1, "|cffFFBB00Increase to have BR cast MFD on dying units quicker, too high might cause suboptimal casts")
- br.ui:checkSectionState(section)
- section = br.ui:createSection(br.ui.window.profile, "Targeting Settings")
- br.ui:createCheckbox(section, "Burn some stuff")
- br.ui:createCheckbox(section, "M+")
- br.ui:createCheckbox(section, "Prey on the Weak Sorting")
- br.ui:createCheckbox(section, "Coral Sort")
- br.ui:checkSectionState(section)
- section = br.ui:createSection(br.ui.window.profile, "PvP Abuse")
- br.ui:createCheckbox(section, "Auto FLag WSG/2Peaks/")
- br.ui:createCheckbox(section, "hz")
- br.ui:checkSectionState(section)
- section = br.ui:createSection(br.ui.window.profile, "Special")
- br.ui:createCheckbox(section, "AutoBtE", "|cffFFFFFF Auto BtE dangerous casts")
- br.ui:createCheckbox(section, "AutoGouge", "|cffFFFFFF Auto Gouge dangerous casts")
- br.ui:createCheckbox(section, "AutoBlind", "|cffFFFFFF Auto Blind dangerous casts")
- br.ui:createCheckbox(section, "AutoKick", "|cffFFFFFF Auto Kick dangerous casts")
- br.ui:createCheckbox(section, "Any Cast", "|cffFFFFFF Auto CC any cast")
- br.ui:createSpinnerWithout(section, "Delay Interrupt for", 0.5, 0, 1, 0.1, "Delay for x sec")
- br.ui:createSpinner(section, "Arcane Torrent Dispel Count", 1, 0, 20, 1, "", "|cffFFFFFFMinimum Torrent Targets")
- br.ui:createSpinner(section, "Dispell from List")
- br.ui:createCheckbox(section, "|cffFF0000Force Burn Stuff", "Ghuunies/explosives orb = rip or hold shift")
- br.ui:createCheckbox(section, "Pool for BTE")
- br.ui:createCheckbox(section, "Force 6cp BTE")
- br.ui:createCheckbox(section, "DontWasteDeadShotOnOrbs")
- br.ui:createCheckbox(section, "|cffFFBB00Encounter Logic", "Use PvE Logic")
- br.ui:createCheckbox(section, "Ambush Opener", "Will use ambush as soon as target is in range")
- br.ui:createCheckbox(section, "PickPocket", "Will PickPocket before ambush ^^ for tmog")
- br.ui:checkSectionState(section)
- section = br.ui:createSection(br.ui.window.profile, "Essences")
- br.ui:createCheckbox(section, "AutoBeam", "Iris Beam")
- br.ui:createCheckbox(section, "RotateBeam", "Rotate this shit")
- br.ui:createCheckbox(section, "AutoBotE", "Blood of the Enemy")
- br.ui:createCheckbox(section, "AutoCrucible", "Crucible Of Flames")
- br.ui:createCheckbox(section, "AutoStrife", "Strife Stack ooc with detection")
- br.ui:checkSectionState(section)
- section = br.ui:createSection(br.ui.window.profile, "Mythic+ Stuff")
- br.ui:createCheckbox(section, "Piggie FH")
- br.ui:createCheckbox(section, "Void-Touched Emissary LoS")
- br.ui:createCheckbox(section, "BtE Sanguine check")
- br.ui:createCheckbox(section, "BtE giga feature")
- br.ui:createCheckbox(section, "Coral Abuse")
- br.ui:checkSectionState(section)
- -------------------------
- --- INTERRUPT OPTIONS ---
- -------------------------
- section = br.ui:createSection(br.ui.window.profile, "Interrupts")
- -- Kick
- br.ui:createCheckbox(section, "Kick")
- -- Gouge
- br.ui:createCheckbox(section, "Gouge")
- -- Blind
- br.ui:createCheckbox(section, "Blind")
- -- Between the Eyes
- br.ui:createCheckbox(section, "Between the Eyes")
- -- Interrupt Percentage
- br.ui:createSpinner(section, "Interrupt At", 0, 0, 100, 5, "|cffFFBB00Cast Percentage to use at.")
- br.ui:checkSectionState(section)
- -------------------------
- --- Lazy OPTIONS ---
- -------------------------
- section = br.ui:createSection(br.ui.window.profile, "Lazy Stuff")
- br.ui:createDropdown(section, "Auto Tricks", {"|cff00FF00Focus", "|cffFF0000Tank"}, 1, "Tricks of the Trade target." )
- br.ui:createCheckbox(section, "Keep BTE For CC Emissary")
- br.ui:createCheckbox(section, "FastBladeFlurry", "Will Use Blade Flurry only with >=2 targets check")
- br.ui:createCheckbox(section, "AutoTargetInMelee", "Will Auto target anything in melee if no valid target")
- br.ui:createDropdown(section, "Pots with AR", {"Unbridled Fury", "Agility", "Empowered Proximity"}, 1, "|cffFFFFFFPotion to use")
- br.ui:checkSectionState(section)
- -------------------------
- --- DEFENSIVE OPTIONS ---
- -------------------------
- section = br.ui:createSection(br.ui.window.profile, "Defensive")
- br.ui:createSpinner(section, "Healing Potion/Healthstone", 60, 0, 100, 5, "|cffFFBB00Health Percentage to use at.")
- br.ui:createSpinner(section, "Crimson Vial", 10, 0, 100, 5, "|cffFFBB00Health Percentage to use at.")
- br.ui:createSpinner(section, "Feint", 10, 0, 100, 5, "|cffFFBB00Health Percentage to use at.")
- br.ui:createSpinner(section, "Riposte", 10, 0, 100, 5, "|cffFFBB00Health Percentage to use at.")
- br.ui:createSpinner(section, "Engineer's' Belt", 10, 0, 100, 5, "|cffFFBB00Health Percentage to use at.")
- br.ui:checkSectionState(section)
- ----------------------
- --- TOGGLE OPTIONS ---
- ----------------------
- section = br.ui:createSection(br.ui.window.profile, "Toggle Keys")
- -- Single/Multi Toggle
- br.ui:createDropdown(section, "Rotation Mode", br.dropOptions.Toggle, 4)
- --Cooldown Key Toggle
- br.ui:createDropdown(section, "Cooldown Mode", br.dropOptions.Toggle, 3)
- --Defensive Key Toggle
- br.ui:createDropdown(section, "Defensive Mode", br.dropOptions.Toggle, 6)
- -- Interrupts Key Toggle
- br.ui:createDropdown(section, "Interrupt Mode", br.dropOptions.Toggle, 6)
- -- Cleave Toggle
- br.ui:createDropdown(section, "BladeFlurry Mode", br.dropOptions.Toggle, 6)
- br.ui:createDropdown(section, "MFD Mode", br.dropOptions.Toggle, 6)
- -- Pause Toggle
- br.ui:createDropdown(section, "Pause Mode", br.dropOptions.Toggle, 6)
- br.ui:checkSectionState(section)
- end
- optionTable = {{
- [1] = "Rotation Options",
- [2] = rotationOptions,
- }}
- return optionTable
- end
- ----------------
- --- ROTATION ---
- ----------------
- local function runRotation()
- local profile = br.debug.cpu.rotation.profile
- local startTime = debugprofilestop()
- -- WriteFile("countvisible.txt", countvisible .. "\n", true)
- -- print(countvisible)
- -- countvisible = 0
- --Print("Running: "..rotationName)
- ---------------
- --- Toggles ---
- ---------------
- UpdateToggle("Rotation",0.25)
- UpdateToggle("Interrupt",0.25)
- UpdateToggle("BladeFlurry",0.25)
- UpdateToggle("MFD",0.25)
- UpdateToggle("Rollforone",0.25)
- UpdateToggle("Special",0.25)
- UpdateToggle("NoBTE",0.25)
- UpdateToggle("Tierseven",0.25)
- UpdateToggle("BtEHoldCast",0.25)
- UpdateToggle("RitzaNish",0.25)
- UpdateToggle("BoteForce",0.25)
- br.player.mode.bladeflurry = br.data.settings[br.selectedSpec].toggles["BladeFlurry"]
- br.player.mode.stun = br.data.settings[br.selectedSpec].toggles["Stun"]
- br.player.mode.mfd = br.data.settings[br.selectedSpec].toggles["MFD"]
- br.player.mode.rollforone = br.data.settings[br.selectedSpec].toggles["Rollforone"]
- br.player.mode.special = br.data.settings[br.selectedSpec].toggles["Special"]
- br.player.mode.tierseven = br.data.settings[br.selectedSpec].toggles["Tierseven"]
- br.player.mode.nobte = br.data.settings[br.selectedSpec].toggles["NoBTE"]
- br.player.mode.btehold = br.data.settings[br.selectedSpec].toggles["BtEHoldCast"]
- br.player.mode.ritzanish = br.data.settings[br.selectedSpec].toggles["RitzaNish"]
- br.player.mode.boteforce = br.data.settings[br.selectedSpec].toggles["BoteForce"]
- --------------
- --- Locals ---
- --------------
- -- print(br.DBM:getTimer(13892))
- -- print(IsItemInRange(44915)) --20
- -- print(tostring(br.BossMods:getPulltimer()))
- ---------------------------------------------------------
- if profileStop == nil then profileStop = false end
- local attacktar = UnitCanAttack("target","player")
- local charges = br.player.charges
- local buff = br.player.buff
- local cast = br.player.cast
- local cd = br.player.cd
- local combo, comboDeficit, comboMax = br.player.power.comboPoints.amount(), br.player.power.comboPoints.deficit(), br.player.power.comboPoints.max()
- local debuff = br.player.debuff
- -- local pullTimer = br.BossMods:getPulltimer()
- local enemies = br.player.enemies
- local essence = br.player.essence
- local gcd = getSpellCD(61304)
- local gcdMax = br.player.gcdMax
- local hastar = GetObjectExists("target")
- local has = br.player.has
- local healPot = getHealthPot()
- local inCombat = isInCombat("player")
- local lastSpell = lastSpellCast
- local level = br.player.level
- local mode = br.player.mode
- local moving = isMoving("player") ~= false or br.player.moving
- local php = br.player.health
- local power, powerDeficit, powerRegen, powerMax = br.player.power.energy.amount(), br.player.power.energy.deficit(), br.player.power.energy.regen(), br.player.power.energy.max()
- local race = br.player.race
- local racial = br.player.getRacial()
- local solo = #br.friend < 2
- local spell = br.player.spell
- local stealth = select(2,GetShapeshiftFormInfo(1))
- local stealthingAll = stealth or br.player.buff.vanish.exists() or br.player.buff.shadowmeld.exists()
- local stealthingRogue = stealth or br.player.buff.vanish.exists()
- local talent = br.player.talent
- local targetDistance = getDistance("target")
- local traits = br.player.traits
- local ttm = br.player.power.energy.ttm()
- local units = br.player.units
- local use = br.player.use
- local validTarget = isValidUnit("target")
- local lootDelay = getOptionValue("LootDelay")
- local ispvp = (br.instance == "pvp" or br.instance == "arena") and true or false
- local coralFirst = (canUse(169311) and coralFirst and true) or false
- -- if select(2,GetShapeshiftFormInfo(1)) then
- -- print("stealth")
- -- else
- -- print("123")
- -- end
- -- print(power/powerMax*100)
- LibDraw.clearCanvas()
- -- print(checkDR(199804,"target"))
- -- print(UnitClassification("target"))
- if not UnitAffectingCombat("player") then
- if fhbossPool then fhbossPool = false end
- if not talent.markedForDeath then
- if mode.mfd ~= 4 then ToggleToValue("MFD", 4) end -- turn MFD off
- if buttonMFD:IsShown() then buttonMFD:Hide() end
- else
- if not buttonMFD:IsShown() then buttonMFD:Show() end
- end
- if not isChecked("Dont BTE kickable") then
- if buttonBtEHoldCast:IsShown() then buttonBtEHoldCast:Hide() end
- else
- if not buttonBtEHoldCast:IsShown() then buttonBtEHoldCast:Show() end
- end
- if not talent.killingSpree and not talent.bladeRush then
- if mode.tierseven ~= 2 then ToggleToValue("Tierseven", 2) end -- turn Tierseven off
- if buttonTierseven:IsShown() then buttonTierseven:Hide() end
- else
- if not buttonTierseven:IsShown() then buttonTierseven:Show() end
- end
- if isChecked("Wownish") and GetMinimapZoneText() ~= "R&D" then
- if mode.ritzanish ~= 2 then ToggleToValue("RitzaNish", 2) end
- if buttonRitzaNish:IsShown() then buttonRitzaNish:Hide() end
- else
- if not buttonRitzaNish:IsShown() then buttonRitzaNish:Show() end
- end
- end
- local spread = false
- -- local forceroll
- SLASH_FORCEROLL1 = "/forceroll"
- SlashCmdList["FORCEROLL"] = function()
- if forceroll then
- forceroll = false
- else
- forceroll = true
- end
- end
- SLASH_STOPFINISH1 = "/stopfinish"
- SlashCmdList["STOPFINISH"] = function()
- if stopfinish then
- stopfinish = false
- else
- stopfinish = true
- end
- end
- SLASH_FORCEBOTE1 = "/forcebote"
- SlashCmdList["FORCEBOTE"] = function()
- forcebote = true
- end
- SLASH_FORCEUSETOPTRINK1 = "/forceuse13"
- SlashCmdList["FORCEUSETOPTRINK"] = function()
- forceuse13 = true
- end
- SLASH_FORCEUSELOWTRINK1 = "/forceuse14"
- SlashCmdList["FORCEUSELOWTRINK"] = function()
- forceuse14 = true
- end
- if forceroll then
- ChatOverlay("Reroll forced")
- end
- --Tricks from sir fisker
- local tricksUnit
- if isChecked("Auto Tricks") and GetSpellCooldown(spell.tricksOfTheTrade) == 0 and inCombat then
- if getOptionValue("Auto Tricks") == 1 and GetUnitIsFriend("player", "focus") and getLineOfSight("player", "focus") then
- tricksUnit = "focus"
- elseif getOptionValue("Auto Tricks") == 2 then
- for i = 1, #br.friend do
- local thisUnit = br.friend[i].unit
- if UnitGroupRolesAssigned(thisUnit) == "TANK" and not UnitIsDeadOrGhost(thisUnit) and getLineOfSight("player", thisUnit) then
- tricksUnit = thisUnit
- break
- end
- end
- end
- end
- dotHPLimit = getOptionValue("BF HP Limit") * 10000
- --______________________________________
- enemies.get(20,nil,nil,nil,spell.pistolShot)
- enemies.get(20,nil,true,nil,spell.pistolShot)
- enemies.get(8)
- local function PickPocketable(Unit)
- if Unit == nil then Unit = "target" end
- local unitType = UnitCreatureType(Unit)
- local types = {
- "Humanoid",
- "Humanoid",
- "Humanoide",
- "Humanoide",
- "Humanoïde",
- "Umanoide",
- "Humanoide",
- "Гуманоид",
- "인간형",
- "人型生物",
- "人型生物"
- }
- for i = 1, #types do
- if unitType == types[i] then return true end
- end
- return false
- end
- local function ttd(unit)
- if UnitIsPlayer(unit) then return 999 end
- local ttdSec = getTTD(unit)
- if getOptionCheck("Enhanced Time to Die") then return ttdSec end
- if ttdSec == -1 then return 999 end
- return ttdSec
- end
- local function getapdmg(offHand)
- local useOH = offHand or false
- local wdpsCoeff = 6
- local ap = UnitAttackPower("player")
- local minDamage, maxDamage, minOffHandDamage, maxOffHandDamage, physicalBonusPos, physicalBonusNeg, percent = UnitDamage("player")
- local speed, offhandSpeed = UnitAttackSpeed("player")
- if useOH and offhandSpeed then
- local wSpeed = offhandSpeed * (1 + GetHaste() / 100)
- local wdps = (minOffHandDamage + maxOffHandDamage) / wSpeed / percent - ap / wdpsCoeff
- return (ap + wdps * wdpsCoeff) * 0.5
- else
- local wSpeed = speed * (1 + GetHaste() / 100)
- local wdps = (minDamage + maxDamage) / 2 / wSpeed / percent - ap / wdpsCoeff
- return ap + wdps * wdpsCoeff
- end
- end
- local function rtdamage()
- local apMod = getapdmg()
- local rtcoef = 0.35
- local auramult = 1.13
- local versmult = (1 + ((GetCombatRatingBonus(CR_VERSATILITY_DAMAGE_DONE) + GetVersatilityBonus(CR_VERSATILITY_DAMAGE_DONE)) / 100))
- if talent.deeperStratagem then dsmod = 1.05 else dsmod = 1 end
- return(
- apMod * combo * rtcoef * auramult * dsmod * versmult
- )
- end
- -- local function isTotem(unit)
- -- local eliteTotems = { -- totems we can dot
- -- [125977] = "Reanimate Totem",
- -- [127315] = "Reanimate Totem",
- -- [146731] = "Zombie Dust Totem"
- -- }
- -- local creatureType = UnitCreatureType(unit)
- -- local objectID = GetObjectID(unit)
- -- if creatureType ~= nil and eliteTotems[objectID] == nil then
- -- if creatureType == "Totem" or creatureType == "Tótem" or creatureType == "Totém" or creatureType == "Тотем" or creatureType == "토템" or creatureType == "图腾" or creatureType == "圖騰" then return true end
- -- end
- -- return false
- -- end
- -- local function noDotCheck(unit)
- -- if isChecked("Dot Blacklist") and (noDotUnits[GetObjectID(unit)] or UnitIsCharmed(unit)) then return true end
- -- if isTotem(unit) then return true end
- -- local unitCreator = UnitCreator(unit)
- -- if unitCreator ~= nil and UnitIsPlayer(unitCreator) ~= nil and UnitIsPlayer(unitCreator) == true then return true end
- -- if GetObjectID(unit) == 137119 and getBuffRemain(unit, 271965) > 0 then return true end
- -- return false
- -- end
- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- local function clearTable(t)
- local count = #t
- for i=0, count do t[i]=nil end
- end
- -- local sortingorbs = false
- -- local sort5 = false
- local bftargets = 0
- local targetsort = false
- local function tableSkip(unitcheck)
- if br.instance == "pvp" or br.instance == "arena" then
- local unitCreator = UnitCreator(unitcheck.unit)
- if unitCreator ~= nil and UnitIsPlayer(unitCreator) ~= nil and UnitIsPlayer(unitCreator) == true then return true end
- end
- -- if br.instance == "party" then
- -- if UnitIsDeadOrGhost(unitcheck.unit) or
- -- ((unitcheck.id == 155432 or unitcheck.id == 155434 or unitcheck.id == 155433) and isCasting(302415, unitcheck.unit)) then
- -- return true
- -- end
- -- end
- -- if isLongTimeCCed(unitcheck.unit) then
- -- -- print("123")
- -- end
- if UnitIsDeadOrGhost(unitcheck.unit) or
- -- no TOUCH
- not isSafeToAttack(unitcheck.unit) or
- isShieldedTarget(unitcheck.unit) ~= 0 or
- isLongTimeCCed(unitcheck.unit) then
- return true end
- -- if GetRaidTargetIndex(unitcheck.unit) ~= nil then return true end
- return false
- end
- clearTable(enemyTable5)
- -- clearTable(enemyTable15)
- clearTable(enemyTable20)
- clearTable(burnTable20)
- clearTable(burnTable5)
- -- ?? mfd nill
- if #enemies.yards20 > 0 then
- local highestHP
- local lowestHP
- --------- Filling enemyTable20
- for i = 1, #enemies.yards20 do
- local thisUnit = enemies.yards20[i]
- local enemyUnit = {}
- enemyUnit.unit = thisUnit
- enemyUnit.ttd = ttd(thisUnit)
- enemyUnit.hpabs = UnitHealth(thisUnit)
- enemyUnit.id = GetObjectID(enemyUnit.unit)
- if not tableSkip(enemyUnit)
- -- if enemyUnit.hpabs > 0 then
- -- and GetRaidTargetIndex(thisUnit) == nil then
- then
- -- Emissary remove
- -- if enemyUnit.id == 144081 or enemyUnit.id == 155434 or enemyUnit.id == 155433 then
- -- if enemyUnit.hpabs > 0 then
- -- if GetRaidTargetIndex(thisUnit) ~= nil then return false end
- -- end
- -- end
- -- else
- if (isChecked("Void-Touched Emissary LoS") and enemyUnit.id == 131997) then
- local unitX, unitY, unitZ = GetObjectPosition(thisUnit)
- if getLineOfSight("player",thisUnit) then
- LibDraw.SetColor(0, 255, 0)
- else
- LibDraw.SetColor(255, 0, 0)
- end
- return LibDraw.Line(br.player.posX, br.player.posY, br.player.posZ, unitX, unitY, unitZ)
- end
- if IsSpellInRange(GetSpellInfo(1766), enemyUnit.unit) == 1 then
- -- sort5 = true
- if enemyUnit.hpabs >= dotHPLimit and not forcekill[enemyUnit.id] then
- bftargets = bftargets + 1
- end
- enemyUnit.distance = 5
- -- enemyUnit.facing = getFacing(thisUnit,"player")
- elseif IsSpellInRange(GetSpellInfo(2094), enemyUnit.unit) == 1 then
- enemyUnit.distance = 15
- else
- enemyUnit.distance = 19
- end
- if forcekill[enemyUnit.id] or (ispvp and pvpforcekill[enemyUnit.id]) then
- if enemyUnit.distance <= 5 then
- tinsert(burnTable5, enemyUnit)
- end
- tinsert(burnTable20,enemyUnit)
- end
- tinsert(enemyTable20, enemyUnit)
- if highestHP == nil or highestHP < enemyUnit.hpabs then highestHP = enemyUnit.hpabs end
- if lowestHP == nil or lowestHP > enemyUnit.hpabs then lowestHP = enemyUnit.hpabs end
- if enemyTable20.lowestTTDUnit == nil or enemyTable20.lowestTTD > enemyUnit.ttd then
- enemyTable20.lowestTTDUnit = enemyUnit.unit
- enemyTable20.lowestTTD = enemyUnit.ttd
- end
- if talent.markedForDeath and enemyUnit.hpabs <= rtdamage() then mfdtarget = thisUnit end
- -- end
- end
- end
- ----------------Enemy Score + Sorting
- -- enemyTable20.target = nil
- if #enemyTable20 > 1 then
- for i = 1, #enemyTable20 do
- -- local hpNorm = (10-1)/(highestHP-lowestHP)*(enemyTable20[i].hpabs-highestHP)+10 -- normalization of HP value, high is good
- -- if hpNorm ~= hpNorm or tostring(hpNorm) == tostring(0/0) then hpNorm = 0 end -- NaN check
- local enemyScore = 0--hpNorm
- -- if enemyTable20[i].facing then enemyScore = enemyScore + 30 end -- ??
- -- if enemyTable20[i].ttd > 1.5 then enemyScore = enemyScore + 5 end
- -- if enemyTable20[i].distance <= 5 then enemyScore = enemyScore + 30 end
- -- local raidTarget = GetRaidTargetIndex(enemyTable20[i].unit)
- -- if raidTarget ~= nil then
- -- enemyScore = enemyScore + raidTarget * 3
- -- if raidTarget == 8 then enemyScore = enemyScore + 5 end
- -- end
- if GetUnitIsUnit(enemyTable20[i].unit, "target") then
- enemyScore = enemyScore + 1
- -- enemyTable20.target = enemyTable20[i].unit
- end
- if isChecked("Prey on the Weak Sorting") and talent.preyOnTheWeak and UnitDebuffID(enemyTable20[i].unit, 255909) then
- -- targetsort = true
- enemyScore = enemyScore + 5
- end
- --coral
- if isChecked("Coral Sort") and (hasEquiped(169311, 13) or hasEquiped(169311, 14)) and UnitDebuffID(enemyTable20[i].unit, 303568) then
- if isChecked("Coral Sort") then
- -- targetsort = true
- enemyScore = enemyScore + 3
- end
- end
- if isChecked("Low prio for - dmg buffs") and br.instance == "party" then--GetUnitIsUnit
- enemyScore = enemyScore - 10
- end
- --if UnitBuffID(enemyTable30[i].unit, 277242) then enemyScore = enemyScore + 50 end -- ghuun check
- -- MfD Priority
- -- if UnitBuffID(enemyTable30[i].unit, 137619) then enemyScore = enemyScore + 50 end --vend score
- enemyTable20[i].enemyScore = enemyScore
- end
- table.sort(enemyTable20, function(x,y)
- return x.enemyScore > y.enemyScore
- end)
- end
- ------ Filling other range tables
- for i = 1, #enemyTable20 do
- local thisUnit = enemyTable20[i]
- --Emissary
- if isChecked("Keep BTE For CC Emissary") and thisUnit.id == 155434 and thisUnit.hpabs >= 50000 then
- keepbteEmissary = true
- else
- keepbteEmissary = false
- end
- -- local fokIgnore = {
- -- -- [120651]=true -- Explosive
- -- }
- -- if thisUnit.distance <= 20 then
- -- if fokIgnore[objectID] == nil and not isTotem(thisUnit.unit) then
- -- tinsert(enemyTable20, thisUnit)
- -- --if deadlyPoison10 and not debuff.deadlyPoison.exists(thisUnit.unit) then deadlyPoison10 = false end
- -- end
- --if debuff.garrote.remain(thisUnit.unit) > 0.5 then garroteCount = garroteCount + 1 end
- -- if enemyTable20[i].distance <= 15 then
- -- tinsert(enemyTable15, thisUnit)
- -- end
- if enemyTable20[i].distance <= 5 then
- -- local objectID = GetObjectID(thisUnit.unit)
- -- local x,y,z = ObjectPosition(thisUnit.unit)
- -- if forcekill[objectID] then sortingorbs = true end
- -- LibDraw.Circle(x,y,z,2)
- tinsert(enemyTable5, thisUnit)
- -- libdra
- end
- -- end
- end
- -- if #enemyTable5 > 1 then
- -- if talent.markedForDeath and mode.mfd == 3 and mfdtarget ~= nil then
- -- table.sort(enemyTable5, function(x)
- -- if GetUnitIsUnit(x.unit, "mfdtarget") then
- -- return true
- -- else
- -- return false
- -- end
- -- end)
- -- end
- -- if targetsort then
- -- table.sort(enemyTable5, function(x)
- -- if GetUnitIsUnit(x.unit, "target") then
- -- return true
- -- else
- -- return false
- -- end
- -- end)
- -- table.sort(enemyTable20, function(x)
- -- if GetUnitIsUnit(x.unit, "target") then
- -- return true
- -- else
- -- return false
- -- end
- -- end)
- -- end
- -- end
- -- print(keepbteEmissary)
- if isChecked("AutoTargetInMelee") and inCombat and #enemyTable5 > 0 and ((GetUnitExists("target") and UnitIsDeadOrGhost("target") and not GetUnitIsUnit(enemyTable5[1].unit, "target")) or not GetUnitExists("target")) then
- TargetUnit(enemyTable5[1].unit)
- end
- end
- --Just nil fixes
- if enemyTable20.lowestTTD == nil then enemyTable20.lowestTTD = 999 end
- if enemyTable20.coralTargetTTD == nil then enemyTable20.coralTargetTTD = 999 end
- -- print(bftargets)
- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- -- Arcane Torrent
- if isChecked("Arcane Torrent Dispel") and race == "BloodElf" then
- local torrentUnit = 0
- for i=1, #enemies.yards8 do
- local thisUnit = enemies.yards8[i]
- if canDispel(thisUnit, select(7, GetSpellInfo(GetSpellInfo(69179)))) then
- torrentUnit = torrentUnit + 1
- if torrentUnit >= getOptionValue("Arcane Torrent Dispel") then
- if castSpell("player",racial,false,false,false) then return true end
- break
- end
- end
- end
- end
- -- if inCombat and #br.player.enemies.yards5 > 1 then
- -- -- table.sort(br.player.enemies.yards5, function(x,y)
- -- -- return UnitHealth(x) > UnitHealth(y)
- -- -- end)
- -- if GetUnitExists(mfdunit) then
- -- table.sort(br.player.enemies.yards5, function(x)
- -- if GetUnitIsUnit(x, mfdunit) then
- -- return true
- -- else
- -- return false
- -- end
- -- end)
- -- end
- -- if GetUnitExists("target") then
- -- table.sort(br.player.enemies.yards5, function(x)
- -- if GetUnitIsUnit(x, "target") then
- -- return true
- -- else
- -- return false
- -- end
- -- end)
- -- end
- -- if isChecked("|cffFF0000Force Burn Stuff") then
- -- table.sort(br.player.enemies.yards5, function(x,y)
- -- if UnitHealth(x) < UnitHealth(y) and forcekill[GetObjectID(x)] and forcekill[GetObjectID(y)] then
- -- --print(UnitName(x).."true")
- -- return true
- -- else
- -- --print(UnitName(x).."false")
- -- return false
- -- end
- -- end)
- -- -- table.sort(br.player.enemies.yards5, function(x,y)
- -- -- return UnitHealth(x) < UnitHealth(y) and forcekill[GetObjectID(x)] and forcekill[GetObjectID(y)]
- -- -- end)
- -- end
- -- end
- local function IrisBest()
- if not isChecked("RotateBeam") then return end
- -- if ispvp and talent.killingSpree then
- if not IrisTime then
- IrisTime = br.time
- elseif br.time <= IrisTime + 0.5 then
- return
- end
- local function getRectUnit(facing)
- width = 5
- length = 30
- local x, y, z = ObjectPosition("player")
- local facing = facing or 0
- local halfWidth = width/2
- -- Near Left
- local nlX, nlY, nlZ = GetPositionFromPosition(x, y, z, halfWidth, facing + rad(90), 0)
- -- Near Right
- local nrX, nrY, nrZ = GetPositionFromPosition(x, y, z, halfWidth, facing + rad(270), 0)
- -- Far Left
- local flX, flY, flZ = GetPositionFromPosition(nlX, nlY, nlZ, length, facing, 0)
- -- Far Right
- local frX, frY, frZ = GetPositionFromPosition(nrX, nrY, nrZ, length, facing, 0)
- return nlX, nlY, nrX, nrY, frX, frY, flX, flY, flZ, nlZ, nrZ, frZ
- end
- local function isInside(x,y,ax,ay,bx,by,dx,dy)
- local bax = bx - ax
- local bay = by - ay
- local dax = dx - ax
- local day = dy - ay
- if ((x - ax) * bax + (y - ay) * bay <= 0.0) then return false end
- if ((x - bx) * bax + (y - by) * bay >= 0.0) then return false end
- if ((x - ax) * dax + (y - ay) * day <= 0.0) then return false end
- if ((x - dx) * dax + (y - dy) * day >= 0.0) then return false end
- return true
- end
- local curFacing = ObjectFacing("player")
- local x, y, z = ObjectPosition("player")
- local facing, bestAngle, bestAngleUnitsHit = 0.1, 0, 0
- while facing <= 6.2 do
- local unitsInRect = 0
- local nlX, nlY, nrX, nrY, frX, frY, flX, flY, flZ, nlZ, nrZ, frZ = getRectUnit(facing)
- for i = 1, #enemies.yards20 do
- local uX, uY, uZ = ObjectPosition(enemies.yards20[i])
- if isInside(uX,uY,nlX,nlY,nrX,nrY,frX,frY) then
- -- if not UnitAffectingCombat(enemies.yards40nc[i]) and TraceLine(x, y, z, uX, uY, uZ , 0x10) then
- -- unitsInRect = 0
- -- facing = facing + 0.05
- -- break
- -- end
- unitsInRect = unitsInRect + 1
- end
- end
- if unitsInRect > bestAngleUnitsHit then
- bestAngleUnitsHit = unitsInRect
- bestAngle = facing
- end
- facing = facing + 0.05
- end
- --print(bestAngleUnitsHit)
- -- local nlX, nlY, nrX, nrY, frX, frY, flX, flY, flZ, nlZ, nrZ, frZ = getRectUnit(bestAngle)
- -- LibDraw.clearCanvas()
- -- LibDraw.Line(flX, flY, z, nlX, nlY, z)
- -- LibDraw.Line(frX, frY, z, nrX, nrY, z)
- -- LibDraw.Line(frX, frY, z, flX, flY, z)
- -- LibDraw.Line(nlX, nlY, z, nrX, nrY, z)
- -- print(bestAngleUnitsHit)
- FaceDirection(bestAngle, true)
- return
- -- FaceDirection(curFacing)
- end
- -- print(UnitCastingInfo("player"))
- -- print(UnitChannelInfo("player"))
- local function shouldFinish()
- -- if=combo_points>=cp_max_spend-(buff.broadside.up+buff.opportunity.up)*(talent.quick_draw.enabled&(!talent.marked_for_death.enabled|cooldown.marked_for_death.remains>1))
- if not stopfinish then
- if combo >= comboMax - ((buff.broadside.exists("player") or buff.opportunity.exists("player")) and 1 or 0) then --((buff.broadside.exists("player") and 1 or 0) + ((buff.opportunity.exists("player") and 1 or 0))) then
- return true
- else
- return false
- end
- end
- end
- if leftCombat == nil then leftCombat = br.time end
- if vanishTime == nil then vanishTime = br.time end
- --print(viabletargetcount())
- if buff.rollTheBones == nil then buff.rollTheBones = {} end
- buff.rollTheBones.count = 0
- buff.rollTheBones.duration = 0
- buff.rollTheBones.remain = 0
- for k,v in pairs(spell.buffs.rollTheBones) do
- if UnitBuffID("player",v) ~= nil then
- buff.rollTheBones.count = buff.rollTheBones.count + 1
- buff.rollTheBones.duration = getBuffDuration("player",v)
- buff.rollTheBones.remain = getBuffRemain("player",v)
- end
- end
- local function rtbReroll()
- if mode.rollforone == 1 then
- if buff.rollTheBones.count > 0 then return false end
- elseif bftargets >= 3 then
- local skull
- if buff.skullAndCrossbones.exists("player") then skull = 1 else skull = 0 end
- -- print("aoe roll")
- -- print("1"..(buff.rollTheBones.count - skull))
- -- print("ld"..buff.loadedDice.exists())
- -- print("rp"..buff.ruthlessPrecision.exists("player"))
- -- print("gm"..buff.grandMelee.exists("player"))
- -- print("br"..buff.broadside.exists("player"))
- return ((buff.rollTheBones.count - skull) < 2 and (buff.loadedDice.exists("player") or not (buff.ruthlessPrecision.exists("player") or buff.grandMelee.exists("player") or (talent.deeperStratagem and buff.broadside.exists("player"))))) and true or false
- --# Reroll for 2+ buffs or Ruthless Precision with Deadshot or Ace up your Sleeve.
- --actions+=/variable,name=rtb_reroll,op=set,if=azerite.deadshot.enabled|azerite.ace_up_your_sleeve.enabled,value=rtb_buffs<2&(buff.loaded_dice.up|buff.ruthless_precision.remains<=cooldown.between_the_eyes.remains)
- elseif traits.deadshot.rank > 0 or traits.aceupyoursleeve.rank > 0 then
- -- print("bteroll")
- return (buff.rollTheBones.count < 2 and (buff.loadedDice.exists() or (buff.ruthlessPrecision.remain() <= cd.betweenTheEyes.remain()))) and true or false
- --rtb_reroll,value=rtb_buffs<2&(buff.loaded_dice.up|!buff.grand_melee.up&!buff.ruthless_precision.up)
- else
- -- print("last roll")
- return (buff.rollTheBones.count < 2 and (buff.loadedDice.exists() or not buff.grandMelee.exists() or not buff.ruthlessPrecision.exists())) and true or false
- end
- end
- --actions+=/variable,name=ambush_condition,value=combo_points.deficit>=2+2*(talent.ghostly_strike.enabled&cooldown.ghostly_strike.remains<1)+buff.broadside.up&energy>60&!buff.skull_and_crossbones.up&!buff.keep_your_wits_about_you.up
- local function bladeFlurrySync()
- return not mode.bladeflurry == 1 or bftargets < 2 or buff.bladeFlurry.exists()
- end
- -- finish,if=combo_points>=cp_max_spend-(buff.broadside.up+buff.opportunity.up)*(talent.quick_draw.enabled&(!talent.marked_for_death.enabled|cooldown.marked_for_death.remains>1))
- -- # Finish at maximum CP. Substract one for each Broadside and Opportunity when Quick Draw is selected and MfD is not ready after the next second.
- -- actions+=/call_action_list,name=finish,if=combo_points>=cp_max_spend-(buff.broadside.up+buff.opportunity.up)*(talent.quick_draw.enabled&(!talent.marked_for_death.enabled|cooldown.marked_for_death.remains>1))
- -- print(shouldFinish())
- local function courtcheck(skill)
- if br.player.eID == 2311 then
- if UnitDebuffID("player","304409") then
- if br.player.spell.abilities[skill] == br.lastCast.tracker[1] then
- if ttm <= 2 then
- if cast.sprint() then return true end
- if cast.riposte() then return true end
- -- if cast.vanish() then return true end
- end
- if cast.detection() then return true end
- end
- end
- end
- end
- local function sanguineCheck(unit)
- if UnitHealth(unit) <= 25000 then return false end
- local x, y, z = ObjectPosition(unit)
- for i = 1, #enemyTable5 do
- local thisUnit = enemyTable5[i].unit
- local ttd = enemyTable5[i].ttd
- if thisUnit ~= unit then
- local posX, posY, posZ = ObjectPosition(thisUnit)
- if ttd <= 2 then
- if sqrt(((x - posX) ^ 2) + ((y - posY) ^ 2) + ((z - posZ) ^ 2)) < 4.5 then
- return true
- end
- end
- end
- end
- if br.sanguineCheck(unit) then return true end
- return false
- end
- local function coralCheck()
- -- print(coralFirst)
- if coralFirst and #enemyTable20 > 0 then
- -- print(coralFirst)
- local razorTime = buff.razorCoral.remain("player")
- for i = 1, #enemyTable20 do
- local thisUnit = enemyTable20[i]
- -- print("123")
- if thisUnit.ttd > 0 and (thisUnit.ttd < 20 or thisUnit.ttd < razorTime) then
- if enemyTable20.coralTarget == nil or enemyTable20.coralTargetTTD < thisUnit.ttd then
- enemyTable20.coralTarget = thisUnit.unit
- enemyTable20.coralTargetTTD = thisUnit.ttd
- end
- end
- end
- -- if enemyTable20.coralTargetTTD <= 20 then
- -- -- print(enemyTable20.coralTargetTTD)
- -- end
- -- if enemyTable20.coralTargetTTD < razorTime then
- -- print(enemyTable20.coralTargetTTD)
- -- end
- if enemyTable20.coralTarget ~= nil then
- local firsttarget = GetObjectWithGUID(ObjectGUID("target"))
- TargetUnit(enemyTable20.coralTarget)
- UseItemByName(169311, enemyTable20.coralTarget)
- TargetUnit(firsttarget)
- enemyTable20.coralTarget = nil
- end
- end
- end
- -- local function shit(skill, stuff, yards)
- -- -- local shitty = ["rogueTables.enemyTable"..yards]
- -- -- for i = 1, #shitty do
- -- -- local thisUnit = shitty[i].unit
- -- -- if stuff then
- -- -- if cast[skill](thisUnit) then return true end
- -- -- end
- -- -- end
- -- -- print("rogueTables.enemyTable" .. yards)
- -- for k,v in pairs("rogueTables.enemyTable" .. yards]) do
- -- print(k)
- -- print(v)
- -- end
- -- end
- -- shit("sinisterStrike", true, 5)
- local function customCast(skill, stuff, yards)
- courtcheck(skill)
- if yards == 5 then
- if isChecked("|cffFF0000Force Burn Stuff") or spread then
- for i = 1, #burnTable5 do
- local thisUnit = burnTable5[i].unit
- if stuff then
- if cast[skill](thisUnit) then return true end
- end
- end
- end
- for i = 1, #enemyTable5 do
- local thisUnit = enemyTable5[i].unit
- if stuff then
- if cast[skill](thisUnit) then return true end
- end
- end
- else
- if skill == "betweenTheEyes" and (mode.nobte == 3 or keepbteEmissary or spread) then return end
- if isChecked("|cffFF0000Force Burn Stuff") or spread then
- for i = 1, #burnTable20 do
- if burnTable20[i].id == 120651 then
- if skill == "betweenTheEyes" then return end
- if isChecked("DontWasteDeadShotOnOrbs") and skill == "pistolShot" and buff.deadShot.exists("player") then return end
- end
- local thisUnit = burnTable20[i].unit
- if stuff then
- if cast[skill](thisUnit) then return true end
- end
- end
- end
- if skill == "betweenTheEyes" then
- if not cast.able.betweenTheEyes(enemyTable20[1]) then return end
- local function bte20()
- for i = 1, #enemyTable20 do
- if enemyTable20[i].id == 120651 then return end
- local thisUnit = enemyTable20[i].unit
- if isChecked("BtE Sanguine check") then
- if sanguineCheck(thisUnit) then return end
- end
- if isChecked("DRTracker") then
- if stuff and canCC(199804, thisUnit) and (select(5,UnitCastingInfo(thisUnit)) ~= nil or select(5,UnitChannelInfo(thisUnit)) ~= nil) and (mode.btehold == 2 or select(8, UnitCastingInfo(thisUnit))) then
- if cast[skill](thisUnit) then return true end
- end
- else
- if stuff and (select(5,UnitCastingInfo(thisUnit)) ~= nil or select(5,UnitChannelInfo(thisUnit)) ~= nil) and (mode.btehold == 2 or select(8, UnitCastingInfo(thisUnit))) then
- if cast[skill](thisUnit) then return true end
- end
- end
- end
- for i = 1, #enemyTable20 do
- if enemyTable20[i].id == 120651 then return end
- local thisUnit = enemyTable20[i].unit
- --sanguine check
- --if getBuffRemain(thisUnit,226510) ~= 0 then return end
- if isChecked("DRTracker") then
- if stuff and canCC(199804, thisUnit) and (mode.btehold == 2 or select(8, UnitCastingInfo(thisUnit))) then
- if cast[skill](thisUnit) then return true end
- end
- else
- if stuff then
- if cast[skill](thisUnit) then return true end
- end
- end
- end
- end
- if isChecked("Force 6cp BTE") then
- -- print("cp = "..combo..", max = "..comboMax)
- if combo < comboMax then
- print("check ok")
- if cast.pool.sinisterStrike() then print("pooling for ss");return true end
- print("ss cast")
- customCast("sinisterStrike", true, 5)
- end
- end
- if combo == comboMax then
- if forcebote or mode.boteforce == 1 or (isChecked("AutoBotE") and not cd.betweenTheEyes.exists() and buff.bladeFlurry.exists("player") and bftargets >= 4 and not rtbReroll() and buff.adrenalineRush.exists("player")) then
- if cast.bloodOfTheEnemy() then forcebote = false; return true end
- end
- end
- if mode.nobte == 1 then
- bte20()
- elseif mode.nobte == 2 and UnitIsVisible("target") and not UnitIsDeadOrGhost("target") then
- -- if getBuffRemain(thisUnit,226510) ~= 0 then return end
- if isChecked("BtE Sanguine check") then
- if sanguineCheck(ObjectPointer("target")) then
- if isChecked("BtE giga feature") then
- bte20()
- end
- return end
- end
- if (mode.btehold == 2 or (select(8, UnitCastingInfo("target")) or UnitCastingInfo("target") == nil )) then
- if cast[skill]("target") then return true end
- end
- end
- else
- for i = 1, #enemyTable20 do
- local thisUnit = enemyTable20[i].unit
- if stuff then
- if cast[skill](thisUnit) then return true end
- end
- end
- end
- end
- end
- -- customCast("sinisterStrike", true, 5)
- --------------------
- --- Action Lists ---
- --------------------
- -- Action List - Extras
- --[[local function actionList_Extras()
- end -- End Action List - Extras]]
- -- Action List - DefensiveModes
- local function actionList_Defensive()
- -- SLASH_FEINT1 = "/feinterino"
- -- SlashCmdList["FEINT"] = function(_)
- -- if not buff.feint.exists() or (buff.feint.exists() and buff.feint.remain() <= 0.8) or isDeBuffed("player", 230139) and mode.feint == 2 then
- -- if toggle("Feint", 1) then
- -- return true
- -- end
- -- end
- -- end
- -- -- Feint
- -- if mode.feint == 1 and not buff.feint.exists() then
- -- if cast.feint() and toggle("Feint", 2) then
- -- return true
- -- end
- -- end
- if not stealth then
- -- Health Pot/Healthstone
- if isChecked("Healing Potion/Healthstone") and (use.able.healthstone() or canUse(169451)) and php <= getOptionValue("Healing Potion/Healthstone") and inCombat and (hasItem(169451) or has.healthstone()) then
- if use.able.healthstone() then
- use.healthstone()
- elseif canUse(169451) then
- useItem(169451)
- end
- end
- if isChecked("Wownish") and mode.ritzanish == 1 and UnitCastingInfo("target") == GetSpellInfo(259856) then
- if CastSpellByID(1856) then return end
- end
- -- Crimson Vial
- if isChecked("Crimson Vial") and php < getOptionValue("Crimson Vial") then
- if cast.crimsonVial() then
- return true
- end
- end
- -- Feint
- if isChecked("Feint") and php <= getOptionValue("Feint") and inCombat and not buff.feint.exists() then
- if cast.feint() then
- return true
- end
- end
- -- Evasion
- if isChecked("Riposte") and php <= getOptionValue("Riposte") and inCombat then
- if cast.riposte() then
- return true
- end
- end
- if isChecked("Engineer's Belt") and php <= getOptionValue("Engineer's Belt") and inCombat then
- if canUse(6) then
- useItem(6)
- end
- end
- end
- end -- End Action List - Defensive
- -- Action List - Interrupts
- local function actionList_Interrupts()
- if useInterrupts() then
- for i=1, #enemyTable5 do
- local thisUnit = enemyTable5[i].unit
- if canInterrupt(thisUnit,getOptionValue("Interrupt At")) then
- -- kick
- if isChecked("Kick") then
- if cast.kick(thisUnit) then end
- end
- end
- end
- end -- End Interrupt and No Stealth Check
- end -- End Action List - Interrupts
- -- Action List - Cooldowns
- local function actionList_Cooldowns()
- local startTime = debugprofilestop()
- -- Trinkets
- if isChecked("Trinkets") then
- if hasBloodLust() or (ttd("target") <= 20 and isBoss("target")) then
- if canUse(13) then
- useItem(13)
- end
- if canUse(14) then
- useItem(14)
- end
- end
- end
- -- Non-NE Racial
- --blood_fury
- --berserking
- --arcane_torrent,if=energy.deficit>40
- if mode.special == 1 and isChecked("Racial") and (race == "Orc" or race == "MagharOrc" or race == "DarkIronDwarf" or race == "Troll") then
- if cast.racial("player") then return true end
- end
- if mode.special == 1 and not buff.adrenalineRush.exists() and ttd("target") >= 10 then
- if cast.adrenalineRush("player") then
- if isChecked("Trinkets") then
- if canUse(13) then
- useItem(13)
- end
- if canUse(14) then
- useItem(14)
- end
- end
- if isChecked("Pots with AR") then
- if isChecked("Pots with AR") and (hasBloodLust() or buff.adrenalineRush.exists()) and targetDistance < 5 then
- if ttd("target") > 15 then
- if getOptionValue("Pots with AR") == 1 and hasItem(169299) and canUse(169299) then useItem(169299)
- elseif getOptionValue("Pots with AR") == 2 and hasItem(168489) and canUse(168489) then useItem(168489)
- elseif getOptionValue("Pots with AR") == 3 and hasItem(168529) and canUse(168529) then useItem(168529)
- end
- end
- end
- end
- return true end
- end
- if talent.ghostlyStrike and bladeFlurrySync() and comboDeficit >= (1 + (buff.broadside.exists() and 1 or 0)) then
- if cast.ghostlyStrike("target") then return true end
- end
- if talent.killingSpree and mode.tierseven == 1 and bladeFlurrySync() and (ttm > 5 or power < 15) then
- if cast.killingSpree("target") then return true end
- end
- -- Blade Rush
- -- blade_rush,if=variable.blade_flurry_sync&energy.time_to_max>1
- if mode.tierseven == 1 and bladeFlurrySync() and targetDistance < 5 and ttm > 1 then
- if cast.bladeRush("target") then return true end
- end
- if isChecked("Debug Timers") then
- if profile.Cooldowns == nil then profile.Cooldowns = {} end
- local section = profile.Cooldowns
- if section.totalIterations == nil then section.totalIterations = 0 end
- if section.elapsedTime == nil then section.elapsedTime = 0 end
- section.currentTime = debugprofilestop()-startTime
- section.totalIterations = section.totalIterations + 1
- section.elapsedTime = section.elapsedTime + debugprofilestop()-startTime
- section.averageTime = section.elapsedTime / section.totalIterations
- end
- end -- End Action List - Cooldowns
- -- Action List - PreCombat
- local function actionList_PreCombat()
- -- Stealth
- if not inCombat then
- if forceroll then forceroll = false end
- if stopfinish then stopfinish = false end
- if not stealthingAll and IsUsableSpell(1784) then
- if isChecked("Stealth") then
- if getOptionValue("Stealth") == 1 or #enemies.yards20nc > 0 then
- if cast.stealth("player") then end
- end
- end
- end
- if isChecked("PickPocket") then
- if #enemyTable5 > 0 and stealthingRogue then
- for i = 1, #enemyTable5 do
- local thisUnit = enemyTable5[i].unit
- if isChecked("PickPocket") then
- if PickPocketable(thisUnit) then
- if cast.pickPocket(thisUnit) then
- CastSpellByID(8676, thisUnit)
- end
- end
- end
- end
- -- if GetUnitExists("target") then if cast.ambush("target") then return true end end
- end
- elseif isChecked("Ambush Opener") then
- if #enemyTable5 > 0 and stealthingRogue then
- for i = 1, #enemyTable5 do
- if cast.ambush(enemyTable5[i].unit) then return true end
- end
- end
- end
- end
- if isChecked("AutoStrife") and stealth then
- if cast.detection() then return true end
- end
- end -- End Action List - PreCombat
- -- Action List - Finishers
- local function actionList_Finishers()
- local startTime = debugprofilestop()
- if isChecked("Pool for BTE") then
- if ttm > cd.betweenTheEyes.remain() and cd.betweenTheEyes.exists() then
- if isChecked("Force 6cp BTE") then
- if combo < comboMax then
- if ttm >= 3 and buff.opportunity.exists("player") then
- customCast("pistolShot", true, 20)
- end
- customCast("sinisterStrike", true, 5)
- end
- end
- return true end
- end
- if forceroll then
- -- print("forcerolled")
- if cast.rollTheBones("player") then forceroll = false; return true end
- return true
- end
- -- actions.finish=between_the_eyes,if=buff.ruthless_precision.up|(azerite.deadshot.rank>=2&buff.roll_the_bones.up)
- if (buff.ruthlessPrecision.exists() or ((traits.deadshot.rank > 0 or traits.aceupyoursleeve.rank > 0) and buff.rollTheBones.count > 0)) then
- --print("626")
- customCast("betweenTheEyes",true, 20)
- end
- if not talent.sliceAndDice then
- if buff.rollTheBones.remain < 3 or rtbReroll() then
- if cast.rollTheBones("player") then return true end
- end
- else
- if buff.sliceAndDice.remain() < ttd("target") and buff.sliceAndDice.refresh() then
- if cast.sliceAndDice("player") then return true end
- end
- end
- if (traits.deadshot.rank > 0 or traits.aceupyoursleeve.rank > 0) then
- --print("643")
- customCast("betweenTheEyes",true, 20)
- end
- -- cast20yards("deathFromAbove",true)
- if cd.betweenTheEyes.exists() then
- customCast("dispatch",true, 5)
- end
- if isChecked("Debug Timers") then
- if profile.Finishers == nil then profile.Finishers = {} end
- local section = profile.Finishers
- if section.totalIterations == nil then section.totalIterations = 0 end
- if section.elapsedTime == nil then section.elapsedTime = 0 end
- section.currentTime = debugprofilestop()-startTime
- section.totalIterations = section.totalIterations + 1
- section.elapsedTime = section.elapsedTime + debugprofilestop()-startTime
- section.averageTime = section.elapsedTime / section.totalIterations
- end
- end
- local hastecd = (buff.adrenalineRush.exists("player") or hasBloodLust()) and true or false
- local function actionList_Build()
- local startTime = debugprofilestop()
- if hastecd then
- if #enemyTable5 >= 4 and not buff.deadShot.exists() and buff.bladeFlurry.exists() then
- customCast("sinisterStrike",true, 5)
- end
- end
- if comboDeficit >= (1 + (buff.broadside.exists() and 1 or 0) + (talent.quickDraw and 1 or 0)) and buff.opportunity.exists() and (buff.wits.stack() < 14 or power < 45 or buff.deadShot.exists()) then
- customCast("pistolShot",true, 20)
- end
- -- if UnitBuffID("player", 213995) then
- -- cast20yards("pistolShot",true)
- -- end
- customCast("sinisterStrike",true, 5)
- if UnitBuffID("player", 213995) then
- customCast("pistolShot",true, 20)
- end
- if isChecked("Debug Timers") then
- if profile.Builder == nil then profile.Builder = {} end
- local section = profile.Builder
- if section.totalIterations == nil then section.totalIterations = 0 end
- if section.elapsedTime == nil then section.elapsedTime = 0 end
- section.currentTime = debugprofilestop()-startTime
- section.totalIterations = section.totalIterations + 1
- section.elapsedTime = section.elapsedTime + debugprofilestop()-startTime
- section.averageTime = section.elapsedTime / section.totalIterations
- end
- end -- End Action List - Build
- local function actionList_CC()
- local willkick = nil
- -- LibDraw.clearCanvas()
- function canInterruptshit(unit, hardinterrupt, gouge)
- local hardinterrupt = hardinterrupt or false
- local timeforcc = (hardinterrupt and 2) or 1
- local interruptTarget = getOptionValue("Interrupt Target")
- if interruptTarget == 2 and not GetUnitIsUnit(unit, "target") then
- return false
- elseif interruptTarget == 3 and not GetUnitIsUnit(unit, "focus") then
- return false
- end
- local castStartTime, castEndTime, interruptID, interruptable, castLeft = 0, 0, 0, false, 999
- if GetUnitExists(unit)
- and UnitCanAttack("player",unit)
- and not UnitIsDeadOrGhost(unit)
- then
- -- Get Cast/Channel Info
- if select(5,UnitCastingInfo(unit)) and (not select(8,UnitCastingInfo(unit)) or hardinterrupt) then --Get spell cast time
- castStartTime = select(4,UnitCastingInfo(unit))
- castEndTime = select(5,UnitCastingInfo(unit))
- castLeft = castEndTime/1000 - br.time
- interruptID = select(9,UnitCastingInfo(unit))
- if stunList[interruptID] or isChecked("Any Cast") then interruptable = true end
- elseif select(5,UnitChannelInfo(unit)) and (not select(7,UnitChannelInfo(unit)) or hardinterrupt) then -- Get spell channel time
- castStartTime = select(4,UnitChannelInfo(unit))
- castEndTime = select(5,UnitChannelInfo(unit))
- castLeft = castEndTime/1000 - br.time
- interruptID = select(8,UnitChannelInfo(unit))
- if channelAsapList[interruptID] or channelLateList[interruptID] or isChecked("Any Cast") then interruptable = true end
- end
- if interruptable or isChecked("Any Cast") then
- if not cd.kick.exists() and not hardinterrupt then
- if willkick == nil then
- willkick = unit
- local wx,wy,wz = ObjectPosition(willkick)
- if getDistance(unit) > 5 then
- LibDraw.SetColor(255,0,0)
- else
- LibDraw.SetColor(0,0,0)
- end
- end
- end
- if gouge and (willkick == nil or willkick ~= unit) then
- local ux, uy, uz = ObjectPosition(unit)
- local truefacing = ObjectFacing(unit)
- if not getFacing(unit, "player") or getDistance(unit) > 8 then
- LibDraw.SetColor(255,0,0)
- LibDraw.Arc(ux, uy, uz, 7, 210, truefacing)
- else
- LibDraw.SetColor(0,0,0)
- end
- LibDraw.Text("CC SHIT", "GameFontNormal", ux,uy,uz+2)
- end
- if willkick == unit and hardinterrupt then return false end
- if castLeft <= timeforcc or channelAsapList[interruptID] ~= nil then
- -- print(forpro)
- if (br.time - castStartTime/1000) >= getOptionValue("Delay Interrupt for") then
- return true
- end
- end
- end
- return false
- end
- end
- for i = 1, #enemyTable20 do
- local thisUnit = enemyTable20[i].unit
- local distance = enemyTable20[i].distance
- if isChecked("AutoKick") and distance <= 5 and not cd.kick.exists() then
- if canInterruptshit(thisUnit, false) then
- if cast.kick(thisUnit) then
- return true
- end
- end
- end
- if isBoss(thisUnit) then return end
- if isChecked("AutoGouge") and not cd.gouge.exists() and getFacing(thisUnit, "player") then
- if canInterruptshit(thisUnit, true , true) then
- if distance <= 5 then
- if cast.gouge(thisUnit) then return true end
- end
- end
- elseif isChecked("AutoBtE") and distance <= 20 and combo >= 4 and not cd.betweenTheEyes.exists() and not spread then
- if canInterruptshit(thisUnit, true) then
- if cast.betweenTheEyes(thisUnit) then return true end
- end
- elseif isChecked("AutoBlind") and distance <= 15 and not cd.blind.exists() then
- if canInterruptshit(thisUnit, true) then
- if cast.blind(thisUnit) then return true end
- end
- end
- end
- -- if isChecked("AutoKick") and not cd.kick.exists() then
- -- for i = 1, #enemyTable5 do
- -- local thisUnit = enemyTable5[i].unit
- -- if canInterruptshit(thisUnit, nil , true) then
- -- if cast.kick(thisUnit) then end
- -- end
- -- end
- -- end
- -- if isChecked("AutoBtE") and combo > 4 and not cd.betweenTheEyes.exists() then
- -- for i = 1, #enemyTable20 do
- -- local thisUnit = enemyTable20[i].unit
- -- if canInterruptshit(thisUnit, true , true) then
- -- if cast.betweenTheEyes(thisUnit) then return true end
- -- end
- -- end
- -- end
- -- if isChecked("AutoGouge") and not cd.gouge.exists() then
- -- for i = 1, #enemyTable5 do
- -- local thisUnit = enemyTable5[i].unit
- -- if canInterruptshit(thisUnit, true , true) and thisUnit.facing then
- -- if cast.gouge(thisUnit) then return true end
- -- end
- -- end
- -- end
- -- if isChecked("AutoBtE") and combo > 0 and not cd.betweenTheEyes.exists() then
- -- for i = 1, #enemyTable20 do
- -- local thisUnit = enemyTable20[i].unit
- -- if canInterruptshit(thisUnit, true , true) then
- -- if cast.betweenTheEyes(thisUnit) then return true end
- -- end
- -- end
- -- end
- -- if isChecked("AutoBlind") and not cd.blind.exists() then
- -- for i = 1, #enemyTable15 do
- -- local thisUnit = enemyTable15[i].unit
- -- if canInterruptshit(thisUnit, true , true) then
- -- if cast.blind(thisUnit) then return true end
- -- end
- -- end
- -- end
- end
- local function actionList_Opener()
- end
- local function MythicStuff()
- if isChecked("Piggie FH") and piggiecatch then
- if br.eID == 2095 then
- piggiecatch = false
- end
- for i = 1, GetObjectCount() do
- local ID = ObjectID(GetObjectWithIndex(i))
- local object = GetObjectWithIndex(i)
- if ID == 130099 and getDistance(object) <= 5 then
- InteractUnit(object)
- RunMacroText("/follow")
- InteractUnit("target")
- return
- end
- end
- end
- -- WriteFile("GetMinimapZoneText.txt", tostring(GetMinimapZoneText()) .. "\n", true)
- if br.player.eID then
- -- fh 1st boss feint, fisker (c)
- if br.player.eID == 2093 then
- local a, b, c, d = UnitCastID("boss1")
- if a == 256106 then
- fhbossPool = false
- if c == ObjectPointer("player") then
- CastSpellByID(1966)
- end
- end
- if br.DBM:getTimer(256106) <= 1.5 and not cd.feint.exists() then -- pause 1 sec before cast for pooling
- -- if GetUnitIsUnit("player", UnitTarget("boss1")) then
- fhbossPool = true
- end
- if fhbossPool then return true end
- end
- --WM gorak cc
- if br.player.eID == 2117 then
- if enemyTable20 ~= nil then
- for i = 1, #enemyTable20 do
- local thisUnit = enemyTable20[i]
- if thisUnit.id == 135552 and UnitCastingInfo(thisUnit) ~= nil then
- if (select(6, UnitCastingInfo(thisUnit)) - br.time) <= 1 then
- if not cd.gouge.exists() and getFacing(thisUnit,"player") then
- if cast.gouge(thisUnit) then return true end
- elseif not cd.betweenTheEyes.exists() and comboDeficit <= 2 then
- if cast.betweenTheEyes(thisUnit) then return true end
- elseif not cd.blind.exists() then
- if cast.blind(thisUnit) then return true end
- end
- end
- end
- end
- end
- end
- -- if br.player.eID == 2093 and isCastingSpell(256106, "boss1") then
- -- fhbossPool = false
- -- if GetUnitIsUnit("player", UnitTarget("boss1")) then
- -- if cast.feint() then print("feint gone");return true end
- -- end
- -- end
- -- if fhbossPool then return true end
- -- print(eID)
- local bosscount = 0
- for i = 1, 5 do
- if GetUnitExists("boss" .. i) then
- bosscount = bosscount + 1
- end
- end
- for i = 1, bosscount do
- local spellname, castEndTime,interruptID, spellnamechannel, castorchan, spellID
- thisUnit = tostring("boss" .. i)
- -- if select(3, UnitCastID(thisUnit)) == ObjectPointer("player") and select(9, UnitCastingInfo(thisUnit)) then
- -- print(select(9, UnitCastingInfo(thisUnit)))
- -- end
- if UnitCastingInfo(thisUnit) then
- spellname = UnitCastingInfo(thisUnit)
- -- castStartTime = select(4,UnitCastingInfo(thisUnit)) / 1000
- castEndTime = select(5, UnitCastingInfo(thisUnit)) / 1000
- interruptID = select(9,UnitCastingInfo(thisUnit))
- castorchan = "cast"
- elseif UnitChannelInfo(thisUnit) then
- spellname = UnitChannelInfo(thisUnit)
- -- castStartTime = select(4,UnitChannelInfo(thisUnit)) / 1000
- castEndTime = select(5,UnitChannelInfo(thisUnit)) / 1000
- interruptID = select(9,UnitChannelInfo(thisUnit))
- castorchan = "channel"
- end
- if spellname ~= nil then
- -- print(spellname)
- local castleft = castEndTime - br.time
- -- WriteFile("encountertest.txt", tostring(ObjectName("boss"..i)) .. "," .. tostring(castleft) .. " left," .. tostring(spellname) .. ", spellid =" .. tostring(interruptID) .. "\n", true)
- -- print(castleft.." cast left"..spellname)
- -- print(castleft.." channel left"..spellname)
- -- if castleft <= 3 then
- if (select(3, UnitCastID(thisUnit)) == ObjectPointer("player") or select(4, UnitCastID(thisUnit)) == ObjectPointer("player")) and castleft <= 1.5 then--GetUnitIsUnit("player", "boss"..i.."target") or then
- if cloakPlayerlist[interruptID] then
- if br.player.eID == 2093 then
- if not cd.feint.exists() or buff.feint.exists() then return end
- end
- if cast.cloakOfShadows("player") then return true end
- elseif evasionPlayerlist[interruptID] then
- if cast.riposte("player") then return true end
- elseif br.player.talent.elusiveness and feintPlayerList[interruptID] then
- if cast.pool.feint("player") and cd.feint.remain() <= castleft then return true end
- if cast.feint("player") then return true end
- elseif vanishList[interruptID] then
- if cast.vanish("player") then return true end
- end
- else
- if cloaklist[interruptID] then
- if cast.cloakOfShadows("player") then return true end
- elseif evasionlist[interruptID] then
- if cast.riposte("player") then return true end
- elseif feintlist[interruptID] then
- if cast.pool.feint("player") and cd.feint.remain() <= castleft then return true end
- if cast.feint("player") then return true end
- end
- end
- -- end
- end
- end
- --CC units
- -- for i=1, #enemies.yards20 do
- -- local thisUnit = enemies.yards20[i]
- -- local distance = getDistance(thisUnit)
- -- if isChecked("AutoBtE") or isChecked("AutoGouge") or isChecked("AutoBlind") then
- -- local interruptID, castStartTime, spellname, castEndTime
- -- if UnitCastingInfo(thisUnit) then
- -- spellname = UnitCastingInfo(thisUnit)
- -- -- castStartTime = select(4,UnitCastingInfo(thisUnit)) / 1000
- -- castEndTime = select(5, UnitCastingInfo(thisUnit)) / 1000
- -- interruptID = select(9,UnitCastingInfo("player"))
- -- elseif UnitChannelInfo(thisUnit) then
- -- spellname = UnitChannelInfo(thisUnit)
- -- -- castStartTime = select(4,UnitChannelInfo(thisUnit)) / 1000
- -- castEndTime = select(5,UnitChannelInfo(thisUnit)) / 1000
- -- interruptID = select(8,UnitChannelInfo(thisUnit))
- -- end
- -- if isChecked("AutoBtE") and interruptID ~= nil and combo > 0 and not spread and
- -- ((stunList[interruptID] and castEndTime - GetTime() <= 2 ) or
- -- channelAsapList[interruptID] or
- -- channelLateList[interruptID] and castEndTime - GetTime() <= 2)
- -- then
- -- if cast.betweenTheEyes(thisUnit) then print("bte stun on"..spellname); return true end
- -- end
- -- if isChecked("AutoGouge") and interruptID ~= nil and getFacing(thisUnit,"player") and
- -- ((stunList[interruptID] and castEndTime - GetTime() <= 2 ) or
- -- channelAsapList[interruptID] or
- -- channelLateList[interruptID] and castEndTime - GetTime() <= 2)
- -- then
- -- if cast.gouge(thisUnit) then print("gouge on"..spellname) return true end
- -- end
- -- if isChecked("AutoBlind") and interruptID ~= nil and
- -- ((stunList[interruptID] and castEndTime - GetTime() <= 2 ) or
- -- channelAsapList[interruptID] or
- -- (channelLateList[interruptID] and castEndTime - GetTime() <= 2)) then
- -- if cast.blind(thisUnit) then print("blind on "..spellname) return true end
- -- end
- -- end
- -- end
- end
- end
- --`````````````````````````````````````````````````STARTING SHIT```````````````````````````````````````````````
- -- if not cast.current.focusedAzeriteBeam() then
- -- profileStop = false
- -- elseif cast.current.focusedAzeriteBeam() then
- -- return true
- -- end
- ---```````````````````````````````````````````````````Essences```````````````````````````````````````````````````````````
- ---``````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
- -- if select(8,UnitChannelInfo("player")) == 295258 then
- -- return true
- -- end
- -- if UnitCastingInfo("player") then return true end
- -- print(UnitCastingInfo("player"))
- if forceambush and stealthingAll then
- if cast.ambush("target") then forceambush = false; return true end
- end
- if isChecked("RotateBeam") and (select(8, UnitChannelInfo("player")) == 295258 or select(9, UnitCastingInfo("player")) == 295258) then
- IrisBest()
- end
- if UnitChannelInfo("player") or UnitCastingInfo("player") then return true end
- -- if #enemyTable5 > 0 then
- -- if isChecked("Arcane Torrent Dispel Count") then
- -- local torrentUnit = 0
- -- for i=1, #enemyTable5 do
- -- local thisUnit = enemyTable5[i].unit
- -- if canDispel(thisUnit, select(7, GetSpellInfo(GetSpellInfo(69179)))) then
- -- torrentUnit = torrentUnit + 1
- -- if torrentUnit >= getOptionValue("Arcane Torrent Dispel Count") then
- -- if castSpell("player",racial,false,false,false) then return true end
- -- break
- -- end
- -- end
- -- end
- -- end
- -- if isChecked("Dispell from List") then
- -- for i=1, #enemyTable5 do
- -- local thisUnit = enemyTable5[i].unit
- -- local thisID = enemyTable5[i].id
- -- for k,v in pairs(dispellList) do
- -- if thisID == k then
- -- if UnitBuffID(thisUnit, v) then
- -- if castSpell("player",racial,false,false,false) then return true end
- -- break
- -- end
- -- end
- -- end
- -- end
- -- end
- -- end
- if actionList_PreCombat() then return true end
- -- print(GetItemInfoInstant(GetInventoryItemLink("player",13)))
- if isChecked("|cffFFBB00Encounter Logic") then
- if MythicStuff() then return true end
- end
- if mode.stun == 1 then
- if actionList_CC() then return true end
- end
- -- print(UnitThreatSituation("player"))
- if (inCombat and profileStop == true) or not inCombat or pause() or (IsMounted() or IsFlying()) or mode.rotation == 2 then
- return true
- else
- -- if not cast.able.detection('player') then return true end
- if isChecked("Coral Abuse") then
- coralCheck()
- end
- if forceuse13 then
- useItem(13)
- local itemLink = GetInventoryItemLink("player",13)
- local itemid = select(3, strfind(itemLink, "item:(%d+)"))
- local startTime, duration, enable = GetItemCooldown(itemid)
- if duration > 2 then
- forceuse13 = false
- return
- end
- return true
- end
- if forceuse14 then
- useItem(14)
- local itemLink = GetInventoryItemLink("player",14)
- local itemid = select(3, strfind(itemLink, "item:(%d+)"))
- local startTime, duration, enable = GetItemCooldown(itemid)
- if duration > 2 then
- forceuse13 = false
- return
- end
- return true
- end
- if #enemyTable5 >= 1 then
- -- Crucible of flame
- if isChecked("AutoCrucible") and essence.theCrucibleOfFlame.active then
- if buff.concentratedFlame.stack() > 0 and buff.concentratedFlame.remain() <= 5 then
- if cast.concentratedFlame("player") then return true end
- else
- if essence.theCrucibleOfFlame.rank < 3 then
- if php <= 60 then
- if cast.concentratedFlame("player") then return true end
- else
- if cast.concentratedFlame(enemyTable5[1].unit) then return true end
- end
- elseif essence.theCrucibleOfFlame.rank == 3 then
- if ttm >= 1 and not buff.bladeFlurry.exists() and not UnitDebuffID("target", 295368) then
- customCast("concentratedFlame", true, 5)
- end
- end
- end
- end
- -- if isChecked("AutoBotE") and essence.bloodOfTheEnemy.active then
- -- if bftargets >= 2 and cd.betweenTheEyes.remain() <= ttm and buff.bladeFlurry.remain() >= cd.betweenTheEyes.remain() and shouldFinish() and buff.rollTheBones.remain >= 5 then
- -- if ttm >= 5 then return true
- -- else
- -- if cast.bloodOfTheEnemy() then return true end
- -- end
- -- end
- -- end
- -- -- actions.essences+=/guardian_of_azeroth
- -- if essence..active
- -- if cast.guardian_of_azeroth("player") then return true end
- -- end
- -- focusedAzeriteBeam
- if isChecked("AutoBeam") then
- if essence.essenceOfTheFocusingIris.active and #enemyTable5 >= 2 then
- if not moving or essence.essenceOfTheFocusingIris.rank >= 3 then
- if cast.focusedAzeriteBeam() then return true end
- end
- end
- end
- -- /purifying_blast,if=spell_targets.blade_flurry>=2|raid_event.adds.in>60
- if essence.purificationProtocol.active and #enemyTable5 >= 2 then
- if cast.purifyingBlast() then return true end
- end
- -- actions.essences+=/the_unbound_force,if=buff.reckless_force.up|buff.reckless_force_counter.stack<10 ????
- if essence.theUnboundForce.active and buff.recklessForce.exists() or buff.recklessForce.stack() < 10 then
- if cast.theUnboundForce() then return true end
- end
- -- actions.essences+=/ripple_in_space
- if essence.purificationProtocol.active and #enemyTable5 >= 2 then
- if cast.purifyingBlast() then return true end
- end
- --???????????????????????????????????????????????????????????????????????
- if essence.worldveinResonance.active then
- if buff.lifeBlood.stack() <= 3 then
- if cast.worldveinResonance("player") then return true end
- end
- end
- --actions.essences+=/memory_of_lucid_dreams,if=energy<45
- if essence.purificationProtocol.active and #enemyTable5 >= 2 then
- if cast.purifyingBlast() then return true end
- end
- if essence.memoryOfLucidDreams.active and power <= 45 then
- if cast.memoryOfLucidDreams() then return true end
- end
- end
- --print(rtbReroll())
- --print(br.player.power.energy.ttm())
- -- if cast.sinisterStrike() then return end
- -- print(getDistance("target"))
- --print(inRange(193315,"target"))
- -- print(IsSpellInRange(193315,"target"))
- --if castSpell("target",193315,true,false,false,true,false,true,false,false) then return end
- --RunMacroText("/cast Коварный удар")
- --if actionList_Extras() then return end
- if actionList_Defensive() then return true end
- --ty mr fisker
- if tricksUnit ~= nil and UnitThreatSituation("player") and UnitThreatSituation("player") >= 2 and validTarget and targetDistance < 5 then
- cast.tricksOfTheTrade(tricksUnit)
- end
- -- if isValidUnit("target") and isChecked("Opener") then
- -- if actionList_Opener() then return end
- -- end
- -- if mode.mfd == 3 and rtuseon ~= nil then
- -- if UnitIsDeadOrGhost(rtuseon) then rtuseon = nil return true end
- -- print("trying dispatch")
- -- if cast.dispatch(rtuseon) then
- -- print("rt on mfd")
- -- rtuseon = nil
- -- return true end
- -- end
- if mode.bladeflurry == 1 and not buff.bladeFlurry.exists() and (((buff.rollTheBones.remain >= 5 and charges.bladeFlurry.frac() >= 1.5) or isChecked("FastBladeFlurry")) and bftargets >= 2) then
- if cast.bladeFlurry("player") then return true end
- end
- if not isSafeToAttack("target") or isLongTimeCCed("target") then
- RunMacroText("/stopattack")
- end
- if not IsCurrentSpell(6603) and inCombat and not stealth and validTarget and targetDistance <= 5 and getFacing("player", "target") then
- StartAttack("target")
- end
- if mode.stun == 1 then
- if actionList_CC() then return true end
- end
- if talent.markedForDeath and mode.mfd == 3 and combo < comboMax and cd.markedForDeath.remain() <= 0 then
- if mfdtarget ~= nil and not UnitIsDeadOrGhost(mfdtarget) then
- if cast.markedForDeath(mfdtarget) then end
- end
- end
- if actionList_Interrupts() then end
- if isChecked("Vanish") and cd.vanish.remain() <= 0.2 and targetDistance <= 5 and (not solo or isDummy("target")) then
- local function ambushCondition()
- if comboDeficit >= 2 + (buff.broadside.exists() and 1 or 0) and power > 60 and not buff.skullAndCrossbones.exists("player") and not buff.wits.exists("player") then
- return true
- end
- return false
- end
- if ambushCondition() then
- if gcd > 0.1 then return true end
- forceambush = true
- if CastSpellByID(1856) then end
- end
- end
- if (mode.special == 1 or mode.tierseven == 1) and #enemyTable5 >= 1 then
- if actionList_Cooldowns() then return true end
- end
- -- if stealthingAll then
- -- if actionList_Stealth() then return end
- -- end
- if talent.markedForDeath and mode.mfd == 1 and cd.markedForDeath.remain() <= 0.2 then
- if comboDeficit >= comboMax - 1 then
- CastSpellByID(137619,"target")
- return true
- end
- end
- if talent.markedForDeath and mode.mfd == 2 and cd.markedForDeath.remain() <= 0.2 then
- local thisUnit = enemies.yards20[i]
- if ttd(thisUnit) < comboDeficit then
- if CastSpellByID(137619,thisUnit) then return true end
- end
- end
- if shouldFinish() then
- if actionList_Finishers() then return true end
- end
- if actionList_Build() then return end
- if isChecked("Pistol Shot out of range") and #enemyTable5 == 0 and not stealthingAll and power/powerMax*100 >= getOptionValue("Pistol Shot out of range") and (comboDeficit >= 1 or ttm <= 1.2) then
- customCast("pistolShot", true, 20)
- end
- if mode.special == 1 and isChecked("Racial") then
- if race == "BloodElf" and powerDeficit >= (15 + powerRegen) then
- if cast.racial("player") then return true end
- elseif race == "Nightborne" then
- if cast.racial("player") then return true end
- elseif race == "LightforgedDraenei" then
- if cast.racial("target","ground") then return true end
- end
- end
- end
- if isChecked("Debug Timers") then
- if profile.totalIterations == nil then profile.totalIterations = 0 end
- if profile.elapsedTime == nil then profile.elapsedTime = 0 end
- profile.currentTime = debugprofilestop()-startTime
- profile.totalIterations = profile.totalIterations + 1
- profile.elapsedTime = profile.elapsedTime + debugprofilestop()-startTime
- profile.averageTime = profile.elapsedTime / profile.totalIterations
- end
- end
- local id = 260
- if br.rotations[id] == nil then br.rotations[id] = {} end
- tinsert(br.rotations[id],{
- name = rotationName,
- toggles = createToggles,
- options = createOptions,
- run = runRotation,
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement