Advertisement
Guest User

Untitled

a guest
May 29th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.83 KB | None | 0 0
  1. local rotationName = "Vilt"
  2.  
  3. ---------------
  4. --- Toggles ---
  5. ---------------
  6. local function createToggles()
  7. -- Rotation Button
  8. RotationModes = {
  9. [1] = { mode = "On", value = 1 , overlay = "DPS Rotation Enabled", tip = "Enable DPS Rotation", highlight = 1, icon = br.player.spell.runThrough},
  10. [2] = { mode = "Off", value = 2 , overlay = "DPS Rotation Disabled", tip = "Disable DPS Rotation", highlight = 0, icon = br.player.spell.crimsonVial}
  11. };
  12. CreateButton("Rotation",1,0)
  13. -- Cooldown Button
  14. CooldownModes = {
  15. [1] = { mode = "Auto", value = 1 , overlay = "Cooldowns Automated", tip = "Automatic Cooldowns - Boss Detection.", highlight = 1, icon = br.player.spell.adrenalineRush},
  16. [2] = { mode = "On", value = 2 , overlay = "Cooldowns Enabled", tip = "Cooldowns used regardless of target.", highlight = 0, icon = br.player.spell.adrenalineRush},
  17. [3] = { mode = "Off", value = 3 , overlay = "Cooldowns Disabled", tip = "No Cooldowns will be used.", highlight = 0, icon = br.player.spell.adrenalineRush}
  18. };
  19. CreateButton("Cooldown",2,0)
  20. -- Blade Flurry Button
  21. BladeFlurryModes = {
  22. [1] = { mode = "On", value = 1 , overlay = "Blade Flurry Enabled", tip = "Rotation will use Blade Flurry.", highlight = 1, icon = br.player.spell.bladeFlurry},
  23. [2] = { mode = "Off", value = 2 , overlay = "Blade Flurry Disabled", tip = "Rotation will not use Blade Flurry.", highlight = 0, icon = br.player.spell.bladeFlurry}
  24. };
  25. CreateButton("BladeFlurry",3,0)
  26. -- Defensive Button
  27. DefensiveModes = {
  28. [1] = { mode = "On", value = 1 , overlay = "Defensive Enabled", tip = "Includes Defensive Cooldowns.", highlight = 1, icon = br.player.spell.riposte},
  29. [2] = { mode = "Off", value = 2 , overlay = "Defensive Disabled", tip = "No Defensives will be used.", highlight = 0, icon = br.player.spell.riposte}
  30. };
  31. CreateButton("Defensive",4,0)
  32. -- Interrupt Button
  33. InterruptModes = {
  34. [1] = { mode = "On", value = 1 , overlay = "Interrupts Enabled", tip = "Includes Basic Interrupts.", highlight = 1, icon = br.player.spell.kick},
  35. [2] = { mode = "Off", value = 2 , overlay = "Interrupts Disabled", tip = "No Interrupts will be used.", highlight = 0, icon = br.player.spell.kick}
  36. };
  37. CreateButton("Interrupt",5,0)
  38. MFDModes = {
  39. [1] = { mode = "On", value = 1 , overlay = "st", tip = "Includes Basic Interrupts.", highlight = 1, icon = br.player.spell.markedForDeath},
  40. [2] = { mode = "Off", value = 2 , overlay = "reset", tip = "No Interrupts will be used.", highlight = 0, icon = br.player.spell.markedForDeath}
  41. };
  42. CreateButton("MFD",6,0)
  43. RerollTBModes = {
  44. [1] = { mode = "On", value = 1 , overlay = "RerollTB Enabled", tip = "Rotation will Roll for TB.", highlight = 1, icon = br.player.spell.rollTheBones },
  45. [2] = { mode = "Off", value = 2 , overlay = "RerollTB Disabled", tip = "Rotation will Roll for TB.", highlight = 0, icon = br.player.spell.rollTheBones }
  46. };
  47. CreateButton("RerollTB",7,0)
  48. end
  49.  
  50. ---------------
  51. --- OPTIONS ---
  52. ---------------
  53. local function createOptions()
  54. local optionTable
  55.  
  56. local function rotationOptions()
  57. -----------------------
  58. --- GENERAL OPTIONS ---
  59. -----------------------
  60. section = br.ui:createSection(br.ui.window.profile, "General")
  61. -- Opening Attack
  62. br.ui:createCheckbox(section, "Opener")
  63. -- mfd prepull
  64. br.ui:createCheckbox(section, "Marked For Death - Precombat")
  65. -- RTb Prepull
  66. br.ui:createCheckbox(section, "RTB Prepull")
  67. -- Stealth
  68. br.ui:createDropdown(section, "Stealth", {"|cff00FF00Always", "|cffFF000020Yards"}, 2, "Stealthing method.")
  69. -- Artifact
  70. br.ui:createCheckbox(section, "Artifact")
  71. br.ui:checkSectionState(section)
  72. ------------------------
  73. --- OFFENSIVE OPTIONS ---
  74. ------------------------
  75. section = br.ui:createSection(br.ui.window.profile, "Offensive")
  76. -- Trinkets
  77. br.ui:createCheckbox(section, "Trinkets")
  78. -- Agi Pot
  79. br.ui:createCheckbox(section, "Agi-Pot")
  80. if hasEquiped(137031) then
  81. -- Sprint with Boots
  82. br.ui:createCheckbox(section, "Legendary Boots Logic")
  83. end
  84. -- Marked For Death
  85. br.ui:createDropdown(section, "Marked For Death", {"|cff00FF00Target", "|cffFFDD00Lowest"}, 1)
  86. -- Vanish
  87. br.ui:createCheckbox(section, "Vanish")
  88. -- Racial
  89. br.ui:createCheckbox(section, "Racial")
  90. -- Pistol Shot OOR
  91. 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.")
  92. -- CB
  93. br.ui:createSpinner(section, "Cannonball Barrage", 3, 0, 10, 1)
  94. -- KS
  95. br.ui:createCheckbox(section, "Killing Spree")
  96. -- RTB
  97. br.ui:createDropdown(section, "RTB", {"|cff00FF003+/TB (Default)", "|cffFFDD002+/TB/SiW CDs", "|cffFF00001+"}, 1)
  98. -- BF
  99. br.ui:createSpinnerWithout(section, "Blade Flurry Timer", 3, 0, 5, 1)
  100. br.ui:checkSectionState(section)
  101. -------------------------
  102. --- DEFENSIVE OPTIONS ---
  103. -------------------------
  104. section = br.ui:createSection(br.ui.window.profile, "Defensive")
  105. -- Healthstone
  106. br.ui:createSpinner(section, "Healing Potion/Healthstone", 60, 0, 100, 5, "|cffFFBB00Health Percentage to use at.")
  107. -- Crimson Vial
  108. br.ui:createSpinner(section, "Crimson Vial", 50, 0, 100, 5, "|cffFFBB00Health Percentage to use at.")
  109. -- Feint
  110. br.ui:createSpinner(section, "Feint", 75, 0, 100, 5, "|cffFFBB00Health Percentage to use at.")
  111. -- Riposte
  112. br.ui:createSpinner(section, "Riposte", 50, 0, 100, 5, "|cffFFBB00Health Percentage to use at.")
  113. -- Cloak with KS
  114. br.ui:createCheckbox(section, "Cloak Killing Spree")
  115. br.ui:checkSectionState(section)
  116. -------------------------
  117. --- INTERRUPT OPTIONS ---
  118. -------------------------
  119. section = br.ui:createSection(br.ui.window.profile, "Interrupts")
  120. -- Kick
  121. br.ui:createCheckbox(section, "Kick")
  122. -- Gouge
  123. br.ui:createCheckbox(section, "Gouge")
  124. -- Blind
  125. br.ui:createCheckbox(section, "Blind")
  126. -- Parley
  127. br.ui:createCheckbox(section, "Parley")
  128. -- Between the Eyes
  129. br.ui:createCheckbox(section, "Between the Eyes")
  130. -- Interrupt Percentage
  131. br.ui:createSpinner(section, "Interrupt At", 0, 0, 95, 5, "|cffFFBB00Cast Percentage to use at.")
  132. br.ui:checkSectionState(section)
  133. ----------------------
  134. --- TOGGLE OPTIONS ---
  135. ----------------------
  136. section = br.ui:createSection(br.ui.window.profile, "Toggle Keys")
  137. -- Single/Multi Toggle
  138. br.ui:createDropdown(section, "Rotation Mode", br.dropOptions.Toggle, 4)
  139. --Cooldown Key Toggle
  140. br.ui:createDropdown(section, "Cooldown Mode", br.dropOptions.Toggle, 3)
  141. --Defensive Key Toggle
  142. br.ui:createDropdown(section, "Defensive Mode", br.dropOptions.Toggle, 6)
  143. -- Interrupts Key Toggle
  144. br.ui:createDropdown(section, "Interrupt Mode", br.dropOptions.Toggle, 6)
  145. -- Cleave Toggle
  146. br.ui:createDropdown(section, "BladeFlurry Mode", br.dropOptions.Toggle, 6)
  147. -- Pause Toggle
  148. br.ui:createDropdown(section, "Pause Mode", br.dropOptions.Toggle, 6)
  149. br.ui:checkSectionState(section)
  150. end
  151. optionTable = {{
  152. [1] = "Rotation Options",
  153. [2] = rotationOptions,
  154. }}
  155. return optionTable
  156. end
  157.  
  158.  
  159.  
  160. ----------------
  161. --- ROTATION ---
  162. ----------------
  163. local function runRotation()
  164. --Print("Running: "..rotationName)
  165.  
  166. ---------------
  167. --- Toggles ---
  168. ---------------
  169. UpdateToggle("Rotation",0.25)
  170. UpdateToggle("Cooldown",0.25)
  171. UpdateToggle("Defensive",0.25)
  172. UpdateToggle("Interrupt",0.25)
  173. UpdateToggle("BladeFlurry",0.25)
  174. br.player.mode.cleave = br.data.settings[br.selectedSpec].toggles["BladeFlurry"]
  175. br.player.mode.mfd = br.data.settings[br.selectedSpec].toggles["MFD"]
  176. UpdateToggle("RerollTB",0.25)
  177. br.player.mode.RerollTB = br.data.settings[br.selectedSpec].toggles["RerollTB"]
  178.  
  179.  
  180. --------------
  181. --- Locals ---
  182. --------------
  183. if profileStop == nil then profileStop = false end
  184. local attacktar = UnitCanAttack("target","player")
  185. local buff = br.player.buff
  186. local cast = br.player.cast
  187. local cd = br.player.cd
  188. local combo, comboDeficit, comboMax = br.player.power.amount.comboPoints, br.player.power.comboPoints.deficit, br.player.power.comboPoints.max
  189. local cTime = getCombatTime()
  190. local debuff = br.player.debuff
  191. local enemies = enemies or {}
  192. local gcd = br.player.gcd
  193. local hastar = GetObjectExists("target")
  194. local healPot = getHealthPot()
  195. local inCombat = isInCombat("player")
  196. local lastSpell = lastSpellCast
  197. local level = br.player.level
  198. local mode = br.player.mode
  199. local php = br.player.health
  200. local power, powerDeficit, powerRegen = br.player.power.amount.energy, br.player.power.energy.deficit, br.player.power.regen
  201. local race = br.player.race
  202. local racial = br.player.getRacial()
  203. local solo = #br.friend < 2
  204. local spell = br.player.spell
  205. local stealth = br.player.buff.stealth.exists()
  206. local stealthingAll = br.player.buff.stealth.exists() or br.player.buff.vanish.exists() or br.player.buff.shadowmeld.exists()
  207. local stealthingRogue = br.player.buff.stealth.exists() or br.player.buff.vanish.exists()
  208. local stealthingMantle = br.player.buff.stealth.exists() or br.player.buff.vanish.exists()
  209. local talent = br.player.talent
  210. local ttd = getTTD
  211. local ttm = br.player.power.ttm
  212. local units = units or {}
  213. local lootDelay = getOptionValue("LootDelay")
  214.  
  215. units.dyn5 = br.player.units(5)
  216. units.dyn30 = br.player.units(30)
  217. enemies.yards5 = br.player.enemies(5)
  218. enemies.yards8 = br.player.enemies(8)
  219. enemies.yards20 = br.player.enemies(20)
  220. enemies.yards30 = br.player.enemies(30)
  221.  
  222. if talent.acrobaticStikes then rangeMod = 3 else rangeMod = 0 end
  223. if leftCombat == nil then leftCombat = GetTime() end
  224. if vanishTime == nil then vanishTime = GetTime() end
  225.  
  226. if buff.rollTheBones == nil then buff.rollTheBones = {} end
  227. buff.rollTheBones.count = 0
  228. buff.rollTheBones.duration = 0
  229. buff.rollTheBones.remain = 0
  230. for k,v in pairs(spell.buffs.rollTheBones) do
  231. if UnitBuffID("player",v) ~= nil then
  232. buff.rollTheBones.count = buff.rollTheBones.count + 1
  233. buff.rollTheBones.duration = getBuffDuration("player",v)
  234. buff.rollTheBones.remain = getBuffRemain("player",v)
  235. end
  236. end
  237.  
  238. local function rtbReroll()
  239. if getOptionValue("RTB") == 1 then
  240. if not talent.sliceAndDice and (buff.rollTheBones.count >= 3 or buff.trueBearing.exists()) then
  241. return false
  242. else
  243. return true
  244. end
  245.  
  246. elseif getOptionValue("RTB") == 2 then
  247. if not talent.sliceAndDice and (buff.rollTheBones.count >= 2 or buff.trueBearing.exists() or (buff.sharkInfestedWaters.exists() and (buff.adrenalineRush.exists() or debuff.curseOfTheDreadblades.exists("player")))) then
  248. return false
  249. else
  250. return true
  251. end
  252.  
  253. elseif getOptionValue("RTB") == 3 then
  254. if not talent.sliceAndDice and buff.rollTheBones.count >= 1 then
  255. return false
  256. else
  257. return true
  258. end
  259. end
  260. end
  261.  
  262. local function ssUsableNoReroll()
  263. if combo < 5 + (talent.deeperStrategem and 1 or 0) - ((buff.broadsides.exists() or buff.jollyRoger.exists()) and 1 or 0) - ((talent.alacrity and buff.alacrity.stack() <= 4) and 1 or 0) then
  264. return true
  265. else
  266. return false
  267. end
  268. end
  269.  
  270. local function ssUsable()
  271. if ((talent.anticipation and combo < 4) or (not talent.anticipation and ((rtbReroll() and combo < 4 + (talent.deeperStrategem and 1 or 0)) or (not rtbReroll() and ssUsableNoReroll())))) then
  272. return true
  273. else
  274. return false
  275. end
  276. end
  277.  
  278. --------------------
  279. --- Action Lists ---
  280. --------------------
  281. --[[ Action List - Extras
  282. local function actionList_Extras()
  283. end -- End Action List - Extras]]
  284. -- Action List - DefensiveModes
  285. local function actionList_Defensive()
  286. if useDefensive() and not stealth then
  287. -- Health Pot/Healthstone
  288. if isChecked("Healing Potion/Healthstone") and php <= getOptionValue("Healing Potion/Healthstone")
  289. and inCombat and (hasHealthPot() or hasItem(5512))
  290. then
  291. if canUse(5512) then
  292. useItem(5512)
  293. elseif canUse(healPot) then
  294. useItem(healPot)
  295. end
  296. end
  297. -- Crimson Vial
  298. if isChecked("Crimson Vial") and php < getOptionValue("Crimson Vial") then
  299. if cast.crimsonVial() then return end
  300. end
  301. -- Feint
  302. if isChecked("Feint") and php <= getOptionValue("Feint") and inCombat and not buff.feint then
  303. if cast.feint() then return end
  304. end
  305. -- Riposte
  306. if isChecked("Riposte") and php <= getOptionValue("Riposte") and inCombat then
  307. if cast.riposte() then return end
  308. end
  309. end
  310. end -- End Action List - Defensive
  311. -- Action List - Interrupts
  312. local function actionList_Interrupts()
  313. if useInterrupts() and not stealth then
  314. for i = 1, #enemies.yards20 do
  315. local thisUnit = enemies.yards20[i]
  316. local distance = getDistance(thisUnit)
  317. if canInterrupt(thisUnit,getOptionValue("Interrupt At")) and hasThreat(thisUnit) then
  318. if distance < 5 then
  319. -- Kick
  320. -- kick
  321. if isChecked("Kick") then
  322. if cast.kick(thisUnit) then return end
  323. end
  324. if cd.kick ~= 0 then
  325. -- Gouge
  326. if isChecked("Gouge") and getFacing(thisUnit,"player") then
  327. if cast.gouge(thisUnit) then return end
  328. end
  329. end
  330. end
  331. if (cd.kick ~= 0 and cd.gouge ~= 0) or (distance >= 5 and distance < 15) then
  332. -- Blind
  333. if isChecked("Blind") then
  334. if cast.blind(thisUnit) then return end
  335. end
  336. if isChecked("Parley") then
  337. if cast.parley(thisUnit) then return end
  338. end
  339. end
  340. -- Between the Eyes
  341. if ((cd.kick ~= 0 and cd.gouge ~= 0) or distance >= 5) and (cd.blind ~= 0 or level < 38 or distance >= 15) then
  342. if isChecked("Between the Eyes") then
  343. if cast.betweenTheEyes(thisUnit) then return end
  344. end
  345. end
  346. end
  347. end
  348. end -- End Interrupt and No Stealth Check
  349. end -- End Action List - Interrupts
  350. -- Action List - Blade Flurry
  351. local function actionList_BladeFlurry()
  352. -- Blade Flurry
  353. if buff.bladeFlurry.exists() then
  354. if #getEnemies("player",7) < 2 and buff.bladeFlurry.exists() then
  355. -- if cast.bladeFlurry() then return end
  356. if not delayBladeFlurry or delayBladeFlurry == 0 then
  357. delayBladeFlurry = GetTime() + getOptionValue("Blade Flurry Timer")
  358. elseif delayBladeFlurry < GetTime() then
  359. CastSpellByName(GetSpellInfo(spell.bladeFlurry),"player");
  360. end
  361. end
  362. if ((#getEnemies("player",7) >= 2 and buff.bladeFlurry.exists()) or (#getEnemies("player",7) < 2 and not buff.bladeFlurry.exists())) and delayBladeFlurry then
  363. delayBladeFlurry = 0
  364. end
  365. if hasEquiped(141321) and cd.bladeFlurry == 0 and #getEnemies("player",7) >= 2 then
  366. CastSpellByName(GetSpellInfo(spell.bladeFlurry),"player");
  367. end
  368. end
  369. -- blade_flurry,if=spell_targets.blade_flurry>=2&!buff.blade_flurry.up
  370. if #getEnemies("player",7) >= 2 and not buff.bladeFlurry.exists() then
  371. CastSpellByName(GetSpellInfo(spell.bladeFlurry),"player");
  372. end
  373. end
  374. -- Action List - Cooldowns
  375. local function actionList_Cooldowns()
  376. -- Trinkets
  377. if isChecked("Trinkets") then
  378. if hasBloodLust() or ttd("target") <= 20 or comboDeficit <= 2 then
  379. if canUse(13) then
  380. useItem(13)
  381. end
  382. if canUse(14) then
  383. useItem(14)
  384. end
  385. end
  386. end
  387. -- Pots
  388. if isChecked("Agi-Pot") then
  389. if ttd("target") <= 25 or buff.adrenalineRush.exists() or hasBloodLust() then
  390. if canUse(127844) and inRaid then
  391. useItem(127844)
  392. end
  393. else
  394. if canUse(142117) and inRaid then
  395. useItem(142117)
  396. end
  397. end
  398. end
  399. -- Non-NE Racial
  400. --blood_fury
  401. --berserking
  402. --arcane_torrent,if=energy.deficit>40
  403. if isChecked("Racial") and (race == "Orc" or race == "Troll" or (race == "BloodElf" and powerDeficit > 40)) then
  404. if castSpell("player",racial,false,false,false) then return end
  405. end
  406. -- Cannonball Barrage
  407. -- cannonball_barrage,if=spell_targets.cannonball_barrage>=1
  408. if #enemies.yards8 >= getOptionValue("Cannonball Barrage") and isChecked("Cannonball Barrage") then
  409. if cast.cannonballBarrage("best",false,#enemies.yards8,8) then return end
  410. end
  411. -- Adrenaline Rush
  412. -- adrenaline_rush,if=!buff.adrenaline_rush.up&energy.deficit>0
  413. if not buff.adrenalineRush.exists() and powerDeficit > 0 and ttm >= cd.global then
  414. if cast.adrenalineRush() then return end
  415. end
  416. -- Sprint
  417. -- sprint,if=equipped.thraxis_tricksy_treads&!variable.ss_useable
  418. if isChecked("Legendary Boots Logic") and hasEquiped(137031) and not ssUsable() then
  419. if cast.sprint() then return end
  420. -- darkflight,if=equipped.thraxis_tricksy_treads&!variable.ss_useable&buff.sprint.down
  421. if race == "Worgen" and not buff.sprint.exists() then
  422. if castSpell("player",racial,false,false,false) then return end
  423. end
  424. end
  425. -- Curse of the Dreadblades
  426. -- curse_of_the_dreadblades,if=combo_points.deficit>=4&(!talent.ghostly_strike.enabled|debuff.ghostly_strike.up)
  427. if isChecked("Artifact") and (cd.saberSlash == 0 or cd.pistolShot == 0) then
  428. if comboDeficit >= 4 and (power >= 48 or buff.opportunity.exists()) and (not talent.ghostlyStrike or debuff.ghostlyStrike.exists(units.dyn5)) then
  429. if cast.curseOfTheDreadblades() then return end
  430. end
  431. end
  432. end -- End Action List - Cooldowns
  433. -- Action List - PreCombat
  434. local function actionList_PreCombat()
  435. -- Stealth
  436. if not inCombat and not stealth then
  437. if isChecked("Stealth") and (not IsResting() or isDummy("target")) then
  438. if getOptionValue("Stealth") == 1 then
  439. if cast.stealth("player") then return end
  440. end
  441. if #enemies.yards20 > 0 and getOptionValue("Stealth") == 2 and not IsResting() and GetTime()-leftCombat > lootDelay then
  442. for i = 1, #enemies.yards20 do
  443. local thisUnit = enemies.yards20[i]
  444. if UnitIsEnemy(thisUnit,"player") or isDummy("target") then
  445. if cast.stealth("player") then return end
  446. end
  447. end
  448. end
  449. end
  450. end
  451. -- Marked for Death
  452. -- marked_for_death
  453. if not inCombat and isChecked("Marked For Death - Precombat") and getDistance("target") < 15 and isValidUnit("target") then
  454. if cast.markedForDeath("target") then return end
  455. end
  456. -- Roll The Bones
  457. -- roll_the_bones,if=!talent.slice_and_dice.enabled
  458. if not inCombat and isChecked("RTB Prepull") and not talent.sliceAndDice and buff.rollTheBones.count == 0 and isValidUnit("target") and getDistance("target") <= 10 then
  459. if cast.rollTheBones() then return end
  460. end
  461. end -- End Action List - PreCombat
  462. -- Action List - Finishers
  463. local function actionList_Finishers()
  464. -- Between the Eyes
  465. -- between_the_eyes,if=(mantle_duration>=gcd.remains+0.2&!equipped.thraxis_tricksy_treads)|(equipped.greenskins_waterlogged_wristcuffs&!buff.greenskins_waterlogged_wristcuffs.up)
  466. if (mantleDuration() >= cd.global + 0.2 and not hasEquiped(137031)) or (hasEquiped(137099) and not buff.greenskinsWaterloggedWristcuffs.exists()) then
  467. if cast.betweenTheEyes() then return end
  468. end
  469. -- Run Through
  470. -- run_through,if=!talent.death_from_above.enabled|energy.time_to_max<cooldown.death_from_above.remain()s+3.5
  471. if not talent.deathFromAbove or ttm < cd.deathFromAbove + 3.5 then
  472. if cast.runThrough() then return end
  473. end
  474. end -- End Action List - Finishers
  475. -- Action List - Build
  476. local function actionList_Build()
  477. -- Ghostly Strike
  478. -- ghostly_strike,if=combo_points.deficit>=1+buff.broadsides.up&!buff.curse_of_the_dreadblades.up&(debuff.ghostly_strike.remains<debuff.ghostly_strike.duration*0.3|(cooldown.curse_of_the_dreadblades.remains<3&debuff.ghostly_strike.remains<14))&(combo_points>=3|(variable.rtb_reroll&time>=10))
  479. if comboDeficit >= 1 + (buff.broadsides.exists() and 1 or 0) and not debuff.curseOfTheDreadblades.exists("player") and (debuff.ghostlyStrike.refresh("target") or (useCDs() and isChecked("Artifact") and cd.curseOfTheDreadblades < 3 and debuff.ghostlyStrike.remain("target") < 14)) and
  480. (combo >= 3 or (rtbReroll() and cTime >= 10)) then
  481. if cast.ghostlyStrike("target") then return end
  482. end
  483. -- Pistol Shot
  484. -- pistol_shot,if=combo_points.deficit>=1+buff.broadsides.up&buff.opportunity.up&(energy.time_to_max>2-talent.quick_draw.enabled|(buff.blunderbuss.up&buff.greenskins_waterlogged_wristcuffs.up))
  485. if comboDeficit >= 1 + (buff.broadsides.exists() and 1 or 0) and buff.opportunity.exists() and ((ttm > 2 - (talent.quickDraw and 1 or 0)) or (buff.adrenalineRush.exists() and ttm > 1.5) or (IsUsableSpell(GetSpellInfo(202895)) and buff.greenskinsWaterloggedWristcuffs.exists())) then
  486. if cast.pistolShot("target") then return end
  487. end
  488. -- Saber Slash
  489. -- saber_slash
  490. if ssUsable() then
  491. if cast.saberSlash() then return end
  492. end
  493. end -- End Action List - Build
  494. -- Action List - Opener
  495. local function actionList_Opener()
  496. if isValidUnit("target") then
  497. -- Opener
  498. if not inCombat then
  499. if combo >= 5 then
  500. if cast.runThrough("target") then return end
  501. elseif stealthingAll then
  502. if cast.ambush("target") then return end
  503. else
  504. if cast.saberSlash("target") then return end
  505. end
  506. end
  507. -- StartAttack
  508. if getDistance("target") <= 5 and not stealthingAll and not StartAttack() then
  509. StartAttack()
  510. end
  511. end
  512. end
  513. -- Action List - Stealth
  514. local function actionList_Stealth()
  515. --ambush_condition,value=combo_points.deficit>=2+2*(talent.ghostly_strike.enabled&!debuff.ghostly_strike.up)+buff.broadsides.up&energy>60&!buff.jolly_roger.up&!buff.hidden_blade.up&!buff.curse_of_the_dreadblades.up
  516. local function ambushCondition()
  517. if combo >= 2 + 2 * ((talent.ghostlyStrike and not debuff.ghostlyStrike.exists("target")) and 1 or 0) + (buff.broadsides.exists() and 1 or 0) and
  518. power > 60 and not buff.jollyRoger.exists() and not buff.hiddenBlade.exists() and not debuff.curseOfTheDreadblades.exists("player") then
  519. return true
  520. else
  521. return false
  522. end
  523. end
  524. -- Ambush
  525. --ambush,if=variable.ambush_condition
  526. if stealthingAll and combo <= 4 then
  527. if cast.ambush() then return end
  528. else
  529. if stealthingAll and combo >= 5 then
  530. if cast.runThrough() then return end
  531. end
  532. -- Vanish
  533. -- vanish,if=variable.ambush_condition|(equipped.mantle_of_the_master_assassin&mantle_duration=0&!variable.rtb_reroll&!variable.ss_useable)
  534. if useCDs() and isChecked("Vanish") and GetTime() >= vanishTime + cd.global and (ambushCondition() or (hasEquiped(144236) and mantleDuration() == 0 and not rtbReroll() and not ssUsable())) and isValidUnit("target") and getDistance("target") <= 5 then
  535. if cast.vanish() then vanishTime = GetTime(); return end
  536. end
  537. -- Shadowmeld
  538. -- shadowmeld,if=variable.ambush_condition
  539. if useCDs() and isChecked("Racial") and GetTime() >= vanishTime + cd.global and cd.global <= getLatency() and race == "NightElf" and ambushCondition() and isValidUnit("target") and getDistance("target") <= 5 and not isMoving("player") then
  540. if cast.shadowmeld() then vanishTime = GetTime(); cast.ambush(); return end
  541. end
  542. end
  543. end
  544. ---------------------
  545. --- Begin Profile ---
  546. ---------------------
  547. --Profile Stop | Pause
  548. if not inCombat and not hastar and profileStop==true then
  549. profileStop = false
  550. elseif (inCombat and profileStop == true) or pause() or (IsMounted() or IsFlying()) or mode.rotation == 2 then
  551. return true
  552. else
  553. -----------------------
  554. --- Extras Rotation ---
  555. -----------------------
  556. --if actionList_Extras() then return end
  557. --------------------------
  558. --- Defensive Rotation ---
  559. --------------------------
  560. if actionList_Defensive() then return end
  561. ------------------------------
  562. --- Out of Combat Rotation ---
  563. ------------------------------
  564. if actionList_PreCombat() then return end
  565. ----------------------------
  566. --- Out of Combat Opener ---
  567. ----------------------------
  568. if actionList_Opener() then return end
  569. --------------------------------
  570. --- In Combat - Blade Flurry ---
  571. --------------------------------
  572. if actionList_BladeFlurry() then return end
  573. --------------------------
  574. --- In Combat Rotation ---
  575. --------------------------
  576. if inCombat and (isValidUnit(units.dyn5) or isValidUnit("target")) then
  577. if not stealthingAll or level < 5 then
  578. ------------------------------
  579. --- In Combat - Interrupts ---
  580. ------------------------------
  581. if actionList_Interrupts() then return end
  582. -----------------------------
  583. --- In Combat - Cooldowns ---
  584. -----------------------------
  585. if useCDs() and getDistance("target") <= 6 and attacktar then
  586. if actionList_Cooldowns() then return end
  587. end
  588. end
  589. ---------------------------
  590. --- In Combat - Stealth ---
  591. ---------------------------
  592. -- call_action_list,name=stealth,if=stealthed.rogue|cooldown.vanish.up|cooldown.shadowmeld.up
  593. if (stealthingAll or cd.vanish == 0 or cd.shadowmeld == 0) and not solo then
  594. if actionList_Stealth() then return end
  595. end
  596. ----------------------------------
  597. --- In Combat - Begin Rotation ---
  598. ----------------------------------
  599.  
  600. if combo >= 5 and not buff.trueBearing.exists() and mode.RerollTB == 1 then
  601. if cast.rollTheBones() then return end
  602. end
  603. -- if not buff.stealth and not buff.vanish and not buff.shadowmeld and GetTime() > vanishTime + 2 and getDistance(units.dyn5) < 5 then
  604. if not stealthingAll then
  605. -- Marked for Death
  606. if isChecked("Marked For Death") then
  607. if mode.mfd == 1 then
  608. if comboDeficit >= ComboMaxSpend() - 1 then
  609. if cast.markedForDeath("target") then return end
  610. end
  611. elseif mode.mfd == 2 then
  612. for i = 1, #enemies.yards30 do
  613. local thisUnit = enemies.yards30[i]
  614. if comboDeficit >= 6 then comboDeficit = ComboMaxSpend() end
  615. if ttd(thisUnit) > 0 and ttd(thisUnit) <= 100 then
  616. if ttd(thisUnit) < comboDeficit*1.2 then
  617. if cast.markedForDeath(thisUnit) then return end
  618. end
  619. end
  620. end
  621. end
  622. end
  623. -- Death from Above
  624. -- death_from_above,if=energy.time_to_max>2&!variable.ss_useable_noreroll
  625. if ttm > 2 and not ssUsableNoReroll() then
  626. if cast.deathFromAbove() then return end
  627. end
  628. if not ssUsable() then
  629. if talent.sliceAndDice then
  630. -- Slice and Dice
  631. -- slice_and_dice,if=!variable.ss_useable&buff.slice_and_dice.remains<target.time_to_die&buff.slice_and_dice.remains<(1+combo_points)*1.8
  632. if (buff.sliceAndDice.remain() < ttd("target") or not buff.sliceAndDice.exists()) and buff.sliceAndDice.remain() < (1 + combo) * 1.8 then
  633. if cast.sliceAndDice() then return end
  634. end
  635. elseif isChecked("RTB") then
  636. -- Roll the Bones
  637. -- roll_the_bones,if=!variable.ss_useable&(target.time_to_die>20|buff.roll_the_bones.remains<target.time_to_die)&(buff.roll_the_bones.remains<=3|variable.rtb_reroll)
  638. if (ttd("target") > 20 or buff.rollTheBones.remain < ttd("target") or buff.rollTheBones.remain == 0) and (buff.rollTheBones.remain <= 3 or rtbReroll()) then
  639. if cast.rollTheBones() then return end
  640. end
  641. end
  642. end
  643. -- Killing Spree
  644. -- killing_spree,if=energy.time_to_max>5|energy<15
  645. if useCDs() and talent.killingSpree and isChecked("Killing Spree") and (ttm > 5 or power < 15) then
  646. if isChecked("Cloak Killing Spree") and cd.killingSpree == 0 then
  647. if cast.cloakOfShadows() then cast.killingSpree(); return end
  648. end
  649. if cast.killingSpree() then return end
  650. end
  651. -- Build
  652. -- call_action_list,name=build
  653. if GetTime() >= vanishTime + cd.global then
  654. if actionList_Build() then return end
  655. end
  656. -- Finishers
  657. -- call_action_list,name=finish,if=!variable.ss_useable
  658. if not ssUsable() then
  659. if actionList_Finishers() then return end
  660. end
  661. -- Gouge
  662. -- gouge,if=talent.dirty_tricks.enabled&combo_points.deficit>=1
  663. if talent.dirtyTricks and comboDeficit >= 1 and not debuff.curseOfTheDreadblades.exists("player") then
  664. for i = 1, #enemies.yards5 do
  665. local thisUnit = enemies.yards5[i]
  666. if not isBoss(thisUnit) and getFacing(thisUnit,"player") then
  667. if cast.gouge(thisUnit) then return end
  668. end
  669. end
  670. end
  671. -- Pistol Shot OOR
  672. if isChecked("Pistol Shot out of range") and isValidUnit("target") and #enemies.yards8 == 0 and not stealthingAll and power >= getOptionValue("Pistol Shot out of range") and (comboDeficit >= 1 or ttm <= gcd) then
  673. if cast.pistolShot("target") then return end
  674. end
  675. end
  676. end -- End In Combat
  677. end -- End Profile
  678. end -- runRotation
  679. local id = 260
  680. if br.rotations[id] == nil then br.rotations[id] = {} end
  681. tinsert(br.rotations[id],{
  682. name = rotationName,
  683. toggles = createToggles,
  684. options = createOptions,
  685. run = runRotation,
  686. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement