Advertisement
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 Binarysharp.MemoryManagement;
- using Binarysharp.MemoryManagement.Helpers;
- using System.Linq;
- namespace WindowsFormsApplication1
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- string gameName = "South Park - The Stick of Truth";
- using (var m = new MemorySharp(ApplicationFinder.FromProcessName(gameName).FirstOrDefault()))
- {
- var moneyPtr = new IntPtr(0x01B71110);
- int[] offsets = { 0x0, 0x14, 0x14, 0x218 };
- moneyPtr = m[moneyPtr].Read<IntPtr>();
- foreach (var offset in offsets)
- {
- moneyPtr = m[moneyPtr + offset, false].Read<IntPtr>();
- }
- byte[] bytes = { 1, 1, 1, 1 };
- m.Write<byte>(moneyPtr, bytes, false);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement