• Visit Rebornbuddy
  • [PvE] WiNiFiX - Retri Paladin

    Discussion in 'Paladin' started by winifix, Mar 5, 2016.

    1. winifix

      winifix Member

      Joined:
      Dec 25, 2011
      Messages:
      164
      Likes Received:
      16
      Trophy Points:
      18
      Hi all, please see below rotation for Retri - I have been using it for a while now in PvE and it works very well with Enyo / Vitalic botbase.
      The reason I wrote it was because other retri rotations lagged my PC like hell on certain boss pulls because they keep track of things like other peoples health etc..
      This rotation only worries about your own health, its the healers job to heal the rest.

      Please note that I will be taking a break from botting from now till Legion so please don't expect updates to this profile to then, but feel free to give suggestions on improvements.
      The routine is very simple to update yourself and is all in 1 file, so if you make any good improvements please to post them here - I don't see why we have to pay for a good routine
      when everyone can update and improve 1 free public routine.

      The rotation uses Noxxic as a guide, but does very similar DPS to other paladins of similar gear I have raided with.

      Copy the below code and save in a file called "CoRoRetri.cs" under the honorbuddy\Routines\CoRoRetri folder.

      PHP:
      using System.Threading.Tasks;
      using CommonBehaviors.Actions;
      using Styx;
      using Styx.Common;
      using Styx.CommonBot;
      using Styx.CommonBot.Coroutines;
      using Styx.CommonBot.Routines;
      using Styx.TreeSharp;
      using Styx.WoWInternals.WoWObjects;
      using System.Windows.Media;
      using System.Collections.Generic;
      using Styx.WoWInternals;
      using System.Linq;

      namespace 
      CoRoRetri
      {
          public class 
      CoRoRetri CombatRoutine
          
      {
              public 
      override WoWClass Class { get { return StyxWoW.Me.Specialization == WoWSpec.PaladinRetribution WoWClass.Paladin WoWClass.None; } }
              public 
      override string Name get { return "BasiCoRoutine - Retribution Paladin [WiNiFiX]"; } }

              public 
      override Composite CombatBehavior get { return new ActionRunCoroutine(ctx => CombatCoroutine()); } }
              public 
      override Composite PreCombatBuffBehavior get { return new ActionRunCoroutine(ctx => PreCombatCoroutine()); } }

              
      #region Behaviors
              
      private static async Task<boolPreCombatCoroutine()
              {
                  
      // Pause while casting, dead, mounted etc
                  
      if (StyxWoW.Me.IsCasting || SpellManager.GlobalCooldown || !StyxWoW.Me.IsAlive || StyxWoW.Me.Mounted || StyxWoW.Me.IsOnTransport)
                      return 
      true;

                  
      // If we don't have Blessing of Kings up, attempt to cast it. If the cast is successful then return.
                  
      if (!StyxWoW.Me.HasAura("Blessing of Kings") && await SpellCast("Blessing of Kings"))
                      return 
      true;

                  
      // If we don't have Seal of Truth up, attempt to cast it. If the cast is successful then return.
                  
      if (!StyxWoW.Me.HasAura(31801) && await SpellCast("Seal of Truth"))
                      return 
      true;

                  
      // Return false at the end of the buffing logic
                  // If we don't return false, then it'll prevent moving further down the 'global' tree. I.e. it won't call CombatBehavior etc.
                  
      return false;
              }

              static 
      IEnumerable<WoWUnitUnfriendlyUnits
              
      {
                  
      get { return ObjectManager.GetObjectsOfType<WoWUnit>(truefalse).
                          
      Where(=> !u.IsDead && 
                                
      u.CanSelect && 
                                
      u.Attackable && 
                                !
      u.IsFriendly && 
                                
      u.IsWithinMeleeRange); }
              }

              private static 
      async Task<boolCombatCoroutine()
              {
                  
      // Pause while casting etc
                  
      if (StyxWoW.Me.IsCasting || SpellManager.GlobalCooldown)
                      return 
      true;

                  if (
      StyxWoW.Me.HasAura(1022)) // Forbearance (from Hand of Protection) - I cant cast mellee spells
                  
      {
                      return 
      true;
                  }

                  if (!
      StyxWoW.Me.CurrentTarget.IsAlive || !StyxWoW.Me.CurrentTarget.IsWithinMeleeRange)
                      return 
      true;

                  if (!
      StyxWoW.Me.HasAura(25771) && StyxWoW.Me.HealthPercent <= 10// Forbearance
                  
      {
                      if (
      await SpellCast("Divine Shield")) return true;

                      if (
      await SpellCast("Hand of Protection")) return true;
                  }

                  
      // We don't have a delay on interrupting so we place it after global cd checking
                  
      if (StyxWoW.Me.CurrentTarget.IsCasting && StyxWoW.Me.CurrentTarget.CanInterruptCurrentSpellCast && await SpellCast("Rebuke"))
                      return 
      true;

                  if (!
      StyxWoW.Me.HasAura(31884) && (StyxWoW.Me.CurrentTarget.IsBoss)) // If i don't have avenging wrath - see if i can cast it
                  
      {
                      if (
      await SpellCast("Avenging Wrath")) return true;
                  }

                  if (
      StyxWoW.Me.HasAura(31884) && SpellManager.CanCast("Execution Sentence")) // Avenging Wrath 
                  
      {
                      
      Logging.Write(Colors.Red"Avenging wrath is active attempting to cast Execution Sentence...");

                      if (
      await SpellCast("Execution Sentence")) return true;
                  }

                  if (
      StyxWoW.Me.HasAura(144595) && StyxWoW.Me.HasAura(157048))  // Divine Crusader Proc && Final Verdict
                  
      {
                      
      Logging.Write(Colors.Red"Divine Storm is Free and Buffed casting it...");

                      if (
      await SpellCast("Divine Storm")) return true;
                  }

                  if (
      UnfriendlyUnits.Count() >= 2// if I must execute AOE
                  
      {
                      if (!
      StyxWoW.Me.HasAura(20154) && await SpellCast("Seal of Righteousness"))
                          return 
      true;

                          if (
      StyxWoW.Me.CurrentTarget.HealthPercent <= 35 || StyxWoW.Me.HasAura(31884))  // Avenging Wrath
                              
      if (await SpellCast("Hammer of Wrath")) return true;

                      if (
      StyxWoW.Me.CurrentHolyPower >= 3)
                          if (
      await SpellCast("Divine Storm")) return true;

                      if (
      await SpellCast("Hammer of the Righteous")) return true;
                  }
                  else 
      // Single Target
                  
      {
                      if (!
      StyxWoW.Me.HasAura(31801) && await SpellCast("Seal of Truth"))
                          return 
      true;
                  }
                  
                  if (
      StyxWoW.Me.CurrentHolyPower >= || StyxWoW.Me.HasAura(90174))              // Divine Purpose
                  
      {
                      
      Logging.Write(Colors.Red"Current Holy Power = " StyxWoW.Me.CurrentHolyPower " HasAura(90174) = " StyxWoW.Me.HasAura(90174));

                      if (
      await SpellCast("Final Verdict")) return true;
                  }

                  if (
      StyxWoW.Me.CurrentTarget.HealthPercent <= 35 || StyxWoW.Me.HasAura(31884))  // Avenging Wrath
                      
      if (await SpellCast("Hammer of Wrath")) return true;

                  if (
      await SpellCast("Crusader Strike")) return true;
                  if (
      await SpellCast("Judgment")) return true;
                  if (
      await SpellCast("Exorcism")) return true;

                  if (
      StyxWoW.Me.CurrentHolyPower >= 3)             
                      if (
      await SpellCast("Divine Storm")) return true;

                  if (
      await SpellCast("Execution Sentence")) return true;

                  return 
      false;
              }
              
      #endregion

              #region Casting Tasks
              
      private static async Task<boolSpellCast(string spellWoWUnit target)
              {
                  
      // Return false if we can't cast the spell
                  
      if (!SpellManager.CanCast(spell))
                      return 
      false;

                  
      // Cast spell, return false if it fails to cast
                  
      if (!SpellManager.Cast(spelltarget))
                      return 
      false;

                  
      Logging.Write("[CoRoRetri] Cast {0} on {1}"spelltarget.SafeName);

                  
      // Wait for lag
                  
      await CommonCoroutines.SleepForLagDuration();

                  
      // return true - we've cast the spell successfully.
                  
      return true;
              }
              
              private static 
      async Task<boolSpellCast(string spell)
              {
                  return 
      await SpellCast(spellStyxWoW.Me.CurrentTarget);
              }
              
      #endregion
          
      }
      }
       
      Last edited: Mar 5, 2016
      Thecamel likes this.
    2. azidtrip

      azidtrip Member

      Joined:
      Mar 3, 2012
      Messages:
      215
      Likes Received:
      0
      Trophy Points:
      16
      Unbeliviable that noone have commented this. This routine seems to do INSANE dps. I love it. If now adding more to healing it would been perfect :).
       
    3. wallyworld

      wallyworld Banned

      Joined:
      Jul 22, 2016
      Messages:
      409
      Likes Received:
      5
      Trophy Points:
      0
      seeming how this is from 4 months ago, the chances of this working well are about zero.

      looks like it would be a good starting point for Legion updates though
       
    4. azidtrip

      azidtrip Member

      Joined:
      Mar 3, 2012
      Messages:
      215
      Likes Received:
      0
      Trophy Points:
      16
      Doesn't work anymore. Thanks for how long it lasted. Loved it as long it worked. ;)
       
    5. Pasterke

      Pasterke Well-Known Member Buddy Store Developer

      Joined:
      Dec 12, 2011
      Messages:
      1,228
      Likes Received:
      48
      Trophy Points:
      48
      That should be useable :

      PHP:
      using System.Threading.Tasks;
      using CommonBehaviors.Actions;
      using Styx;
      using Styx.Common;
      using Styx.CommonBot;
      using Styx.CommonBot.Coroutines;
      using Styx.CommonBot.Routines;
      using Styx.TreeSharp;
      using Styx.WoWInternals.WoWObjects;
      using System.Windows.Media;
      using System.Collections.Generic;
      using Styx.WoWInternals;
      using System.Linq;

      namespace 
      CoRoRetri
      {
          public class 
      CoRoRetri CombatRoutine
          
      {
              public 
      override WoWClass Class { get { return StyxWoW.Me.Specialization == WoWSpec.PaladinRetribution WoWClass.Paladin WoWClass.None; } }
              public 
      override string Name get { return "BasiCoRoutine - Retribution Paladin [WiNiFiX]"; } }
              private static 
      LocalPlayer Me get { return StyxWoW.Me; } }

              public 
      override Composite CombatBehavior get { return new ActionRunCoroutine(ctx => CombatCoroutine()); } }
              public 
      override Composite PreCombatBuffBehavior get { return new ActionRunCoroutine(ctx => PreCombatCoroutine()); } }


              public 
      override CapabilityFlags SupportedCapabilities
              
      {
                  
      get
                  
      {
                      return 
      CapabilityFlags.All;
                  }
              }

              
      #region Behaviors
              
      private static async Task<boolPreCombatCoroutine()
              {
                  if (
      Me.IsCasting || SpellManager.GlobalCooldown || !Me.IsAlive || Me.Mounted || Me.IsOnTransport) return true;

                  if (!
      Me.HasAura("Greater Blessing of Kings") && await SpellCast("Greater Blessing of Kings")) return true;

                  if (!
      Me.HasAura("Greater Blessing of Might") && await SpellCast("Greater Blessing of Might")) return true;

                  if (!
      Me.HasAura("Greater Blessing of Wisdom") && await SpellCast("Greater Blessing of Wisdom")) return true;

                  return 
      false;
              }

              static 
      int addCount
              
      {
                  
      get
                  
      {
                      return 
      ObjectManager.GetObjectsOfType<WoWUnit>(truefalse).
                      
      Count(=> !u.IsDead
                      
      && u.CanSelect
                      
      && u.Attackable
                      
      && u.IsFriendly
                      
      && u.IsWithinMeleeRange);
                  }
              }

              private static 
      async Task<boolCombatCoroutine()
              {
                  if (
      Me.IsCasting || SpellManager.GlobalCooldown) return true;

                  
      //healing
                  
      if (Me.HasAura("Divine Shield") && StyxWoW.Me.HealthPercent 100 && await SpellCastOnSelf("Flash of Light")) return true;

                  if (!
      Me.HasAura("Forbearance") && Me.HealthPercent <= 20 && await SpellCastOnSelf("Lay on Hands")) return true;

                  if (!
      Me.HasAura("Forbearance") && Me.HealthPercent <= 10 && await SpellCastOnSelf("Divine Shield")) return true;

                  if (
      Me.HealthPercent <= 90 && await SpellCastOnSelf("Shield of Vengeance")) return true;

                  if (!
      Me.CurrentTarget.IsAlive || !Me.CurrentTarget.IsWithinMeleeRange) return true;

                  
      //interrupt
                  
      if (Me.CurrentTarget.IsCasting && Me.CurrentTarget.CanInterruptCurrentSpellCast && await SpellCast("Rebuke")) return true;

                  if (
      Me.CurrentTarget.IsCasting && !Me.CurrentTarget.CanInterruptCurrentSpellCast && await SpellCast("Hammer of Justice")) return true;


                  
      //rotation
                  
      if (await SpellCast("Judgment")) return true;

                  if (
      Me.HasAura("Divine Purpose") && addCount && await SpellCast("Justicar's Vengeance")) return true;

                  if (
      addCount && Me.CurrentHolyPower >= && await SpellCast("Templar's Verdict")) return true;

                  if (
      addCount >= && (Me.CurrentHolyPower >= || Me.HasAura("Divine Purpose")) && await SpellCast("Divine Storm")) return true;

                  if (
      Me.HealthPercent <= 90 && await SpellCast("Avenging Wrath")) return true;

                  if ((
      Me.HasAura("Avenging Wrath") || Me.CurrentTarget.HasAura("Judgment")) && await SpellCast("Wake of Ashes")) return true;

                  if (
      await SpellCast("Blade of Wrath")) return true;

                  if (
      await SpellCast("Crusader Strike")) return true;

                  
      // Wait for lag
                  
      await CommonCoroutines.SleepForLagDuration();

                  
      // return true - we've cast the spell successfully.
                  
      return true;

              }
              
      #endregion

              #region Casting Tasks
              
      private static async Task<boolSpellCast(string spellWoWUnit target)
              {
                  
      // Return false if we can't cast the spell
                  
      if (!SpellManager.CanCast(spell))
                      return 
      false;

                  
      // Cast spell, return false if it fails to cast
                  
      if (!SpellManager.Cast(spelltarget))
                      return 
      false;

                  
      Logging.Write("[CoRoRetri] Cast {0} on {1}"spelltarget.SafeName);

                  
      // Wait for lag
                  
      await CommonCoroutines.SleepForLagDuration();

                  
      // return true - we've cast the spell successfully.
                  
      return true;
              }

              private static 
      async Task<boolSpellCastOnSelf(string spellWoWUnit target)
              {
                  
      // Return false if we can't cast the spell
                  
      if (!SpellManager.CanCast(spell))
                      return 
      false;

                  
      // Cast spell, return false if it fails to cast
                  
      if (!SpellManager.Cast(spelltarget))
                      return 
      false;

                  
      Logging.Write("[CoRoRetri] Cast {0} on {1}"spelltarget.SafeName);

                  
      // Wait for lag
                  
      await CommonCoroutines.SleepForLagDuration();

                  
      // return true - we've cast the spell successfully.
                  
      return true;
              }

              private static 
      async Task<boolSpellCastOnSelf(string spell)
              {
                  return 
      await SpellCast(spellMe);
              }

              private static 
      async Task<boolSpellCast(string spell)
              {
                  return 
      await SpellCast(spellStyxWoW.Me.CurrentTarget);
              }
              
      #endregion
          
      }
      }

       
      Last edited: Oct 8, 2016
    6. biller72

      biller72 Member

      Joined:
      Aug 14, 2010
      Messages:
      260
      Likes Received:
      2
      Trophy Points:
      18
      any updates coming for this?
       
    7. winifix

      winifix Member

      Joined:
      Dec 25, 2011
      Messages:
      164
      Likes Received:
      16
      Trophy Points:
      18
      not from me I no longer play Retri. but updating it is easy i doubt the rotation changed dramatically in legion.
       
    8. Pasterke

      Pasterke Well-Known Member Buddy Store Developer

      Joined:
      Dec 12, 2011
      Messages:
      1,228
      Likes Received:
      48
      Trophy Points:
      48
      I updated the code so that it works for Legion. Just copy/paste the code in filename.cs. It's easy to change if you want to use other spells.
       
    9. xilla

      xilla Member

      Joined:
      Jun 2, 2011
      Messages:
      143
      Likes Received:
      0
      Trophy Points:
      16
      Compiler Error: E:\Honourbadi\Routines\CoRoRetri\CoRoRetri.cs(94,70) : error CS1026: ) expected

      Gave this error for me, checked the line everything seems to be fine :/
       
    10. Pasterke

      Pasterke Well-Known Member Buddy Store Developer

      Joined:
      Dec 12, 2011
      Messages:
      1,228
      Likes Received:
      48
      Trophy Points:
      48
      Yes, the line should be :




      My fault :)
       
    11. xilla

      xilla Member

      Joined:
      Jun 2, 2011
      Messages:
      143
      Likes Received:
      0
      Trophy Points:
      16
      thanks for the response!
      but unfortunately, now getting this error :/

      CoRoRetri.cs(62,33) : error CS0161: 'CoRoRetri.CombatCoroutine()': not all code paths return a value
       
    12. Pasterke

      Pasterke Well-Known Member Buddy Store Developer

      Joined:
      Dec 12, 2011
      Messages:
      1,228
      Likes Received:
      48
      Trophy Points:
      48
      Modified the code to resolve the problem.
       
    13. Pasterke

      Pasterke Well-Known Member Buddy Store Developer

      Joined:
      Dec 12, 2011
      Messages:
      1,228
      Likes Received:
      48
      Trophy Points:
      48
      Finally I loaded the routine in Visual Studio, and made it working. I added movement and facing, so you can use it for autobot functions. I don't have an paladin, but created one on an newbie account to see the movements and skills. I took the talents from Icy-veins. Ckeck the spells and you easy figured out what talents you need :)

      View attachment RetriPaladin-09102016.zip
       
    14. Dirty D

      Dirty D New Member

      Joined:
      Mar 18, 2013
      Messages:
      10
      Likes Received:
      0
      Trophy Points:
      0
      ignore that just read the rest of the posts
       

    Share This Page