May 14, 20187 yr HI,everyone.sometimes target not in line of sight,and player can't cast spell,but bot won't move,so I want to write a function with C# in FC to handle this use events. Which events is about target not in line of sight? tks!
May 14, 20187 yr 5 hours ago, zealtla said: HI,everyone.sometimes target not in line of sight,and player can't cast spell,but bot won't move,so I want to write a function with C# in FC to handle this use events. Which events is about target not in line of sight? tks! Donno if that helps and its right out of the mind and just an idea... wManager.Events.FightEvents.OnFightStart += (WoWUnit unit, System.ComponentModel.CancelEventArgs e) => { // Not in LoS if (TraceLine.TraceLineGo(unit.Position)) { // Get waypoints to the target IEnumerable<robotManager.Helpful.Vector3> waypoints = PathFinder.Pather.FindPath(ObjectManager.Me.Position, unit.Position, out bool result, out bool resultPartial); foreach (robotManager.Helpful.Vector3 waypoint in waypoints) { if (!TraceLine.TraceLineGo(waypoint)) { // In LoS MovementManager.MoveTo(waypoint); // While moving.... } } } }; You also need to cancel that event and i'm not sure if its the right one. There is no "not in LoS" event as far i know.
Create an account or sign in to comment