local windowList = findWindowList("Grand Fantasia", "DJO_CLASS"); if( #windowList == 0 ) then print("You need to run GF first!") end function getWin() if( __WIN == nil ) then __WIN = windowList[1] end return __WIN; end function getProc() if( __PROC == nil or not windowValid(__WIN) ) then if( __PROC ) then closeProcess(__PROC) end; __PROC = openProcess( findProcessByWindow(getWin()) ); end return __PROC; end proc = getProc(); --This program prints the player base address based on the first occurrence I found in memory (thx to admin for the awsome tutorial). myUpdatePattern = string.char(0xD9, 0x40, 0x38, 0x8B, 0x0D, 0x4C, 0x59, 0xA7, 0x00, 0xD9, 0x5D, 0xE0); -- This was taken from the assembly instructions above myUpdateMask = "xx?xx????xxx"; -- The mask we created to match the pattern and ignore dynamic information myUpdateOffset = 5; -- The position (6) minus one; offsets start at 0 to indicate no change. local foundAddress = 0; foundAddress = findPatternInProcess(proc, myUpdatePattern, myUpdateMask, 0x410000, 0xA0000); local baseAddress = memoryReadInt(proc, foundAddress + myUpdateOffset); myUpdatePattern = string.char(0xA1, 0x4C, 0x59, 0xA7, 0x00, 0x8B, 0x40, 0x08, 0xC3); myUpdateMask = "x????xx?x"; myUpdateOffset = 7; foundAddress = 0; foundAddress = findPatternInProcess(proc, myUpdatePattern, myUpdateMask, 0x430000, 0xA0000); local baseOffset = memoryReadByte(proc, foundAddress + myUpdateOffset); printf("Base address is:\t0x%x\nOffset is:\t\t0x%x\n",baseAddress,baseOffset);