program AMM11;
var ksm,magec, ksmy, ksmx, ksmw, ksu, ksd, ksr, ksl,hit, hpcolor:integer;
var x,w,y, skip,z, monster1, monsterM,sx, sy, xx, yy, t, ptts, moved: Integer;
var clx, cly, ksosx, ksosy, setclx, setcly, ksoffsetx, ksoffsety:integer;
var ptx, pty, tr, relogtime, relogtimer,buypotsX, buypotsY, HealType,
squareonpots, KsColor, okbutton, cancelbutton, d1, d2, d3, d4, d5, d6, d7, d8,
d9,d10,c,h,x1,y1,spam,smallpot,cdir,people,drops,potman,reloglock
:integer;

var ksS, selfbox: TBox;

///white screen freeze 16777215

const


//CAUTION WARNING CAUTION WARNING CAUTION WARNING CAUTION WARNING CAUTION WARNING
//CAUTION WARNING CAUTION WARNING CAUTION WARNING CAUTION WARNING CAUTION WARNING
//CAUTION WARNING CAUTION WARNING CAUTION WARNING CAUTION WARNING CAUTION WARNING
user='no relog';{dont touch to keep all reloging features off}
pass='no-relog';
//^----DO NOT SHARE YOUR USER/PASS!!!! ERASE WHEN SHARING SCRIPT!!!!!!
//REPLACE USER AND PASS WITH 'no relog'


share=0;  //1 is on //anything else is off
mage=1;

var www:integer;

procedure w2(ww:integer);
begin
www:=ww*100
repeat
www:=www-100
cleardebug
writeln('Waitting: '+ inttostr(www/100))
wait(100)
until www=0
end;
procedure w3(ww:integer);
begin
www:=ww*100
repeat
www:=www-100
cleardebug
writeln( 'RESETING SCRIPT, PLEASE WAIT ('+ inttostr(www/100)+')')
wait(100)
until www=0
end;
var letdie:integer;
procedure p;
begin
if(FindColorSpiral(x, y, HpColor, 153, 33, 155, 36))then
begin
letdie:=0
clickmouse(78, 364, true);wait(200)
if findcolorspiral(ptx, pty, SquareOnPots,114, 364, 476, 468)then begin
clickmouse(ptx, pty, true)
wait(8)
clickmouse(ptx, pty, true)
sleep (350)
ptts:=ptts+1;writeln('Used '+inttostr(ptts)+' Potions since you started AMM10')
end else letdie:=1
end
end;



procedure u (upc:Integer);//done
begin; c:=upc
repeat; if ((findcolorspiral(x, y, people, 333, 157,361, 173)=false)
and (findcolorspiral(x, y, 1638350, 333, 157,361, 173)=false)
and (findcolorspiral(x, y, people, 369, 141,394, 158)=false)
and (findcolorspiral(x, y, 1638350, 369, 141,394, 158)=false)) then
begin sendarrowwait(0, 350);wait(600);
c:=c-1;
end else begin
if findcolorspiral(x, y, 9175295, 314, 103, 325, 123) then begin
sendarrowwait(0, 350) end
keydown(17);wait(100);keyup(17);wait(600);h:=h+1;end
if h=10 then begin keydown(123);wait(500);keyup(123);wait(100);h:=0;end p
until (c<1);wait(400);h:=0;end;

procedure l (lpc:Integer); //
begin; c:=lpc
repeat; if ((findcolorspiral(x, y, people, 274, 158, 304, 174)=false)
and (findcolorspiral(x, y, 1638350, 274, 158, 304, 174)=false)
and (findcolorspiral(x, y, people, 242, 140, 269, 157)=false)
and (findcolorspiral(x, y, 1638350, 242, 140, 269, 157)=false)) then
begin sendarrowwait(3, 350);wait(600);
c:=c-1;
end else begin
if findcolorspiral(x, y, 9175295, 314, 103, 325, 123) then begin
sendarrowwait(3, 350) end
keydown(17);wait(100);keyup(17);wait(600);h:=h+1;end
if h=10 then begin keydown(123);wait(500);keyup(123);wait(100);h:=0;end p
until (c<1);wait(400);h:=0;end;

procedure r (rpc:Integer);   //done
begin; c:=rpc
repeat; if ((findcolorspiral(x, y, people, 335, 185, 367, 209)=false)
and (findcolorspiral(x, y, 1638350, 335, 185, 367, 209)=false)
and (findcolorspiral(x, y, people, 366, 202, 395, 222)=false)
and (findcolorspiral(x, y, 1638350, 366, 202, 395, 222)=false)) then
begin sendarrowwait(1, 350);wait(600);
c:=c-1;
end else begin
if findcolorspiral(x, y, 9175295, 314, 103, 325, 123) then begin
sendarrowwait(1, 350) end
keydown(17);wait(100);keyup(17);wait(600);h:=h+1;end
if h=10 then begin keydown(123);wait(500);keyup(123);wait(100);h:=0;end p
until (c<1);wait(400);h:=0;end;

