can someone can make this procedure to loot grapes ??

Code:
Function FindObjOnScreen(Up:String;Color,Tolerance:Integer;MC2:Variant;Hmod,Smod:Extended): Boolean;
  var
  X,Y:Integer;
    CTS,I,T: Integer;
    TPA: TPointArray;
    begin
  repeat
    Result := False;
    CTS := GetColorToleranceSpeed;

    ColorToleranceSpeed(2);

    SetColorSpeed2Modifiers(Hmod,Smod);//These are the modifiers you got from the ACA

     FindColorsSpiralTolerance(MSCX, MSCY, TPA,(Color), MSX1, MSY1, MSX2, MSY2, Tolerance);//This finds the actual item on screen calls the color and the tolerance when finding the o0bject.
    ColorToleranceSpeed(CTS);

    if (Length(TPA) < 1) then
      Exit;

    MMouse(TPA[0].X, TPA[0].Y, 5, 5);
     if WaitUpText(Up, 400) then//This is the uptext that it waits to see.
    begin
      GetMousePos(X, Y);//this goes to the declared position from FindColorsSpiralTolerance
      ClickMouse2(MC2);//This is the Is the type of mouse Click that you want it to do.
      ChooseOptionMulti(Options);//If the MC2 Was false then you use this to choose the options!
      Result := True;
      Exit;
    end;

    Until(Result)
    end;