Hello guys,

So i was working on my yewcutter and decided to put an autocolor function in the script. Before i did this the script was working fine. Now at first it just went to the good color and just stayed there, didn't click etc. Now the script doesn't even seem to load anymore. I'm really confused and would love some help.

I have to add walking, banking etc to the script. So if u want to test it, make sure you are next to a yew.

Simba Code:
program Yewcutter;
{$DEFINE SMART}
{$DEFINE SRL5}
{$DEFINE CRASHSMART}
{$i SRL\SRL.simba}
{$i SPS\SPS.simba}


procedure DeclarePlayers;
begin
  HowManyPlayers := 1;
  NumberOfPlayers(HowManyPlayers);
  CurrentPlayer:= 0;

  Players[0].Name := ''; //Put your charactername between the ' '.
                               //This will be used to log u into the game.
  Players[0].Pass := ''; //The same as with the name, but now your password
  Players[0].Nick := ''; //Enter your Nickname here -> Only use 3-4 letters
  Players[0].Pin := ''; //For entering your pin, only needen when the banker is added
  Players[0].Active:= True; //True if u want this user to be used in the script
                            //False if u dont want this user to be used in the script
  Players[0].BoxRewards := ['oins'];
end;

procedure AntiBan;
begin
  if (not(LoggedIn)) then
  Exit;
  Case Random (1000) of
    0..8:
        begin
          HoverSkill('Woodcutting', false);
          wait(2453+Random(432));
        end;
    20..27: BoredHuman;
    40..49: PickUpMouse;
    60..70: RandomRClick;
    80..83: RandomMovement;
    100..105: ExamineInv;
    120..127:
        begin
          HoverSkill('random', false);
          sleepandmovemouse(276 + Random(100));
          PickUpMouse;
          ChooseOption('Cancel');
          SetAngle(SRL_ANGLE_HIGH);
        end;
    140..142: BoredHuman;
    160..168: PickUpMouse;
    180..190: RandomRClick;
    200: RandomMovement;
    208..217: SleepAndMoveMouse(3000 + Random(500));
  end;
end;

procedure AntiRandom;
begin
  FindNormalRandoms;
  LampSkill := 'woodcutting';
  LevelUp;
end;

function YewColor: Integer;
var
  arP: TPointArray;
  arC: TIntegerArray;
  tmpCTS, i, arL: Integer;
begin
  tmpCTS := GetColorToleranceSpeed;
  ColorToleranceSpeed(2);
  SetColorSpeed2Modifiers(0.19, 0.19);

  if not (FindColorsTolerance(arP, 4213843, MSX1, MSY1, MSX2, MSY2, 4)) then
  begin
    //Writeln('Failed to find the color, no result.');
    ColorToleranceSpeed(tmpCTS);
    SetColorSpeed2Modifiers(0.2, 0.2);
    Exit;
  end;

  arC := GetColors(arP);
  ClearSameIntegers(arC);
  arL := High(arC);

  for i := 0 to arL do
  begin
    Result := arC[i];
    //Writeln('AutoColor = ' + IntToStr(arC[i]));
    Break;
  end;

  ColorToleranceSpeed(tmpCTS);
  SetColorSpeed2Modifiers(0.2, 0.2);

  if (i = arL + 1) then
    //Writeln('AutoColor failed in finding the color.');
end;

procedure CutYew;
  var x,y, PlusOne, TreeCounter: Integer;
begin
  MakeCompass ('W')
    repeat
    PlusOne := InvCount + 1;
    if FindObjTPA(x, y, YewColor, 5, 1, 15, 60, 1100, ['Chop']) then
      begin
        WriteLn('Found some cash');
        GetMousePos(x,y);
        MMouse(x,y,0,0);
          Case Random (2) of
            0: Mouse(x,y,5,5,true);
            1:
              begin
                Mouse(x,y,5,5,false);
                Wait(100 + random (50));
                ChooseOption('hop');
              end;
          end;
          repeat
            AntiRandom;
            MarkTime(TreeCounter);
            AntiBan;
            Wait(100);
              If InvCount=PlusOne then
                WriteLn('We got some moooneeeeeyyyy');
          until (InvCount=PlusOne) or (TimeFromMark(TreeCounter) > 20000)
      end;
    Until InvFull;
end;
















procedure OneRun;
begin
  repeat
    AntiBan;
    AntiRandom;
    CutYew;
  until (Not(LoggedIn));
end;

begin
  Smart_Server := 17;
  Smart_Members := false;
  Smart_Signed := true;
  Smart_SuperDetail := false;
  clearDebug();
  setupSRL;
  DeclarePlayers;
  SetAngle(SRL_ANGLE_LOW);
  if (Not(LoggedIn)) then
    begin
      LogInPlayer;
      Wait(2500 + Random(1500));
    end;
  OneRun;
end.

Greetz okokokok