private void Button_Translate_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        try
        {
            if (TextBox_InputMessage.Text != "")
            {
                var str = (e.OriginalSource as Button).Content.ToString();

                switch (str)
                {
                case "中英互译":
                    Translation();
                    break;

                case "简转繁":
                    TextBox_InputMessage.Text = ChineseConverter.ToTraditional(TextBox_InputMessage.Text);
                    break;

                case "繁转简":
                    TextBox_InputMessage.Text = ChineseConverter.ToSimplified(TextBox_InputMessage.Text);
                    break;

                case "转拼音":
                    TextBox_InputMessage.Text = Pinyin.GetString(TextBox_InputMessage.Text, PinyinFormat.WithoutTone);
                    break;
                }
            }
        }
        catch (Exception ex)
        {
            MsgBoxUtil.Exception(ex);
        }
    }
Ejemplo n.º 2
0
    private void Button_Teleport_EditCustom_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        int index1 = ListBox_TeleportClass.SelectedIndex;
        int index2 = ListBox_TeleportInfo.SelectedIndex;

        if (index1 == 0 && index2 != -1)
        {
            TeleportData.TeleportDataClass[index1].TeleportInfo[index2].Position = new Vector3()
            {
                X = Convert.ToSingle(TextBox_Position_X.Text),
                Y = Convert.ToSingle(TextBox_Position_Y.Text),
                Z = Convert.ToSingle(TextBox_Position_Z.Text)
            };

            TeleportData.TeleportDataClass[index1].TeleportInfo[index2].Name = TextBox_Position_Name.Text;

            UpdateTpList();

            ListBox_TeleportClass.SelectedIndex = 0;
            ListBox_TeleportInfo.SelectedIndex  = index2;;

            TextBox_Result.Text = $"修改自定义传送坐标成功";
        }
        else
        {
            TextBox_Result.Text = $"当前选中项为空";
        }
    }
Ejemplo n.º 3
0
    private void Button_Inject_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        if (InjectInfo.PID == 0)
        {
            TextBlock_Status.Text = "请选择目标进程";
            return;
        }
        else if (string.IsNullOrEmpty(InjectInfo.DLLPath))
        {
            TextBlock_Status.Text = "请选择dll路径";
            return;
        }

        try
        {
            foreach (ProcessModule module in Process.GetProcessById(InjectInfo.PID).Modules)
            {
                if (module.FileName == InjectInfo.DLLPath)
                {
                    TextBlock_Status.Text = "该DLL已经被注入过了";
                    return;
                }
            }

            BaseInjector.DLLInjector(InjectInfo.PID, InjectInfo.DLLPath);
            TextBlock_Status.Text = $"DLL注入到进程 {InjectInfo.PName} 成功";
            BaseInjector.SetForegroundWindow(InjectInfo.MWindowHandle);
        }
        catch (Exception ex)
        {
            TextBlock_Status.Text = ex.Message;
        }
    }
Ejemplo n.º 4
0
    private void Button_Teleport_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        Teleport.SetTeleportV3Pos(TempData.TCode);

        TextBox_Result.Text = $"传送到自定义坐标成功";
    }
Ejemplo n.º 5
0
    private void Button_StopDraw_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        if (DrawWindow != null)
        {
            DrawWindow.Close();
            DrawWindow = null;
        }
    }
Ejemplo n.º 6
0
    private void Button_ExecuteAutoScript_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        int index = ListBox_STATList.SelectedIndex;

        if (index != -1)
        {
            AutoScript(ListBox_STATList.SelectedItem.ToString());
        }
    }
    private void Button_ModelChange_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        var index = ListBox_PedModel.SelectedIndex;

        if (index != -1)
        {
            Online.ModelChange(PedData.PedDataClass[index].Hash);
        }
    }
    private void Button_LocalWeather_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        var str   = (e.OriginalSource as Button).Content.ToString();
        var index = MiscData.LocalWeathers.FindIndex(t => t.Name == str);

        if (index != -1)
        {
            World.Set_Local_Weather(MiscData.LocalWeathers[index].ID);
        }
    }
    private void Button_Sessions_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        var str   = (e.OriginalSource as Button).Content.ToString();
        var index = MiscData.Sessions.FindIndex(t => t.Name == str);

        if (index != -1)
        {
            Online.LoadSession(MiscData.Sessions[index].ID);
        }
    }
Ejemplo n.º 10
0
    private void Button_RemoveBlcokWords_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        int index = ListBox_BlcokWords.SelectedIndex;

        if (index != -1)
        {
            ListBox_BlcokWords.Items.RemoveAt(index);
            ListBox_BlcokWords.SelectedIndex = ListBox_BlcokWords.Items.Count - 1;
        }
    }
Ejemplo n.º 11
0
    private void Button_RunDraw_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        Memory.SetForegroundWindow();

        if (DrawWindow == null)
        {
            DrawWindow = new DrawWindow();
            DrawWindow.Show();
        }
    }
    private void Button_REPxN_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        var str   = (e.OriginalSource as Button).Content.ToString();
        var index = MiscData.REPxNs.FindIndex(t => t.Name == str);

        if (index != -1)
        {
            Online.REPMultiplier(MiscData.REPxNs[index].ID);
        }
    }
Ejemplo n.º 13
0
    /// <summary>
    /// 切换按键音效
    /// </summary>
    private void SwitchAudioClick()
    {
        if (AudioUtil.ClickSoundIndex < 5)
        {
            AudioUtil.ClickSoundIndex++;
        }
        else
        {
            AudioUtil.ClickSoundIndex = 0;
        }

        AudioUtil.ClickSound();
    }
Ejemplo n.º 14
0
    private void Button_Blips_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        var str = (e.OriginalSource as Button).Content.ToString();

        int index = MiscData.Blips.FindIndex(t => t.Name == str);

        if (index != -1)
        {
            Teleport.ToBlips(MiscData.Blips[index].ID);
        }
    }
Ejemplo n.º 15
0
    private void Button_MerryweatherServices_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        var str = (e.OriginalSource as Button).Content.ToString();

        int index = MiscData.MerryWeatherServices.FindIndex(t => t.Name == str);

        if (index != -1)
        {
            Online.MerryWeatherServices(MiscData.MerryWeatherServices[index].ID);
        }
    }
    private void Button_TeleportSelectedPlayer_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        if (ListBox_PlayerList.SelectedItem != null)
        {
            int index = ListBox_PlayerList.SelectedIndex;

            if (index != -1)
            {
                Teleport.SetTeleportV3Pos(playerData[index].PlayerInfo.V3Pos);
            }
        }
    }
Ejemplo n.º 17
0
    private void ModelsClick(string obj)
    {
        AudioUtil.ClickSound();

        if (ProcessUtil.IsAppRun(CoreUtil.TargetAppName))
        {
            switch (obj)
            {
            case "ExternalMenu":
                ExternalMenuClick();
                break;

            case "GTAHax":
                GTAHaxClick();
                break;

            case "Outfits":
                OutfitsClick();
                break;

            case "HeistCut":
                HeistCutClick();
                break;

            case "StatAutoScripts":
                StatAutoScriptsClick();
                break;

            case "HeistPreps":
                HeistPrepsClick();
                break;

            case "CasinoHack":
                CasinoHackClick();
                break;

            case "BlcokMsg":
                BlcokMsgClick();
                break;

            case "BigBaseV2":
                BigBaseV2Click();
                break;
            }
        }
        else
        {
            MsgBoxUtil.Error(HintMsg);
        }
    }
Ejemplo n.º 18
0
    private void Button_SpawnPersonalVehicle_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        int index = ListBox_PersonalVehicle.SelectedIndex;

        if (index != -1)
        {
            Task.Run(() =>
            {
                Vehicle.SpawnPersonalVehicle(pVInfos[index].Index);
            });
        }
    }
Ejemplo n.º 19
0
    private void Button_Teleport_SaveCustom_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        try
        {
            File.WriteAllText(FileUtil.CustomTPList_Path, JsonUtil.JsonSeri(TeleportData.CustomTeleport));

            TextBox_Result.Text = $"保存到自定义传送坐标文件成功 {FileUtil.CustomTPList_Path}";
        }
        catch (Exception ex)
        {
            MsgBoxUtil.Exception(ex);
        }
    }
