Hey,
How do I use this in a script?
SCAR Code:FindColorSkipBoxTolerance
Thanks in advance.
Fort Ash
Hey,
How do I use this in a script?
SCAR Code:FindColorSkipBoxTolerance
Thanks in advance.
Fort Ash
I was born to cheat on Hero
I wanted to explain it for you, but I thought it would be easier explained with a script. Take a look at this:
SCAR Code:program New;
{.include SRL/SRL.scar}
function FindObjectSkipBoxTol: Boolean;
var
SkipBox: TBox;
X, Y: Integer;
UpText: string;
begin
Color := 0; // Set the color to search for.
Tolerance := 0; // Set the tolerance to search for.
UpText := ''; // Set the uptext for the target object.
with SkipBox do
begin
X1 := 0; // Set the coordinates for the SkipBox.
Y1 := 0;
X2 := 0;
Y2 := 0;
end;
Result := False;
If not LoggedIn then Exit;
if FindColorSkipBoxTolerance(X, Y, Color, MSX1, MSY1, MSX2, MSY2, Tolerance, SkipBox) then
begin
MMouse(X, Y, 4, 4);
Wait(170 + Random(175));
if Pos(UpText, RS_GetUpText) > 0 then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, True);
Result := True;
end;
end;
end.
begin
WriteLn('Object found: ' + BoolToStr(FindObjectSkipBoxTol));
end.
Scripts: Varrock Smither! | Fight Caves Runner! | Kebab Buyer! | L.A.M.E. (Outdated)
Tutorials: SRL user-defined procedures | JaGex UID files | Printing your scripts
Applications: StartUp Notepad | SCAR Assistant
Misc: FREE Delphi 7 v2 | Official SRL Graphics
You can alteratively use the IntToBox conversion. Which means you dont have to create a variable. e.g
SCAR Code:with SkipBox do
begin
X1 := 0; // Set the coordinates for the SkipBox.
Y1 := 0;
X2 := 0;
Y2 := 0;
end;
can be changed to
Just like FindColor e.t.cSCAR Code:SkipBox := IntToBox(0, 0, 0, 0);
Hey,
Thanks guys !
Fort Ash
I was born to cheat on Hero
There are currently 1 users browsing this thread. (0 members and 1 guests)