Пример #1
0
        private void btSave_CheckedChanged(object sender, EventArgs e)
        {
            if (!btSave.Checked)
            {
                return;
            }
            if (!AreSavesInstalled(new string[] { "fastany1" }))
            {
                using (WebClient webClient = new WebClient())
                {
                    var path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
                                            "Respawn\\Titanfall2\\profile\\savegames\\fastany1.sav");
                    webClient.DownloadFileAsync(new Uri(FzzyComponent.FASTANY1_SAVE_LINK), path);
                }
            }

            var settingscfg = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
                                           "Respawn\\Titanfall2\\local\\settings.cfg");
            var settingscontent = File.ReadAllText(settingscfg);

            if (settingscontent.Contains("load fastany1"))
            {
                return;
            }
            if (FzzyComponent.process != null)
            {
                FzzyComponent.AddToSettingsOnClose("load fastany1");
                MessageBox.Show("18 Hour Cutscene Bind Added!\nRestart your game for it to take effect.");
            }
            else
            {
                File.AppendAllText(settingscfg, "\nbind \"F1\" \"load fastany1\"");
            }
        }
Пример #2
0
        public TASTools(FzzyComponent fzzy)
        {
            this.fzzy = fzzy;

            tasValues["lean"] = new MemoryValue("float", new DeepPointer("client.dll", 0x216FC68, new int[] { }));
            tasValues["timescale"] = new MemoryValue("float", new DeepPointer("engine.dll", 0x1315A2C8, new int[] { }));
            tasValues["velX"] = new MemoryValue("float", new DeepPointer("client.dll", 0xB34C2C, new int[] { }));
            tasValues["velY"] = new MemoryValue("float", new DeepPointer("client.dll", 0xB34C30, new int[] { }));
            tasValues["velZ"] = new MemoryValue("float", new DeepPointer("client.dll", 0xB34C34, new int[] { }));
            tasValues["holdingW"] = new MemoryValue("bool", new DeepPointer("engine.dll", 0x1396C7D8, new int[] { }));
            tasValues["holdingA"] = new MemoryValue("bool", new DeepPointer("engine.dll", 0x1396C678, new int[] { }));
            tasValues["holdingS"] = new MemoryValue("bool", new DeepPointer("engine.dll", 0x1396C798, new int[] { }));
            tasValues["holdingD"] = new MemoryValue("bool", new DeepPointer("engine.dll", 0x1396C6A8, new int[] { }));
            tasValues["holdingZ"] = new MemoryValue("bool", new DeepPointer("engine.dll", 0x1396C80C, new int[] { }));
            tasValues["holdingB"] = new MemoryValue("bool", new DeepPointer("engine.dll", 0x1396C68C, new int[] { }));
            tasValues["holdingShift"] =
                new MemoryValue("bool", new DeepPointer("engine.dll", 0x1396CAB8, new int[] { }));
            tasValues["yaw"] = new MemoryValue("float", new DeepPointer("client.dll", 0x00E69EA0, new int[] {0x1E94}));
            tasValues["pitch"] =
                new MemoryValue("float", new DeepPointer("client.dll", 0x00E69EA0, new int[] {0x1E90}));
            tasValues["airSpeed"] = new MemoryValue("float",
                new DeepPointer("engine.dll", 0x13084248,
                    new int[] {0xEA8, 0x1008, 0x1038, 0x390, 0x48, 0x18, 0xA30, 0x10, 0x2218}));
            tasValues["approachingWall"] = new MemoryValue("bool",
                new DeepPointer("client.dll", 0x00E69EA0, new int[] {0x830, 0x12C8, 0x38}));
            tasValues["onGround"] = new MemoryValue("bool", new DeepPointer("client.dll", 0x11EED78, new int[] { }));
            tasValues["viewThunkVertical"] = new MemoryValue("float",
                new DeepPointer("client.dll", 0x00B188C0, new int[] {0xD8, 0x1A24}));
            tasValues["viewThunkHorizontal"] = new MemoryValue("float",
                new DeepPointer("client.dll", 0x00B188C0, new int[] {0xD8, 0x1A28}));
            tasValues["recoilVertical"] = new MemoryValue("float",
                new DeepPointer("client.dll", 0x00B188C0, new int[] {0xD8, 0x1A3C}));
            tasValues["recoilHorizontal"] = new MemoryValue("float",
                new DeepPointer("client.dll", 0x00B188C0, new int[] {0xD8, 0x1A40}));
        }
Пример #3
0
 private void Load(string save, long delay = 0)
 {
     if (delay == 0)
     {
         Log.Info("Load into " + save);
         FzzyComponent.RunGameCommand("load " + save +
                                      "; set_loading_progress_detente #INTROSCREEN_HINT_PC #INTROSCREEN_HINT_CONSOLE");
     }
     else
     {
         if (delayedLoadMillis > 0)
         {
             return;
         }
         delayedLoadSave   = save;
         delayedLoadMillis = delay;
     }
 }
Пример #4
0
        private void installMenuModButton_Click(object sender, EventArgs e)
        {
            if (FzzyComponent.process != null)
            {
                MessageBox.Show("Please close Titanfall 2 to install enhanced menu");
                return;
            }

            var titanfallInstallDirectory = FzzyComponent.GetTitanfallInstallDirectory(this);

            if (string.IsNullOrEmpty(titanfallInstallDirectory))
            {
                MessageBox.Show("Couldn't find Titanfall 2 install location!");
                return;
            }

            var settingscfg = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
                                           "Respawn\\Titanfall2\\local\\settings.cfg");
            var settingscontent = File.ReadAllText(settingscfg);

            for (var i = 1; i <= 9; i++)
            {
                if (settingscontent.Contains("\"load fastany" + i + "\""))
                {
                    continue;
                }
                File.AppendAllText(settingscfg, "\nbind \"F" + i + "\" \"load fastany" + i + "\"");
            }

            using (var webClient = new WebClient())
            {
                installMenuModButton.Enabled = false;
                install = true;
                menumod = Path.Combine(titanfallInstallDirectory, "menumod.zip");
                webClient.DownloadFileAsync(new Uri(FzzyComponent.MENU_MOD_ZIP_LINK), menumod);
                webClient.DownloadFileCompleted   += MenuModDownloadCompleted;
                webClient.DownloadProgressChanged += MenuModProgressChanged;
                installMenuModProgress.Visible     = true;
            }

            InstallFastanySaves();
        }
