Example #1
0
        private void updateOffsetInformation()
        {
            int           offsetsCountSet = 0, bonesCountSet = 0;
            List <Offset> offsets = OffsetList.List;
            List <Bone>   bones   = BoneList.List;

            foreach (Offset offset in offsets)
            {
                if (offset.GetValue() > 0)
                {
                    offsetsCountSet++;
                }
            }
            foreach (Bone bone in bones)
            {
                if (bone.GetValue() > 0)
                {
                    bonesCountSet++;
                }
            }
            lblOffsetsSet.Text = offsetsCountSet + "/" + offsets.Count;
            lblBonesSet.Text   = bonesCountSet + "/" + bones.Count;
            OffsetList.RefreshOffsets(lbOffsets);
            BoneList.RefreshBones(lbBones);
        }
Example #2
0
        private void btnChangeValue_Click(object sender, EventArgs e)
        {
            bool base16 = rbHexadecimal.Checked;

            if (base16)
            {
                // Using hexadecimal.
                try
                {
                    int value = Convert.ToInt32(txtValue.Text, 16);
                    offset.SetValue(value);
                    OffsetList.RefreshOffsets(listBox);
                    Hide();
                    MessageBox.Show("Offset value changed!\n" + offset.GetName() + " is now equal to 0x" + value.ToString("X") + ".", "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Close();
                }
                catch (System.FormatException)
                {
                    MessageBox.Show("Invalid hexadecimal value detected.\nThat couldn't be converted to an integer.", "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
                catch (Exception ex)
                {
                    MessageBox.Show("An error has occurred while converting value.\n" + ex.Message, "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
            }
            else
            {
                // Using decimal.
                try
                {
                    int value = Convert.ToInt32(txtValue.Text);
                    offset.SetValue(value);
                    OffsetList.RefreshOffsets(listBox);
                    Hide();
                    MessageBox.Show("Offset value changed!\n" + offset.GetName() + " is now equal to 0x" + value.ToString("X") + ".", "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Close();
                }
                catch (System.FormatException)
                {
                    MessageBox.Show("Invalid decimal value detected.\nThat couldn't be converted to an integer.", "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
                catch (Exception ex)
                {
                    MessageBox.Show("An error has occurred while converting value.\n" + ex.Message, "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
            }
        }
        private void btnSaveChanges_Click(object sender, EventArgs e)
        {
            int    valid      = 0;
            string offsetData = txtOffsets.Text;

            foreach (Offset offset in offsets)
            {
                Regex regex = new Regex(offset.GetName() + ":.*");
                Match m     = regex.Match(offsetData);
                if (!m.Success)
                {
                    goto offset_not_found;
                }
                string data = m.Value.Split(' ').GetValue(1).ToString();
                if (data.Length < 1)
                {
                    goto offset_not_found;
                }
                bool hexadecimal = false;
                try
                {
                    hexadecimal = data.Substring(0, 2).ToLower() == "0x";
                } catch (Exception) { } // Don't handle it, we'll just assume it's not hexadecimal...
                if (hexadecimal)
                {
                    // Using hexadecimal.
                    try
                    {
                        int value = Convert.ToInt32(data, 16);
                        offset.SetValue(value);
                        valid++;
                        continue;
                    }
                    catch (System.FormatException) { goto offset_error_converting; }
                    catch (Exception) { goto offset_error_unknown; }
                }
                else
                {
                    // Using decimal.
                    try
                    {
                        int value = Convert.ToInt32(data);
                        offset.SetValue(value);
                        valid++;
                        continue;
                    }
                    catch (System.FormatException) { goto offset_error_converting; }
                    catch (Exception) { goto offset_error_unknown; }
                }
offset_not_found:
                MessageBox.Show("An error has occurred while finding " + offset.GetName() + ".", "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                continue;
offset_error_converting:
                MessageBox.Show("An error has occurred while converting " + offset.GetName() + ".", "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                continue;
offset_error_unknown:
                MessageBox.Show("An unknown error has occurred while parsing data from " + offset.GetName() + ".", "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                continue;
            }
            OffsetList.RefreshOffsets(listBox);
            Hide();
            MessageBox.Show(valid + "/" + offsets.Count + " offsets were parsed and replaced successfully.", "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Information);
            Close();
        }
Example #4
0
        public Main()
        {
            InitializeComponent();
            this.LockSize();
            txtLog.MouseDown += (s, e) => FormMethod.HideCaret(txtLog.Handle);
            Text              = Text.Replace("[0.0]", Program.currentVersion);
            // Custom.NET vertical tab control using default components.
            // I might've been able to do this better...
            pTabMain = new PanelTabControl(PanelTabType.VerticalAttatched);
            pTabMain.AddTab(new PanelTab(tabValues, lblValues, pnlValues));
            pTabMain.AddTab(new PanelTab(tabAimbot, lblAimbot, pnlAimbot));
            pTabMain.AddTab(new PanelTab(tabTriggerbot, lblTriggerbot, pnlTriggerbot));
            pTabMain.AddTab(new PanelTab(tabVisuals, lblVisuals, pnlVisuals));
            pTabMain.AddTab(new PanelTab(tabMisc, lblMisc, pnlMisc));
            pTabMain.AddTab(new PanelTab(tabCompile, lblCompile, pnlCompile));
            pTabMain.SelectTab(0);
            pTabValues = new PanelTabControl(PanelTabType.VerticalAttatched);
            pTabValues.AddTab(new PanelTab(tabOffsets, lblOffsets, pnlOffsets));
            pTabValues.AddTab(new PanelTab(tabBones, lblBones, pnlBones));
            pTabValues.AddTab(new PanelTab(tabValShare, lblValShare, pnlValShare));
            pTabValues.TabChanged += (s, e) => updateOffsetInformation();
            pTabValues.SelectTab(0);
            pTabMisc = new PanelTabControl(PanelTabType.ButtonBased, pTabMain);
            pTabMisc.AddTab(new PanelTab(tabFeatures, lblFeatures, pnlFeatures));
            pTabMisc.AddTab(new PanelTab(tabConfig, lblConfig, pnlConfig));
            pTabMisc.AddTab(new PanelTab(tabAccount, lblAccount, pnlAccount));
            pTabMisc.SelectTab(0);
            cmb_config_source.SelectedIndex       = 0;
            cmb_scrape_offsets.SelectedIndex      = 0;
            cmb_scrape_bones.SelectedIndex        = 0;
            cmb_aimbot_bone.SelectedIndex         = 0;
            cmb_obfuscation_preset.SelectedIndex  = 0;
            cmb_aimbot_type.SelectedIndex         = 0;
            cmb_triggerbot_type.SelectedIndex     = 0;
            cmb_trigger_magnet_bone.SelectedIndex = 0;
            txt_build_path.Text = "dynago.exe";
            OffsetList.Initialize();
            OffsetList.RefreshOffsets(lbOffsets);
            BoneList.Initialize();
            BoneList.RefreshBones(lbBones);
            KeyManagement.InitializeKeys();
            CheckForIllegalCrossThreadCalls = false;
            if (Program.currentUser.ToLower() != "justin")
            {
                cb_obfuscation_enabled.Required();
            }
            lblCustomizeTriggerMagnetic.OnHover(Color.White);
            lblBackToTrigger.OnHover(Color.White);

            // account stuff
            lblLoggedIn.Text            = Program.currentUser;
            lblAdvertisements.Text      = "Removed";
            lblAdvertisements.ForeColor = Color.Green;
            lblLoggedIn.Left            = lblPreLoggedIn.Right;
            lblAdvertisements.Left      = lblPreAdvertisements.Right;
            lblRemoveAds.OnHover(Color.FromArgb(51, 153, 255));
            lblRemoveAds.Left    = lblAdvertisements.Right;
            lblRemoveAds.Visible = false;

            // weapon config stuff (yikes?)
            general_settings = new WeaponSettings(this);
            pistol_settings  = new WeaponSettings(this);
            sniper_settings  = new WeaponSettings(this);
        }