-
-
Notifications
You must be signed in to change notification settings - Fork 208
Functions List
As of Version 1.1.0 "string file" is no longer required. You can substitute "string name" with your actual code.
EXAMPLE: int current_hp = MemLib.readInt("0x007F94E8,0x9c");
int getProcIDFromName(string name)
-
Find a program's process ID via a name. Use task manager to find this.
getProcIDFromName("iw4sp"); //dont include .exe
bool OpenGameProcess(int procID)
- Open a program's process by the process ID. Use getProcIDFromName to help find this as process IDs change. Returns true on success, returns false on failure.
void closeProcess()
- Triggers the CloseHandle function.
string sanitizeString(string str)
- Removes anything from a string that is NOT between ASCII 32 and 126. See http://www.dotnetperls.com/ascii-table for ASCII numbers.
string CutString(string str)
- Does exactly what sanitizeString does but breaks off after it hits something not between ASCII 32 and 126. Good for strings that carry on for too long.
IntPtr moveAddress(string name, string path, int move)
- Get address and move distance from starting address.
EXAMPLE: Write integer 1, to 8 different addresses, 250 bytes apart.
for (i = 0; i < (8*250); i+=250){
IntPtr writeHere = MemLib.moveAddress("test", codeFile, i);
MemLib.writeMemory(writeHere.ToString("X"), "int", "1");
}
bool writeMemory(string code, string type, string write, string file)
- Write to pointer/offset. Returns false on failure, returns true on success.
TYPES: float, int, byte, long, string.
MemLib.writeMemory("godMode", "int", "1", codeFile);
bool writeMove(string code, string type, string write, int moveQty, string file)
-
Write to pointer/offset. Returns false on failure, returns true on success. Good for an array, like for a character's equipment inventory or something like that.
for (int i = 0; i < 40; i++) { int sNum = i * 6; MemLib.writeMove("item_slot1_qty", "byte", "99", sNum, codeFile); }
Read Memory
- There are lots of different functions to use to read memory. Use this wiki page https://github.com/erfg12/memory.dll/wiki/Read-Memory-Functions
InjectDLL(String strDLLName)
- Inject a dll file in to the process. Only used to trigger internal functions. Not for beginners.
ThreadStartClient(object obj)
- An experimental function that creates a pipe between your program and the opened process to communicate through. This is used to trigger injected functions. Not for beginners.
string LoadCode(string name, string file)
- Read the value in the .ini code file.
EXAMPLE: if your code file has SomeLabel=SomeCode
MemLib.LoadCode("SomeLabel", Application.StartupPath + @"\codes.ini");
Would return:
SomeCode