Update your script to SRL5:
Change '.SCAR' to '.simba' so it appears as
{$include srl/srl/misc/smart.simba}
{$include srl/srl.simba}
You also have to change change the setNorth and setAngle methods. Read the SRL FAQ for "unable to find srl.
Here is an updated version
program agility;
{$DEFINE SMART}
{$i SRL\SRL.simba}
{$i SRL\SRL\Misc\Debug.simba}
//{$i SRL\SRL\Misc\Stats.simba}
Const
SRLStats_Username = '';// Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
BreakEvery = 120; //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 Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Agility', False) GameTab(28) End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
End;
End;
Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
TerminateScript;
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(SRL_ANGLE_HIGH)
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
// if FindObj( x, y, 'bstacle', obstaclenetcolor ,2) then
// writeln ('found net');
// begin
// if IsUpText('bstacle') then
// begin
// mouse( x, y, 5, 5, true);
SetAngle(SRL_ANGLE_HIGH) ;
if findcolorSpiralTolerance(x,y,obstaclenetcolor,100,311,358,333,15) then
writeln('found tree');
Mouse(x,y, 3, 3, True);
wait(4000);
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(SRL_ANGLE_HIGH);
if FindObj( x, y, 'ranch', branchcolor ,3) then
writeln ('found branch');
begin
if IsUpText('ranch') then
begin
mouse( x, y, 1, 1, true);
wait(2000)
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
MakeCompass(316);
SetAngle(SRL_ANGLE_HIGH);
wait(2500);
//if findcolorSpiralTolerance(x,y,ropecolor,386,182,425,183,25) then
//writeln('found rope');
//Mouse(x,y, 0, 0, True);
// wait(7500);
if FindObj( x, y, 'alancing', ropecolor ,3) then
writeln ('found rope');
begin
if IsUpText('alancing') then
begin
mouse( x, y, 1, 1, true);
wait(7500)
end;
end;
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, 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.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
wait(1000);
SetAngle(SRL_ANGLE_HIGH) ;
if findcolorSpiralTolerance(x,y,treecolor,360,203,375,183,15) then
writeln('found tree');
Mouse(x,y, 3, 3, True);
wait(4000)
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, 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 climbobstaclenet;
begin
MakeCompass(266 + random(4));
wait(3000);
if findcolorSpiralTolerance(x,y,obstaclenetcolor2,MSX1, MSY1, MSX2, MSY2,5) then
writeln('found obstacle net');
Mouse(x,y, 3, 3, True);
wait(6000);
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.