Thanks!
Thanks!
hey i tried to make a chicken killing script for an rsps i play, all it does is tell me it was executed successfully in x amt of milliseconds.
Below is the script as it is.
Program KillChicken;
{srl/srl.simba}
Procedure ClickChicken;
var
X,Y:Integer;
begin
if FindColorTolerance(X, Y, 9943501, 200, 233, 234, 202, 5) then
begin
MoveMouse(x, y);
wait(250);
ClickMouse(X, Y, mouse_Left)
end;
end;
Begin
end.
Why doesnt it work? btw this is my first go at this
You only define the ClickChicken procedure, you never call it, so try, instead of
to call the function:begin
end.
Thebegin
ClickChicken();
end.
block is what is executedbegin
end.
Infractions, reputation, reflection, the dark side of scripting, they are.
requested this guide to be moved to outdated guides until I can update it.
It still has a lot of relevant information but it can be hard to follow at a beginner level
This is a great guide
Thanks for this! I'm starting to get the hang of it now
program new;
{$i srl-6/srl.simba}
Procedure ClickOre;
var
X,Y: Integer;
begin
if FindColorTolerance(X, Y, 3956612, 4, 4, 509, 335, 5) then
begin
MoveMouse(1, 1);
wait(250);
ClickMouse(X, Y, mouse_Left)
end;
end;
Begin
MouseSpeed := 15;
SetupSRL;
end.
i tried making this script to mine ores on a rsps. The script runs but it won't click on the ore.
i guess the FindColorTolerance(X, Y, 3956612, 4, 4, 509, 335, 5) is wrong, but how can i fix this?
it still doesn't work. can you explain me how to find correct values for the FindColorTolerance? i think that is the problem.
thanks anyway
Well you have a couple of problems. First off, you never actually call the ClickOre procedure anywhere in your program. You have it defined, but never use it, which is why I told you to have a look at KillerDou's explanation above.
Secondly,
is going to move the mouse to the static coordinate (1, 1) (relative to the targetted window). You want to move the mouse to the found instance of FindColorToleranceSimba Code:MoveMouse(1, 1);
"x, y" are integer coordinates that FindColorTolerance stores the first found point of "col" within the given tolerance of "tol"Simba Code:function FindColorTolerance(var x, y: Integer; col, x1, y1, x2, y2, tol: Integer): Boolean;
Try this:
Simba Code:program new;
{$i srl-6/srl.simba}
procedure ClickOre();
var
X, Y: Integer;
begin
if FindColorTolerance(X, Y, 3956612, 4, 4, 509, 335, 5) then
begin
MoveMouse(X, Y);
wait(250);
ClickMouse(X, Y, mouse_Left)
end;
end;
begin
MouseSpeed := 15;
ClickOre();
end.
hello i am now on this so understand me....
can we make a guide like lvl1 lvl2 lvl3 programming so we can go step by step its all mixed up in this guide there are some mis typing in the simba code like mmouse?? if you wanna show to its done just typ it good @the first (MoveMouse) so we dont get mixed up too and why is this an error? Error: File "srl/srl.simba" not found at line 2
First of all, don't double post. There is an edit button for a reason.
Second, mmouse is not a typo. It's an old mouse function from an old include. That's why it isn't being found.
I'd recommend just using Simba's built-in functions for RSPS scripting. Or else look at some of the scripts that have been released and see how they handle things.
Here is a guide to get you started with Simba: https://villavu.com/forum/showthread.php?t=58935
Thanks for the help.
There are currently 2 users browsing this thread. (0 members and 2 guests)