Пример #5
0
        public void Tick()
        {
            var timeElapsed = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() - previousTimestamp;

            if (delayedLoadMillis > 0)
            {
                delayedLoadMillis -= timeElapsed;
                if (delayedLoadMillis <= 0)
                {
                    Load(delayedLoadSave);
                }
            }

            previousTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
            if (!fzzy.Settings.aslsettings.Reader["speedmod"])
            {
                if (IsSpeedmodEnabled())
                {
                    DisableSpeedmod();
                }
            }
            else
            {
                if (!IsSpeedmodEnabled())
                {
                    EnableSpeedmod();
                }

                if (!fzzy.isLoading)
                {
                    fzzy.values["airAcceleration"].Current            = 10000f;
                    fzzy.values["airSpeed"].Current                   = 40f;
                    fzzy.values["lurchMax"].Current                   = 0f;
                    fzzy.values["slideStepVelocityReduction"].Current = 0f;
                    fzzy.values["slideBoostCooldown"].Current         = 0f;
                }

                if (fzzy.values["inLoadingScreen"].Current && !fzzy.values["inLoadingScreen"].Old)
                {
                    levelLoadedFromMenu = lastNonLoadLevel == "";
                }
                if (!fzzy.values["inLoadingScreen"].Current)
                {
                    lastNonLoadLevel = fzzy.values["currentLevel"].Current;
                }

                if (!fzzy.isLoading && fzzy.wasLoading)
                {
                    FzzyComponent.RunGameCommand("givecurrentammo");
                }

                if (fzzy.values["currentLevel"].Current != fzzy.values["currentLevel"].Old && levelLoadedFromMenu)
                {
                    if (fzzy.values["currentLevel"].Current.StartsWith("sp_training"))
                    {
                        Load("speedmod1");
                    }
                    if (fzzy.values["currentLevel"].Current.StartsWith("sp_crashsite"))
                    {
                        Load("speedmod2");
                    }
                    if (fzzy.values["currentLevel"].Current.StartsWith("sp_sewers1"))
                    {
                        Load("speedmod3");
                    }
                    if (fzzy.values["currentLevel"].Current.StartsWith("sp_boomtown_start"))
                    {
                        Load("speedmod4");
                    }
                    if (fzzy.values["currentLevel"].Current.StartsWith("sp_boomtown_end"))
                    {
                        Load("speedmod5");
                    }
                    if (fzzy.values["currentLevel"].Current.StartsWith("sp_timeshift_spoke02"))
                    {
                        Load("speedmod7");
                    }
                    if (fzzy.values["currentLevel"].Current.StartsWith("sp_beacon_spoke0"))
                    {
                        Load("speedmod8");
                    }
                    if (fzzy.values["currentLevel"].Current.StartsWith("sp_beacon") && !fzzy.values["currentLevel"].Current.StartsWith("sp_beacon_spoke0"))
                    {
                        Load("speedmod9");
                    }
                    if (fzzy.values["currentLevel"].Current.StartsWith("sp_tday"))
                    {
                        Load("speedmod10");
                    }
                    if (fzzy.values["currentLevel"].Current.StartsWith("sp_skyway_v1"))
                    {
                        Load("speedmod11");
                    }
                }

                if (fzzy.values["clFrames"].Current <= 0)
                {
                    allowGauntletLoad = false;
                }

                if (fzzy.values["lastLevel"].Current == "sp_training" && !fzzy.isLoading)
                {
                    if (DistanceSquared(880, 6770, 466) < 1000 * 1000)
                    {
                        allowGauntletLoad = true;
                    }

                    float projection = 0.866049f * fzzy.values["x"].Current + 0.499959f * fzzy.values["y"].Current;

                    if ((Math.Abs(projection + 3888.9) < 10 || Math.Abs(projection - 6622) < 10) && allowGauntletLoad)
                    {
                        Load("speedmod2");
                        allowGauntletLoad = false;
                    }
                }

                if (fzzy.values["lastLevel"].Current == "sp_crashsite" && !fzzy.isLoading)
                {
                    if (DistanceSquared(-3435, 4201, 2357) < 180 * 180)
                    {
                        Load("speedmod3");
                    }
                }

                if (fzzy.values["lastLevel"].Current == "sp_sewers1" && !fzzy.isLoading)
                {
                    if (DistanceSquared(-9138, -6732, 2605) < 500 * 500 && fzzy.values["inCutscene"].Current == 1)
                    {
                        Load("speedmod4");
                    }
                }

                if (fzzy.values["lastLevel"].Current == "sp_boomtown")
                {
                    if (fzzy.isLoading)
                    {
                        fzzy.values["sp_unlocks_level_4"].Current = 5;
                    }

                    if (!fzzy.isLoading)
                    {
                        if (fzzy.values["sp_unlocks_level_4"].Current == 7)
                        {
                            Load("speedmod5", 500);
                        }

                        /*float xDistance = fzzy.values["x"].Current - 8167;
                         * float yDistance = fzzy.values["y"].Current + 3583;
                         * double distance = Math.Sqrt(xDistance * xDistance + yDistance * yDistance);
                         * if (distance < 76)
                         * {
                         *  Load("speedmod5");
                         * }*/
                    }
                }

                if (fzzy.values["lastLevel"].Current == "sp_boomtown_end" && !fzzy.isLoading)
                {
                    if (DistanceSquared(8644, 1097, -2621) < 7000 * 7000 && fzzy.values["inCutscene"].Current == 1 &&
                        fzzy.values["rodeo"].Current == fzzy.values["rodeo"].Old)
                    {
                        Load("speedmod7");
                    }
                }

                if (fzzy.values["lastLevel"].Current == "sp_hub_timeshift" && !fzzy.isLoading)
                {
                    if (Math.Abs(fzzy.values["x"].Current - 1112.845) < 1 &&
                        Math.Abs(fzzy.values["y"].Current + 2741) < 100 &&
                        Math.Abs(fzzy.values["z"].Current + 859) < 1000)
                    {
                        Load("speedmod7");
                    }
                }

                if (fzzy.values["lastLevel"].Current == "sp_hub_timeshift" && !fzzy.isLoading &&
                    fzzy.values["inCutscene"].Current == 1 && fzzy.values["inCutscene"].Old == 0 &&
                    DistanceSquared(-1108, 6017, -10596) < 1000 * 1000)
                {
                    Load("speedmod8");
                }

                if (fzzy.values["lastLevel"].Old == "sp_beacon_spoke0" &&
                    fzzy.values["lastLevel"].Current == "sp_beacon")
                {
                    Load("speedmod9");
                }

                if (fzzy.values["lastLevel"].Current == "sp_beacon")
                {
                    /*for (int i = 0; i < 100; i++)
                     * {
                     *  var baseAdr = 0x01064698;
                     *  var offset = 0x8 * i;
                     *  var health = new DeepPointer("server.dll", baseAdr, new int[] { offset, 0x4D4 }).Deref<int>(FzzyComponent.process);
                     *  if (health == 0) continue;
                     *  var isAlive = new DeepPointer("server.dll", baseAdr, new int[] { offset, 0x3B0 }).Deref<int>(FzzyComponent.process) == 16;
                     *
                     *  var type = new MemoryValue("string30", new DeepPointer("server.dll", baseAdr, new int[] { offset, 0x70, 0x0 }));
                     *
                     *  if (type.Current == "npc_super_spectre")
                     *  {
                     *      var x = new DeepPointer("server.dll", baseAdr, new int[] { offset, 0x490 }).Deref<float>(FzzyComponent.process);
                     *      var y = new DeepPointer("server.dll", baseAdr, new int[] { offset, 0x494 }).Deref<float>(FzzyComponent.process);
                     *
                     *      var compareX = 2125;
                     *      var compareY = -2114;
                     *      var dis = Math.Sqrt(Math.Pow(x - compareX, 2) + Math.Pow(y - compareY, 2));
                     *
                     *      if (dis < 2500 && !isAlive && health != 3000)
                     *      {
                     *          Load("speedmod10", 500);
                     *      }
                     *  }
                     * }*/
                    if (fzzy.isLoading)
                    {
                        fzzy.values["sp_unlocks_level_8"].Current = 25;
                    }

                    if (!fzzy.isLoading && fzzy.values["sp_unlocks_level_8"].Current == 511)
                    {
                        Load("speedmod10", 500);
                    }
                }

                if (fzzy.values["lastLevel"].Current == "sp_tday" && !fzzy.isLoading &&
                    DistanceSquared(6738, 12395, 2573) < 1000 * 1000 &&
                    fzzy.values["inCutscene"].Current == 1)
                {
                    Load("speedmod11");
                }

                if (fzzy.values["lastLevel"].Current == "sp_skyway_v1" && !fzzy.isLoading &&
                    DistanceSquared(9023, 12180, 5693) < 1000 * 1000 &&
                    fzzy.values["inCutscene"].Current == 1)
                {
                    Load("speedmod12");
                }
            }
        }
