SRL Archive - Help

Need help finding/clicking a color.


iridektm

2012-02-13 16:11:31

This is a small piece of my script, I need it to find the coordinates of that green plant thing on the stall, then click it basicly. thats all im stuck on. Right now it just moves the mouse to (0,0) for whatever reason. This isn't RS so i have to write all my own procedures mostly.

program Awesomestuff;
{$I SRL/SRL.simba}
var
a, r: integer;

Procedure Thieveit;
begin
if(FindColor(a, r, 1348368, MMX1, MMY1, MMX2, MMY2))then
wait(150);
Mouse(a, r,1,1,true);
end;
begin
SetupSRL;
ActivateClient;
Thieveit;
end.



Thanks a ton - Andy.

JuKKa

2012-02-13 16:13:00

MMX1, MMY1, MMX2, MMY2

should be MS

then you can try changing findcolor to findcolortolerance.

iridektm

2012-02-13 16:14:39

On a private server? and when i change it to if(FindColor(a, r, 1816597, MS))then
it still just moves mouse to (0,0)

iridektm

2012-02-13 16:34:44

please help i really need this finished

Kasi

2012-02-13 16:38:33

if(FindColor(a, r, 1816597, MS))
should be

if(FindColor(a, r, 1348368, MSX1, MSY1, MSX2, MSY2))then

iridektm

2012-02-13 16:45:53

It doesnt work, im using that, It moves the mouse to (0,0) and just sits there

Harry

2012-02-13 16:51:15

You need begin/end after an if statement if you want it to do more than one thing. Chances are it's not returning the color for some reason (thus making x,y=0,0).

iridektm

2012-02-13 17:11:39

@Harry, I love you haha, ive been trying to get this answered for so long now, *Tucks first script under belt* thanks Man!