Guest User

Untitled

a guest
May 23rd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.99 KB | None | 0 0
  1. --Death Knight Rotations
  2. local function CJ_RCD(rune)
  3. if GetRuneCooldown(rune) == 0 then
  4. return 0
  5. else
  6. return select(2,GetRuneCooldown(rune)) - (GetTime() - GetRuneCooldown(rune))
  7. end
  8. end
  9.  
  10. --1 Blood
  11. --2 Unholy
  12. --3 Frost
  13. --4 Death
  14. local function CJ_NR(rune)
  15. local count = 0;
  16. for i = 1, 6 do
  17. if GetRuneType(i) == rune and select(3,GetRuneCooldown(i)) == true then
  18. count = count + 1;
  19. end
  20. end
  21.  
  22. return count
  23. end
  24.  
  25. ---------------------------------
  26. ---------Unholy-------------------
  27. ---------------------------------
  28. function CJ_UnholyBuffs()
  29. if not (CJ_HB("Horn of Winter") or CJ_HB("Battle Shout") or CJ_HB("Strength of Earth Totem")) then
  30. if CJ_Cast("Horn of Winter") then return true end;
  31. end
  32.  
  33. --[[if GetShapeshiftForm() ~= 3 then
  34. CastShapeshiftForm(3);
  35. return;
  36. end--]]
  37. return false
  38. end
  39.  
  40. function CJUnholyDKRot()
  41. if UnitAffectingCombat("player") == 1 then
  42. if CJ_HP("player") < 50 then
  43. CJ_Cast("Icebound Fortitude")
  44. end
  45. end
  46. if CJ_OC() then StopAttack() return end
  47. if AmIFacing == false then return end;
  48. CJ_Interrupt("Mind Freeze");
  49.  
  50. StartAttack("target")
  51.  
  52. if not CJ_Hero() and cj_cooldowns and CJ_IsBoss() and CJ_HP("target") < 15 then
  53. CJ_Cast("Unholy Frenzy")
  54. end
  55.  
  56. if not CJ_GCD() then return end
  57. if CJ_UnholyBuffs() then return end
  58.  
  59. CJ_Interrupt("Strangulate");
  60.  
  61. if IsSpellInRange("Outbreak") == 1 and IsSpellInRange("Frost Strike") == 0 then
  62. if (CJ_DTR("Frost Fever") <= 2 or CJ_DTR("Blood Plague") <=2) then
  63. if CJ_Cast("Outbreak") then return end;
  64. end
  65. elseif IsSpellInRange("Outbreak") == 0 then return
  66. end
  67.  
  68. if cj_deathstrike and CJ_HP("player") < 40 then
  69. if CJ_Cast("Death Strike") then return end
  70. end
  71.  
  72. if (CJ_DTR("Frost Fever") <= 2 or CJ_DTR("Blood Plague") <=2) then
  73. if CJ_Cast("Outbreak") then return end;
  74. end
  75.  
  76. if cj_aoemode then
  77. if (CJ_DTR("Frost Fever") >= 28 and CJ_DTR("Blood Plague") >= 28) then
  78. if CJ_Cast("Pestilence") then return end
  79. end
  80.  
  81. if (CJ_NR(1) == 1 or CJ_NR(4) == 1) then
  82. if CJ_Cast("Blood Boil") then return end
  83. end
  84.  
  85. if CJ_NR(2) == 2 then
  86. if CJ_Cast("Scourge Strike") then return end
  87. end
  88.  
  89. if CJ_Cast ("Icy Touch") then return end
  90. end
  91.  
  92. if cj_cooldowns then
  93. if CJ_HB("Unholy Frenzy") or CJ_Hero() or (CJ_IsBoss() and CJ_HP("target") >= 90) then
  94. if CJ_Cast("Summon Gargoyle") then return end
  95. end
  96. end
  97.  
  98. if CJ_NR(4) == 4 or CJ_NR(2) == 2 then
  99. if CJ_Cast("Scourge Strike") then return end
  100. end
  101.  
  102. if CJ_NR(1) == 2 and CJ_NR(3) == 2 then
  103. if CJ_Cast("Festering Strike") then return end
  104. end
  105.  
  106. if UnitPower("player") >= 90 or CJ_HB("Sudden Doom") then
  107. if CJ_Cast("Death Coil") then return end
  108. end
  109.  
  110. if CJ_Cast("Scourge Strike") then return end
  111. if CJ_Cast("Festering Strike") then return end
  112. if CJ_Cast("Death Coil") then return end
  113.  
  114. if CJ_NR(2) == 0 and CJ_NR(4) == 3 then
  115. CJ_Cast("Blood Tap")
  116. end
  117.  
  118. if cj_cooldowns and CJ_NR(2) == 0 then
  119. CJ_Cast("Empower Rune Weapon")
  120. end
  121.  
  122. if CJ_Cast("Horn of Winter") then return end
  123. end
  124.  
  125. ---------------------------------
  126. ---------Frost-------------------
  127. ---------------------------------
  128.  
  129. function CJ_FrostBuffs()
  130. if not (CJ_HB("Horn of Winter") or CJ_HB("Battle Shout") or CJ_HB("Strength of Earth Totem")) then
  131. if CJ_Cast("Horn of Winter") then return true end;
  132. end
  133.  
  134. --[[ if GetShapeshiftForm() ~= 3 then
  135. CastShapeshiftForm(3);
  136. return;
  137. end--]]
  138. return false
  139. end
  140.  
  141. function CJFrostDKRot()
  142. if UnitAffectingCombat("player") == 1 then
  143. if CJ_HP("player") < 50 then
  144. CJ_Cast("Icebound Fortitude")
  145. end
  146. end
  147. if CJ_OC() then StopAttack() return end
  148. if AmIFacing == false then return end;
  149. CJ_Interrupt("Mind Freeze");
  150.  
  151. StartAttack("target")
  152.  
  153. if not CJ_GCD() then return end
  154. if CJ_FrostBuffs() then return end
  155.  
  156. CJ_Interrupt("Strangulate");
  157.  
  158. if IsSpellInRange("Outbreak") == 1 and IsSpellInRange("Frost Strike") == 0 then
  159. if (CJ_DTR("Frost Fever") <= 2 or CJ_DTR("Blood Plague") <=2) then
  160. if CJ_Cast("Outbreak") then return end;
  161. end
  162. elseif IsSpellInRange("Outbreak") == 0 then return
  163. end
  164.  
  165. if cj_deathstrike and CJ_HP("player") < 40 then
  166. if CJ_Cast("Death Strike") then return end
  167. end
  168.  
  169. if cj_cooldowns and IsSpellInRange("Frost Strike") == 1 then
  170. CJ_Cast("Pillar of Frost");
  171. end
  172.  
  173. if CJ_NR(4) ~= 2 then
  174. CJ_Cast("Blood Tap")
  175. end
  176.  
  177. if (CJ_DTR("Frost Fever") <= 2 or CJ_DTR("Blood Plague") <=2) then
  178. if CJ_Cast("Outbreak") then return end;
  179. end
  180.  
  181. if cj_aoemode then
  182. if CJ_HB("Rime") or CJ_NR(3) > 0 or CJ_NR(4) > 0 then
  183. if CJ_Cast("Howling Blast") then return end
  184. end
  185.  
  186. if CJ_NR(2) == 2 then
  187. if CJ_Cast("Plague Strike") then return end
  188. end
  189. end
  190.  
  191. if not cj_aoemode then
  192. if CJ_DTR("Frost Fever") <= 2 then
  193. if CJ_Cast("Howling Blast") then return end;
  194. end
  195.  
  196. if CJ_DTR("Blood Plague") <= 2 then
  197. if CJ_Cast("Plague Strike") then return end;
  198. end
  199.  
  200. if (CJ_NR(2) == 2 and CJ_NR(3) == 2) or CJ_NR(4) == 2 or CJ_HB("Killing Machine") then
  201. if CJ_Cast("Obliterate") then return end;
  202. end
  203. end
  204.  
  205. if CJ_HB("Killing Machine") and cj_cooldowns and CJ_HP("target") < 30 then
  206. CJ_Cast("Empower Rune Weapon");
  207. end
  208.  
  209. if (CJ_Hero() and UnitPower("player") >= 95) or UnitPower("player") > 90 then
  210. if CJ_Cast("Frost Strike") then return end;
  211. end
  212.  
  213. if CJ_HB("Freezing Fog") or (CJ_NR(4) + CJ_NR(2) == 0) then
  214. if CJ_Cast("Howling Blast") then return end;
  215. end
  216.  
  217. if not cj_aoemode then
  218. if CJ_Cast("Obliterate") then return end
  219. end
  220. if CJ_Cast("Frost Strike") then return end;
  221. if CJ_Cast("Howling Blast") then return end;
  222. if CJ_Cast("Horn of Winter") then return end;
  223. end
  224.  
  225. ---------------------------------
  226. ---------Blood-------------------
  227. ---------------------------------
  228. local outbreakcast = false;
  229. function CJ_BloodBuffs()
  230. if not (CJ_HB("Horn of Winter") or CJ_HB("Battle Shout") or CJ_HB("Strength of Earth Totem")) then
  231. if CJ_Cast("Horn of Winter") then return true end;
  232. end
  233.  
  234. --[[ if GetShapeshiftForm() ~= 1 then
  235. CastShapeshiftForm(1);
  236. return;
  237. end--]]
  238. return false
  239. end
  240.  
  241. function CJBloodDKRot()
  242. if UnitAffectingCombat("player") == 1 and cj_defensivecooldowns then
  243. if CJ_HP("player") < 70 then
  244. CJ_Cast("Vampiric Blood")
  245. end
  246.  
  247. if CJ_HP("player") < 50 then
  248. CJ_Cast("Icebound Fortitude")
  249. end
  250.  
  251. if CJ_HP("player") < 40 and not CJ_HB("Icebound Fortitude") and UnitPower("player") >= 80 then
  252. CJ_Cast("Lichborne")
  253. end
  254. end
  255. if CJ_OC() then StopAttack() return end
  256. if AmIFacing == false then return end;
  257. CJ_Interrupt("Mind Freeze");
  258.  
  259. StartAttack("target")
  260.  
  261. if not CJ_GCD() then return end
  262. if CJ_BloodBuffs() then return end
  263.  
  264. if CJ_HB("Crimson Scourge") then
  265. if CJ_Cast("Blood Boil") then return end
  266. end
  267.  
  268. if CJ_HB("Lichborne") then
  269. if CJ_CastTarget("Death Coil","player") then return end;
  270. end
  271.  
  272. if cj_aoemode then
  273. if IsSpellInRange("Heart Strike") == 0 and IsSpellInRange("Outbreak") == 1 then
  274. if CJ_Cast("Outbreak") then outbreakcast = true return end
  275. elseif IsSpellInRange("Outbreak") == 0 then return
  276. end
  277.  
  278. if cj_cooldowns then
  279. CJ_Cast("Dancing Rune Weapon")
  280. end
  281.  
  282. if CJ_Cast("Outbreak") then outbreakcast = true return end;
  283. if CJ_HD("Blood Plague") and CJ_HD("Frost Fever") and outbreakcast then
  284. if CJ_Cast("Pestilence") then outbreakcast = false return end;
  285. end
  286.  
  287. if CJ_Cast("Death Strike") then return end;
  288.  
  289. if ((CJ_RCD(3) > 0 and CJ_RCD(4) > 0) or (CJ_RCD(5) > 0 and CJ_RCD(6) > 0)) then
  290. if CJ_Cast("Rune Strike") then return end;
  291. end
  292.  
  293. if (CJ_RCD(1) == 0 and CJ_RCD(2) == 0) or (CJ_RCD(1) < 3 and CJ_RCD(2) == 0) or (CJ_RCD(1) == 0 and CJ_RCD(2) < 3) then
  294. if CJ_CD("Blood Tap") == 0 then
  295. CJ_Cast("Blood Tap")
  296. if CJ_Cast("Bone Shield") then return else if CJ_Cast("Icy Touch") then return end end
  297. elseif CJ_HP("player") < 90 and CJ_CD("Rune Tap") == 0 then
  298. if CJ_Cast("Rune Tap") then return end;
  299. else
  300. if CJ_Cast("Blood Boil") then return end;
  301. end
  302. end
  303.  
  304. if CJ_Cast("Horn of Winter") then return end;
  305. else
  306. if IsSpellInRange("Heart Strike") == 0 and IsSpellInRange("Outbreak") == 1 then
  307. if CJ_Cast("Outbreak") then outbreakcast = true return end
  308. elseif IsSpellInRange("Outbreak") == 0 then return
  309. end
  310.  
  311. if cj_cooldowns then
  312. CJ_Cast("Dancing Rune Weapon")
  313. end
  314.  
  315. if CJ_Cast("Outbreak") then return end;
  316.  
  317. if CJ_Cast("Death Strike") then return end;
  318. if CJ_Cast("Rune Strike") then return end
  319.  
  320. if CJ_Cast("Horn of Winter") then return end;
  321.  
  322. if (CJ_RCD(1) == 0 and CJ_RCD(2) == 0) or (CJ_RCD(1) < 3 and CJ_RCD(2) == 0) or (CJ_RCD(1) == 0 and CJ_RCD(2) < 3) then
  323. if CJ_Cast("Blood Tap") then
  324. if CJ_Cast("Bone Shield") then return else if CJ_Cast("Icy Touch") then return end end
  325. elseif CJ_HP("player") < 90 and CJ_CD("Rune Tap") == 0 then
  326. if CJ_Cast("Blood Tap") then return end;
  327. else
  328. if CJ_Cast("Heart Strike") then return end;
  329. end
  330. end
  331. end
  332. end
Add Comment
Please, Sign In to add comment