Guest User

Untitled

a guest
Feb 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.10 KB | None | 0 0
  1. program EObot;
  2. var x, y, MageKey, HealKey, Monster, Dragon, Biter, HitCount, AntiF, Monsters,
  3. Direction, TargetDirection, MoveDirection, SpeedKeyOne, SpeedKeyTwo, SpeedKeyThree:Integer;
  4. //Key Codes
  5. var F1, F2, F3, F4, F5, F6, F7, F8, Num0, Num1, Num2, Num3, Num4, Num5, Num6, Num7, Num8, Num9, ArrowLeft, ArrowDown, ArrowRight, ArrowUp:Integer;
  6. var KsDirection:String;
  7. const
  8. CharacterNum = '1';
  9. DelayUserInput = 'true'; // Wait extra time at login for lag
  10. {***************************}//Relog settings
  11. Username = 'user';
  12. Password = 'pass';
  13. {***************************}
  14. //Settings
  15. TrainSpot = 'dragons'; //dragons, other
  16. AntiRelog = 'true'; // Makes speed last longer
  17. 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)
  18. AntiFReset = 85; //Time before reloging if still attacking a single monster
  19. MonstersReset = 8; //Amount of monsters to kill before reloging.(Gets reset if you freeze)
  20. Archer = 'false'; //Not added yet, but will use range if true (for bows)
  21. //Healing settings
  22. Pots = 'herbs'; // herbs, small, med, large
  23. HeartsToPot = 9; // When hp is down to selected heart, Mikebot will pot.(cannot be 9, only 1-8)
  24. HerbsForFull = 180; // Amount of herbs to use when potting
  25. SmallsForFull = 10; //Amount of SMALL pots to use when potting(If Pots = 'small')
  26. SHeal = 'false'; // Speed heal (Self)
  27. //Mage settings
  28. MageEnabled = 'true'; // Fire/Thunder etc. (Also depends on what you have in the F key you set for "MageFKey")
  29. SpeedMage = 'false'; // Uses your Num3 hotkey to speed up maging, very helpful for ksers.
  30. //Hotkey settings
  31. HealFKey = 'F1'; //F1-F8
  32. MageFKey = 'F2'; //F1-F8
  33. SpeedKey1 = 'F6';
  34. SpeedKey2 = 'F5';
  35. SpeedKey3 = 'F7';
  36.  
  37. {#####Mini-Guide#####
  38. 1. Put your account details in the "Username" and "Password" single-quotes.(')
  39. 1.b. Make sure you have your Screen Resolution set to 32-bit.(Found in Control Panel)
  40. 2. Put the number of the character to auto with.('1', '2', '3')
  41. 3. Select the type of pots to use, you must have them in inv or it will log out.('herbs', 'small', 'med', 'large')
  42. 4. Set heal and mage to true/false if you want them on: true, off: false.
  43. 5. Set the Mage-F-Key and Heal-F-Key to a F key(F1-F8, "F" must be capital!)
  44. 6. Set your speed keys like so:
  45. HotKey 1: SpeedKey1 = 1 Green
  46. HotKey 2: SpeedKey2 = -2.29 Blue
  47. HotKey 3: SpeedKey3 = Any red speed(ex: +32 Red)
  48. Stepback etc doesn't matter, the only thing that matters is that your max speed is at least equal to the HotKey 3 speed.
  49. 7. If you haven't already get the "eo Client", this is needed for pots and monster finding.
  50. 8. Open "Date and Time Properties"(Or double-click your clock in the bottom-right corner.), set the time to 8:59:40 PM.
  51. 9. Open eobot client while time is still less than 9:00:00 PM, if not, change the time again.
  52. 10. Wait for the time to hit 9:00 PM while EO is open, then apply your EO Trainer hacks(Instant login is required for the login procedure)
  53. 11. Enjoy! All credits go to Renchy, nobody helped with this script, and I made it all from SCRATCH.
  54.  
  55. Procedure ReadString(str: String);
  56. var i,strLength :Integer; goer: Boolean;
  57. begin
  58. i:=1
  59. strLength:=Length(str)
  60. goer:=False
  61. while(i<strLength+1) do
  62. begin
  63. if(GetKeyCode(StrGet(str,i))=191)then
  64. begin
  65. KeyDown(16)
  66. goer:=True
  67. i:=i+1
  68. end;
  69. KeyDown(GetKeyCode(StrGet(str,i)))
  70. wait(25)
  71. KeyUp(GetKeyCode(StrGet(str,i)))
  72. wait(50)
  73. KeyUp(GetKeyCode(StrGet(str,i)))
  74. wait(25)
  75. i:=i+1
  76. if(goer=True)then
  77. begin
  78. KeyUp(16)
  79. wait(300)
  80. end;
  81. end;
  82. end;
  83. Procedure SetMageKey;
  84. begin
  85. if(MageFKey = 'F1') then begin MageKey := F1; end
  86. else if(MageFKey = 'F2') then begin MageKey := F2; end
  87. else if(MageFKey = 'F3') then begin MageKey := F3; end
  88. else if(MageFKey = 'F4') then begin MageKey := F4; end
  89. else if(MageFKey = 'F5') then begin MageKey := F5; end
  90. else if(MageFKey = 'F6') then begin MageKey := F6; end
  91. else if(MageFKey = 'F7') then begin MageKey := F7; end
  92. else if(MageFKey = 'F8') then begin MageKey := F8; end
  93. end;
  94. Procedure SetHealKey;
  95. begin
  96. if(HealFKey = 'F1') then begin HealKey := F1; end
  97. else if(HealFKey = 'F2') then begin HealKey := F2; end
  98. else if(HealFKey = 'F3') then begin HealKey := F3; end
  99. else if(HealFKey = 'F4') then begin HealKey := F4; end
  100. else if(HealFKey = 'F5') then begin HealKey := F5; end
  101. else if(HealFKey = 'F6') then begin HealKey := F6; end
  102. else if(HealFKey = 'F7') then begin HealKey := F7; end
  103. else if(HealFKey = 'F8') then begin HealKey := F8; end
  104. end;
  105. Procedure SetSpeedKeys;
  106. begin
  107. If(SpeedKey1 = 'Num1') then begin SpeedKeyOne := Num1; end
  108. else if(SpeedKey1 = 'Num2') then begin SpeedKeyOne := Num2; end
  109. else if(SpeedKey1 = 'Num3') then begin SpeedKeyOne := Num3; end
  110. else if(SpeedKey1 = 'Num4') then begin SpeedKeyOne := Num4; end
  111. else if(SpeedKey1 = 'Num5') then begin SpeedKeyOne := Num5; end
  112. else if(SpeedKey1 = 'Num6') then begin SpeedKeyOne := Num6; end
  113. else if(SpeedKey1 = 'Num7') then begin SpeedKeyOne := Num7; end
  114. else if(SpeedKey1 = 'Num8') then begin SpeedKeyOne := Num8; end
  115. else if(SpeedKey1 = 'Num9') then begin SpeedKeyOne := Num9; end
  116. else if(SpeedKey1 = 'F1') then begin SpeedKeyOne := F1; end
  117. else if(SpeedKey1 = 'F2') then begin SpeedKeyOne := F2; end
  118. else if(SpeedKey1 = 'F3') then begin SpeedKeyOne := F3; end
  119. else if(SpeedKey1 = 'F4') then begin SpeedKeyOne := F4; end
  120. else if(SpeedKey1 = 'F5') then begin SpeedKeyOne := F5; end
  121. else if(SpeedKey1 = 'F6') then begin SpeedKeyOne := F6; end
  122. else if(SpeedKey1 = 'F7') then begin SpeedKeyOne := F7; end
  123. else if(SpeedKey1 = 'F8') then begin SpeedKeyOne := F8; end
  124. If(SpeedKey2 = 'Num1') then begin SpeedKeyTwo := Num1; end
  125. else if(SpeedKey2 = 'Num2') then begin SpeedKeyTwo := Num2; end
  126. else if(SpeedKey2 = 'Num3') then begin SpeedKeyTwo := Num3; end
  127. else if(SpeedKey2 = 'Num4') then begin SpeedKeyTwo := Num4; end
  128. else if(SpeedKey2 = 'Num5') then begin SpeedKeyTwo := Num5; end
  129. else if(SpeedKey2 = 'Num6') then begin SpeedKeyTwo := Num6; end
  130. else if(SpeedKey2 = 'Num7') then begin SpeedKeyTwo := Num7; end
  131. else if(SpeedKey2 = 'Num8') then begin SpeedKeyTwo := Num8; end
  132. else if(SpeedKey2 = 'Num9') then begin SpeedKeyTwo := Num9; end
  133. else if(SpeedKey2 = 'F1') then begin SpeedKeyTwo := F1; end
  134. else if(SpeedKey2 = 'F2') then begin SpeedKeyTwo := F2; end
  135. else if(SpeedKey2 = 'F3') then begin SpeedKeyTwo := F3; end
  136. else if(SpeedKey2 = 'F4') then begin SpeedKeyTwo := F4; end
  137. else if(SpeedKey2 = 'F5') then begin SpeedKeyTwo := F5; end
  138. else if(SpeedKey2 = 'F6') then begin SpeedKeyTwo := F6; end
  139. else if(SpeedKey2 = 'F7') then begin SpeedKeyTwo := F7; end
  140. else if(SpeedKey2 = 'F8') then begin SpeedKeyTwo := F8; end
  141. If(SpeedKey3 = 'Num1') then begin SpeedKeyThree := Num1; end
  142. else if(SpeedKey3 = 'Num2') then begin SpeedKeyThree := Num2; end
  143. else if(SpeedKey3 = 'Num3') then begin SpeedKeyThree := Num3; end
  144. else if(SpeedKey3 = 'Num4') then begin SpeedKeyThree := Num4; end
  145. else if(SpeedKey3 = 'Num5') then begin SpeedKeyThree := Num5; end
  146. else if(SpeedKey3 = 'Num6') then begin SpeedKeyThree := Num6; end
  147. else if(SpeedKey3 = 'Num7') then begin SpeedKeyThree := Num7; end
  148. else if(SpeedKey3 = 'Num8') then begin SpeedKeyThree := Num8; end
  149. else if(SpeedKey3 = 'Num9') then begin SpeedKeyThree := Num9; end
  150. else if(SpeedKey3 = 'F1') then begin SpeedKeyThree := F1; end
  151. else if(SpeedKey3 = 'F2') then begin SpeedKeyThree := F2; end
  152. else if(SpeedKey3 = 'F3') then begin SpeedKeyThree := F3; end
  153. else if(SpeedKey3 = 'F4') then begin SpeedKeyThree := F4; end
  154. else if(SpeedKey3 = 'F5') then begin SpeedKeyThree := F5; end
  155. else if(SpeedKey3 = 'F6') then begin SpeedKeyThree := F6; end
  156. else if(SpeedKey3 = 'F7') then begin SpeedKeyThree := F7; end
  157. else if(SpeedKey3 = 'F8') then begin SpeedKeyThree := F8; end
  158. end;
  159. Procedure Click(x, y :Integer);
  160. begin
  161. Movemouse(x, y);
  162. ClickMouse(x, y, true);
  163. end;
  164. Procedure KeyDUp(Key :Byte);
  165. begin
  166. KeyDown(Key);
  167. Wait(10);
  168. KeyUp(Key);
  169. end;
  170. procedure HitSpeed;
  171. begin
  172. if(AntiRelog = 'true') then begin
  173. KeyDown(SpeedKeyTwo)
  174. Wait(5)
  175. KeyUp(SpeedKeyTwo)
  176. wait(5)
  177. KeyDown(SpeedKeyThree)
  178. Wait(5)
  179. KeyUp(SpeedKeyThree)
  180. Wait(3000)
  181. end
  182. else begin
  183. KeyDown(SpeedKeyThree)
  184. Wait(50)
  185. KeyUp(SpeedKeyThree)
  186. Wait(2000)
  187. end
  188. end;
  189. Procedure KeyUpAll;
  190. begin
  191. KeyUp(17); KeyUp(SpeedKeyOne); KeyUp(SpeedKeyTwo); KeyUp(SpeedKeyThree); Wait(20); KeyDUp(SpeedKeyOne);
  192. end;
  193. Procedure Turn;
  194. begin
  195. KeyUpAll;
  196. Wait(300);
  197. KeyDown(Direction);
  198. Wait(30);
  199. KeyUp(Direction);
  200. end;
  201. Procedure Login;
  202. begin
  203. Click(109, 368); // Click "Play Game"
  204. if(DelayUserInput = 'true') then begin
  205. Wait(1200);
  206. end
  207. else begin
  208. Wait(300);
  209. end
  210. ReadString(Username);
  211. Click(416, 388); // Click password textbox
  212. Wait(50); ReadString(Password);
  213. Click(403, 431); // Click "Connect"
  214. Wait(500);
  215. if(FindColor(x, y, 151294, 371, 320, 371, 320)) then begin // Check for "Login request denied", "Connection not found", "D/C" to retry
  216. Click(399, 322);
  217. Wait(100); Login;
  218. end
  219. if(FindColor(x, y, 151294, 370, 224, 371, 225)) then begin
  220. Click(395, 225);
  221. Wait(100); Login;
  222. end
  223. else begin // Click login on the character
  224. Wait(1500);
  225. KeyDUp(SpeedKeyOne);
  226. repeat
  227. KeyDown(GetKeyCode(CharacterNum));
  228. Wait(10);
  229. KeyUp(GetKeyCode(CharacterNum));
  230. Wait(10);
  231. until(FindColor(x, y, 229629, 343, 74, 344, 75) = false)
  232. Wait(50);
  233. Click(79, 366);
  234. end
  235. // Check if stuck at login screen(Not needed until a problem)
  236. end;
  237. Procedure CheckDc;
  238. begin
  239. if(FindColor(x, y, 151294, 370, 225, 371, 226)) then begin
  240. KeyUpAll;
  241. Click(x, y);
  242. Login;
  243. end
  244. end;
  245. Procedure Logout;
  246. begin
  247. Click(599, 48);
  248. Click(323, 225);
  249. end;
  250. Procedure Relog;
  251. begin
  252. Logout;
  253. Login;
  254. Monsters := MonstersReset;
  255. AntiF := AntiFReset;
  256. HitCount := HitCountReset;
  257. end;
  258. Procedure SMage;
  259. begin
  260. if(TrainSpot = 'other') then begin
  261. if((MageEnabled = 'true') and (FindColor(x, y, 657930, 238, 34, 239, 35) = false)) then begin
  262. if(FindColor(x, y, Monster, 7, 34, 630, 337)) then begin
  263. clickmouse(80, 446, true);
  264. KeyDown(SpeedKeyThree);
  265. Wait(100);
  266. KeyDown(MageKey);
  267. Wait(60);
  268. KeyUp(MageKey);
  269. Wait(60);
  270. ClickMouse(x, y, true);
  271. Wait(4000);
  272. KeyUpAll;
  273. Wait(100);
  274. end
  275. end
  276. end
  277. else begin
  278. if((MageEnabled = 'true') and (FindColor(x, y, 657930, 238, 34, 239, 35) = false)) then begin
  279. if(FindColor(x, y, Biter, 7, 34, 630, 337)) then begin
  280. clickmouse(80, 446, true);
  281. KeyDown(SpeedKeyThree);
  282. Wait(100);
  283. KeyDown(MageKey);
  284. Wait(60);
  285. KeyUp(MageKey);
  286. Wait(60);
  287. ClickMouse(x, y, true);
  288. Wait(3000);
  289. KeyUpAll;
  290. Wait(100);
  291. end
  292. end
  293. end
  294. end;
  295. Procedure Mage;
  296. begin
  297. if(SpeedMage = 'true') then begin
  298. SMage;
  299. end
  300. else begin
  301. if(TrainSpot = 'other') then begin
  302. if((MageEnabled = 'true') and (FindColor(x, y, 657930, 238, 34, 239, 35) = false)) then begin
  303. if(FindColor(x, y, Monster, 7, 34, 630, 337)) then begin
  304. clickmouse(80, 446, true);
  305. KeyDown(MageKey);
  306. Wait(20);
  307. KeyUp(MageKey);
  308. Wait(10);
  309. MoveMouseSmooth(x, y); Wait(1); ClickMouse(x, y, true);
  310. Wait(1700);
  311. end
  312. end
  313. end
  314. else begin
  315. if((MageEnabled = 'true') and (FindColor(x, y, 657930, 238, 34, 239, 35) = false)) then begin
  316. if(FindColor(x, y, Biter, 7, 34, 630, 337)) then begin
  317. clickmouse(80, 446, true);
  318. KeyDown(MageKey);
  319. Wait(20);
  320. KeyUp(MageKey);
  321. Wait(10);
  322. MoveMouseSmooth(x, y); Wait(1); ClickMouse(x, y, true);
  323. Wait(300);
  324. end
  325. end
  326. end
  327. end
  328. end;
  329. Procedure AutoPot;//AutoHerbage
  330. var herbers, smalls, Xhp, TimesBy, Herts:Integer;
  331. begin
  332. herbers := HerbsForFull;
  333. smalls := SmallsForFull;
  334. Herts := HeartsToPot;
  335. TimesBy := 8 * Herts;
  336. Xhp := 128 + TimesBy;
  337. if(FindColor(x, y, 657930, Xhp, 33, Xhp, 34)) then begin
  338. Click(81, 366);
  339. Wait(200);
  340. if FindColor(x, y, 33792, 115, 365, 476, 467)then begin
  341. repeat
  342. checkDc;
  343. Click(x, y);Wait(30);Click(x, y);
  344. CheckDc;
  345. until ((findcolor(x,y,9408511,201,31,201,38)=true));
  346. CheckDc;
  347. end end
  348. end;
  349. Procedure AutoPots;
  350. Begin
  351. if(FindColor(x, y, 657930, 129, 33, 145, 34)) then begin
  352. Click(81, 366);
  353. Wait(200);
  354. if FindColor(x, y, 16711812, 115, 365, 476, 467)then begin
  355. Click(x, y);
  356. Wait(8);
  357. Click(x, y);
  358. Wait(10)
  359. end end
  360. end;
  361.  
  362. Procedure Status;
  363. begin
  364. if(FindWindowTitlePart('endless online', false)) then begin
  365. activateclient;
  366. end
  367. cleardebug;
  368. writeln('');
  369. writeln('');
  370. writeln('Monsters: '+ inttostr(Monsters) + ' | HitCount: '+ inttostr(HitCount) + ' | AntiFreeze: ' + inttostr(AntiF));
  371. end;
  372. Procedure MonsterCounter;
  373. begin
  374. Monsters := Monsters - 1;
  375. Status
  376. if(Monsters <= 0) then begin
  377. KeyUpAll;
  378. Wait(30);
  379. Relog;
  380. end
  381. end;
  382. Procedure AntiFreeze;
  383. begin
  384. AntiF := AntiF - 1;
  385. Status;
  386. if(AntiF <= 0) then begin
  387. KeyUpAll;
  388. Wait(10);
  389. Relog;
  390. Wait(20);
  391. keyDown(17);
  392. Wait(20);
  393. end
  394. end;
  395. Procedure DoHitCount;
  396. begin
  397. HitCount := HitCount - 1;
  398. if(HitCount <= 0) then begin
  399. KeyUpAll; Wait(50); Direction := TargetDirection;
  400. Wait(500);
  401. 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
  402. Turn;
  403. HitCount := HitCountReset;
  404. KeyDown(17);
  405. end
  406. else if(((Direction = ArrowLeft) and FindColor(x, y, Dragon, 270, 163, 298, 178)) or ((Direction = ArrowDown) and FindColor(x, y, Dragon, 285, 200, 299, 209)) or ((Direction = ArrowRight) and FindColor(x, y, Dragon, 341, 189, 364, 208)) or ((Direction = ArrowUp) and FindColor(x, y, Dragon, 341, 162, 362, 176))) then begin
  407. Turn;
  408. HitCount := HitCountReset;
  409. KeyDown(17);
  410. end
  411. end
  412. end;
  413. Procedure Left;
  414. begin
  415. if(TrainSpot = 'other') then begin
  416. If (FindColor(x, y, Monster, 274, 163, 298, 178)) then begin
  417. TargetDirection := ArrowLeft;
  418. if((Direction = TargetDirection) = false) then begin
  419. Direction := ArrowLeft;
  420. Turn;
  421. end
  422. Wait(50);
  423. KeyDown(17);
  424. Wait(200);
  425. repeat
  426. AutoPot;
  427. HitSpeed;
  428. AntiFreeze;
  429. Autopots;
  430. DoHitCount;
  431. until((FindColor(x, y, Monster, 274, 163, 298, 178) = false) or (FindColor(x, y, 888, 313, 490, 313, 490)))
  432. HitCount := HitCountReset;
  433. AntiF := AntiFReset;
  434. KeyUpAll;
  435. if(FindColor(x, y, 888, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
  436. KsDirection := 'Left';
  437. end
  438. else begin
  439. MonsterCounter;
  440. end
  441. end
  442. end
  443. else if(TrainSpot = 'dragons') then begin
  444. If (FindColor(x, y, Dragon, 274, 171, 294, 172)) then begin
  445. TargetDirection := ArrowLeft;
  446. if((Direction = TargetDirection) = false) then begin
  447. Direction := ArrowLeft;
  448. Turn;
  449. end
  450. Wait(50);
  451. KeyDown(17);
  452. Wait(200);
  453. repeat
  454. AutoPot;
  455. HitSpeed;
  456. AntiFreeze;
  457. Autopots;
  458. DoHitCount;
  459. until(FindColor(x, y, Dragon, 274, 171, 294, 172) = false)
  460. HitCount := HitCountReset;
  461. AntiF := AntiFReset;
  462. MonsterCounter;
  463. KeyUpAll;
  464. end
  465. end
  466. end;
  467. Procedure Down;
  468. begin
  469. if(TrainSpot = 'other') then begin
  470. If (FindColor(x, y, Monster, 272, 188, 295, 197)) then begin
  471. TargetDirection := ArrowDown;
  472. if((Direction = TargetDirection) = false) then begin
  473. Direction := ArrowDown;
  474. Turn;
  475. end
  476. Wait(50);
  477. KeyDown(17);
  478. Wait(200);
  479. repeat
  480. AutoPot;
  481. HitSpeed;
  482. AntiFreeze;
  483. Autopots;
  484. DoHitCount;
  485. until((FindColor(x, y, Monster, 272, 188, 295, 197) = false) or (FindColor(x, y, 888, 313, 490, 313, 490)))
  486. HitCount := HitCountReset;
  487. AntiF := AntiFReset;
  488. KeyUpAll;
  489. if(FindColor(x, y, 888, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
  490. KsDirection := 'Down';
  491. end
  492. else begin
  493. MonsterCounter;
  494. end
  495. end
  496. end
  497. else if(TrainSpot = 'dragons') then begin
  498. If (FindColor(x, y, Dragon, 273, 200, 293, 203)) then begin
  499. TargetDirection := ArrowDown;
  500. if((Direction = TargetDirection) = false) then begin
  501. Direction := ArrowDown;
  502. Turn;
  503. end
  504. Wait(50);
  505. KeyDown(17);
  506. Wait(200);
  507. repeat
  508. AutoPot;
  509. HitSpeed;
  510. AntiFreeze;
  511. Autopots;
  512. DoHitCount;
  513. until(FindColor(x, y, Dragon, 273, 200, 293, 203) = false)
  514. HitCount := HitCountReset;
  515. AntiF := AntiFReset;
  516. MonsterCounter;
  517. KeyUpAll;
  518. end
  519. end
  520. end;
  521. Procedure Right;
  522. begin
  523. if(TrainSpot = 'other') then begin
  524. If (FindColor(x, y, Monster, 332, 187, 360, 200)) then begin
  525. TargetDirection := ArrowRight;
  526. if((Direction = TargetDirection) = false) then begin
  527. Direction := ArrowRight;
  528. Turn;
  529. end
  530. Wait(50);
  531. KeyDown(17);
  532. Wait(200);
  533. repeat
  534. AutoPot;
  535. HitSpeed;
  536. AntiFreeze;
  537. Autopots;
  538. DoHitCount;
  539. until((FindColor(x, y, Monster, 332, 187, 360, 200) = false) or (FindColor(x, y, 888, 313, 490, 313, 490)))
  540. HitCount := HitCountReset;
  541. AntiF := AntiFReset;
  542. KeyUpAll;
  543. if(FindColor(x, y, 888, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
  544. KsDirection := 'Right';
  545. end
  546. else begin
  547. MonsterCounter;
  548. end
  549. end
  550. end
  551. else if(TrainSpot = 'dragons') then begin
  552. If (FindColor(x, y, Dragon, 341, 200, 362, 203)) then begin
  553. TargetDirection := ArrowRight;
  554. if((Direction = TargetDirection) = false) then begin
  555. Direction := ArrowRight;
  556. Turn;
  557. end
  558. Wait(50);
  559. KeyDown(17);
  560. Wait(200);
  561. repeat
  562. AutoPot;
  563. HitSpeed;
  564. AntiFreeze;
  565. Autopots;
  566. DoHitCount;
  567. until(FindColor(x, y, Dragon, 341, 200, 362, 203) = false)
  568. HitCount := HitCountReset;
  569. AntiF := AntiFReset;
  570. MonsterCounter;
  571. KeyUpAll;
  572. end
  573. end
  574. end;
  575. Procedure Up;
  576. begin
  577. if(TrainSpot = 'other') then begin
  578. If (FindColor(x, y, Monster, 335, 164, 358, 176)) then begin
  579. TargetDirection := ArrowUp;
  580. if((Direction = TargetDirection) = false) then begin
  581. Direction := ArrowUp;
  582. Turn;
  583. end
  584. Wait(50);
  585. KeyDown(17);
  586. Wait(200);
  587. repeat
  588. AutoPot;
  589. HitSpeed;
  590. AntiFreeze;
  591. Autopots;
  592. DoHitCount;
  593. until((FindColor(x, y, Monster, 335, 164, 358, 176) = false) or (FindColor(x, y, 888, 313, 490, 313, 490)))
  594. HitCount := HitCountReset;
  595. AntiF := AntiFReset;
  596. KeyUpAll;
  597. if(FindColor(x, y, 888, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
  598. KsDirection := 'Up';
  599. end
  600. else begin
  601. MonsterCounter;
  602. end
  603. end
  604. end
  605. else if(TrainSpot = 'dragons') then begin
  606. If (FindColor(x, y, Dragon, 344, 168, 364, 171)) then begin
  607. TargetDirection := ArrowUp;
  608. if((Direction = TargetDirection) = false) then begin
  609. Direction := ArrowUp;
  610. Turn;
  611. end
  612. Wait(50);
  613. KeyDown(17);
  614. Wait(200);
  615. repeat
  616. AutoPot;
  617. HitSpeed;
  618. AntiFreeze;
  619. Autopots;
  620. DoHitCount;
  621. until(FindColor(x, y, Dragon, 344, 168, 364, 171) = false)
  622. HitCount := HitCountReset;
  623. AntiF := AntiFReset;
  624. MonsterCounter;
  625. KeyUpAll;
  626. end
  627. end
  628. end;
  629. Procedure CheckSides;
  630. begin
  631. if(KsDirection = 'Left') then begin
  632. Down;
  633. Right;
  634. Up;
  635. Left;
  636. end
  637. else if(KsDirection = 'Down') then begin
  638. Left;
  639. Right;
  640. Up;
  641. Down;
  642. end
  643. else if(KsDirection = 'Right') then begin
  644. Left;
  645. Down;
  646. Up;
  647. Right;
  648. end
  649. else begin
  650. Left;
  651. Down;
  652. Right;
  653. Up;
  654. end
  655. end;
  656. Procedure CheckTop;
  657. begin
  658. if(TrainSpot = 'dragons') then begin
  659. if(FindColor(x, y, Dragon, 307, 183, 330, 185)) then begin
  660. Turn;
  661. MoveDirection := Direction;
  662. Wait(1000);
  663. end
  664. end
  665. else begin
  666. if(FindColor(x, y, Monster, 309, 174, 330, 185)) then begin
  667. Turn;
  668. MoveDirection := Direction;
  669. Wait(500);
  670. end
  671. end
  672. end;
  673. Procedure CheckDrop;
  674. begin
  675. if(FindColor(x, y, 151294, 265, 236, 266, 237)) then begin
  676. Click(392, 238);
  677. Wait(500);
  678. end
  679. end;
  680. Procedure MoveHome;
  681. begin
  682. if((FindColor(x, y, Monster, 7, 34, 630, 337) = false) and (FindColor(x, y, Dragon, 7, 34, 630, 337) = false) and (FindColor(x, y, Biter, 7, 34, 630, 337) = false)) then begin
  683. if(MoveDirection = ArrowLeft) then begin
  684. Wait(1000);
  685. if(Direction = MoveDirection) then begin
  686. Turn;
  687. end
  688. else begin
  689. Direction := ArrowRight;
  690. Turn;
  691. Turn;
  692. end
  693. MoveDirection := 0;
  694. end
  695. else if(MoveDirection = ArrowDown) then begin
  696. Wait(1000);
  697. if(Direction = MoveDirection) then begin
  698. Turn;
  699. end
  700. else begin
  701. Direction := ArrowUp;
  702. Turn;
  703. Turn;
  704. end
  705. MoveDirection := 0;
  706. end
  707. else if(MoveDirection = ArrowRight) then begin
  708. Wait(1000);
  709. if(Direction = MoveDirection) then begin
  710. Turn;
  711. end
  712. else begin
  713. Direction := ArrowLeft;
  714. Turn;
  715. Turn;
  716. end
  717. MoveDirection := 0;
  718. end
  719. else if(MoveDirection = ArrowUp) then begin
  720. Wait(1000);
  721. if(Direction = MoveDirection) then begin
  722. Turn;
  723. end
  724. else begin
  725. Direction := ArrowDown;
  726. Turn;
  727. Turn;
  728. end
  729. MoveDirection := 0;
  730. end
  731. end
  732. end;
  733. procedure CheckTime;
  734. var t: TDateTime; Hour, Minutes, Seconds, FullTime:string;
  735. begin
  736. t:=time;
  737. FullTime:= formatdatetime('hh:mmam/pm', t);
  738. Hour:= formatdatetime('hham/pm', t);
  739. Minutes:= formatdatetime('nn', t);
  740. Seconds:= formatdatetime('ss', t);
  741. if(Hour = '11pm') then begin
  742. Writeln('Time needs changing, changing time and reloging(Make sure you have opened EO before 9pm!)');
  743. if(FindWindowTitlePart('date and time properties', false)) then begin
  744. activateclient;
  745. end
  746. Wait(300);
  747. ClickMouse(261, 239, true);
  748. Wait(10);
  749. ClickMouse(261, 239, true);
  750. Wait(500);
  751. KeyDown(GetKeyCode('9'));
  752. Wait(10);
  753. KeyUp(GetKeyCode('9'));
  754. Wait(500);
  755. ClickMouse(357, 326, true);
  756. Wait(300);
  757. Status;
  758. Relog;
  759. end
  760. else if((Hour = '12pm') or (Hour = '1pm') or (Hour = '2pm') or (Hour = '3pm') or (Hour = '4pm') or (Hour = '5pm') or (Hour = '6pm') or (Hour = '7pm') or (Hour = '8pm')) then begin
  761. Writeln('Time needs changing, changing time and reloging(Make sure you have opened EO before 9pm!)');
  762. if(FindWindowTitlePart('date and time properties', false)) then begin
  763. activateclient;
  764. end
  765. Wait(300);
  766. ClickMouse(261, 239, true);
  767. Wait(10);
  768. ClickMouse(261, 239, true);
  769. Wait(500);
  770. KeyDown(GetKeyCode('9'));
  771. Wait(10);
  772. KeyUp(GetKeyCode('9'));
  773. Wait(500);
  774. ClickMouse(357, 326, true);
  775. Wait(300);
  776. Status;
  777. Relog;
  778. end
  779. else if((Hour = '12am') or (Hour = '1am') or (Hour = '2am') or (Hour = '3am') or (Hour = '4am') or (Hour = '5am') or (Hour = '6am') or (Hour = '7am') or (Hour = '8am') or (Hour = '9am') or (Hour = '10am') or (Hour = '11am')) then begin
  780. Writeln('Time needs changing, changing time and reloging(Make sure you have opened EO before 9pm!)');
  781. if(FindWindowTitlePart('date and time properties', false)) then begin
  782. activateclient;
  783. end
  784. Wait(300);
  785. ClickMouse(261, 239, true);
  786. Wait(10);
  787. ClickMouse(261, 239, true);
  788. Wait(500);
  789. KeyDown(GetKeyCode('9'));
  790. Wait(10);
  791. KeyUp(GetKeyCode('9'));
  792. Wait(500);
  793. ClickMouse(316, 240, true);
  794. wait(100);
  795. ClickMouse(347, 233, true);
  796. Wait(200);
  797. ClickMouse(357, 326, true);
  798. Wait(300);
  799. Status;
  800. Relog;
  801. end
  802. end;
  803. Procedure CheckLoggedOut;
  804. begin
  805. if(FindColor(x, y, 8355711, 36, 66, 37, 67)) then begin
  806. Login;
  807. end
  808. end;
  809. Procedure SpeedHeal;
  810. begin
  811. if(FindColor(x, y, 657930, 187, 33, 188, 34) and (SHeal = 'true') and (FindColor(x, y, 657930, 238, 34, 239, 35) = false)) then begin
  812. KeyDown(SpeedKeyThree);
  813. Wait(100);
  814. KeyDown(HealKey);
  815. Wait(60);
  816. KeyUp(HealKey);
  817. Wait(4000);
  818. KeyUpAll;
  819. Wait(200);
  820. end
  821. end;
  822.  
  823. Procedure Settings;
  824. begin
  825. //Do not touch anything below unless you know what you're doing
  826. HitCount := HitCountReset;
  827. AntiF := AntiFReset;
  828. Monsters := MonstersReset;
  829. Direction := 0;
  830. Monster := 1638350;
  831. Dragon := 9880721;
  832. Biter := 5882430;
  833. F1 := 112; F2 := 113; F3 := 114; F4 := 115; F5 := 116; F6 := 117; F7 := 118; F8 := 119;
  834. Num0 := 96; Num1 := 97; Num2 := 98; Num3 := 99; Num4 := 100; Num5 := 101; Num6 := 102; Num7 := 103; Num8 := 104; Num9 := 105;
  835. ArrowLeft := 37; ArrowDown := 40; ArrowRight := 39; ArrowUp := 38;
  836. SetMageKey;
  837. SetHealKey;
  838. SetSpeedKeys;
  839. end;
  840. // Begin Main Loop
  841. begin
  842. Settings;
  843. if(FindWindowTitlePart('endless online', false)) then begin
  844. activateclient;
  845. end
  846. else begin
  847. Writeln('Endless Online isn''t open or is minimized, please check and try again.');
  848. end
  849. ClearDebug;
  850. Writeln('eobot - By Renchy');
  851. Wait(1000);
  852. if(FindColor(x, y, 8355711, 37, 68, 38, 69)) then begin
  853. Login;
  854. end
  855. repeat
  856. CheckTime;
  857. CheckDc;
  858. AutoPot;
  859. Autopots;
  860. CheckSides;
  861. Mage;
  862. CheckTop;
  863. MoveHome;
  864. SpeedHeal;
  865. CheckDrop;
  866. CheckLoggedOut;
  867. Status;
  868. Wait(10);
  869. until(false)
  870. KeyUpAll;
  871. end.
Add Comment
Please, Sign In to add comment