Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 4th, 2012  |  syntax: None  |  size: 66.39 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. using Styx;
  2. using Styx.Combat.CombatRoutine;
  3. using Styx.Helpers;
  4. using Styx.Logic.Combat;
  5. using Styx.Logic.Pathing;
  6. using Styx.WoWInternals;
  7. using Styx.WoWInternals.WoWObjects;
  8.  
  9. #pragma warning disable
  10. /**************************/
  11. /* Cimmerian 0.40 by Mord updated for HB2 by Hawker/*
  12. /**************************/
  13.  
  14.  
  15. namespace Cimmeran
  16. {
  17.     using System;
  18.     using System.Threading;
  19.     using System.Media;
  20.     using System.Diagnostics;
  21.     using System.Collections.Generic;
  22.     using Styx.Logic;
  23.  
  24.     public class Deathknight : CombatRoutine
  25.     {
  26.  
  27.         public override string Name { get { return "Cimmerian for HB2 by Mord"; } }
  28.         public override WoWClass Class { get { return WoWClass.DeathKnight; } }
  29.         public override bool NeedCombatBuffs { get { return false; } }
  30.         public override bool NeedPullBuffs { get { return false; } }
  31.         public override void CombatBuff() { }
  32.         public override void PullBuff() { }
  33.         public override bool NeedPreCombatBuffs { get { return false; } }
  34.         public override void PreCombatBuff() { }
  35.         public override bool NeedHeal { get { return false; } }
  36.         public override bool NeedRest { get { return _me.HealthPercent < Styx.Logic.Common.Rest.RestPercentageHealth; } }
  37.         public override void Heal() { }
  38.  
  39.         #region Class Specific Variables
  40.  
  41.         /// /////////////////////////////////////////////////////////////////////
  42.         /// //////////////////////////////**[Bools]**/
  43.         ///////////////////////////
  44.         /// /////////////////////////////////////////////////////////////////////
  45.         /// In this box is a list of spells or abilities you can turn on or off//
  46.         /// CHOOSE ONLY ONE ROTATION!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
  47.  
  48.         //
  49.         /****************************Blood Rotations****************************/
  50.         //        
  51.         bool UseMordBloodRotation = false; //Moderate to High DPS. High Regeneration. Low Defense. Requires level 58
  52.         //Mord Blood requires: IT, PS, HS, DC, MoB, VB, RT, (OB & DRW at Level 61)
  53.         //If dealing with adds you will need Pestilence and Blood Boil        
  54.         //Presence : Blood till 65. Then Unholy
  55.         //Fill your Blood Tree First!!
  56.         //This rotation will cast Death Strike till you train for Obliterate at level 61
  57.         //Dancing Rune Weapon will cast at level 61
  58.         //http://talent.mmo-champion.com/?deathknight#B6_nlOyp9_ksX4,aQO3eO,10192
  59.  
  60.         //
  61.         /****************************Frost Rotations****************************/
  62.         //
  63.  
  64.         bool UseMordFrostRotation = false; //Moderate to Very High DPS, low to moderate regeneration, High Defense. Requires level 58
  65.         //Frost One requires: IT, PS, BS, FS, Hungering Cold, Unbreakable Armor (Howling Blast at 61)      
  66.         //If dealing with adds you will need Pestilence
  67.         //Presence : Blood till 65. Then Unholy
  68.         //Fill your Frost Tree First!!
  69.         //http://talent.mmo-champion.com/?deathknight#B6_nlOT93KK8yYm,FQp,10482
  70.         /****************************************************************/
  71.  
  72.         //
  73.         /****************************Unholy Rotations****************************/
  74.         //
  75.  
  76.         bool UseMordUnholyRotation = true; //Very High DPS, low regeneration. Moderate Defense. Requires level 58
  77.         //Mord Unholy requires: IT, PS, BS, SS, BoneShield, Summon Gargoyle at 61
  78.         //If dealing with adds you will need Pestilence and Blood Boil
  79.         //Fill your unholy tree first!
  80.         //Perma Pet recommended. Turn leap off to help prevent targeting issues
  81.         //Presence : Blood till 65. Then Unholy
  82.         //http://talent.mmo-champion.com/?deathknight#_CJTpDsu3dpyiy,FQp,10482
  83.         /****************************************************************/
  84.  
  85.         //
  86.         /****************************Starting Rotation****************************/
  87.         //
  88.  
  89.         bool UseStandardRotation = false; //Standard Level 55 Rotation
  90.         //Standard Rotation will work at any level and uses no talents
  91.         /****************************************************************/
  92.  
  93.         //Adds
  94.         bool IgnoreAdds = false; //Will cast certain AoE abilities is this is set to false              
  95.  
  96.         //Interupt Spells      
  97.         bool UseStrangulate = true; //Strangulate to interupt casting
  98.         bool UseMindFreeze = true; //Mind Freeze      
  99.  
  100.         //Defense Spells                
  101.         bool UseIceboundFortitude = true; //Icebound Fortitude
  102.  
  103.         //Other
  104.         bool UseRaiseDead = false; //Raise Dead    
  105.         bool UseHorn = true; //Horn of Winter
  106.  
  107.         //Openers
  108.         bool OpenWithDeathGrip = true;
  109.         bool OpenWithDarkCommand = false; // If Deathgrip is on Cooldown
  110.         bool OpenWithDeathCoil = true; // If DeathGrip is on Cooldown & not open with DarkCommand
  111.         bool OpenWithIcyTouch = true; // If other openers are on Cooldown
  112.  
  113.         /////////////////////////////////////////////////////////////////////////
  114.  
  115.         /// /////////////////////////////////////////////////////////////////////
  116.         /// //////////////////////////////**[Ints]**////////////////////////////
  117.         /// /////////////////////////////////////////////////////////////////////
  118.         /// Set the points or percentages for things to be activated/////////////        
  119.  
  120.         //Out of Combat Resting Abilities
  121.  
  122.         int EatHealth = 50; //Eat when at this %
  123.  
  124.         //In Combat Abilites
  125.  
  126.         int MinDeathGripRange = 15; //Death Grip will not be cast if you are within this range (Unless interupting a caster)
  127.         int MinDarkCommandRange = 15; //Dark Command will not be cast if you are within this range
  128.         int IceboundFortitudeHealth = 50; //Cast Icebound Fortitude when you reach this %
  129.         int RuneTapHealth = 75; //Cast Rune Tap when you reach this %
  130.         int MarkOfBloodHealth = 25; //Cast Mark of Blood when you reach this %
  131.         int VampiricBloodHealth = 15; //Cast Vampiric Blood when you reach this %
  132.         int UnbreakableArmorHealth = 50; //Cast Unbreakable Armor when you reach this %        
  133.         int DRWThreshold = 40; //Dancing Rune Weapon will not be cast if you target is below this %
  134.         int HysteriaThreshold = 31; //Hysteria will not be cast if you are at or below this %
  135.  
  136.  
  137.         /// ////////////////////////////////////////////////////////////////////////////////
  138.         ///
  139.         /// ////////////////////////////////////////////////////////////////////////
  140.         /// //////////////////////////////**System**////////////////////////////
  141.         /// /////////////////////////////////////////////////////////////////////
  142.         /// Other Various things to set/////////////////////////////////////////
  143.  
  144.         bool UseSlog = true; //Basic Commands will display for user
  145.         bool UseUltraSlog = false; //Debug Commands will display for user
  146.         bool PlayerAlert = false; //Be alert of players around?
  147.         bool WaitForApproach = true; // After pull wait for target to approach. (If DeathGrip isnt used)
  148.  
  149.         ////////////////////////////////////////////////////////////////////////    
  150.         ///
  151.         /// ////////////////////////////////////////        
  152.         /// ///Do not change anything in this box///
  153.         /// ////////////////////////////////////////
  154.         ///
  155.         //bool UseBloodTap = false;
  156.         bool DRWToggle = false;
  157.         bool SGToggle = false;
  158.         bool HCToggle = false;
  159.         bool GotPlayers = false;
  160.         public static int StuckCount;
  161.         bool GotAdds = false;
  162.         bool PullSpam = false;
  163.         bool DRWSpam = false;
  164.         bool AddSpam = false;
  165.  
  166.         /// ////////////////////////////////////////////////////////////////////////////////          
  167.  
  168.  
  169.  
  170.         #endregion
  171.  
  172.         #region Rest
  173.  
  174.         public override void Rest()
  175.         {
  176.             if (_me.HealthPercent <= EatHealth)
  177.             {
  178.                 Slog("Health is at " + _me.HealthPercent + "%, Eat.");
  179.                 Styx.Logic.Common.Rest.Feed();
  180.  
  181.             }
  182.         }
  183.  
  184.         #endregion
  185.  
  186.         #region Enchanting
  187.  
  188.         private static readonly List<WoWItem> AlreadyDisenchanted = new List<WoWItem>();
  189.  
  190.         /// <summary>
  191.         /// List from wowhead
  192.         /// http://www.wowhead.com/?items=7.12#0+2-1
  193.         /// </summary>
  194.         private readonly List<uint> _doNotDisenchant = new List<uint>()
  195.         {
  196.             // mats
  197.             10940, 10938, 10939, 10998, 10978, 11082, 11083, 11084, 11134, 11139, 11174, 11175,
  198.             11176, 11177, 11178, 14343, 14344, 16202, 16203, 16204, 20725, 22445, 22446, 22447,
  199.             22448, 22449, 22450, 34052, 34053, 34054, 34055, 34056, 34057, 46849, 49649,
  200.             // rods
  201.             44452,
  202.             // lockbox
  203.             43622,
  204.             // healthstones
  205.             5509, 5510, 5511, 5512, 9421, 19004, 19005, 19006,  
  206.             19007, 19008, 19009, 19010, 19011, 19012, 19013,
  207.             22103, 22104, 22105, 36889, 36890, 36891, 36892,
  208.             36893, 36894,
  209.             // soulstones
  210.  
  211.             // firestones
  212.             3615, 3616, 3617, 3618, 3619, 3620,
  213.  
  214.             // spellstones
  215.             41191, 41192, 41193, 41194, 41195, 41196,
  216.         };
  217.  
  218.         private List<WoWItem> GetItemsToDisenchant()
  219.         {
  220.             try
  221.             {
  222.                 if (!SpellManager.KnownSpells.ContainsKey("Disenchant") || _me.ZoneId == 3277 || _me.ZoneId == 3358 || _me.ZoneId == 2597) // wsg, ab and av
  223.                     return null;
  224.  
  225.                 List<WoWItem> targetItems = ObjectManager.GetObjectsOfType<WoWItem>(false);
  226.  
  227.                 for (int a = targetItems.Count - 1; a >= 0; --a)
  228.                 {
  229.                     if (_doNotDisenchant.Contains(targetItems[a].Entry) ||
  230.                         AlreadyDisenchanted.Contains(targetItems[a]))
  231.                     {
  232.                         targetItems.RemoveAt(a);
  233.                     }
  234.                     else if (targetItems[a].IsSoulbound ||
  235.                         targetItems[a].IsAccountBound ||
  236.                         targetItems[a].Quality != WoWItemQuality.Uncommon)
  237.                     {
  238.                         AlreadyDisenchanted.Add(targetItems[a]);
  239.                         targetItems.RemoveAt(a);
  240.                     }
  241.                 }
  242.  
  243.                 if (targetItems.Count > 0)
  244.                 {
  245.                     foreach (WoWItem deItem in targetItems)
  246.                     {
  247.                         Slog("Disenchant: " + deItem.Name);
  248.                     }
  249.                     return targetItems;
  250.                 }
  251.             }
  252.             catch
  253.             {
  254.                 Slog("Getting Disenchant list failed");
  255.             }
  256.  
  257.             // Log("Nothing to Disenchant.");
  258.             return null;
  259.         }
  260.  
  261.         private static void DisenchantItems(IEnumerable<WoWItem> itemList)
  262.         {
  263.             try
  264.             {
  265.                 if (itemList == null)
  266.                     return;
  267.  
  268.                 foreach (WoWItem item in itemList)
  269.                 {
  270.                     Slog("Disenchanting: " + item.Name);
  271.                     SpellManager.CastSpell("Disenchant", false);
  272.                     Thread.Sleep(500);
  273.                     Lua.DoString("UseItemByName(\"" + item.Name + "\")");
  274.  
  275.                     Thread.Sleep(500);
  276.  
  277.                     int tickCount = Environment.TickCount;
  278.                     while (_me.Casting > 0 && !_me.Combat && Environment.TickCount - tickCount <= 5000)
  279.                         Thread.Sleep(250);
  280.  
  281.                     Thread.Sleep(2500);
  282.  
  283.                     // wait for lootframe to close
  284.                     var timer = new Stopwatch();
  285.                     timer.Start();
  286.  
  287.                     tickCount = Environment.TickCount;
  288.                     while (LootTargeting.LootFrameIsOpen && !_me.Combat && Environment.TickCount - tickCount <= 7000)
  289.                     {
  290.                         Thread.Sleep(1000);
  291.  
  292.                         if (timer.ElapsedMilliseconds >= 6000)
  293.                         {
  294.                             break;
  295.                         }
  296.                     }
  297.  
  298.                     if (!_me.Combat)
  299.                     {
  300.                         Thread.Sleep(1500);
  301.                         AlreadyDisenchanted.Add(item);
  302.                     }
  303.                     else
  304.                     {
  305.                         return;
  306.                     }
  307.                 }
  308.             }
  309.             catch
  310.             {
  311.                 Slog("DE failed");
  312.                 return;
  313.             }
  314.             return;
  315.         }
  316.  
  317.         #endregion
  318.  
  319.         #region Private Members
  320.  
  321.         private static void Slog(string msg)
  322.         {
  323.             if (msg == _logspam)
  324.             {
  325.                 return;
  326.             }
  327.  
  328.             Logging.Write(msg);
  329.             _logspam = msg;
  330.         }
  331.  
  332.         #endregion
  333.  
  334.         #region Global Variables
  335.  
  336.         Dictionary<WoWPlayer, DateTime> followers = new Dictionary<WoWPlayer, DateTime>();
  337.  
  338.         private static readonly LocalPlayer _me = ObjectManager.Me;
  339.         private static string _logspam;
  340.  
  341.         #endregion
  342.  
  343.         #region Pull
  344.  
  345.         private readonly Stopwatch _pullTimer = new Stopwatch(); //A Pull Timer
  346.  
  347.         public override void Pull()
  348.         {
  349.  
  350.             if (_me.CurrentTarget != null)
  351.             {
  352.  
  353.                 /////////////Checks//////////////////
  354.                 BuffsCheck(); //Make sure buffs are good before pulling                            
  355.                 /////////////////////////////////////
  356.  
  357.                 if (!_pullTimer.IsRunning)
  358.                     _pullTimer.Start(); //Make sure timer is running
  359.  
  360.                 if (_me.CurrentTarget.Distance > 100) //Also make sure we are sorta close
  361.                     return;
  362.  
  363.                 if (!PullSpam)
  364.                     Slog("Killing " + _me.CurrentTarget.Name + " at distance " + System.Math.Floor(_me.CurrentTarget.Distance));
  365.  
  366.                 if (_me.CurrentTarget.Distance >= 29 && !_me.Combat && _pullTimer.Elapsed.Seconds < 10 && (OpenWithDeathGrip || OpenWithDarkCommand)) //Move in for the kill
  367.                 {
  368.                     Navigator.MoveTo(WoWMovement.CalculatePointFrom(_me.CurrentTarget.Location, 4.0f));
  369.                     Thread.Sleep(500);
  370.                     PullSpam = true;
  371.                     StuckDetector();
  372.                     return;
  373.  
  374.                 }
  375.  
  376.                 if (AvoidAdds())
  377.                     Slog("Possible extra pull");
  378.  
  379.                 if (_pullTimer.Elapsed.Seconds > 10) //Took too long to pull
  380.                 {
  381.  
  382.                     Slog("Pull lasted too long, Moving onto somthing else for now");
  383.                     Blacklist.Add(_me.CurrentTarget != null ? _me.CurrentTarget.CurrentTargetGuid : 0, TimeSpan.FromMinutes(15));
  384.  
  385.                     _me.ClearTarget();
  386.                     _pullTimer.Reset();
  387.                     return;
  388.  
  389.                 }
  390.  
  391.                 ///////////Pull////////////
  392.                 _pullTimer.Reset();
  393.                 if (opener()) //Do Opener
  394.                 {
  395.                     Slog("Opener was successfull!");
  396.                     PullSpam = false;
  397.                 }
  398.  
  399.                 else
  400.                     Slog("Opener failed! Defaulting to Meele");
  401.                 ///////////////////////////              
  402.  
  403.             }
  404.  
  405.         }
  406.  
  407.         #endregion
  408.  
  409.         #region Combat
  410.  
  411.         public override void Combat()
  412.         {
  413.  
  414.             if (_me.GotTarget && _me.CurrentTarget != null)
  415.             {
  416.  
  417.                 if ((!_me.CurrentTarget.IsTargetingMe) && (_me.CurrentTarget.CurrentHealth > 99))
  418.                 {
  419.  
  420.                     Slog("Targeting Error! Clear target and attempt again.");
  421.  
  422.                     WoWMovement.MoveStop();
  423.  
  424.                     _me.ClearTarget();
  425.                 }
  426.  
  427.  
  428.                 RedMessageReactor(); //At the start of combat make sure we are facing the target
  429.  
  430.                 if (AutoAttack()) //Start Auto Attack
  431.                     return;
  432.  
  433.                 if (CastReactor())//Deal with Casters
  434.                     return;
  435.  
  436.                 if (MoveToMelee())
  437.                     return;
  438.  
  439.                 //Combat Spells
  440.  
  441.                 if (UseStandardRotation) //Level 55 Rotation
  442.                     StartingRotation();
  443.  
  444.                 if (UseMordBloodRotation) //Level 58 Blood Rotation
  445.                     MordBlood();
  446.  
  447.                 if (UseMordUnholyRotation) //Level 58 Unholy Rotation
  448.                     MordUnholy();
  449.  
  450.                 if (UseMordFrostRotation) //Level 58 Frost Rotation
  451.                     MordFrost();
  452.  
  453.                 //End Combat Spells                        
  454.  
  455.             }
  456.  
  457.         }
  458.  
  459.         #endregion
  460.  
  461.         #region Heal Reactor
  462.  
  463.         /////////////////////////////////
  464.         //This will decide if we need a heal
  465.         /////////////////////////////////
  466.  
  467.         public void HealReactor()
  468.         {
  469.             if (SpellManager.KnownSpells.ContainsKey("Rune Tap") && ((_me.GetPowerPercent(WoWPowerType.Health)) <= RuneTapHealth))
  470.             {
  471.  
  472.                 RuneTap();
  473.  
  474.             }
  475.  
  476.             if ((SpellManager.KnownSpells.ContainsKey("Mark of Blood") && (_me.GetPowerPercent(WoWPowerType.Health)) <= MarkOfBloodHealth) && (_me.CurrentTarget.CurrentHealth > 75))
  477.             {
  478.  
  479.                 MarkOfBlood();
  480.  
  481.             }
  482.  
  483.             if ((SpellManager.KnownSpells.ContainsKey("Vampiric Blood")) && ((_me.GetPowerPercent(WoWPowerType.Health)) <= VampiricBloodHealth) && (_me.CurrentTarget.CurrentHealth > 75))
  484.             {
  485.  
  486.                 VampiricBlood();
  487.  
  488.             }
  489.  
  490.             if (((SpellManager.KnownSpells.ContainsKey("Unbreakable Armor")) && (_me.GetPowerPercent(WoWPowerType.Health)) <= UnbreakableArmorHealth) && (_me.CurrentTarget.CurrentHealth > 75))
  491.             {
  492.  
  493.                 UnbreakableArmor();
  494.  
  495.             }
  496.  
  497.             if (((UseIceboundFortitude) && (_me.GetPowerPercent(WoWPowerType.Health)) <= IceboundFortitudeHealth) && (_me.CurrentTarget.CurrentHealth > 75))
  498.             {
  499.  
  500.                 IceboundFortitude();
  501.  
  502.             }
  503.  
  504.         }
  505.  
  506.         #endregion
  507.  
  508.         #region Instant Reactor
  509.  
  510.         /////////////////////////////////
  511.         //This will detect cooldown abilities and use them
  512.         /////////////////////////////////
  513.  
  514.         public void InstantReactor() //Change to buff reactor when casting works
  515.         {
  516.             if ((SpellManager.KnownSpells.ContainsKey("Hysteria")) && (_me.GetPowerPercent(WoWPowerType.Health) > HysteriaThreshold))
  517.                 Hysteria();
  518.         }
  519.  
  520.         #endregion
  521.  
  522.         #region Cast Detector
  523.  
  524.         /////////////////////////////////
  525.         //This will detect casters and deal with them
  526.         /////////////////////////////////
  527.  
  528.         public bool CastReactor()
  529.         {
  530.  
  531.             if (_me.CurrentTarget.IsCasting) //If target starts to cast, move in.
  532.             {
  533.                 Slog("Target is casting");
  534.  
  535.                 if ((UseStrangulate) && (SpellManager.CanCastSpell("Strangulate")) && (_me.CurrentTarget.Distance <= 29) && (_me.CurrentTarget.Distance > 4)) //Strangulate to Interupt Caster
  536.                 {
  537.                     Slog("Too far away! Interupt using Strangulate");
  538.                     Strangulate();
  539.                     return true;
  540.                 }
  541.  
  542.                 if ((UseStrangulate) && (!SpellManager.CanCastSpell("Strangulate")) && (SpellManager.CanCastSpell("Death Grip")) && (_me.CurrentTarget.Distance <= 29) && (_me.CurrentTarget.Distance > 4)) //If St on CD cast DeathGrip
  543.                 {
  544.                     Slog("Too far away! Strangulate not ready! Use Deathgrip.");
  545.                     DeathGrip();
  546.                     return true;
  547.  
  548.                 }
  549.  
  550.                 if ((_me.CurrentTarget.Distance <= 4) && (_me.CurrentRunicPower > 20))
  551.                 {
  552.  
  553.                     if (UseMindFreeze) //Interupt the cast if MindFreeze is available
  554.                     {
  555.                         MindFreeze();
  556.                         return true;
  557.  
  558.                     }
  559.  
  560.                     return false;
  561.  
  562.                 }
  563.  
  564.             }
  565.  
  566.             return false;
  567.         }
  568.  
  569.         #endregion
  570.  
  571.         #region Runic Power Reactor
  572.  
  573.         /////////////////////////////////
  574.         //This will keep track of runic power and use it
  575.         /////////////////////////////////
  576.  
  577.         public void RunicPowerReactor()
  578.         {
  579.             if ((SpellManager.KnownSpells.ContainsKey("Hungering Cold") && (GotAdds)))
  580.             {
  581.                 HCToggle = true;
  582.  
  583.             }
  584.             //Dancing Rune Weapon workaround provided by TIA
  585.  
  586.             if (SpellManager.KnownSpells.ContainsKey("Dancing Rune Weapon") && (_me.CurrentTarget.CurrentHealth > DRWThreshold))
  587.             {
  588.  
  589.                 WoWSpell spell = SpellManager.KnownSpells["Dancing Rune Weapon"];
  590.  
  591.                 if (!spell.Cooldown) //We may not have enoph RP to cast. So check if its on CD
  592.                 {
  593.                     if (!DRWSpam)
  594.                         Slog("Dancing Rune Weapon Ready.... Disable RP Dump");
  595.  
  596.                     DRWToggle = true;
  597.  
  598.                     DRWSpam = true;
  599.  
  600.                 }
  601.  
  602.             }
  603.  
  604.             if (SpellManager.KnownSpells.ContainsKey("Summon Gargoyle"))
  605.             {
  606.  
  607.                 WoWSpell spell = SpellManager.KnownSpells["Summon Gargoyle"];
  608.  
  609.                 if (!spell.Cooldown) //We may not have enoph RP to cast. So check if its on CD
  610.                 {
  611.                     Slog("Summon Gargoyle Ready.... Disable RP Dump");
  612.  
  613.                     SGToggle = true;
  614.                 }
  615.  
  616.             }
  617.  
  618.             if ((!SGToggle) && (!DRWToggle) && (!UseMordFrostRotation) && (!HCToggle) && (_me.CurrentRunicPower > 40)) //Need 40 RP to cast          
  619.  
  620.                 DeathCoil();
  621.  
  622.             if ((!SGToggle) && (!DRWToggle) && (UseMordFrostRotation) && (!HCToggle) && (_me.CurrentRunicPower > 40)) //Need 40 RP to cast          
  623.  
  624.                 FrostStrike();
  625.  
  626.             if ((DRWToggle) && (_me.CurrentRunicPower > 60)) //Need 60 RP to cast          
  627.  
  628.                 DRW();
  629.  
  630.             if ((SGToggle) && (_me.CurrentRunicPower > 60)) //Need 60 RP to cast          
  631.  
  632.                 SummonGargoyle();
  633.  
  634.         }
  635.  
  636.         #endregion
  637.  
  638.         #region Red Messages
  639.  
  640.         /////////////////////////////////
  641.         //This will detect red messages and react to them
  642.         /////////////////////////////////
  643.  
  644.         public bool RedMessageReactor()
  645.         {
  646.             if (_me.LastRedErrorMessage.Contains("facing")) //Turn around dummy
  647.             {
  648.                 WoWMovement.Face();
  649.                 Thread.Sleep(250);
  650.                 return true;
  651.             }
  652.  
  653.             if (_me.LastRedErrorMessage.Contains("front")) //Turn around dummy
  654.             {
  655.                 WoWMovement.Face();
  656.                 Thread.Sleep(250);
  657.                 return true;
  658.             }
  659.  
  660.             return false;
  661.  
  662.         }
  663.  
  664.         #endregion
  665.  
  666.         #region Opener
  667.  
  668.         /////////////////////////////////
  669.         //Decide an opener
  670.         /////////////////////////////////
  671.  
  672.         public bool opener()
  673.         {
  674.  
  675.             if ((OpenWithDeathGrip) && (_me.CurrentTarget.Distance <= 29) && (_me.CurrentTarget.Distance > MinDeathGripRange)) //DeathGrip
  676.             {
  677.  
  678.                 if (SpellManager.CanCastSpell("Death Grip")) //Spell Ready?
  679.                 {
  680.  
  681.                     WoWMovement.MoveStop();
  682.                     Thread.Sleep(100);
  683.                     WoWMovement.Face();
  684.                     Thread.Sleep(100);
  685.  
  686.                     DeathGrip();//Do Opener
  687.  
  688.                     Thread.Sleep(100);
  689.  
  690.                     if (PlayerAlert)
  691.                         ScanForPlayers(); //Find players near
  692.  
  693.                     return true;
  694.  
  695.                 }
  696.  
  697.             }
  698.  
  699.             if ((OpenWithDarkCommand) && (_me.CurrentTarget.Distance <= 29) && (_me.CurrentTarget.Distance > MinDarkCommandRange)) //DarkCommand
  700.             {
  701.  
  702.                 if (SpellManager.CanCastSpell("Dark Command")) //Spell Ready?
  703.                 {
  704.  
  705.                     WoWMovement.MoveStop();
  706.                     Thread.Sleep(100);
  707.                     WoWMovement.Face();
  708.                     Thread.Sleep(100);
  709.  
  710.                     DarkCommand();//Do Opener
  711.  
  712.                     Thread.Sleep(100);
  713.  
  714.                     if (PlayerAlert)
  715.                         ScanForPlayers(); //Find players near
  716.  
  717.                     return true;
  718.  
  719.                 }
  720.  
  721.             }
  722.  
  723.             if ((OpenWithDeathCoil) && (_me.CurrentTarget.Distance <= 29) && (_me.CurrentRunicPower > 40)) //Death Coil
  724.             {
  725.  
  726.                 if (SpellManager.CanCastSpell("Death Coil")) //Spell Ready?
  727.                 {
  728.  
  729.                     WoWMovement.MoveStop();
  730.                     Thread.Sleep(100);
  731.                     WoWMovement.Face();
  732.                     Thread.Sleep(100);
  733.  
  734.                     DeathCoil();//Do Opener              
  735.  
  736.                     if (PlayerAlert)
  737.                         ScanForPlayers(); //Find players near
  738.  
  739.                     return true;
  740.  
  741.                 }
  742.  
  743.             }
  744.  
  745.             if ((OpenWithIcyTouch) && (_me.CurrentTarget.Distance <= 19)) //Icy Touch
  746.             {
  747.  
  748.                 if (SpellManager.CanCastSpell("Icy Touch")) //Spell Ready?
  749.                 {
  750.  
  751.                     WoWMovement.MoveStop();
  752.                     Thread.Sleep(100);
  753.                     WoWMovement.Face();
  754.                     Thread.Sleep(100);
  755.  
  756.                     IcyTouch();//Do Opener
  757.  
  758.                     Thread.Sleep(100);
  759.  
  760.                     if (PlayerAlert)
  761.                         ScanForPlayers(); //Find players near
  762.  
  763.                     return true;
  764.  
  765.                 }
  766.  
  767.             }
  768.  
  769.             return false;
  770.  
  771.         }
  772.  
  773.         #endregion
  774.  
  775.         #region AvoidAdds
  776.  
  777.         /////////////////////////////////
  778.         //Try to avoid adds on pull. (Credit to Ninko for an outline)
  779.         /////////////////////////////////
  780.  
  781.         public bool AvoidAdds()
  782.         {
  783.  
  784.             var units = new List<WoWUnit>(ObjectManager.GetObjectsOfType<WoWUnit>());
  785.  
  786.             foreach (WoWUnit unit in units)
  787.             {
  788.  
  789.                 if (unit.Location.Distance(_me.CurrentTarget.Location) > 30)
  790.                     return false;
  791.  
  792.                 if ((unit.Location.Distance(_me.CurrentTarget.Location) <= 30) && (unit.Guid != _me.CurrentTargetGuid) && (unit.Guid != _me.Guid))
  793.                 {
  794.                     return true;
  795.                 }
  796.             }
  797.  
  798.             return false;
  799.  
  800.         }
  801.  
  802.  
  803.         #endregion
  804.  
  805.         #region Buffs
  806.  
  807.         /////////////////////////////////
  808.         //Check for Buffs
  809.         /////////////////////////////////
  810.  
  811.         void BuffsCheck()
  812.         {
  813.  
  814.             if (SpellManager.KnownSpells.ContainsKey("Bone Shield"))
  815.             {
  816.                 WoWMovement.MoveStop();
  817.                 Thread.Sleep(100);
  818.                 BoneShield();
  819.  
  820.             }
  821.  
  822.             if (UseHorn)
  823.             {
  824.  
  825.                 if ((!_me.Buffs.ContainsKey("Horn of Winter")))
  826.                 {
  827.  
  828.                     WoWMovement.MoveStop();
  829.                     Thread.Sleep(100);
  830.                     HornOfWinter();
  831.  
  832.                 }
  833.  
  834.             }
  835.  
  836.             if ((UseRaiseDead) && (SpellManager.KnownSpells.ContainsKey("Raise Dead")))
  837.  
  838.                 RaiseDead();
  839.  
  840.         }
  841.  
  842.         #endregion
  843.  
  844.         #region PlayerDetector
  845.  
  846.         //Credit to Hawker for ScanForPlayers()
  847.  
  848.         private List<WoWUnit> ScanForPlayers()
  849.         {
  850.             double d;
  851.             List<WoWUnit> PlayerList = new List<WoWUnit>();
  852.             foreach (WoWObject Player in ObjectManager.ObjectList)
  853.             {
  854.                 if (Player.Type == WoWObjectType.Player && Player.Guid != _me.Guid)
  855.                 {
  856.                     WoWPlayer newPlayer = Player.ToPlayer();
  857.  
  858.                     if (newPlayer.Distance < 100)
  859.                     {
  860.                         d = Math.Round(newPlayer.Distance, 1);
  861.                         Slog("Player Named: " + newPlayer.Name + " Is " + d + " yards away.");
  862.                         SystemSounds.Exclamation.Play();
  863.                     }
  864.  
  865.                     if (followers.ContainsKey(newPlayer))
  866.                     {
  867.                         foreach (KeyValuePair<WoWPlayer, DateTime> guy in followers)
  868.                         {
  869.  
  870.                             if (guy.Key == newPlayer)
  871.                             {
  872.  
  873.                                 TimeSpan duration = DateTime.Now - guy.Value;
  874.  
  875.                             }
  876.                         }
  877.                     }
  878.                     else
  879.                     {
  880.                         followers.Add(newPlayer, DateTime.Now);
  881.                     }
  882.                 }
  883.             }
  884.             return PlayerList;
  885.         }
  886.  
  887.         #endregion
  888.  
  889.         #region ApproachDetector
  890.  
  891.         /////////////////////////////////
  892.         //This will detect if a mob is approaching
  893.         /////////////////////////////////
  894.  
  895.         public bool ApproachDetector()
  896.         {
  897.  
  898.             double ADone;
  899.             double ADtwo;
  900.  
  901.             ADone = _me.CurrentTarget.Distance; //Initial Distance
  902.             Thread.Sleep(100);
  903.             ADtwo = _me.CurrentTarget.Distance; //Secondary Distance
  904.  
  905.             if (ADone > ADtwo) //Difference between the two
  906.             {
  907.                 return true;
  908.             }
  909.  
  910.             return false;
  911.  
  912.         }
  913.  
  914.  
  915.  
  916.         #endregion
  917.  
  918.         #region GetAdds
  919.  
  920.         //Credit to Hawker for getAdds()
  921.  
  922.         private List<WoWUnit> getAdds()
  923.         {
  924.             List<WoWUnit> mobList = new List<WoWUnit>();
  925.             List<WoWUnit> enemyMobList = new List<WoWUnit>();
  926.             List<WoWObject> longList = new List<WoWObject>();
  927.             longList = ObjectManager.ObjectList;
  928.  
  929.             foreach (WoWObject thing in longList)
  930.             {
  931.                 if (thing.Type == WoWObjectType.Unit)
  932.                 {
  933.                     mobList.Add(thing.ToUnit());
  934.                 }
  935.             }
  936.  
  937.             foreach (WoWUnit thing in mobList)
  938.             {
  939.                 if ((thing.Guid != _me.Guid) &&
  940.                     (thing.IsTargetingMe))
  941.                 {
  942.  
  943.                     enemyMobList.Add(thing);
  944.  
  945.                 }
  946.  
  947.             }
  948.  
  949.             if (enemyMobList.Count > 1)
  950.             {
  951.                 if (!AddSpam)
  952.                     Slog("Warning: We have " + enemyMobList.Count.ToString() + " attackers.");
  953.  
  954.                 GotAdds = true;
  955.  
  956.                 AddSpam = true;
  957.  
  958.             }
  959.  
  960.             else
  961.             {
  962.                 GotAdds = false;
  963.  
  964.                 AddSpam = false;
  965.             }
  966.  
  967.             return enemyMobList;
  968.  
  969.         }
  970.  
  971.         #endregion
  972.  
  973.         #region AddsReactor
  974.  
  975.         /////////////////////////////////
  976.         //What to do when we have adds
  977.         /////////////////////////////////
  978.  
  979.         public void AddsReactor()
  980.         {
  981.  
  982.  
  983.         }
  984.  
  985.  
  986.         #endregion
  987.  
  988.         #region StuckDetector
  989.  
  990.         /////////////////////////////////
  991.         //This will detect if we are stuck. Credit to Ninko for the outline
  992.         /////////////////////////////////
  993.  
  994.         public bool StuckDetector()
  995.         {
  996.  
  997.             double Stuckone;
  998.             double Stucktwo;
  999.             double So;
  1000.             double St;
  1001.  
  1002.             Stuckone = _me.CurrentTarget.Distance; //Initial Distance
  1003.             So = Math.Round(Stuckone, 2);
  1004.             Thread.Sleep(100);
  1005.             Stucktwo = _me.CurrentTarget.Distance; //Secondary Distance
  1006.             St = Math.Round(Stucktwo, 2);
  1007.  
  1008.             if (So == St) //Difference between the two
  1009.             {
  1010.                 StuckCount++;
  1011.  
  1012.                 switch (StuckCount)
  1013.                 {
  1014.  
  1015.                     case 1:
  1016.  
  1017.                         Slog("We might be stuck, Jump!");
  1018.                         KeyboardManager.PressKey((char)32); //Jump Key
  1019.                         Thread.Sleep(500);
  1020.                         break;
  1021.  
  1022.                     case 2:
  1023.  
  1024.                         WoWMovement.MoveStop();
  1025.                         Slog("Still Stuck! Strafe Left");
  1026.                         SafeMove(WoWMovement.MovementDirection.Backwards, 1500);
  1027.                         SafeMove(WoWMovement.MovementDirection.StrafeLeft, 1500);
  1028.                         break;
  1029.  
  1030.                     case 3:
  1031.  
  1032.                         WoWMovement.MoveStop();
  1033.                         Slog("Still Stuck! Strafe Right");
  1034.                         SafeMove(WoWMovement.MovementDirection.Backwards, 1500);
  1035.                         SafeMove(WoWMovement.MovementDirection.StrafeRight, 1500);
  1036.                         break;
  1037.  
  1038.                 }
  1039.  
  1040.                 return true;
  1041.  
  1042.             }
  1043.  
  1044.             else
  1045.             {
  1046.                 StuckCount = 0;
  1047.                 return false;
  1048.             }
  1049.  
  1050.         }
  1051.  
  1052.         #endregion
  1053.  
  1054.         #region Auto Attack
  1055.  
  1056.         /////////////////////////////////
  1057.         //Simply makes sure we are attacking
  1058.         /////////////////////////////////
  1059.  
  1060.         public bool AutoAttack()
  1061.         {
  1062.             if (!_me.IsAutoAttacking && ObjectManager.Me.GotTarget)
  1063.             {
  1064.                 if (!ObjectManager.Me.CurrentTarget.Dead)
  1065.                 {
  1066.                     if (_me.Mounted)
  1067.                         Mount.Dismount();
  1068.  
  1069.                     Logging.Write("AutoAttack:{0}", _me.IsAutoAttacking);
  1070.                     Lua.DoString("StartAttack()");
  1071.                     return true;
  1072.                 }
  1073.  
  1074.                 return false;
  1075.  
  1076.             }
  1077.  
  1078.             return false;
  1079.  
  1080.         }
  1081.  
  1082.  
  1083.         #endregion
  1084.  
  1085.         #region Move to Melee
  1086.  
  1087.         /////////////////////////////////
  1088.         //Checks range to target and moves accordingly
  1089.         /////////////////////////////////
  1090.  
  1091.         public bool MoveToMelee()
  1092.         {
  1093.             if (_me.CurrentTarget.Distance > 5) //We need to get in meele range first
  1094.             {
  1095.  
  1096.                 if ((ApproachDetector()) && (WaitForApproach))
  1097.                 {
  1098.  
  1099.                     return true;
  1100.  
  1101.                 }
  1102.  
  1103.                 Navigator.MoveTo(WoWMovement.CalculatePointFrom(_me.CurrentTarget.Location, 4.0f));
  1104.                 Thread.Sleep(500);
  1105.                 Thread.Sleep(100);
  1106.                 if (_me.CurrentTarget.Distance > 4.5)
  1107.                 {
  1108.  
  1109.                     if (StuckDetector())
  1110.                         return true;
  1111.  
  1112.                 }
  1113.  
  1114.                 return true;
  1115.  
  1116.             }
  1117.  
  1118.             else
  1119.             {
  1120.                 RedMessageReactor(); //We might be in melee but not facing the right direction
  1121.                 StuckCount = 0; //No need for stuck detector in meele
  1122.                 return false;
  1123.  
  1124.             }
  1125.  
  1126.  
  1127.  
  1128.         }
  1129.  
  1130.         #endregion
  1131.  
  1132.         #region Rotation : Level 55
  1133.  
  1134.         /////////////////////////////////
  1135.         //Starting Rotation.
  1136.         //Assumes no talents
  1137.         //Only Checks are Death Coil, Range and facing
  1138.         /////////////////////////////////
  1139.  
  1140.         public void StartingRotation()
  1141.         {
  1142.  
  1143.             SRChecks();
  1144.             IcyTouch();
  1145.  
  1146.             SRChecks();
  1147.             PlagueStrike();
  1148.  
  1149.             SRChecks();
  1150.             BloodStrike();
  1151.  
  1152.             Thread.Sleep(1000);
  1153.  
  1154.         }
  1155.  
  1156.         public void SRChecks()
  1157.         {
  1158.  
  1159.             RunicPowerReactor(); //Dump RP if we have it
  1160.             MoveToMelee(); //Range Checks, and faces
  1161.  
  1162.         }
  1163.  
  1164.         #endregion
  1165.  
  1166.         #region Rotation : Mord Unholy
  1167.  
  1168.         /////////////////////////////////
  1169.         //General Unholy Spec based Rotation. Requires level 58
  1170.         //http://talent.mmo-champion.com/?deathknight#_CJTpDsu3dpyiy,FQp,10482
  1171.         //Will not cast Gargoyle till 61
  1172.         //
  1173.         /////////////////////////////////
  1174.  
  1175.  
  1176.         public void MordUnholy()
  1177.         {
  1178.         MUIcyTouch:
  1179.             if (!GotAdds)
  1180.             {
  1181.                 MUChecks();
  1182.                 IcyTouch();
  1183.             }
  1184.  
  1185.         MUPlagueStrike:
  1186.             if (!GotAdds)
  1187.             {
  1188.                 MUChecks();
  1189.                 PlagueStrike();
  1190.             }
  1191.  
  1192.         MUBloodStrikeOne:
  1193.             if (!GotAdds)
  1194.             {
  1195.                 MUChecks();
  1196.                 BloodStrike();
  1197.             }
  1198.  
  1199.         MUScourgeStrike:
  1200.             if (!GotAdds)
  1201.             {
  1202.                 MUChecks();
  1203.                 ScourgeStrike();
  1204.             }
  1205.  
  1206.         MUBloodStrikeTwo:
  1207.             if (!GotAdds)
  1208.             {
  1209.                 MUChecks();
  1210.                 BloodStrike();
  1211.             }
  1212.  
  1213.             Thread.Sleep(1000);
  1214.  
  1215.  
  1216.             if (GotAdds)
  1217.             {
  1218.  
  1219.                 if (!_me.CurrentTarget.Buffs.ContainsKey("Frost Fever"))
  1220.                 {
  1221.                     if (!GotAdds)
  1222.                         goto MUIcyTouch;
  1223.  
  1224.                     MUChecks();
  1225.                     IcyTouch();
  1226.  
  1227.                 }
  1228.  
  1229.                 if (!_me.CurrentTarget.Buffs.ContainsKey("Blood Plague"))
  1230.                 {
  1231.  
  1232.                     if (!GotAdds)
  1233.                         goto MUPlagueStrike;
  1234.  
  1235.                     MUChecks();
  1236.                     PlagueStrike();
  1237.  
  1238.                 }
  1239.  
  1240.                 if (!GotAdds)
  1241.                     goto MUBloodStrikeOne;
  1242.  
  1243.                 MUChecks();
  1244.                 Pestilence();
  1245.  
  1246.                 if (!GotAdds)
  1247.                     goto MUScourgeStrike;
  1248.  
  1249.                 MUChecks();
  1250.                 ScourgeStrike();
  1251.  
  1252.                 if (!GotAdds)
  1253.                     goto MUBloodStrikeTwo;
  1254.  
  1255.                 MUChecks();
  1256.                 BloodBoil();
  1257.  
  1258.                 Thread.Sleep(1000);
  1259.  
  1260.             }
  1261.  
  1262.         }
  1263.  
  1264.         public void MUChecks()
  1265.         {
  1266.  
  1267.             HealReactor(); //Before doing anything. Do we need a heal?
  1268.             MoveToMelee(); //Range Checks, and faces
  1269.             CastReactor(); //If target is casting
  1270.  
  1271.             if (!IgnoreAdds)
  1272.                 getAdds(); //Check for adds while in combat
  1273.  
  1274.             InstantReactor(); //Check instant abilities and use if needed
  1275.             RunicPowerReactor(); //Dump RP if we have it
  1276.  
  1277.         }
  1278.  
  1279.         #endregion
  1280.  
  1281.         #region Rotation : Mord Blood
  1282.  
  1283.         /////////////////////////////////
  1284.         //Mord Blood Spec based Rotation. Requires level 58 (Will use Obliterate at 61)
  1285.         //http://talent.mmo-champion.com/?deathknight#B6_nlQtnrjLKLc,aQO3eO,10192
  1286.         //
  1287.         //Dealing with adds, this will cast Blood Boil instead of the first Heart Strike
  1288.         /////////////////////////////////
  1289.  
  1290.  
  1291.         public void MordBlood()
  1292.         {
  1293.         MBIcyTouch:
  1294.             if (!GotAdds)
  1295.             {
  1296.                 MBChecks();
  1297.                 IcyTouch();
  1298.             }
  1299.  
  1300.         MBPlagueStrike:
  1301.             if (!GotAdds)
  1302.             {
  1303.                 MBChecks();
  1304.                 PlagueStrike();
  1305.             }
  1306.  
  1307.         MBHeartStrikeOne:
  1308.             if (!GotAdds)
  1309.             {
  1310.                 MBChecks();
  1311.                 HeartStrike();
  1312.             }
  1313.  
  1314.         MBHeartStrikeTwo:
  1315.             if (!GotAdds)
  1316.             {
  1317.                 MBChecks();
  1318.                 HeartStrike();
  1319.             }
  1320.  
  1321.         MBObliterate:
  1322.             if (!GotAdds)
  1323.             {
  1324.                 MBChecks();
  1325.                 if (OBCheck())
  1326.                     Obliterate();
  1327.  
  1328.                 else
  1329.                     DeathStrike();
  1330.             }
  1331.  
  1332.             Thread.Sleep(1000);
  1333.  
  1334.  
  1335.             if (GotAdds)
  1336.             {
  1337.  
  1338.                 if (!_me.CurrentTarget.Buffs.ContainsKey("Frost Fever"))
  1339.                 {
  1340.                     if (!GotAdds)
  1341.                         goto MBIcyTouch;
  1342.  
  1343.                     MBChecks();
  1344.                     IcyTouch();
  1345.  
  1346.                 }
  1347.  
  1348.                 if (!_me.CurrentTarget.Buffs.ContainsKey("Blood Plague"))
  1349.                 {
  1350.  
  1351.                     if (!GotAdds)
  1352.                         goto MBPlagueStrike;
  1353.  
  1354.                     MBChecks();
  1355.                     PlagueStrike();
  1356.  
  1357.                 }
  1358.  
  1359.                 if (!GotAdds)
  1360.                     goto MBHeartStrikeOne;
  1361.  
  1362.                 MBChecks();
  1363.                 Pestilence();
  1364.  
  1365.                 if (!GotAdds)
  1366.                     goto MBHeartStrikeTwo;
  1367.  
  1368.                 MBChecks();
  1369.                 BloodBoil();
  1370.  
  1371.                 if (!GotAdds)
  1372.                     goto MBObliterate;
  1373.  
  1374.                 MBChecks();
  1375.                 if (OBCheck())
  1376.                     Obliterate();
  1377.  
  1378.                 else
  1379.                     DeathStrike();
  1380.  
  1381.                 Thread.Sleep(1000);
  1382.  
  1383.             }
  1384.  
  1385.         }
  1386.  
  1387.         public void MBChecks()
  1388.         {
  1389.  
  1390.             HealReactor(); //Before doing anything. Do we need a heal?            
  1391.             CastReactor(); //If target is casting
  1392.             MoveToMelee(); //Range Checks, and faces
  1393.  
  1394.             if (!IgnoreAdds)
  1395.                 getAdds(); //Check for adds while in combat
  1396.  
  1397.             InstantReactor(); //Check instant abilities and use if needed
  1398.             RunicPowerReactor(); //Dump RP if we have it
  1399.             EvadeCheck();
  1400.  
  1401.         }
  1402.  
  1403.         public bool OBCheck() //Check if we can use Obliterate
  1404.         {
  1405.             if (SpellManager.KnownSpells.ContainsKey("Obliterate"))
  1406.                 return true;
  1407.  
  1408.             else
  1409.                 return false;
  1410.  
  1411.         }
  1412.  
  1413.  
  1414.  
  1415.         #endregion
  1416.  
  1417.         #region Rotation : Mord Frost
  1418.  
  1419.         /////////////////////////////////
  1420.         //General Frost Spec based Rotation. Requires level 58
  1421.         //http://talent.mmo-champion.com/?deathknight#B6_nlOT93KK8yYm,FQp,10482
  1422.         //        
  1423.         /////////////////////////////////
  1424.  
  1425.  
  1426.         public void MordFrost()
  1427.         {
  1428.         MFIcyTouch:
  1429.             if (!GotAdds)
  1430.             {
  1431.                 MFChecks();
  1432.                 DeathChill();
  1433.                 IcyTouch();
  1434.             }
  1435.  
  1436.         MFPlagueStrike:
  1437.             if (!GotAdds)
  1438.             {
  1439.                 MFChecks();
  1440.                 PlagueStrike();
  1441.             }
  1442.  
  1443.         MFBloodStrikeOne:
  1444.             if (!GotAdds)
  1445.             {
  1446.                 MFChecks();
  1447.                 BloodStrike();
  1448.             }
  1449.  
  1450.         MFBloodStrikeTwo:
  1451.             if (!GotAdds)
  1452.             {
  1453.                 MFChecks();
  1454.                 BloodStrike();
  1455.             }
  1456.  
  1457.         MFIcyTouchTwo:
  1458.             if (!GotAdds)
  1459.             {
  1460.                 MFChecks();
  1461.                 DeathChill();
  1462.                 IcyTouch();
  1463.             }
  1464.  
  1465.         MFPlagueStrikeTwo:
  1466.             if (!GotAdds)
  1467.             {
  1468.                 MFChecks();
  1469.                 PlagueStrike();
  1470.             }
  1471.  
  1472.  
  1473.             if (GotAdds)
  1474.             {
  1475.  
  1476.                 if (!_me.CurrentTarget.Buffs.ContainsKey("Frost Fever"))
  1477.                 {
  1478.                     if (!GotAdds)
  1479.                         goto MFIcyTouch;
  1480.  
  1481.                     MFChecks();
  1482.                     DeathChill();
  1483.                     IcyTouch();
  1484.  
  1485.                 }
  1486.  
  1487.                 if (!_me.CurrentTarget.Buffs.ContainsKey("Blood Plague"))
  1488.                 {
  1489.  
  1490.                     if (!GotAdds)
  1491.                         goto MFPlagueStrike;
  1492.  
  1493.                     MFChecks();
  1494.                     PlagueStrike();
  1495.  
  1496.                 }
  1497.  
  1498.                 if (!GotAdds)
  1499.                     goto MFBloodStrikeOne;
  1500.  
  1501.                 MFChecks();
  1502.                 Pestilence();
  1503.  
  1504.                 if (!GotAdds)
  1505.                     goto MFBloodStrikeTwo;
  1506.  
  1507.                 MFChecks();
  1508.                 HungeringCold();
  1509.  
  1510.                 if (!GotAdds)
  1511.                     goto MFIcyTouchTwo;
  1512.  
  1513.                 MFChecks();
  1514.                 IcyTouch();
  1515.  
  1516.                 if (!GotAdds)
  1517.                     goto MFPlagueStrikeTwo;
  1518.  
  1519.                 MFChecks();
  1520.                 PlagueStrike();
  1521.  
  1522.             }
  1523.  
  1524.         }
  1525.  
  1526.         public void MFChecks()
  1527.         {
  1528.  
  1529.             HealReactor(); //Before doing anything. Do we need a heal?
  1530.             MoveToMelee(); //Range Checks, and faces
  1531.             CastReactor(); //If target is casting
  1532.  
  1533.             if (!IgnoreAdds)
  1534.                 getAdds(); //Check for adds while in combat
  1535.  
  1536.             InstantReactor(); //Check instant abilities and use if needed
  1537.             RunicPowerReactor(); //Dump RP if we have it
  1538.  
  1539.         }
  1540.  
  1541.         #endregion
  1542.  
  1543.         #region Frost Spells
  1544.  
  1545.         /////////////////////////////////
  1546.         //Icy Touch (Req Level 55) Frost
  1547.         /////////////////////////////////
  1548.  
  1549.         void IcyTouch()
  1550.         {
  1551.  
  1552.             if (_me.CurrentTarget.Distance <= 19) //Range Check
  1553.             {
  1554.  
  1555.                 if (SpellManager.CanCastSpell("Icy Touch"))
  1556.                 {
  1557.  
  1558.                     SpellManager.CastSpell("Icy Touch"); //Do It!                                                
  1559.  
  1560.                     if (UseSlog)
  1561.                         Slog("**Icy Touch**");
  1562.  
  1563.                 }
  1564.  
  1565.                 else
  1566.                 {
  1567.                     if (UseUltraSlog)
  1568.                         Slog("**Icy Touch** not ready");
  1569.                 }
  1570.             }
  1571.  
  1572.             else
  1573.             {
  1574.                 if (UseUltraSlog)
  1575.                     Slog("Range error on **Icy Touch**");
  1576.             }
  1577.  
  1578.  
  1579.         }
  1580.  
  1581.         /////////////////////////////////////
  1582.         //Icebound Fortitude (Req Level 62) Frost
  1583.         /////////////////////////////////////
  1584.  
  1585.         void IceboundFortitude()
  1586.         {
  1587.             if (SpellManager.KnownSpells.ContainsKey("Icebound Fortitude")) //IF
  1588.             {
  1589.  
  1590.                 if (SpellManager.CanCastSpell("Icebound Fortitude"))
  1591.                 {
  1592.  
  1593.                     SpellManager.CastSpell("Icebound Fortitude"); //Do It!
  1594.  
  1595.                     if (UseSlog)
  1596.                         Slog("Icebound Fortitude");
  1597.  
  1598.                 }
  1599.  
  1600.             }
  1601.  
  1602.             else
  1603.                 Slog("Can not find Icebound Fortitude... Check Bars"); //PS not found
  1604.  
  1605.             UseIceboundFortitude = false; //Disable Spell
  1606.  
  1607.         }
  1608.  
  1609.         /////////////////////////////////////
  1610.         //Unbreakable Armor (Req 30 Frost Talent) Frost
  1611.         /////////////////////////////////////
  1612.  
  1613.         void UnbreakableArmor()
  1614.         {
  1615.  
  1616.  
  1617.             if (SpellManager.CanCastSpell("Unbreakable Armor"))
  1618.             {
  1619.  
  1620.                 SpellManager.CastSpell("Unbreakable Armor"); //Do It!
  1621.  
  1622.                 if (UseSlog)
  1623.                     Slog("Heath is low... **Unbreakable Armor**");
  1624.  
  1625.  
  1626.             }
  1627.  
  1628.             else
  1629.             {
  1630.                 if (UseUltraSlog)
  1631.                     Slog("**Unbreakable** not ready");
  1632.             }
  1633.  
  1634.         }
  1635.  
  1636.         /////////////////////////////////////
  1637.         //Hungering Cold (Req 30 Frost Talent) Frost
  1638.         /////////////////////////////////////
  1639.  
  1640.         void HungeringCold()
  1641.         {
  1642.  
  1643.  
  1644.             if (SpellManager.CanCastSpell("Hungering Cold"))
  1645.             {
  1646.  
  1647.                 SpellManager.CastSpell("Hungering Cold"); //Do It!
  1648.  
  1649.                 if (UseSlog)
  1650.                     Slog("**Hungering Cold**");
  1651.  
  1652.                 HCToggle = false;
  1653.  
  1654.             }
  1655.  
  1656.             else
  1657.             {
  1658.                 if (UseUltraSlog)
  1659.                     Slog("**Hungering Cold** not ready");
  1660.             }
  1661.  
  1662.         }
  1663.  
  1664.         /////////////////////////////////////
  1665.         //Howling Blast (Req 50 Frost Talent) Frost
  1666.         /////////////////////////////////////
  1667.  
  1668.         void HowlingBlast()
  1669.         {
  1670.  
  1671.  
  1672.  
  1673.             if (SpellManager.CanCastSpell("Howling Blast")) //Ready?
  1674.             {
  1675.                 SpellManager.CastSpell("Howling Blast"); //Do It!                        
  1676.  
  1677.                 if (UseSlog)
  1678.                     Slog("Rime Detected! **Howling Blast**");
  1679.  
  1680.             }
  1681.  
  1682.             else
  1683.             {
  1684.                 if (UseUltraSlog)
  1685.                     Slog("**Howling Blast** not ready");
  1686.             }
  1687.  
  1688.  
  1689.         }
  1690.  
  1691.         /////////////////////////////////////
  1692.         //Frost Strike (Req 40 Frost Talent) Frost
  1693.         /////////////////////////////////////
  1694.  
  1695.         void FrostStrike()
  1696.         {
  1697.  
  1698.             if (_me.CurrentTarget.Distance <= 5) //Range Check
  1699.             {
  1700.  
  1701.                 if (SpellManager.CanCastSpell("Frost Strike")) //Ready?
  1702.                 {
  1703.                     SpellManager.CastSpell("Frost Strike"); //Do It!                      
  1704.  
  1705.                     if (UseSlog)
  1706.                         Slog("**Frost Strike**");
  1707.  
  1708.  
  1709.                 }
  1710.  
  1711.                 else
  1712.                 {
  1713.                     if (UseUltraSlog)
  1714.                         Slog("**Frost Strike** not ready");
  1715.                 }
  1716.             }
  1717.  
  1718.             else
  1719.             {
  1720.  
  1721.                 if (UseUltraSlog)
  1722.                     Slog("Range error on **Frost Strike**");
  1723.             }
  1724.  
  1725.         }
  1726.  
  1727.         /////////////////////////////////////
  1728.         //Deathchill (Req 20 Frost Talent) Frost
  1729.         /////////////////////////////////////
  1730.  
  1731.         void DeathChill()
  1732.         {
  1733.  
  1734.             if (SpellManager.CanCastSpell("Deathchill"))
  1735.             {
  1736.  
  1737.                 SpellManager.CastSpell("Deathchill"); //Do It!
  1738.  
  1739.                 if (UseSlog)
  1740.                     Slog("**Deathchill**");
  1741.  
  1742.  
  1743.             }
  1744.  
  1745.             else
  1746.             {
  1747.                 if (UseUltraSlog)
  1748.                     Slog("**Deathchill** not ready");
  1749.             }
  1750.  
  1751.         }
  1752.  
  1753.         #endregion
  1754.  
  1755.         #region Unholy Spells
  1756.  
  1757.         /////////////////////////////////////
  1758.         //Plague Strike (Req Level 55) Unholy
  1759.         /////////////////////////////////////
  1760.  
  1761.         void PlagueStrike()
  1762.         {
  1763.  
  1764.             if (_me.CurrentTarget.Distance <= 5) //Range Check
  1765.             {
  1766.  
  1767.                 if (SpellManager.CanCastSpell("Plague Strike")) //Ready?
  1768.                 {
  1769.                     SpellManager.CastSpell("Plague Strike"); //Do It!                        
  1770.  
  1771.                     if (UseSlog)
  1772.                         Slog("**Plague Strike**");
  1773.  
  1774.                 }
  1775.  
  1776.                 else
  1777.                 {
  1778.                     if (UseUltraSlog)
  1779.                         Slog("**Plague Strike** not ready");
  1780.                 }
  1781.             }
  1782.  
  1783.             else
  1784.             {
  1785.  
  1786.                 if (UseUltraSlog)
  1787.                     Slog("Range error on **Plague Strike**");
  1788.             }
  1789.  
  1790.         }
  1791.  
  1792.         /////////////////////////////////////
  1793.         //Bone Shield (Requires 35 Unholy Talent)
  1794.         /////////////////////////////////////
  1795.  
  1796.         public void BoneShield()
  1797.         {
  1798.  
  1799.             if (SpellManager.CanCastSpell("Bone Shield")) //Ready?
  1800.             {
  1801.                 SpellManager.CastSpell("Bone Shield"); //Do It!                        
  1802.  
  1803.                 if (UseSlog)
  1804.                     Slog("**Bone Shield**");
  1805.  
  1806.                 Thread.Sleep(2750); //Try to save refresh time
  1807.  
  1808.             }
  1809.  
  1810.             else
  1811.             {
  1812.                 if (UseUltraSlog)
  1813.                     Slog("**Bone Shield** not ready");
  1814.             }
  1815.         }
  1816.  
  1817.         /////////////////////////////////////
  1818.         //Summon Gargoyle (Req 51 Unholy Talent) Unholy
  1819.         /////////////////////////////////////
  1820.  
  1821.         void SummonGargoyle()
  1822.         {
  1823.             if (SpellManager.CanCastSpell("Summon Gargoyle")) //Ready?
  1824.             {
  1825.  
  1826.                 SpellManager.CastSpell("Summon Gargoyle"); //Do It!
  1827.  
  1828.                 if (UseSlog)
  1829.                     Slog("**Summon Gargoyle**");
  1830.  
  1831.                 SGToggle = false; //Go back to RP Dump
  1832.  
  1833.             }
  1834.  
  1835.             else
  1836.             {
  1837.                 if (UseUltraSlog)
  1838.                     Slog("**Summon Gargoyle** not ready");
  1839.  
  1840.             }
  1841.  
  1842.  
  1843.         }
  1844.  
  1845.         #endregion
  1846.  
  1847.         #region Blood Spells
  1848.  
  1849.         /////////////////////////////////////
  1850.         //Blood Strike (Req Level 55) Blood
  1851.         /////////////////////////////////////
  1852.  
  1853.         void BloodStrike()
  1854.         {
  1855.             if (_me.CurrentTarget.Distance <= 5) //Range Check
  1856.             {
  1857.  
  1858.                 if (SpellManager.CanCastSpell("Blood Strike")) //Ready?
  1859.                 {
  1860.                     SpellManager.CastSpell("Blood Strike"); //Do It!                      
  1861.  
  1862.                     if (UseSlog)
  1863.                         Slog("**Blood Strike**");
  1864.  
  1865.  
  1866.                 }
  1867.  
  1868.                 else
  1869.                 {
  1870.                     if (UseUltraSlog)
  1871.                         Slog("**Blood Strike** not ready");
  1872.                 }
  1873.             }
  1874.  
  1875.             else
  1876.             {
  1877.  
  1878.                 if (UseUltraSlog)
  1879.                     Slog("Range error on **Blood Strike**");
  1880.             }
  1881.  
  1882.         }
  1883.  
  1884.         /////////////////////////////////////
  1885.         //Rune Tap (Req 10 Point Blood Talent)
  1886.         /////////////////////////////////////
  1887.  
  1888.         void RuneTap()
  1889.         {
  1890.  
  1891.             if (SpellManager.CanCastSpell("Rune Tap")) //Ready?
  1892.             {
  1893.  
  1894.                 SpellManager.CastSpell("Rune Tap"); //Do It!
  1895.  
  1896.                 if (UseSlog)
  1897.                     Slog("Health is at " + _me.HealthPercent + "%. **Rune Tap**");
  1898.  
  1899.  
  1900.             }
  1901.  
  1902.             else
  1903.             {
  1904.  
  1905.                 if (UseUltraSlog)
  1906.                     Slog("**Rune Tap** not ready");
  1907.  
  1908.             }
  1909.  
  1910.         }
  1911.  
  1912.         /////////////////////////////////////
  1913.         //Pestilence (Req Level 56) Blood
  1914.         /////////////////////////////////////
  1915.  
  1916.         void Pestilence()
  1917.         {
  1918.  
  1919.             if (_me.CurrentTarget.Distance <= 10) //Range Check
  1920.             {
  1921.  
  1922.                 if (SpellManager.CanCastSpell("Pestilence")) //Ready?
  1923.                 {
  1924.                     SpellManager.CastSpell("Pestilence"); //Do It!                        
  1925.  
  1926.                     if (UseSlog)
  1927.                         Slog("**Pestilence**");
  1928.  
  1929.  
  1930.                 }
  1931.  
  1932.                 else
  1933.                 {
  1934.                     if (UseUltraSlog)
  1935.                         Slog("**Pestilence** not ready");
  1936.                 }
  1937.             }
  1938.  
  1939.             else
  1940.             {
  1941.  
  1942.                 if (UseUltraSlog)
  1943.                     Slog("Range error on **Pestilence**");
  1944.             }
  1945.  
  1946.         }
  1947.  
  1948.         /////////////////////////////////////
  1949.         //Heart Strike (Req 40 Blood Talen) Blood
  1950.         /////////////////////////////////////
  1951.  
  1952.         void HeartStrike()
  1953.         {
  1954.  
  1955.             if (_me.CurrentTarget.Distance <= 5) //Range Check
  1956.             {
  1957.  
  1958.                 if (SpellManager.CanCastSpell("Heart Strike")) //Ready?
  1959.                 {
  1960.                     SpellManager.CastSpell("Heart Strike"); //Do It!                        
  1961.  
  1962.                     if (UseSlog)
  1963.                         Slog("**Heart Strike**");
  1964.  
  1965.  
  1966.                 }
  1967.  
  1968.                 else
  1969.                 {
  1970.                     if (UseUltraSlog)
  1971.                         Slog("**Heart Strike** not ready");
  1972.                 }
  1973.             }
  1974.  
  1975.             else
  1976.             {
  1977.  
  1978.                 if (UseUltraSlog)
  1979.                     Slog("Range error on **Heart Strike**");
  1980.             }
  1981.  
  1982.         }
  1983.  
  1984.         /////////////////////////////////////
  1985.         //Blood Boil (Req Level 58) Blood
  1986.         /////////////////////////////////////
  1987.  
  1988.         void BloodBoil()
  1989.         {
  1990.  
  1991.             if (_me.CurrentTarget.Distance <= 10) //Range Check
  1992.             {
  1993.  
  1994.                 if (SpellManager.CanCastSpell("Blood Boil")) //Ready?
  1995.                 {
  1996.                     SpellManager.CastSpell("Blood Boil"); //Do It!                      
  1997.  
  1998.                     if (UseSlog)
  1999.                         Slog("**Blood Boil**");
  2000.  
  2001.  
  2002.                 }
  2003.  
  2004.                 else
  2005.                 {
  2006.                     if (UseUltraSlog)
  2007.                         Slog("**Blood Boil** not ready");
  2008.                 }
  2009.             }
  2010.  
  2011.             else
  2012.             {
  2013.  
  2014.                 if (UseUltraSlog)
  2015.                     Slog("Range error on **Blood Boil**");
  2016.             }
  2017.  
  2018.         }
  2019.  
  2020.         /////////////////////////////////////
  2021.         //Strangulate (Req Level 59) Blood
  2022.         /////////////////////////////////////
  2023.  
  2024.         void Strangulate()
  2025.         {
  2026.             if (SpellManager.KnownSpells.ContainsKey("Strangulate")) //Found Str
  2027.             {
  2028.  
  2029.                 if (_me.CurrentTarget.Distance <= 29) //Range Check
  2030.                 {
  2031.  
  2032.                     if (SpellManager.CanCastSpell("Strangulate"))
  2033.                     {
  2034.                         SpellManager.CastSpell("Strangulate"); //Do It!
  2035.  
  2036.                         if (UseSlog)
  2037.                             Slog("Strangulate");
  2038.  
  2039.                     }
  2040.                 }
  2041.  
  2042.             }
  2043.  
  2044.             else
  2045.             {
  2046.  
  2047.                 Slog("Can not find Strangulate... Check Bars"); //BS not found
  2048.  
  2049.                 UseStrangulate = false; //Disable Spell
  2050.             }
  2051.         }
  2052.  
  2053.         /////////////////////////////////////
  2054.         //Mark of Blood (Req 20 Blood Talent) Blood
  2055.         /////////////////////////////////////
  2056.  
  2057.         void MarkOfBlood()
  2058.         {
  2059.  
  2060.             if (_me.CurrentTarget.Distance <= 29) //Range Check
  2061.             {
  2062.  
  2063.                 if (SpellManager.CanCastSpell("Mark of Blood")) //Ready?
  2064.                 {
  2065.                     SpellManager.CastSpell("Mark of Blood"); //Do It!
  2066.  
  2067.                     if (UseSlog)
  2068.                         Slog("Health is low... **Mark of Blood**");
  2069.  
  2070.  
  2071.                 }
  2072.  
  2073.                 else
  2074.                 {
  2075.                     if (UseUltraSlog)
  2076.                         Slog("**Mark of Blood** not ready");
  2077.                 }
  2078.             }
  2079.  
  2080.             else
  2081.             {
  2082.  
  2083.                 if (UseUltraSlog)
  2084.                     Slog("Range error on **Mark of Blood**");
  2085.             }
  2086.  
  2087.         }
  2088.  
  2089.         /////////////////////////////////////
  2090.         //Vampiric Blood (Req 35 Blood Talent) Blood
  2091.         /////////////////////////////////////
  2092.  
  2093.         void VampiricBlood()
  2094.         {
  2095.  
  2096.             if (SpellManager.CanCastSpell("Vampiric Blood"))
  2097.             {
  2098.  
  2099.                 SpellManager.CastSpell("Vampiric Blood"); //Do It!
  2100.  
  2101.                 if (UseSlog)
  2102.                     Slog("Heath is low... **Vampiric Blood**");
  2103.  
  2104.  
  2105.             }
  2106.  
  2107.         }
  2108.  
  2109.         /////////////////////////////////////
  2110.         //Hysteria (Req 30 Blood Talents) Blood
  2111.         /////////////////////////////////////
  2112.  
  2113.         void Hysteria()
  2114.         {
  2115.             if (SpellManager.CanCastSpell("Hysteria"))
  2116.             {
  2117.                 _me.Target(); //Target Self
  2118.  
  2119.                 SpellManager.CastSpell("Hysteria"); //Do It!
  2120.  
  2121.                 if (UseSlog)
  2122.                     Slog("Hysteria");
  2123.  
  2124.                 _me.TargetLastTarget(); //Target our last target
  2125.  
  2126.  
  2127.             }
  2128.  
  2129.         }
  2130.  
  2131.         #endregion
  2132.  
  2133.         #region Hybrid Spells
  2134.  
  2135.         /////////////////////////////////////
  2136.         //Obliterate (Req Level 61) Frost/Unholy
  2137.         /////////////////////////////////////
  2138.  
  2139.         void Obliterate()
  2140.         {
  2141.  
  2142.             if (_me.CurrentTarget.Distance <= 5) //Range Check
  2143.             {
  2144.  
  2145.                 if (SpellManager.CanCastSpell("Obliterate"))
  2146.                 {
  2147.                     SpellManager.CastSpell("Obliterate"); //Do It!
  2148.  
  2149.                     if (UseSlog)
  2150.                         Slog("**Obliterate**");
  2151.  
  2152.  
  2153.                 }
  2154.  
  2155.                 else
  2156.                 {
  2157.                     if (UseUltraSlog)
  2158.                         Slog("**Obliterate** not ready");
  2159.                 }
  2160.             }
  2161.  
  2162.             else
  2163.             {
  2164.  
  2165.                 if (UseUltraSlog)
  2166.                     Slog("Range error on **Obliterate**");
  2167.             }
  2168.  
  2169.         }
  2170.  
  2171.         /////////////////////////////////////
  2172.         //Scourge Strike (Req 40 Unholy Talents) Unholy/Frost
  2173.         /////////////////////////////////////
  2174.  
  2175.         void ScourgeStrike()
  2176.         {
  2177.  
  2178.             if (_me.CurrentTarget.Distance <= 5) //Range Check
  2179.             {
  2180.  
  2181.                 if (SpellManager.CanCastSpell("Scourge Strike")) //Ready?
  2182.                 {
  2183.                     SpellManager.CastSpell("Scourge Strike"); //Do It!                      
  2184.  
  2185.                     if (UseSlog)
  2186.                         Slog("**Scourge Strike**");
  2187.  
  2188.  
  2189.                 }
  2190.  
  2191.                 else
  2192.                 {
  2193.                     if (UseUltraSlog)
  2194.                         Slog("**Scourge Strike** not ready");
  2195.                 }
  2196.             }
  2197.  
  2198.             else
  2199.             {
  2200.  
  2201.                 if (UseUltraSlog)
  2202.                     Slog("Range error on **Scourge Strike**");
  2203.             }
  2204.  
  2205.         }
  2206.  
  2207.         /////////////////////////////////////
  2208.         //Death Strike Level 56 Unholy/Frost
  2209.         /////////////////////////////////////
  2210.  
  2211.         void DeathStrike()
  2212.         {
  2213.  
  2214.             if (_me.CurrentTarget.Distance <= 5) //Range Check
  2215.             {
  2216.  
  2217.                 if (SpellManager.CanCastSpell("Death Strike")) //Ready?
  2218.                 {
  2219.                     SpellManager.CastSpell("Death Strike"); //Do It!                      
  2220.  
  2221.                     if (UseSlog)
  2222.                         Slog("**Death Strike**");
  2223.  
  2224.  
  2225.                 }
  2226.  
  2227.                 else
  2228.                 {
  2229.                     if (UseUltraSlog)
  2230.                         Slog("**Death Strike** not ready");
  2231.                 }
  2232.             }
  2233.  
  2234.             else
  2235.             {
  2236.  
  2237.                 if (UseUltraSlog)
  2238.                     Slog("Range error on **Death Strike**");
  2239.             }
  2240.  
  2241.         }
  2242.  
  2243.         #endregion
  2244.  
  2245.         #region Runic Power Spells
  2246.  
  2247.         /////////////////////////////////////
  2248.         //Death Coil (Req Level 55) Runic Power
  2249.         /////////////////////////////////////
  2250.  
  2251.         void DeathCoil()
  2252.         {
  2253.  
  2254.             if (_me.CurrentTarget.Distance <= 29) //Range Check
  2255.             {
  2256.  
  2257.                 if (SpellManager.CanCastSpell("Death Coil")) //Ready?
  2258.                 {
  2259.                     SpellManager.CastSpell("Death Coil"); //Do It!                      
  2260.  
  2261.                     if (UseSlog)
  2262.                         Slog("^^Death Coil^^");
  2263.  
  2264.                 }
  2265.  
  2266.                 else
  2267.                 {
  2268.  
  2269.                     if (UseUltraSlog)
  2270.                         Slog("**Death Coil** not ready");
  2271.  
  2272.                 }
  2273.             }
  2274.  
  2275.             else
  2276.             {
  2277.  
  2278.                 if (UseUltraSlog)
  2279.                     Slog("Range error on **Death Coil**");
  2280.  
  2281.             }
  2282.  
  2283.  
  2284.         }
  2285.  
  2286.         /////////////////////////////////////
  2287.         //Mind Freeze (Req Level 57) Runic Power
  2288.         /////////////////////////////////////
  2289.  
  2290.         void MindFreeze()
  2291.         {
  2292.             if (SpellManager.KnownSpells.ContainsKey("Mind Freeze")) //Found MF
  2293.             {
  2294.                 if (_me.CurrentRunicPower > 20) //Need 20 RP to cast
  2295.                 {
  2296.  
  2297.                     if (SpellManager.CanCastSpell("Mind Freeze"))
  2298.                     {
  2299.                         if (_me.CurrentTarget.Distance <= 5) //Range Check
  2300.                         {
  2301.  
  2302.                             SpellManager.CastSpell("Mind Freeze"); //Do It!
  2303.  
  2304.                             if (UseSlog)
  2305.                                 Slog("^^Mind Freeze^^");
  2306.  
  2307.                         }
  2308.  
  2309.                         else
  2310.                             Slog("Can not cast Mind Freeze...Out of Range"); //MF not found                        
  2311.  
  2312.                     }
  2313.                 }
  2314.                 else
  2315.                     Slog("Not enoph Runic Power to cast **Mind Freeze**"); //20 RP not available
  2316.  
  2317.             }
  2318.  
  2319.             else
  2320.                 Slog("Can not find Mind Freeze... Check Bars"); //MF not found
  2321.         }
  2322.  
  2323.         /////////////////////////////////////
  2324.         //Dancing Rune Weapon (Req 51 Blood Talent)
  2325.         /////////////////////////////////////
  2326.  
  2327.         void DRW()
  2328.         {
  2329.             if (SpellManager.CanCastSpell("Dancing Rune Weapon")) //Ready?
  2330.             {
  2331.                 if ((_me.CurrentTarget.CurrentHealth > DRWThreshold))
  2332.                 {
  2333.  
  2334.                     SpellManager.CastSpell("Dancing Rune Weapon"); //Do It!
  2335.  
  2336.                     if (UseSlog)
  2337.                         Slog("^^Dancing Rune Weapon^^");
  2338.  
  2339.  
  2340.                     DRWToggle = false; //Go back to RP Dump
  2341.  
  2342.                     DRWSpam = false; //Reset Spam
  2343.  
  2344.                 }
  2345.                 else
  2346.                 {
  2347.  
  2348.                     Slog("Target near death... Save DRW");
  2349.  
  2350.                     DRWToggle = false; //Go back to RP Dump                    
  2351.  
  2352.                 }
  2353.             }
  2354.  
  2355.             else
  2356.             {
  2357.                 if (UseUltraSlog)
  2358.                     Slog("**Dancing Rune Weapon** not ready");
  2359.  
  2360.             }
  2361.  
  2362.  
  2363.         }
  2364.  
  2365.         #endregion
  2366.  
  2367.         #region Other Spells
  2368.  
  2369.         /////////////////////////////////////
  2370.         //Death Grip (Req Level 55)
  2371.         /////////////////////////////////////
  2372.  
  2373.         void DeathGrip()
  2374.         {
  2375.  
  2376.             if (SpellManager.CanCastSpell("Death Grip")) //Spell Ready?
  2377.             {
  2378.  
  2379.                 WoWMovement.MoveStop();
  2380.                 SpellManager.CastSpell("Death Grip"); //Do It!
  2381.                 WoWMovement.MoveStop();
  2382.  
  2383.                 if (UseSlog)
  2384.                     Slog("Pull with ##Death Grip##");
  2385.  
  2386.                 Thread.Sleep(500);
  2387.  
  2388.             }
  2389.  
  2390.             else
  2391.             {
  2392.  
  2393.                 if (UseUltraSlog)
  2394.                     Slog("**Death Grip** not ready");
  2395.  
  2396.             }
  2397.  
  2398.         }
  2399.  
  2400.         /////////////////////////////////////
  2401.         //Horn of Winter (Level 65)
  2402.         /////////////////////////////////////
  2403.  
  2404.         public void HornOfWinter()
  2405.         {
  2406.             if (SpellManager.KnownSpells.ContainsKey("Horn of Winter")) //Found Horn
  2407.             {
  2408.  
  2409.                 if (SpellManager.CanCastSpell("Horn of Winter")) //Ready?
  2410.                 {
  2411.  
  2412.                     SpellManager.CastSpell("Horn of Winter"); //Do It!                        
  2413.  
  2414.                     if (UseSlog)
  2415.                         Slog("**Horn of Winter**");
  2416.  
  2417.                     Thread.Sleep(1500);
  2418.  
  2419.                 }
  2420.  
  2421.                 else
  2422.                 {
  2423.  
  2424.                     if (UseUltraSlog)
  2425.                         Slog("**Horn of Winter** not ready");
  2426.  
  2427.                 }
  2428.  
  2429.             }
  2430.  
  2431.             else
  2432.             {
  2433.  
  2434.                 Slog("Can not find Horn of Winter... Check Bars"); //HoW not found
  2435.  
  2436.                 UseHorn = false; //Disable Spell
  2437.  
  2438.             }
  2439.  
  2440.         }
  2441.  
  2442.         /////////////////////////////////////
  2443.         //Dark Command (Req Level 65)
  2444.         /////////////////////////////////////
  2445.  
  2446.         void DarkCommand()
  2447.         {
  2448.  
  2449.             if (SpellManager.KnownSpells.ContainsKey("Dark Command")) //Found DC
  2450.             {
  2451.  
  2452.                 if (SpellManager.CanCastSpell("Dark Command")) //Spell Ready?
  2453.                 {
  2454.  
  2455.                     SpellManager.CastSpell("Dark Command"); //Do It!                  
  2456.  
  2457.                     if (UseSlog)
  2458.                         Slog("Pull with ##Dark Command##");
  2459.  
  2460.  
  2461.                 }
  2462.  
  2463.                 else