Ejemplo n.º 20
0
    private void Button_SpawnOnlineVehicle_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        string str = (e.OriginalSource as Button).Content.ToString();

        if (str == "刷出线上载具(空地)")
        {
            Vehicle.SpawnVehicle(SpawnVehicleHash, -255.0f, 5, SpawnVehicleMod);
            //Vehicle.SpawnVehicle(SpawnVehicleHash, -255.0f);
        }
        else
        {
            Vehicle.SpawnVehicle(SpawnVehicleHash, 0.0f, 5, SpawnVehicleMod);
            //Vehicle.SpawnVehicle(SpawnVehicleHash, -255.0f);
        }
    }
Ejemplo n.º 21
0
    private void Button_UnlockVehicle161_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        WriteGA <int>(262145 + 33034, 1);        // Benefactor SM722                 - 33034
        WriteGA <int>(262145 + 33035, 1);        // Declasse Draugur                 - 33035
        WriteGA <int>(262145 + 33036, 1);        // Imponte Ruiner ZZ-8              - 33036
        WriteGA <int>(262145 + 33037, 1);        // Grotti Brioso 300                - 33037
        WriteGA <int>(262145 + 33038, 1);        // Declasse Virgero ZX              - 33038
        WriteGA <int>(262145 + 33040, 1);        // DInka Kanjo SJ                   - 33040
        WriteGA <int>(262145 + 33041, 1);        // Dinka Postlude                   - 33041
        WriteGA <int>(262145 + 33042, 1);        // Obey 10F                         - 33042
        WriteGA <int>(262145 + 33043, 1);        // Ubermacht Rhinehart              - 33043
        WriteGA <int>(262145 + 33044, 1);        // BF Weevil Ratrod                 - 33044
        WriteGA <int>(262145 + 33045, 1);        // Obey 10F Widebody                - 33045
        WriteGA <int>(262145 + 33046, 1);        // Ubermacht Sentinel Widebody      - 33046
    }
    private void Button_CEOCargos_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        var str = (e.OriginalSource as Button).Content.ToString();

        int index = MiscData.CEOCargos.FindIndex(t => t.Name == str);

        if (index != -1)
        {
            // They are in gb_contraband_buy at func_915, for future updates.
            Online.CEOSpecialCargo(false);
            Thread.Sleep(100);
            Online.CEOSpecialCargo(true);
            Thread.Sleep(100);
            Online.CEOCargoType(MiscData.CEOCargos[index].ID);
        }
    }
    private void Button_WritePlayerName_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        if (TextBox_OnlineList.Text != "" &&
            TextBox_ChatName.Text != "" &&
            TextBox_ExternalDisplay.Text != "")
        {
            Memory.WriteString(Globals.WorldPTR, Offsets.OnlineListPlayerName, TextBox_OnlineList.Text + "\0");
            Memory.WriteString(Globals.PlayerChatterNamePTR + 0xBC, null, TextBox_ChatName.Text + "\0");
            Memory.WriteString(Globals.PlayerExternalDisplayNamePTR + 0x84, null, TextBox_ExternalDisplay.Text + "\0");

            MsgBoxUtil.Information("写入成功,请切换战局生效");
        }
        else
        {
            MsgBoxUtil.Warning("内容不能为空");
        }
    }
Ejemplo n.º 24
0
    private void Button_Teleport_AddCustom_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        Vector3 vector3 = Memory.Read <Vector3>(Globals.WorldPTR, Offsets.PlayerPositionX);

        TeleportData.CustomTeleport.Add(new TeleportData.TeleportInfo()
        {
            Name     = $"保存点 : {DateTime.Now:yyyyMMdd_HH-mm-ss_ffff}",
            Position = vector3
        });

        UpdateTpList();

        ListBox_TeleportClass.SelectedIndex = 0;
        ListBox_TeleportInfo.SelectedIndex  = ListBox_TeleportInfo.Items.Count - 1;

        TextBox_Result.Text = $"增加自定义传送坐标成功";
    }
Ejemplo n.º 25
0
    private void Button_WriteStat_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        try
        {
            File.WriteAllText(FileUtil.GTAHaxStat_Path, string.Empty);

            using (var sw = new StreamWriter(FileUtil.GTAHaxStat_Path, true))
            {
                sw.Write(TextBox_GTAHaxCodePreview.Text);

                MsgBoxUtil.Information("写入到stat.txt文件成功,现在可以打开GTAHax导入代码执行了");
            }
        }
        catch (Exception ex)
        {
            MsgBoxUtil.Exception(ex);
        }
    }
    private void Button_SendTextToGTA5_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        try
        {
            if (TextBox_InputMessage.Text != "")
            {
                TextBox_InputMessage.Text = ToDBC(TextBox_InputMessage.Text);

                Memory.SetForegroundWindow();

                SendMessageToGTA5(TextBox_InputMessage.Text);
            }
        }
        catch (Exception ex)
        {
            MsgBoxUtil.Exception(ex);
        }
    }
Ejemplo n.º 27
0
    private void Button_Overaly_Run_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        if (overlay == null)
        {
            GameOverlay.TimerService.EnableHighPrecisionTimers();

            Task.Run(() =>
            {
                overlay = new Overlay();
                overlay.Run();
            });
        }
        else
        {
            MessageBox.Show("ESP程序已经运行了,请勿重复启动",
                            "警告", MessageBoxButton.OK, MessageBoxImage.Warning);
        }
    }
Ejemplo n.º 28
0
    private void Button_InjectGameProcess_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        SaveBlcokWords();

        var InjectInfo = new InjectInfo();

        InjectInfo.DLLPath = FileUtil.Inject_Path + "BlcokMsg.dll";

        if (string.IsNullOrEmpty(InjectInfo.DLLPath))
        {
            MsgBoxUtil.Warning("发生异常,DLL路径为空");
            return;
        }

        var process = Process.GetProcessesByName("GTA5")[0];

        InjectInfo.PID           = process.Id;
        InjectInfo.PName         = process.ProcessName;
        InjectInfo.MWindowHandle = process.MainWindowHandle;

        foreach (ProcessModule module in Process.GetProcessById(InjectInfo.PID).Modules)
        {
            if (module.FileName == InjectInfo.DLLPath)
            {
                MsgBoxUtil.Warning("该DLL已经被注入过了,请勿重复注入");
                return;
            }
        }

        try
        {
            BaseInjector.SetForegroundWindow(InjectInfo.MWindowHandle);
            BaseInjector.DLLInjector(InjectInfo.PID, InjectInfo.DLLPath);
        }
        catch (Exception ex)
        {
            MsgBoxUtil.Exception(ex);
        }
    }
Ejemplo n.º 29
0
    private void Button_AddBlcokWords_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        var txt = TextBox_InputBlcokWord.Text;

        if (!string.IsNullOrEmpty(txt))
        {
            foreach (string item in ListBox_BlcokWords.Items)
            {
                if (item.Equals(txt))
                {
                    MsgBoxUtil.Information($"关键词 {txt} 已经添加过了,请勿重复添加");
                    return;
                }
            }

            ListBox_BlcokWords.Items.Add(txt);
            ListBox_BlcokWords.SelectedIndex = ListBox_BlcokWords.Items.Count - 1;
            TextBox_InputBlcokWord.Clear();
        }
    }
Ejemplo n.º 30
0
    private void Button_RefushPersonalVehicleList_Click(object sender, RoutedEventArgs e)
    {
        AudioUtil.ClickSound();

        ListBox_PersonalVehicle.Items.Clear();
        pVInfos.Clear();

        Task.Run(() =>
        {
            int max_slots = ReadGA <int>(1585857);
            for (int i = 0; i < max_slots; i++)
            {
                long hash = ReadGA <long>(1585857 + 1 + (i * 142) + 66);
                if (hash == 0)
                {
                    continue;
                }

                string plate = ReadGAString(1585857 + 1 + (i * 142) + 1);

                pVInfos.Add(new PVInfo()
                {
                    Index = i,
                    Name  = Vehicle.FindVehicleDisplayName(hash, true),
                    hash  = hash,
                    plate = plate
                });
            }

            foreach (var item in pVInfos)
            {
                Application.Current.Dispatcher.Invoke(() =>
                {
                    ListBox_PersonalVehicle.Items.Add($"[{item.plate}]\t{item.Name}");
                });
            }
        });
    }