Advertisement
Guest User

Untitled

a guest
Apr 13th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.34 KB | None | 0 0
  1. program Bot;
  2. var x, y, Monster, HitCount, AntiF, Monsters, PotsMonster, HealsM, 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. const
  7. // To change time set your clock to 8:59:30 pm
  8. // leave the clock open while autoing
  9. // Open client from folder Before 8:59:45 wait till 9pm to turn on hacks
  10. // DO NOT TURN ON ANY HACKS TILL 9 pm
  11. // make sure its 9pm before u turn hacks on start script auto away
  12.  
  13. //Relog settings
  14. Username = '';
  15. Password = '';
  16. CharacterNum = '1';
  17. DelayUserInput = 'true'; // Wait extra at login, for lag
  18. TakeDrop = 'off';// to pickup drops if not = off
  19. HOP = 'off';//for hop
  20. Healer = 6;// amount of times to click heal
  21.  
  22. MonsterPotter= 15;//Set Amount of pots to be used...
  23.  
  24. Mager = 'on';//Option For mage off/on...
  25. spell = 'off';//heals with small heal only
  26.  
  27. Archer = 'off';{!!!!!!!!Not yet Finished leave it off for now!!!!!!!!!}
  28.  
  29. {.........guide...........
  30. F1 is your mage key.
  31. For DC input your info or your fucked.
  32. DO NOT FUCK WITH ANYTHING PLEASE.
  33. Dont give this out its for friends only thanks.
  34. Archer Settings not finished..}
  35.  
  36. //General Settings
  37. HitCountReset = 35; //Time between checking if hitting in wrong direction(Do not set too low or your char will jump around trying to turn too fast)
  38. AntiFReset = 60; //Time before reloging if still attacking a single monster
  39.  
  40. //Healing settings
  41. Pots = 'normal'; // herbs, normal
  42. HerbsForFull = 30; // Amount of herbs to use when potting
  43.  
  44. //No touchy any procedures!
  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.  
  74. Procedure Click(x, y :Integer);
  75. begin
  76. Movemouse(x, y);
  77. ClickMouse(x, y, true);
  78. end;
  79.  
  80. Procedure KeyDUp(Key :Byte);
  81. begin
  82. KeyDown(Key);
  83. Wait(10);
  84. KeyUp(Key);
  85. end;
  86.  
  87. Procedure Turn;
  88. begin
  89. KeyUp(Ctrl);
  90. Wait(200);
  91. KeyDown(Direction);
  92. Wait(200);
  93. KeyUp(Direction);
  94. end;
  95.  
  96. Procedure Login;
  97. begin
  98. Click(109, 368); // Click "Play Game"
  99. if(DelayUserInput = 'true') then begin
  100. Wait(1200);
  101. end
  102. else begin
  103. Wait(300);
  104. end
  105. ReadString(Username);
  106. Click(416, 388); // Click password textbox
  107. Wait(50); ReadString(Password);
  108. Click(403, 431); // Click "Connect"
  109. Wait(500);
  110. if(FindColor(x, y, 151294, 371, 320, 371, 320)) then begin // Check for "Login request denied", "Connection not found", "D/C" to retry
  111. Click(399, 322);
  112. Wait(100); Login;
  113. end
  114. if(FindColor(x, y, 151294, 370, 224, 371, 225)) then begin
  115. Click(395, 225);
  116. Wait(100); Login;
  117. end
  118. else begin // Click login on the character
  119. Wait(1500);
  120. repeat
  121. KeyDown(GetKeyCode(CharacterNum));
  122. Wait(10);
  123. KeyUp(GetKeyCode(CharacterNum));
  124. Wait(10);
  125. until(FindColor(x, y, 229629, 343, 74, 344, 75) = false)
  126. Wait(50);
  127. Click(79, 366);
  128. end
  129. // Check if stuck at login screen(Not needed until a problem)
  130. end;
  131. Procedure CheckDc;
  132. begin
  133. if(FindColor(x, y, 151294, 29, 48, 585, 316)) then begin
  134. Click(x, y);
  135. Login;
  136. end
  137. end;
  138.  
  139. Procedure Relog;
  140. begin
  141. Click(599, 48);
  142. Click(323, 225);// Logout
  143. Login;
  144. AntiF := AntiFReset;
  145. HitCount := HitCountReset;
  146. end;
  147.  
  148. Procedure AutoPot;
  149. var herbers, Xhp, TimesBy, Herts:Integer;
  150. begin
  151. herbers := HerbsForFull;
  152. if(FindColor(x, y, 657930, 161, 38, 161, 38)) then begin
  153. Click(81, 366);
  154. Wait(75);
  155. if((Pots = 'herbs') and FindColor(x, y, 33792, 115, 365, 476, 467)) then begin
  156. repeat
  157. herbers := herbers -1;
  158. Click(x, y);
  159. Wait(4);
  160. Click(x, y);
  161. Wait(1);
  162. CheckDc;
  163. until(herbers <= 0)
  164. end
  165. else if((Pots = 'normal') and FindColor(x, y, 16711935, 115, 365, 476, 467)) then begin
  166. Click(x, y);
  167. Wait(8);
  168. Click(x, y);
  169. Wait(100);
  170. Potsused := PotsUsed + 1;
  171. end
  172. if(FindColor(x, y, 657930, 238, 34, 239, 35)) then begin // check TP
  173. Click(81, 366);
  174. Wait(100);
  175. if(FindColor(x, y, 16711812, 115, 365, 476, 467)) then begin
  176. Click(x, y);
  177. Wait(8);
  178. Click(x, y);
  179. Wait(10);
  180. end
  181. end
  182. end
  183. end;
  184.  
  185. Procedure Checkheal;
  186. begin
  187. if (( spell = 'on' )) then begin
  188. If findcolorspiral(x, y, 657930, 161, 34, 161, 34)then begin// and (FindColor(x, y, Monster, 274, 163, 298, 178) = false) or (FindColor(x, y, Monster, 272, 188, 295, 197) = false) or (FindColor(x, y, Monster, 332, 187, 360, 200) = false) or (FindColor(x, y, Monster, 335, 164, 358, 176) = false) then begin
  189. wait(25)
  190. repeat
  191. CheckDc;
  192. keydown(113)
  193. wait(25)
  194. KeyUp(113)
  195. wait(500)
  196. clickmouse(317, 181, true)
  197. until (FindColor(x, y, 9408511, 193, 34, 193, 34))
  198. end
  199. end
  200. end;
  201.  
  202. Procedure Status;
  203. begin
  204. if(FindWindowTitlePart('endless online', false)) then begin
  205. activateclient;
  206. end
  207. cleardebug;
  208. writeln('');
  209. writeln('');
  210. writeln('');
  211. writeln('');
  212. writeln('');
  213. writeln('');
  214. writeln('Monsters killed: '+ inttostr(Monsters) +' | HitCount: '+ inttostr(HitCount) + ' | AntiFreeze: ' + inttostr(AntiF) +' | Pots Used: '+ inttostr(PotsUsed));
  215. end;
  216.  
  217. Procedure AntiFreeze;
  218. begin
  219. AntiF := AntiF - 1;
  220. Status;
  221. if(AntiF <= 0) then begin
  222. writeln('Frozen or some shit, time to relog.');
  223. KeyUp(Ctrl);
  224. Wait(10);
  225. Relog;
  226. Wait(20);
  227. keyDown(17);
  228. Wait(20);
  229. end
  230. end;
  231. Procedure DoHitCount;
  232. begin
  233. HitCount := HitCount - 1;
  234. if(HitCount <= 0) then begin
  235. KeyUp(Ctrl); Wait(50); Direction := TargetDirection;
  236. KeyDUp(123);
  237. Wait(500);
  238. 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
  239. writeln('Turning to monster again, maybe I''m hitting in the wrong direction.');
  240. Turn;
  241. HitCount := HitCountReset;
  242. KeyDown(17);
  243. end
  244. end
  245. end;
  246.  
  247. Procedure AutoPot2;
  248. begin
  249. If findcolorspiral(x, y, 657930, 162, 38, 162, 32)
  250. and (FindColor(x, y, 16711935, 115, 365, 476, 467)) then begin
  251. wait(50)
  252. clickmouse(78, 360, true)
  253. repeat
  254. clickmouse(x, y, true)
  255. wait(5)
  256. clickmouse(x, y, true)
  257. PotsMonster:=PotsMonster-1;
  258. until(PotsMonster<1)
  259. PotsMonster:=MonsterPotter;
  260. end
  261. end;
  262.  
  263. Procedure Mage;
  264. begin
  265. if((Mager = 'on')) then begin
  266. if(FindColor(x, y, 1638350, 7, 34, 630, 337)) then begin
  267. KeyDown(112);
  268. Wait(20);
  269. KeyUp(112);
  270. Wait(10);
  271. MoveMouseSmooth(x, y); Wait(1); ClickMouse(x, y, true);
  272. Wait(1500);
  273. end
  274. end
  275. end;
  276.  
  277. Procedure Left;
  278. begin
  279. if (FindColor(x, y, Monster, 275, 145, 307, 163)) then begin
  280. writeln('Engaging Melee on monster on the Left');
  281. TargetDirection := ArrowLeft;
  282. if((Direction = TargetDirection) = false) then begin
  283. Direction := ArrowLeft;
  284. Turn;
  285. end
  286. Wait(50);
  287. KeyDown(17);
  288. Wait(200);
  289. repeat
  290. AutoPot2;
  291. AutoPot;
  292. AntiFreeze;
  293. DoHitCount;
  294. Wait(500);
  295. until((FindColor(x, y, Monster, 275, 145, 307, 163) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
  296. HitCount := HitCountReset;
  297. AntiF := AntiFReset;
  298. KeyUp(Ctrl);
  299. Wait(500);
  300. if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
  301. KsDirection := 'Left';
  302. end
  303. else begin
  304. Monsters := Monsters + 1;
  305. end
  306. end
  307. end;
  308. Procedure Down;
  309. begin
  310. If (FindColor(x, y, Monster, 272, 188, 295, 197)) then begin
  311. writeln('Engaging Melee on monster on the Bottom');
  312. TargetDirection := ArrowDown;
  313. if((Direction = TargetDirection) = false) then begin
  314. Direction := ArrowDown;
  315. Turn;
  316. end
  317. Wait(50);
  318. KeyDown(17);
  319. Wait(200);
  320. repeat
  321. AutoPot2;
  322. AutoPot;
  323. AntiFreeze;
  324. DoHitCount;
  325. Wait(500);
  326. until((FindColor(x, y, Monster, 272, 188, 295, 197) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
  327. HitCount := HitCountReset;
  328. AntiF := AntiFReset;
  329. KeyUp(Ctrl);
  330. Wait(500);
  331. if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
  332. KsDirection := 'Down';
  333. end
  334. else begin
  335. Monsters := Monsters + 1;
  336. end
  337. end
  338. end;
  339. Procedure Right;
  340. begin
  341. If (FindColor(x, y, Monster, 332, 187, 360, 200)) then begin
  342. writeln('Engaging Melee on monster on the Right');
  343. TargetDirection := ArrowRight;
  344. if((Direction = TargetDirection) = false) then begin
  345. Direction := ArrowRight;
  346. Turn;
  347. end
  348. Wait(50);
  349. KeyDown(17);
  350. Wait(200);
  351. repeat
  352. AutoPot;
  353. AutoPot2;
  354. AntiFreeze;
  355. DoHitCount;
  356. Wait(500);
  357. until((FindColor(x, y, Monster, 332, 187, 360, 200) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
  358. HitCount := HitCountReset;
  359. AntiF := AntiFReset;
  360. KeyUp(Ctrl);
  361. Wait(500);
  362. if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
  363. KsDirection := 'Right';
  364. end
  365. else begin
  366. Monsters := Monsters + 1;
  367. end
  368. end
  369. end;
  370. Procedure Up;
  371. begin
  372. If (FindColor(x, y, Monster, 335, 164, 358, 176)) then begin
  373. writeln('Engaging Melee on monster on the Top');
  374. TargetDirection := ArrowUp;
  375. if((Direction = TargetDirection) = false) then begin
  376. Direction := ArrowUp;
  377. Turn;
  378. end
  379. Wait(50);
  380. KeyDown(17);
  381. Wait(200);
  382. repeat
  383. AutoPot;
  384. AutoPot2;
  385. AntiFreeze;
  386. DoHitCount;
  387. Wait(500);
  388. until((FindColor(x, y, Monster, 335, 164, 358, 176) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
  389. HitCount := HitCountReset;
  390. AntiF := AntiFReset;
  391. KeyUp(Ctrl);
  392. Wait(500);
  393. if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
  394. KsDirection := 'Up';
  395. end
  396. else begin
  397. Monsters := Monsters + 1;
  398. end
  399. end
  400. end;
  401.  
  402. procedure CheckKS;
  403. begin
  404. if(findcolor(x,y,0,313,485,313,485))then begin
  405. writeln('Stopping melee on NPC this is not you,re battle');
  406. repeat
  407. KeyUp(17)
  408. Left;
  409. Right;
  410. Down;
  411. Up;
  412. Mage;
  413. until(FindColor(x, y, Monster, 274, 163, 298, 178) = false) or (FindColor(x, y, Monster, 272, 188, 295, 197) = false) or (FindColor(x, y, Monster, 332, 187, 360, 200) = false) or (FindColor(x, y, Monster, 335, 164, 358, 176)= false)
  414. end
  415. end;
  416.  
  417. Procedure CheckSides;
  418. begin
  419. if(KsDirection = 'Left') then begin
  420. Down;
  421. Right;
  422. Up;
  423. Left;
  424. end
  425. else if(KsDirection = 'Down') then begin
  426. Left;
  427. Right;
  428. Up;
  429. Down;
  430. end
  431. else if(KsDirection = 'Right') then begin
  432. Left;
  433. Down;
  434. Up;
  435. Right;
  436. end
  437. else begin
  438. Left;
  439. Down;
  440. Right;
  441. Up;
  442. end
  443. end;
  444.  
  445. Procedure CheckTrackR;
  446. begin
  447. if (FindColor(x, y, 132, 409, 101, 409, 101)) or (FindColor(x, y, 132, 634, 245, 634, 245)) or (FindColor(x, y, 132, 441, 117, 441, 117))then begin
  448. KeyDown (39)
  449. Wait(20)
  450. KeyUp(39)
  451. end
  452. end;
  453.  
  454. Procedure CheckTrackU;
  455. begin
  456. if (FindColor(x, y, 132, 442, 84, 442, 84)) then begin
  457. Keydown(38)
  458. Wait(20)
  459. KeyUp(38)
  460. end
  461. end;
  462.  
  463. Procedure CheckLoggedOut;
  464. begin
  465. if(FindColor(x, y, 1316092, 32, 158, 34, 160)) then begin
  466. Login;
  467. end
  468. end;
  469.  
  470. Procedure CheckDrop;
  471. begin
  472. if(TakeDrop = 'on')then begin
  473. if(FindColor(x, y, 8716032, 274, 205, 297, 210))then begin
  474. Wait(1500);
  475. MoveMouse(286, 205);
  476. Wait(200);
  477. ClickMouse(286, 205, true);
  478. Wait(2000);
  479. end
  480. else if(FindColor(x, y, 8716032, 340, 173, 361, 178)) then begin
  481. Wait(1500);
  482. MoveMouse(349, 173);
  483. Wait(200);
  484. ClickMouse(349, 173, true);
  485. Wait(2000);
  486. end
  487. else if(FindColor(x, y, 8716032, 338, 205, 361, 210)) then begin
  488. Wait(1500);
  489. MoveMouse(350, 204);
  490. Wait(200);
  491. ClickMouse(350, 204, true);
  492. Wait(2000);
  493. end
  494. else if(FindColor(x, y, 8716032, 274, 173, 297, 178)) then begin
  495. Wait(1500);
  496. MoveMouse(286, 172);
  497. Wait(200);
  498. ClickMouse(286, 172, true);
  499. Wait(2000);
  500. end
  501. else if(FindColor(x, y, 8716032, 242, 189, 260, 194)) then begin
  502. Wait(1500);
  503. MoveMouse(254, 188);
  504. Wait(200);
  505. ClickMouse(254, 188, true);
  506. Wait(2000);
  507. end
  508. else if(FindColor(x, y, 8716032, 306, 221, 329, 226)) then begin
  509. Wait(1500);
  510. MoveMouse(318, 220);
  511. Wait(200);
  512. ClickMouse(318, 220, true);
  513. Wait(2000);
  514. end
  515. else if(FindColor(x, y, 8716032, 370, 189, 393, 194)) then begin
  516. Wait(1500);
  517. MoveMouse(382, 189);
  518. Wait(200);
  519. ClickMouse(382, 189, true);
  520. Wait(2000);
  521. end
  522. else if(FindColor(x, y, 8716032, 306, 157, 329, 162)) then begin
  523. Wait(1500);
  524. MoveMouse(317, 155);
  525. Wait(200);
  526. ClickMouse(317, 155, true);
  527. Wait(2000);
  528. end
  529. else if(FindColor(x, y, 8716032, 306, 189, 329, 194)) then begin
  530. Wait(1500);
  531. MoveMouse(317, 188);
  532. Wait(200);
  533. ClickMouse(317, 188, true);
  534. Wait(2000);
  535. end
  536. end
  537. end;
  538.  
  539. Procedure Movehome;
  540. begin
  541. if(HOP = 'on')then begin
  542. if(findcolor(x,y,65280,501,80,501,80))then begin
  543. repeat
  544. wait(500)
  545. AutoPot2;
  546. CheckSides;
  547. keydown(37)
  548. wait(5)
  549. Keyup(37)
  550. until (findcolor(x,y,65280,597,128,597,128))
  551. keyup(37)
  552. repeat
  553. wait(500)
  554. Left;
  555. Right;
  556. Down;
  557. Up;
  558. Keydown(38)
  559. wait(5)
  560. Keyup(38)
  561. until (findcolor(x,y,65280,532,160,532,160))
  562. keyup(38)
  563. repeat
  564. wait(500)
  565. Left;
  566. Right;
  567. Down;
  568. Up;
  569. Keydown(37)
  570. wait(5)
  571. Keyup(37)
  572. until(findcolor(x,y,235,282,178,282,178))
  573. keyup(37)
  574. repeat
  575. wait(500)
  576. AutoPot2;
  577. AutoPot;
  578. Left;
  579. Right;
  580. Up;
  581. Down;
  582. CheckSides;
  583. Keydown(37)
  584. wait(5)
  585. Keyup(37)
  586. until(findcolor(x,y,252,390,165,390,165))
  587. Keyup(37)
  588. repeat
  589. wait(500)
  590. AutoPot2;
  591. AutoPot;
  592. Left;
  593. Right;
  594. Up;
  595. Down;
  596. CheckSides;
  597. Keydown(38)
  598. wait(5)
  599. Keyup(38)
  600. until(findcolor(x,y,241,99,308,99,308))
  601. Keyup(38)
  602. end
  603. end
  604. end;
  605.  
  606. Procedure Settings;
  607. begin
  608. //Do not touch anything below unless you know what you're doing
  609. HitCount := HitCountReset;
  610. AntiF := AntiFReset;
  611. Direction := 0;
  612. MoveDirection := 0;
  613. Monster := 1638350;
  614. PotsUsed := 0;
  615. F1 := 112; F2 := 113; F3 := 114; F4 := 115; F5 := 116; F6 := 117; F7 := 118; F8 := 119;
  616. Num0 := 96; Num1 := 97; Num2 := 98; Num3 := 99; Num4 := 100; Num5 := 101; Num6 := 102; Num7 := 103; Num8 := 104; Num9 := 105;
  617. ArrowLeft := 37; ArrowDown := 40; ArrowRight := 39; ArrowUp := 38; Ctrl := 17;
  618. end;
  619.  
  620. // Begin Main Loop
  621. begin
  622. Settings;
  623. if(FindWindowTitlePart('endless online', false)) then begin
  624. activateclient;
  625. end
  626. ClearDebug;
  627. Writeln('For MikeBot');
  628. Wait(1000);
  629. CheckLoggedOut;
  630.  
  631. repeat
  632. Movehome;
  633. //CheckTime;
  634. CheckDc;
  635. CheckTrackR;
  636. CheckTrackU;
  637. AutoPot2;
  638. AutoPot;
  639. Checkheal;
  640. CheckKS;
  641. Mage;
  642. CheckSides;
  643. CheckLoggedOut;
  644. Status;
  645. CheckDrop;
  646. Wait(100);
  647. until(false)
  648. KeyUp(Ctrl);
  649. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement