Results 1 to 3 of 3

Thread: InPrisonPete changes

  1. #1
    Join Date
    Feb 2009
    Posts
    1,447
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default InPrisonPete changes

    SCAR Code:
    {*******************************************************************************
    function InPrisonPete: Boolean;
    by: ZephyrsFury, modded by TRiLeZ
    Description: Checks if we're in the Prison Pete Random.
    *******************************************************************************}

    function InPrisonPete: Boolean; //Remove 'a' if you put this in your SRL folder.
    var
      Pts: TPointArray;
      ATPA: T2DPointArray;
      X, Y, CTS: Integer;
    begin
      CTS := GetColorToleranceSpeed();
      ColorToleranceSpeed(1);
      if (FindColor(X, Y, 60909, MMX1, MMY1, MMX2, MMY2)) then
        if (CountColor(60909, MMX1, MMY1, MMX2, MMY2) = 1) then
          if (CountColorTolerance(1322555, MMX1, MMY1, MMX2, MMY2, 16) > 80) then
            if (CountColorTolerance(13884127, MMX1, MMY1, MMX2, MMY2, 18) > 1000) then
            begin
              FindColorsTolerance(Pts, 237, MMX1, MMY1, MMX2, MMY2, 22);
              ATPA := SplitTPAEx(Pts, 8, 2);
              if (InRange(Length(ATPA), 1, 4)) then
                Result := (CountColorTolerance(clWhite, MMX1, MMY1, MMX2, MMY2, 50) > 500);
            end;
      ColorToleranceSpeed(CTS);
    end;

    I just had to increase the tolerance slightly for color 1322555. Now this function should work again.

    Edit: I had to also make this use CTS 1... I can't believe ZephyrsFury didn't make it make the CTS 1...
    I also made some other small edits.
    Last edited by TRiLeZ; 01-21-2010 at 06:31 PM.

  2. #2
    Join Date
    Feb 2009
    Posts
    1,447
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

  3. #3
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •