Advertisement
Guest User

W101 thing

a guest
Oct 21st, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.18 KB | None | 0 0
  1. // GetThreadID.cpp : This file contains the 'main' function. Program execution begins and ends there.
  2. //
  3.  
  4. #include "pch.h"
  5. #include <iostream>
  6. #include <Windows.h>
  7. #include <fstream>
  8. #include <windef.h>
  9. #include <ctime>
  10. #include <time.h>
  11. #include <string>
  12. #include <wtypes.h>
  13. #include <array>
  14.  
  15. using namespace std;
  16.  
  17. void SimulateMouseClick();
  18. void PC(int x, int y);
  19. void MoveFor(int x);
  20. void MoveBack(int x);
  21. void MoveLeft(int x);
  22. void MoveRight(int x);
  23. void Message();
  24. void AFKCP();
  25. int GetChar(char x);
  26. void GetResolution(int &horizontal, int &vertical);
  27.  
  28. string Messsage = "a";
  29. string McomMSim;
  30.  
  31.  
  32. /*template<class RECT>
  33. struct podrect
  34. {
  35. RECT left;
  36. RECT top;
  37. RECT right;
  38. RECT bottom;
  39. };
  40.  
  41. template<class RECT>
  42. struct rect
  43. {
  44. rect() : left(), top(), right(), bottom() {}
  45. rect(RECT left, RECT top, RECT right, RECT bottom) :
  46. left(left), top(top), right(right), bottom(bottom) {}
  47. template<class Point>
  48. rect(Point p, RECT width, RECT height) :
  49. left(p.x), right(p.y), right(p.x + width), bottom(p.y + height) {}
  50.  
  51. RECT left;
  52. RECT top;
  53. RECT right;
  54. RECT bottom;
  55. };
  56.  
  57. typedef rect<int> intrect;
  58. typedef rect<float> floatrect;*/
  59.  
  60. int horizontal, vertical = 0;
  61. const int KEYEVENT_KEY_ENTER = VK_RETURN;
  62. const int KEYEVENT_KEY_SHIFT = VK_LSHIFT;
  63. const int KEYEVENT_KEY_SEMICOLON = VK_OEM_1;
  64. int minOut = 0;
  65. const int KEYEVENT_KEY_A = 0x41;
  66. const int KEYEVENT_KEY_B = 0x42;
  67. const int KEYEVENT_KEY_C = 0x43;
  68. const int KEYEVENT_KEY_D = 0x44;
  69. const int KEYEVENT_KEY_E = 0x45;
  70. const int KEYEVENT_KEY_F = 0x46;
  71. const int KEYEVENT_KEY_G = 0x47;
  72. const int KEYEVENT_KEY_H = 0x48;
  73. const int KEYEVENT_KEY_I = 0x49;
  74.  
  75. const int KEYEVENT_KEY_J = 0x4A;
  76. const int KEYEVENT_KEY_K = 0x4B;
  77. const int KEYEVENT_KEY_L = 0x4C;
  78. const int KEYEVENT_KEY_M = 0x4D;
  79. const int KEYEVENT_KEY_N = 0x4E;
  80. const int KEYEVENT_KEY_O = 0x4F;
  81.  
  82. const int KEYEVENT_KEY_P = 0x50;
  83. const int KEYEVENT_KEY_Q = 0x51;
  84. const int KEYEVENT_KEY_R = 0x52;
  85. const int KEYEVENT_KEY_S = 0x53;
  86. const int KEYEVENT_KEY_T = 0x54;
  87. const int KEYEVENT_KEY_U = 0x55;
  88. const int KEYEVENT_KEY_V = 0x56;
  89. const int KEYEVENT_KEY_W = 0x57;
  90. const int KEYEVENT_KEY_X = 0x58;
  91. const int KEYEVENT_KEY_Y = 0x59;
  92. const int KEYEVENT_KEY_Z = 0x5A;
  93.  
  94. int KeyCharArr[28] = { KEYEVENT_KEY_A, KEYEVENT_KEY_B, KEYEVENT_KEY_C, KEYEVENT_KEY_D, KEYEVENT_KEY_E, KEYEVENT_KEY_F, KEYEVENT_KEY_G, KEYEVENT_KEY_H, KEYEVENT_KEY_I, KEYEVENT_KEY_J, KEYEVENT_KEY_K, KEYEVENT_KEY_L, KEYEVENT_KEY_M, KEYEVENT_KEY_N, KEYEVENT_KEY_O, KEYEVENT_KEY_P, KEYEVENT_KEY_Q, KEYEVENT_KEY_R, KEYEVENT_KEY_S, KEYEVENT_KEY_T, KEYEVENT_KEY_U, KEYEVENT_KEY_V, KEYEVENT_KEY_W, KEYEVENT_KEY_X, KEYEVENT_KEY_Y, KEYEVENT_KEY_Z, VK_SPACE, KEYEVENT_KEY_SEMICOLON};
  95.  
  96. int main()
  97. {
  98. GetResolution(horizontal, vertical);
  99.  
  100. string id;
  101.  
  102. DWORD Process_id;
  103. HWND hWND = FindWindowA(0, ("Wizard101"));
  104. //LPCSTR WindowName;
  105. //HWND hWND = FindWindowA(0, (WindowName));
  106. GetWindowThreadProcessId(hWND, &Process_id);
  107. std::cout << Process_id << std::endl;
  108.  
  109. cout << "\nDo you want to spam a message? It must be longer than 2 letters, and only use lower case\nAnd use a period (.) to seperate words\n";
  110. cin >> Messsage;
  111.  
  112. string RCB;
  113. cout << "\n Are you farming Rattle Bones (RB) or Couch Potatoes (CP) or BN or AFK?\n";
  114. cin >> RCB;
  115.  
  116. ifstream File("Times.txt");
  117.  
  118. // ofstream FFile("W.txt",fstream::app);
  119. //File.close();
  120. array <int, 8> T_id;
  121.  
  122. for (size_t i = 0; i < T_id.size(); i++)
  123. {
  124. File >> T_id[i];
  125. }
  126.  
  127. Sleep(5000);
  128.  
  129. if (RCB == "AFK") {
  130. cout << "Do you want complex movement or simple back and forth? (Com || Sim)\n";
  131. cin >> McomMSim;
  132. }
  133.  
  134. //<CP time>
  135. clock_t start = clock();
  136. double duration;
  137.  
  138. tm time;
  139. start = clock();
  140. /*
  141. const double stHour = time.tm_hour;
  142. const double stMin = time.tm_min;
  143. const double stSec = time.tm_sec;*/
  144.  
  145. //</CP time>
  146.  
  147. while (hWND) {
  148.  
  149. if (RCB == "AFK" && McomMSim == "Com") {
  150. AFKCP();
  151. }
  152. if (RCB == "AFK" && McomMSim == "Sim") {
  153. MoveFor(1500);
  154. Sleep(1000);
  155. MoveBack(1500);
  156. }
  157.  
  158.  
  159. if (RCB == "BN") {
  160.  
  161. Sleep(1000);
  162. MoveBack(1000);
  163. keybd_event(KEYEVENT_KEY_X, 0, 0, 0);
  164. keybd_event(KEYEVENT_KEY_X, 0, KEYEVENTF_KEYUP, 0);
  165. Sleep(13000);
  166. MoveFor(8000);
  167.  
  168. /*
  169. PC(538, 364); //card 1
  170. PC(621, 365); //card 2
  171.  
  172. PC(576, 366);
  173.  
  174. PC(677, 372); //card 3
  175. PC(745, 372); //card 4
  176.  
  177. PC(683, 372);
  178.  
  179. PC(821, 355); //card 5
  180. PC(887, 362); //card 6
  181.  
  182. PC(779, 362);
  183. */
  184.  
  185.  
  186.  
  187. PC(731, 374); // card 2
  188. PC(673, 371); // card 1
  189. PC(673, 371); // card 1
  190. PC(731, 374); // card 2
  191. PC(703, 371);//Combined Card
  192.  
  193. Sleep(25000);
  194.  
  195. MoveLeft(850);
  196. MoveFor(6000);
  197. }
  198.  
  199. if (RCB == "RB") {
  200.  
  201. Sleep(5000);
  202. MoveBack(T_id[0]); //T_id = 1
  203. MoveFor(T_id[1]); //T_id = 2
  204.  
  205. PC(trunc(horizontal * 1.521961933), trunc(vertical * 1.471354));
  206.  
  207. Sleep(2000);
  208.  
  209. PC(trunc(horizontal * 1.4904), trunc(vertical * 1.471354));
  210.  
  211. Sleep(2000);
  212.  
  213. PC(trunc(horizontal * 1.51244), trunc(vertical * 1.471354));
  214.  
  215. Sleep(22250);
  216. MoveLeft(T_id[2]); //T_id = 3
  217. MoveFor(T_id[3]); //T_id = 4
  218. }
  219.  
  220. if (RCB == "CP") {
  221.  
  222. //<Clicks the quit menu button incase it opens>
  223. if (Messsage.length() > 3) {
  224. SetCursorPos(trunc(horizontal * 1.7672), trunc(vertical * 1.8281)); //1048, 636
  225. Sleep(200);
  226. SimulateMouseClick();
  227. }
  228. //<Clicks the quit menu button incase it opens>
  229.  
  230. //<pause>
  231. Sleep(500);
  232. //</pause>
  233.  
  234. //<Card Clicking>
  235. PC(trunc(horizontal * 1.5219), trunc(vertical * 1.4843)); //713, 372
  236. Sleep(1500);
  237. PC(trunc(horizontal * 1.4963), trunc(vertical * 1.4296)); //678, 330
  238. Sleep(1500);
  239. PC(trunc(horizontal * 1.518), trunc(vertical * 1.4843)); //700, 374
  240. //<Card Clicking>
  241.  
  242. //<Move to get into a new battle>
  243. MoveFor(750);
  244. MoveBack(650);
  245. //</move to get into a new battle>
  246.  
  247. //<Prints the message>
  248. if (Messsage.length() > 2) {
  249. Message();
  250. }
  251. //</Prints the message>
  252.  
  253. // //<time> I should really call this section time out / regeneration time
  254.  
  255. duration = (std::clock() - start) / (double) CLOCKS_PER_SEC;
  256.  
  257. int minutes = duration / 60;
  258.  
  259. //if (minutes > 28){
  260.  
  261.  
  262. if (minOut <= 3) {
  263. minOut += 1;
  264. }
  265. else
  266. {
  267. minOut = 0;
  268. cout << minutes << endl;
  269. }
  270.  
  271.  
  272. if (minutes >= 35 && minutes <= 39) {
  273. // if (minutes >= 2 && minutes <= 5) {
  274.  
  275.  
  276. for (int i = 0; i <= 15; i++) {
  277. SetCursorPos(trunc(horizontal * 1.8374), trunc(vertical * 1.9062)); //1144, 696
  278. PC(trunc(horizontal * 1.8374), trunc(vertical * 1.9062)); //1144, 696
  279. SetCursorPos(trunc(horizontal * 1.5219), trunc(vertical * 1.4843)); //713, 372
  280. Sleep(100);
  281. SimulateMouseClick();
  282. Sleep(1500);
  283. }
  284.  
  285. while (minutes >= 35 && minutes <= 39) {
  286. // while (minutes >= 2 && minutes <= 5) {
  287.  
  288.  
  289. AFKCP();
  290. duration = (std::clock() - start) / (double)CLOCKS_PER_SEC;
  291. minutes = duration / 60;
  292.  
  293. if (minOut <= 10) {
  294. minOut += 1;
  295. }
  296. else
  297. {
  298. minOut = 0;
  299. cout << minutes << endl;
  300. }
  301.  
  302. }
  303.  
  304. SetCursorPos(trunc(horizontal * 1.9011), trunc(vertical * 1.9023)); //1231, 693
  305. PC(trunc(horizontal * 1.9011), trunc(vertical * 1.9023)); //1231, 693
  306. Sleep(5000);
  307. SetCursorPos(trunc(horizontal * 1.8799), trunc(vertical * 1.9309)); //1202, 715
  308. PC(trunc(horizontal * 1.8799), trunc(vertical * 1.9309)); //1202, 715
  309. MoveBack(3000);
  310.  
  311. start = clock();
  312.  
  313. Sleep(10000);
  314. }
  315.  
  316. //}
  317.  
  318. //</time>
  319.  
  320. //<pause>
  321. Sleep(1000);
  322. //</pause>
  323. }
  324.  
  325. }
  326.  
  327.  
  328. }
  329.  
  330. void SimulateMouseClick() {
  331. //mouse_event(MOUSEEVENTF_LEFTDOWN, NULL, NULL, NULL, NULL);
  332.  
  333. INPUT Input = { 0 };
  334. // left down
  335. Input.type = INPUT_MOUSE;
  336. Input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
  337. ::SendInput(1, &Input, sizeof(INPUT));
  338.  
  339. // left up
  340. ::ZeroMemory(&Input, sizeof(INPUT));
  341. Input.type = INPUT_MOUSE;
  342. Input.mi.dwFlags = MOUSEEVENTF_LEFTUP;
  343. ::SendInput(1, &Input, sizeof(INPUT));
  344.  
  345. }
  346.  
  347. /*void KeyPress() {
  348.  
  349. INPUT input;
  350. WORD vkey = VK_F12; // see link below
  351. input.type = INPUT_KEYBOARD;
  352. input.ki.wScan = MapVirtualKey(vkey, MAPVK_VK_TO_VSC);
  353. input.ki.time = 0;
  354. input.ki.dwExtraInfo = 0;
  355. input.ki.wVk = vkey;
  356. input.ki.dwFlags = 0; // there is no KEYEVENTF_KEYDOWN
  357. SendInput(1, &input, sizeof(INPUT));
  358.  
  359. input.ki.dwFlags = KEYEVENTF_KEYUP;
  360. SendInput(1, &input, sizeof(INPUT));
  361.  
  362. }*/
  363.  
  364. void PC(int x, int y) {
  365. Sleep(600);
  366. SetCursorPos(x, y);
  367. Sleep(600);
  368. SimulateMouseClick();
  369. Sleep(600);
  370. }
  371.  
  372.  
  373.  
  374. void Message() {
  375. Sleep(75);
  376.  
  377. //Open Chat
  378. keybd_event(KEYEVENT_KEY_ENTER, 0, 0, 0);
  379. keybd_event(KEYEVENT_KEY_ENTER, 0, KEYEVENTF_KEYUP, 0);
  380. keybd_event(KEYEVENT_KEY_SHIFT, 0, 0, 0);
  381. //Put message here
  382. for (int i = 0; i < Messsage.length(); i++)
  383. {
  384. Sleep(50);
  385.  
  386. keybd_event(GetChar(Messsage[i]), 0, 0, 0);
  387. keybd_event(GetChar(Messsage[i]), 0, KEYEVENTF_KEYUP, 0);
  388.  
  389. }
  390. keybd_event(KEYEVENT_KEY_SHIFT, 0, KEYEVENTF_KEYUP, 0);
  391. //Sleep(5000);
  392. //Send Message
  393. keybd_event(KEYEVENT_KEY_ENTER, 0, 0, 0);
  394. keybd_event(KEYEVENT_KEY_ENTER, 0, KEYEVENTF_KEYUP, 0);
  395.  
  396.  
  397. }
  398.  
  399. void AFKCP() {
  400. MoveFor(1500);
  401. MoveBack(750);
  402. MoveLeft(350);
  403. MoveFor(1500);
  404. MoveBack(1500);
  405. MoveRight(700);
  406. MoveFor(1500);
  407. MoveBack(1500);
  408. MoveLeft(350);
  409. MoveBack(750);
  410. }
  411.  
  412. int GetChar(char x)
  413. {
  414. int number;
  415. int result;
  416.  
  417. switch (x)
  418. {
  419.  
  420. case('a'):
  421. number = 0;
  422. break;
  423. case('b'):
  424. number = 1;
  425. break;
  426. case('c'):
  427. number = 2;
  428. break;
  429. case('d'):
  430. number = 3;
  431. case('e'):
  432. number = 4;
  433. break;
  434. case('f'):
  435. number = 5;
  436. break;
  437. case('g'):
  438. number = 6;
  439. break;
  440. case('h'):
  441. number = 7;
  442. break;
  443. case('i'):
  444. number = 8;
  445. break;
  446. case('j'):
  447. number = 9;
  448. break;
  449. case('k'):
  450. number = 10;
  451. break;
  452. case('l'):
  453. number = 11;
  454. break;
  455. case('m'):
  456. number = 12;
  457. break;
  458. case('n'):
  459. number = 13;
  460. break;
  461. case('o'):
  462. number = 14;
  463. break;
  464. case('p'):
  465. number = 15;
  466. break;
  467. case('q'):
  468. number = 16;
  469. break;
  470. case('r'):
  471. number = 17;
  472. break;
  473. case('s'):
  474. number = 18;
  475. break;
  476. case('t'):
  477. number = 19;
  478. break;
  479. case('u'):
  480. number = 20;
  481. break;
  482. case('v'):
  483. number = 21;
  484. break;
  485. case('w'):
  486. number = 22;
  487. break;
  488. case('x'):
  489. number = 23;
  490. break;
  491. case('y'):
  492. number = 24;
  493. break;
  494. case('z'):
  495. number = 25;
  496. break;
  497. case('.'):
  498. number = 26;
  499. break;
  500. /*case('\0'): //
  501. number = 26;
  502. break;
  503. case('\r'): //
  504. number = 26;
  505. break;
  506. case(0x20): //
  507. number = 26;
  508. break;*/
  509. case(':'):
  510. number = 27;
  511. break;
  512. }
  513.  
  514. switch (number)
  515. {
  516.  
  517. case(0):
  518. result = KeyCharArr[0];
  519. break;
  520. case(1):
  521. result = KeyCharArr[1];
  522. break;
  523. case(2):
  524. result = KeyCharArr[2];
  525. break;
  526. case(3):
  527. result = KeyCharArr[3];
  528. case(4):
  529. result = KeyCharArr[4];
  530. break;
  531. case(5):
  532. result = KeyCharArr[5];
  533. break;
  534. case(6):
  535. result = KeyCharArr[6];
  536. break;
  537. case(7):
  538. result = KeyCharArr[7];
  539. break;
  540. case(8):
  541. result = KeyCharArr[8];
  542. break;
  543. case(9):
  544. result = KeyCharArr[9];
  545. break;
  546. case(10):
  547. result = KeyCharArr[10];
  548. break;
  549. case(11):
  550. result = KeyCharArr[11];
  551. break;
  552. case(12):
  553. result = KeyCharArr[12];
  554. break;
  555. case(13):
  556. result = KeyCharArr[13];
  557. break;
  558. case(14):
  559. result = KeyCharArr[14];
  560. break;
  561. case(15):
  562. result = KeyCharArr[15];
  563. break;
  564. case(16):
  565. result = KeyCharArr[16];
  566. break;
  567. case(17):
  568. result = KeyCharArr[17];
  569. break;
  570. case(18):
  571. result = KeyCharArr[18];
  572. break;
  573. case(19):
  574. result = KeyCharArr[19];
  575. break;
  576. case(20):
  577. result = KeyCharArr[20];
  578. break;
  579. case(21):
  580. result = KeyCharArr[21];
  581. break;
  582. case(22):
  583. result = KeyCharArr[22];
  584. break;
  585. case(23):
  586. result = KeyCharArr[23];
  587. break;
  588. case(24):
  589. result = KeyCharArr[24];
  590. break;
  591. case(25):
  592. result = KeyCharArr[25];
  593. break;
  594. case(26):
  595. result = KeyCharArr[26];
  596. break;
  597. case(27):
  598. result = KeyCharArr[27];
  599. break;
  600. }
  601.  
  602.  
  603. return result;
  604. }
  605.  
  606. void GetResolution(int &horizontal, int &vertical) {
  607. RECT desktop;
  608. // Get a handle to the desktop window
  609. const HWND hDesktop = GetDesktopWindow();
  610. // Get the size of screen to the variable desktop
  611. GetWindowRect(hDesktop, &desktop);
  612. // The top left corner will have coordinates (0,0)
  613. // and the bottom right corner will have coordinates
  614. // (horizontal, vertical)
  615. horizontal = desktop.right;
  616. vertical = desktop.bottom;
  617. }
  618.  
  619. void MoveFor(int x) {
  620.  
  621. keybd_event(KEYEVENT_KEY_W, 0, 0, 0);
  622. Sleep(x);
  623. keybd_event(KEYEVENT_KEY_W, 0, KEYEVENTF_KEYUP, 0);
  624. }
  625.  
  626. void MoveBack(int x) {
  627.  
  628. keybd_event(KEYEVENT_KEY_S, 0, 0, 0);
  629. Sleep(x);
  630. keybd_event(KEYEVENT_KEY_S, 0, KEYEVENTF_KEYUP, 0);
  631.  
  632. }
  633.  
  634. void MoveLeft(int x)
  635. {
  636. keybd_event(KEYEVENT_KEY_A, 0, 0, 0);
  637. Sleep(x);
  638. keybd_event(KEYEVENT_KEY_A, 0, KEYEVENTF_KEYUP, 0);
  639. }
  640.  
  641. void MoveRight(int x)
  642. {
  643. keybd_event(KEYEVENT_KEY_D, 0, 0, 0);
  644. Sleep(x);
  645. keybd_event(KEYEVENT_KEY_D, 0, KEYEVENTF_KEYUP, 0);
  646. }
  647.  
  648. /*INPUT input; // INPUT structure
  649. memset(&input, 0, sizeof(input));
  650.  
  651. // fill it out for keyboard key presses...
  652. input.type = INPUT_KEYBOARD;
  653. input.ki.wVk = VkKeyScanA('w');
  654.  
  655. Sleep(2000);
  656. SendInput(1, &input, sizeof(INPUT)); // 3rd param is size of an INPUT structure
  657. // 2nd is LP to INPUT
  658. // 1st is number of structures..
  659.  
  660. //modify the structure to do key up, a zero will indicate key down, as used above
  661. input.ki.dwFlags = KEYEVENTF_KEYUP;
  662. SendInput(1, &input, sizeof(INPUT));
  663. */
  664.  
  665. /*INPUT input; // INPUT structure
  666. memset(&input, 0, sizeof(input));
  667.  
  668. // fill it out for keyboard key presses...
  669. input.type = INPUT_KEYBOARD;
  670. input.ki.wVk = VkKeyScanA('w');
  671.  
  672. Sleep(1500);
  673. SendInput(1, &input, sizeof(INPUT)); // 3rd param is size of an INPUT structure
  674. // 2nd is LP to INPUT
  675. // 1st is number of structures..
  676.  
  677. //modify the structure to do key up, a zero will indicate key down, as used above
  678. input.ki.dwFlags = KEYEVENTF_KEYUP;
  679. SendInput(1, &input, sizeof(INPUT));*/
  680.  
  681. /*Sleep(75);
  682.  
  683. keybd_event(KEYEVENT_KEY_ENTER, 0, 0, 0);
  684. keybd_event(KEYEVENT_KEY_ENTER, 0, KEYEVENTF_KEYUP, 0);
  685.  
  686. Sleep(75);
  687.  
  688. keybd_event(KEYEVENT_KEY_I, 0, 0, 0);
  689. keybd_event(KEYEVENT_KEY_I, 0, KEYEVENTF_KEYUP, 0);
  690.  
  691. Sleep(75);
  692.  
  693. keybd_event(VK_SPACE, 0, 0, 0);
  694. keybd_event(VK_SPACE, 0, KEYEVENTF_KEYUP, 0);
  695.  
  696. Sleep(75);
  697.  
  698. keybd_event(KEYEVENT_KEY_A, 0, 0, 0);
  699. keybd_event(KEYEVENT_KEY_A, 0, KEYEVENTF_KEYUP, 0);
  700.  
  701. Sleep(75);
  702.  
  703. keybd_event(KEYEVENT_KEY_M, 0, 0, 0);
  704. keybd_event(KEYEVENT_KEY_M, 0, KEYEVENTF_KEYUP, 0);
  705.  
  706. Sleep(75);
  707.  
  708. keybd_event(VK_SPACE, 0, 0, 0);
  709. keybd_event(VK_SPACE, 0, KEYEVENTF_KEYUP, 0);
  710.  
  711. Sleep(75);
  712.  
  713. keybd_event(KEYEVENT_KEY_A, 0, 0, 0);
  714. keybd_event(KEYEVENT_KEY_A, 0, KEYEVENTF_KEYUP, 0);
  715.  
  716. Sleep(75);
  717.  
  718. keybd_event(VK_SPACE, 0, 0, 0);
  719. keybd_event(VK_SPACE, 0, KEYEVENTF_KEYUP, 0);
  720.  
  721. Sleep(75);
  722.  
  723. keybd_event(KEYEVENT_KEY_B, 0, 0, 0);
  724. keybd_event(KEYEVENT_KEY_B, 0, KEYEVENTF_KEYUP, 0);
  725.  
  726. Sleep(75);
  727.  
  728. keybd_event(KEYEVENT_KEY_O, 0, 0, 0);
  729. keybd_event(KEYEVENT_KEY_O, 0, KEYEVENTF_KEYUP, 0);
  730.  
  731. Sleep(75);
  732.  
  733. keybd_event(KEYEVENT_KEY_T, 0, 0, 0);
  734. keybd_event(KEYEVENT_KEY_T, 0, KEYEVENTF_KEYUP, 0);
  735.  
  736. Sleep(75);
  737.  
  738. keybd_event(KEYEVENT_KEY_ENTER, 0, 0, 0);
  739. keybd_event(KEYEVENT_KEY_ENTER, 0, KEYEVENTF_KEYUP, 0);*/
  740.  
  741. /*
  742. if (hWND) {
  743.  
  744. File << Process_id << "\n";
  745. cout << "Big Win";
  746.  
  747.  
  748.  
  749. }
  750. else {
  751. File << "Window not found\n";
  752. cout << "Big sad";
  753. string x;
  754. while (!hWND) {
  755. cout << "Window not found\nDo you want to try again?";
  756. cin >> x;
  757. if (x == "Yes") {
  758. hWND = FindWindowA(0, ("Wizard101"));
  759. }
  760. else
  761. {
  762. break;
  763. }
  764. }
  765. }
  766. */
  767.  
  768. /*
  769. // Run program: Ctrl + F5 or Debug > Start Without Debugging menu
  770. // Debug program: F5 or Debug > Start Debugging menu
  771.  
  772. // Tips for Getting Started:
  773. // 1. Use the Solution Explorer window to add/manage files
  774. // 2. Use the Team Explorer window to connect to source control
  775. // 3. Use the Output window to see build output and other messages
  776. // 4. Use the Error List window to view errors
  777. // 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
  778. // 6. In the future, to open this project again, go to File > Open > Project and select the .sln file
  779. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement