What's the procedure for after SCAR finds your DMT, it clicks on it?
What's the procedure for after SCAR finds your DMT, it clicks on it?
After you have use FindDTM it will store the DTMs location in the coordinates you give it, usually x and y. What you want to do is use FindDTM in an if statement so that if its found, it will click (using Mouse).
SCAR Code:if (FindDTM(YourDTM, x, y, MIx1, MIy1, MIx2, MIy2)) then
begin
Wait(500+random(250)); // wait so it looks more human like
Mouse(x, y, 5, 5, True); // left clicks the DTM, false for a right click
Writeln('Clicked YourDTM!');
end else
begin
Writeln('Could Not Find YourDTM!');
// Other Failsafes Here
end;
Ya, listen to Dusk, he's pro at DTMs. He's even gotten a 5 star tutorial on it.
I keep getting
Line 10: [Error] (10:1): Unknown identifier 'Mouse' in script
I don't even know if mouse is a command o.o
And when i change it to clickmouse i get
Line 10: [Error] (10:35): Invalid number of parameters in script
haver you included the SRL iclude??
and SetUpSRl? etc
No lol o.0
What is that?
Okay here is the full program to use. I don't know how much you know of scripting so there are lots of little comments.
SCAR Code:program YourProgram; // this is the name of your program
{.include SRL/SRL.scar}
//--Above is the SRL include - VERY IMPORTANT!!--//
var
x, y : Integer; //We declare x and y (our coordinate variables) as integers (or numbers)
YourDTM : Integer; //YourDTM is also a number
procedure ClickDTM; // name a procedure - its like a small program in itself
begin
if (FindDTM(YourDTM, x, y, MIx1, MIy1, MIx2, MIy2)) then //MIx1, MIy1, MIx2, MIy2 refer to the coordinates of your inventory
begin
Wait(500+random(250)); // wait so it looks more human like
Mouse(x, y, 5, 5, True); // left clicks the DTM, false for a right click
Writeln('Clicked YourDTM!'); // writes the message in the debug box (the one in the bottom left)
end else
begin
Writeln('Could Not Find YourDTM!');
// Other Failsafes Here
end;
end;
//--This is where your main loop (main part of your program) begins--//
begin
SetupSRL; //activates SRL - VERY IMPORTANT
ActivateClient; //makes SCAR find your runescape screen
ClickDTM; //Runs through our ClickDTM procedure from up above
end. //use a period after this end because it ends your whole program
Dusk thank you so much!
I had no idea how important the "{.include SRL/SRL.scar}" was.
Rep+'d![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)