SRL Archive - OSR Help

blood rune pick up


fluffee

2013-02-18 12:49:03

Hey everyone!
I tried making my first script today, just a very basic one for picking up bood runes from a certain spot.
It's for a private server by the way, not for runescape.
But for some reason it just doesn't work.
When I play it, it doesn't give any error or anything, but it doesn't pick up the runes either! :p
——————————————————————————————————
Program TakeBloodrune;
{$i srl/srl.simba}
Procedure TakeBloodrune;
var
X,Y:Integer;
begin
if FindColorTolerance(X, Y, 6579308, 258, 219, 108, 100, 100) then
begin
mmouse(x, y,1,1);
wait(250);
ClickMouse(X, Y, mouse_Left)
end;
end;
Begin
MouseSpeed := 15;
SetupSRL;
end.

begin
end.
——————————————————————————————————-
Sorry if I made a really dumb mistake or something, i'm new with this. :p

Ian

2013-02-18 12:53:37

Did you remember to target the client before pressing play?

Also you need to actually call your procedure in the mainloop.

Where you have
begin
end.

Change it to:
begin
TakeBloodRune;
end.

rj

2013-02-18 12:53:45

program TakeBloodrune;
{$i srl/srl.simba}

procedure TakeBloodrune;
var
X, Y: Integer;
begin
if FindColorTolerance(X, Y, 6579308, 258, 219, 108, 100, 100) then
begin
mmouse(x, y, 1, 1);
wait(250);
ClickMouse(X, Y, mouse_Left)
end;
end;

begin
MouseSpeed := 15;
TakeBloodrune;
repeat
TakeBloodrune;
until false;
end.

You did not start the procedure, and im assuming you want it to repeat so I added that:

 repeat
TakeBloodrune;
until false;

Also you don't need to do:


SetupSRL;

for a private server

fluffee

2013-02-18 13:01:57

Yeah BMWxi, I did.
Thanks rjj! but it still isn't working for some reason. :p

rj

2013-02-18 13:04:08

  if FindColorTolerance(X, Y, 6579308, 258, 219, 108, 100, 100) then

Your color tolerance is up to 100.. that will click anything! make it 5-15 lol, also make sure

, 258, 219, 108, 100,

Forms a box around the area you want to click

fluffee

2013-02-18 13:08:21

Yeah I just noticed the color tolerance, had a derp-moment there. :D
And you were right, my second values were all wrong.
It works now! thanks! :)