procedure d (dpc:Integer);
begin; c:=dpc
repeat; if ((findcolorspiral(x, y, people, 271, 187, 305, 202)=false)
and (findcolorspiral(x, y, 1638350, 271, 187, 305, 202)=false)
and (findcolorspiral(x, y, people, 241, 205, 268, 221)=false)
and (findcolorspiral(x, y, 1638350, 241, 205, 268, 221)=false)) then
begin sendarrowwait(2, 350);wait(600);
c:=c-1;
end  else begin
if findcolorspiral(x, y, 9175295, 314, 103, 325, 123) then begin
sendarrowwait(2, 350) end
keydown(17);wait(100);keyup(17);wait(600);h:=h+1;end
if h=10 then begin keydown(123);wait(500);keyup(123);wait(100);h:=0;end p
until (c<1);wait(400);h:=0;end;

procedure SC;
begin wait(3000)end;

Procedure Getpots(potsize:integer);
begin

if potsize=1 then begin
X1:=96
Y1:=104
end
if potsize=2 then begin
X1:=96
Y1:=146
end
if potsize=3 then begin
X1:=96
Y1:=181
end
clickmouse(81, 368, true);wait(250);clickmouse(126, 458, true);wait(20);
clickmouse(126, 458, true);w2(30);

u(1) r(6) u(34) l(3) u(5) SC u(5) r(44) SC r(13) u(2) r(35) SC u(5) l(2) u(30)
sc u(2) l(2) if findcolorspiral(x, y, potman, 10, 65, 629, 337) then begin
clickmouse(x, y, true);wait(5000);clickmouse(154, 111, true);wait(5000);
repeat
clickmouse(X1, Y1, true);wait(500);
clickmouse(322, 230, true);wait(500);clickmouse(322, 230, true);wait(500);
until findcolorspiral(x, y, okbutton, 385, 211, 440, 236);wait(1000);  //okbutton
findcolorspiral2(x, y, okbutton, 385, 211, 440, 236)                   //okbutton2
clickmouse(x, y, true);wait(1000)
end else begin; u(8); if findcolorspiral(x, y, potman, 10, 65, 629, 337) then begin
clickmouse(x, y, true);wait(5000);clickmouse(154, 111, true);wait(5000);
repeat
clickmouse(X1, Y1, true);wait(500);
clickmouse(322, 230, true);wait(500);clickmouse(322, 230, true);wait(500);
until findcolorspiral(x, y, okbutton, 385, 211, 440, 236);wait(1000);  //okbutton
findcolorspiral2(x, y, okbutton, 385, 211, 440, 236)                   //okbutton2
clickmouse(x, y, true);wait(1000)
end
end
clickmouse(190,307, true);wait(500);clickmouse(125,456, true);
wait(20);clickmouse(125,456, true);wait(1000)
repeat
if(FindColorSpiral(x, y, HpColor, 153, 33, 155, 36))then
begin
clickmouse(78, 364, true);wait(200)
if findcolorspiral(ptx, pty, SquareOnPots,114, 364, 476, 468)then begin
clickmouse(ptx, pty, true)
wait(8)
clickmouse(ptx, pty, true)
sleep (350)
ptts:=ptts+1;writeln('Used '+inttostr(ptts)+' Potions since you started AMM10')
end
end
until FindColorSpiral(x, y, HpColor, 153, 33, 155, 36)=false
end;
       ////////////////////////////////////////////////////////////////
       /////
/////////////////
    ///////////
       //////
         //
Procedure Pathfinder(path:integer);
begin

clickmouse(81, 368, true);wait(250);clickmouse(126, 458, true);wait(20);
clickmouse(126, 458, true);w2(30);

If Path=1 then begin    //Bitters easy
u(10) l(4) u(13) r(5) u(17) sc u(11) l(8) u(1) sc u(2) sc u(3) l(4) sc u(4)
r(9)u(7) sc d(9) l(11) sc r(7)u(11) r(2) u(1) sc d(6) l(3) sc d(7) r(4)
end

If Path=2 then begin    //Bitters Harder
u(10) l(4) u(13) r(5) u(17) sc u(11) l(8) u(1) sc u(2) sc u(3) l(4) sc u(4)
r(9)u(7) sc d(9) l(11) sc r(7)u(11) r(2) u(1) sc d(6) l(3) sc d(7) r(16) d(8)
end

If Path=3 then begin    //Bitters With Banshies
u(10) l(4) u(13) r(5) u(17) sc u(11) l(8) u(1) sc u(2) sc u(3) l(4) sc u(4)
r(9)u(7) sc d(9) l(11) sc r(7)u(11) r(2) u(1) sc d(6) l(3) sc d(7) r(16) d(8)
end

end;

PROCEDURE GetPotsAndReturn;
begin
keyup(17); keyup(17); w2(80)
repeat wait(5) until findcolorspiral(x, y, HpColor, 126, 35, 128, 38)
w2(200)
getpots(3)
w2(150)
PATHFINDER(1)
end;



