WoW Memory EditingWoW Memory Editing for learning purposes only.
This section is more advanced than others on MMOwnedRead the section specific rules, infractions will be given out if u break them!That is including the expectations! - If you don't meet them then don't post
[Question][Java] Setting terms for a walk function
Hi everyone!
Well, I managed to build a programm in java that can read offsets properly out of wow... So i tried to code a walkTo() function...
Out of other guids on this board, i managed to do all the math their is to do to calculate the angles to the destination waypoint. I have got 2 variables,
"l" and "r", that show how much the player has to turn to the right or to the left to face the destination Waypoint.
Now, i used the java robot class to send keyactions to the wow window... the player should turn as long as "l" is smaller than "r" to turn left,
and to turn as long as "l" is bigger than "r" to turn right.
Well, at all this works, but it is too imprecise. If the player only has to turn a very small amount of degrees to the destination, the programm turns too much (or too long)...
if i set the delay between the keypress and the keyrelease too short, the player doesn't turn at all, and if i set is too long, it is to imprecise as described before... well i tried using several threads to do the check parallel to turning, but it doesn't work for some reason...
Any suggestions on this?
greets kmJeepers (i hope you dont mind my bad english)
for better understanding my source code(This is an Alterac bot, too ...dont mind that^^):
[Only registered and activated users can see links. ]
VirusTotal: [Only registered and activated users can see links. ]
Donate to remove ads, get your "DONATOR title, and get access to the MMOwned community's elite Shoutbawx.
Well, turning like this will ever be less precise than other way (like memory writing, SetFacing or using the CTM function ...) but maybe can you start by posting your turning code, there is maybe something wrong with it.
Sorry but I'm too lazy to download this bot, find the right class...
since the turning speed is constant, you could calculate how long you have to press the key. if you want to turn just a little bit (like 1 ms) to the left, since it bugs with short delay, just go 25 ms to the right and 26 ms to the left
@Ellesar1:
I just checked, and however the turning speed isn't constant oO
if i turn for 1000ms two times, i get different values for the difference oO
Sending mouseinput to turn is better and faster than using the arrow keys, you'll just have to calculate how far you need to move your cursor.
You'll have to find out how many px you need to move your mouse to reach a certain angle.
Once you know how many px to move you'll send a right mouse button down message to wow, then change the cursor coordinates by the px you calculated and send a right mouse button up message.
But be careful, if you're spinning around too fast you'll get disconnected.
well i'm actually trying to implement the mouse method, but this is is kind of tricky...
the angle the player moves is relatet to the speed the mouse moves ...
but i'll try that out and post my result ;D