Tell me how this looks, it's my first attempt at making a function. Please don't flame, just tell me what you like, don't like, and how I can improve it.
(I haven't tested it yet, I don't know how good it'll work but I don't see why it wouldn't)
SCAR Code:
{*******************************************************************************
function DoGnomeObstacle(Color:TIntegerArray; Text:TStringArray; Tol, Pause:Integer): Boolean;
By: Baked0420
Description: It does the Gnome Agility Course, just put in the uptext under text,
the color of the obstacle under color, set the tolerance you want,
and how long you want it to wait after clicking an obstacle under
pause.
*******************************************************************************}
Function DoGnomeObstacle(Color:TIntegerArray; Text:TStringArray; Tol, Pause:Integer): Boolean;
begin
if(not(LoggedIn)) then Exit;
If(FindObjCustom(x, y, Text, Color, Tol)) then
begin
MMouse(x, y, 2, 2);
if(IsUpTextMultiCustom(Text)) then
begin
Mouse(x, y, 2, 2, True);
wait(Pause + random(500));
end;
end;
end;