evading mob detection has been fixed in r455ish
installed r471 thanks for the info, is there any changelog on the svn? couldn't find it
evading mob detection has been fixed in r455ish
installed r471 thanks for the info, is there any changelog on the svn? couldn't find it
Spell.Cast("Serpent Sting", ret => !StyxWoW.Me.CurrentTarget.HasMyAura("Serpent Sting")),
Trying to edit the druid behaviour.
It's for farming in a spot with groups of mobs which are fighting other mobs.
When it has killed 1 of the mobs in the group, it's still in combat and then it ignores all the other mobs until it either runs into a mob that it aggroes (which means something is attacking and targeting me), or runs around until it's out of combat before it'll pull a new mob.
Isn't it possible to make something like if my target dies, and I'm still in combat - just pull a new nearby target?
public static Composite CreateClusterTargeting()
{
var clusterTarget = Clusters.GetBestUnitForCluster(Unit.UnfriendlyUnitsNearTarget, ClusterType.Radius, 10f);
return new PrioritySelector(
new Decorator(ret => StyxWoW.Me.GotTarget && StyxWoW.Me.Combat,
new Decorator(ret => clusterTarget != null,
new Decorator(ret => StyxWoW.Me.CurrentTarget != clusterTarget,
new Action(o => clusterTarget.Target())))));
}
public static Composite CreateNonPussyCombat()
{
var nearbyNiggas = Unit.NearbyUnfriendlyUnits.Where(o => o.Distance < 15).OrderBy(o => o.Distance);
return new PrioritySelector(
new Decorator(ret => StyxWoW.Me.CurrentTarget == null && StyxWoW.Me.Combat,
new Decorator(ret => nearbyNiggas.Count() > 0,
new Decorator(ret => nearbyNiggas.FirstOrDefault() != null,
new Action(o => nearbyNiggas.FirstOrDefault().Target())))));
}
Alrighty, I did some testing on the MM hunter and there are a couple very buggy things going on.
First is the new trapping logic. Once in a while it works, most of the time it does not. The only time I've seen it work is when there are exactly 3 adds clumped together and no other adds on combat. When it works, Trap Launcher is buffed, the trap is selected, and the correct target area is selected (resulting in the actual cast). When it does not work, the priority selector just hangs so that the hunter never even casts Multi-shot (or any of the other spells in the selector past the trap behavior). My feeling is that it has something to do with the target selection logic in the trap behavior.
The other issue is Serpent Sting. In the current revision there's an exception that gets thrown pertaining to Chimaera Shot checking the cooldown of SrS - but I have that fixed. The issue I haven't gotten through yet is using the HasMyAura helper. Here's what I'm currently testing with:
The problem with this is that the HasMyAura method always returns false, so I constantly get the "A more powerful spell is already active" error message as it continuously tries to fire SrS. I'd also like to get this solved for the Frost DK (and a bunch of other dot classes) - keeping our own DoTs up rather than just making sure anyone has that DoT up on the target is extremely important for a lot of dps classes, meaning we can't simply use the Buff() helper. My feeling is that the issue lies in the HasAura method on line 149 of Unit.cs, but I'm not quite sure how to solve it.
Any ideas? I'd be happy to do the testing and whatnot, I'm just not sure where to go with the code next.
- Ben
hasaura is broken for me too
private static bool HasAura(this WoWUnit unit, string aura, int stacks, WoWUnit creator) {
//Logger.WriteDebug("Looking for aura: " + aura);
var auras = unit.GetAllAuras();
return (from a in auras
where a.Name == aura
select a.StackCount >= stacks && (creator == null || a.CreatorGuid == creator.Guid)).FirstOrDefault();
}
unit.HasMyAura("Serpent Sting", 1)
HasMyAura should work fine. (You can try passing 1 for the stack count, to ensure its up, and not just an old aura laying in WoW's list)
Code:private static bool HasAura(this WoWUnit unit, string aura, int stacks, WoWUnit creator) { //Logger.WriteDebug("Looking for aura: " + aura); var auras = unit.GetAllAuras(); return (from a in auras where a.Name == aura select a.StackCount >= stacks && (creator == null || a.CreatorGuid == creator.Guid)).FirstOrDefault(); }
Code:unit.HasMyAura("Serpent Sting", 1)
Spell.Cast("Howling Blast", ret => !StyxWoW.Me.CurrentTarget.HasMyAura("Frost Fever", 1)),
new Decorator(ret => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 10*10) >= 3 && StyxWoW.Me.IsInInstance, Spell.BuffSelf("Hellfire")
),
Spell.Cast("Blood Tap", ret => StyxWoW.Me.UnholyRuneCount >= 1 && StyxWoW.Me.FrostRuneCount == 0 && StyxWoW.Me.DeathRuneCount == 0 && StyxWoW.Me.CurrentTarget.Distance <= 10),
Trying to edit the druid behaviour.
It's for farming in a spot with groups of mobs which are fighting other mobs.
When it has killed 1 of the mobs in the group, it's still in combat and then it ignores all the other mobs until it either runs into a mob that it aggroes (which means something is attacking and targeting me), or runs around until it's out of combat before it'll pull a new mob.
Isn't it possible to make something like if my target dies, and I'm still in combat - just pull a new nearby target?
To try to correct this, and add added ability to Swipe, we've implemented the following:
Code:public static Composite CreateClusterTargeting() { var clusterTarget = Clusters.GetBestUnitForCluster(Unit.UnfriendlyUnitsNearTarget, ClusterType.Radius, 10f); return new PrioritySelector( new Decorator(ret => StyxWoW.Me.GotTarget && StyxWoW.Me.Combat, new Decorator(ret => clusterTarget != null, new Decorator(ret => StyxWoW.Me.CurrentTarget != clusterTarget, new Action(o => clusterTarget.Target()))))); } public static Composite CreateNonPussyCombat() { var nearbyNiggas = Unit.NearbyUnfriendlyUnits.Where(o => o.Distance < 15).OrderBy(o => o.Distance); return new PrioritySelector( new Decorator(ret => StyxWoW.Me.CurrentTarget == null && StyxWoW.Me.Combat, new Decorator(ret => nearbyNiggas.Count() > 0, new Decorator(ret => nearbyNiggas.FirstOrDefault() != null, new Action(o => nearbyNiggas.FirstOrDefault().Target()))))); }
using System.Linq;
using Singular.Dynamics;
using Singular.Helpers;
using Singular.Managers;
using Singular.Settings;
using Styx;
using Styx.Combat.CombatRoutine;
using Styx.Logic.Combat;
using TreeSharp;
namespace Singular.ClassSpecific.Paladin
{
public class Retribution
{
#region Combat
[Class(WoWClass.Paladin)]
[Spec(TalentSpec.RetributionPaladin)]
[Behavior(BehaviorType.Combat)]
[Behavior(BehaviorType.Heal)]
[Context(WoWContext.All)]
public static Composite CreateRetributionPaladinCombat()
{
return
new PrioritySelector(
Safers.EnsureTarget(),
Holy.CreatePaladinHealBehavior(true),
Movement.CreateMoveToLosBehavior(),
Movement.CreateFaceTargetBehavior(),
Helpers.Common.CreateAutoAttack(true),
// Interrupt the first unit casting near us. Huzzah!
Helpers.Common.CreateInterruptSpellCast(
ret => Unit.NearbyUnfriendlyUnits.FirstOrDefault(u => u.IsCasting && u.CanInterruptCurrentSpellCast)),
// Inquisition, even if AoE. This should give it a 99%+ uptime
Spell.Cast(
"Inquisition",
ret =>
!StyxWoW.Me.ActiveAuras.ContainsKey("Inquisition") ||
GetAuraTimeLeft(StyxWoW.Me, "Inquisition", true).Seconds <= 3),
// Pop Crusader if we're in single-target mode and we have less than 3 holy power and don't have Divine Purpose (3 Holy Power)
Spell.Cast(
"Crusader Strike",
ret =>
(Unit.NearbyUnfriendlyUnits.Count(u => u.Distance <= 8) < 4 || !SpellManager.HasSpell("Divine Storm")) &&
StyxWoW.Me.CurrentHolyPower != 3 && !StyxWoW.Me.HasAura("Divine Purpose")),
// Pop Divine Storm if we're trying to AoE.
Spell.Cast("Divine Storm", ret => Unit.NearbyUnfriendlyUnits.Count(u => u.Distance <= 8) >= 4),
Spell.Cast("Templar's Verdict", ret => StyxWoW.Me.CurrentHolyPower == 3 || StyxWoW.Me.HasAura("Divine Purpose")),
Spell.Cast("Exorcism", ret => StyxWoW.Me.ActiveAuras.ContainsKey("The Art of War")),
Spell.Cast("Hammer of Wrath", ret => StyxWoW.Me.CurrentTarget.HealthPercent <= 20 || StyxWoW.Me.ActiveAuras.ContainsKey("Avenging Wrath")),
Spell.Cast("Judgement"),
Spell.Cast("Holy Wrath", ret => StyxWoW.Me.ManaPercent > 35),
Spell.Cast("Consecration", ret => StyxWoW.Me.ManaPercent > 75),
// Move to melee is LAST. Period.
Movement.CreateMoveToMeleeBehavior(true)
);
}
#endregion
#region Pull
[Class(WoWClass.Paladin)]
[Spec(TalentSpec.RetributionPaladin)]
[Behavior(BehaviorType.Pull)]
[Context(WoWContext.All)]
public static Composite CreateRetributionPaladinPull()
{
return
new PrioritySelector(
Movement.CreateMoveToLosBehavior(),
Movement.CreateFaceTargetBehavior(),
Spell.Cast("Judgement"),
Helpers.Common.CreateAutoAttack(true),
Movement.CreateMoveToTargetBehavior(true,5f)
);
}
#endregion
#region Combat Buffs
[Class(WoWClass.Paladin)]
[Spec(TalentSpec.RetributionPaladin)]
[Behavior(BehaviorType.CombatBuffs)]
[Context(WoWContext.All)]
public static Composite CreateRetributionPaladinCombatBuffs()
{
return
new PrioritySelector(
Spell.BuffSelf(Unit.NearbyUnfriendlyUnits.Count(u => u.Distance <= 8) >= 4 ? "Seal of Righteousness" : "Seal of Truth"),
//We don't pop Zealotry if Avenging Wrath is active and vice versa
Spell.BuffSelf("Zealotry", ret => Unit.IsBoss(StyxWoW.Me.CurrentTarget) && !StyxWoW.Me.ActiveAuras.ContainsKey("Avenging Wrath")),
Spell.BuffSelf("Avenging Wrath", ret => Unit.IsBoss(StyxWoW.Me.CurrentTarget) && !StyxWoW.Me.ActiveAuras.ContainsKey("Zealotry")),
Spell.BuffSelf("Divine Protection", ret => StyxWoW.Me.HealthPercent <= SingularSettings.Instance.Paladin.DivineProtectionHealthRet),
Spell.BuffSelf("Divine Plea", ret => StyxWoW.Me.ManaPercent < 90)
);
}
#endregion
}
}