PROCEDURE ChangeWindowName; begin
d1:=randomrange(65, 90); d2:=randomrange(65, 90); d3:=randomrange(65, 90)
d4:=randomrange(65, 90); d5:=randomrange(65, 90); d6:=randomrange(65, 90)
d7:=randomrange(65, 90); d8:=randomrange(65, 90); d9:=randomrange(65, 90)
d10:=randomrange(65, 90); DISGUISE(CHR(D1)+ CHR(D2)+CHR(D3)+inttostr(randomrange(1, 250000))
+CHR(D4)+CHR(D5)+CHR(D6)+inttostr(randomrange(1, 25000000))+CHR(D7)+CHR(D8)+CHR(D9)
+CHR(D10)+CHR(D3)+CHR(D9)+'reset-anchor'+CHR(D3)+CHR(D1)+CHR(D4)+CHR(D10)+CHR(D2)+CHR(D6)+CHR(D9)
+CHR(D10)+CHR(D4)+CHR(D2)+CHR(D5)+CHR(D9)+inttostr(randomrange(1, 25000000))+CHR(D10)
+CHR(D4)+CHR(D10)+CHR(D3)+CHR(D7)+CHR(D6)+inttostr(randomrange(1, 25000000))+CHR(D9)
+CHR(D4)+CHR(D2)+CHR(D10)+inttostr(randomrange(1, 25000000))+CHR(D3)) end;


Procedure ReadString(str: String);{by rena: START}
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(10)
KeyUp(GetKeyCode(StrGet(str,i)))
wait(100)
KeyUp(GetKeyCode(StrGet(str,i)))
wait(50)
i:=i+1
if(goer=True)then
begin
KeyUp(16)
wait(600)
end;
end;
wait(300)
end;{by rena: END}
Procedure relog;
var char:integer;
begin
//
char:=1
clickmouse(600, 50, true);wait(500);
findcolorspiral2(x, y, OkButton, 10, 10, 640, 350);clickmouse(x, y, true)
wait(1000)
repeat
clickmouse(400, 224, true);wait(700);clickmouse(400, 324, true);wait(700)
until (findcolorspiral (x, y, reloglock,17, 359, 54, 496)=false)
repeat clickmouse(115, 375, true);w2(50)
until ((findcolorspiral(x, y, reloglock, 276, 322,575, 343)) or
(findcolorspiral(x, y, OkButton, 358, 307, 449, 332)))
clickmouse(414, 353, true);wait(500);
if(findcolorspiral (x, y, reloglock,17, 359, 54, 496)=false)then begin;
readstring(user);clickmouse(414, 388, true);wait(500);readstring(pass);wait(500)
clickmouse(409, 428, true);w2(30);end
if findcolorspiral(x, y, OkButton,357, 305, 444, 333) then begin
clickmouse(380, 315, true);wait(500);pty:=4545 end

if ((findcolorspiral(x, y, reloglock,280, 323, 574, 343)=false)and(pty=4545)=false )
then begin
wait(500);clickmouse(534, (128*(char)), true);wait(500);
repeat until((findcolorspiral (x, y, reloglock,17, 359, 54, 496))OR
(findcolorspiral(x, y, reloglock,280, 323, 574, 343))) end
pty:=0   ;wait(500);
clickmouse(608, 446, true)
wait(500)
if (findcolorspiral(x, y,13158600,465, 455, 469, 459)=false) then begin
if (not(share=1))then begin
clickmouse(567, 461, true);wait(200)
end
end
if (findcolorspiral(x, y,13158600,465, 455, 469, 459)) then begin
if (share=1)then begin
clickmouse(567, 461, true);wait(200)
end
wait(100);clickmouse(80,446,true);wait(100)
end


end;   //


Procedure Anti_Walk;
begin

If ((cdir=37) and (findcolorspiral(x, y, monster1, 275, 154, 303, 174)=false))
then keyup(37);

If ((cdir=38) and (findcolorspiral(x, y, monster1, 323, 157, 350, 165)=false))
then keyup(38);

If ((cdir=39) and (findcolorspiral(x, y, monster1, 336, 182, 363, 209)=false))
then keyup(39);

If ((cdir=40) and (findcolorspiral(x, y, monster1, 288, 184, 300, 194)=false))
then keyup(40);

cdir:=0
end;


Procedure Check_Game_Status;
var char:integer;
begin   //
Anti_walk
if findcolorspiral(x, y, HpColor, 126, 35, 128, 38) then getpotsandreturn

if (isfkeydown(12) and isfunctionkeydown(2)) then GetPots(3)
if (isfkeydown(1) and isfunctionkeydown(2)) then PathFinder(1)
//if (isfkeydown(1) and isfunctionkeydown(2)) then PathFinder(1)
//if (isfkeydown(1) and isfunctionkeydown(2)) then PathFinder(1)
//if (isfkeydown(1) and isfunctionkeydown(2)) then PathFinder(1)
//if (isfkeydown(1) and isfunctionkeydown(2)) then PathFinder(1)
//if (isfkeydown(1) and isfunctionkeydown(2)) then PathFinder(1)
//if (isfkeydown(1) and isfunctionkeydown(2)) then PathFinder(1)
//if (isfkeydown(1) and isfunctionkeydown(2)) then PathFinder(1)
//if (isfkeydown(1) and isfunctionkeydown(2)) then PathFinder(1)
//if (isfkeydown(1) and isfunctionkeydown(2)) then PathFinder(1)
//if (isfkeydown(1) and isfunctionkeydown(2)) then PathFinder(1)


Anti_walk
char:=1

