SCAR Code:
program New;
{.Include SRL/SRL/Misc/SMART.SCAR}
{.include SRL\SRL.Scar}
{.include SRL\SRL\Skill\Fighting.scar}
const
MaxTime = 15; //How long you want each player to go
Tolerance = 7;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Integers[0] := 2;
end;
var
PlayTime : LongInt;
procedure SetupSmart;
begin
SMARTSetupEx(153, False, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
end;
function RanInt(magnitude : Integer) : Integer;
var
product : Integer;
begin
product := Random(magnitude+1) - Random(magnitude+1);
if(product=0) then Result := Random(magnitude) - Random(magnitude)
else Result := product;
end;
Procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(100) of
0..4:RandomRClick;
5..18:HoverSkill('attack',False);
19..30:SleepAndMoveMouse(7000);
31..56:RandomRClick;
57:BoredHuman;
58..59:HoverSkill('random',False);
60:RandomMovement;
61:Wait(1500 + Random(750));
62:begin
SetAngle(false);
Wait(Random(560 + Random(450)));
MakeCompass('W');
SetAngle(true);
MakeCompass('N');
end;
end;
Exit;
end;
{function AtackMonk: Boolean;
var
Color : TIntegerArray;
TPA : TPointArray;
ATPA : T2DPointArray;
x, y, i : Integer;
begin
if not LoggedIn then exit;
Result := False;
Color := [8957142, 2900557, 1516072,3691618, 2438977];
for i := 0 to 4 do
X := MSCX;
Y := MSCY;
begin
FindColorsSpiralTolerance(X, Y, TPA, Color[i], 153, 111, 246, 257, 7);
begin
ATPA := SplitTPA(TPA, 22);
for i := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 3, 3);
Wait(100+Random(100));
if IsUpText('tack') then
begin
Wait(100+RanInt(200));
Mouse(x, y, 4, 4, True);
Wait(100+RanInt(200));
Result:= True;
end else
begin
Mouse(x, y, 2, 2, False);
Wait(100+RanInt(200));
ChooseOption('tack');
Wait(100+RanInt(200));
Result:= True;
end;
end;
end;
end;
end;}
function AtackMonk: Boolean;
var
x, y, waitTree, count, i : integer;
Color: TIntegerArray;
Switch : Boolean;
begin
if(InvFull or not LoggedIn) then Exit;
Result := False;
Color := [8957142, 2900557, 1516072,3691618, 2438977];
for i := 0 to 12 do
begin
if FindObjTPA(x, y, Color[i], Tolerance, -1, 15, 20, 4, ['tack', 'onk']) then
begin
if not IsFightAt(x, y) then
begin
MMouse(x, y, 2, 2);
if IsUpText('tack') then
begin
Mouse(x, y, 4, 4, True);
Wait(100+RanInt(200));
Result:= True;
end else
begin
Mouse(x, y, 2, 2, False);
Wait(100+RanInt(200));
ChooseOption('tack');
Wait(100+RanInt(200));
Result:= True;
end;
end;
end;
end;
end;
procedure ScriptSetup;
begin
SetupSRL;
SetupSmart;
ActivateClient;
ClearDebug;
DeclarePlayers;
if {RSReady or} not LoggedIn then LogInPlayer;
SetAngle(true);
MakeCompass('n');
SetRun(true);
end;
begin
ScriptSetup;
repeat
MarkTime(PlayTime);
repeat
if InFight then
begin
Wait(1000+RanInt(1000));
AntiBan;
end else AtackMonk;
until(not LoggedIn or (TimeFromMark(PlayTime) >= (MaxTime*60000)));
until(CurrentPlayer = HowManyPlayers);
end.