Esempio n. 1
0
        public static void Pulse()
        {
            using (new FrameLock(true))
            {
                if (WarpInitiated == false)
                {
                    //If drones are not launched, warp to citadel
                    if (!f_Drones.CheckIfDronesAreLaunched())
                    {
                        f_Drones.ReturnAllDronesToBay();
                        f_WarpTo.Citadel(Citadels.First(), false);

                        WarpInitiated = true;
                    }
                    //If drones are launched and they are returning and our ship is aligning, do nothing
                    if (f_Drones.CheckIfDronesAreLaunched() &&
                        !f_Drones.CheckIfAllReturning(f_Drones.GetDroneStates()) &&
                        f_Entities.GetEntityMode(VNI.Me.ToEntity) == "Aligned")
                    {
                    }
                    //If drones are launched and they are not returning and we are not aligned, return drones and align to station
                    if (f_Drones.CheckIfDronesAreLaunched() &&
                        !f_Drones.CheckIfAllReturning(f_Drones.GetDroneStates()) &&
                        f_Entities.GetEntityMode(VNI.Me.ToEntity) != "Aligned")
                    {
                        f_Drones.ReturnAllDronesToBay();
                        f_WarpTo.Citadel(Citadels[0], true);
                    }
                }
                //if warp initiated
                if (WarpInitiated == true)
                {
                    string OurStatus = f_Entities.GetEntityMode(VNI.Me.ToEntity);
                    double Distance  = (double)f_Entities.DistanceFromPlayerToEntity(Citadels[0]);

                    if (OurStatus == "Warping" && Distance < 200000)
                    {
                        return;
                    }
                    else if (OurStatus != "Warping" && Distance < 10000)
                    {
                        Citadels[0].Dock();
                        VNI.Wait(10);
                    }
                    else if (OurStatus != "Warping" && Distance > 200000)
                    {
                        WarpInitiated = false;
                    }
                    else if (OurStatus != "Warping" && Distance < 10000 && lowShield)
                    {
                        if (DateTime.Now > BackToAnomalyTime)
                        {
                            f_WarpTo.Anomaly(f_Anomalies.currentAnom, 0);
                            m_RoutineController.ActiveRoutine = Routine.TravelToAnomaly;
                        }
                        VNI.Wait(10);
                    }
                }
            }
        }
Esempio n. 2
0
        public static void Pulse()
        {
            using (new FrameLock(true))
            {
                m_ModuleManagement.activateAllModules();

                List <Attacker>    Attackers    = VNI.Me.GetAttackers();
                List <ActiveDrone> ActiveDrones = VNI.Me.GetActiveDrones();
                rats = f_Entities.GetRats();

                VNI.Wait(1);

                r_TravelToAnomaly.initComplete = false;

                if (!f_Entities.CheckForNPC())
                {
                    VNI.Wait(10);
                    //TODO - RAT PRIORTISING!

                    //If drones are launched and there are no NPCs return drones and go to next anomaly
                    if (f_Drones.CheckIfDronesAreLaunched() && !f_Entities.CheckForNPC())
                    {
                        VNI.Eve.Execute(ExecuteCommand.CmdDronesReturnToBay);

                        VNI.DebugUI.NewConsoleMessage("Site ID: " + f_Anomalies.currentAnom.ID + " Completed moving to next anom");

                        f_Anomalies.bannedAnoms.Add(f_Anomalies.currentAnom);

                        VNI.Wait(20);

                        m_CombatDroneController.DronesEngaged = false;
                        f_Anomalies.currentAnomComplete       = true;

                        if (f_Anomalies.lastAnomaly)
                        {
                            m_RoutineController.ActiveRoutine = Routine.Idle;
                            r_Flee.Citadels.First().WarpTo();
                        }
                        else
                        {
                            m_RoutineController.ActiveRoutine = Routine.TravelToAnomaly;
                        }
                    }
                }
                if (rats.Count > 0 && VNI.Me.TargetedByCount == rats.Count)
                {
                    m_CombatDroneController.Pulse();
                }
            }
        }
Esempio n. 3
0
        public static void Initialise()
        {
            f_Anomalies.GetAnomalies();
            f_Anomalies.currentAnom = f_Anomalies.sortedSysAnoms.First();

            if (f_Drones.CheckIfDronesAreLaunched())
            {
                f_Drones.ReturnAllDronesToBay();
            }

            VNI.DebugUI.NewConsoleMessage("Finding and warping to new anom");
            f_WarpTo.Anomaly(f_Anomalies.currentAnom, 0);
            f_Anomalies.anomOccupied = false;

            VNI.Wait(5);

            VNI.Eve.CloseAllMessageBoxes();
            timeOut = DateTime.Now.AddSeconds(10);

            initComplete = true;
        }
        public static void Pulse()
        {
            using (new FrameLock(true))
            {
                List <Attacker>    Attackers    = VNI.Me.GetAttackers();
                List <ActiveDrone> activeDrones = VNI.Me.GetActiveDrones();

                int NumAttackers = Attackers.Count;

                if (VNI.Me.TargetingCount > 0)
                {
                    TargetLocked = true;
                }
                //Priority rat targeting. Moritifiers must be destroyed asap
                Entity PriorityRat = Attackers.Find(a => a.Name == ("Dire Pithum Mortifier"));
                if (!f_Entities.CheckIfExists(f_Targeting.FocusedRat))
                {
                    f_Targeting.FocusedRat = null;
                }
                if (f_Targeting.FocusedRat != null && f_Targeting.FocusedRat.IsActiveTarget && !f_Drones.CheckIfDronesAreOnTarget(f_Targeting.FocusedRat))
                {
                    VNI.DebugUI.NewConsoleMessage("Engaging: " + f_Targeting.FocusedRat.Name);
                    f_Drones.EngageTarget();
                }
                //If aggression is lost. Get the time at which we lost aggro
                if (NumAttackers < f_Entities.GetRats().Count&& lostAggroTime == null)
                {
                    lostAggroTime = DateTime.Now;
                }

                if (lostAggroTime != null && !lostAggro && lostAggroTime.Value.AddSeconds(15) < DateTime.Now)
                {
                    lostAggro    = true;
                    RecallDrones = true;
                }
                //Anomaly completed or we're between waves
                if (!f_Entities.CheckForNPC())
                {
                    VNI.Wait(10);
                    //TODO - RAT PRIORTISING!
                    //
                    if (f_Drones.CheckIfDronesAreLaunched() && !f_Entities.CheckForNPC())
                    {
                        VNI.Eve.Execute(ExecuteCommand.CmdDronesReturnToBay);
                        VNI.DebugUI.NewConsoleMessage("Site ID: " + f_Anomalies.currentAnom.ID + " Completed moving to next anom");



                        m_RoutineController.ActiveRoutine = Routine.TravelToAnomaly;
                    }
                }
                // We're under attack!
                else if (f_Entities.CheckForNPC())
                {
                    //VNI.DebugUI.updateDroneTargetLabel(f_Drones.checkDroneTarget());
                    List <Entity> targetedby = VNI.Me.GetTargetedBy();

                    //If drones are NOT launched and we are targeted by all rats, launch drones
                    if (!f_Drones.CheckIfDronesAreLaunched() && NumAttackers == f_Entities.GetRats().Count)
                    {
                        VNI.MyShip.LaunchAllDrones();
                        VNI.Wait(3);

                        VNI.DebugUI.NewConsoleMessage("NPCs spawned, we have aggro, Launching drones");

                        DronesLaunched = true;
                        DronesEngaged  = false;

                        lostAggro     = false;
                        lostAggroTime = null;
                    }
                    //If drones are launched and we are not targeting any rats and drones are not engaged, lock a target
                    else if (f_Drones.CheckIfDronesAreLaunched() && f_Targeting.TargetCount() == 0 && !f_Drones.CheckIfEngaged())
                    {
                        VNI.DebugUI.NewConsoleMessage("Waiting for autotargeter to lock a target");
                        TargetLocked = true;
                    }
                    //If drones are launched, we are targeting atleast one rat and drones are NOT engaged, engage a target
                    else if (f_Drones.CheckIfDronesAreLaunched() && f_Targeting.TargetCount() > 0 && !f_Drones.CheckIfEngaged() && !DronesEngaged)
                    {
                        VNI.Wait(2);
                        DronesEngaged = true;

                        if (!f_Drones.CheckIfEngaged())
                        {
                            VNI.DebugUI.NewConsoleMessage("Engaging a target");
                            f_Drones.EngageTarget();
                        }
                    }
                    //If drones are launched and we have lost aggression return drones to bay
                    if (f_Drones.CheckIfDronesAreLaunched() && NumAttackers < f_Entities.GetRats().Count&& RecallDrones == true)
                    {
                        VNI.DebugUI.NewConsoleMessage("Lost aggro recalling drones");
                        f_Drones.ReturnAllDronesToBay();

                        RecallDrones = false;
                    }
                    //Check for warp scrambling rats
                    f_Targeting.GetWarpScramblingMe();
                    if (f_Targeting.WarpScramblingMe.Count > 0)
                    {
                        f_Targeting.FocusWarpScrambler();
                        f_Drones.EngageTarget();
                        VNI.DebugUI.NewConsoleMessage("Engaging warp scrambler");
                    }
                }
            }
        }