Created
October 19, 2012 13:39
-
-
Save ZeusAFK/3918276 to your computer and use it in GitHub Desktop.
KO_MX, KO_MY Update Algorith
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void UpdateMouse(){ | |
DWORD ADDR_CHRB = RDWORD(0xD74C9C); | |
float CharX =*(FLOAT*)(ADDR_CHRB + 0xD8); | |
float CharY =*(FLOAT*)(ADDR_CHRB + 0xE0); | |
for(int i = 1; i < 1000; i++){ | |
float MouseX1 =*(FLOAT*)(ADDR_CHRB + 0xD84 + i); | |
float MouseX2 =*(FLOAT*)(ADDR_CHRB + 0xD84 - i); | |
float MouseY1 =*(FLOAT*)(ADDR_CHRB + 0xD8C + i); | |
float MouseY2 =*(FLOAT*)(ADDR_CHRB + 0xD8C - i); | |
if(MouseX1 < 0) MouseX1 *= -1; | |
if(MouseX2 < 0) MouseX2 *= -1; | |
if(CharX < 0) CharX *= -1; | |
if(MouseY1 < 0) MouseY1 *= -1; | |
if(MouseY2 < 0) MouseY2 *= -1; | |
if(CharY < 0) CharY *= -1; | |
float value_1 = 0; | |
if(CharX > MouseX1) value_1 = CharX - MouseX1; else value_1 = MouseX1 - CharX; | |
if(value_1 > 1 && value_1 < 10) | |
printf("MX + %d: %f\n", i, MouseX1); | |
float value_2 = 0; | |
if(CharX > MouseX2) value_2 = CharX - MouseX2; else value_2 = MouseX2 - CharX; | |
if(value_2 > 1 && value_2 < 10) | |
printf("MX - %d: %f\n", i, MouseX2); | |
float value_3 = 0; | |
if(CharY > MouseY1) value_3 = CharY - MouseY1; else value_3 = MouseY1 - CharY; | |
if(value_3 > 1 && value_3 < 10) | |
printf("MY + %d: %f\n", i, MouseY1); | |
float value_4 = 0; | |
if(CharY > MouseY2) value_4 = CharY - MouseY2; else value_4 = MouseY2 - CharY; | |
if(value_4 > 1 && value_4 < 10) | |
printf("MY - %d: %f\n", i, MouseY2); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void UpdateMouse(){ | |
DWORD ADDR_CHRB = RDWORD(0xD74C9C); | |
float CharX =*(FLOAT*)(ADDR_CHRB + 0xD8); | |
float CharY =*(FLOAT*)(ADDR_CHRB + 0xE0); | |
for(int i = 1; i < 1000; i++){ | |
float MouseX1 =*(FLOAT*)(ADDR_CHRB + 0xD84 + i); | |
float MouseX2 =*(FLOAT*)(ADDR_CHRB + 0xD84 - i); | |
float MouseY1 =*(FLOAT*)(ADDR_CHRB + 0xD8C + i); | |
float MouseY2 =*(FLOAT*)(ADDR_CHRB + 0xD8C - i); | |
if(MouseX1 < 0) MouseX1 *= -1; | |
if(MouseX2 < 0) MouseX2 *= -1; | |
if(CharX < 0) CharX *= -1; | |
if(MouseY1 < 0) MouseY1 *= -1; | |
if(MouseY2 < 0) MouseY2 *= -1; | |
if(CharY < 0) CharY *= -1; | |
float value_1 = 0; | |
if(CharX > MouseX1) value_1 = CharX - MouseX1; else value_1 = MouseX1 - CharX; | |
if(value_1 > 1 && value_1 < 10) | |
printf("MX + %d: %f\n", i, MouseX1); | |
float value_2 = 0; | |
if(CharX > MouseX2) value_2 = CharX - MouseX2; else value_2 = MouseX2 - CharX; | |
if(value_2 > 1 && value_2 < 10) | |
printf("MX - %d: %f\n", i, MouseX2); | |
float value_3 = 0; | |
if(CharY > MouseY1) value_3 = CharY - MouseY1; else value_3 = MouseY1 - CharY; | |
if(value_3 > 1 && value_3 < 10) | |
printf("MY + %d: %f\n", i, MouseY1); | |
float value_4 = 0; | |
if(CharY > MouseY2) value_4 = CharY - MouseY2; else value_4 = MouseY2 - CharY; | |
if(value_4 > 1 && value_4 < 10) | |
printf("MY - %d: %f\n", i, MouseY2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment