SCAR Code:
program New;
{.Include SRL/SRL/Misc/SMART.SCAR}
{.include SRL\SRL.Scar}
{
Fighting: Red / Yellow X detector when clicking things
EquipmentStats.x := 588 + RanInt(15);
EquipmentStats.y := 432 + RanInt(15);
ExitButton.x := 490 + RanInt(6);
ExitButton.y := 45 + RanInt(6);
Head.x := 420 + RanInt(15);
Head.y := 85 + RanInt(15);
Neak.x := 420 + RanInt(15);
Neak.y := 125 + RanInt(15);
Body.x := 420 + RanInt(15);
Body.y := 165 + RanInt(15);
Leggs.x := 420 + RanInt(15);
Leggs.y := 205 + RanInt(15);
Feet.x := 420 + RanInt(15);
Feet.y := 245 + RanInt(15);
Cape.x := 380 + RanInt(15);
Cape.y := 125 + RanInt(15);
Arrow.x := 460 + RanInt(15);
Arrow.y := 123 + RanInt(15);
Wepon.x := 365 + RanInt(15);
Wepon.y := 160 + RanInt(15);
Shild.x := 480 + RanInt(15);
Shild.y := 160 + RanInt(15);
Glove.x := 365 + RanInt(15);
Glove.y := 245 + RanInt(15);
Ring.x := 480 + RanInt(15);
Ring.y := 245 + RanInt(15);
}
var
ItemShapTPA : TPointArray;
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;
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 ScriptSetup;
begin
SetupSRL;
SetupSmart;
ActivateClient;
ClearDebug;
DeclarePlayers;
if not LoggedIn then LogInPlayer;
SetAngle(true);
MakeCompass('n');
SetRun(true);
end;
{ANTIBAN FUNCTIONS}
function CheckIfEquipted(position : Integer) : Boolean;
begin
case Position of
0: if GetColor(424, 88) <> 2304814 then Result := True;//Head
1: if GetColor(385, 118) <> 2304814 then Result := True;//Cape
2: if GetColor(428, 121) <> 2304814 then Result := True;//Neak
3: if GetColor(466, 126) <> 2304814 then Result := True;//Arrow
4: if GetColor(370, 166) <> 2304814 then Result := True;//Wepon
5: if GetColor(425, 162) <> 2304814 then Result := True;//Body
6: if GetColor(472, 153) <> 2304814 then Result := True;//Shild
7: if GetColor(424, 204) <> 2304814 then Result := True;//Leggs
8: if GetColor(370, 247) <> 2304814 then Result := True;//Gloves
9: if GetColor(420, 233) <> 2304814 then Result := True;//Feet
10: if GetColor(478, 240) <> 2304814 then Result := True;//Ring
end;
end;
function RemoveEquipment(position : Integer) : TPoint;
var
x, y, ran : Integer;
Head, Neak, Body, Leggs, Feet, Cape, Arrow, Wepon, Shild, Glove, Ring : Tpoint;
begin
ran := RanInt(10);
case position of
0: Result := IntToPoint(420 + ran, 85 + ran);
1: Result := IntToPoint(380 + ran, 125 + ran);
2: Result := IntToPoint(420 + ran, 125 + ran);
3: Result := IntToPoint(460 + ran, 123 + ran);
4: Result := IntToPoint(365 + ran, 160 + ran);
5: Result := IntToPoint(420 + ran, 165 + ran);
6: Result := IntToPoint(480 + ran, 160 + ran);
7: Result := IntToPoint(420 + ran, 203 + ran);
8: Result := IntToPoint(365 + ran, 245 + ran);
9: Result := IntToPoint(420 + ran, 245 + ran);
10: Result := IntToPoint(480 + ran, 245 + ran);
end;
Mouse(Result.x, Result.y, 0, 0, true);
end;
function ItemShapeTPA(position : Integer) : TPointArray;
var
Box : TBox;//W: 29; H: 29;
begin
case position of
0: Box := IntToBox(406, 69, 435, 98);
end;
FindColorsTolerance(Result, 65536, Box.x1, Box.y1, Box.x2, Box.y2, 15);
end;
function CheckEquipmentStats : Boolean;
var
x, y, i : Integer;
EquipmentStats, ExitButton, Position : TPoint;
ItemShape : TPointArray;
begin
EquipmentStats := IntToPoint(588 + RanInt(15), 432 + RanInt(15));
ExitButton := IntToPoint(490 + RanInt(6), 45 + RanInt(6));
//if InvCount > 23 then Exit;
//GameTab(5);
//Mouse(EquipmentStats.x, EquipmentStats.y, 0, 0, true);
Wait(500+RanInt(50));
for i := 0 to 0 do // ONLY CHECKING SLOT 1
begin
if CheckIfEquipted(i) then
begin
FindColorsTolerance(ItemShape, 65536, 403, 66, 438, 101, 15);
Writeln(IntToStr(High(ItemShape)));
if High(ItemShape) < 1 then Exit;
Wait(500+RanInt(50));
//RemoveEquipment(i);
Wait(500+RanInt(50));
for i := 0 to High(ItemShape) do
begin
Position := ItemShape[i];
Writeln('ITEMSHAPE: ' + IntToStr(i));
Mouse(Position.x, Position.y, 2, 2, true);
Writeln(IntToStr(x) + IntToStr(y));
end;
end;
end;
// Mouse(ExitButton.x, ExitButton.y, 0, 0, true);
end;
var
i : Integer;
begin
ScriptSetup;
CheckEquipmentStats;
end.