i am very new to scripting so i dont quiet understand all of it yet but i made this script anyway. it auto picks wheat in runescape, i know its kinda point less but i was just trying to practice. anyway the problem im having is that after a while i will stop picking the wheat when a get into the conner of the pin so i was wondering if anyone could help me with that. thx in advance.

here is he script
Code:
program AutoPicker;
{.include SRL/SRL.scar}
{.include SRL/SRL/misc/users.scar}


var
  x, y, Tries: Integer;


procedure PickTheWheat;
begin
  Tries := 0
  repeat
    if findobjcustom(x, y, ['ick', 'hea'], [6334376, 6795955, 6334376], 7) then
    begin
      MMouse(x, y, 1, 1);
      Mouse(x, y, 1, 1, true);
      Wait(random(1000) + 1000);
      end else if not findobjcustom(x, y, ['ick', 'hea'], [6334376, 6795955, 6334376], 7) then
      begin
        repeat
          Tries := Tries + 1;
          Wait(random(1000) + 1000);
        until(Tries = 20);
        if Tries = 20 then
        begin
          WriteLn('Cannot Find Wheat');
          TerminateScript;
        end;
      end;
  until(InvFull);
end;
  begin
    SetupSRL;
    SRLPlayerForm(true, [], [], [], []);
    LoginPlayer;
    PickTheWheat;
  end.