Code:
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 CookieAPI;
using System.Diagnostics;
namespace Spec
{
public partial class mainForm : Form
{
Memory m = new Memory("iw5sp");
public mainForm()
{
InitializeComponent();
processTimer.Start();
}
private void cmdMoney_Click(object sender, EventArgs e)
{
try
{
if (moneyText.Text.Length == 0)
{
MessageBox.Show("Please enter a value into the money textbox.", "Error!");
}
else
{
m.SetMemory(0x0168CCC6, int.Parse(moneyText.Text), 4);
m.SetMemory(0x0198F6E0, int.Parse(moneyText.Text), 4);
m.SetMemory(0x019900C0, int.Parse(moneyText.Text), 4);
m.SetMemory(0x01D23821, int.Parse(moneyText.Text), 4);
}
}
catch (Exception ex)
{
MessageBox.Show("Please enter a numeric value into the money textbox.", "Error!");
}
}
private void cmdExp_Click(object sender, EventArgs e)
{
try
{
if (moneyText.Text.Length == 0)
{
MessageBox.Show("Please enter a value into the xp textbox.", "Error!");
}
else
{
m.SetMemory(0x0168C235, int.Parse(expText.Text), 4);
m.SetMemory(0x0198F8B0, int.Parse(expText.Text), 4);
m.SetMemory(0x01A57B90, int.Parse(expText.Text), 4);
m.SetMemory(0x01D22D90, int.Parse(expText.Text), 4);
}
}
catch (Exception ex)
{
MessageBox.Show("Please enter a numeric value into the xp textbox.", "Error!");
}
}
private void processTimer_Tick(object sender, EventArgs e)
{
bool b = isRunning("iw5sp");
cmdMoney.Enabled = b;
cmdExp.Enabled = b;
moneyText.Enabled = b;
expText.Enabled = b;
if (b)
{
statusLabel.Text = "MW3 is running.";
statusLabel.ForeColor = Color.Green;
}
else
{
statusLabel.Text = "MW3 is not running.";
statusLabel.ForeColor = Color.Red;
}
}
private bool isRunning(string process)
{
return Process.GetProcessesByName(process).Length > 0;
}
}
}
This editor was made by