Recently, I have nothing to worry about and found that all the friends around me are playing the "Plants vs. Zombies" game! So I thought about making this game tool! Although there are many similar tools on the internet, I can hardly find them written in C! So I want to write one in C!
First, use CE, OD, or other disassembly tools to find the game's memory base address!
Game memory base address: base = 0x006A9EC0
Game sunshine address: [base + 0x768] + 0x5560
Game money address: [base + 0x82C] + 0x28
Game level Address: [base + 0x82C] + 0x24 // level such as: A-B actual value: (A-1) × 10 + B
How to obtain these addresses is not covered in our forum study!
By the way, I wrote it using the tool vs2008!
Create a form:
-
C # code
-
Using System; using System. drawing; using System. text; using System. windows. forms; namespace PlantsVsZombiesTool {// <summary> //// </summary> public partial class Form1: Form {public Form1 () {InitializeComponent ();} private void Form1_Load (object sender, EventArgs e) {}// start wireless sunshine private void btnGet_Click (object sender, EventArgs e) {if (Helper. getPidByProcessName (processName) = 0) {Message Box. Show ("You should always run the game before it is enabled! "); Return;} if (btnGet. text = "enable-sunshine unlimited") {timer1.Enabled = true; btnGet. text = "off-Sunshine infinite";} else {timer1.Enabled = false; btnGet. text = "enable-sunshine unlimited" ;}} private void timereffectick (object sender, EventArgs e) {if (Helper. getPidByProcessName (processName) = 0) {timer1.Enabled = false; btnGet. text = "enable-sunshine unlimited";} int address = ReadMemoryValue (baseAddress); // read the base address (this address will not change) address = address + 0x768; // obtain Level 2 address = ReadMemoryValue (address); address = address + 0x5560; // obtain the address WriteMemory (address, 0x1869F) for storing sunshine values ); // write data to the address (0x1869F indicates 99999) timer1.Interval = 1000;} // start the wireless money private void btnMoney_Click (