Hi friends,
Started to use HB again recently and found the other CC didn't work very well.
This isn't really flexible and you'll have to change code to 'configure it', as I made it for myself and not for general sharing, but what the hey.
You pretty much must be specced into runspeed talent (Pursuit of Justice), and Judgement +range or else it will fail catastrophically. Other things, not so much.
I've only been using it a few hours so there may be some yet unfound bugs
. My Paladin is level 71 at the moment so I don't know how it works on 80s.
Oh, another thing. I generally only queue for AB and WSG and do not know how it works in the others
.
Started to use HB again recently and found the other CC didn't work very well.
This isn't really flexible and you'll have to change code to 'configure it', as I made it for myself and not for general sharing, but what the hey.
You pretty much must be specced into runspeed talent (Pursuit of Justice), and Judgement +range or else it will fail catastrophically. Other things, not so much.
I've only been using it a few hours so there may be some yet unfound bugs

Oh, another thing. I generally only queue for AB and WSG and do not know how it works in the others

Code:
using System;
using System.Linq;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using Styx;
using Styx.Combat.CombatRoutine;
using Styx.Helpers;
using Styx.Logic;
using Styx.Logic.Combat;
using Styx.Logic.Pathing;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
using TreeSharp;
using Action = TreeSharp.Action;
namespace RetPally
{
class Paladin : CombatRoutine
{
public override void Combat()
{
WoWUnit tar = Me.CurrentTarget;
if (!Me.IsFacing(tar))
{
tar.Face();
Logging.Write("Facing target");
}
else if (SpellManager.CanCast("Avenging Wrath", Me))
{
SpellManager.Cast("Avenging Wrath");
Logging.Write("Avenging Wrath");
}
else if ((tar.HealthPercent <= 20 || isAuraActive("Avenging Wrath")) && SpellManager.CanCast("Hammer of Wrath", tar))
{
if (SpellManager.CanCast("Hammer of Wrath", tar))
{
SpellManager.Cast("Hammer of Wrath", tar);
Logging.Write("HoW");
}
}
else if (isAuraActive("The Art of War"))
{
if (SpellManager.CanCast("Exorcism", tar))
{
SpellManager.Cast("Exorcism", tar);
Logging.Write("AoW proc");
}
}
else if (tar.Distance > 5 && tar.Distance <= 30)
{
String s = "Judgement";
if (s != null && SpellManager.CanCast(s, tar))
{
SpellManager.Cast(s, tar);
Logging.Write(s);
}
else
{
Navigator.MoveTo(tar.Location);
}
}
else if (tar.Distance <= 5)
{
String s = "Judgement";
if (tar.IsCasting)
{
if (SpellManager.CanCast("Rebuke", tar))
{
s = "Rebuke";
}
else if (SpellManager.CanCast("Repentance", tar))
{
s = "Repentance";
}
else if (SpellManager.CanCast("Hammer of Justice", tar))
{
s = "Hammer of Justice";
}
}
else if (Me.CurrentHolyPower == 3)
{
if (SpellManager.CanCast("Zealotry"))
{
s = "Zealotry";
}
else
{
s = "Templar's Verdict";
}
}
else if (SpellManager.CanCast("Crusader Strike", tar))
{
s = "Crusader Strike";
}
if (SpellManager.CanCast(s, tar))
{
Logging.Write(s);
SpellManager.Cast(s, tar);
}
}
else if (tar.Distance > 30)
{
Logging.Write("Changing targets");
Me.ClearTarget();
}
}
public override void Pull()
{
if (Me.GotTarget)
{
WoWUnit tar = Me.CurrentTarget;
if (tar.Distance > PULL_DISTANCE || !tar.InLineOfSight)
{
Logging.Write("Moving to " + tar);
Navigator.MoveTo(tar.Location);
}
else
{
Combat();
}
}
else
{
var target = (from player in ObjectManager.GetObjectsOfType<WoWPlayer>(false, false)
where player.IsAlliance != Me.IsAlliance
where player.Dead == false && player.IsGhost == false
orderby player.Distance ascending
select player).FirstOrDefault();
if (target != null)
{
Logging.Write("Targeting " + target);
target.Target();
}
}
}
public override void Heal()
{
string s = null;
if (Me.MovementInfo.RunSpeed < HOF_THRESHOLD && SpellManager.CanCast("Hand of Freedom", Me))
{
s = "Hand of Freedom";
}
else if ((Me.Stunned || Me.Fleeing))
{
if (SpellManager.CanCast("Blessing of Protection", Me))
{
s = "Blessing of Protection";
}
else if (SpellManager.CanCast("Divine Shield", Me))
{
s = "Divine Shield";
}
}
else if (Me.CurrentHolyPower > 0)
{
s = "Word of Glory";
}
else if (Me.HealthPercent <= HEAL_THRESHOLD / 2 && SpellManager.CanCast("Lay on Hands"))
{
s = "Lay on Hands";
}
else if (Me.IsMoving)
{
WoWMovement.MoveStop();
}
else
{
s = "Flash of Light";
}
if (s != null && SpellManager.CanCast(s))
{
Logging.Write("Heal " + s);
SpellManager.Cast(s);
}
}
public override void PreCombatBuff()
{
if (!isAuraActive("Seal of Righteousness"))
{
SpellManager.Cast("Seal of Righteousness", Me);
Logging.Write("SoR");
}
else if (isAuraActive("Mark of the Wild") && !isAuraActive("Blessing of Might"))
{
SpellManager.Cast("Blessing of Might", Me);
Logging.Write("might");
}
else if (isAuraActive("Blessing of Kings") && !isAuraActive("Blessing of Might"))
{
if (Me.ActiveAuras["Blessing of Kings"].CreatorGuid != Me.Guid)
{
SpellManager.Cast("Blessing of Might", Me);
Logging.Write("might");
}
}
else if (!isAuraActive("Blessing of Kings") && !isAuraActive("Mark of the Wild"))
{
SpellManager.Cast("Blessing of Kings", Me);
Logging.Write("kings");
}
}
public override bool NeedPreCombatBuffs
{
get
{
return (!isAuraActive("Blessing of Kings") && !isAuraActive("Mark of the Wild"))
|| (!isAuraActive("Blessing of Might") && isAuraActive("Mark of the Wild")) ||
!isAuraActive("Seal of Righteousness");
}
}
public override bool NeedHeal
{
get
{
return Me.HealthPercent <= HEAL_THRESHOLD ||
(Me.MovementInfo.RunSpeed < HOF_THRESHOLD && SpellManager.CanCast("Hand of Freedom"));
}
}
private bool isAuraActive(string name)
{
return Me.ActiveAuras.ContainsKey(name);
}
public override sealed string Name { get { return "RetPally"; } }
public override WoWClass Class { get { return WoWClass.Paladin; } }
private static LocalPlayer Me { get { return ObjectManager.Me; } }
public override bool NeedRest { get { return false; } }
public override bool NeedPullBuffs { get { return false; } }
public override bool NeedCombatBuffs { get { return false; } }
private static int HEAL_THRESHOLD = 50;
private static int PULL_DISTANCE = 30;
private static float HOF_THRESHOLD = 8.05f;
}
}
Last edited: