Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using System.Diagnostics;
- using System.Runtime.InteropServices;
- using System.Threading;
- using System.Xml;
- using System.Net;
- using System.Net.Sockets;
- using Microsoft.VisualBasic;
- using PC_Memory_Editor___Trainer_Library;
- using System.IO;
- namespace DEV_Studios___MW2_Steam_HACKING_Tool
- {
- public partial class Form1 : Form
- {
- Process[] processname;
- string PreDeFined;
- MW2TopTenWORLDMemEditor MemEditor = new MW2TopTenWORLDMemEditor();
- public Form1()
- {
- InitializeComponent();
- }
- private void connectToModernWarfare2MPToolStripMenuItem_Click(object sender, EventArgs e)
- {
- if(MemEditor.CustomConnect("iw4mp") == true)
- {
- tabControl1.Enabled = true;
- toolStripStatusLabel3.Text = "Connected (Modern Warfare 2 - MP)";
- toolStripStatusLabel3.ForeColor = Color.Green;
- MessageBox.Show("The game has been sucessfully connected!", "Congratulations", MessageBoxButtons.OK, MessageBoxIcon.Information);
- }
- else
- {
- tabControl1.Enabled = false;
- toolStripStatusLabel3.Text = "Not Connected (Error at Connection)";
- toolStripStatusLabel3.ForeColor = Color.Red;
- MessageBox.Show("The game process has not been found!", "Oops...", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- toolStripStatusLabel1.Text = "Version : " + Convert.ToString(Application.ProductVersion);
- dataGridView1.RowCount = 18;
- for (int i = 0; i < 18; i++)
- {
- dataGridView1.Rows[i].Cells[0].Value = i;
- }
- }
- private void exitToolStripMenuItem_Click(object sender, EventArgs e)
- {
- Application.Exit();
- }
- private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
- {
- MessageBox.Show("This application allows you to use non-host mods\nIt allows you to host Modded Private matches and Online games (if your host)\nAnd it allows you to change lobby settings , clients (players) stuff....etc\n\n\nMade by : \"MW2TopTenWORLD\"\nDEV Studios 2014", "About : ", MessageBoxButtons.OK, MessageBoxIcon.Information);
- }
- private void checkForUpdatesToolStripMenuItem_Click(object sender, EventArgs e)
- {
- String downloadURL = "http://updateshost.webuda.com/Modern_Warfare_2_Steam/Update.rar";
- Version newVersion = null;
- String xmlUrl = "http://updateshost.webuda.com/Modern_Warfare_2_Steam/Verify.xml";
- XmlTextReader xmlReader = null;
- try
- {
- xmlReader = new XmlTextReader(xmlUrl);
- xmlReader.MoveToContent();
- String elementName = "";
- if ((xmlReader.NodeType == XmlNodeType.Element) && (xmlReader.Name == "updateTool"))
- {
- while (xmlReader.Read())
- {
- if (xmlReader.NodeType == XmlNodeType.Element)
- {
- elementName = xmlReader.Name;
- }
- else
- {
- if ((xmlReader.NodeType == XmlNodeType.Text) && (xmlReader.HasValue))
- {
- switch (elementName)
- {
- case "version": newVersion = new Version(xmlReader.Value);
- break;
- case "url": downloadURL = xmlReader.Value;
- break;
- default: MessageBox.Show("version or url not found!", "Error");
- break;
- }
- }
- }
- }
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.ToString());
- }
- finally
- {
- if (xmlReader != null)
- xmlReader.Close();
- }
- Version appVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
- if (appVersion.CompareTo(newVersion) < 0)
- {
- DialogResult downloadRequest = MessageBox.Show(String.Format("Version {0}.{1}.{2} is now available to download.\n\nWould you like to download?", newVersion.Major, newVersion.Minor, newVersion.Build), "Update Avaialable",
- MessageBoxButtons.YesNo, MessageBoxIcon.Information);
- if (downloadRequest == DialogResult.Yes)
- {
- System.Diagnostics.Process.Start(downloadURL);
- MessageBox.Show("Application Quitting so you can install the new update!");
- Application.Exit();
- }
- else if (downloadRequest == DialogResult.No)
- {
- //Do nothing
- }
- }
- else
- {
- MessageBox.Show("This application is currently up to date!", "Update", MessageBoxButtons.OK, MessageBoxIcon.None);
- }
- }
- private void checkBox1_CheckedChanged(object sender, EventArgs e)
- {
- if (checkBox1.Checked == true)
- {
- MemEditor.WriteFloat("iw4mp", 0x64720E0, "999");
- }
- else
- {
- MemEditor.WriteFloat("iw4mp", 0x64720E0, "39");
- }
- }
- private void textBox1_TextChanged(object sender, EventArgs e)
- {
- if (textBox1.Text == "")
- {
- }
- else
- {
- MemEditor.WriteFloat("iw4mp", 0x64720E0, textBox1.Text);
- }
- }
- private void checkBox2_CheckedChanged(object sender, EventArgs e)
- {
- if (checkBox2.Checked == true)
- {
- MemEditor.WriteFloat("iw4mp", 0x6471C30, "1");
- }
- else
- {
- MemEditor.WriteFloat("iw4mp", 0x6471C30, "800");
- }
- }
- private void textBox2_TextChanged(object sender, EventArgs e)
- {
- if (textBox2.Text == "")
- {
- }
- else
- {
- MemEditor.WriteFloat("iw4mp", 0x6471C30, textBox2.Text);
- }
- }
- private void checkBox3_CheckedChanged(object sender, EventArgs e)
- {
- if (checkBox3.Checked == true)
- {
- MemEditor.WriteFloat("iw4mp", 0x646FD40, "999");
- }
- else
- {
- MemEditor.WriteFloat("iw4mp", 0x646FD40, "128");
- }
- }
- private void textBox3_TextChanged(object sender, EventArgs e)
- {
- if (textBox3.Text == "")
- {
- }
- else
- {
- MemEditor.WriteFloat("iw4mp", 0x646FD40, textBox3.Text);
- }
- }
- private void checkBox4_CheckedChanged(object sender, EventArgs e)
- {
- if (checkBox4.Checked == true)
- {
- MemEditor.WriteFloat("iw4mp", 0x6454D60, "0,5");
- }
- else
- {
- MemEditor.WriteFloat("iw4mp", 0x6454D60, "1");
- }
- }
- private void checkBox5_CheckedChanged(object sender, EventArgs e)
- {
- //if (checkBox5.Checked == true)
- //{
- // processname = Process.GetProcessesByName("iw4mp");
- // int Value = 1;
- // byte[] Buffer = BitConverter.GetBytes(Convert.ToSingle(Value));
- // Write(0x6454D60, Buffer, processname[0].Id);
- // CloseHandle(MemoryOpen(processname[0].Id));
- //}
- //else
- //{
- // processname = Process.GetProcessesByName("iw4mp");
- // int Value = 1;
- // byte[] Buffer = BitConverter.GetBytes(Convert.ToSingle(Value));
- // Write(0x6454D60, Buffer, processname[0].Id);
- // CloseHandle(MemoryOpen(processname[0].Id));
- //}
- }
- private void checkBox6_CheckedChanged(object sender, EventArgs e)
- {
- if (checkBox6.Checked == true)
- {
- MemEditor.WriteFloat("iw4mp", 0x6454D60, "2");
- }
- else
- {
- MemEditor.WriteFloat("iw4mp", 0x6454D60, "1");
- }
- }
- private void checkBox7_CheckedChanged(object sender, EventArgs e)
- {
- if (checkBox7.Checked == true)
- {
- MemEditor.WriteFloat("iw4mp", 0x6454D60, "5");
- }
- else
- {
- MemEditor.WriteFloat("iw4mp", 0x6454D60, "1");
- }
- }
- private void textBox4_TextChanged(object sender, EventArgs e)
- {
- if (textBox4.Text == "")
- {
- }
- else
- {
- MemEditor.WriteFloat("iw4mp", 0x6454D60, textBox4.Text);
- }
- }
- private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
- {
- }
- private void button2_Click(object sender, EventArgs e)
- {
- }
- private void button3_Click(object sender, EventArgs e)
- {
- }
- private void textBox5_TextChanged(object sender, EventArgs e)
- {
- if (textBox5.Text == "")
- {
- }
- else
- {
- int textMax;
- textMax = Convert.ToInt32(textBox5.Text);
- if (textMax >= 6)
- {
- MessageBox.Show("5 is the max!!!");
- }
- else
- {
- if (textBox5.Text == "0")
- {
- byte[] FPS = new byte[] { 0x00 };
- MemEditor.WriteByte("iw4mp", 0x06468630, FPS);
- }
- if (textBox5.Text == "1")
- {
- byte[] FPS = new byte[] { 0x01 };
- MemEditor.WriteByte("iw4mp", 0x06468630, FPS);
- }
- if (textBox5.Text == "2")
- {
- byte[] FPS = new byte[] { 0x02 };
- MemEditor.WriteByte("iw4mp", 0x06468630, FPS);
- }
- if (textBox5.Text == "3")
- {
- byte[] FPS = new byte[] { 0x03 };
- MemEditor.WriteByte("iw4mp", 0x06468630, FPS);
- }
- if (textBox5.Text == "4")
- {
- byte[] FPS = new byte[] { 0x04 };
- MemEditor.WriteByte("iw4mp", 0x06468630, FPS);
- }
- if (textBox5.Text == "5")
- {
- byte[] FPS = new byte[] { 0x05 };
- MemEditor.WriteByte("iw4mp", 0x06468630, FPS);
- }
- }
- }
- }
- private void button1_Click(object sender, EventArgs e)
- {
- /*Start Refreshing Client´s*/
- /*Get Names*/
- //We have 18 clients!
- long NameOffset = 0x01A9AD54;
- for (int i = 0; i < 18; i++)
- {
- long NameOffset2 = NameOffset + (0x6CD8 * i);
- MemEditor.ReadString("iw4mp", NameOffset2, 15);
- string GettedName = File.ReadAllText(Convert.ToString(@"tmp.txt"));
- dataGridView1.Rows[i].Cells[1].Value = GettedName;
- File.Delete(@"tmp.txt");
- }
- }
- private void changeCurrentNameToolStripMenuItem_Click(object sender, EventArgs e)
- {
- }
- private void flashCurrentNameToolStripMenuItem_Click(object sender, EventArgs e)
- {
- timer1.Start();
- }
- private void timer1_Tick(object sender, EventArgs e)
- {
- }
- private void flashCurrentNameOFFToolStripMenuItem_Click(object sender, EventArgs e)
- {
- timer1.Stop();
- }
- private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)
- {
- }
- private void subTheDeveloperToolStripMenuItem_Click(object sender, EventArgs e)
- {
- Process.Start("http://www.youtube.com/mw2toptenworldmodz");
- }
- private void timer2_Tick(object sender, EventArgs e)
- {
- }
- private void button4_Click(object sender, EventArgs e)
- {
- }
- private void giveToolStripMenuItem_Click(object sender, EventArgs e)
- {
- long HealthOffset = 0x18DBC8C;
- int currentIndex = dataGridView1.CurrentRow.Index;
- long HealthOffset2 = HealthOffset + (0x4E8 * currentIndex);
- MemEditor.WriteInt("iw4mp", HealthOffset2, -1);
- }
- private void removeToolStripMenuItem_Click(object sender, EventArgs e)
- {
- long HealthOffset = 0x18DBC8C;
- int currentIndex = dataGridView1.CurrentRow.Index;
- long HealthOffset2 = HealthOffset + (0x4E8 * currentIndex);
- MemEditor.WriteInt("iw4mp", HealthOffset2, 100);
- }
- private void textBox6_TextChanged(object sender, EventArgs e)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment