What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[PvE] WiNiFiX - Retri Paladin

winifix

Member
Joined
Dec 25, 2011
Messages
164
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<bool> PreCombatCoroutine()
        {
            // 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<WoWUnit> UnfriendlyUnits
        {
            get { return ObjectManager.GetObjectsOfType<WoWUnit>(true, false).
                    Where(u => !u.IsDead && 
                          u.CanSelect && 
                          u.Attackable && 
                          !u.IsFriendly && 
                          u.IsWithinMeleeRange); }
        }

        private static async Task<bool> CombatCoroutine()
        {
            // 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 >= 5 || 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<bool> SpellCast(string spell, WoWUnit 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(spell, target))
                return false;

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

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

            // return true - we've cast the spell successfully.
            return true;
        }
        
        private static async Task<bool> SpellCast(string spell)
        {
            return await SpellCast(spell, StyxWoW.Me.CurrentTarget);
        }
        #endregion
    }
}
 
Last edited:
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 :).
 
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
 
Doesn't work anymore. Thanks for how long it lasted. Loved it as long it worked. ;)
 
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<bool> PreCombatCoroutine()
        {
            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>(true, false).
                Count(u => !u.IsDead
                && u.CanSelect
                && u.Attackable
                && u.IsFriendly
                && u.IsWithinMeleeRange);
            }
        }

        private static async Task<bool> CombatCoroutine()
        {
            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 < 2 && await SpellCast("Justicar's Vengeance")) return true;

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

            if (addCount >= 2 && (Me.CurrentHolyPower >= 3 || 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<bool> SpellCast(string spell, WoWUnit 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(spell, target))
                return false;

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

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

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

        private static async Task<bool> SpellCastOnSelf(string spell, WoWUnit 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(spell, target))
                return false;

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

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

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

        private static async Task<bool> SpellCastOnSelf(string spell)
        {
            return await SpellCast(spell, Me);
        }

        private static async Task<bool> SpellCast(string spell)
        {
            return await SpellCast(spell, StyxWoW.Me.CurrentTarget);
        }
        #endregion
    }
}
 
Last edited:
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.
 
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 :/
 
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
 
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
 
Back
Top