Code:
program Basilisk;
{$i srl/srl.simba}
var
count:integer;
stopitnow:boolean;
procedure ClickInShit;
begin
movemouse(743,106)
wait(200)
clickmouse(743,106,1)
end;
function BasiliskColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.06, 0.16);
if not (FindColorsTolerance(arP, 2702708, MSX1, MSY1, MSX2, MSY2, 3)) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
Result := arC[i];
// Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
procedure CheckPrayer;
var
x,y,w,h,PrayerPotColor:integer;
begin
PrayerPotColor := 9886755
GetClientDimensions(w,h);
if FindColor(x,y,501500,700,50,764,81)then
begin
if FindColor(x,y,9293346,546,200,w-1,h-1) or
FindColor(x,y,9686837,546,200,w-1,h-1)then
begin
wait(200)
writeln('pray pot found')
movemouse(x,y)
wait(200)
clickmouse(x,y,1)
end else
begin
wait(100);
writeln('clicking on invent to recheck');
if FindColor(x,y,1986182,620,168,662,200) then
begin
wait(100);
movemouse(x,y);
wait(200);
clickmouse(x,y,1);
wait(500)
if FindColor(x,y,9293346,546,200,w-1,h-1) or
FindColor(x,y,9686837,546,200,w-1,h-1)then
begin
wait(200);
writeln('pray pot found, we were not in invent');
movemouse(x,y);
wait(200);
clickmouse(x,y,1);
end else
begin
wait(100);
TypeSend('::home');
stopitnow:=true
end;
end;
end;
end;
end;
function IsPlayerInFight: Boolean;
var
green,red,x,y:integer;
begin
green:= 50820;
red:= 590010;
if findcolor(x,y,green,160,80,360,210) or
findcolor(x,y,red,160,80,360,210) then
begin
result := true
end else
result := false
end;
procedure AttackBasilisk;
var
x,y,h,w:integer;
infight:boolean;
begin
GetClientDimensions(w,h);
wait(300);
if FindColor(x,y,BasiliskColor,0,0,w-1,h-1) then
begin
wait(200);
movemouse(x,y);
wait(200);
clickmouse(x,y,1);
wait(3000);
repeat
wait(1000);
if IsPlayerInFight = false then
begin
writeln('not in fight anymore');
infight:=true;
end;
until(infight=true);
end;
end;
begin
ClickInShit;
repeat
AttackBasilisk;
inc(count);
writeln(count);
CheckPrayer;
until(stopitnow=true);
end.