I have been programming a wow bot for a while, always improving updating and adding features...
But its time to go back to my bot's basics. Movement. Up until now I have used key press based movement (Edit: via PostMessage),.. and that coupled with a nice navmesh equals decent bot movement overall, but it lacks precision, so sometimes the bot can be found running in spot stuck on the edge of something (not frequently, but it is still a problem).
My current scheme is to have the main bot logic running in one thread, and when it wants to start turning or stop turning, it sets flags that another, separate thread reads and presses or depresses the appropriate key. The key-presser thread runs every 100 ms, and is responsible for all movement keys (not combat keys - the numbers and F1-12), which results is very in-accurate turning, since if I try to turn EXACTLY to the value I want to, it will always pass that value and end up in a right-left-right-left-right-left pattern. So needless to say, I'm less than satisfied with this arrangement. I first programmed it to be temporary but never went back and updated it.
I want to avoid memory writes as much as possible, even to the "safe" CTM. You may think it is silly, but if possible I'd like purely input based movement. I also realize based on a
thread I found here that instead of writing to CTM you can call functions instead, which I'd also like to avoid if possible.
My question is, has anyone come up with a relatively accurate way of key-based (or even mouse based) turning that is accurate up to lets say 3 or 4 degrees? Right now my bot is only accurate up to 12 degrees (ouch, right).
Or, if you think I'm being absolutely ridiculous by not using CTM, could anyone tell me why exactly it is so safe? I understand of course that warden does not scan it, but it could potentially scan it for consistency with regards to (1) the set xyz pos is actually on the ground and not floating, and (2) mouse events