Ok im so confused at this point. What i can do currently is read the value from the basic address that i find first, no pointer or offsets. This is the code i use:
ProcessName := "trove.exe"
hwnd := MemoryOpenFromName(ProcessName)
Adress = 0x2A3C4514
Adress2 := MemoryReadPointer(hwnd,Adress, "int")
MsgBox, %Adress2%
return
MemoryOpenFromName(Name)
{
Process, Exist, %Name%
Return DllCall("OpenProcess", "Uint", 0x1F0FFF, "int", 0, "int", PID := ErrorLevel)
}
MemoryReadPointer(hwnd, base, datatype="int", length=4, offsets=0, offset_1=0, offset_2=0, offset_3=0, offset_4=0, offset_5=0, offset_6=0, offset_7=0, offset_8=0, offset_9=0)
{
B_FormatInteger := A_FormatInteger
Loop, %offsets%
{
baseresult := MemoryRead(hwnd,base)
Offset := Offset_%A_Index%
SetFormat, integer, h
base := baseresult + Offset
SetFormat, integer, d
}
SetFormat, Integer, %B_FormatInteger%
return MemoryRead(hwnd,base,datatyp,length)
}
MemoryRead(hwnd, address, datatype="int", length=4, offset=0)
{
VarSetCapacity(readvalue,length, 0)
DllCall("ReadProcessMemory","Uint",hwnd,"Uint",add ress+offset,"Str",readvalue,"Uint",length,"Uint *",0)
finalvalue := NumGet(readvalue,0,datatype)
return finalvalue
}
But how do i change this to read the consistent address that doesn't change each time the game restarts?