Guest User

Untitled

a guest
Nov 24th, 2012
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. --Implement PQR_resumeAttack.. this is used to prevent
  2.  
  3. --abilities lower in the rotation from being cast.
  4.  
  5. if PQR_resumeAttack == nil then
  6.  
  7. PQR_resumeAttack = 0
  8.  
  9. elseif PQR_resumeAttack > GetTime() then
  10.  
  11. return true
  12.  
  13. else
  14.  
  15. PQR_resumeAttack = 0
  16.  
  17. end
  18.  
  19. for i=1,4 do
  20.  
  21. local bossCheck = "boss"..i
  22.  
  23. if UnitExists(bossCheck) then
  24.  
  25. local npcID = tonumber(UnitGUID(bossCheck):sub(6,10), 16)
  26.  
  27. local bossCasting,_,_,_,_,castEnd = UnitCastingInfo(bossCheck)
  28.  
  29.  
  30.  
  31. if npcID == 62511 or npcID == 62711 then --Amber-Shaper Un'sok or Amber Monstrosity
  32.  
  33. local reshapeLife = UnitDebuffID("vehicle", 122370)
  34.  
  35. local reshapeLife2 = UnitDebuffID("player", 122370)
  36.  
  37. if reshapeLife or reshapeLife2 then
  38.  
  39. local playerCasting = UnitCastingInfo("vehicle")
  40.  
  41. local playerCasting2 = UnitCastingInfo("player")
  42.  
  43. --grab spell names for abilities:
  44.  
  45. local amberExplosion = GetSpellInfo(122402)
  46.  
  47.  
  48.  
  49. --interrupt the target if casting amber explosion
  50.  
  51. if bossCasting == amberExplosion then
  52.  
  53. TargetUnit(bossCheck)
  54.  
  55. --Press the 1st button (Amber Strike)
  56.  
  57. RunMacroText("/click OverrideActionBarButton1")
  58.  
  59. end
  60.  
  61.  
  62.  
  63. --interrupt self if casting amber explosion
  64.  
  65. if playerCasting == amberExplosion then
  66.  
  67. --Press the 2nd button (Struggle for Control)
  68.  
  69. RunMacroText("/click OverrideActionBarButton2")
  70.  
  71. end
  72.  
  73.  
  74.  
  75. --interrupt self if casting amber explosion
  76.  
  77. if playerCasting2 == amberExplosion then
  78.  
  79. --Press the 2nd button (Struggle for Control)
  80.  
  81. RunMacroText("/click OverrideActionBarButton2")
  82.  
  83. end
  84.  
  85.  
  86.  
  87. return true --prevent the rotation from executing while reshaped
  88.  
  89.  
  90.  
  91. end
Advertisement
Add Comment
Please, Sign In to add comment