public static void WriteCurrentPos(Point point) { Process process = null; try { process = Process.GetProcessesByName("YLILWin64")[0]; //"YLILWin64" "YookaLaylee64" } catch { //MessageBox.Show("YookaLaylee process couldn't be found\n\n" + e.ToString()); return; } MultiPointer xPosPointer = new MultiPointer(process, "UnityPlayer.dll", 0x0144DD68, new long[] { 0x128, 0x18, 0x10, 0xA0 }); MultiPointer yPosPointer = new MultiPointer(process, "UnityPlayer.dll", 0x0144DD68, new long[] { 0x128, 0x18, 0x10, 0xA4 }); MultiPointer zPosPointer = new MultiPointer(process, "UnityPlayer.dll", 0x0144DD68, new long[] { 0x128, 0x18, 0x10, 0xA8 }); try { xPosPointer.WriteValue(point.X); yPosPointer.WriteValue(point.Y); zPosPointer.WriteValue(point.Z); } catch { //MessageBox.Show("The addresses could no be read\n\n" + e.ToString()); return; } }
public static Point ReadCurrentPos() { Point point = new Point(); Process process = null; try { process = Process.GetProcessesByName("YLILWin64")[0]; //"YLILWin64" "YookaLaylee64" } catch { throw new Exception("YookaLayleeIL process could not be found."); } MultiPointer xPosPointer = new MultiPointer(process, "UnityPlayer.dll", 0x0144DD68, new long[] { 0x128, 0x18, 0x10, 0xA0 }); MultiPointer yPosPointer = new MultiPointer(process, "UnityPlayer.dll", 0x0144DD68, new long[] { 0x128, 0x18, 0x10, 0xA4 }); MultiPointer zPosPointer = new MultiPointer(process, "UnityPlayer.dll", 0x0144DD68, new long[] { 0x128, 0x18, 0x10, 0xA8 }); try { point.X = xPosPointer.ReadValue(); point.Y = yPosPointer.ReadValue(); point.Z = zPosPointer.ReadValue(); } catch { throw new Exception("Could not read XYZ addresses."); } return(point); }