Advertisement
Guest User

Untitled

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