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 . 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; } }
Would you mind if I used this as a base/reference for a pve/pvp protection CC? Most likely for personal use only, but if I released it publicly I would give you credit of course =] I'm new to C# so this is just what I was looking for ^^
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 (SpellManager.CanCast("Guardian of Ancient Kings", Me)) { SpellManager.Cast("Guardian of Ancient Kings"); Logging.Write("Guardian of Ancient Kings"); } 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 Truth")) { SpellManager.Cast("Seal of Truth", 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 Truth"); } } 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; } }
just change seal of righteousnes for seal of truth all credit goes to exemplar Edit: how can i change the healing to use the heals at specific health levels ? Edit: for some reason im not moving in bg bot any idea why? [Solved]
2exemplar, your cc's are freaking amazing, keep it up. Can any1 make this cc use hammer of justice in anyway? On a every cooldown maybe?
This one is pretty nice indeed Something like Undeadlol1 suggested would be a nice addition, and is there anyway to avoid targeting the pets? I've found my pally sometimes to be nuking the warlocks pet while the lock was /laughing and watching me die ;-) This CC is pretty much the only one working in PVP right now and not bad at all, thanks for that!
Is the healing level set at the end at 50? so all heals will only be used then? thats the only level i see all the way at the bottom
Any way to include a couple lines of coding so its possible to run mixed with Arch? Now it doesn't do anything at all when attacked while surveying Oh, and another thing I found: when my pal is in BG and the current target is killed/dead, it won't switch to other targets until it's out of combat again.. maybe this is an issue only I have, but perhaps not.
^^^^ this, although it is funny watching my pally kill a hunters pet while he is attacking me and then turn around and kill him too
Is it good to use in pve? Im tired of the standard noobish built CC. Spamming exorscismen ? Rly So would be really thankful to know if this works for pve. If not, could you take your time to make one? Would be REALLY appreciated!
I'm working on making it select only players, and to make it pick lowest health along with closest target.
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 (SpellManager.CanCast("Guardian of Ancient Kings", Me)) { SpellManager.Cast("Guardian of Ancient Kings"); Logging.Write("Guardian of Ancient Kings"); } 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 (Me.CurrentHolyPower == 3) { if (SpellManager.CanCast("Zealotry")) { s = "Zealotry"; } else { s = "Templar's Verdict"; } } else if (SpellManager.CanCast("Hammer of Justice", tar)) { s = "Hammer of Justice"; } 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 && !Me.CurrentTarget.IsPet && Me.CurrentTarget.IsAlive) { 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 where player.IsPet == false orderby player.HealthPercent ascending,player.Distance descending select player).FirstOrDefault();*/ WoWPlayer target = ObjectManager.GetObjectsOfType<WoWPlayer>(). Where(p => p.IsHostile && !p.IsPet && !p.IsOnTransport && !p.Dead && p.DistanceSqr <= 70 * 70). OrderByDescending(p => p.DistanceSqr).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 Truth")) { SpellManager.Cast("Seal of Truth", 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 Truth"); } } 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 = 30; private static int PULL_DISTANCE = 30; private static float HOF_THRESHOLD = 8.05f; } } Tweaked targeting code, didnt notice it targeting pets anymore, might still do it. Also will HoJ off cooldown.