SCAR Code:
program New;
{.include SRL\SRL\Misc\Smart.scar}
{.include srl/srl.scar}
var
x, y: integer;
const
LoadsToDo = 50;
SmartWorld= 91; //Smart World?
SignedC= False; //Use signed client?
Procedure DeclarePlayers;
begin
HowManyPlayers:= 1;
CurrentPlayer:= 0;
NumberOfPlayers(HowManyPlayers);
Players[0].Name:= '';
Players[0].Pass:= '';
Players[0].Nick:= '';
Players[0].Active:= True;
end;
procedure FindNormalRandom;
begin
LampSkill := 'strength';
if FindNormalRandoms then UseRewardBox;
solvesrlrandoms:=true;
end;
procedure AntiBan;
begin
case random(80) of
0: MouseBox(MSX1, MSY1, MSX2, MSY2,3);
1: RandomMovement;
2: RandomRClick;
3: BoredHuman;
4: PickUpMouse;
5: SleepAndMoveMouse(50);
6: HoverSkill('random', false);
7: Exit;
end;
end;
function OpenBankChest: boolean;
begin
MakeCompass('S');
SetAngle(True);
if FindObjCustom(x, y, ['ank', 'hest'], [4676201, 8750479, 2634299], 10) then
begin
Mouse(x, y, 5, 5, true);
Result := True;
end;
end;
procedure WalkToChest;
begin
if FindSymbol(x, y, 'bank') then Mouse(x, y, 5, 5, True) else
if FindSymbol(x, y, 'minigame') then
begin
MakeCompass('W');
Fflag(random(10));
end;
end;
function DetectedCape: boolean;
begin
if WearingItem(2) then
begin
TakeOff(2);
Result := True;
end;
end;
function SWRoadColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.53, 0.17);
FindColorsSpiralTolerance(MMCX, MMCY, arP, 6122868, MMX1, MMY1, MMX2, MMY2, 5);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the road 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
ColorToRGB(arC[i], R, G, B);
if (R >= 102) and (R <= 131) and (G >= 96) and (G <= 123) and (B >= 81) and (B <= 104) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 11.37) and (X <= 18.39) and (Y >= 12.02) and (Y <= 19.41) and (Z >= 9.68) and (Z <= 15.58) then
begin
Result := arC[i];
Writeln('RoadColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('Failed in finding the color.');
end;
procedure BankItems;
begin
WalkToChest;
FFlag(random(10));
Writeln('We have arrived at the banking chest.');
if OpenBankChest then
begin
Writeln('We found the bank chest!');
wait(5000+random(5000));
if BankScreen then
begin
Writeln('I think we just found the banking screen.');
DepositAll;
CloseWindow;
wait(1000+random(1000));
MakeCompass('N');
if (FindColor(x, y, SWRoadColor, MMX1, MMY1, MMX2, MMY2)) then Mouse(x, y, 0, 0, True) else
begin
Writeln('We couldn''t walk back to the portal area, so we are terminating.');
Wait(1000+random(500));
LogOut;
TerminateScript;
end;
end else
begin
Writeln('Something went Wrong! We couldn''t find the bankscreen!');
TerminateScript;
end;
end else
begin
Writeln('We couldn''t open the bank chest.');
TerminateScript;
end;
end;
begin
Smart_Server:= (SmartWorld);
Smart_Members:= True;
Smart_Signed:= (SignedC);
Smart_SuperDetail:= false;
SetupSRL;
ActivateClient;
DeclarePlayers;
LogInPlayer;
Wait(10000+random(25000));
repeat
if (DetectedCape) then BankItems;
until (True);
end.