Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.76 KB | None | 0 0
  1. program Mikebot_v8; // by Thehispanic/Gangstamikey - April 11, 2011
  2. var x, y, MageKey, HealKey, Monster, HitCount, AntiF, Monsters, Direction, TargetDirection, MoveDirection, PotsUsed:Integer;
  3. //Key Codes
  4. var F1, F2, F3, F4, F5, F6, F7, F8, Num0, Num1, Num2, Num3, Num4, Num5, Num6, Num7, Num8, Num9, ArrowLeft, ArrowDown, ArrowRight, ArrowUp, Ctrl:Integer;
  5. var KsDirection:String;
  6. constprogram Mikebot_v8; // by Thehispanic/Gangstamikey - April 11, 2011
  7. var x, y, MageKey, HealKey, Monster, HitCount, AntiF, Monsters, Direction, TargetDirection, MoveDirection, PotsUsed:Integer;
  8. //Key Codes
  9. var F1, F2, F3, F4, F5, F6, F7, F8, Num0, Num1, Num2, Num3, Num4, Num5, Num6, Num7, Num8, Num9, ArrowLeft, ArrowDown, ArrowRight, ArrowUp, Ctrl:Integer;
  10. var KsDirection:String;
  11. const
  12. //Relog settings
  13. Username = 'no-name';
  14. Password = 'No-Name';
  15. CharacterNum = '1';
  16. DelayUserInput = 'true'; // Wait extra at login, for lag
  17.  
  18. //General Settings
  19. HitCountReset = 30; //Time between checking if hitting in wrong direction(Do not set too low or your char will jump around trying to turn too fast)
  20. AntiFReset = 60; //Time before reloging if still attacking a single monster
  21. Archer = 'false'; //Not added yet, but will use range if true
  22.  
  23. //Healing settings
  24. Pots = 'normal'; // herbs, normal
  25. HealType = 'none'; // self, clickheal (none = off/no healing)
  26. //HeartsToPot = 5; // When hp is down to selected heart, Mikebot will pot.(cannot be 9, only 1-8)
  27. HerbsForFull = 50; // Amount of herbs to use when potting
  28.  
  29. //Mage settings
  30. MageEnabled = 'true'; // Fire/Thunder etc. (Also depends on what you have in the F key you set for "MageFKey")
  31.  
  32. //Spell Hotkey settings
  33. HealFKey = 'F2'; //F1-F8
  34. MageFKey = 'F3'; //F1-F8
  35.  
  36. {#####Mini-Guide#####
  37. 1. Put your account details in the "Username" and "Password" single-quotes.(')
  38. 1.b. Make sure you have your color set to 32-bit for XP, 16-bit for Vista/Win7.(Found in Control Panel)
  39. 2. Put the number of the character to auto with.('1', '2', '3')
  40. 3. Select the type of pots to use, you must have them in inv or it will log out.('herbs', 'small', 'med', 'large')
  41. 4. Set heal and mage to true/false if you want them on: true, off: false.
  42. 5. Set the Mage-F-Key and Heal-F-Key to a F key(F1-F8, "F" must be capital!)
  43.  
  44. Enjoy! All credits go to Thehispanic/Gangstamikey}
  45. Procedure ReadString(str: String);
  46. var i,strLength :Integer; goer: Boolean;
  47. begin
  48. i:=1
  49. strLength:=Length(str)
  50. goer:=False
  51. while(i<strLength+1) do
  52. begin
  53. if(GetKeyCode(StrGet(str,i))=191)then
  54. begin
  55. KeyDown(16)
  56. goer:=True
  57. i:=i+1
  58. end;
  59. KeyDown(GetKeyCode(StrGet(str,i)))
  60. wait(25)
  61. KeyUp(GetKeyCode(StrGet(str,i)))
  62. wait(50)
  63. KeyUp(GetKeyCode(StrGet(str,i)))
  64. wait(25)
  65. i:=i+1
  66. if(goer=True)then
  67. begin
  68. KeyUp(16)
  69. wait(300)
  70. end;
  71. end;
  72. end;
  73. Procedure SetMageKey;
  74. begin
  75. if(MageFKey = 'F1') then begin MageKey := F1; end
  76. else if(MageFKey = 'F2') then begin MageKey := F2; end
  77. else if(MageFKey = 'F3') then begin MageKey := F3; end
  78. else if(MageFKey = 'F4') then begin MageKey := F4; end
  79. else if(MageFKey = 'F5') then begin MageKey := F5; end
  80. else if(MageFKey = 'F6') then begin MageKey := F6; end
  81. else if(MageFKey = 'F7') then begin MageKey := F7; end
  82. else if(MageFKey = 'F8') then begin MageKey := F8; end
  83. writeln('Mage key set.');
  84. end;
  85. Procedure SetHealKey;
  86. begin
  87. if(HealFKey = 'F1') then begin HealKey := F1; end
  88. else if(HealFKey = 'F2') then begin HealKey := F2; end
  89. else if(HealFKey = 'F3') then begin HealKey := F3; end
  90. else if(HealFKey = 'F4') then begin HealKey := F4; end
  91. else if(HealFKey = 'F5') then begin HealKey := F5; end
  92. else if(HealFKey = 'F6') then begin HealKey := F6; end
  93. else if(HealFKey = 'F7') then begin HealKey := F7; end
  94. else if(HealFKey = 'F8') then begin HealKey := F8; end
  95. writeln('Heal key set.');
  96. end;
  97.  
  98. Procedure Click(x, y :Integer);
  99. begin
  100. Movemouse(x, y);
  101. ClickMouse(x, y, true);
  102. end;
  103.  
  104. Procedure KeyDUp(Key :Byte);
  105. begin
  106. KeyDown(Key);
  107. Wait(10);
  108. KeyUp(Key);
  109. end;
  110.  
  111. Procedure Turn;
  112. begin
  113. KeyUp(Ctrl);
  114. Wait(100);
  115. KeyDown(Direction);
  116. Wait(100);
  117. KeyUp(Direction);
  118. end;
  119.  
  120. Procedure Login;
  121. begin
  122. writeln('Logging in.');
  123. if(FindColor(x, y, 10276608, 362, 314, 437, 332)) then begin // Check for "Login request denied", "Connection not found", "D/C" to retry
  124. ClickMouse(399, 322, true);
  125. Wait(100); Login;
  126. end
  127. ClickMouse(109, 368, true); // Click "Play Game"
  128. repeat
  129. Wait(100);
  130. until(FindColor(x, y, 255, 470, 328, 545, 340) or FindColor(x, y, 10276608, 362, 314, 437, 332))
  131. if(DelayUserInput = 'true') then begin Wait(1200); end else begin Wait(300); end
  132. ReadString(Username);
  133. ClickMouse(416, 388, true); // Click password textbox
  134. Wait(50); ReadString(Password);
  135. ClickMouse(403, 431, true); // Click "Connect"
  136. Wait(500);
  137. if(FindColor(x, y, 10276608, 362, 314, 437, 332)) then begin // Check for "Login request denied", "Connection not found", "D/C" to retry
  138. ClickMouse(399, 322, true);
  139. Wait(100); Login;
  140. end
  141. //Pause till login screen
  142. repeat
  143. Wait(500);
  144. until(FindColor(x, y, 255, 338, 168, 353, 185) or FindColor(x, y, 10276608, 362, 314, 437, 332))
  145. // Click login on the character
  146. repeat
  147. KeyDown(GetKeyCode(CharacterNum));
  148. Wait(10);
  149. KeyUp(GetKeyCode(CharacterNum));
  150. Wait(10);
  151. until(FindColor(x, y, 255, 338, 168, 353, 185) = false)
  152. Wait(500);
  153. ClickMouse(79, 366, true);
  154. // Check if stuck at login screen(Not needed until a problem)
  155. end;
  156.  
  157. Procedure CheckDc;
  158. begin
  159. if(FindColor(x, y, 10276608, 357, 217, 437, 239)) then begin
  160. KeyUp(Ctrl);
  161. Click(x, y);
  162. Login;
  163. end
  164. if(FindColor(x, y, 10276608, 413, 301, 492, 321)) then begin // Paperdoll
  165. Click(451, 311);
  166. end
  167. if(FindColor(x, y, 6514175, 355, 215, 440, 239)) then begin // Exit game box
  168. Click(396, 228);
  169. end
  170. end;
  171.  
  172. Procedure Relog;
  173. begin
  174. Click(599, 48);
  175. Click(323, 225);// Logout
  176. Login;
  177. AntiF := AntiFReset;
  178. HitCount := HitCountReset;
  179. end;
  180.  
  181. Procedure Mage;
  182. begin
  183. if((MageEnabled = 'true') and (FindColor(x, y, 6500574, 235, 38, 236, 38) = false)) then begin
  184. if(FindColor(x, y, Monster, 12, 49, 626, 336)) then begin
  185. writeln('Engaging Mage on monster at '+ inttostr(x) +', '+ inttostr(y) +'.');
  186. KeyDown(MageKey);
  187. Wait(20);
  188. KeyUp(MageKey);
  189. Wait(10);
  190. MoveMouseSmooth(x, y); Wait(1); ClickMouse(x, y, true);
  191. Wait(2000); //1700
  192. end
  193. end
  194. end;
  195.  
  196. Procedure Heal;
  197. begin
  198. if((FindColor(x, y, 16236180, 202, 38, 203, 39)) and (FindColor(x, y, 6500574, 235, 38, 236, 38) = false) and (FindColor(x, y, Monster, 12, 49, 626, 336) = false)) then begin
  199. if(HealType = 'self') then begin
  200. KeyDown(HealKey);
  201. Wait(30);
  202. KeyUp(HealKey);
  203. Wait(1000);
  204. end
  205. else if(HealType = 'clickheal') then begin
  206. KeyDown(HealKey);
  207. Wait(30);
  208. KeyUp(HealKey);
  209. Wait(10);
  210. MoveMouseSmooth(317, 188); Wait(1); ClickMouse(317, 188, true);
  211. Wait(2000); //1700
  212. end
  213. end
  214. end;
  215.  
  216. Procedure AutoPot;
  217. var herbers, Xhp, TimesBy, Herts:Integer;
  218. begin
  219. herbers := HerbsForFull;
  220. //Herts := HeartsToPot;
  221. ///TimesBy := 8 * Herts;
  222. //Xhp := 128 + TimesBy;
  223. if(FindColor(x, y, 16236180, 163, 38, 164, 39)) then begin
  224. Click(81, 366);
  225. Wait(200);
  226. if((Pots = 'herbs') and FindColor(x, y, 33792, 115, 365, 476, 467)) then begin
  227. repeat
  228. herbers := herbers -1;
  229. Click(x, y);
  230. Wait(8);
  231. Click(x, y);
  232. Wait(10);
  233. CheckDc;
  234. until(herbers <= 0)
  235. end
  236. else if((Pots = 'normal') and FindColor(x, y, 33412, 115, 365, 476, 467)) then begin
  237. Click(x, y);
  238. Wait(8);
  239. Click(x, y);
  240. Wait(200);
  241. Potsused := PotsUsed + 1;
  242. end
  243. if(FindColor(x, y, 657930, 238, 34, 239, 35)) then begin // check TP
  244. Click(81, 366);
  245. Wait(100);
  246. if(FindColor(x, y, 16711812, 115, 365, 476, 467)) then begin
  247. Click(x, y);
  248. Wait(8);
  249. Click(x, y);
  250. Wait(10);
  251. end
  252. end
  253. end
  254. end;
  255. Procedure Status;
  256. begin
  257. if(FindWindowTitlePart('endless online', false)) then begin
  258. activateclient;
  259. end
  260. cleardebug;
  261. writeln('');
  262. writeln('');
  263. writeln('');
  264. writeln('');
  265. writeln('');
  266. writeln('');
  267. writeln('Monsters killed: '+ inttostr(Monsters) +' | HitCount: '+ inttostr(HitCount) + ' | AntiFreeze: ' + inttostr(AntiF) +' | Pots Used: '+ inttostr(PotsUsed));
  268. end;
  269.  
  270. Procedure AntiFreeze;
  271. begin
  272. AntiF := AntiF - 1;
  273. Status;
  274. if(AntiF <= 0) then begin
  275. writeln('Frozen or some shit, time to relog.');
  276. KeyUp(Ctrl);
  277. Wait(10);
  278. Relog;
  279. Wait(20);
  280. keyDown(17);
  281. Wait(20);
  282. end
  283. end;
  284. Procedure DoHitCount;
  285. begin
  286. HitCount := HitCount - 1;
  287. if(HitCount <= 0) then begin
  288. KeyUp(Ctrl); Wait(50); Direction := TargetDirection;
  289. Wait(500);
  290. if(((Direction = ArrowLeft) and FindColor(x, y, Monster, 274, 163, 298, 178)) or ((Direction = ArrowDown) and FindColor(x, y, Monster, 272, 188, 295, 197)) or ((Direction = ArrowRight) and FindColor(x, y, Monster, 332, 187, 360, 200)) or ((Direction = ArrowUp) and FindColor(x, y, Monster, 330, 160, 358, 176))) then begin
  291. writeln('Turning to monster again, maybe I''m hitting in the wrong direction.');
  292. Turn;
  293. HitCount := HitCountReset;
  294. KeyDown(17);
  295. end
  296. end
  297. end;
  298.  
  299. Procedure Left;
  300. begin
  301. If (FindColor(x, y, Monster, 274, 163, 298, 178)) then begin
  302. writeln('Engaging Melee on monster on the Left');
  303. TargetDirection := ArrowLeft;
  304. if((Direction = TargetDirection) = false) then begin
  305. Direction := ArrowLeft;
  306. Turn;
  307. end
  308. Wait(50);
  309. KeyDown(17);
  310. Wait(200);
  311. repeat
  312. AutoPot;
  313. AntiFreeze;
  314. DoHitCount;
  315. Wait(500);
  316. until((FindColor(x, y, Monster, 274, 163, 298, 178) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
  317. HitCount := HitCountReset;
  318. AntiF := AntiFReset;
  319. KeyUp(Ctrl);
  320. Wait(500);
  321. if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
  322. KsDirection := 'Left';
  323. end
  324. else begin
  325. Monsters := Monsters + 1;
  326. end
  327. end
  328. end;
  329. Procedure Down;
  330. begin
  331. If (FindColor(x, y, Monster, 271, 189, 305, 195)) then begin
  332. writeln('Engaging Melee on monster on the Bottom');
  333. TargetDirection := ArrowDown;
  334. if((Direction = TargetDirection) = false) then begin
  335. Direction := ArrowDown;
  336. Turn;
  337. end
  338. Wait(50);
  339. KeyDown(17);
  340. Wait(200);
  341. repeat
  342. AutoPot;
  343. AntiFreeze;
  344. DoHitCount;
  345. Wait(500);
  346. until((FindColor(x, y, Monster, 271, 189, 305, 195) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
  347. HitCount := HitCountReset;
  348. AntiF := AntiFReset;
  349. KeyUp(Ctrl);
  350. Wait(500);
  351. if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
  352. KsDirection := 'Down';
  353. end
  354. else begin
  355. Monsters := Monsters + 1;
  356. end
  357. end
  358. end;
  359. Procedure Right;
  360. begin
  361. If (FindColor(x, y, Monster, 332, 187, 360, 200)) then begin
  362. writeln('Engaging Melee on monster on the Right');
  363. TargetDirection := ArrowRight;
  364. if((Direction = TargetDirection) = false) then begin
  365. Direction := ArrowRight;
  366. Turn;
  367. end
  368. Wait(50);
  369. KeyDown(17);
  370. Wait(200);
  371. repeat
  372. AutoPot;
  373. AntiFreeze;
  374. DoHitCount;
  375. Wait(500);
  376. until((FindColor(x, y, Monster, 332, 187, 360, 200) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
  377. HitCount := HitCountReset;
  378. AntiF := AntiFReset;
  379. KeyUp(Ctrl);
  380. Wait(500);
  381. if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
  382. KsDirection := 'Right';
  383. end
  384. else begin
  385. Monsters := Monsters + 1;
  386. end
  387. end
  388. end;
  389. Procedure Up;
  390. begin
  391. If (FindColor(x, y, Monster, 335, 164, 358, 176)) then begin
  392. writeln('Engaging Melee on monster on the Top');
  393. TargetDirection := ArrowUp;
  394. if((Direction = TargetDirection) = false) then begin
  395. Direction := ArrowUp;
  396. Turn;
  397. end
  398. Wait(50);
  399. KeyDown(17);
  400. Wait(200);
  401. repeat
  402. AutoPot;
  403. AntiFreeze;
  404. DoHitCount;
  405. Wait(500);
  406. until((FindColor(x, y, Monster, 335, 164, 358, 176) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
  407. HitCount := HitCountReset;
  408. AntiF := AntiFReset;
  409. KeyUp(Ctrl);
  410. Wait(500);
  411. if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
  412. KsDirection := 'Up';
  413. end
  414. else begin
  415. Monsters := Monsters + 1;
  416. end
  417. end
  418. end;
  419. Procedure CheckSides;
  420. begin
  421. if(KsDirection = 'Left') then begin
  422. Down;
  423. Right;
  424. Up;
  425. Left;
  426. end
  427. else if(KsDirection = 'Down') then begin
  428. Left;
  429. Right;
  430. Up;
  431. Down;
  432. end
  433. else if(KsDirection = 'Right') then begin
  434. Left;
  435. Down;
  436. Up;
  437. Right;
  438. end
  439. else begin
  440. Left;
  441. Down;
  442. Right;
  443. Up;
  444. end
  445. end;
  446.  
  447. Procedure MoveHome;
  448. var waits:Integer;
  449. begin
  450. if(MoveDirection = ArrowLeft) then begin
  451. CheckSides;
  452. Wait(800);
  453. Direction := ArrowRight;
  454. KeyDown(Direction);
  455. Wait(440);
  456. KeyUp(Direction);
  457. Wait(700); AutoPot;
  458. KeyDUp(123); //Refresh
  459. Wait(600); AutoPot;
  460. MoveDirection := 0;
  461. end
  462. else if(MoveDirection = ArrowDown) then begin
  463. CheckSides;
  464. Wait(800);
  465. Direction := ArrowUp;
  466. KeyDown(Direction);
  467. Wait(440);
  468. KeyUp(Direction);
  469. Wait(700); AutoPot;
  470. KeyDUp(123); //Refresh
  471. Wait(1000); AutoPot;
  472. MoveDirection := 0;
  473. end
  474. else if(MoveDirection = ArrowRight) then begin
  475. CheckSides;
  476. Wait(800);
  477. Direction := ArrowLeft;
  478. KeyDown(Direction);
  479. Wait(440);
  480. KeyUp(Direction);
  481. Wait(700); AutoPot;
  482. KeyDUp(123); //Refresh
  483. Wait(1000); AutoPot;
  484. MoveDirection := 0;
  485. end
  486. else if(MoveDirection = ArrowUp) then begin
  487. CheckSides;
  488. Wait(800);
  489. Direction := ArrowDown;
  490. KeyDown(Direction);
  491. Wait(440);
  492. KeyUp(Direction);
  493. Wait(700); AutoPot;
  494. KeyDUp(123); //Refresh
  495. Wait(600); AutoPot;
  496. MoveDirection := 0;
  497. end
  498. end;
  499.  
  500. Procedure CheckTop;
  501. begin
  502. if(FindColor(x, y, Monster, 309, 174, 330, 185)) then begin
  503. KeyDown(Direction);
  504. Wait(440);
  505. KeyUp(Direction);
  506. Wait(700); AutoPot;
  507. KeyDUp(123);
  508. Wait(1000); AutoPot;
  509. KeyDUp(123);
  510. MoveDirection := Direction;
  511. CheckSides;
  512. end
  513. end;
  514.  
  515. Procedure CheckLoggedOut;
  516. begin
  517. if(FindColor(x, y, 16776960, 27, 342, 50, 349)) then begin
  518. Login;
  519. end
  520. end;
  521.  
  522. Procedure CheckDrop;
  523. begin
  524. if(FindColor(x, y, 8716032, 274, 205, 297, 210)) then begin
  525. MoveMouse(286, 205);
  526. Wait(200);
  527. ClickMouse(286, 205, true);
  528. Wait(2000);
  529. end
  530. else if(FindColor(x, y, 8716032, 340, 173, 361, 178)) then begin
  531. MoveMouse(349, 173);
  532. Wait(200);
  533. ClickMouse(349, 173, true);
  534. Wait(2000);
  535. end
  536. else if(FindColor(x, y, 8716032, 338, 205, 361, 210)) then begin
  537. MoveMouse(350, 204);
  538. Wait(200);
  539. ClickMouse(350, 204, true);
  540. Wait(2000);
  541. end
  542. else if(FindColor(x, y, 8716032, 274, 173, 297, 178)) then begin
  543. MoveMouse(286, 172);
  544. Wait(200);
  545. ClickMouse(286, 172, true);
  546. Wait(2000);
  547. end
  548. else if(FindColor(x, y, 8716032, 242, 189, 260, 194)) then begin
  549. MoveMouse(254, 188);
  550. Wait(200);
  551. ClickMouse(254, 188, true);
  552. Wait(2000);
  553. end
  554. else if(FindColor(x, y, 8716032, 306, 221, 329, 226)) then begin
  555. MoveMouse(318, 220);
  556. Wait(200);
  557. ClickMouse(318, 220, true);
  558. Wait(2000);
  559. end
  560. else if(FindColor(x, y, 8716032, 370, 189, 393, 194)) then begin
  561. MoveMouse(382, 189);
  562. Wait(200);
  563. ClickMouse(382, 189, true);
  564. Wait(2000);
  565. end
  566. else if(FindColor(x, y, 8716032, 306, 157, 329, 162)) then begin
  567. MoveMouse(317, 155);
  568. Wait(200);
  569. ClickMouse(317, 155, true);
  570. Wait(2000);
  571. end
  572. else if(FindColor(x, y, 8716032, 306, 189, 329, 194)) then begin
  573. MoveMouse(317, 188);
  574. Wait(200);
  575. ClickMouse(317, 188, true);
  576. Wait(2000);
  577. end
  578. end;
  579.  
  580. Procedure Settings;
  581. begin
  582. //Do not touch anything below unless you know what you're doing
  583. HitCount := HitCountReset;
  584. AntiF := AntiFReset;
  585. Direction := 0;
  586. MoveDirection := 0;
  587. Monster := 1638350;
  588. PotsUsed := 0;
  589. F1 := 112; F2 := 113; F3 := 114; F4 := 115; F5 := 116; F6 := 117; F7 := 118; F8 := 119;
  590. Num0 := 96; Num1 := 97; Num2 := 98; Num3 := 99; Num4 := 100; Num5 := 101; Num6 := 102; Num7 := 103; Num8 := 104; Num9 := 105;
  591. ArrowLeft := 37; ArrowDown := 40; ArrowRight := 39; ArrowUp := 38; Ctrl := 17;
  592. SetMageKey;
  593. SetHealKey;
  594. end;
  595.  
  596. // Begin Main Loop
  597. begin
  598. Settings;
  599. if(FindWindowTitlePart('endless online', false)) then begin
  600. activateclient;
  601. end
  602. else begin
  603. Writeln('Endless Online isn''t open or is minimized, please check and try again.');
  604. end
  605. ClearDebug;
  606. Writeln('Mikebot v8 - By Thehispanic/Gangstamikey');
  607. Wait(1000);
  608. CheckLoggedOut;
  609.  
  610. repeat
  611. CheckDc;
  612. AutoPot;
  613. CheckSides;
  614. Mage;
  615. Heal;
  616. CheckTop;
  617. MoveHome;
  618. CheckLoggedOut;
  619. Status;
  620. CheckDrop;
  621. Wait(100);
  622. until((false) or (isfkeydown(9)))
  623. KeyUp(Ctrl);
  624. end.
  625. //Relog settings
  626. Username = 'no-name';
  627. Password = 'No-Name';
  628. CharacterNum = '1';
  629. DelayUserInput = 'true'; // Wait extra at login, for lag
  630.  
  631. //General Settings
  632. HitCountReset = 30; //Time between checking if hitting in wrong direction(Do not set too low or your char will jump around trying to turn too fast)
  633. AntiFReset = 60; //Time before reloging if still attacking a single monster
  634. Archer = 'false'; //Not added yet, but will use range if true
  635.  
  636. //Healing settings
  637. Pots = 'normal'; // herbs, normal
  638. HealType = 'none'; // self, clickheal (none = off/no healing)
  639. //HeartsToPot = 5; // When hp is down to selected heart, Mikebot will pot.(cannot be 9, only 1-8)
  640. HerbsForFull = 50; // Amount of herbs to use when potting
  641.  
  642. //Mage settings
  643. MageEnabled = 'true'; // Fire/Thunder etc. (Also depends on what you have in the F key you set for "MageFKey")
  644.  
  645. //Spell Hotkey settings
  646. HealFKey = 'F2'; //F1-F8
  647. MageFKey = 'F3'; //F1-F8
  648.  
  649. {#####Mini-Guide#####
  650. 1. Put your account details in the "Username" and "Password" single-quotes.(')
  651. 1.b. Make sure you have your color set to 32-bit for XP, 16-bit for Vista/Win7.(Found in Control Panel)
  652. 2. Put the number of the character to auto with.('1', '2', '3')
  653. 3. Select the type of pots to use, you must have them in inv or it will log out.('herbs', 'small', 'med', 'large')
  654. 4. Set heal and mage to true/false if you want them on: true, off: false.
  655. 5. Set the Mage-F-Key and Heal-F-Key to a F key(F1-F8, "F" must be capital!)
  656.  
  657. Enjoy! All credits go to Thehispanic/Gangstamikey}
  658. Procedure ReadString(str: String);
  659. var i,strLength :Integer; goer: Boolean;
  660. begin
  661. i:=1
  662. strLength:=Length(str)
  663. goer:=False
  664. while(i<strLength+1) do
  665. begin
  666. if(GetKeyCode(StrGet(str,i))=191)then
  667. begin
  668. KeyDown(16)
  669. goer:=True
  670. i:=i+1
  671. end;
  672. KeyDown(GetKeyCode(StrGet(str,i)))
  673. wait(25)
  674. KeyUp(GetKeyCode(StrGet(str,i)))
  675. wait(50)
  676. KeyUp(GetKeyCode(StrGet(str,i)))
  677. wait(25)
  678. i:=i+1
  679. if(goer=True)then
  680. begin
  681. KeyUp(16)
  682. wait(300)
  683. end;
  684. end;
  685. end;
  686. Procedure SetMageKey;
  687. begin
  688. if(MageFKey = 'F1') then begin MageKey := F1; end
  689. else if(MageFKey = 'F2') then begin MageKey := F2; end
  690. else if(MageFKey = 'F3') then begin MageKey := F3; end
  691. else if(MageFKey = 'F4') then begin MageKey := F4; end
  692. else if(MageFKey = 'F5') then begin MageKey := F5; end
  693. else if(MageFKey = 'F6') then begin MageKey := F6; end
  694. else if(MageFKey = 'F7') then begin MageKey := F7; end
  695. else if(MageFKey = 'F8') then begin MageKey := F8; end
  696. writeln('Mage key set.');
  697. end;
  698. Procedure SetHealKey;
  699. begin
  700. if(HealFKey = 'F1') then begin HealKey := F1; end
  701. else if(HealFKey = 'F2') then begin HealKey := F2; end
  702. else if(HealFKey = 'F3') then begin HealKey := F3; end
  703. else if(HealFKey = 'F4') then begin HealKey := F4; end
  704. else if(HealFKey = 'F5') then begin HealKey := F5; end
  705. else if(HealFKey = 'F6') then begin HealKey := F6; end
  706. else if(HealFKey = 'F7') then begin HealKey := F7; end
  707. else if(HealFKey = 'F8') then begin HealKey := F8; end
  708. writeln('Heal key set.');
  709. end;
  710.  
  711. Procedure Click(x, y :Integer);
  712. begin
  713. Movemouse(x, y);
  714. ClickMouse(x, y, true);
  715. end;
  716.  
  717. Procedure KeyDUp(Key :Byte);
  718. begin
  719. KeyDown(Key);
  720. Wait(10);
  721. KeyUp(Key);
  722. end;
  723.  
  724. Procedure Turn;
  725. begin
  726. KeyUp(Ctrl);
  727. Wait(100);
  728. KeyDown(Direction);
  729. Wait(100);
  730. KeyUp(Direction);
  731. end;
  732.  
  733. Procedure Login;
  734. begin
  735. writeln('Logging in.');
  736. if(FindColor(x, y, 10276608, 362, 314, 437, 332)) then begin // Check for "Login request denied", "Connection not found", "D/C" to retry
  737. ClickMouse(399, 322, true);
  738. Wait(100); Login;
  739. end
  740. ClickMouse(109, 368, true); // Click "Play Game"
  741. repeat
  742. Wait(100);
  743. until(FindColor(x, y, 255, 470, 328, 545, 340) or FindColor(x, y, 10276608, 362, 314, 437, 332))
  744. if(DelayUserInput = 'true') then begin Wait(1200); end else begin Wait(300); end
  745. ReadString(Username);
  746. ClickMouse(416, 388, true); // Click password textbox
  747. Wait(50); ReadString(Password);
  748. ClickMouse(403, 431, true); // Click "Connect"
  749. Wait(500);
  750. if(FindColor(x, y, 10276608, 362, 314, 437, 332)) then begin // Check for "Login request denied", "Connection not found", "D/C" to retry
  751. ClickMouse(399, 322, true);
  752. Wait(100); Login;
  753. end
  754. //Pause till login screen
  755. repeat
  756. Wait(500);
  757. until(FindColor(x, y, 255, 338, 168, 353, 185) or FindColor(x, y, 10276608, 362, 314, 437, 332))
  758. // Click login on the character
  759. repeat
  760. KeyDown(GetKeyCode(CharacterNum));
  761. Wait(10);
  762. KeyUp(GetKeyCode(CharacterNum));
  763. Wait(10);
  764. until(FindColor(x, y, 255, 338, 168, 353, 185) = false)
  765. Wait(500);
  766. ClickMouse(79, 366, true);
  767. // Check if stuck at login screen(Not needed until a problem)
  768. end;
  769.  
  770. Procedure CheckDc;
  771. begin
  772. if(FindColor(x, y, 10276608, 357, 217, 437, 239)) then begin
  773. KeyUp(Ctrl);
  774. Click(x, y);
  775. Login;
  776. end
  777. if(FindColor(x, y, 10276608, 413, 301, 492, 321)) then begin // Paperdoll
  778. Click(451, 311);
  779. end
  780. if(FindColor(x, y, 6514175, 355, 215, 440, 239)) then begin // Exit game box
  781. Click(396, 228);
  782. end
  783. end;
  784.  
  785. Procedure Relog;
  786. begin
  787. Click(599, 48);
  788. Click(323, 225);// Logout
  789. Login;
  790. AntiF := AntiFReset;
  791. HitCount := HitCountReset;
  792. end;
  793.  
  794. Procedure Mage;
  795. begin
  796. if((MageEnabled = 'true') and (FindColor(x, y, 6500574, 235, 38, 236, 38) = false)) then begin
  797. if(FindColor(x, y, Monster, 12, 49, 626, 336)) then begin
  798. writeln('Engaging Mage on monster at '+ inttostr(x) +', '+ inttostr(y) +'.');
  799. KeyDown(MageKey);
  800. Wait(20);
  801. KeyUp(MageKey);
  802. Wait(10);
  803. MoveMouseSmooth(x, y); Wait(1); ClickMouse(x, y, true);
  804. Wait(2000); //1700
  805. end
  806. end
  807. end;
  808.  
  809. Procedure Heal;
  810. begin
  811. if((FindColor(x, y, 16236180, 202, 38, 203, 39)) and (FindColor(x, y, 6500574, 235, 38, 236, 38) = false) and (FindColor(x, y, Monster, 12, 49, 626, 336) = false)) then begin
  812. if(HealType = 'self') then begin
  813. KeyDown(HealKey);
  814. Wait(30);
  815. KeyUp(HealKey);
  816. Wait(1000);
  817. end
  818. else if(HealType = 'clickheal') then begin
  819. KeyDown(HealKey);
  820. Wait(30);
  821. KeyUp(HealKey);
  822. Wait(10);
  823. MoveMouseSmooth(317, 188); Wait(1); ClickMouse(317, 188, true);
  824. Wait(2000); //1700
  825. end
  826. end
  827. end;
  828.  
  829. Procedure AutoPot;
  830. var herbers, Xhp, TimesBy, Herts:Integer;
  831. begin
  832. herbers := HerbsForFull;
  833. //Herts := HeartsToPot;
  834. ///TimesBy := 8 * Herts;
  835. //Xhp := 128 + TimesBy;
  836. if(FindColor(x, y, 16236180, 163, 38, 164, 39)) then begin
  837. Click(81, 366);
  838. Wait(200);
  839. if((Pots = 'herbs') and FindColor(x, y, 33792, 115, 365, 476, 467)) then begin
  840. repeat
  841. herbers := herbers -1;
  842. Click(x, y);
  843. Wait(8);
  844. Click(x, y);
  845. Wait(10);
  846. CheckDc;
  847. until(herbers <= 0)
  848. end
  849. else if((Pots = 'normal') and FindColor(x, y, 33412, 115, 365, 476, 467)) then begin
  850. Click(x, y);
  851. Wait(8);
  852. Click(x, y);
  853. Wait(200);
  854. Potsused := PotsUsed + 1;
  855. end
  856. if(FindColor(x, y, 657930, 238, 34, 239, 35)) then begin // check TP
  857. Click(81, 366);
  858. Wait(100);
  859. if(FindColor(x, y, 16711812, 115, 365, 476, 467)) then begin
  860. Click(x, y);
  861. Wait(8);
  862. Click(x, y);
  863. Wait(10);
  864. end
  865. end
  866. end
  867. end;
  868. Procedure Status;
  869. begin
  870. if(FindWindowTitlePart('endless online', false)) then begin
  871. activateclient;
  872. end
  873. cleardebug;
  874. writeln('');
  875. writeln('');
  876. writeln('');
  877. writeln('');
  878. writeln('');
  879. writeln('');
  880. writeln('Monsters killed: '+ inttostr(Monsters) +' | HitCount: '+ inttostr(HitCount) + ' | AntiFreeze: ' + inttostr(AntiF) +' | Pots Used: '+ inttostr(PotsUsed));
  881. end;
  882.  
  883. Procedure AntiFreeze;
  884. begin
  885. AntiF := AntiF - 1;
  886. Status;
  887. if(AntiF <= 0) then begin
  888. writeln('Frozen or some shit, time to relog.');
  889. KeyUp(Ctrl);
  890. Wait(10);
  891. Relog;
  892. Wait(20);
  893. keyDown(17);
  894. Wait(20);
  895. end
  896. end;
  897. Procedure DoHitCount;
  898. begin
  899. HitCount := HitCount - 1;
  900. if(HitCount <= 0) then begin
  901. KeyUp(Ctrl); Wait(50); Direction := TargetDirection;
  902. Wait(500);
  903. if(((Direction = ArrowLeft) and FindColor(x, y, Monster, 274, 163, 298, 178)) or ((Direction = ArrowDown) and FindColor(x, y, Monster, 272, 188, 295, 197)) or ((Direction = ArrowRight) and FindColor(x, y, Monster, 332, 187, 360, 200)) or ((Direction = ArrowUp) and FindColor(x, y, Monster, 330, 160, 358, 176))) then begin
  904. writeln('Turning to monster again, maybe I''m hitting in the wrong direction.');
  905. Turn;
  906. HitCount := HitCountReset;
  907. KeyDown(17);
  908. end
  909. end
  910. end;
  911.  
  912. Procedure Left;
  913. begin
  914. If (FindColor(x, y, Monster, 274, 163, 298, 178)) then begin
  915. writeln('Engaging Melee on monster on the Left');
  916. TargetDirection := ArrowLeft;
  917. if((Direction = TargetDirection) = false) then begin
  918. Direction := ArrowLeft;
  919. Turn;
  920. end
  921. Wait(50);
  922. KeyDown(17);
  923. Wait(200);
  924. repeat
  925. AutoPot;
  926. AntiFreeze;
  927. DoHitCount;
  928. Wait(500);
  929. until((FindColor(x, y, Monster, 274, 163, 298, 178) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
  930. HitCount := HitCountReset;
  931. AntiF := AntiFReset;
  932. KeyUp(Ctrl);
  933. Wait(500);
  934. if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
  935. KsDirection := 'Left';
  936. end
  937. else begin
  938. Monsters := Monsters + 1;
  939. end
  940. end
  941. end;
  942. Procedure Down;
  943. begin
  944. If (FindColor(x, y, Monster, 271, 189, 305, 195)) then begin
  945. writeln('Engaging Melee on monster on the Bottom');
  946. TargetDirection := ArrowDown;
  947. if((Direction = TargetDirection) = false) then begin
  948. Direction := ArrowDown;
  949. Turn;
  950. end
  951. Wait(50);
  952. KeyDown(17);
  953. Wait(200);
  954. repeat
  955. AutoPot;
  956. AntiFreeze;
  957. DoHitCount;
  958. Wait(500);
  959. until((FindColor(x, y, Monster, 271, 189, 305, 195) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
  960. HitCount := HitCountReset;
  961. AntiF := AntiFReset;
  962. KeyUp(Ctrl);
  963. Wait(500);
  964. if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
  965. KsDirection := 'Down';
  966. end
  967. else begin
  968. Monsters := Monsters + 1;
  969. end
  970. end
  971. end;
  972. Procedure Right;
  973. begin
  974. If (FindColor(x, y, Monster, 332, 187, 360, 200)) then begin
  975. writeln('Engaging Melee on monster on the Right');
  976. TargetDirection := ArrowRight;
  977. if((Direction = TargetDirection) = false) then begin
  978. Direction := ArrowRight;
  979. Turn;
  980. end
  981. Wait(50);
  982. KeyDown(17);
  983. Wait(200);
  984. repeat
  985. AutoPot;
  986. AntiFreeze;
  987. DoHitCount;
  988. Wait(500);
  989. until((FindColor(x, y, Monster, 332, 187, 360, 200) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
  990. HitCount := HitCountReset;
  991. AntiF := AntiFReset;
  992. KeyUp(Ctrl);
  993. Wait(500);
  994. if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
  995. KsDirection := 'Right';
  996. end
  997. else begin
  998. Monsters := Monsters + 1;
  999. end
  1000. end
  1001. end;
  1002. Procedure Up;
  1003. begin
  1004. If (FindColor(x, y, Monster, 335, 164, 358, 176)) then begin
  1005. writeln('Engaging Melee on monster on the Top');
  1006. TargetDirection := ArrowUp;
  1007. if((Direction = TargetDirection) = false) then begin
  1008. Direction := ArrowUp;
  1009. Turn;
  1010. end
  1011. Wait(50);
  1012. KeyDown(17);
  1013. Wait(200);
  1014. repeat
  1015. AutoPot;
  1016. AntiFreeze;
  1017. DoHitCount;
  1018. Wait(500);
  1019. until((FindColor(x, y, Monster, 335, 164, 358, 176) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
  1020. HitCount := HitCountReset;
  1021. AntiF := AntiFReset;
  1022. KeyUp(Ctrl);
  1023. Wait(500);
  1024. if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
  1025. KsDirection := 'Up';
  1026. end
  1027. else begin
  1028. Monsters := Monsters + 1;
  1029. end
  1030. end
  1031. end;
  1032. Procedure CheckSides;
  1033. begin
  1034. if(KsDirection = 'Left') then begin
  1035. Down;
  1036. Right;
  1037. Up;
  1038. Left;
  1039. end
  1040. else if(KsDirection = 'Down') then begin
  1041. Left;
  1042. Right;
  1043. Up;
  1044. Down;
  1045. end
  1046. else if(KsDirection = 'Right') then begin
  1047. Left;
  1048. Down;
  1049. Up;
  1050. Right;
  1051. end
  1052. else begin
  1053. Left;
  1054. Down;
  1055. Right;
  1056. Up;
  1057. end
  1058. end;
  1059.  
  1060. Procedure MoveHome;
  1061. var waits:Integer;
  1062. begin
  1063. if(MoveDirection = ArrowLeft) then begin
  1064. CheckSides;
  1065. Wait(800);
  1066. Direction := ArrowRight;
  1067. KeyDown(Direction);
  1068. Wait(440);
  1069. KeyUp(Direction);
  1070. Wait(700); AutoPot;
  1071. KeyDUp(123); //Refresh
  1072. Wait(600); AutoPot;
  1073. MoveDirection := 0;
  1074. end
  1075. else if(MoveDirection = ArrowDown) then begin
  1076. CheckSides;
  1077. Wait(800);
  1078. Direction := ArrowUp;
  1079. KeyDown(Direction);
  1080. Wait(440);
  1081. KeyUp(Direction);
  1082. Wait(700); AutoPot;
  1083. KeyDUp(123); //Refresh
  1084. Wait(1000); AutoPot;
  1085. MoveDirection := 0;
  1086. end
  1087. else if(MoveDirection = ArrowRight) then begin
  1088. CheckSides;
  1089. Wait(800);
  1090. Direction := ArrowLeft;
  1091. KeyDown(Direction);
  1092. Wait(440);
  1093. KeyUp(Direction);
  1094. Wait(700); AutoPot;
  1095. KeyDUp(123); //Refresh
  1096. Wait(1000); AutoPot;
  1097. MoveDirection := 0;
  1098. end
  1099. else if(MoveDirection = ArrowUp) then begin
  1100. CheckSides;
  1101. Wait(800);
  1102. Direction := ArrowDown;
  1103. KeyDown(Direction);
  1104. Wait(440);
  1105. KeyUp(Direction);
  1106. Wait(700); AutoPot;
  1107. KeyDUp(123); //Refresh
  1108. Wait(600); AutoPot;
  1109. MoveDirection := 0;
  1110. end
  1111. end;
  1112.  
  1113. Procedure CheckTop;
  1114. begin
  1115. if(FindColor(x, y, Monster, 309, 174, 330, 185)) then begin
  1116. KeyDown(Direction);
  1117. Wait(440);
  1118. KeyUp(Direction);
  1119. Wait(700); AutoPot;
  1120. KeyDUp(123);
  1121. Wait(1000); AutoPot;
  1122. KeyDUp(123);
  1123. MoveDirection := Direction;
  1124. CheckSides;
  1125. end
  1126. end;
  1127.  
  1128. Procedure CheckLoggedOut;
  1129. begin
  1130. if(FindColor(x, y, 16776960, 27, 342, 50, 349)) then begin
  1131. Login;
  1132. end
  1133. end;
  1134.  
  1135. Procedure CheckDrop;
  1136. begin
  1137. if(FindColor(x, y, 8716032, 274, 205, 297, 210)) then begin
  1138. MoveMouse(286, 205);
  1139. Wait(200);
  1140. ClickMouse(286, 205, true);
  1141. Wait(2000);
  1142. end
  1143. else if(FindColor(x, y, 8716032, 340, 173, 361, 178)) then begin
  1144. MoveMouse(349, 173);
  1145. Wait(200);
  1146. ClickMouse(349, 173, true);
  1147. Wait(2000);
  1148. end
  1149. else if(FindColor(x, y, 8716032, 338, 205, 361, 210)) then begin
  1150. MoveMouse(350, 204);
  1151. Wait(200);
  1152. ClickMouse(350, 204, true);
  1153. Wait(2000);
  1154. end
  1155. else if(FindColor(x, y, 8716032, 274, 173, 297, 178)) then begin
  1156. MoveMouse(286, 172);
  1157. Wait(200);
  1158. ClickMouse(286, 172, true);
  1159. Wait(2000);
  1160. end
  1161. else if(FindColor(x, y, 8716032, 242, 189, 260, 194)) then begin
  1162. MoveMouse(254, 188);
  1163. Wait(200);
  1164. ClickMouse(254, 188, true);
  1165. Wait(2000);
  1166. end
  1167. else if(FindColor(x, y, 8716032, 306, 221, 329, 226)) then begin
  1168. MoveMouse(318, 220);
  1169. Wait(200);
  1170. ClickMouse(318, 220, true);
  1171. Wait(2000);
  1172. end
  1173. else if(FindColor(x, y, 8716032, 370, 189, 393, 194)) then begin
  1174. MoveMouse(382, 189);
  1175. Wait(200);
  1176. ClickMouse(382, 189, true);
  1177. Wait(2000);
  1178. end
  1179. else if(FindColor(x, y, 8716032, 306, 157, 329, 162)) then begin
  1180. MoveMouse(317, 155);
  1181. Wait(200);
  1182. ClickMouse(317, 155, true);
  1183. Wait(2000);
  1184. end
  1185. else if(FindColor(x, y, 8716032, 306, 189, 329, 194)) then begin
  1186. MoveMouse(317, 188);
  1187. Wait(200);
  1188. ClickMouse(317, 188, true);
  1189. Wait(2000);
  1190. end
  1191. end;
  1192.  
  1193. Procedure Settings;
  1194. begin
  1195. //Do not touch anything below unless you know what you're doing
  1196. HitCount := HitCountReset;
  1197. AntiF := AntiFReset;
  1198. Direction := 0;
  1199. MoveDirection := 0;
  1200. Monster := 1638350;
  1201. PotsUsed := 0;
  1202. F1 := 112; F2 := 113; F3 := 114; F4 := 115; F5 := 116; F6 := 117; F7 := 118; F8 := 119;
  1203. Num0 := 96; Num1 := 97; Num2 := 98; Num3 := 99; Num4 := 100; Num5 := 101; Num6 := 102; Num7 := 103; Num8 := 104; Num9 := 105;
  1204. ArrowLeft := 37; ArrowDown := 40; ArrowRight := 39; ArrowUp := 38; Ctrl := 17;
  1205. SetMageKey;
  1206. SetHealKey;
  1207. end;
  1208.  
  1209. // Begin Main Loop
  1210. begin
  1211. Settings;
  1212. if(FindWindowTitlePart('endless online', false)) then begin
  1213. activateclient;
  1214. end
  1215. else begin
  1216. Writeln('Endless Online isn''t open or is minimized, please check and try again.');
  1217. end
  1218. ClearDebug;
  1219. Writeln('Mikebot v8 - By Thehispanic/Gangstamikey');
  1220. Wait(1000);
  1221. CheckLoggedOut;
  1222.  
  1223. repeat
  1224. CheckDc;
  1225. AutoPot;
  1226. CheckSides;
  1227. Mage;
  1228. Heal;
  1229. CheckTop;
  1230. MoveHome;
  1231. CheckLoggedOut;
  1232. Status;
  1233. CheckDrop;
  1234. Wait(100);
  1235. until((false) or (isfkeydown(9)))
  1236. KeyUp(Ctrl);
  1237. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement