Guest User

Untitled

a guest
Oct 21st, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.47 KB | None | 0 0
  1. /*#include <windows.h>
  2. #include <stdio.h>
  3. //#include <d3dx9.h>
  4. #include <tlhelp32.h>
  5. //#pragma comment(lib,"d3dx9.lib")
  6. #include <time.h>
  7. #include <math.h>
  8. #pragma comment(lib,"wsock32.lib")
  9.  
  10. int i,l,s1=0,s2=0,cx,cy;
  11.  
  12. void pointer() {
  13. POINT p;
  14. signed int dirx,diry=3;
  15. if (time(0)%2) {
  16. s2--;
  17. p.x=0;
  18. dirx=-3;
  19. }
  20. else {
  21. s1--;
  22. p.x=cx;
  23. dirx=3;
  24. }
  25. while (!GetAsyncKeyState(VK_F11)) {
  26. if (p.y<=0||p.y>=cy) diry=-diry;
  27. if ((p.x>=70&&p.x<=80&&p.y>=i&&p.y<=(i+120)) || (p.x>=cx-80&&p.x<=cx-70&&p.y>=l&&p.y<=(l+120))) dirx=-dirx;
  28. if (p.x<70) {
  29. s2++;
  30. dirx=-dirx;
  31. while (!GetAsyncKeyState(VK_RIGHT)) SetCursorPos(80,i+60);
  32. GetCursorPos(&p);
  33. }
  34. if (p.x>cx-80) {
  35. s1++;
  36. dirx=-dirx;
  37. while (!GetAsyncKeyState(VK_NUMPAD0)) SetCursorPos(cx-80,l+60);
  38. GetCursorPos(&p);
  39. }
  40. p.x+=dirx;
  41. p.y+=diry;
  42. SetCursorPos(p.x,p.y);
  43. Sleep(1);
  44. }
  45. }
  46.  
  47. void A() {
  48. while (1) {
  49. while (!GetAsyncKeyState('O')) Sleep(100);
  50. Sleep(500);
  51. while (!GetAsyncKeyState('O')) {
  52. keybd_event(VK_SHIFT,0,0,0);
  53. //mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
  54. Sleep(30);
  55. keybd_event(VK_SHIFT,0,KEYEVENTF_KEYUP,0);
  56. //mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
  57. Sleep(100);
  58. }
  59. Sleep(500);
  60. }
  61. }
  62.  
  63. int main(int argc,char *argv[]) {
  64. //int a=10;int *b=&a;*b=(*b)+1;printf("%d",a);
  65. //getchar();
  66. //A();
  67. lolref();
  68. char sc[50];
  69. HDC dc=GetDC(0),d1=CreateCompatibleDC(dc),d2=CreateCompatibleDC(dc),d3=CreateCompatibleDC(dc);
  70. cx=GetSystemMetrics(SM_CXSCREEN);
  71. cy=GetSystemMetrics(SM_CYSCREEN);
  72. while (!GetAsyncKeyState(VK_F11));
  73. Sleep(100);
  74. SelectObject(d1,CreateCompatibleBitmap(dc,10,120));
  75. SelectObject(d2,CreateCompatibleBitmap(dc,10,120));
  76. SelectObject(d3,CreateCompatibleBitmap(dc,10,cy));
  77. for (i=0;i<10;i++)
  78. for (l=0;l<120;l++) {
  79. SetPixel(d1,i,l,0xFF0000);
  80. SetPixel(d2,i,l,0x0000FF);
  81. }
  82. for (i=0;i<10;i++)
  83. for (l=0;l<cy;l++)
  84. SetPixel(d3,i,l,0xFFFFFF);
  85. i=l=0;
  86. CreateThread(0,0,(LPTHREAD_START_ROUTINE)pointer,0,0,0);
  87. while (1) {
  88. sprintf(sc,"%d-%d",s1,s2);
  89. TextOut(dc,cx/2-10,100,sc,strlen(sc));
  90. BitBlt(dc,70,0,10,cy,d3,0,0,SRCCOPY);
  91. BitBlt(dc,cx-80,0,10,cy,d3,0,0,SRCCOPY);
  92. BitBlt(dc,70,i,10,120,d1,0,0,SRCCOPY);
  93. BitBlt(dc,cx-80,l,10,120,d2,0,0,SRCCOPY);
  94. if (GetAsyncKeyState(VK_UP)&&i>=0) i-=10;
  95. if (GetAsyncKeyState(VK_DOWN)&&i<=cy-120) i+=10;
  96. if (GetAsyncKeyState(VK_NUMPAD8)&&l>=0) l-=10;
  97. if (GetAsyncKeyState(VK_NUMPAD5)&&l<=cy-120) l+=10;
  98. Sleep(4);
  99. }
  100. }
  101.  
  102. /*int main(int argc,char *argv[]) {
  103. POINT p1,p2;
  104. COLORREF c;
  105. int r,g,b,m,M;
  106. while (1) {
  107. Sleep(1);
  108. GetCursorPos(&p1);
  109. if (p1.x!=p2.x||p1.y!=p2.y) {
  110. p2.x=p1.x;
  111. p2.y=p1.y;
  112. c=GetPixel(GetDC(0),p2.x,p2.y);
  113. r=c>>16;
  114. g=(c>>8)&0xFF;
  115. b=c&0xFF;
  116. m=M=r;
  117. if (g<m) m=g;
  118. if (g>M) M=g;
  119. if (b<m) m=b;
  120. if (b>M) M=b;
  121. printf("%d %d %d %d\n",r,g,b,M-m);
  122. }
  123. }
  124. }*/
  125. #include <windows.h>
  126. #include <stdio.h>
  127.  
  128. void pointerpos() {
  129. POINT p;
  130. while (1) {
  131. if (GetAsyncKeyState(VK_F7)&0x8000) {
  132. GetCursorPos(&p);
  133. printf("%u %u\n",p.x,p.y);
  134. Sleep(100);
  135. }
  136. Sleep(100);
  137. }
  138. }
  139.  
  140. void clickat(int x,int y) {
  141. SetCursorPos((x*GetSystemMetrics(SM_CXSCREEN))/1680,(y*GetSystemMetrics(SM_CYSCREEN))/945);
  142. mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
  143. Sleep(100);
  144. mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
  145. Sleep(1000);
  146. }
  147.  
  148. void rclickat(int x,int y) {
  149. SetCursorPos((x*GetSystemMetrics(SM_CXSCREEN))/1680,(y*GetSystemMetrics(SM_CYSCREEN))/945);
  150. mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0);
  151. Sleep(100);
  152. mouse_event(MOUSEEVENTF_RIGHTUP,0,0,0,0);
  153. Sleep(1000);
  154. }
  155.  
  156. void keypress(char *keys) {
  157. int i;
  158. for (i=0;keys[i]!=0;i++) {
  159. keybd_event(keys[i],0,0,0);
  160. Sleep(100);
  161. keybd_event(keys[i],0,KEYEVENTF_KEYUP,0);
  162. Sleep(200);
  163. }
  164. }
  165.  
  166. int main() {
  167. CreateThread(0,0,(LPTHREAD_START_ROUTINE)pointerpos,0,0,0);
  168. while (1) {
  169. SetForegroundWindow(FindWindow(0,"PVP.net Client"));
  170. SetWindowPos(FindWindow(0,"PVP.net Client"),0,0,0,0,0,SWP_NOSIZE);
  171. clickat(639,44);
  172. clickat(333,235);
  173. clickat(940,713);
  174. keypress("PZANVBPQUZZ\x09 ABCDEFG\x0d");
  175. Sleep(6000);
  176. clickat(746,461);
  177. clickat(734,577);
  178. clickat(933,456);
  179. clickat(895,497);
  180. Sleep(2000);
  181. clickat(848,503);
  182. clickat(596,557);
  183. Sleep(30000);
  184. while (FindWindow(0,"League of Legends (TM) Client")) {
  185. rclickat(547,427);
  186. Sleep(4000);
  187. rclickat(952,427);
  188. Sleep(4000);
  189. clickat(825,646);
  190. Sleep(4000);
  191. }
  192. Sleep(5000);
  193. clickat(1037,735);
  194. Sleep(3000);
  195. }
  196. }
Add Comment
Please, Sign In to add comment