SRL Archive - Help

Scripting on RSPS.


TuSaliHai

2013-01-22 18:08:29

I am currently trying to script on an RSPS (ProjectRS06) and I followed a tutorial on this website.

Program ChopTree;
{$i srl/srl.simba}
Procedure ClickTree;
var
X,Y:Integer;
begin
if FindColorTolerance(X, Y, 3166827 , 370, 177, 382, 208, 5) then
begin
mmouse(x, y,1,1); // moves the mouse to were the color is found
wait(250); // waits one fourth of a second
ClickMouse(X, Y, mouse_Left)// clicks
end;
end;
begin
SetupSRL;
end.

That was the code I ended up with, but whenever I execute it, nothing happens.
It tells me it was successfully executed, though.

doxin

2013-01-22 18:11:00

From: TuSaliHai
I am currently trying to script on an RSPS (ProjectRS06) and I followed a tutorial on this website.

Program ChopTree;
{$i srl/srl.simba}
Procedure ClickTree;
var
X,Y:Integer;
begin
if FindColorTolerance(X, Y, 3166827 , 370, 177, 382, 208, 5) then
begin
mmouse(x, y,1,1); // moves the mouse to were the color is found
wait(250); // waits one fourth of a second
ClickMouse(X, Y, mouse_Left)// clicks
end;
end;
begin
SetupSRL;
end.

That was the code I ended up with, but whenever I execute it, nothing happens.
It tells me it was successfully executed, though.


you forgot to put ClickTree into your main loop. so it would be
begin
SetupSRL;
ClickTree;
end.

TuSaliHai

2013-01-22 18:35:10

From: doxin
you forgot to put ClickTree into your main loop. so it would be
begin
SetupSRL;
ClickTree;
end.


Ah, well, that's quite useful.
Is there a way to make it based of off not just color** Let's say it looks for the color, but it also looks for "Oak" and only cuts then.
Any suggestions**

doxin

2013-01-22 23:25:27

From: TuSaliHai
Ah, well, that's quite useful.
Is there a way to make it based of off not just color** Let's say it looks for the color, but it also looks for "Oak" and only cuts then.
Any suggestions**


you can make your own CheckUpText function, but you'd also have to make your own font. if you're lazy like me, you could just make the function check for the blue uptext at the top left of the screen. i'd suggest making a font and use that though, since i don't want to condone lazy scripting lol