if (findcolorspiral(x, y, 10198015, 19, 362, 52, 495)) then begin     //vista's end program crash )spam attack)
w2(20);keyup(17);wait(200);keyup(17);clickmouse(429, 332, true)
repeat wait(1000)
until(findcolorspiral(x, y, 10198015, 19, 362, 52, 495)=false) wait(3500)
spam:=spam+1
keydown(91);wait(100);keydown(82);wait(500);
keyup(91);wait(100);keyup(82);wait(300);// Brings up run prompt
keydown(13);wait(30);keyup(13);w2(50);cleardebug;
findwindowtitlepart('reset-anchor', false);wait(100);activateclient;w3(30)
findwindowtitlepart('endless online', false);activateclient;w2(30)
relog;
end

Anti_walk


if ((findwindowtitlepart('endless online', false)=false)) then begin     //White Screen (Spam Attack(
w2(20);keyup(17);wait(200);keyup(17) w2(3500)
spam:=spam+1
keydown(91);wait(100);keydown(82);wait(500);
keyup(91);wait(100);keyup(82);wait(300);// Brings up run prompt
keydown(13);wait(30);keyup(13);w2(50);cleardebug;
findwindowtitlepart('reset-anchor', false);wait(100);activateclient;w3(30)
findwindowtitlepart('endless online', false);activateclient;w2(30)
relog;
end

Anti_walk

if (((findcolorspiral (x, y, OkButton, 410, 210, 458, 287)
or (findcolorspiral(x, y, reloglock,17, 359, 54, 496)=false)))and
((user='no relog')=false)) then begin keyup(17);wait(200);keyup(17);repeat
clickmouse(400, 224, true);wait(700);clickmouse(400, 324, true);wait(700)
until (findcolorspiral (x, y, reloglock,17, 359, 54, 496)=false)
repeat clickmouse(115, 375, true);w2(50)
until ((findcolorspiral(x, y, reloglock, 276, 322,575, 343)) or
(findcolorspiral(x, y, OkButton, 358, 307, 449, 332)))
clickmouse(414, 353, true);wait(500);
if(findcolorspiral (x, y, reloglock,17, 359, 54, 496)=false)then begin;
readstring(user);clickmouse(414, 388, true);wait(500);readstring(pass);wait(500)
clickmouse(409, 428, true);wait(3000);end
if findcolorspiral(x, y, OkButton,357, 305, 444, 333) then begin
clickmouse(380, 315, true);wait(500);pty:=4545 end

Anti_walk
if ((findcolorspiral(x, y, reloglock,280, 323, 574, 343)=false)and(pty=4545)=false )
then begin
wait(500);clickmouse(534, (128*(char)), true);wait(500);
repeat until((findcolorspiral (x, y, reloglock,17, 359, 54, 496))OR
(findcolorspiral(x, y, reloglock,280, 323, 574, 343))) end
pty:=0
clickmouse(608, 446, true)
wait(500)
if (findcolorspiral(x, y,13158600,465, 455, 469, 459)=false) then begin
if (not(share=1))then begin
clickmouse(567, 461, true)
end
end
if (findcolorspiral(x, y,13158600,465, 455, 469, 459)) then begin
if (share=1)then begin
clickmouse(567, 461, true)
end
end
end
Anti_walk
if ((findcolorspiral2(x, y, OkButton, 260, 208, 290, 238))
and (share=1)) then begin
clickmouse((x+10), y, true); wait(600)
if findcolorspiral2(x, y, OkButton, 354, 208, 442, 239)then begin
clickmouse(x, y, true);wait(600);
end
if findcolorspiral2(x, y, CancelButton, 500, 291, 585, 319)then begin
clickmouse((x+10), y, true);wait(600);
end
wait(100);clickmouse(80,446,true);wait(100)
end     Anti_walk
if (
   ( findcolorspiral(x, y,9175295,306, 86, 334, 104) )
and( findcolorspiral (x, y, monster1, 275, 154, 303, 174)=false )
and( findcolorspiral (x, y, monster1, 336, 182, 363, 209)=false )
and( findcolorspiral (x, y, monster1, 323, 157, 350, 165)=false )
and( findcolorspiral (x, y, monster1, 288, 184, 300, 194)=false )
){AMM10 by joeyroyden / EoBots}
then begin
keyup(17);wait(20);keydown(123);wait(500);keyup(123)
if findcolorspiral(x, y, monster1, 307, 178, 330, 191) then begin
sendarrowwait(randomrange(0, 3), 400)
end   //
end

Anti_walk

end;   //


begin







{-----------------------------------USER SETTINGS-------------------------------------}
{|}         t:=2 {Direction to face after battles (1 or 2)                          {|}
{|}         tr:=1{set to 1 for random direction on t)                               {|}
{|}         relogtimer:=150 {Anti Murder Timer (default 100)                        {|}
{|}         ptts:=0            {I forgot what this does lol, smoke weed everyday xD {|}
{|}         HealType:=1 {1 for self heal, 2 for any other heal                      {|}
{|}         KsColor:=3678536                                                        {|}
{|-----------------------------------------------------------------------------------|}



DisplayDebugImgWindow(420, 155);
LoadDebugBitmap('c:/focus.bmp'); wait(1000)
findwindowtitlepart('debug', false)
activateclient;

HpColor:= getcolor(30,82);movemousesmooth(30,82);wait(100)
monster1:= getcolor(81,80);movemousesmooth(81,80);wait(100)
monsterM:= getcolor(137,80);movemousesmooth(137,80);wait(100)
people:= getcolor(194,78);movemousesmooth(194,78);wait(100)
SquareOnPots:= getcolor(250,79);movemousesmooth(250,79);wait(100)
potman:= getcolor(313,76);movemousesmooth(313,76);wait(80)
reloglock:= getcolor(388,76);movemousesmooth(388,76);wait(100)
drops:= getcolor(30,148);movemousesmooth(30,148);wait(100)
smallpot:= getcolor(96,142);movemousesmooth(96,142);wait(100)
cancelbutton:= getcolor(186,143);movemousesmooth(186,143);wait(100)
OkButton:= getcolor(250,139);movemousesmooth(250,139);wait(100)

HideDebugImgWindow;



selfbox:=IntToBox(270, 144, 364, 199);
if (findwindowtitlepart('endless online', false)=false) then
begin
writeln('Endless Online is not running... Attempting to start it!')
keydown(91);wait(100);keydown(82);wait(300);
keyup(91);wait(100);keyup(82);wait(300);// Brings up run prompt
keydown(13);wait(30);keyup(13);w2(20);cleardebug;
w2(50);findwindowtitlepart('endlessonline', false);activateclient;w2(20)
if (findwindowtitlepart('endless online', false)=false) then
begin
writeln('Endless Online wasnt started, please check your desktop to see what program was started in its place')

end else
writeln('Endless Online was started successfully, Now starting AMM Final')

end
cleardebug;
setclx:=641
setcly:=507
findwindowtitlepart('endless online', false)
wait(300)
GetClientDimensions(clx, cly)
writeln('Your Client size is  X: '+inttostr(clx)+'  -  Y:'+inttostr(cly))
ksosx:=setclx-clx
ksosy:=setcly-cly
writeln('Your Offset is       X: '+inttostr(ksosx)+'  -  Y:'+inttostr(ksosy))
ksoffsetx:=313-ksosx
ksoffsety:=489-ksosy
writeln('Your KS Detection is X: '+inttostr(ksoffsetx)+'  -  Y:'+inttostr(ksoffsety))
wait(1000)
   activateclient; W2(20)
clickmouse(608, 446, true)
wait(500)
if (findcolorspiral(x, y,13158600,465, 455, 469, 459)=false) then begin
if (not(share=1))then begin
clickmouse(567, 461, true);wait(200)
end
end
if (findcolorspiral(x, y,13158600,465, 455, 469, 459)) then begin
if (share=1)then begin
clickmouse(567, 461, true);wait(200)
end
end
if (getcolor(34, 403)=reloglock) then begin
clickmouse(80,446,true);wait(100)
end
changewindowname

repeaT
if findcolorspiral(x, y, HpColor, 126, 35, 128, 38) then getpotsandreturn
                                                                                                                          //
begin
z:=0
if tr=1 then begin
t:=(random(2)+1);writeln('Direction: '+inttostr(t));end

IF((getcolor(198, 35)=HpColor)and(getcolor(239, 35)=HpColor)///
and (findcolorspiral(x, y, monsterm, 267, 144, 358, 199)=false))then begin                                            //      //
keydown(112);wait(450);
if (findcolorspiral(x, y, 16777215, 487, 368, 574, 388)=false) then begin
clickmouse(81, 368, true);wait(80);
end
if findcolorspiral(x, y, smallpot, 112, 365, 478, 471) then begin
clickmouse(x, y, true);wait(20);clickmouse(x, y, true) end else begin
if Healtype=2 then clickmouse(318, 137, true);keyup(112);if healtype=2 then w2(13)
else wait(200);
end                                                                                                      //        //
end


Check_Game_Status





if findcolorspiral(x, y,9175295,306, 103, 332, 126) then begin
ksl:=0;
ksr:=0;
ksd:=0;
ksu:=0;
end
repeat
z:=z+1

if (
   ( findcolorspiral(x, y,9175295,306, 86, 334, 104) )
and( findcolorspiral (x, y, monster1, 275, 154, 303, 174)=false )
and( findcolorspiral (x, y, monster1, 336, 182, 363, 209)=false )
and( findcolorspiral (x, y, monster1, 323, 157, 350, 165)=false )
and( findcolorspiral (x, y, monster1, 288, 184, 300, 194)=false )
){AMM10 by joeyroyden / EoBots}
then begin
keyup(17);wait(20);keydown(123);wait(500);keyup(123)
end



  writeln(inttostr(z)+'-'+inttostr(w))
if(z=100)then
begin
z:=0
keyup(17);wait(20);
keydown(123)
wait(200)
keyup(123)
end
if (findcolorspiral (x, y, monster1,275, 154, 303, 174)=false)then begin
ksl:=0; end
if ((findcolorspiral (x, y, monster1, 275, 154, 303, 174))and(ksl=0)) then
begin


if(FindColorSpiral(x, y, HpColor, 153, 33, 155, 36))then
begin
clickmouse(78, 364, true);wait(200)
if findcolorspiral(ptx, pty, SquareOnPots,114, 364, 476, 468)then begin
clickmouse(ptx, pty, true)
wait(8)
clickmouse(ptx, pty, true)
sleep (350)
ptts:=ptts+1;writeln('Used '+inttostr(ptts)+' Potions since you started AMM10')
end else begin getpotsandreturn end
end else
begin
writeln('No Healing Required')
keyup(17)
if findcolorspiral(x, y, monster1, 275, 154, 303, 174) then begin
keydown(37)
wait(50);keydown(37)
wait(80)
keyup(37)
wait(50)
end
keydown(17)
wait(10)

moved:=0
cdir:=37

Check_Game_Status



skip:=skip-1
magec:=0
hit:=1
if(getcolor(ksoffsetx, ksoffsety)=KsColor)then begin
ksl:=1;RELOGTIME:=RELOGTIME+8
end
Anti_walk
end
end
until ((findcolorspiral(x, y, monster1, 275, 154, 303, 174)=false)or(ksl=1))
keyup(17)
wait(200)
{AMM10 by joeyroyden / EoBots}
if ((findcolorspiral(x, y, monsterM, 13, 61, 627, 331)=false) and (hit=1))
then begin
wait(randomrange(500, 1000))
hit:=0
sendarrowwait(t, 5)
end

repeat
z:=z+1
writeln(inttostr(z)+'-'+inttostr(w))
if(z=100)then
begin
z:=0
keyup(17);wait(20);
keydown(123)
wait(200)
keyup(123)
end
if (findcolorspiral (x, y, monster1,329, 176, 358, 196)=false)then begin
ksr:=0
end
if ((findcolorspiral (x, y, monster1, 329, 176, 358, 196))and(ksr=0)) then
begin
if(FindColorSpiral(x, y, HpColor, 153, 33, 155, 36))then
begin
clickmouse(78, 364, true);wait(200)
if findcolorspiral(ptx, pty, SquareOnPots,114, 364, 476, 468)then begin
clickmouse(ptx, pty, true)
wait(8)
clickmouse(ptx, pty, true)
sleep (350)
ptts:=ptts+1;writeln('Used '+inttostr(ptts)+' Potions since you started AMM10')
end else begin getpotsandreturn end
end else
begin
writeln('No Healing Required')

keyup(17)
wait(80);

if findcolorspiral(x, y, monster1, 336, 182, 363, 209) then begin
keydown(39)
wait(50);keydown(39)
wait(80)
keyup(39)
wait(50)
end

keydown(17)

moved:=0
cdir:=39
Check_Game_Status


wait(100);skip:=skip-1
magec:=0
if (t=2) then begin
hit:=1
end
if (t=1) then begin
hit:=0
end
if(getcolor(ksoffsetx, ksoffsety)=KsColor)then begin
ksr:=1 ;RELOGTIME:=RELOGTIME+8
end
end
end
until ((findcolorspiral(x, y, monster1, 336, 182, 363, 209)=false)or(ksr=1))
keyup(17)
wait(200)
if ((findcolorspiral(x, y, monsterM, 13, 61, 627, 331)=false) and (hit=1)
and (t=2))
then begin
wait(randomrange(500, 1000))
hit:=0
sendarrowwait(t, 5)
end

if(getcolor(ksoffsetx, ksoffsety)=KsColor)then begin
ksm:=1
ksmx:=xx
ksmy:=yy
ksmw:=1
end
repeat
z:=z+1
  writeln(inttostr(z)+'-'+inttostr(w))
if(z=100)then
begin
z:=0
keyup(17);wait(20);
keydown(123)
wait(200)
keyup(123)
end {AMM10 by joeyroyden / EoBots}
if (findcolorspiral (x, y, monster1,323, 157, 350, 165)=false)then begin
ksu:=0
end
if ((findcolorspiral (x, y, monster1, 323, 157, 350, 165))and(ksu=0)) then   ///////////////////////////////
begin
if(FindColorSpiral(x, y, HpColor, 153, 33, 155, 36))then
begin
clickmouse(78, 364, true);wait(200)
if findcolorspiral(ptx, pty, SquareOnPots,114, 364, 476, 468)then begin
clickmouse(ptx, pty, true)
wait(8)
clickmouse(ptx, pty, true)
sleep (350)
ptts:=ptts+1;writeln('Used '+inttostr(ptts)+' Potions since you started AMM10')
end else begin getpotsandreturn end
end else
begin
writeln('No Healing Required')
keyup(17);wait(80);

if findcolorspiral(x, y, monster1, 323, 157, 350, 165) then begin
keydown(38);wait(50);
keydown(38)
wait(80)
keyup(38)
wait(80)
end

keydown(17)
wait(10)

moved:=0
cdir:=38
Check_Game_Status

magec:=0
hit:=1
if(getcolor(ksoffsetx, ksoffsety)=KsColor)then begin
ksu:=1 ;RELOGTIME:=RELOGTIME+8
end
end
end
until ((findcolorspiral(x, y, monster1, 323, 157, 350, 165)=false)or(ksu=1))
keyup(17)
wait(200)
if ((findcolorspiral(x, y, monsterM, 13, 61, 627, 331)=false) and (hit=1))
then begin
hit:=0
wait(randomrange(500, 1000))
sendarrowwait(t, 5)
end
repeat
z:=z+1
  writeln(inttostr(z)+'-'+inttostr(w))
if(z=100)then
begin
z:=0
keyup(17);wait(20);
keydown(123)
wait(200)
keyup(123)
end
if (findcolorspiral (x, y, monster1,288, 184, 300, 194)=false)then begin
ksd:=0
end
if ((findcolorspiral (x, y, monster1, 288, 184, 300, 194))and(ksd=0)) then
begin
if(FindColorSpiral(x, y, HpColor, 153, 33, 155, 36))then
begin
clickmouse(78, 364, true);wait(200)
if findcolorspiral(ptx, pty, SquareOnPots,114, 364, 476, 468)then begin
clickmouse(ptx, pty, true)
wait(8)
clickmouse(ptx, pty, true)
sleep (350)
ptts:=ptts+1;writeln('Used '+inttostr(ptts)+' Potions since you started AMM10')
end else begin getpotsandreturn end
end else
begin
writeln('No Healing Required')
keyup(17)
wait(80);

if findcolorspiral(x, y, monster1, 288, 184, 300, 194) then begin
keydown(40);wait(50);
keydown(40)
wait(80)
keyup(40)
wait(50)
end

keydown(17)
wait(10)

moved:=0
cdir:=40
Check_Game_Status


magec:=0
if (t=2) then begin
hit:=0
end
if (t=1) then begin
hit:=1
end
if(getcolor(ksoffsetx, ksoffsety)=KsColor)then begin
ksd:=1 ;RELOGTIME:=RELOGTIME+8
end
end
end
until ((findcolorspiral(x, y, monster1, 288, 184, 300, 194)=false)or(ksd=1))
keyup(17){AMM10 by  joeyroyden / EoBots}
if ((findcolorspiral(x, y, monsterM, 13, 61, 627, 331)=false) and (hit=1)
and (t=1))
then begin
wait(randomrange(500, 1000))
hit:=0
sendarrowwait(t, 5)
end
end
if (findcolorspiral (x, y,monsterm, 13, 61, 627, 331)=false)then
begin
magec:=0

wait(750)
if(FindColorSpiral(x, y,61373, 13, 61, 627, 331))then
begin
repeat
FindColorSpiral(x, y,61373, 13, 61, 627, 331)
movemousesmooth(x, y);wait(200);clickmouse(x, y, true)
wait(80)
clickmouse(x, y, true)
until((FindColorSpiral(x, y,61373, 13, 61, 627, 331)=false)
or(findcolorspiral(x, y, monster1, 13, 61, 627, 331)))
end
cleardebug;
if (findcolorspiral(x, y, monsterm, 13, 61, 627, 331)=false) then begin
ksm:=0
end
if (ksm=0) then begin
  ksS := IntToBox(0, 0, 5, 5); end
writeln('AMM10 Mage - By Joeyroyden - is waitting for a monster. (Direction: '+inttostr(t)+')')
writeln('Http://eobots.myteamtoolbar.com for quick links to other scripts')
writeln('Used '+inttostr(ptts)+' Potions since you started AMM10')
writeln('AMM has recovered from spam '+inttostr(spam)+' times so far')
IF (findcolorspiral(x, y, monster1, 267, 144, 358, 199)=false) THEN BEGIN
relogtime:=0
END

if (findcolorspiral(x, y, monster1, 13, 61, 627, 331)=false) then begin
clickmouse(489, 33, true);wait(300)
end
changewindowname
repeat

if (isfkeydown(1) and isfkeydown(3))then begin
getmousepos(buypotsX, buypotsY);wait(200);keydown(52);wait(100)
repeat
clickmouse(buypotsX, buypotsY, true);wait(50);
clickmouse(322, 230, true);wait(50);clickmouse(322, 230, true);wait(50);
until ((isfkeydown(2) and isfkeydown(4))or
(findcolorspiral(x, y, OkButton, 385, 211, 440, 236)))
keyup(52);wait(100);
end
if findcolorspiral2(x, y, OkButton, 385, 211, 440, 236)then begin
clickmouse(x, y, true);wait(1000)
end

IF((getcolor(198, 35)=HpColor)and(getcolor(239, 35)=HpColor)                                              ///
and (findcolorspiral(x, y, monsterm, 267, 144, 358, 199)=false))then begin                                            //      //
keydown(112);wait(400);
if (findcolorspiral(x, y, 16777215, 487, 368, 574, 388)=false) then begin
clickmouse(81, 368, true);wait(80);
end
if findcolorspiral(x, y, smallpot, 112, 365, 478, 471) then begin
clickmouse(x, y, true);wait(20);clickmouse(x, y, true) end else begin
if Healtype=2 then clickmouse(318, 137, true);keyup(112);if healtype=2 then w2(13)
else wait(200);
end                                                                                                      //        //
end
if ((findcolorspiral (ptx, pty, 3788395, 127, 382, 477, 469))
and (not(getcolor(311, 33)=HpColor))) then begin
clickmouse(ptx, pty, true);wait(10);clickmouse(ptx, pty, true)
end ///
Check_Game_Status

if (not(getcolor(198, 35)=HpColor)and(not(FindColorspiral2(sx, sy, monsterM, 13, 61, 627, 331)))
and (moved=0)and(FindColorSpiral(x, y,drops,244, 149, 398, 224)=false))          ///////////////////
then begin
x:=randomrange(0, 4)
wait(1000)
sendarrowwait(x, 300)
wait(200)
x:=x+2
if x=5 then x:=1
if x=4 then x:=0
wait(1000)
sendarrowwait(x, 300)
moved:=1
end

if (
   ( findcolorspiral(ptx, pty,9175295,306, 86, 334, 104) )
and( findcolorspiral (ptx, pty, monster1, 275, 154, 303, 174)=false )
and( findcolorspiral (ptx, pty, monster1, 336, 182, 363, 209)=false )
and( findcolorspiral (ptx, pty, monster1, 323, 157, 350, 165)=false )
and( findcolorspiral (ptx, pty, monster1, 288, 184, 300, 194)=false )
) {AMM10 by joeyroyden / EoBots}
then begin
keyup(17);wait(20);keydown(123);wait(500);keyup(123)
end

if(FindColorSpiral(x, y,drops,244, 149, 398, 224))then
begin
FindColorSpiral(x, y,drops, 244, 149, 398, 224)
wait(140);keyup(112);wait(20);keyup(113);wait(20);keyup(114);wait(20);
movemousesmooth(x, y);wait(200);clickmouse(x, y, true);wait(500)

end
if(FindColorSpiral(x, y, HpColor, 153, 33, 155, 36))then
begin
clickmouse(78, 364, true);wait(200)
if findcolorspiral(ptx, pty, SquareOnPots,114, 364, 476, 468)then begin
clickmouse(ptx, pty, true)
wait(8)
clickmouse(ptx, pty, true)
sleep (350)
ptts:=ptts+1;writeln('Used '+inttostr(ptts)+' Potions since you started AMM10')
end else begin getpotsandreturn end
end else begin
if (x=0) then begin
x:=x+1
writeln('Used '+inttostr(ptts)+' Potions since you started AMM10')
end
end
until (findcolorspiral(x, y, monster1, 13, 61, 627, 331)=true)
end
RELOGTIME:=RELOGTIME+1
writeln('relog timer: '+inttostr(relogtimer - relogtime))
IF ((RELOGTIME>relogtimer)and(not(user='no relog'))) THEN BEGIN
relogtime:=0
RELOG
END

skip:=skip-1;writeln('skip: '+inttostr(skip))
if(getcolor(ksoffsetx, ksoffsety)=KsColor)then begin
ksm:=1
ksmx:=xx
ksmy:=yy
ksmw:=1
end
if ((FindColorSkipBox(sx, sy, monsterm, 13, 61, 627, 331, selfbox))and(mage=1))then
begin
if (findcolorspiral2(xx, yy, monsterM, 11, 63, 626, 335)=true)then begin
if ((findcolorspiral2 (x, y, monsterm, ksmx-75, ksmy-75, ksmx+75, ksmy+75)=false))
then begin
ksm:=0
ksmw:=0
magec:=0
end

if (ksm=1) then begin
  ksS := IntToBox((ksmx-90), (ksmy-90), (ksmx+90), (ksmy+90)); end
if (ksm=0) then begin
  ksS := IntToBox(0, 0, 5, 5); end
  if(FindColorSkipBox(sx, sy, monsterM, 13, 61, 627, 331, ksS))then begin
if((findcolorspiral (x, y, monster1,275, 154, 303, 174)=false)
and
(findcolorspiral (x, y, monster1,336, 182, 363, 209)=false)
and
(findcolorspiral (x, y, monster1,323, 157, 350, 165)=false)
and {AMM10 by joeyroyden / EoBots}
(findcolorspiral (x, y, monster1,288, 184, 300, 194)=false))then begin
FindColorspiral2(sx, sy, monsterM, 13, 61, 627, 331)
wait(50)
if ((magec=0)and (not(getcolor(198, 35)=HpColor)))then begin
writeln('Go')
keydown(113)
wait(25)
keyup(113)
wait(50)
clickmouse(sx, sy, true)
wait(randomrange(2000, 2000))
magec:=0
moved:=0
end
end
ksmw:=0
skip:=1
if(getcolor(ksoffsetx, ksoffsety)=KsColor)then begin
ksm:=1
ksmx:=xx
ksmy:=yy
ksmw:=1
end
end
end
wait(100)
if(getcolor(ksoffsetx, ksoffsety)=KsColor)then begin
ksm:=1
ksmx:=xx
ksmy:=yy
ksmw:=1
end
if(getcolor(ksoffsetx, ksoffsety)=KsColor)then begin
ksm:=1
ksmx:=xx
ksmy:=yy
ksmw:=1
end

Check_Game_Status

if findcolorspiral(x, y,9175295,306, 103, 332, 126) then begin
ksl:=0;
ksr:=0;
ksd:=0;
ksu:=0;
end
end
until(x = 500000000)
end.
