public override bool DoWork() { using (new FrameLock(true)) { Me me = new Me(); EVE.ISXEVE.EVE eve = new EVE.ISXEVE.EVE(); if (!me.InSpace && me.InStation && !Undocked) { eve.Execute(ExecuteCommand.CmdExitStation); Undocked = true; } else if (Undocked && me.InSpace && !me.InStation) { return(true); } } return(false); }
/// <summary> /// Does the tackle and returns the current valid engageable targets /// </summary> /// <param name="myMe">My me.</param> /// <param name="myEve">My eve.</param> /// <param name="entities">The entities.</param> /// <param name="engageRules">The engage rules.</param> public static void Engage(Character myMe, EVE.ISXEVE.EVE myEve, IEnumerable <EntityViewModel> entities, EngageRules engageRules) { IEnumerable <EntityViewModel> targettedNeuts = TargetNeuts(entities).ToList(); //Tackle closest targetted neut EntityViewModel closestTargetedNeut = null; if (targettedNeuts.Any()) { closestTargetedNeut = EntityHelper.FindClosestEntity(targettedNeuts); } if (closestTargetedNeut != null) { if (engageRules.GoBrawl ?? DefaultGoBrawl) { closestTargetedNeut.Entity.MakeActiveTarget(); closestTargetedNeut.Entity.Orbit(500); } ActivateModules(myMe, myEve, engageRules); } else { var closestNeutNotTargetted = EntityHelper.FindClosestEntity(entities); if (closestNeutNotTargetted != null) { ActivateModules(myMe, myEve, engageRules); if (engageRules.GoBrawl ?? DefaultGoBrawl) { closestNeutNotTargetted.Entity.Approach(); myEve.Execute(ExecuteCommand.CmdAccelerate); } } } }
public override bool DoWork() { using (new FrameLock(true)) { if (Desto == null) { return(false); } EVE.ISXEVE.EVE eve = new EVE.ISXEVE.EVE(); Me me = new Me(); if (me.SolarSystemID == Desto.ID) { return(true); } List <int> Waypoints = eve.GetWaypoints(); if (Waypoints.Count > 1 && Waypoints.Contains(Desto.ID)) { eve.ClearAllWaypoints(); // Wait till next pulse return(false); } else if (Waypoints.Count == 1 && !Waypoints.Contains(Desto.ID)) { Desto.SetDestination(); return(false); } if (!me.AutoPilotOn) { eve.Execute(ExecuteCommand.CmdToggleAutopilot); return(false); } return(false); } }
/// <summary> /// Does the tackle and returns the current valid engageable targets /// </summary> /// <param name="myMe">My me.</param> /// <param name="myEve">My eve.</param> /// <param name="entities">The entities.</param> /// <param name="engageRules">The engage rules.</param> public static void Engage(Character myMe, EVE.ISXEVE.EVE myEve, IEnumerable<EntityViewModel> entities, EngageRules engageRules) { IEnumerable<EntityViewModel> targettedNeuts = TargetNeuts(entities).ToList(); //Tackle closest targetted neut EntityViewModel closestTargetedNeut = null; if (targettedNeuts.Any()) { closestTargetedNeut = EntityHelper.FindClosestEntity(targettedNeuts); } if (closestTargetedNeut != null) { if (engageRules.GoBrawl ?? DefaultGoBrawl) { closestTargetedNeut.Entity.MakeActiveTarget(); closestTargetedNeut.Entity.Orbit(500); } ActivateModules(myMe, myEve, engageRules); } else { var closestNeutNotTargetted = EntityHelper.FindClosestEntity(entities); if (closestNeutNotTargetted != null) { ActivateModules(myMe, myEve, engageRules); if (engageRules.GoBrawl ?? DefaultGoBrawl) { closestNeutNotTargetted.Entity.Approach(); myEve.Execute(ExecuteCommand.CmdAccelerate); } } } }