-
-
Notifications
You must be signed in to change notification settings - Fork 208
WriteMemory
bool writeMemory(string code, string type, string write, string file = "")
code = The memory address or INI file label.
type = byte, 2bytes, bytes, float, int, string, double or long
write = must be in string format, but you can write whatever as long as the type is set.
file = Path with INI file name. (OPTIONAL)
MemLib.writeMemory("0x006163DB","byte", "0xEB");
MemLib.writeMemory("0x006163DB","bytes", "0xEB 0xF9");
MemLib.writeMemory("0x006163DB", "float", "50.55");
MemLib.writeMemory("0x006163DB", "int", "100");
MemLib.writeMemory("0x006163DB", "string", "This is a test");
MemLib.writeMemory("0x006163DB", "long", "0x012345678910");
more info: The FreezeValue function creates a thread with a loop that constantly writes the value to the address. This function uses the same arguments as the writeMemory function. UnFreezeValue will remove the address from the loop.
MemLib.FreezeValue(string address, string type, string value, string file = "")
MemLib.UnFreezeValue(string address)
More Info: Cheat Engine memory browse will show you if the section of memory is write protected. If it is, we can use this function to remove the write protection. MemLib.ChangeProtection(string code, MemoryProtection newProtection, out MemoryProtection oldProtection, string file = "")
more info: writing an ini file
codes.ini
health=game.exe+0x006163DB,0x455,0x54,0xC455
C# code
MemLib.writeMemory("health", "int", "100", Environment.CurrentDirectory + @"\codes.ini");
MemLib.writeMemory("game.exe+0x006163DB,0x455,0x54,0xC455", "int", "100");
if (MemLib.writeMemory("game.exe+0x006163DB,0x455,0x54,0xC455", "int", "100")){
MessageBox.Show("Memory Write Was Successful!");
} else {
MessageBox.Show("Memory Write Was NOT Successful.");
}