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.Windows.Forms;
- using System.Diagnostics;
- using System.IO;
- using System.Resources;
- /*
- * Program created by VintageRice/vRice
- * Original source by MassTumor, but complerely rescripted by myself.
- */
- namespace Callsign_Editor
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- public Process[] aTekno = Process.GetProcessesByName("iw5mp");
- public Process[] bTekno = Process.GetProcessesByName("iw5m.dat");
- getProcess.processReader TeknoMw3 = new getProcess.processReader();
- void aError() { MessageBox.Show("Error writing to the TeknoMw3 process!"); }
- void bError() { MessageBox.Show("Couldn't locate the TeknoMw3 process!"); }
- public Random randInt = new Random();
- public int panelCount = 0;
- public int fadeNum = 255;
- public int pCycle = 0;
- public int doCount = 0;
- //Had to collect these manually because they were 'random' in the other rool
- byte[] titleValue = new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x99, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2E, 0x30, 0x31, 0x32, 0x33, 0x36, 0x38, 0x3B, 0x3E, 0x3F, 0x40, 0x43, 0x44, 0x46, 0x4A, 0x4B, 0x50, 0x51, 0x55, 0x56, 0x58, 0x5B, 0x5C, 0x5F, 0x61, 0x62, 0x64, 0x66, 0x67, 0x6B, 0x6C, 0x6F, 0x74, 0x76, 0x7A, 0x7F, 0x80, 0x82, 0x83, 0x85, 0x86, 0x87, 0x88, 0x8B, 0x8F, 0x90, 0x93, 0x96, 0x9C, 0x9F, 0xA0, 0xA1, 0xC0, 0xC6, 0xF0, 0xF1, 0xF2, 0xF3, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF9, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF };
- private void timer1_Tick(object sender, EventArgs e)
- {
- if (aTekno.Length != 0 || bTekno.Length != 0)
- {
- if (bTekno.Length != 0) aTekno = bTekno;
- doCount++;
- if (doCount < 2)
- {
- foreach (Process aPath in Process.GetProcessesByName("iw5mp"))
- {
- try
- {
- string fullPath = aPath.MainModule.FileName;
- var aString = fullPath;
- var aToReplace = new string[] { "\\" };
- foreach (var c in aToReplace) aString = aString.Replace(c, "\\\\");
- var bString = aString;
- var bToReplace = new string[] { "\\\\iw5mp", ".exe" };
- foreach (var c in bToReplace) bString = bString.Replace(c, "");
- string cString = bString + "\\\\players2\\\\config_mp.cfg";
- System.IO.FileInfo getInfo = new System.IO.FileInfo(cString);
- if (getInfo.IsReadOnly) File.SetAttributes(cString, FileAttributes.Normal);
- }
- catch (Exception E) { MessageBox.Show(E.Message); }
- }
- foreach (Process bPath in Process.GetProcessesByName("iw5mp.dat"))
- {
- try
- {
- string fullPath = bPath.MainModule.FileName;
- var aString = fullPath;
- var aToReplace = new string[] { "\\" };
- foreach (var c in aToReplace) aString = aString.Replace(c, "\\\\");
- var bString = aString;
- var bToReplace = new string[] { "\\\\iw5m", ".exe", ".dat" };
- foreach (var c in bToReplace) bString = bString.Replace(c, "");
- string cString = bString + "\\\\players2\\\\config_mp.cfg";
- System.IO.FileInfo getInfo = new System.IO.FileInfo(cString);
- if (getInfo.IsReadOnly) File.SetAttributes(cString, FileAttributes.Normal);
- }
- catch (Exception E) { MessageBox.Show(E.Message); }
- }
- }
- label1.Text = "TeknoMw3 is Running";
- label1.ForeColor = Color.ForestGreen;
- foreach (Control C in this.Controls) C.Enabled = true;
- }
- else
- {
- label1.Text = "TeknoMw3 isn't Running!";
- label1.ForeColor = Color.Firebrick;
- if (doCount != 0) doCount = 0;
- foreach (Control C in this.Controls) C.Enabled = false;
- }
- }
- private void setColour(object sender, EventArgs e)
- {
- Button getClicked = (Button)sender;
- Clipboard.SetText("^" + getClicked.Text);
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- //Creating of all the pictureboxex programmatically instead of manually
- for(int i = 2; i < 144; i++)
- {
- PictureBox newBox = new PictureBox();
- newBox.Location = new System.Drawing.Point(15 + ((i - 1) * 155), 57);
- newBox.Height = 30;
- newBox.Width = 150;
- newBox.Name = "Title_" + i;
- newBox.BorderStyle = BorderStyle.FixedSingle;
- newBox.Cursor = Cursors.Hand;
- object newImage = Properties.Resources.ResourceManager.GetObject("titleImage_" + i);
- newBox.Image = (Image)newImage;
- newBox.SizeMode = PictureBoxSizeMode.StretchImage;
- newBox.Click += new EventHandler(this.changeTitle);
- newBox.MouseHover += new EventHandler(this.titleHover);
- newBox.MouseLeave += new EventHandler(this.titleLeave);
- this.Controls.Add(newBox);
- panelCount++;
- }
- }
- private void titleHover(object sender, EventArgs e)
- {
- foreach (Control C in this.Controls) if (C.Name.Contains("Title_")) C.Visible = false;
- PictureBox titleCard = (PictureBox)sender;
- titleCard.Visible = true;
- }
- private void titleLeave(object sender, EventArgs e)
- {
- foreach (Control C in this.Controls) if (C.Name.Contains("Title_")) C.Visible = true;
- }
- private void timer3_Tick(object sender, EventArgs e)
- {
- foreach (Control P in this.Controls)
- {
- if (P.Name.Contains("Title_")) ((PictureBox)P).SetBounds(((PictureBox)P).Location.X - 10, ((PictureBox)P).Location.Y, 150, 30);
- }
- }
- private void timer4_Tick(object sender, EventArgs e)
- {
- foreach (Control P in this.Controls)
- {
- if (P.Name.Contains("Title_")) ((PictureBox)P).SetBounds(((PictureBox)P).Location.X + 10, ((PictureBox)P).Location.Y, 150, 30);
- }
- }
- private void panel2_MouseHover(object sender, EventArgs e)
- {
- titleScrollLeft.Start();
- }
- private void panel2_MouseLeave(object sender, EventArgs e)
- {
- titleScrollLeft.Stop();
- }
- private void panel1_MouseHover(object sender, EventArgs e)
- {
- titleScrollRight.Start();
- }
- private void panel1_MouseLeave(object sender, EventArgs e)
- {
- titleScrollRight.Stop();
- }
- private void button11_Click(object sender, EventArgs e)
- {
- titleClear();
- if (aTekno.Length != 0 || bTekno.Length != 0)
- {
- try
- {
- if (bTekno.Length != 0) aTekno = bTekno;
- TeknoMw3.ReadProcess = aTekno[0];
- TeknoMw3.OpenProcess();
- int i;
- byte[] a = { 0xFF };
- byte[] b = new ASCIIEncoding().GetBytes(textBox1.Text);
- TeknoMw3.WriteProcessMemory((IntPtr)0x1328D34, a, out i);
- TeknoMw3.WriteProcessMemory((IntPtr)0x1328D35, b, out i);
- }
- catch { aError(); }
- }
- else { bError(); }
- }
- private void titleClear()
- {
- if (aTekno.Length != 0 || bTekno.Length != 0)
- {
- try
- {
- if (bTekno.Length != 0) aTekno = bTekno;
- TeknoMw3.ReadProcess = aTekno[0];
- TeknoMw3.OpenProcess();
- int i;
- byte[] b = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
- TeknoMw3.WriteProcessMemory((IntPtr)0x1328D35, b, out i);
- }
- catch { aError(); }
- }
- else { bError(); }
- }
- private void clanClear()
- {
- if (aTekno.Length != 0 || bTekno.Length != 0)
- {
- try
- {
- if (bTekno.Length != 0) aTekno = bTekno;
- TeknoMw3.ReadProcess = aTekno[0];
- TeknoMw3.OpenProcess();
- int i;
- byte[] b = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
- TeknoMw3.WriteProcessMemory((IntPtr)0x1328D54, b, out i);
- }
- catch { aError(); }
- }
- else { bError(); }
- }
- private void changeTitle(object sender, EventArgs e)
- {
- PictureBox getClicked = (PictureBox)sender;
- string getInt = getClicked.Name.Replace("Title_", "");
- int newInt = Convert.ToInt16(getInt);
- if(aTekno.Length != 0 || bTekno.Length != 0)
- {
- try
- {
- if (bTekno.Length != 0) aTekno = bTekno;
- TeknoMw3.ReadProcess = aTekno[0];
- TeknoMw3.OpenProcess();
- int i;
- byte b;
- if(newInt <= 102) b = 0x00;
- else b = 0x01;
- byte[] finalByte = { titleValue[newInt], b };
- TeknoMw3.WriteProcessMemory((IntPtr)0x1328D50, finalByte, out i);
- }
- catch { aError(); }
- }
- else { bError(); }
- }
- private void button3_Click(object sender, EventArgs e)
- {
- if(prestigeCycle.Enabled)
- {
- prestigeCycle.Stop();
- button3.Text = "Prestige Cycle [Disabled]";
- }
- else
- {
- prestigeCycle.Start();
- button3.Text = "Prestige Cycle [Enabled]";
- }
- }
- private void timer2_Tick(object sender, EventArgs e)
- {
- if (pCycle != 20) pCycle++;
- else pCycle = 0;
- if (aTekno.Length != 0 || bTekno.Length != 0)
- {
- try
- {
- if (bTekno.Length != 0) aTekno = bTekno;
- TeknoMw3.ReadProcess = aTekno[0];
- TeknoMw3.OpenProcess();
- int i;
- byte[] b = { Convert.ToByte(pCycle), 0x00 };
- TeknoMw3.WriteProcessMemory((IntPtr)0x1CDBC64, b, out i);
- }
- catch { aError(); }
- }
- else { bError(); }
- }
- private void button2_Click(object sender, EventArgs e)
- {
- titleClear();
- clanClear();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- clanClear();
- if (aTekno.Length != 0 || bTekno.Length != 0)
- {
- try
- {
- if (bTekno.Length != 0) aTekno = bTekno;
- TeknoMw3.ReadProcess = aTekno[0];
- TeknoMw3.OpenProcess();
- int i;
- byte[] a = { 0xFF };
- byte[] b = new ASCIIEncoding().GetBytes(textBox2.Text);
- TeknoMw3.WriteProcessMemory((IntPtr)0x1328D33, a, out i);
- TeknoMw3.WriteProcessMemory((IntPtr)0x1328D54, b, out i);
- }
- catch { aError(); }
- }
- else { bError(); }
- }
- private void button4_Click(object sender, EventArgs e)
- {
- clanClear();
- titleClear();
- string randomChars = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890[]{}():;";
- int randomColour = randInt.Next(0, 8);
- //Random Clantag
- string clanBuild = ("^" + randomColour);
- for (int i1 = 0; i1 < 2; i1++) clanBuild += randomChars[randInt.Next(0, randomChars.Length)];
- //Random Title
- string titleBuild = ("^" + randomColour);
- for (int i2 = 0; i2 < 20; i2++) titleBuild += randomChars[randInt.Next(0, randomChars.Length)];
- if (aTekno.Length != 0 || bTekno.Length != 0)
- {
- try
- {
- if (bTekno.Length != 0) aTekno = bTekno;
- TeknoMw3.ReadProcess = aTekno[0];
- TeknoMw3.OpenProcess();
- int i;
- byte[] b1 = { 0xFF };
- //Clantag
- byte[] b2 = new ASCIIEncoding().GetBytes(clanBuild);
- TeknoMw3.WriteProcessMemory((IntPtr)0x1328D33, b1, out i);
- TeknoMw3.WriteProcessMemory((IntPtr)0x1328D54, b2, out i);
- //Title Image
- byte b3;
- if (randInt.Next(0, 1) == 1) b3 = 0x00;
- else b3 = 0x01;
- byte[] finalByte = { titleValue[randInt.Next(0, 144)], b3 };
- TeknoMw3.WriteProcessMemory((IntPtr)0x1328D50, finalByte, out i);
- //Title Text
- byte[] b4 = new ASCIIEncoding().GetBytes(titleBuild);
- TeknoMw3.WriteProcessMemory((IntPtr)0x1328D34, b1, out i);
- TeknoMw3.WriteProcessMemory((IntPtr)0x1328D35, b4, out i);
- //Prestige
- byte[] b5 = { Convert.ToByte(randInt.Next(0, 20)), 0x00 };
- TeknoMw3.WriteProcessMemory((IntPtr)0x1CDBC64, b5, out i);
- }
- catch { aError(); }
- }
- else { bError(); }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment