I have been looking for the place where it checks the keyboard for keypresses, but I haven't been able to get there yet. It's probably not done in the Elementclient.exe, but in one of the dlls. (ifc22, or immwrapper.dll). I'm pretty sure it uses DirectInput (it loads dinput.dll). I need this because I want to make a bot in C++ and don't want to send keystrokes to the client, so that it is easy to use.
I have found the virtual mouse function in ifc22.dll:
Code:
.text:10012A40 ; public: virtual int __thiscall CImmMouse::GetCurrentPosition(long &, long &)
.text:10012A40 public
.text:10012A40
.text:10012A40 Point = tagPOINT ptr -8
.text:10012A40 arg_0 = dword ptr 4
.text:10012A40 arg_4 = dword ptr 8
.text:10012A40
ifc22 also manages the shaders, and the DXDEVICE.
Also I'm investigating if it would be possible to run AND cast a spell at the same time, so you don't stand still while casting.