Uhm, sometimes the script just randomly stops, and I don't know why?

It stops when cutting the Willows, so I'm guessing the problem will be in there.

Also please post comments/improvements I could make to the script as I am hoping to apply for members with is eventually. Thanks.

It's a Draynor Willow Banker just so you know.

SCAR Code:
program DraynorWillows;
  {.Include SRL\SRL\Misc\SMART.SCAR}
  {.include SRL\SRL.scar}
  {.include SRL\SRL\Misc\Debug.scar}
 
var
  HatchetDTM : Array of Integer;
  x, y, c, NumOfLogs, TotalProggies : Integer;
  XpGain : TExtendedArray;
  TP : TPoint;
 
const
  RunOn = True;//Set False to turn run off.
 
procedure DeclarePlayers;
begin
  HowManyPlayers := 1;
  NumberOfPlayers(HowManyPlayers);
  CurrentPlayer := 0;

  Players[0].Name := '';
  Players[0].Pass := '';
  Players[0].Nick := '';
  Players[0].Active := True;
  Players[0].Pin := '';
  Players[0].Integers[0] := 200;//How many logs to cut?
  Players[0].BoxRewards := ['Xp', 'mote', 'ostume'];

 {Players[1].Name := '';
  Players[1].Pass := '';
  Players[1].Nick := '';
  Players[1].Active := True;
  Players[1].Pin := '';
  Players[1].Integers[0] := 000;//How many logs to cut?
  Players[1].BoxRewards := ['Xp', 'mote', 'ostume'];}

end;

procedure S_FindRandoms;
begin
  if FindFight then
    RunAway('N', True, 1, 5000);
  LampSkill := 'woodcutting';
  FindNormalRandoms;
end;

function S_LevelUp: Boolean;
begin
  if ClickContinue(True, True)then
  begin
    Writeln('Congratulations, you have gained a Woodcutting level!');
    Result := True;
  end;
end;

procedure S_MyAntiBan;
begin
  case Random(70) of
    0: RandomMovement;
    1: BoredHuman;
    2: HoverSkill('random', false);
    3: RandomRClick;
    4: begin
         case Random(2) of
           0: begin
                KeyDown(VK_RIGHT);
                Wait(50 + Random(1300));
                KeyUp(VK_RIGHT);
                Wait(60 + Random(2000));
                KeyDown(VK_LEFT);
                Wait(70 + Random(1100));
                KeyUp(VK_LEFT);
              end;
           1: begin
                KeyDown(VK_LEFT);
                Wait(50 + Random(1300));
                KeyUp(VK_LEFT);
                Wait(60 + Random(2000));
                KeyDown(VK_RIGHT);
                Wait(70 + Random(1100));
                KeyUp(VK_RIGHT);
              end;
          end;
       end;
    5: begin
         KeyDown(VK_LEFT);
         Wait(100 + Random(1200));
         KeyUp(VK_LEFT);
       end;
    6: begin
         KeyDown(VK_RIGHT);
         Wait(150 + Random(1100));
         KeyUp(VK_RIGHT);
       end;
    7..69:
  end;
end;

procedure S_HatchetDTMs;
begin
 SetArrayLength(HatchetDTM, 7);//[0]:= Bronze, [6]:= Rune
   HatchetDTM[0] := DTMFromString('78DA630C646260D8C4C8800C7CAC9519F8813' +
       '44C94D113A86617AA1A982C5C8D1B50CD36026ABC816AD6125013' +
       '0C54B38E809A504C3763A80921EC1E00949107EF');
   HatchetDTM[1] := DTMFromString('78DA630C626260D8C4C8800C02BDBD19F8813' +
       '448F43F1030BA03D5EC47550391859140DA0DA8662B01355E4035' +
       '6B09A80906AA5947404D2850CD06026A42806AB6E157030033F30' +
       'C28');
   HatchetDTM[2] := DTMFromString('78DA630C626260D8C8C8800CCAF3F318F8813' +
       '448F43F10307A02D5EC40550391859140DA0DA8660B01355E4035' +
       '6B09A80904AA5947404D28A69BB1AAD98A5F0D0090050C8D');
   HatchetDTM[3] := DTMFromString('78DA63F4676260D8C0C8800C44454418F8813' +
       '448F43F1030BA03D5EC43550391859140DA05A8661701351E4035' +
       'EB09A80900AA5947404D28A69BB1AAD98A5F0D0095870B78');
   HatchetDTM[4] := DTMFromString('78DA630C646260D8C8C8800C1C1CE319F8813' +
       '44C94D10DA8E600AA1A982C5C8D2B50CD0E026A3C806A36105013' +
       '0054B38E809A504C3763A80901AAD9865F0D00C5940824');
   HatchetDTM[5] := DTMFromString('78DA63EC64626038C0C8800C9C829D18F8813' +
       '44C94B101A8E614AA1A982C8A9A7D04D4F402D5EC2742CD21026A' +
       '6A816AAEE05703006FA208C7');
   HatchetDTM[6] := DTMFromString('78DA638C676060E8614001AE31690CFC409A1' +
       '188FF0301633090B180010D302291403A1048CC22A0260448F413' +
       '501309243A08A84902129D04D42403895EFC6A00F1EB0B8F');
end;

procedure W_WalkToWillows;
begin
  if not LoggedIn then Exit;
  if RadialWalk(FindWaterColor, 180, 220, 60, -2, 1)then
  begin
    Wait(80 + Random(100));
    Writeln('Walking to Willows.');
    FFlag(2);
  end else
  begin
    if FindSymbol(x, y, 'fish')then
    begin
      Wait(80 + Random(100));
      Writeln('Walking to Willows.');
      Mouse(x, y - 20 - Random(15), 4, 4, True);
      FFlag(2);
    end else
    begin
      Writeln('Couldn''t walk to Willows.');
      Logout;
      Players[CurrentPlayer].Active := False;
      Exit;
    end;
  end;
end;

procedure W_WalkToBank;
begin
  if not LoggedIn then Exit;
  MakeCompass('n');
  if RadialWalk(3553083, 0, 77, 68, -2, 1)then
  begin
    Wait(80 + Random(100));
    Writeln('Inventory full, walking to bank.');
    FFlag(2);
  end else
  begin
    if FindSymbol(x, y, 'bank')then
    begin
      Wait(80 + Random(100));
      Mouse(x, y, 4, 4, True);
      Writeln('Inventory full, walking to bank.');
      FFlag(2);
    end else
    begin
      if FindColorSpiralTolerance(x, y, 5395290, MMX1, MMY1, MMX2, MMY2, 0)then
      begin
        Mouse(x, y, 4, 4, True);
        Writeln('Inventory full, walking to bank.');
        FFlag(2);
      end else
      begin
        Writeln('Couldn''t walk to bank.');
        Logout;
        Players[CurrentPlayer].Active := False;
        Exit;
      end;
    end;
  end;
end;

procedure Cut_FindHatchet;
var
  b: Boolean;
  i: Integer;
begin
  GameTab(5);
  for i:= 0 to 6 do
    if(FindDTM(HatchetDTM[i], x, y, MIX1, MIY1, MIX2, MIY2))then
    begin
      b:= True;
      Break;
    end;
    if(b = True)then
      Writeln('Found hatchet.')
    else
    begin
      Writeln('Didn''t find hatchet, logging out.');
      Wait(80 + Random(100));
      Logout;
      Players[CurrentPlayer].Active := False;
      Exit;
    end;
  FreeDTM(HatchetDTM[i]);
end;

function Cut_TreeCutDown: Boolean;
var
  TrCols : TPointArray;
begin
  FindColorsTolerance(TrCols, 5667697, TP.x - 20, TP.y - 20, TP.x + 20, TP.y + 20, 18);
  if(Length(TrCols) < 10)then
  begin
    //Writeln('Tree has been cut down.');
    Result := True;
  end;
end;

procedure Cut_ChopTrees;
var
  fx, fy, k : Integer;
  s : String;
  TPA : TPointArray;
  T2D : T2DPointArray;
begin
  ColorToleranceSpeed(2);
  repeat
    FindColorsSpiralTolerance(fx, fy, TPA, 5667697, MSX1, MSY1, MSX2, MSY2, 18);
    T2D := SplitTPAEx(TPA, 5, 5);
    DebugATPA(T2D, '');
    if Length(T2D) = 0 then Exit;
    SortATPAFromFirstPoint(T2D, Point(MSCX, MSCY));

    for k := 0 to High(T2D) do
    begin
      Writeln('Length:' + IntToStr(Length(T2D[k])));
      if(Length(T2D[k]) < 50)then Continue;
      MiddleTPAEx(T2D[k], fx, fy);
      Wait(30 + Random(20));
      MMouse(fx, fy, 4, 4);
      s := RS_GetUpText;
      if((Pos('hop', s) > 0) and (Pos('illow', s) > 0))then
      begin
        GetMousePos(x, y);
        Wait(80 + Random(100));
        Mouse(x, y, 4, 4, True);
        TP := IntToPoint(x, y);
        repeat
          S_MyAntiBan;
          Wait(80 + Random(5000));
          if S_LevelUp then Continue;
          S_FindRandoms;
        until(Cut_TreeCutDown or InvFull);
      end;
    end;
  until(InvFull or not LoggedIn);
  ColorToleranceSpeed(1);
end;

procedure B_BankItems;
var
  DepositAllTab : Integer;
begin
  DepositAllTab := DTMFromString('78DA633CC0C8C0A0C4C4800C9A7DE518F8813' +
       '42394CF7810C8124155C3C6C6029183A939016449A1AAE1E5E146' +
       '557314C85221A06627A61A0CBBB6035912F8D50000849406C2');
  if OpenBank('db', True, True)then
  begin
    if FindDTM(DepositAllTab, x, y, MSX1, MSY1, MSX2, MSY2)then
    begin
      MMouse(x, y, 4, 4);
      if IsUpText('eposit')then
      begin
        Mouse(x, y, 4, 4, True);
        Wait(80 + Random(1000));
        CloseBank;
      end;
    end else
      DepositAll;
    NumOfLogs := NumOfLogs + 28
    if(NumOfLogs >= Players[CurrentPlayer].Integers[0])then
    begin
      Writeln('Cut desired number of logs, logging out.');
      Wait(80 + Random(100));
      Logout;
      Players[CurrentPlayer].Active := False;
      Exit;
    end;
  end;
end;

{****************************
 Function Prg_PlayerActivity;
 By: Drags111
 ****************************}


function Prg_PlayerActive(i : Integer): String;
begin
  if Players[i].Active then Result := 'T' else Result := 'F';
end;

procedure Prg_ProgReport;
var
  i : Integer;
begin
  Players[i].Integers[9] := NumOfLogs / 28;
  Players[i].Integers[10] := NumOfLogs;
  Inc(TotalProggies);
  Writeln(' _______________________________________________');
  Writeln(PadR('|            Coh3n''s Power Chopper', 48) + '|');
  Writeln('|_________________First Script__________________|');
  Writeln('|                                               |');
  Writeln(PadR('|  Time run: ' + TimeRunning, 48) + '|');
  Writeln(PadR('|  Loads: ' + IntToStr(NumOfLogs / 28), 48) + '|');
  Writeln(PadR('|  Logs: ' + IntToStr(NumOfLogs), 48) + '|');
  Writeln(PadR('|  Exp Gained: ' + FloatToStr(NumOfLogs * 67.5), 48) + '|');
  Writeln('|_______________________________________________|');
  Writeln('|________________Player''s Stats_________________|');
  Writeln('|      Nick      T/F      Loads      Logs       |');
  Writeln('|      ¯¯¯¯      ¯¯¯      ¯¯¯¯¯      ¯¯¯¯       |');
  for i := 0 to High(Players)do
    Writeln('|      ' + PadR(Players[i].Nick, 10) + PadR(Prg_PlayerActive(i), 9)
                      + PadR(IntToStr(Players[i].Integers[9]), 11)
                      + PadR(IntToStr(Players[i].Integers[10]), 11) + '|');
  Writeln('|_______________________________________________|');
end;

procedure F_Setup;
begin
  ClearDebug;
  SMARTSetupEx(152, False, True, False);
  Wait(5000);
  SetTargetDC(SmartGetDC);
  SetupSRL;
  ActivateClient;
  DeclarePlayers;
  LoginPlayer;
  SetAngle(True);
  if RunOn then SetRun(True);
  S_HatchetDTMs;
end;

begin
  F_Setup;
  repeat
    repeat
      Cut_FindHatchet;
      begin
        W_WalkToWillows;
        Cut_ChopTrees;
        W_WalkToBank;
        B_BankItems;
        Prg_ProgReport;
      end;
    until(NumOfLogs >= Players[CurrentPlayer].Integers[0])or(not LoggedIn);
    NextPlayer(False);
  until False;
end.

Thanks.