Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program Mikebot_v8; // by Thehispanic/Gangstamikey - April 11, 2011
- var x, y, MageKey, HealKey, Monster, HitCount, AntiF, Monsters, Direction, TargetDirection, MoveDirection, PotsUsed:Integer;
- //Key Codes
- 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;
- var KsDirection:String;
- constprogram Mikebot_v8; // by Thehispanic/Gangstamikey - April 11, 2011
- var x, y, MageKey, HealKey, Monster, HitCount, AntiF, Monsters, Direction, TargetDirection, MoveDirection, PotsUsed:Integer;
- //Key Codes
- 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;
- var KsDirection:String;
- const
- //Relog settings
- Username = 'no-name';
- Password = 'No-Name';
- CharacterNum = '1';
- DelayUserInput = 'true'; // Wait extra at login, for lag
- //General Settings
- 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)
- AntiFReset = 60; //Time before reloging if still attacking a single monster
- Archer = 'false'; //Not added yet, but will use range if true
- //Healing settings
- Pots = 'normal'; // herbs, normal
- HealType = 'none'; // self, clickheal (none = off/no healing)
- //HeartsToPot = 5; // When hp is down to selected heart, Mikebot will pot.(cannot be 9, only 1-8)
- HerbsForFull = 50; // Amount of herbs to use when potting
- //Mage settings
- MageEnabled = 'true'; // Fire/Thunder etc. (Also depends on what you have in the F key you set for "MageFKey")
- //Spell Hotkey settings
- HealFKey = 'F2'; //F1-F8
- MageFKey = 'F3'; //F1-F8
- {#####Mini-Guide#####
- 1. Put your account details in the "Username" and "Password" single-quotes.(')
- 1.b. Make sure you have your color set to 32-bit for XP, 16-bit for Vista/Win7.(Found in Control Panel)
- 2. Put the number of the character to auto with.('1', '2', '3')
- 3. Select the type of pots to use, you must have them in inv or it will log out.('herbs', 'small', 'med', 'large')
- 4. Set heal and mage to true/false if you want them on: true, off: false.
- 5. Set the Mage-F-Key and Heal-F-Key to a F key(F1-F8, "F" must be capital!)
- Enjoy! All credits go to Thehispanic/Gangstamikey}
- Procedure ReadString(str: String);
- var i,strLength :Integer; goer: Boolean;
- begin
- i:=1
- strLength:=Length(str)
- goer:=False
- while(i<strLength+1) do
- begin
- if(GetKeyCode(StrGet(str,i))=191)then
- begin
- KeyDown(16)
- goer:=True
- i:=i+1
- end;
- KeyDown(GetKeyCode(StrGet(str,i)))
- wait(25)
- KeyUp(GetKeyCode(StrGet(str,i)))
- wait(50)
- KeyUp(GetKeyCode(StrGet(str,i)))
- wait(25)
- i:=i+1
- if(goer=True)then
- begin
- KeyUp(16)
- wait(300)
- end;
- end;
- end;
- Procedure SetMageKey;
- begin
- if(MageFKey = 'F1') then begin MageKey := F1; end
- else if(MageFKey = 'F2') then begin MageKey := F2; end
- else if(MageFKey = 'F3') then begin MageKey := F3; end
- else if(MageFKey = 'F4') then begin MageKey := F4; end
- else if(MageFKey = 'F5') then begin MageKey := F5; end
- else if(MageFKey = 'F6') then begin MageKey := F6; end
- else if(MageFKey = 'F7') then begin MageKey := F7; end
- else if(MageFKey = 'F8') then begin MageKey := F8; end
- writeln('Mage key set.');
- end;
- Procedure SetHealKey;
- begin
- if(HealFKey = 'F1') then begin HealKey := F1; end
- else if(HealFKey = 'F2') then begin HealKey := F2; end
- else if(HealFKey = 'F3') then begin HealKey := F3; end
- else if(HealFKey = 'F4') then begin HealKey := F4; end
- else if(HealFKey = 'F5') then begin HealKey := F5; end
- else if(HealFKey = 'F6') then begin HealKey := F6; end
- else if(HealFKey = 'F7') then begin HealKey := F7; end
- else if(HealFKey = 'F8') then begin HealKey := F8; end
- writeln('Heal key set.');
- end;
- Procedure Click(x, y :Integer);
- begin
- Movemouse(x, y);
- ClickMouse(x, y, true);
- end;
- Procedure KeyDUp(Key :Byte);
- begin
- KeyDown(Key);
- Wait(10);
- KeyUp(Key);
- end;
- Procedure Turn;
- begin
- KeyUp(Ctrl);
- Wait(100);
- KeyDown(Direction);
- Wait(100);
- KeyUp(Direction);
- end;
- Procedure Login;
- begin
- writeln('Logging in.');
- if(FindColor(x, y, 10276608, 362, 314, 437, 332)) then begin // Check for "Login request denied", "Connection not found", "D/C" to retry
- ClickMouse(399, 322, true);
- Wait(100); Login;
- end
- ClickMouse(109, 368, true); // Click "Play Game"
- repeat
- Wait(100);
- until(FindColor(x, y, 255, 470, 328, 545, 340) or FindColor(x, y, 10276608, 362, 314, 437, 332))
- if(DelayUserInput = 'true') then begin Wait(1200); end else begin Wait(300); end
- ReadString(Username);
- ClickMouse(416, 388, true); // Click password textbox
- Wait(50); ReadString(Password);
- ClickMouse(403, 431, true); // Click "Connect"
- Wait(500);
- if(FindColor(x, y, 10276608, 362, 314, 437, 332)) then begin // Check for "Login request denied", "Connection not found", "D/C" to retry
- ClickMouse(399, 322, true);
- Wait(100); Login;
- end
- //Pause till login screen
- repeat
- Wait(500);
- until(FindColor(x, y, 255, 338, 168, 353, 185) or FindColor(x, y, 10276608, 362, 314, 437, 332))
- // Click login on the character
- repeat
- KeyDown(GetKeyCode(CharacterNum));
- Wait(10);
- KeyUp(GetKeyCode(CharacterNum));
- Wait(10);
- until(FindColor(x, y, 255, 338, 168, 353, 185) = false)
- Wait(500);
- ClickMouse(79, 366, true);
- // Check if stuck at login screen(Not needed until a problem)
- end;
- Procedure CheckDc;
- begin
- if(FindColor(x, y, 10276608, 357, 217, 437, 239)) then begin
- KeyUp(Ctrl);
- Click(x, y);
- Login;
- end
- if(FindColor(x, y, 10276608, 413, 301, 492, 321)) then begin // Paperdoll
- Click(451, 311);
- end
- if(FindColor(x, y, 6514175, 355, 215, 440, 239)) then begin // Exit game box
- Click(396, 228);
- end
- end;
- Procedure Relog;
- begin
- Click(599, 48);
- Click(323, 225);// Logout
- Login;
- AntiF := AntiFReset;
- HitCount := HitCountReset;
- end;
- Procedure Mage;
- begin
- if((MageEnabled = 'true') and (FindColor(x, y, 6500574, 235, 38, 236, 38) = false)) then begin
- if(FindColor(x, y, Monster, 12, 49, 626, 336)) then begin
- writeln('Engaging Mage on monster at '+ inttostr(x) +', '+ inttostr(y) +'.');
- KeyDown(MageKey);
- Wait(20);
- KeyUp(MageKey);
- Wait(10);
- MoveMouseSmooth(x, y); Wait(1); ClickMouse(x, y, true);
- Wait(2000); //1700
- end
- end
- end;
- Procedure Heal;
- begin
- 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
- if(HealType = 'self') then begin
- KeyDown(HealKey);
- Wait(30);
- KeyUp(HealKey);
- Wait(1000);
- end
- else if(HealType = 'clickheal') then begin
- KeyDown(HealKey);
- Wait(30);
- KeyUp(HealKey);
- Wait(10);
- MoveMouseSmooth(317, 188); Wait(1); ClickMouse(317, 188, true);
- Wait(2000); //1700
- end
- end
- end;
- Procedure AutoPot;
- var herbers, Xhp, TimesBy, Herts:Integer;
- begin
- herbers := HerbsForFull;
- //Herts := HeartsToPot;
- ///TimesBy := 8 * Herts;
- //Xhp := 128 + TimesBy;
- if(FindColor(x, y, 16236180, 163, 38, 164, 39)) then begin
- Click(81, 366);
- Wait(200);
- if((Pots = 'herbs') and FindColor(x, y, 33792, 115, 365, 476, 467)) then begin
- repeat
- herbers := herbers -1;
- Click(x, y);
- Wait(8);
- Click(x, y);
- Wait(10);
- CheckDc;
- until(herbers <= 0)
- end
- else if((Pots = 'normal') and FindColor(x, y, 33412, 115, 365, 476, 467)) then begin
- Click(x, y);
- Wait(8);
- Click(x, y);
- Wait(200);
- Potsused := PotsUsed + 1;
- end
- if(FindColor(x, y, 657930, 238, 34, 239, 35)) then begin // check TP
- Click(81, 366);
- Wait(100);
- if(FindColor(x, y, 16711812, 115, 365, 476, 467)) then begin
- Click(x, y);
- Wait(8);
- Click(x, y);
- Wait(10);
- end
- end
- end
- end;
- Procedure Status;
- begin
- if(FindWindowTitlePart('endless online', false)) then begin
- activateclient;
- end
- cleardebug;
- writeln('');
- writeln('');
- writeln('');
- writeln('');
- writeln('');
- writeln('');
- writeln('Monsters killed: '+ inttostr(Monsters) +' | HitCount: '+ inttostr(HitCount) + ' | AntiFreeze: ' + inttostr(AntiF) +' | Pots Used: '+ inttostr(PotsUsed));
- end;
- Procedure AntiFreeze;
- begin
- AntiF := AntiF - 1;
- Status;
- if(AntiF <= 0) then begin
- writeln('Frozen or some shit, time to relog.');
- KeyUp(Ctrl);
- Wait(10);
- Relog;
- Wait(20);
- keyDown(17);
- Wait(20);
- end
- end;
- Procedure DoHitCount;
- begin
- HitCount := HitCount - 1;
- if(HitCount <= 0) then begin
- KeyUp(Ctrl); Wait(50); Direction := TargetDirection;
- Wait(500);
- 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
- writeln('Turning to monster again, maybe I''m hitting in the wrong direction.');
- Turn;
- HitCount := HitCountReset;
- KeyDown(17);
- end
- end
- end;
- Procedure Left;
- begin
- If (FindColor(x, y, Monster, 274, 163, 298, 178)) then begin
- writeln('Engaging Melee on monster on the Left');
- TargetDirection := ArrowLeft;
- if((Direction = TargetDirection) = false) then begin
- Direction := ArrowLeft;
- Turn;
- end
- Wait(50);
- KeyDown(17);
- Wait(200);
- repeat
- AutoPot;
- AntiFreeze;
- DoHitCount;
- Wait(500);
- until((FindColor(x, y, Monster, 274, 163, 298, 178) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
- HitCount := HitCountReset;
- AntiF := AntiFReset;
- KeyUp(Ctrl);
- Wait(500);
- if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
- KsDirection := 'Left';
- end
- else begin
- Monsters := Monsters + 1;
- end
- end
- end;
- Procedure Down;
- begin
- If (FindColor(x, y, Monster, 271, 189, 305, 195)) then begin
- writeln('Engaging Melee on monster on the Bottom');
- TargetDirection := ArrowDown;
- if((Direction = TargetDirection) = false) then begin
- Direction := ArrowDown;
- Turn;
- end
- Wait(50);
- KeyDown(17);
- Wait(200);
- repeat
- AutoPot;
- AntiFreeze;
- DoHitCount;
- Wait(500);
- until((FindColor(x, y, Monster, 271, 189, 305, 195) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
- HitCount := HitCountReset;
- AntiF := AntiFReset;
- KeyUp(Ctrl);
- Wait(500);
- if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
- KsDirection := 'Down';
- end
- else begin
- Monsters := Monsters + 1;
- end
- end
- end;
- Procedure Right;
- begin
- If (FindColor(x, y, Monster, 332, 187, 360, 200)) then begin
- writeln('Engaging Melee on monster on the Right');
- TargetDirection := ArrowRight;
- if((Direction = TargetDirection) = false) then begin
- Direction := ArrowRight;
- Turn;
- end
- Wait(50);
- KeyDown(17);
- Wait(200);
- repeat
- AutoPot;
- AntiFreeze;
- DoHitCount;
- Wait(500);
- until((FindColor(x, y, Monster, 332, 187, 360, 200) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
- HitCount := HitCountReset;
- AntiF := AntiFReset;
- KeyUp(Ctrl);
- Wait(500);
- if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
- KsDirection := 'Right';
- end
- else begin
- Monsters := Monsters + 1;
- end
- end
- end;
- Procedure Up;
- begin
- If (FindColor(x, y, Monster, 335, 164, 358, 176)) then begin
- writeln('Engaging Melee on monster on the Top');
- TargetDirection := ArrowUp;
- if((Direction = TargetDirection) = false) then begin
- Direction := ArrowUp;
- Turn;
- end
- Wait(50);
- KeyDown(17);
- Wait(200);
- repeat
- AutoPot;
- AntiFreeze;
- DoHitCount;
- Wait(500);
- until((FindColor(x, y, Monster, 335, 164, 358, 176) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
- HitCount := HitCountReset;
- AntiF := AntiFReset;
- KeyUp(Ctrl);
- Wait(500);
- if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
- KsDirection := 'Up';
- end
- else begin
- Monsters := Monsters + 1;
- end
- end
- end;
- Procedure CheckSides;
- begin
- if(KsDirection = 'Left') then begin
- Down;
- Right;
- Up;
- Left;
- end
- else if(KsDirection = 'Down') then begin
- Left;
- Right;
- Up;
- Down;
- end
- else if(KsDirection = 'Right') then begin
- Left;
- Down;
- Up;
- Right;
- end
- else begin
- Left;
- Down;
- Right;
- Up;
- end
- end;
- Procedure MoveHome;
- var waits:Integer;
- begin
- if(MoveDirection = ArrowLeft) then begin
- CheckSides;
- Wait(800);
- Direction := ArrowRight;
- KeyDown(Direction);
- Wait(440);
- KeyUp(Direction);
- Wait(700); AutoPot;
- KeyDUp(123); //Refresh
- Wait(600); AutoPot;
- MoveDirection := 0;
- end
- else if(MoveDirection = ArrowDown) then begin
- CheckSides;
- Wait(800);
- Direction := ArrowUp;
- KeyDown(Direction);
- Wait(440);
- KeyUp(Direction);
- Wait(700); AutoPot;
- KeyDUp(123); //Refresh
- Wait(1000); AutoPot;
- MoveDirection := 0;
- end
- else if(MoveDirection = ArrowRight) then begin
- CheckSides;
- Wait(800);
- Direction := ArrowLeft;
- KeyDown(Direction);
- Wait(440);
- KeyUp(Direction);
- Wait(700); AutoPot;
- KeyDUp(123); //Refresh
- Wait(1000); AutoPot;
- MoveDirection := 0;
- end
- else if(MoveDirection = ArrowUp) then begin
- CheckSides;
- Wait(800);
- Direction := ArrowDown;
- KeyDown(Direction);
- Wait(440);
- KeyUp(Direction);
- Wait(700); AutoPot;
- KeyDUp(123); //Refresh
- Wait(600); AutoPot;
- MoveDirection := 0;
- end
- end;
- Procedure CheckTop;
- begin
- if(FindColor(x, y, Monster, 309, 174, 330, 185)) then begin
- KeyDown(Direction);
- Wait(440);
- KeyUp(Direction);
- Wait(700); AutoPot;
- KeyDUp(123);
- Wait(1000); AutoPot;
- KeyDUp(123);
- MoveDirection := Direction;
- CheckSides;
- end
- end;
- Procedure CheckLoggedOut;
- begin
- if(FindColor(x, y, 16776960, 27, 342, 50, 349)) then begin
- Login;
- end
- end;
- Procedure CheckDrop;
- begin
- if(FindColor(x, y, 8716032, 274, 205, 297, 210)) then begin
- MoveMouse(286, 205);
- Wait(200);
- ClickMouse(286, 205, true);
- Wait(2000);
- end
- else if(FindColor(x, y, 8716032, 340, 173, 361, 178)) then begin
- MoveMouse(349, 173);
- Wait(200);
- ClickMouse(349, 173, true);
- Wait(2000);
- end
- else if(FindColor(x, y, 8716032, 338, 205, 361, 210)) then begin
- MoveMouse(350, 204);
- Wait(200);
- ClickMouse(350, 204, true);
- Wait(2000);
- end
- else if(FindColor(x, y, 8716032, 274, 173, 297, 178)) then begin
- MoveMouse(286, 172);
- Wait(200);
- ClickMouse(286, 172, true);
- Wait(2000);
- end
- else if(FindColor(x, y, 8716032, 242, 189, 260, 194)) then begin
- MoveMouse(254, 188);
- Wait(200);
- ClickMouse(254, 188, true);
- Wait(2000);
- end
- else if(FindColor(x, y, 8716032, 306, 221, 329, 226)) then begin
- MoveMouse(318, 220);
- Wait(200);
- ClickMouse(318, 220, true);
- Wait(2000);
- end
- else if(FindColor(x, y, 8716032, 370, 189, 393, 194)) then begin
- MoveMouse(382, 189);
- Wait(200);
- ClickMouse(382, 189, true);
- Wait(2000);
- end
- else if(FindColor(x, y, 8716032, 306, 157, 329, 162)) then begin
- MoveMouse(317, 155);
- Wait(200);
- ClickMouse(317, 155, true);
- Wait(2000);
- end
- else if(FindColor(x, y, 8716032, 306, 189, 329, 194)) then begin
- MoveMouse(317, 188);
- Wait(200);
- ClickMouse(317, 188, true);
- Wait(2000);
- end
- end;
- Procedure Settings;
- begin
- //Do not touch anything below unless you know what you're doing
- HitCount := HitCountReset;
- AntiF := AntiFReset;
- Direction := 0;
- MoveDirection := 0;
- Monster := 1638350;
- PotsUsed := 0;
- F1 := 112; F2 := 113; F3 := 114; F4 := 115; F5 := 116; F6 := 117; F7 := 118; F8 := 119;
- Num0 := 96; Num1 := 97; Num2 := 98; Num3 := 99; Num4 := 100; Num5 := 101; Num6 := 102; Num7 := 103; Num8 := 104; Num9 := 105;
- ArrowLeft := 37; ArrowDown := 40; ArrowRight := 39; ArrowUp := 38; Ctrl := 17;
- SetMageKey;
- SetHealKey;
- end;
- // Begin Main Loop
- begin
- Settings;
- if(FindWindowTitlePart('endless online', false)) then begin
- activateclient;
- end
- else begin
- Writeln('Endless Online isn''t open or is minimized, please check and try again.');
- end
- ClearDebug;
- Writeln('Mikebot v8 - By Thehispanic/Gangstamikey');
- Wait(1000);
- CheckLoggedOut;
- repeat
- CheckDc;
- AutoPot;
- CheckSides;
- Mage;
- Heal;
- CheckTop;
- MoveHome;
- CheckLoggedOut;
- Status;
- CheckDrop;
- Wait(100);
- until((false) or (isfkeydown(9)))
- KeyUp(Ctrl);
- end.
- //Relog settings
- Username = 'no-name';
- Password = 'No-Name';
- CharacterNum = '1';
- DelayUserInput = 'true'; // Wait extra at login, for lag
- //General Settings
- 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)
- AntiFReset = 60; //Time before reloging if still attacking a single monster
- Archer = 'false'; //Not added yet, but will use range if true
- //Healing settings
- Pots = 'normal'; // herbs, normal
- HealType = 'none'; // self, clickheal (none = off/no healing)
- //HeartsToPot = 5; // When hp is down to selected heart, Mikebot will pot.(cannot be 9, only 1-8)
- HerbsForFull = 50; // Amount of herbs to use when potting
- //Mage settings
- MageEnabled = 'true'; // Fire/Thunder etc. (Also depends on what you have in the F key you set for "MageFKey")
- //Spell Hotkey settings
- HealFKey = 'F2'; //F1-F8
- MageFKey = 'F3'; //F1-F8
- {#####Mini-Guide#####
- 1. Put your account details in the "Username" and "Password" single-quotes.(')
- 1.b. Make sure you have your color set to 32-bit for XP, 16-bit for Vista/Win7.(Found in Control Panel)
- 2. Put the number of the character to auto with.('1', '2', '3')
- 3. Select the type of pots to use, you must have them in inv or it will log out.('herbs', 'small', 'med', 'large')
- 4. Set heal and mage to true/false if you want them on: true, off: false.
- 5. Set the Mage-F-Key and Heal-F-Key to a F key(F1-F8, "F" must be capital!)
- Enjoy! All credits go to Thehispanic/Gangstamikey}
- Procedure ReadString(str: String);
- var i,strLength :Integer; goer: Boolean;
- begin
- i:=1
- strLength:=Length(str)
- goer:=False
- while(i<strLength+1) do
- begin
- if(GetKeyCode(StrGet(str,i))=191)then
- begin
- KeyDown(16)
- goer:=True
- i:=i+1
- end;
- KeyDown(GetKeyCode(StrGet(str,i)))
- wait(25)
- KeyUp(GetKeyCode(StrGet(str,i)))
- wait(50)
- KeyUp(GetKeyCode(StrGet(str,i)))
- wait(25)
- i:=i+1
- if(goer=True)then
- begin
- KeyUp(16)
- wait(300)
- end;
- end;
- end;
- Procedure SetMageKey;
- begin
- if(MageFKey = 'F1') then begin MageKey := F1; end
- else if(MageFKey = 'F2') then begin MageKey := F2; end
- else if(MageFKey = 'F3') then begin MageKey := F3; end
- else if(MageFKey = 'F4') then begin MageKey := F4; end
- else if(MageFKey = 'F5') then begin MageKey := F5; end
- else if(MageFKey = 'F6') then begin MageKey := F6; end
- else if(MageFKey = 'F7') then begin MageKey := F7; end
- else if(MageFKey = 'F8') then begin MageKey := F8; end
- writeln('Mage key set.');
- end;
- Procedure SetHealKey;
- begin
- if(HealFKey = 'F1') then begin HealKey := F1; end
- else if(HealFKey = 'F2') then begin HealKey := F2; end
- else if(HealFKey = 'F3') then begin HealKey := F3; end
- else if(HealFKey = 'F4') then begin HealKey := F4; end
- else if(HealFKey = 'F5') then begin HealKey := F5; end
- else if(HealFKey = 'F6') then begin HealKey := F6; end
- else if(HealFKey = 'F7') then begin HealKey := F7; end
- else if(HealFKey = 'F8') then begin HealKey := F8; end
- writeln('Heal key set.');
- end;
- Procedure Click(x, y :Integer);
- begin
- Movemouse(x, y);
- ClickMouse(x, y, true);
- end;
- Procedure KeyDUp(Key :Byte);
- begin
- KeyDown(Key);
- Wait(10);
- KeyUp(Key);
- end;
- Procedure Turn;
- begin
- KeyUp(Ctrl);
- Wait(100);
- KeyDown(Direction);
- Wait(100);
- KeyUp(Direction);
- end;
- Procedure Login;
- begin
- writeln('Logging in.');
- if(FindColor(x, y, 10276608, 362, 314, 437, 332)) then begin // Check for "Login request denied", "Connection not found", "D/C" to retry
- ClickMouse(399, 322, true);
- Wait(100); Login;
- end
- ClickMouse(109, 368, true); // Click "Play Game"
- repeat
- Wait(100);
- until(FindColor(x, y, 255, 470, 328, 545, 340) or FindColor(x, y, 10276608, 362, 314, 437, 332))
- if(DelayUserInput = 'true') then begin Wait(1200); end else begin Wait(300); end
- ReadString(Username);
- ClickMouse(416, 388, true); // Click password textbox
- Wait(50); ReadString(Password);
- ClickMouse(403, 431, true); // Click "Connect"
- Wait(500);
- if(FindColor(x, y, 10276608, 362, 314, 437, 332)) then begin // Check for "Login request denied", "Connection not found", "D/C" to retry
- ClickMouse(399, 322, true);
- Wait(100); Login;
- end
- //Pause till login screen
- repeat
- Wait(500);
- until(FindColor(x, y, 255, 338, 168, 353, 185) or FindColor(x, y, 10276608, 362, 314, 437, 332))
- // Click login on the character
- repeat
- KeyDown(GetKeyCode(CharacterNum));
- Wait(10);
- KeyUp(GetKeyCode(CharacterNum));
- Wait(10);
- until(FindColor(x, y, 255, 338, 168, 353, 185) = false)
- Wait(500);
- ClickMouse(79, 366, true);
- // Check if stuck at login screen(Not needed until a problem)
- end;
- Procedure CheckDc;
- begin
- if(FindColor(x, y, 10276608, 357, 217, 437, 239)) then begin
- KeyUp(Ctrl);
- Click(x, y);
- Login;
- end
- if(FindColor(x, y, 10276608, 413, 301, 492, 321)) then begin // Paperdoll
- Click(451, 311);
- end
- if(FindColor(x, y, 6514175, 355, 215, 440, 239)) then begin // Exit game box
- Click(396, 228);
- end
- end;
- Procedure Relog;
- begin
- Click(599, 48);
- Click(323, 225);// Logout
- Login;
- AntiF := AntiFReset;
- HitCount := HitCountReset;
- end;
- Procedure Mage;
- begin
- if((MageEnabled = 'true') and (FindColor(x, y, 6500574, 235, 38, 236, 38) = false)) then begin
- if(FindColor(x, y, Monster, 12, 49, 626, 336)) then begin
- writeln('Engaging Mage on monster at '+ inttostr(x) +', '+ inttostr(y) +'.');
- KeyDown(MageKey);
- Wait(20);
- KeyUp(MageKey);
- Wait(10);
- MoveMouseSmooth(x, y); Wait(1); ClickMouse(x, y, true);
- Wait(2000); //1700
- end
- end
- end;
- Procedure Heal;
- begin
- 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
- if(HealType = 'self') then begin
- KeyDown(HealKey);
- Wait(30);
- KeyUp(HealKey);
- Wait(1000);
- end
- else if(HealType = 'clickheal') then begin
- KeyDown(HealKey);
- Wait(30);
- KeyUp(HealKey);
- Wait(10);
- MoveMouseSmooth(317, 188); Wait(1); ClickMouse(317, 188, true);
- Wait(2000); //1700
- end
- end
- end;
- Procedure AutoPot;
- var herbers, Xhp, TimesBy, Herts:Integer;
- begin
- herbers := HerbsForFull;
- //Herts := HeartsToPot;
- ///TimesBy := 8 * Herts;
- //Xhp := 128 + TimesBy;
- if(FindColor(x, y, 16236180, 163, 38, 164, 39)) then begin
- Click(81, 366);
- Wait(200);
- if((Pots = 'herbs') and FindColor(x, y, 33792, 115, 365, 476, 467)) then begin
- repeat
- herbers := herbers -1;
- Click(x, y);
- Wait(8);
- Click(x, y);
- Wait(10);
- CheckDc;
- until(herbers <= 0)
- end
- else if((Pots = 'normal') and FindColor(x, y, 33412, 115, 365, 476, 467)) then begin
- Click(x, y);
- Wait(8);
- Click(x, y);
- Wait(200);
- Potsused := PotsUsed + 1;
- end
- if(FindColor(x, y, 657930, 238, 34, 239, 35)) then begin // check TP
- Click(81, 366);
- Wait(100);
- if(FindColor(x, y, 16711812, 115, 365, 476, 467)) then begin
- Click(x, y);
- Wait(8);
- Click(x, y);
- Wait(10);
- end
- end
- end
- end;
- Procedure Status;
- begin
- if(FindWindowTitlePart('endless online', false)) then begin
- activateclient;
- end
- cleardebug;
- writeln('');
- writeln('');
- writeln('');
- writeln('');
- writeln('');
- writeln('');
- writeln('Monsters killed: '+ inttostr(Monsters) +' | HitCount: '+ inttostr(HitCount) + ' | AntiFreeze: ' + inttostr(AntiF) +' | Pots Used: '+ inttostr(PotsUsed));
- end;
- Procedure AntiFreeze;
- begin
- AntiF := AntiF - 1;
- Status;
- if(AntiF <= 0) then begin
- writeln('Frozen or some shit, time to relog.');
- KeyUp(Ctrl);
- Wait(10);
- Relog;
- Wait(20);
- keyDown(17);
- Wait(20);
- end
- end;
- Procedure DoHitCount;
- begin
- HitCount := HitCount - 1;
- if(HitCount <= 0) then begin
- KeyUp(Ctrl); Wait(50); Direction := TargetDirection;
- Wait(500);
- 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
- writeln('Turning to monster again, maybe I''m hitting in the wrong direction.');
- Turn;
- HitCount := HitCountReset;
- KeyDown(17);
- end
- end
- end;
- Procedure Left;
- begin
- If (FindColor(x, y, Monster, 274, 163, 298, 178)) then begin
- writeln('Engaging Melee on monster on the Left');
- TargetDirection := ArrowLeft;
- if((Direction = TargetDirection) = false) then begin
- Direction := ArrowLeft;
- Turn;
- end
- Wait(50);
- KeyDown(17);
- Wait(200);
- repeat
- AutoPot;
- AntiFreeze;
- DoHitCount;
- Wait(500);
- until((FindColor(x, y, Monster, 274, 163, 298, 178) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
- HitCount := HitCountReset;
- AntiF := AntiFReset;
- KeyUp(Ctrl);
- Wait(500);
- if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
- KsDirection := 'Left';
- end
- else begin
- Monsters := Monsters + 1;
- end
- end
- end;
- Procedure Down;
- begin
- If (FindColor(x, y, Monster, 271, 189, 305, 195)) then begin
- writeln('Engaging Melee on monster on the Bottom');
- TargetDirection := ArrowDown;
- if((Direction = TargetDirection) = false) then begin
- Direction := ArrowDown;
- Turn;
- end
- Wait(50);
- KeyDown(17);
- Wait(200);
- repeat
- AutoPot;
- AntiFreeze;
- DoHitCount;
- Wait(500);
- until((FindColor(x, y, Monster, 271, 189, 305, 195) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
- HitCount := HitCountReset;
- AntiF := AntiFReset;
- KeyUp(Ctrl);
- Wait(500);
- if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
- KsDirection := 'Down';
- end
- else begin
- Monsters := Monsters + 1;
- end
- end
- end;
- Procedure Right;
- begin
- If (FindColor(x, y, Monster, 332, 187, 360, 200)) then begin
- writeln('Engaging Melee on monster on the Right');
- TargetDirection := ArrowRight;
- if((Direction = TargetDirection) = false) then begin
- Direction := ArrowRight;
- Turn;
- end
- Wait(50);
- KeyDown(17);
- Wait(200);
- repeat
- AutoPot;
- AntiFreeze;
- DoHitCount;
- Wait(500);
- until((FindColor(x, y, Monster, 332, 187, 360, 200) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
- HitCount := HitCountReset;
- AntiF := AntiFReset;
- KeyUp(Ctrl);
- Wait(500);
- if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
- KsDirection := 'Right';
- end
- else begin
- Monsters := Monsters + 1;
- end
- end
- end;
- Procedure Up;
- begin
- If (FindColor(x, y, Monster, 335, 164, 358, 176)) then begin
- writeln('Engaging Melee on monster on the Top');
- TargetDirection := ArrowUp;
- if((Direction = TargetDirection) = false) then begin
- Direction := ArrowUp;
- Turn;
- end
- Wait(50);
- KeyDown(17);
- Wait(200);
- repeat
- AutoPot;
- AntiFreeze;
- DoHitCount;
- Wait(500);
- until((FindColor(x, y, Monster, 335, 164, 358, 176) = false) or (FindColor(x, y, 0, 313, 490, 313, 490)))
- HitCount := HitCountReset;
- AntiF := AntiFReset;
- KeyUp(Ctrl);
- Wait(500);
- if(FindColor(x, y, 0, 313, 490, 313, 490)) then begin // if find Not your battle! = false, begin
- KsDirection := 'Up';
- end
- else begin
- Monsters := Monsters + 1;
- end
- end
- end;
- Procedure CheckSides;
- begin
- if(KsDirection = 'Left') then begin
- Down;
- Right;
- Up;
- Left;
- end
- else if(KsDirection = 'Down') then begin
- Left;
- Right;
- Up;
- Down;
- end
- else if(KsDirection = 'Right') then begin
- Left;
- Down;
- Up;
- Right;
- end
- else begin
- Left;
- Down;
- Right;
- Up;
- end
- end;
- Procedure MoveHome;
- var waits:Integer;
- begin
- if(MoveDirection = ArrowLeft) then begin
- CheckSides;
- Wait(800);
- Direction := ArrowRight;
- KeyDown(Direction);
- Wait(440);
- KeyUp(Direction);
- Wait(700); AutoPot;
- KeyDUp(123); //Refresh
- Wait(600); AutoPot;
- MoveDirection := 0;
- end
- else if(MoveDirection = ArrowDown) then begin
- CheckSides;
- Wait(800);
- Direction := ArrowUp;
- KeyDown(Direction);
- Wait(440);
- KeyUp(Direction);
- Wait(700); AutoPot;
- KeyDUp(123); //Refresh
- Wait(1000); AutoPot;
- MoveDirection := 0;
- end
- else if(MoveDirection = ArrowRight) then begin
- CheckSides;
- Wait(800);
- Direction := ArrowLeft;
- KeyDown(Direction);
- Wait(440);
- KeyUp(Direction);
- Wait(700); AutoPot;
- KeyDUp(123); //Refresh
- Wait(1000); AutoPot;
- MoveDirection := 0;
- end
- else if(MoveDirection = ArrowUp) then begin
- CheckSides;
- Wait(800);
- Direction := ArrowDown;
- KeyDown(Direction);
- Wait(440);
- KeyUp(Direction);
- Wait(700); AutoPot;
- KeyDUp(123); //Refresh
- Wait(600); AutoPot;
- MoveDirection := 0;
- end
- end;
- Procedure CheckTop;
- begin
- if(FindColor(x, y, Monster, 309, 174, 330, 185)) then begin
- KeyDown(Direction);
- Wait(440);
- KeyUp(Direction);
- Wait(700); AutoPot;
- KeyDUp(123);
- Wait(1000); AutoPot;
- KeyDUp(123);
- MoveDirection := Direction;
- CheckSides;
- end
- end;
- Procedure CheckLoggedOut;
- begin
- if(FindColor(x, y, 16776960, 27, 342, 50, 349)) then begin
- Login;
- end
- end;
- Procedure CheckDrop;
- begin
- if(FindColor(x, y, 8716032, 274, 205, 297, 210)) then begin
- MoveMouse(286, 205);
- Wait(200);
- ClickMouse(286, 205, true);
- Wait(2000);
- end
- else if(FindColor(x, y, 8716032, 340, 173, 361, 178)) then begin
- MoveMouse(349, 173);
- Wait(200);
- ClickMouse(349, 173, true);
- Wait(2000);
- end
- else if(FindColor(x, y, 8716032, 338, 205, 361, 210)) then begin
- MoveMouse(350, 204);
- Wait(200);
- ClickMouse(350, 204, true);
- Wait(2000);
- end
- else if(FindColor(x, y, 8716032, 274, 173, 297, 178)) then begin
- MoveMouse(286, 172);
- Wait(200);
- ClickMouse(286, 172, true);
- Wait(2000);
- end
- else if(FindColor(x, y, 8716032, 242, 189, 260, 194)) then begin
- MoveMouse(254, 188);
- Wait(200);
- ClickMouse(254, 188, true);
- Wait(2000);
- end
- else if(FindColor(x, y, 8716032, 306, 221, 329, 226)) then begin
- MoveMouse(318, 220);
- Wait(200);
- ClickMouse(318, 220, true);
- Wait(2000);
- end
- else if(FindColor(x, y, 8716032, 370, 189, 393, 194)) then begin
- MoveMouse(382, 189);
- Wait(200);
- ClickMouse(382, 189, true);
- Wait(2000);
- end
- else if(FindColor(x, y, 8716032, 306, 157, 329, 162)) then begin
- MoveMouse(317, 155);
- Wait(200);
- ClickMouse(317, 155, true);
- Wait(2000);
- end
- else if(FindColor(x, y, 8716032, 306, 189, 329, 194)) then begin
- MoveMouse(317, 188);
- Wait(200);
- ClickMouse(317, 188, true);
- Wait(2000);
- end
- end;
- Procedure Settings;
- begin
- //Do not touch anything below unless you know what you're doing
- HitCount := HitCountReset;
- AntiF := AntiFReset;
- Direction := 0;
- MoveDirection := 0;
- Monster := 1638350;
- PotsUsed := 0;
- F1 := 112; F2 := 113; F3 := 114; F4 := 115; F5 := 116; F6 := 117; F7 := 118; F8 := 119;
- Num0 := 96; Num1 := 97; Num2 := 98; Num3 := 99; Num4 := 100; Num5 := 101; Num6 := 102; Num7 := 103; Num8 := 104; Num9 := 105;
- ArrowLeft := 37; ArrowDown := 40; ArrowRight := 39; ArrowUp := 38; Ctrl := 17;
- SetMageKey;
- SetHealKey;
- end;
- // Begin Main Loop
- begin
- Settings;
- if(FindWindowTitlePart('endless online', false)) then begin
- activateclient;
- end
- else begin
- Writeln('Endless Online isn''t open or is minimized, please check and try again.');
- end
- ClearDebug;
- Writeln('Mikebot v8 - By Thehispanic/Gangstamikey');
- Wait(1000);
- CheckLoggedOut;
- repeat
- CheckDc;
- AutoPot;
- CheckSides;
- Mage;
- Heal;
- CheckTop;
- MoveHome;
- CheckLoggedOut;
- Status;
- CheckDrop;
- Wait(100);
- until((false) or (isfkeydown(9)))
- KeyUp(Ctrl);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement