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.
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: