SCAR Code:
program New;
//{.include SRL\SRL\misc\smart.scar}
{.include SRL\SRL.scar}
var
x,y,WaitTime: Integer;
Function UpText: Boolean;
var
fx,fy,MinotaurTxt: Integer;
begin
if(not(LoggedIn))then Exit;
MinotaurTxt := DTMFromString('78DA63BCC6C0C010CE80029E3C61633002D28' +
'C503EE32D4C35CF1EB3C2D5FC070246903931F8CD0100C63B0D93' +
'');
Result := FindDTM(MinotaurTxt,fx,fy,110,12,140,30);
FreeDTM(MinotaurTxt);
end;
Function ClickRandom(Txt: String): Boolean;
var
fx,fy,i: Integer;
begin
if(not(LoggedIn))then Exit;
if(Random(4) = 0)then
begin
Mouse(x,y,0,0,False);
if(ChooseOption(Txt))then
begin
Status('Clicked!');
Result := True;
Exit;
end else
Result := False;
Exit;
end else
Mouse(x,y,0,0,True);
i := 0;
for i := 0 to 10 do
begin
if(FindColor(fx,fy,255,x-8,y-8,x+8,y+8))then
begin
Status('Clicked!');
Result := True;
Exit;
end;
if(FindColor(fx,fy,65535,x-8,y-8,x+8,y+8))then
begin
Status('Missed');
Result := False;
Exit;
end;
Inc(i);
end;
end;
Function FindMinotaur(var xx,yy: Integer): Boolean;
var
TTPA: T2DPointArray;
TPA: TPointArray;
TP: TPoint;
CTS,i: Integer;
begin
if(not(LoggedIn))then Exit;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.00,0.26);
x := mscx;
y := mscy;
FindColorsSpiralTolerance(x,y,TPA,11055537,msx1,msy1,msx2,msy2,13);
if(Length(TPA) = 0)then
begin
Result := False;
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.20,0.20);
Exit;
end;
TTPA := TPAtoATPA(TPA,30);
SortATPAFromFirstPoint(TTPA,Point(mscx,mscy));
for i := 0 to High(TTPA) do
begin
if(Length(TTPA[i]) < 10)then
Continue;
TP := MiddleTPA(TTPA[i]);
MMouse(TP.x,TP.y,4,4);
GetMousePos(xx,yy);
Result := True;
Exit;
end;
Result := False;
end;
Function ClickMinotaur: Boolean;
begin
if(not(LoggedIn))then Exit;
if(not(UpText))then Exit;
Result := ClickRandom('ck');
end;
begin
//Smart_Server := 19;
//Smart_Signed := True;
SetupSRL;
MouseSpeed := 18;
repeat
if IsFKeyDown(1) then //Move the mouse over the minotaur and it will detect it!
begin
while not UpText do
Status('searching');
end;
if IsFKeyDown(2) then
begin
repeat
if(FindMinotaur(x,y))then
if(ClickMinotaur)then
Break;
until IsFKeyDown(2);
end;
Status('ready to fire');
until false;
end.