Hi I am trying to write something for my WD, can be used for other classes as well...that keeps my WD in constant motion for Hexing pants. I have actually accomplished this in game...in that my WD moves back as forth from the target with the code below towards the end of witchdoctorcombat.cs.
The code works in game just fine...My WD is constantly moving and using all other skills. The issue is that I am constantly getting the error below in DB.
Any insight into the errors below? Am I calling SNOpower.walk with the wrong parameters? Any help would be great. The Hexing pants constant movement is working really well...just need the errors to go away. Thanks!
Working Version of Files here
Code:
[COLOR="#FF0000"] if(CurrentTarget.RadiusDistance > 10f)
{
return new TrinityPower(SNOPower.Walk, 10f, CurrentTarget.Position);
}
if(CurrentTarget.RadiusDistance < 10f)
{
Vector3 vNewTarget = MathEx.CalculatePointFrom(CurrentTarget.Position, Player.Position, -10f);
return new TrinityPower(SNOPower.Walk, 10f, vNewTarget);
}[/COLOR]
// Default Attacks
if (IsNull(power))
power = CombatBase.DefaultPower;
//return new TrinityPower(SNOPower.None);
return power;
The code works in game just fine...My WD is constantly moving and using all other skills. The issue is that I am constantly getting the error below in DB.
Any insight into the errors below? Am I calling SNOpower.walk with the wrong parameters? Any help would be great. The Hexing pants constant movement is working really well...just need the errors to go away. Thanks!
Code:
Exception during bot tick.System.NullReferenceException: Object reference not set to an instance of an object.
at Trinity.Combat.Abilities.WitchDoctorCombat.GetPower() in c:\Users\Rominder Momi\Documents\01. DB Main\01. Riftbot - Orig\Plugins\Trinity\Combat\Abilities\WitchDoctorCombat.cs:line 518
at Trinity.Trinity.AbilitySelector(Boolean IsCurrentlyAvoiding, Boolean UseOOCBuff, Boolean UseDestructiblePower) in c:\Users\Rominder Momi\Documents\01. DB Main\01. Riftbot - Orig\Plugins\Trinity\Combat\AbilitySelector.cs:line 110
at Trinity.Trinity.TargetCheck(Object ret) in c:\Users\Rominder Momi\Documents\01. DB Main\01. Riftbot - Orig\Plugins\Trinity\Combat\TargetCheck.cs:line 164
at Zeta.TreeSharp.Decorator.CanRun(Object context)
at Zeta.TreeSharp.Decorator..()
at Zeta.TreeSharp.Composite.Tick(Object context)
at Zeta.TreeSharp.PrioritySelector..()
at Zeta.TreeSharp.Composite.Tick(Object context)
at Zeta.Common.HookExecutor.Run(Object context)
at Zeta.TreeSharp.Action.RunAction(Object context)
at Zeta.TreeSharp.Action..()
at Zeta.TreeSharp.Composite.Tick(Object context)
at Zeta.TreeSharp.PrioritySelector..()
at Zeta.TreeSharp.Composite.Tick(Object context)
at Zeta.Bot.BotMain.()
Working Version of Files here
Last edited: