SRL Archive - OSR Help

Why doesnt this script work right


iridektm

2012-02-12 01:34:37

I made this script for a private server, It is meant to locate color 1414418, then if it finds the color click on it. every .25 seconds. It just clicks every .25 seconds no matter what.. Please help. Im trying to get it to click in client, but it clicks everywhere even outside client.


program LastResort;
{$I SRL/SRL.simba}
procedure ClickStall;
begin
ActivateClient;
SetupSRL;
end;
var x,y: integer;
begin
repeat
if (FindColor(x,y, 1414418, MMX1, MMY1, MMX2, MMY2))
then ClickMouse(x,y, mouse_Left);
Wait(250);
until (InvFull);
end.

Drax

2012-02-12 01:39:58

1. Put in MMouse(x, y, 0, 0); before the clicking part.
2. Make sure you are getting colours that are only on that object.
3. Drag cross hair on the screen you want and then press play.

Rezozo

2012-02-12 01:40:56

add mmouse(x, y, 0, 0)

Don't know if this was a problem for you (unclear?) but your wait is 250, so your click will be .25.
ex -
For one second :
wait(1000);

Edit: ninja'd by Surfing…


When you are done with the script, would you like me to test?
http://villavu.com/forum/showthread.php?t=70808

Drax

2012-02-12 01:43:52

He's not using smart :) It's for a private server.

Rezozo

2012-02-12 01:50:44

From: Surfing
He's not using smart :) It's for a private server.


Lol, read it to late, so I edited it.

Paradoxium

2012-02-15 21:56:31

program LastResort;
{$I SRL/SRL.simba}

var
x,y: integer; //since you are using these variables in the whole script just declare them at top

begin
ActivateClient; //moved these two(ActivateCLient and SetupSRL) here to clean up the script
SetupSRL;
repeat //this repeat will only repeat what is inside, not the two lines above
if (FindColor(x,y, 1414418, MMX1, MMY1, MMX2, MMY2)) then
MMouse(x,y,0,0); //this moves the mouse to the x and y coor where simba found the color you were looking for
ClickMouse(x,y, mouse_Left); //this then clicks the x, y coor that it just moved to
Wait(250);
until (InvFull);
end.

Enjoy and good luck!

mriddler

2012-02-17 21:31:59

You could try this

procedure ClickStall;

var
x, y:Integer;
begin
if FindColorSpiralTolerance(x, y, Color , 1 , 1 , 1 , 1 , 10) then

begin
MoveMouse(x, y);
ClickMouse(x, y, 1);
Wait(250);
end;
end;

Just change the 1's to the locations coordinates you wan to click in.