C # Memory operations

Source: Internet
Author: User

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 (

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.