Code:
program agility;
{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i SRL\SRL\Misc\Debug.SCAR}
{$i SRL\SRL\Misc\Stats.simba}
Const
SRLStats_Username = '';// Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
BreakEvery = 1200000; //How Many Minutes To Break After
BreakFor = 10; //How Long To Break For
Version = '';
Var
runlog, x, y, StartTime: Integer;
procedure DeclarePlayers;
Var i:integer;
Begin
NumberOfPlayers(1);
CurrentPlayer := 0;
For I := 0 to (1-1) Do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
With Players[0] Do
Begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
End;
End;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Stats_Commit;
End;
function logcolor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 0.41);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 932196, MSX1, MSY1, MSX2, MSY2, 3);
if (Length(arP) = 0) 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
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 5.12) and (X <= 8.69) and (Y >= 4.31) and (Y <= 7.28) and (Z >= 0.89) and (Z <= 1.46) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure crosslog;
begin
SetAngle(true)
if FindObj( x, y, 'alance', logcolor ,2) then
writeln ('found log');
begin
if IsUpText('alance') then
begin
mouse( x, y, 5, 5, true);
wait(6500)
end;
end;
end;
function obstaclenetcolor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.18, 12.34);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 1982047, MSX1, MSY1, MSX2, MSY2, 2);
if (Length(arP) = 0) 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
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 5.02) and (X <= 7.71) and (Y >= 4.85) and (Y <= 6.45) and (Z >= 1.23) and (Z <= 3.54) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure climbnet;
begin
SetAngle(False);
repeat
wait(100 + random(50));
if (FindColorSpiralTolerance(x,y,999019, 210, 227, 245, 239, 10))
then
MMouse(x,y,5,5);
until (IsUpText('net'));
begin
WriteLn('Climbing up obstacle net!');
if (IsUpText('net'))
then
Mouse(x,y,5,5, true);
wait(1000 + random (255));
wait(1500+random(100));
end;
end;
function branchcolor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.09, 0.47);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 2117223, MSX1, MSY1, MSX2, MSY2, 2);
if (Length(arP) = 0) 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
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 7.59) and (X <= 9.69) and (Y >= 7.51) and (Y <= 9.57) and (Z >= 2.26) and (Z <= 2.79) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure climbbranch;
begin
SetAngle(true);
repeat
wait(500 + random(100));
if FindObj( x, y, 'ranch', branchcolor ,3) then
MMouse(x,y,5,5);
until (IsUpText('ranch'));
if FindObj( x, y, 'ranch', branchcolor ,3) then
writeln ('found branch');
begin
if IsUpText('ranch') then
begin
mouse( x, y, 1, 1, true);
wait(4000)
end;
end;
end;
function ropecolor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.06, 0.16);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 5667737, MSX1, MSY1, MSX2, MSY2, 4);
if (Length(arP) = 0) 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
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 19.06) and (X <= 25.17) and (Y >= 18.75) and (Y <= 24.81) and (Z >= 10.19) and (Z <= 13.60) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure walkrope;
begin
SetAngle(False);
wait(100 + random(10));
MMouse(654,75,5,3);
Mouse(654,75,2,0, true);
repeat
wait(100 +random(10));
if (FindColorSpiralTolerance(x,y,5733788, 299, 189, 319, 203, 10))
then
MMouse(x,y,10,1);
until (IsUpText('rope'));
if (IsUpText('rope'))
then
wait(500 + random(100));
Mouse(x,y,3,0, true);
WriteLn('Walking across rope!');
wait(5000);
end;
function treecolor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.06, 0.22);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 1853020, MSX1, MSY1, MSX2, MSY2, 2);
if (Length(arP) = 0) 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
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 5.41) and (X <= 8.47) and (Y >= 5.40) and (Y <= 8.39) and (Z >= 1.66) and (Z <= 2.49) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure downtree;
begin
repeat
wait(500 + random(100));
if (FindColorSpiralTolerance(x,y,2050914, 472, 192, 504, 208, 3))
then
MMouse(x,y,5,5);
until (IsUpText('branch'));
begin
WriteLn('Climbing down branch!');
if (IsUpText('branch'))
then
Mouse(x,y,5,5, true);
wait(5000+random(100));
end;
end;
function obstaclenetcolor2: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.18, 12.34);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 3492445, MSX1, MSY1, MSX2, MSY2, 5);
if (Length(arP) = 0) 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
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 5.02) and (X <= 7.71) and (Y >= 4.85) and (Y <= 6.45) and (Z >= 1.23) and (Z <= 3.54) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure climbobstaclenet;
begin
repeat
wait(100 + random(50));
if (FindColorSpiralTolerance(x,y,2636103, 193, 26, 210, 40, 5))
then
MMouse(x,y,5,5);
until (IsUpText('net'));
begin
WriteLn('Climbing up obstacle net!');
if (IsUpText('net'))
then
Mouse(x,y,15,5, true);
wait(1000 + random (255));
wait(4000+random(100));
end;
end;
function pipecolor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.00, 0.13);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 9803164, MSX1, MSY1, MSX2, MSY2, 7);
if (Length(arP) = 0) 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
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 23.62) and (X <= 36.79) and (Y >= 24.33) and (Y <= 37.91) and (Z >= 25.98) and (Z <= 40.51) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure squeezepipe;
begin
if FindObj( x, y, 'through', pipecolor ,2) then
writeln ('found pipe');
begin
if IsUpText('through') then
begin
mouse( x, y, 5, 5, true);
wait(5000)
end;
end;
end;
procedure ClickNor;
begin
if InRange(Round(rs_GetCompassAngleDegrees), 5, 355) then
if Random(4) = 1 then
begin
Mouse(542, 24, 15, 15, true);
WaitOptionMulti(['ace', 'orth'], 1200);
end else
Mouse(542, 24, 15, 15, True);
end;
procedure runtolog;
begin
wait(2500)
//runlog := DTMFromString('mLgAAAHicY2KAAE4gZoeyY12lGCrSlRiYgWwQZoRiBgYAK0gB2A==');
//If FindDTM(runlog, X, Y, 573, 25, 663,119) then
// mouse( x, y, 3, 3, true);
mouse( 580, 80, 3, 3, true);
wait(8000);
// FreeDTM(runlog);
end;
begin
Smart_Server := 83;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
SetUpSRL;
DeclarePlayers;
LogInPlayer;
StartTime:=GetSystemTime;
repeat
ClickNor
crosslog
climbnet
climbbranch
walkrope
ClickNor
downtree
climbobstaclenet
squeezepipe
ClickNor
runtolog
until(false)
end.