Jump to content

Frost DK Rotation ( Help Needed! )


Recommended Posts

This is a C# Frost Death Knight Rotation I have put together. I am Wondering if everything Looks right and will work as I am Intending too. Any Help is completely appreciated. This is my First Attempt at C# Coding so I am willing to listen to any and all criticism.

 

Please Show Your Work a well so I can learn as I go. I built this in one day. I'm kinda proud of myself. +Rep to McRo for the Custom Fight Class. I use his a base to start. I have also Attacked the File to this post to try and give you all the help to help me out. I will be Making a Blood and a Unholy Rotation as Well. I am playing all the tank classes. So I will be releasing One for all of them soon-ish.

 

 

using System;
using System.Threading;
using System.Windows.Forms;
using robotManager.Helpful;
using robotManager.Products;
using wManager.Wow.Class;
using wManager.Wow.Enums;
using wManager.Wow.Helpers;
using wManager.Wow.ObjectManager;
using Timer = robotManager.Helpful.Timer;

public class Main : ICustomClass
{
    public float Range { get { return 4.5f; } }

    private bool _isLaunched;
    private ulong _lastTarget;

    public void Initialize() // When product started, initialize and launch Fightclass
    {
        _isLaunched = true;
        Logging.Write("Frost DK 7.2.5 Is Running!");
        Rotation();
    }

    public void Dispose() // When product stopped
    {
        _isLaunched = false;
        Logging.Write("Frost DK 7.2.5 Is Not Running!");
    }

    public void ShowConfiguration() // When use click on Fight class settings
    {
       // MessageBox.Show("Frost Death Knight No setting for this Fight Class.");
    }

    // SPELLS:
    // Buff:
    public Spell PillarofFrost = new Spell("Pillar of Frost");
    public Spell EmpowerRuneWeapon = new Spell("Empower Rune Weapon");
    public Spell HungeringRuneWeapon = new Spell("Hungering Rune Weapon");
    public Spell HornofWinter = new Spell("Horn of Winter");
    public Spell WraithWalk = new Spell("Wraith Walk");
    public Spell Anti-MagicShell = new Spell("Anti-Magic Shell");
    public Spell BreathofSindragosa = new Spell("Breath of Sindragosa");
    public Spell Obliteration = new Spell("Obliteration");
    public Spell IceBoundFortitude = new Spell("Ice Bound Fortitude");
    // Racial Buff:
    public Spell DarkFlight = new Spell("DarkFlight");
    public Spell ArcaneTorrent = new Spell("Arcane Torrent")
    public Spell Berserking = new Spell("Berserking");
    public Spell BloodFury = new Spell("Blood Fury");
    public Spell EscapeArtist = new Spell("Escape Artist");
    public Spell EveryManforHimself = new Spell("Every Man for Himself");
    public Spell GiftoftheNaaru = new Spell("Gift of the Naaru");
    public Spell Stoneform = new Spell("Stoneform");
    public Spell WarStomp = new Spell("War Stomp");
    public Spell WilloftheForsaken = new Spell("Will of the Forsaken");
    public Spell Shadowmeld = new Spell("Shadowmeld");
    // Pull:
    public Spell DeathGrip = new Spell("Death Grip");
    public Spell DarkCommand = new Spell("Dark Command");
    // Combat:
    public Spell RemorselessWinter = new Spell("Remorseless Winter");
    public Spell HowlingBlast = new Spell("Howling Blast");
    public Spell Obliterate = new Spell("Obliterate");
    public Spell FrostStrike = new Spell("Frost Strike");
    public Spell Frostscythe = new Spell("Frostscythe");
    public Spell BreathofSindragosa = new Spell("Breath of Sindragosa");
    public Spell Sindragosa'sFury = new Spell("Sindragosa's Fury");
    public Spell GlacialAdvance = new Spell("Glacial Advance");
    public Spell DeathStrike = new Spell("DeathStrike");
    public Timer BreathofSindragosa = new Timer(); // Timer
    public Timer PillarofFrost = new Timer(); // Timer
    public Timer EmpowerRuneWeapon = new Timer(); // Timer
    public Timer Sindragosa'sFury = new Timer(); // Timer
    public Timer HungeringRuneWeapon = new Timer(); // Timer
    public Timer HornofWinter = new Timer(); // Timer
    public Timer WraithWalk = new Timer(); // Timer
    public Timer Anti-MagicShell = new Timer(); // Timer
    public Timer Obliteration = new Timer(); // Timer
    public Timer RemorselessWinter = new Timer(); // Timer
    public Timer GlacialAdvance = new Timer(); // Timer
    public Timer DarkCommand = new Timer(); // Timer
    public Timer DeathGrip = new Timer(); // Timer
    public Timer Shadowmeld = new Timer(); // Timer
    public Timer WilloftheForsaken = new Timer(); // Timer
    public Timer WarStomp = new Timer(); // Timer
    public Timer Stoneform = new Timer(); // Timer
    public Timer GiftoftheNaaru = new Timer(); // Timer
    public Timer EveryManforHimself = new Timer(); // Timer
    public Timer EscapeArtist = new Timer(); // Timer
    public Timer BloodFury = new Timer(); // Timer
    public Timer Berserking = new Timer(); // Timer
    public Timer ArcaneTorrent = new Timer(); // Timer
    public Timer DarkFlight = new Timer(); // Timer


    internal void Rotation()
    {
        Logging.Write("Frost DK 7.2.5 Rotation Started!");
        while (_isLaunched)
        {
            try
            {
                if (!Products.InPause)
                {
                    if (!ObjectManager.Me.IsDeadMe)
                    {
                        BuffRotation();

                        if (Fight.InFight && ObjectManager.Me.Target > 0)
                        {
                            Pull();
                            CombatRotation();
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Logging.WriteError("Frost DK 7.2.5 Rotation ERROR!!!: " + e);
            }

            Thread.Sleep(10); // Pause 10 ms to reduce the CPU usage.
        }
        Logging.Write("Frost DK 7.2.5 Rotation Stopped!");
    }

    internal void BuffRotation()
    {
        if (ObjectManager.Me.IsMounted)
            return;
    }
    internal void Pull()
    {
        if (ObjectManager.Me.Target == _lastTarget)
            return;

        // DarkCommand:
        if (DarkCommand.KnownSpell && DarkCommand.IsSpellUsable && DarkCommand.IsDistanceGood)
        {
            DarkCommand.Launch();
            _lastTarget = ObjectManager.Me.Target;
        }


        // DeathGrip:
        if (DeathGrip.KnownSpell && DeathGrip.IsSpellUsable && DeathGrip.IsDistanceGood)
        {
            DeathGrip.Launch();
            _lastTarget = ObjectManager.Me.Target;
        }
    }

    internal void CombatRotation()
    {
        // DeathGrip:
        if (DeathGrip.IsSpellUsable && DeathGrip.IsDistanceGood && DeathGrip.KnownSpell && ObjectManager.Me.IsInGroup && ObjectManager.Target.IsTargetPartyMember && !ObjectManager.TargetsTarget.GroupRole.Tank)
        {
            DeathGrip.Launch();            
        }

        // DarkCommand:
        if (DarkCommand.IsSpellUsable && DarkCommand.IsDistanceGood && DarkCommand.KnownSpell && ObjectManager.Me.IsInGroup && ObjectManager.Target.IsTargetPartyMember && !ObjectManager.TargetsTarget.GroupRole.Tank)
        {
            DarkCommand.Launch();
            return;
        }

        // RemorselessWinter:
        if (RemorselessWinter.IsSpellUsable && RemorselessWinter.IsDistanceGood && RemorselessWinter.KnownSpell && ObjectManager.Me.Runes >= 1)
        {
            RemorselessWinter.Launch();
            return;
        }

        // PillarofFrost:
        if (PillarofFrost.IsSpellUsable && PillarofFrost.IsDistanceGood && PillarofFrost.KnownSpell && !ObjectManager.Me.IsSpellUsable("Breath of Sindragosa")
        {
            PillarofFrost.Launch();
            return;
        }

        // PillarofFrost:
        if (PillarofFrost.IsSpellUsable && PillarofFrost.IsDistanceGood && PillarofFrost.KnownSpell && ObjectManager.Me.IsSpellUsable("Breath of Sindragosa") && ObjectManager.Me.RunePower == 100 && ObjectManager.Me.Runes == 6)
        {
            PillarofFrost.Launch();
            return;
        }

        // Sindragosa'sFury:
        if (Sindragosa'sFury.IsSpellUsable && Sindragosa'sFury.IsDistanceGood && ObjectManager.Me.IsFacing && !PillarofFrost.IsUsable && ObjectManager.Me.Buff("Pillar of Frost") && ObjectManager.Target.IsBoss)
        {
            Sindragosa'sFury.Launch();
            return;
        }

        // BreathofSindragosa:
        if (BreathofSindragosa.IsSpellUsable && BreathofSindragosa.IsDistanceGood && BreathofSindragosa.KnownSpell && ObjectManager.Me.HaveBuff("Pillar of Frost") && ObjectManager.Me.RunePower == 100 && ObjectManager.Me.Runes == 6)
        {
            BreathofSindragosa.Launch();
            return;
        }

        // HowlingBlast:
        if (HowlingBlast.IsSpellUsable && HowlingBlast.IsDistanceGood && HowlingBlast.KnownSpell && ObjectManager.Me.HaveBuff("Breath of Sindragosa") && ObjectManager.Target.HaveBuff("Rime") && !Object Manager.Me.HaveBuff("Hungering Rune Weapon") && ObjectManager.Me.RunePower >= 35)
        {
            HowlingBlast.Launch();
            return;
        }

        // HowlingBlast:
        if (HowlingBlast.IsSpellUsable && HowlingBlast.IsDistanceGood && HowlingBlast.KnownSpell && ObjectManager.Me.HaveBuf("Rime") && !ObjectManager.Me.HaveBuff("Hungering Rune Weapon") && !ObjectManager.Me.HaveBuff("Breath of Sindragosa"))
        {
            HowlingBlast.Launch();
            return;
        }

        // HowlingBlast:
        if (HowlingBlast.IsSpellUsable && HowlingBlast.IsDistanceGood && HowlingBlast.KnownSpell && !ObjectManager.Me.HaveBuff("Hungering Rune Weapon") && !ObjectManager.Me.HaveBuff("Breath of Sindragosa") && ObjectManager.Me.Runes >=1 && !ObjectManager.Target.HaveBuff("Frost Fever"))
        {
            HowlingBlast.Launch();
            return;
        }

        // Obliterate:
        if (Obliterate.IsSpellUsable && Obliterate.IsDistanceGood && Obliterate.KnownSpell && ObjectManager.Me.HaveBuff("Killing Machine") && ObjectManager.Me.HaveBuff("Pillar of Frost") && !ObjectManager.Me.RunePower == 100 && !ObjectManager.Me.Runes == 6 && !ObjectManager.Me.HaveBuff("Breath of Sindragosa"))
        {
            Obliterate.Launch();
            return;
        }

        // Obliterate:
        if (Obliterate.IsSpellUsable && Obliterate.IsDistanceGood && Obliterate.KnownSpell && !ObjectManager.Me.RunePower == 100 && !ObjectManager.Me.Runes == 6)
        {
            Obliterate.Launch();
            return;
        }

        // HornofWinter:
        if (HornofWinter.IsSpellUsable && HornofWinter.IsDistanceGood && HornofWinter.KnownSpell && ObjectManager.Me.RunePower <= 80 && !ObjectManager.Me.HaveBuff("Hungering Rune Weapon") && ObjectManager.Me.HaveBuff("Breath of Sindragosa") && ObjectManager.BuffTimeLeft(new List<uint> { Breath of Sindragosa }) >= 10000)
        {
            HornofWinter.Launch();
            return;
        }

        // HornofWinter:
        if (HornofWinter.IsSpellUsable && HornofWinter.IsDistanceGood && HornofWinter.KnownSpell && ObjectManager.Me.RunePower <= 80 && !ObjectManager.Me.HaveBuff("Hungering Rune Weapon") && !ObjectManager.Me.HaveBuff("Breath of Sindragosa") && ObjectManager.Me.RunePower <=20 && ObjectManager.Me.Runes <= 2)
        {
            HornofWinter.Launch();
            return;
        }

        // HungeringRuneWeapon:
        if (HungeringRuneWeapon.IsSpellUsable && HungeringRuneWeapon.IsDistanceGood && HungeringRuneWeapon.KnownSpell && ObjectManager.Me.RunePower <= 35 && ObjectManager.Me.HaveBuff("Breath of Sindragosa") && !ObjectManager.Me.HaveBuff("Hungering Rune Weapon"))
        {
            HungeringRuneWeapon.Launch();
            return;
        }

        // EmpoweringRuneWeapon:
        if (EmpoweringRuneWeapon.IsSpellUsable && EmpoweringRuneWeapon.IsDistanceGood && EmpoweringRuneWeapon.KnownSpell && ObjectManager.Me.RunePower <= 35 && ObjectManager.Me.HaveBuff("Breath of Sindragosa") && !ObjectManager.Me.HaveBuff("Empowering Rune Weapon"))
        {
            EmpoweringRuneWeapon.Launch();
            return;
        }

        // FrostStrike:
        if (FrostStrike.IsSpellUsable && FrostStrike.IsDistanceGood && FrostStrike.KnownSpell && !ObjectManager.Me.HaveBuff("Breath of Sindragosa") && ObjectManager.Me.SpellTimeLeft(new List<uint> { Breath of Sindragosa }) >= 15000 && !ObjectManager.Me.RunePower >= 75)
        {
            FrostStrike.Launch();
            return;
        }

        // FrostStrike:
        if (FrostStrike.IsSpellUsable && FrostStrike.IsDistanceGood && FrostStrike.KnownSpell && !ObjectManager.Me.HaveBuff("Breath of Sindragosa") && ObjectManager.Me.HaveBuff("Olbiteration") && ObjectManager.Me.RunePower >= 45)
        {
            FrostStrike.Launch();
            return;
        }

        // IceBoundFortitude:
        if (IceBoundFortitude.IsSpellUsable && IceBoundFortitude.IsDistanceGood && IceBoundFortitude.KnownSpell && ObjectManager.Me.Health <= 20%)
        {
            IceBoundFortitude.Launch();
            return;
        }

        // DeathStrike:
        if (DeathStrike.IsSpellUsable && DeathStrike.IsDistanceGood && DeathStrike.KnownSpell && ObjectManager.Me.RunePower >= 45 && ObjectManager.Me.Health <= 50%)
        {
            DeathStrike.Launch();
            return;
        }

        // DeathStrike:
        if (DeathStrike.IsSpellUsable && DeathStrike.IsDistanceGood && DeathStrike.KnownSpell && ObjectManager.Me.RunePower >= 45 && ObjectManager.Me.Health <= 20% && IceBoundFortitude.IsSpellUsable && ObjectManager.Me.HaveBuff("Ice bound Fortitude"))
        {
            DeathStrike.Launch();
            return;
        }

        // Anti-MagicShell:
        if (Anti-MagicShell.IsSpellUsable && Anti-MagicShell.IsDistanceGood && Anti-MagicShell.KnownSpell && ObjectManager.Me.Health <= 60 && ObjectManager.Target.IsCast)
        {
            Anti-MagicShell.Launch();
            return;
        }

        // WrathWalking:
        if (WrathWalking.IsSpellUsable && WrathWalking.IsDistanceGood && !ObjectManager.Me.InCombat && Object Manager.Me.InMove)
        {
            WrathWalking.Launch();
            return;
        }

        // Obliteration:
        if (Obliteration.IsSpellUsable && Obliteration.IsDistanceGood && ObjectManager.Me.HaveBuff("Pillar of Frost"))
        {
            Obliteration.Launch();
            return;
        }

        // Frostscythe:
        if (Frostscythe.IsSpellUsable && Frostscythe.IsDistanceGood && ObjectManager.Me.Rune >= 1 && ObjectManager.TargetNear >= 1 && ObjectManager.Me.Buff("Killing Machine"))
        {
            Frostscythe.Launch();
            return;
        }

        // GlacialAdvance:
        if (GlacialAdvance.IsSpellUsable && GlacialAdvance.IsDistanceGood && ObjectManager.Me.IsFaccing && ObjectManager.Me.Runes >= 1)
        {
            GlacialAdvance.Launch();
            return;
        }

        // DarkFlight:
        if (DarkFlight.IsSpellUsable && DarkFlight.IsDistanceGood && !ObjectManager.Me.InCombat && ObjectManager.Me.InMove && !WrathWalking.IsSpellUsable)
        {
            DarkFlight.Launch();
            return;
        }

        // ArcaneTorrent:
        if (ArcaneTorrent.IsSpellUsable && ArcaneTorrent.IsDistanceGood && ObjectManager.Target.InCast && ObjectManager.Me.Mana <= 100%)
        {
            ArcaneTorrent.Launch();
            return;
        }

        // Berserking:
        if (Berserking.IsSpellUsable && Berserking.IsDistanceGood && ObjectManager.Me.InCombat)
        {
            Berserking.Launch();
            return;
        }

        // BloodFury:
        if (BloodFury.IsSpellUsable && BloodFury.IsDistanceGood && ObjectManager.Me.InCombat)
        {
            BloodFury.Launch();
            return;
        }

        // EscapeArtist:
        if (EscapeArtist.IsSpellUsable && EscapeArtist.IsDistanceGood && ObjectManager.Me.InCombat  && ObjectManager.Me.IsStun)
        {
            EscapeArtist.Launch();
            return;
        }

        // EveryManforHimself:
        if (EveryManforHimself.IsSpellUsable && EveryManforHimself.IsDistanceGood && ObjectManager.Me.IsStun && ObjectManager.Me.InCombat)
        {
            EveryManforHimself.Launch();
            return;
        }

        // GiftoftheNaaru:
        if (GiftoftheNaaru.IsSpellUsable && GiftoftheNaaru.IsDistanceGood && ObjectManager.Me.Health <= 75%)
        {
            GiftoftheNaaru.Launch();
            return;
        }

        // Stoneform:
        if (Stoneform.IsSpellUsable && Stoneform.IsDistanceGood && ObjectManager.Me.Health <= 75%)
        {
            Stoneform.Launch();
            return;
        }

        // WarStomp:
        if (WarStomp.IsSpellUsable && WarStomp.IsDistanceGood && ObjectManager.Target.InCast && ObjectManager.Me.InCombat)
        {
            HeroicStrike.Launch();
            return;
        }

        // WilloftheForsaken:
        if (WilloftheForsaken.IsSpellUsable && WilloftheForsaken.IsDistanceGood && ObjectManager.Me.Health <= 100% && !ObjectManager.Me.InCombat && ObjectManager.Target.Health == 0)
        {
            WilloftheForsaken.Launch();
            return;
        }

        // Shadowmeld:
        if (Shadowmeld.IsSpellUsable && Shadowmeld.IsDistanceGood && ObjectManager.Me.Health <= 20% && !objectManager.Me.InMove && ObjectManager.Me.InCombet)
        {
            Shadowmeld.Launch();
            return;
        }
    }
}

 

 

Legion Frost Death Knight 7.2.5 V.101.cs

Link to comment
Share on other sites

Where do I get a list for C Sharp objects that wManager can handle, and a list of objects that wResouces can handle?

using System;
using System.Threading;
using System.Windows.Forms;
using robotManager.Helpful;
using robotManager.Products;
using wManager.Wow.Class;
using wManager.Wow.Enums;
using wManager.Wow.Helpers;
using wManager.Wow.ObjectManager;
Using wManager.Wow.?????????
using wResources.Wow.???????
using Timer = robotManager.Helpful.Timer;

Link to comment
Share on other sites

Hello, @King Smilie you can decompile the libraries from \WRobot\Bin.

Here explained:

 

This is how it looks like from dotpeek

Spoiler

decompiler.thumb.JPG.73941704556dd9f5c29906ff0b2a8f23.JPG

You can also use every other .net decompiler mentioned in the other posts.

I also recommend to use some extensions for Visual Studio(also in the posts) it has a free trial and it helped me alot to understand c#.

Edit:

I looked into your fightclass. You should use Visual Studio, if you are going to continue writing in c#.

It can show you immediately what's wrong with your code while you are writing it and it has many many other features to assist you.

Link to comment
Share on other sites

A raw revision (i wasn't so fastidious):

Spoiler

using System;
using robotManager.Helpful;
using robotManager.Products;
using wManager.Wow.Class;
using wManager.Wow.Helpers;
using wManager.Wow.ObjectManager;

public class Main : ICustomClass
{
    #region Variables

    public float Range { get { return 4.5f; } }
    private bool _isLaunched;
    private ulong _lastTarget;

    #endregion




    #region WRobot Methods

    public void Initialize() // When product started, initialize and launch Fightclass
    {
        _isLaunched = true;
        Logging.Write("Frost DK 7.2.5 initialized.");
        Rotation();
    }

    public void Dispose() // When product stopped
    {
        _isLaunched = false;
        Logging.Write("Frost DK 7.2.5 disposed.");
    }

    public void ShowConfiguration() // When use click on Fight class settings
    {

    }

    #endregion




    #region Spells

    // Buff:
    public Spell PillarofFrost = new Spell("Pillar of Frost");
    public Spell EmpowerRuneWeapon = new Spell("Empower Rune Weapon");
    public Spell HungeringRuneWeapon = new Spell("Hungering Rune Weapon");
    public Spell HornofWinter = new Spell("Horn of Winter");
    public Spell WraithWalk = new Spell("Wraith Walk");
    public Spell AntiMagicShell = new Spell("Anti-Magic Shell");
    public Spell Obliteration = new Spell("Obliteration");
    public Spell IceBoundFortitude = new Spell("Ice Bound Fortitude");
    // Racial Buff:
    public Spell DarkFlight = new Spell("Darkflight");
    public Spell ArcaneTorrent = new Spell("Arcane Torrent");
    public Spell Berserking = new Spell("Berserking");
    public Spell BloodFury = new Spell("Blood Fury");
    public Spell EscapeArtist = new Spell("Escape Artist");
    public Spell EveryManforHimself = new Spell("Every Man for Himself");
    public Spell GiftoftheNaaru = new Spell("Gift of the Naaru");
    public Spell Stoneform = new Spell("Stoneform");
    public Spell WarStomp = new Spell("War Stomp");
    public Spell WilloftheForsaken = new Spell("Will of the Forsaken");
    public Spell Shadowmeld = new Spell("Shadowmeld");
    // Pull:
    public Spell DeathGrip = new Spell("Death Grip");
    public Spell DarkCommand = new Spell("Dark Command");
    // Combat:
    public Spell RemorselessWinter = new Spell("Remorseless Winter");
    public Spell HowlingBlast = new Spell("Howling Blast");
    public Spell Obliterate = new Spell("Obliterate");
    public Spell FrostStrike = new Spell("Frost Strike");
    public Spell Frostscythe = new Spell("Frostscythe");
    public Spell BreathofSindragosa = new Spell("Breath of Sindragosa");
    public Spell SindragosasFury = new Spell("Sindragosa's Fury");
    public Spell GlacialAdvance = new Spell("Glacial Advance");
    public Spell DeathStrike = new Spell("DeathStrike");

    #endregion




    #region Behavior

    internal void Rotation()
    {
        Logging.Write("Frost DK 7.2.5 Rotation Started!");
        while (_isLaunched)
        {
            try
            {
                if (!Products.InPause)
                {
                    if (!ObjectManager.Me.IsDeadMe)
                    {
                        BuffRotation();
                        if (Fight.InFight && ObjectManager.Me.Target != 0)
                        {
                            Pull();
                            CombatRotation();
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Logging.WriteError("Frost DK 7.2.5 Rotation Error:" + e);
            }
        }
    }

    internal void BuffRotation()
    {
        if (!ObjectManager.Me.IsMounted)
        {
            if (RemorselessWinter.IsSpellUsable && RemorselessWinter.KnownSpell && ObjectManager.Me.Runes >= 1)
            {
                RemorselessWinter.Launch();
            }
        }
    }

    internal void Pull()
    {
        if (ObjectManager.Me.Target == _lastTarget)
            return;
        if (DarkCommand.KnownSpell && DarkCommand.IsSpellUsable && DarkCommand.IsDistanceGood)
        {
            DarkCommand.Launch();
            _lastTarget = ObjectManager.Me.Target;
        }
        if (DeathGrip.KnownSpell && DeathGrip.IsSpellUsable && DeathGrip.IsDistanceGood)
        {
            DeathGrip.Launch();
            _lastTarget = ObjectManager.Me.Target;
        }
    }

    internal void CombatRotation()
    {
        // DeathGrip:
        if (DeathGrip.IsSpellUsable 
            && DeathGrip.IsDistanceGood 
            && DeathGrip.KnownSpell 
            && ObjectManager.Me.IsInGroup)
        {
            DeathGrip.Launch();
        }

        // DarkCommand:
        if (DarkCommand.IsSpellUsable 
            && DarkCommand.IsDistanceGood 
            && DarkCommand.KnownSpell)
        {
            DarkCommand.Launch();
            return;
        }

        // RemorselessWinter:
        if (RemorselessWinter.IsSpellUsable 
            && RemorselessWinter.KnownSpell 
            && ObjectManager.Me.Runes >= 1)
        {
            RemorselessWinter.Launch();
            return;
        }

        // PillarofFrost:
        if (PillarofFrost.IsSpellUsable 
            && PillarofFrost.IsDistanceGood 
            && PillarofFrost.KnownSpell 
            && !BreathofSindragosa.IsSpellUsable)
        {
            PillarofFrost.Launch();
            return;
        }

        // PillarofFrost:
        if (PillarofFrost.IsSpellUsable 
            && PillarofFrost.IsDistanceGood 
            && PillarofFrost.KnownSpell 
            && !BreathofSindragosa.IsSpellUsable 
            && ObjectManager.Me.RunicPower == 100 && ObjectManager.Me.Runes == 6)
        {
            PillarofFrost.Launch();
            return;
        }

        // Sindragosa'sFury:
        if (SindragosasFury.IsSpellUsable 
            && SindragosasFury.IsDistanceGood 
            && ObjectManager.Me.IsFacing(ObjectManager.Me.TargetObject.Position) 
            && !PillarofFrost.IsSpellUsable 
            && PillarofFrost.HaveBuff
            && ObjectManager.Target.IsBoss)
        {
            SindragosasFury.Launch();
            return;
        }

        // BreathofSindragosa:
        if (BreathofSindragosa.IsSpellUsable 
            && BreathofSindragosa.IsDistanceGood 
            && BreathofSindragosa.KnownSpell 
            && ObjectManager.Me.HaveBuff("Pillar of Frost") 
            && ObjectManager.Me.RunicPower == 100 && ObjectManager.Me.Runes == 6)
        {
            BreathofSindragosa.Launch();
            return;
        }

        // HowlingBlast:
        if (HowlingBlast.IsSpellUsable 
            && HowlingBlast.IsDistanceGood 
            && HowlingBlast.KnownSpell 
            && ObjectManager.Me.HaveBuff("Breath of Sindragosa") 
            && ObjectManager.Target.HaveBuff("Rime") 
            && !ObjectManager.Me.HaveBuff("Hungering Rune Weapon") 
            && ObjectManager.Me.RunicPower >= 35)
        {
            HowlingBlast.Launch();
            return;
        }

        // HowlingBlast:
        if (HowlingBlast.IsSpellUsable 
            && HowlingBlast.IsDistanceGood 
            && HowlingBlast.KnownSpell 
            && ObjectManager.Me.HaveBuff("Rime") 
            && !ObjectManager.Me.HaveBuff("Hungering Rune Weapon") 
            && !ObjectManager.Me.HaveBuff("Breath of Sindragosa"))
        {
            HowlingBlast.Launch();
            return;
        }

        // HowlingBlast:
        if (HowlingBlast.IsSpellUsable 
            && HowlingBlast.IsDistanceGood 
            && HowlingBlast.KnownSpell 
            && !ObjectManager.Me.HaveBuff("Hungering Rune Weapon") 
            && !ObjectManager.Me.HaveBuff("Breath of Sindragosa") 
            && ObjectManager.Me.Runes >= 1 
            && !ObjectManager.Target.HaveBuff("Frost Fever"))
        {
            HowlingBlast.Launch();
            return;
        }

        // Obliterate:
        if (Obliterate.IsSpellUsable 
            && Obliterate.IsDistanceGood 
            && Obliterate.KnownSpell 
            && ObjectManager.Me.HaveBuff("Killing Machine") 
            && ObjectManager.Me.HaveBuff("Pillar of Frost") 
            && ObjectManager.Me.RunicPower != 100 
            && ObjectManager.Me.Runes != 6 
            && !ObjectManager.Me.HaveBuff("Breath of Sindragosa"))
        {
            Obliterate.Launch();
            return;
        }

        // Obliterate:
        if (Obliterate.IsSpellUsable 
            && Obliterate.IsDistanceGood 
            && Obliterate.KnownSpell 
            && ObjectManager.Me.RunicPower != 100 
            && ObjectManager.Me.Runes != 6)
        {
            Obliterate.Launch();
            return;
        }

        // HornofWinter:
        if (HornofWinter.IsSpellUsable 
            && HornofWinter.IsDistanceGood 
            && HornofWinter.KnownSpell 
            & ObjectManager.Me.RunicPower <= 80 
            && !HungeringRuneWeapon.HaveBuff
            && BreathofSindragosa.HaveBuff
            && BreathofSindragosa.BuffTimeLeft >= 10000)
        {
            HornofWinter.Launch();
            return;
        }

        // HornofWinter:
        if (HornofWinter.IsSpellUsable 
            && HornofWinter.IsDistanceGood 
            && HornofWinter.KnownSpell 
            && ObjectManager.Me.RunicPower <= 80
            && !HungeringRuneWeapon.HaveBuff
            && !BreathofSindragosa.HaveBuff
            && ObjectManager.Me.RunicPower <= 20 
            && ObjectManager.Me.Runes <= 2)
        {
            HornofWinter.Launch();
            return;
        }

        // HungeringRuneWeapon:
        if (HungeringRuneWeapon.IsSpellUsable 
            && HungeringRuneWeapon.IsDistanceGood 
            && HungeringRuneWeapon.KnownSpell 
            && ObjectManager.Me.RunicPower <= 35 
            && BreathofSindragosa.HaveBuff
            && !HungeringRuneWeapon.HaveBuff)
        {
            HungeringRuneWeapon.Launch();
            return;
        }

        // EmpoweringRuneWeapon:
        if (EmpowerRuneWeapon.IsSpellUsable 
            && EmpowerRuneWeapon.IsDistanceGood 
            && EmpowerRuneWeapon.KnownSpell 
            && ObjectManager.Me.RunicPower <= 35 
            && BreathofSindragosa.HaveBuff
            && !EmpowerRuneWeapon.HaveBuff)
        {
            EmpowerRuneWeapon.Launch();
            return;
        }

        // FrostStrike:
        if (FrostStrike.IsSpellUsable 
            && FrostStrike.IsDistanceGood 
            && FrostStrike.KnownSpell 
            && !BreathofSindragosa.HaveBuff
            && BreathofSindragosa.BuffTimeLeft >= 15000
            && ObjectManager.Me.RunicPower <= 75)
        {
            FrostStrike.Launch();
            return;
        }

        // IceBoundFortitude:
        if (IceBoundFortitude.IsSpellUsable 
            && IceBoundFortitude.IsDistanceGood 
            && IceBoundFortitude.KnownSpell 
            && ObjectManager.Me.HealthPercent <= 20)
        {
            IceBoundFortitude.Launch();
            return;
        }

        // DeathStrike:
        if (DeathStrike.IsSpellUsable 
            && DeathStrike.IsDistanceGood 
            && DeathStrike.KnownSpell 
            && ObjectManager.Me.RunicPower >= 45 
            && ObjectManager.Me.HealthPercent <= 50)
        {
            DeathStrike.Launch();
            return;
        }

        // Anti-MagicShell:
        if (AntiMagicShell.IsSpellUsable 
            && AntiMagicShell.IsDistanceGood 
            && AntiMagicShell.KnownSpell 
            && ObjectManager.Me.HealthPercent <= 60 
            && ObjectManager.Target.IsCast)
        {
            AntiMagicShell.Launch();
            return;
        }

        // WrathWalk:
        if (WraithWalk.IsSpellUsable && WraithWalk.IsDistanceGood && !ObjectManager.Me.InCombat && ObjectManager.Me.GetMove)
        {
            WraithWalk.Launch();
            return;
        }

        // Obliteration:
        if (Obliteration.IsSpellUsable 
            && Obliteration.IsDistanceGood 
            && ObjectManager.Me.HaveBuff("Pillar of Frost"))
        {
            Obliteration.Launch();
            return;
        }

        // Frostscythe:
        if (Frostscythe.IsSpellUsable 
            && Frostscythe.IsDistanceGood
            && ObjectManager.Me.IsFacing(ObjectManager.Me.TargetObject.Position)
            && ObjectManager.Me.Runes >= 1 
            //&& ObjectManager.GetWoWUnitHostile().Count(i => i.GetDistance < 8) >= 2
            && ObjectManager.Me.HaveBuff("Killing Machine"))
        {
            Frostscythe.Launch();
            return;
        }

        // GlacialAdvance:
        if (GlacialAdvance.IsSpellUsable 
            && GlacialAdvance.IsDistanceGood 
            && ObjectManager.Me.IsFacing(ObjectManager.Me.TargetObject.Position) 
            && ObjectManager.Me.Runes >= 1)
        {
            GlacialAdvance.Launch();
            return;
        }

        // DarkFlight:
        if (DarkFlight.IsSpellUsable 
            && DarkFlight.IsDistanceGood 
            && !ObjectManager.Me.InCombat 
            && ObjectManager.Me.GetMove 
            && !WraithWalk.IsSpellUsable)
        {
            DarkFlight.Launch();
            return;
        }

        // ArcaneTorrent:
        if (ArcaneTorrent.IsSpellUsable 
            && ArcaneTorrent.IsDistanceGood 
            && ObjectManager.Target.IsCast)
        {
            ArcaneTorrent.Launch();
            return;
        }

        // Berserking:
        if (Berserking.IsSpellUsable 
            && Berserking.IsDistanceGood 
            && ObjectManager.Me.InCombat)
        {
            Berserking.Launch();
            return;
        }

        // BloodFury:
        if (BloodFury.IsSpellUsable 
            && BloodFury.IsDistanceGood 
            && ObjectManager.Me.InCombat)
        {
            BloodFury.Launch();
            return;
        }

        // EscapeArtist:
        if (EscapeArtist.IsSpellUsable 
            && EscapeArtist.IsDistanceGood 
            && ObjectManager.Me.InCombat 
            && ObjectManager.Me.IsStunned)
        {
            EscapeArtist.Launch();
            return;
        }

        // EveryManforHimself:
        if (EveryManforHimself.IsSpellUsable 
            && EveryManforHimself.IsDistanceGood 
            && ObjectManager.Me.IsStunned 
            && ObjectManager.Me.InCombat)
        {
            EveryManforHimself.Launch();
            return;
        }

        // GiftoftheNaaru:
        if (GiftoftheNaaru.IsSpellUsable 
            && GiftoftheNaaru.IsDistanceGood 
            && ObjectManager.Me.HealthPercent <= 75)
        {
            GiftoftheNaaru.Launch();
            return;
        }

        // Stoneform:
        if (Stoneform.IsSpellUsable 
            && Stoneform.IsDistanceGood 
            && ObjectManager.Me.HealthPercent <= 75)
        {
            Stoneform.Launch();
            return;
        }

        // WarStomp:
        if (WarStomp.IsSpellUsable 
            && WarStomp.IsDistanceGood 
            && ObjectManager.Target.IsCast 
            && ObjectManager.Me.InCombat)
        {
            WarStomp.Launch();
            return;
        }

        // WilloftheForsaken:
        if (WilloftheForsaken.IsSpellUsable 
            && WilloftheForsaken.IsDistanceGood 
            && ObjectManager.Me.HealthPercent <= 100 
            && !ObjectManager.Me.InCombat 
            & ObjectManager.Target.Health == 0)
        {
            WilloftheForsaken.Launch();
            return;
        }

        // Shadowmeld:
        if (Shadowmeld.IsSpellUsable 
            && Shadowmeld.IsDistanceGood 
            && ObjectManager.Me.HealthPercent <= 20 
            && !ObjectManager.Me.GetMove 
            && ObjectManager.Me.InCombat)
        {
            Shadowmeld.Launch();
            return;
        }


    }

    #endregion

}

 

 

Link to comment
Share on other sites

wow ok TY soo much I will be looking into all your suggestion. I think this will help me make a breath spec Profile that will Pool its resources every 2 minutes and then Pop all its CD's in the right order. I'm hoping to make thi so I can get the top Damage I can in dungeons and so that every DK either a lowbie Leveling or a Max level  can pull the right dps.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...