zealtla 0 Posted May 14, 2018 Share Posted May 14, 2018 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! Link to comment https://wrobot.eu/forums/topic/9393-target-not-in-line-of-sight/ Share on other sites More sharing options...
iMod 99 Posted May 14, 2018 Share Posted May 14, 2018 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. 79135 1 Link to comment https://wrobot.eu/forums/topic/9393-target-not-in-line-of-sight/#findComment-43582 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now