• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [Raid Bot]Unholy Death Knight

    Discussion in 'Archives' started by Vastico, Feb 24, 2012.

    1. Vastico

      Vastico New Member

      Joined:
      Jul 28, 2011
      Messages:
      424
      Likes Received:
      10
      Trophy Points:
      0
      Unholy Death Knight

      Introduction
      This custom class is built around the Raid Bot, this can be found here: http://www.thebuddyforum.com/honorb...45436-botbase-raidbot-30fps-cc-execution.html. I have used Noxxic.com, Elitist Jerks, MMO Champion to get the best rotation and priority order.

      This custom class does not pop any cooldowns so they are for you to do manually.

      Media
      This test was created on a boss dummy on a 385 item level unholy death knight. I used no raid buffs, no flasks, no potions. I was the only one to attack the dummy.

      [​IMG]

      [​IMG]

      Source - Last Update: 24th February 2012 @ 5:15PM - Reason: No longer cast Death Coil whenever possible.
      Code:
      using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Text;
      using Styx.Combat.CombatRoutine;
      using TreeSharp;
      using CommonBehaviors.Actions;
      using Styx;
      using Styx.Logic.Combat;
      using Styx.WoWInternals.WoWObjects;
      using Styx.Logic.Pathing;
      using Styx.Helpers;
      using System.Drawing;
      
      namespace RaidBot
      {
      
          public class DeathKnightUnholyRoutine : CombatRoutine
          {
      
              public delegate WoWUnit UnitSelectionDelegate(object context);
      
              public delegate bool SimpleBooleanDelegate(object context);
      
              public delegate WoWPoint LocationRetriverDelegate(object context);
      
              public override WoWClass Class
              {
                  get { return WoWClass.DeathKnight; }
              }
      
              public override string Name
              {
                  get { return "Unholy DeathKnight"; }
              }
      
              private Composite _root;
      
              public override Composite CombatBehavior
              {
                  get
                  {
                      return _root ?? (_root = GetCombatBehavior());
                  }
              }
      
              private Composite GetCombatBehavior()
              {
                  return new PrioritySelector(
                      EnsureTarget(),
                      Cast("Raise Dead", ret => !StyxWoW.Me.GotAlivePet),
      
                      Cast("Outbreak", ret => !HasMyAuraTimeLeft(StyxWoW.Me.CurrentTarget, "Frost Fever", 2) || !HasMyAuraTimeLeft(StyxWoW.Me.CurrentTarget, "Blood Plague", 2)),
                      Cast("Icy Touch", ret => !HasMyAuraTimeLeft(StyxWoW.Me.CurrentTarget, "Frost Fever", 2)),
                      Cast("Plague Strike", ret => !HasMyAuraTimeLeft(StyxWoW.Me.CurrentTarget, "Blood Plague", 2)),
      
                      Cast("Dark Transformation", ret => StyxWoW.Me.GotAlivePet && StyxWoW.Me.Pet.ActiveAuras.ContainsKey("Shadow Infusion") && StyxWoW.Me.Pet.ActiveAuras["Shadow Infusion"].StackCount >= 5),
      
                      CastOnGround("Death and Decay", ctx => StyxWoW.Me.CurrentTarget.Location, ret => StyxWoW.Me.UnholyRuneCount == 2 && StyxWoW.Me.CurrentRunicPower < 110),
      
                      Cast("Scourge Strike", ret => StyxWoW.Me.UnholyRuneCount == 2 && StyxWoW.Me.CurrentRunicPower < 110),
                      Cast("Festering Strike", ret => StyxWoW.Me.BloodRuneCount == 2 && StyxWoW.Me.FrostRuneCount == 2 && StyxWoW.Me.CurrentRunicPower < 110),
                      Cast("Death Coil", ret => StyxWoW.Me.CurrentRunicPower > 90),
                      Cast("Death Coil", ret => StyxWoW.Me.ActiveAuras.ContainsKey("Sudden Doom")),
      
                      CastOnGround("Death and Decay", ctx => StyxWoW.Me.CurrentTarget.Location, ret => !StyxWoW.Me.CurrentTarget.IsFlying),
      
                      Cast("Scourge Strike"),
                      Cast("Festering Strike"),
                      Cast("Blood Tap"),
                      Cast("Empower Rune Weapon"),
                      Cast("Horn of Winter")
                  );
              }
      
              public Composite Cast(string spellName)
              {
                  return Cast(spellName, ret => StyxWoW.Me.CurrentTarget);
              }
      
              public Composite Cast(string spellName, UnitSelectionDelegate unit)
              {
                  return Cast(spellName, unit, ret => true);
              }
      
              public Composite Cast(string spellName, SimpleBooleanDelegate requirement)
              {
                  return Cast(spellName, ret => StyxWoW.Me.CurrentTarget, requirement);
              }
      
              public Composite Cast(string spellName, UnitSelectionDelegate unit, SimpleBooleanDelegate requirement)
              {
                  return new Decorator(
                      ctx => SpellManager.CanCast(SpellManager.Spells[spellName], unit(ctx), false, false, true) && requirement(ctx),
                      new TreeSharp.Action(
                          ret =>
                          {
                              Logging.Write(Color.Crimson, "Spell Cast[{0}]", spellName);
                              SpellManager.Cast(spellName, unit(ret));
                          }
                      )
                  );
              }
      
              public Composite CastOnGround(string spellName, LocationRetriverDelegate onLocation, SimpleBooleanDelegate requirement)
              {
                  return new Decorator(
                      ret =>
                          requirement(ret) && onLocation != null && SpellManager.CanCast(spellName)
                              && (StyxWoW.Me.Location.Distance(onLocation(ret)) <= SpellManager.Spells[spellName].MaxRange || SpellManager.Spells[spellName].MaxRange == 0),
                      new Sequence(
                          new TreeSharp.Action(ret => SpellManager.Cast(spellName)),
                          new WaitContinue(1, ret => StyxWoW.Me.CurrentPendingCursorSpell != null && StyxWoW.Me.CurrentPendingCursorSpell.Name == spellName, new ActionAlwaysSucceed()),
                          new TreeSharp.Action(ret => LegacySpellManager.ClickRemoteLocation(onLocation(ret)))
                      )
                  );
              }
      
              public Composite EnsureTarget()
              {
                  return new Decorator(ctx => StyxWoW.Me.CurrentTarget == null, new ActionAlwaysSucceed());
              }
      
              public bool HasMyAuraTimeLeft(WoWUnit unit, string aura, int timeLeft)
              {
                  return unit.GetAllAuras().Any(a => a.Name == aura && a.CreatorGuid == StyxWoW.Me.Guid && a.TimeLeft.TotalSeconds > timeLeft);
              }
      
          }
      
      }
      
      Credits
      • Singular Developers
      • Apoc
       
      Last edited: Feb 24, 2012
      Rusty_Trombone and solo1420 like this.
    2. Kroniq

      Kroniq Member

      Joined:
      Feb 21, 2011
      Messages:
      152
      Likes Received:
      1
      Trophy Points:
      18
      tested this and your numbers are significantly higher than mine. In about half pvp gear and half pve 390 ilvl enchanted n gem'd im getting about 17k on the target dummy. Also i find it doesnt pool RP at all so i can never get gargoyle off.

      All in all for me neways its comparable with the top ccs currently available for lazyraider.
       
      Last edited: Feb 24, 2012
    3. Vastico

      Vastico New Member

      Joined:
      Jul 28, 2011
      Messages:
      424
      Likes Received:
      10
      Trophy Points:
      0
      What is this pooling RP? I haven't read that :eek:

      I will make this better over time as I just got upgraded to raider in guild so I can fine tweak it for raiding
       
    4. Kroniq

      Kroniq Member

      Joined:
      Feb 21, 2011
      Messages:
      152
      Likes Received:
      1
      Trophy Points:
      18
      Summon Gargoyle is a spell that costs 60 Runic Power. Its a dps cooldown. But the CC never lets my runic power get to 60 due to deathcoil spam the second it hits the required 34 runic power to cast one.
       
    5. solo1420

      solo1420 Member

      Joined:
      Oct 13, 2011
      Messages:
      307
      Likes Received:
      0
      Trophy Points:
      16
      Pooling = keeping enough runic power to use gargoyle
       
    6. Kroniq

      Kroniq Member

      Joined:
      Feb 21, 2011
      Messages:
      152
      Likes Received:
      1
      Trophy Points:
      18
      A good spot to put this may be when dark transformation is up because deathcoils dont create a stack of shadow infusion while its active.

      Then like when its not up deathcoil spam all yur RP away. Just a thought may not be the best solution.
       
    7. Vastico

      Vastico New Member

      Joined:
      Jul 28, 2011
      Messages:
      424
      Likes Received:
      10
      Trophy Points:
      0
      Oh okay I will remove that part from CC thank you for pointing out, if Gargoyle is on CD do you still want to pool RP?
       
    8. Kroniq

      Kroniq Member

      Joined:
      Feb 21, 2011
      Messages:
      152
      Likes Received:
      1
      Trophy Points:
      18
      I think youd be fine to blow it if gargoyle on cd.

      When pooling if you can make it so it never sits at cap. Have it cast like 1 DC to bring it down when its capped else your wasteing RP. May take some tweaking on your end as i cant code for shit but gl and looking forward to future releases.
       
    9. Vastico

      Vastico New Member

      Joined:
      Jul 28, 2011
      Messages:
      424
      Likes Received:
      10
      Trophy Points:
      0
      I just updated the code to do the following:
      • No longer cast Death Coil whenever possible
      • Cast Death Coil when above 90 RP
      • Additional check to make sure we have alive pet
       
    10. solo1420

      solo1420 Member

      Joined:
      Oct 13, 2011
      Messages:
      307
      Likes Received:
      0
      Trophy Points:
      16
      Re-speccing to unholy to give this a shot :)
       
    11. solo1420

      solo1420 Member

      Joined:
      Oct 13, 2011
      Messages:
      307
      Likes Received:
      0
      Trophy Points:
      16
      Ok. This CC seems very good so far. I have a very shitty ilvl 300 (just dinged 85 yesterday) and I was doing 10.5k dps on raid dummy. Nice job mate. +rep
       
      Last edited: Feb 24, 2012
    12. Rusty_Trombone

      Rusty_Trombone Member

      Joined:
      Oct 30, 2011
      Messages:
      348
      Likes Received:
      0
      Trophy Points:
      16
      This is outstanding. Really.
       
    13. Vastico

      Vastico New Member

      Joined:
      Jul 28, 2011
      Messages:
      424
      Likes Received:
      10
      Trophy Points:
      0
      Glad you like it :)
       
    14. scrattz

      scrattz New Member

      Joined:
      Sep 3, 2011
      Messages:
      45
      Likes Received:
      0
      Trophy Points:
      0
      How do i get this CC -.-
       
    15. weischbier

      weischbier Guest

      It's a brainteaser!
       
    16. scrattz

      scrattz New Member

      Joined:
      Sep 3, 2011
      Messages:
      45
      Likes Received:
      0
      Trophy Points:
      0
      :( come on..

      I just normally download the profile but i see no link. :(
       
    17. Kroniq

      Kroniq Member

      Joined:
      Feb 21, 2011
      Messages:
      152
      Likes Received:
      1
      Trophy Points:
      18
      K so for you ppl wondering how to get this ... copy his code. open notepad ... paste code... save as imanoob.cs in your custom class folder. and Voila
       
    18. projektt

      projektt Active Member

      Joined:
      Sep 21, 2010
      Messages:
      1,424
      Likes Received:
      8
      Trophy Points:
      38
      It just freezes my HonorBuddy
       
    19. Vastico

      Vastico New Member

      Joined:
      Jul 28, 2011
      Messages:
      424
      Likes Received:
      10
      Trophy Points:
      0
      Got a log?
       
    20. incognitto

      incognitto New Member

      Joined:
      Aug 15, 2010
      Messages:
      404
      Likes Received:
      3
      Trophy Points:
      0
      Here is the CC as a file for those who dont know what to do
       

      Attached Files:

    Share This Page