Advertisement
Guest User

DS Solution

a guest
Mar 22nd, 2014
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.46 KB | None | 0 0
  1.     importantSpellList = {
  2.         [1776]    = true,           -- Polymorph
  3.         [61305]   = true,           -- Polymorph: Black Cat
  4.         [28272]   = true,           -- Polymorph: Pig
  5.         [61721]   = true,           -- Polymorph: Rabbit
  6.         [61780]   = true,           -- Polymorph: Turkey
  7.         [28271]   = true,           -- Polymorph: Turtle
  8.         [605]     = true,           -- Mind Control
  9.         [33786]   = true,           -- Cyclone
  10.         [1513]    = true,           -- Scare Beast
  11.         [113506]  = true,                   -- sCyclone
  12.         [51514]   = true,           -- Hex
  13.         [5782]    = true,           -- Fear
  14.         [34914]   = true,           -- Vampiric Touch
  15.         [116858]  = true,           -- Chaos Bolt
  16.         [20066]   = true,           -- Repantance
  17.         [115750]  = true,           -- Blinding Light    
  18.         [145067]  = true,           -- Turn Evil
  19.         [10326]   = true            -- Turn Evil
  20.     }                      
  21.  
  22. for i=1, #ArenaTargets do -- Checks every Target...
  23.  
  24.     if LineOfSightCheck() then -- ...If current Enemy is in LOS...
  25.         local spellName, _, _, _, _, endCast, _, _, _ = UnitCastingInfo(Arena..i)
  26.  
  27.         if spellName ~= nil then -- ... and if current Enemy is casting something....
  28.        
  29.             for key, value in pairs(importantSpellList) do -- ... it Goes through the important spell Table ...
  30.            
  31.                 if GetSpellInfo(key) == spellName then -- If the current casted Spell in the "IMPORTANT LIST"...
  32.                     if ( (endCast/1000) - GetTime() ) < 1 then -- ... Cast DS wehen remaining cast time is <1 seconds
  33.                         castThisSpell(GetSpellInfo(77606),Arena..i)
  34.                         return true
  35.                     else
  36.                         return true
  37.                     end
  38.                 end                                        
  39.             end
  40.         end
  41.     end
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement