I'm developing a bot for a 3D game MMPORG. In it you move the Player Character with the keyboard in a 3D Landscape. Selecting objects or mobs is done exclusively with the mouse: point and click.
I have information about the position of each object on the map.
My bot is sending keyboard and mouse events to the original game-client's window.
What still gives me a headache is how to find the right point (X and Y coordinates) to click on. The attack-range of PCs vary.
For literally years I was trying out different ideas. For now, the best one I found, but still unsatisfying, is:
This works well for melee (close-distance), but range-based performance is poor.