Hello, im making one personal trainer for game, in cheat engine i found correct pointer which point still at correct dynamic value after restart. Problem is, how to use this in C# Visual Studion. When i use dynamic memory which pointer point at after restart, then its works, but when i use pointer not dyn.address, then its not work, getting value 0. Question is how to get for example dynamic value 239FD94C010 from pointer 0x01616728. value 239FD94C4E4 i know how to get, when u make dynamic value + offset.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace NMS_Units_Simple_Trainer
{
class Program
{
publicstaticlong Base = 0x0151A7A8;
publicstaticlong dBase = 0x239FD94C010;
publicstaticint Off1 = 0x4D4;
publicstaticlong fBase = Base + Off1;
staticvoid Main(string[] args)
{
VAMemory vam = new VAMemory("NMS");
long memoryValue = dBase + 0x4d4; //this works, because i use dynamic memory
//long memoryValue = Base + 0x4d4; //this doesn;t work, this is pointer and i need to get value 'dBase' from 'Base'.
while (true)
{
Console.WriteLine(vam.ReadInt32((IntPtr)memoryValue));
//Console.WriteLine(vam.WriteInt32((IntPtr)memoryValue, 300000));
Thread.Sleep(500);
}
}
}
}
0x151A7A8 + 0x1616728] : 0x239FD94C010
The underlined part is a pointer, so you'll have to dereference(read the memory) to get the value.
So
1 2 3 4
long memoryValue = vam.ReadInt32((IntPtr)Base + 0x1616728);
// memoryValue is now 0x239FD94C010
memoryValue = vam.ReadInt32((IntPtr)memoryValue + 0x4D4);
// memoryValue is now 300002
I believe you'll need to create the program in 64bit to read those 64bit addresses, though I'm not 100% sure.
I would recommend posting on other forums focused on game hacking and trainers, as this forum is just programming in general.