I was trying to implement Anti AFK and i've just been running into trouble, i'm currently using
Code:
public void UpdateLastHardwareAction()
{
Random Rand = new Random();
IntPtr pLastHardwareAction = (IntPtr)0x010A1B64;
IntPtr pInputEvent = (IntPtr)0x81CEA0;
Point CursorPos = Cursor.Position;
Process.CallFunction<Int32>(pInputEvent, (IntPtr)10, IntPtr.Zero, (IntPtr)Rand.Next(800), (IntPtr)Rand.Next(600), IntPtr.Zero;
Process.CallFunction<Int32>(pInputEvent, (IntPtr)10, IntPtr.Zero, (IntPtr)CursorPos.X, (IntPtr)CursorPos.Y, IntPtr.Zero);
//Process.WriteValue(pLastHardwareAction, GetTimestamp());
}
and calling it every 15 seconds, it stops the game from saying "You are now AFK: Away from keyboard", but after 7.5 minutes it starts to log me out for inactivity, am i missing something?
i know that InputEvent is 100% working and i also know that it is already updating pLastHardwareAction