Give me a few minutes to comment on your script to help you learn. I'll edit this post. 
Simba Code:
program proalchbeta;
{$i SRL\SRL.simba}
var
x, y: Integer; // all mouse movements have a randomness of 4 px
begin
ActivateClient;
SetupSRL;
Mouse(573, 259, 4, 4, true); // moves the mouse to a static location
if(FindColor(x, y, 176668, 0, 0, 500, 200))then
Mouse(x, y, 4, 4, true); // moves mouse to where it found the color Point (x, y) from above and left clicks
Wait(1000); // static wait of 1 second
ClickMouse2(true);
clickmouse2(true); // clicks the mouse left twice
if(FindColor(x, y, 176668, 0, 0, 500, 200))then
Mouse(x, y, 4, 4, true); // moves mouse to the Point (x, y) and left clicks
Clickmouse2(true)
Mouse(573, 259, 4, 4, true); // moves the mouse to a static location
if(FindColor(x, y, 176668, 0, 0, 500, 200))then
Mouse(x, y, 4, 4, true); // moves the mouse to the Point (x, y) and left clicks
Wait(2000); // static wait of 2 seconds
ClickMouse2(true);
clickmouse2(true); // clicks the mouse left twice
wait(randomrange(350,780)); // randomized wait, good job!
clickmouse2(true);
if(FindColor(x, y, 176668, 0, 0, 500, 200))then
Mouse(x, y, 4, 4, true); // again, moves the mouse to the Point (x, y) and left clicks
Clickmouse2(true); // left clicks the mouse
repeat
clickmouse2(true); // left clicks the mouse
wait(randomrange(177,220));
wait(randomrange(200,600)); // waits between 377 - 820 ms
until (Not loggedIn); // until you're logged out
end.
See some things you don't need?
Here's how I'd do it..
Simba Code:
program proalchbeta;
{$i SRL\SRL.simba}
var
x, y: Integer;
begin
ActivateClient;
SetupSRL;
repeat
if (WaitFindColor(x, y, 176668, MIX1, MIY1, MIX2, MIY2, 5, 1000) then
begin // if it finds the color in the inventory coordinates with a tolerance of 5
Mouse(x, y, 4, 4, mouse_left); // in a max time of 1 sec, then move the mouse to that location and
Wait(1500 + RandomRange(-500, 500)); // left click. Wait 1-2 sec then click the mouse again (on the item)
ClickMouse2(True);
end;
until not LoggedIn; //until you are logged out
end.