SCAR Code:
program HerbCleaner;
{.include srl/srl.scar}
var
Cords : TBoxArray;
Z, X ,Y, I, D : Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 2;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Pin:= '0000';
Players[0].BoxRewards := ['XP', 'Gem', 'oins', 'oal'];
Players[0].Active := True;
Players[1].Name := '';
Players[1].Pass := ''
Players[1].Nick := '';
Players[1].Pin:= '0000';
Players[1].BoxRewards := [ 'XP', 'Gem', 'oins', 'oal'];
Players[1].Active := false;
end;
procedure MouseAntiBan;
var
MS, C, V : Integer;
begin
case Random(3) of
0 : begin
if not LoggedIn then Exit;
MS:= MouseSpeed;
MouseSpeed:= 8 + Random(7);
MouseBox(MSX1, MSY1, MIX2, MIY2, 2);
Wait(1000) + (Random(750)));
repeat
if OptionExist('xamine', False) then
begin
ChooseOption('xamine');
Break;
end else
ChooseOption('ancel');
until(True);
MouseSpeed:= MS;
end;
1 : begin
GetMousePos(C, V);
MMouse(X - 100, Y - 100, 200, 200);
end;
2 : begin
GetClientDimensions(X, Y);
MMouse(0, 0, X, Y);
end;
end;
end;
procedure SRL_AntiBan;
begin
case Random(6) of
0 : BoredHuman;
1 : PickUpMouse;
2 : RandomRClick;
3 : RandomMovement;
4 : ExamineInv;
5 : RandomAngle(True);
end;
end;
procedure AntiBan;
begin
AntiRandoms;
case Random(75) of
0 : MouseAntiBan;
1 : SRL_AntiBan;
end;
end;
procedure AntiRandoms(DoAntiBan : Boolean);
begin
FindNormalRandoms;
if FindFight then
RunAway('N', True, 1, 6);
if LevelUp then
WriteLn('We just leveled up!');
if DoAntiBan then
AntiBan;
end;
function ChooseOptionQuick(XX, YY, Option : Integer): Boolean;//Made by JAD!
var
Mx, My, I, T : Integer
begin
if not LoggedIn then
Exit;
AntiRandoms(False);
My:= YY + 25 + Random(7); //28 = Perfect
Mx:= XX + Random(37);
if Option <> 1 then
for I:= 2 to Option do
IncEx(My, 15);
MMouse(Mx, My, 0, 0);
MarkTime(T);
repeat
Wait(50 + Random(40));
Result:= FindColor(Mx, My, 6121839, Mx-25, My ,Mx+25, My+2)
if Result then
begin
GetMousePos(Mx, My);
Mouse(Mx, My, 0, 0, True);
Wait(40 + Random(60));
Exit;
end;
until(TimeFromMark(T) > 1500 + Random(900));
AntiRandoms(False);
end;
procedure CallArray;
begin
AntiBan(True);
Cords[0]:= IntToBox(564, 215, 589, 233);
Cords[1]:= IntToBox(607, 219, 634, 235);
Cords[2]:= IntToBox(647, 215, 675, 236);
Cords[3]:= IntToBox(689, 215, 717, 232);
Cords[4]:= IntToBox(567, 255, 592, 273);
Cords[5]:= IntToBox(605, 251, 631, 271);
Cords[6]:= IntToBox(650, 253, 673, 269);
Cords[7]:= IntToBox(691, 254, 717, 271);
Cords[8]:= IntToBox(567, 291, 592, 305);
Cords[9]:= IntToBox(607, 287, 635, 308);
Cords[10]:= IntToBox(650, 289, 675, 307);
Cords[11]:= IntToBox(691, 289, 715, 307);
Cords[12]:= IntToBox(566, 322, 591, 342);
Cords[13]:= IntToBox(606, 324, 633, 342);
Cords[14]:= IntToBox(649, 326, 674, 344);
Cords[15]:= IntToBox(691, 323, 716, 342);
Cords[16]:= IntToBox(565, 362, 592, 381);
Cords[17]:= IntToBox(606, 361, 632, 380);
Cords[18]:= IntToBox(648, 362, 674, 378);
Cords[19]:= IntToBox(691, 361, 714, 378);
Cords[20]:= IntToBox(565, 394, 590, 413);
Cords[21]:= IntToBox(607, 400, 633, 415);
Cords[22]:= IntToBox(650, 397, 676, 413);
Cords[23]:= IntToBox(690, 397, 717, 415);
Cords[24]:= IntToBox(564, 434, 591, 450);
Cords[25]:= IntToBox(606, 430, 631, 450);
Cords[26]:= IntToBox(648, 435, 675, 452);
Cords[27]:= IntToBox(691, 431, 717, 448);
end;
procedure CleanHerbs;
begin
if not LoggedIn then
Exit;
AntiRandoms(True);
Z:= InvCount - 1;
CallArray;
for I:= 0 to Z do
begin
AntiRandoms(False);
MouseBox(Cords[I].X1, Cords[I].Y1, Cords[I].X2, Cords[I].Y2, 3);
Wait(1000 + Random(100));
if (IsUptext('rimy')) then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, True);
Inc(D);
end;
Wait(100);
end;
AntiRandoms(True);
end;
procedure Banking;
begin
AntiRandoms(True);
if not LoggedIn then
Exit;
if not OpenBankFast('lb') then
if not OpenBankGlass('lb', True, True) then
if not OpenBankQuiet('lb') then
Exit;
Wait(100 + Random(20));
if (InvCount > 0) then
DepositAll;
MouseBox(47, 94, 63, 119 ,3);
Wait(1000 + Random(200));
if not (IsUptext('rimy')) then
begin
CloseBank;
NextPlayer(False);
end else
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, False);
ChooseOptionQuick(X, Y, 4);
CloseBank;
AntiRandoms(True);
end;
end;
procedure ScriptTerminate;
begin
WriteLn(Padr('/ Radicalrobbie''s Herb Cleaner \', 70));
WriteLn(Padr('/ Worked for ' + TimeRunning + ' \', 70));
WriteLn(Padr9'/ Cleaned ' + IntToStr(D) + ' herbs \', 70));
end;
begin
SetupSRL;
ActivateClient;
DeclarePlayers;;
LoginPlayer;
repeat
Banking;
CleanHerbs;
until(AllPlayersInactive);
end.