Created
October 19, 2012 13:51
-
-
Save ZeusAFK/3918335 to your computer and use it in GitHub Desktop.
speed hack c++ knight online
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 run(float x, float y, short mode) { | |
printf("Moving to: %f, %f Mode: %d\n", x, y, mode); | |
BYTE pBytes1[] = { 0x06, 0 ,0 ,0 ,0 , 0x2F, 0x00, 0x2D, 0x00, mode}; | |
WORD buffer(0); | |
buffer=((int) x) * 10; | |
CopyBytes(pBytes1 + 1, buffer); | |
buffer=((int) y) * 10; | |
CopyBytes(pBytes1 + 3, buffer); | |
SendPackets(pBytes1, sizeof(pBytes1)); | |
} | |
void SpeedHack(float nx, float ny) { | |
DWORD ADDR_CHRB = RDWORD(0xD74C9C); | |
float x =*(FLOAT*)(ADDR_CHRB + 0xD8); | |
float y =*(FLOAT*)(ADDR_CHRB + 0xE0); | |
run(x, y, 1); | |
float i, yy; | |
BOOL allowX = TRUE; | |
BOOL allowY = TRUE; | |
for ( i = x, yy = y; ((i < nx) || (yy < ny)) || ((i > nx) || (yy > ny)); ) { | |
BOOL op = FALSE; | |
BOOL opy = FALSE; | |
float bX = i; | |
float bY = yy; | |
if (i < nx && allowX) { | |
op = TRUE; | |
i += 7.0; | |
} | |
if (yy < ny && allowY) { | |
if (opy == TRUE) allowY = FALSE; | |
opy = TRUE; | |
yy += 7.0; | |
} | |
if (i > nx && allowX) { | |
if (op == TRUE) allowX = false; | |
i -= 7.0; | |
} | |
if (yy > ny && allowY) { | |
if (opy == TRUE) allowY =FALSE; | |
yy -= 7.0; | |
} | |
if (!allowX && !allowY) break; | |
if (bX == i && bY == yy) break; | |
run(i, yy, 3); | |
Sleep(41); | |
} | |
run(nx, ny, 3); | |
run(nx, ny, 0); | |
run(x, y, 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how can we use