Пример #6
0
 public Speedmod(FzzyComponent fzzy)
 {
     this.fzzy = fzzy;
 }
Пример #7
0
 public NCSAutoLoader(FzzyComponent fzzy)
 {
     this.fzzy = fzzy;
 }
Пример #8
0
 public Aimbot(FzzyComponent fzzy)
 {
     this.fzzy = fzzy;
 }
Пример #9
0
        private void Split(ASLSettingsReader settings)
        {
            if (settings["flagSplit"] && fzzy.values["flag"].Old == 1 && fzzy.values["flag"].Current == 0)
            {
                fzzy.timer.Split();
            }

            if (settings["frontierWaveSplit"] && fzzy.values["frontierDefenseWaveNumber"].Current - 1 == fzzy.values["frontierDefenseWaveNumber"].Old)
            {
                fzzy.timer.Split();
            }

            bool helmetCollected(int level, int helmet, int helmetPos)
            {
                string levelName = "";

                switch (level)
                {
                case 1:
                    levelName = "bt";
                    break;

                case 2:
                    levelName = "bnr";
                    break;

                case 3:
                    levelName = "ita1";
                    break;

                case 4:
                    levelName = "ita2";
                    break;

                case 5:
                    levelName = "ita3";
                    break;

                case 6:
                    levelName = "enc1";
                    break;

                case 7:
                    levelName = "enc2";
                    break;

                case 8:
                    levelName = "b1";
                    break;

                case 9:
                    levelName = "b2";
                    break;

                case 10:
                    levelName = "tbf";
                    break;

                case 11:
                    levelName = "ark";
                    break;

                case 12:
                    levelName = "fold";
                    break;
                }

                // constructs level and helmet to check and uses bitwise XOR operator to check which bit changes
                return(settings[levelName + "Helmet" + helmet] && (fzzy.values["sp_unlocks_level_" + level].Old ^
                                                                   fzzy.values["sp_unlocks_level_" + level].Current) ==
                       helmetPos);
            }

            void splitOnHelmet(int level, int helmetAmount)
            {
                // loops through every necessary bit that stores helmets and splits on the first bit that changed
                int bit = (int)Math.Pow(2, helmetAmount - 1);

                for (int i = 0; i < helmetAmount; i++)
                {
                    // check helmet bit location for a change and shift over to the right for the next loop
                    if (helmetCollected(level, i + 1, bit))
                    {
                        fzzy.timer.Split();
                    }
                    bit >>= 1;
                }
            }

            for (int i = 0; i <= 12; i++)
            {
                if (settings["helmetSplit"] && fzzy.values["sp_unlocks_level_" + i].Current >
                    fzzy.values["sp_unlocks_level_" + i].Old)
                {
                    // separates helmet splits into every unique helmet
                    if (fzzy.values["lastLevel"].Current == "sp_training" && settings["gauntletHelmetSplit"])
                    {
                        fzzy.timer.Split();
                    }
                    if (fzzy.values["lastLevel"].Current == "sp_crashsite" && settings["btHelmetSplit"])
                    {
                        splitOnHelmet(1, 2);
                    }
                    if (fzzy.values["lastLevel"].Current == "sp_sewers1" && settings["bnrHelmetSplit"])
                    {
                        splitOnHelmet(2, 6);
                    }
                    if (fzzy.values["lastLevel"].Current == "sp_boomtown_start" && settings["ita1HelmetSplit"])
                    {
                        splitOnHelmet(3, 4);
                    }
                    if (fzzy.values["lastLevel"].Current == "sp_boomtown" && settings["ita2HelmetSplit"])
                    {
                        splitOnHelmet(4, 3);
                    }
                    if (fzzy.values["lastLevel"].Current == "sp_boomtown_end" && settings["ita3HelmetSplit"])
                    {
                        splitOnHelmet(5, 2);
                    }
                    if (fzzy.values["lastLevel"].Current == "sp_hub_timeshift" && settings["enc1HelmetSplit"])
                    {
                        splitOnHelmet(6, 2);
                    }
                    if (fzzy.values["lastLevel"].Current == "sp_timeshift_spoke02" && settings["enc2HelmetSplit"])
                    {
                        splitOnHelmet(7, 6);
                    }
                    if (fzzy.values["lastLevel"].Current == "sp_beacon" && settings["b1HelmetSplit"])
                    {
                        splitOnHelmet(8, 9);
                    }
                    if (fzzy.values["lastLevel"].Current == "sp_beacon_spoke0" && settings["b2HelmetSplit"])
                    {
                        splitOnHelmet(9, 2);
                    }
                    if (fzzy.values["lastLevel"].Current == "sp_tday" && settings["tbfHelmetSplit"])
                    {
                        splitOnHelmet(10, 3);
                    }
                    if (fzzy.values["lastLevel"].Current == "sp_s2s" && settings["arkHelmetSplit"])
                    {
                        splitOnHelmet(11, 3);
                    }
                    if (fzzy.values["lastLevel"].Current == "sp_skyway_v1" && settings["foldHelmetSplit"])
                    {
                        splitOnHelmet(12, 3);
                    }
                }
            }

            if (fzzy.isLoading)
            {
                lastLoadingTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
            }

            var timePassed = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() - splitTimerTimestamp;

            splitTimerTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
            if (splitTimer > 0)
            {
                var adjustment = splitTimer - (long)Math.Round(timePassed * fzzy.values["timescale"].Current);
                if (adjustment <= 0)
                {
                    splitTimer = 0;
                    fzzy.timer.Split();
                }
                else
                {
                    splitTimer = adjustment;
                }
            }

            if (btSaveDelay > 0)
            {
                btSaveDelay -= DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() - previousTimestamp;
                if (btSaveDelay <= 0)
                {
                    FzzyComponent.RunGameCommand("load fastany1");
                    //fzzy.board.Send(Keyboard.ScanCodeShort.F1);
                    if (settings["tickTimer"])
                    {
                        totalTickCount += 4044;
                    }
                    else
                    {
                        fzzy.state.AdjustedStartTime -= new TimeSpan(0, 0, 3, 22, 217);
                    }
                }

                if (fzzy.isLoading)
                {
                    btSaveDelay = 0;
                }
            }

            previousTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();

            if (fzzy.Settings.AutoLoad18HourSave && fzzy.values["lastLevel"].Current == "sp_crashsite" &&
                DistanceSquared(68, -21, -12216) < 500 * 500)
            {
                if (fzzy.values["inCutscene"].Current == 1 && fzzy.values["inCutscene"].Old == 0)
                {
                    btSaveDelay = 5050;
                }
            }

            // End of game
            if (fzzy.values["lastLevel"].Current == "sp_skyway_v1" && X < -10000 && Y > 0 &&
                fzzy.values["inCutscene"].Old == 0 && fzzy.values["inCutscene"].Current == 1 && settings["endSplit"])
            {
                DoSingleSplit("runEnd");
            }

            // Level change
            if (fzzy.values["lastLevel"].Current.Length > 0 &&
                fzzy.values["lastLevel"].Current != fzzy.values["lastLevel"].Old && settings["levelChangeSplit"] &&
                fzzy.values["lastLevel"].Current != "sp_training")
            {
                var level = fzzy.values["lastLevel"].Current;
                if (level != "sp_training")
                {
                    if (level == "sp_beacon" || level == "sp_hub_timeshift")
                    {
                        fzzy.timer.Split();
                    }
                    else
                    {
                        DoSingleSplit(level);
                    }
                }
            }

            // BT-7274
            if (fzzy.values["lastLevel"].Current == "sp_crashsite" && settings["btSplits"])
            {
                // Battery 1
                if (settings["btBattery1"])
                {
                    if (DistanceSquared(-4568, -3669) < 25000 && fzzy.values["inCutscene"].Old == 0 &&
                        fzzy.values["inCutscene"].Current == 1)
                    {
                        DoSingleSplit("btBattery1");
                    }
                }

                // Battery 2
                if (settings["btBattery2"])
                {
                    if (DistanceSquared(-4111, 4583) < 25000 && fzzy.values["inCutscene"].Old == 0 &&
                        fzzy.values["inCutscene"].Current == 1)
                    {
                        DoSingleSplit("btBattery2");
                    }
                }
            }

            // Blood and Rust
            if (fzzy.values["lastLevel"].Current == "sp_sewers1" && settings["bnrSplits"])
            {
                // Button 1
                if (settings["bnrButton1"])
                {
                    if (fzzy.values["bnrbutton1"].Old == 0 && fzzy.values["bnrbutton1"].Current > 0 && !fzzy.isLoading)
                    {
                        DoSingleSplit("bnrButton1");
                    }
                }

                // Door trigger
                if (settings["bnrDoor"])
                {
                    if (Y <= -226 && X <= -827 && Z > 450 && !fzzy.isLoading)
                    {
                        DoSingleSplit("bnrTrigger");
                    }
                }

                // Button 2
                if (settings["bnrButton2"])
                {
                    if (fzzy.values["bnrbutton2"].Old + 8 == fzzy.values["bnrbutton2"].Current && !fzzy.isLoading)
                    {
                        DoSingleSplit("bnrButton2");
                    }
                }

                // BT embark
                if (settings["bnrEmbark"])
                {
                    if (fzzy.values["embarkCount"].Old == 0 && fzzy.values["embarkCount"].Current == 1)
                    {
                        DoSingleSplit("bnrEmbark");
                    }
                }
            }

            // Embark on ITA3
            if (fzzy.values["lastLevel"].Current == "sp_boomtown_end" && settings["ita3Splits"])
            {
                if (fzzy.values["embarkCount"].Old == 0 && fzzy.values["embarkCount"].Current == 1)
                {
                    DoSingleSplit("ita3Embark");
                }
            }

            // Helmet on E&C1
            if (fzzy.values["lastLevel"].Current == "sp_hub_timeshift" && settings["enc1Splits"])
            {
                if (DistanceSquared(997, -2718) < 25000 && fzzy.values["inCutscene"].Old == 0 &&
                    fzzy.values["inCutscene"].Current == 1)
                {
                    DoSingleSplit("enc1Helmet", 1800);
                }
            }

            // E&C 2
            if (fzzy.values["lastLevel"].Current == "sp_timeshift_spoke02" && settings["enc2Splits"])
            {
                if (settings["enc2Dialogue"])
                {
                    if (X > 8755 && X < 9655 && Y < -4528 && Z > 5000)
                    {
                        DoSingleSplit("enc2Dialogue", 3000);
                    }
                }

                // Button 1
                if (settings["enc2Button1"])
                {
                    if (DistanceSquared(2805, -3363) < Math.Pow(200, 2) &&
                        fzzy.values["enc2button1"].Old + 8 == fzzy.values["enc2button1"].Current && !fzzy.isLoading)
                    {
                        DoSingleSplit("enc2Button1");
                    }
                }

                // Button 2
                if (settings["enc2Button2"])
                {
                    if (DistanceSquared(6271, -3552) < Math.Pow(200, 2) &&
                        fzzy.values["enc2button2"].Old + 8 == fzzy.values["enc2button2"].Current && !fzzy.isLoading)
                    {
                        DoSingleSplit("enc2Button2");
                    }
                }

                // Hellroom
                if (settings["enc2Hellroom"])
                {
                    if (DistanceSquared(10708, -2263) < 15000 && !fzzy.isLoading)
                    {
                        DoSingleSplit("enc2Hellroom");
                    }
                }

                // Vents
                if (settings["enc2Vent"])
                {
                    if (fzzy.values["z"].Current < -1200 && fzzy.values["inCutscene"].Old == 0 &&
                        fzzy.values["inCutscene"].Current == 1)
                    {
                        DoSingleSplit("enc2Vent");
                    }
                }
            }

            // Beacon 2
            if (fzzy.values["lastLevel"].Current == "sp_beacon_spoke0" && settings["b2Splits"])
            {
                // Death warp
                if (settings["b2Warp"])
                {
                    var warpX = fzzy.values["x"].Old - X;
                    var warpY = fzzy.values["y"].Old - Y;
                    var warpDistanceSquared = warpX * warpX + warpY * warpY;
                    if (DistanceSquared(4019, 4233) < 500 && warpDistanceSquared > 20000 && !fzzy.wasLoading)
                    {
                        DoSingleSplit("b2Warp");
                    }
                }

                // Button 1
                if (settings["b2Button1"])
                {
                    if (fzzy.values["b2button"].Current != fzzy.values["b2button"].Old)
                    {
                        if (DistanceSquared(2690, 10366) < Math.Pow(200, 2))
                        {
                            DoSingleSplit("b2Button1");
                        }
                    }
                }

                // Heatsink trigger
                if (settings["b2Trigger"])
                {
                    if (fzzy.values["x"].Old > -2113 && X <= -2113 && Y < 11800 && Y > 10100)
                    {
                        DoSingleSplit("b2Trigger");
                    }
                }
            }

            // Beacon 3
            if (fzzy.values["lastLevel"].Current == "sp_beacon" && settings["b3Splits"])
            {
                // Module retrieve
                if (settings["b3Module1"])
                {
                    if (DistanceSquared(-10670, 9523) < 25000 && fzzy.values["inCutscene"].Old == 0 &&
                        fzzy.values["inCutscene"].Current == 1)
                    {
                        DoSingleSplit("b3Module1", 1900);
                    }
                }

                // Module 2
                if (settings["b3Module2"])
                {
                    if (DistanceSquared(3797, -1905) < 25000 && fzzy.values["inCutscene"].Old == 0 &&
                        fzzy.values["inCutscene"].Current == 1)
                    {
                        DoSingleSplit("b3Module2", 1850);
                    }
                }

                // Secure beacon objective
                if (settings["b3SecureBeacon"])
                {
                    if (fzzy.values["b3SecureBeaconObjective"].Current != fzzy.values["b3SecureBeaconObjective"].Old &&
                        DistanceSquared(-3098, -1254, 1853) < 1000 * 1000)
                    {
                        DoSingleSplit("b3SecureBeacon");
                    }
                }
            }

            // TBF Elevator
            if (fzzy.values["lastLevel"].Current == "sp_tday")
            {
                if (fzzy.values["pilotYoureWithMe"].Current > fzzy.values["pilotYoureWithMe"].Old &&
                    DistanceSquared(1548, -7332) < 5000 * 5000 &&
                    settings["tbfPilotWithMe"] && !fzzy.isLoading)
                {
                    DoSingleSplit("pilotYoureWithMe");
                }

                if (DistanceSquared(-7867, 2758) < Math.Pow(600, 2) &&
                    fzzy.values["tbfElevator"].Current - 8 == fzzy.values["tbfElevator"].Old && settings["tbfElevator"])
                {
                    DoSingleSplit("tbfElevator");
                }
            }

            // The Ark
            if (fzzy.values["lastLevel"].Current == "sp_s2s" && settings["arkSplits"])
            {
                // Elevator
                if (settings["arkElevator"] &&
                    DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() - lastLoadingTimestamp > 5000)
                {
                    if (fzzy.values["arkElevator"].Old > 0 && fzzy.values["arkElevator"].Current == 0)
                    {
                        DoSingleSplit("arkElevator", 1600);
                    }
                }

                // Knife
                if (settings["arkKnife"])
                {
                    if (DistanceSquared(-8021, -4567) < Math.Pow(1500, 2))
                    {
                        if (fzzy.values["inCutscene"].Old == 0 && fzzy.values["inCutscene"].Current == 1)
                        {
                            DoSingleSplit("arkKnife");
                        }
                    }
                }
            }

            // The Fold Weapon
            if (fzzy.values["lastLevel"].Current == "sp_skyway_v1" && settings["foldSplits"])
            {
                // Datacore
                if (settings["foldDataCore"])
                {
                    if (DistanceSquared(5252, -5776) < 25000 && fzzy.values["inCutscene"].Old == 0 &&
                        fzzy.values["inCutscene"].Current == 1)
                    {
                        splitTimer = 7950;
                    }
                }

                // Escape land
                if (settings["foldEscape"])
                {
                    if (DistanceSquared(535, 6549) < 25000 && fzzy.values["inCutscene"].Current == 0 &&
                        fzzy.values["inCutscene"].Old != 0)
                    {
                        DoSingleSplit("escape");
                    }
                }
            }
        }
Пример #10
0
 public FzzySplitter(FzzyComponent fzzy)
 {
     this.fzzy = fzzy;
 }