Results 1 to 3 of 3

Thread: TPA Help

  1. #1
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default TPA Help

    Simba Code:
    Function Harvest(var x, y: Integer): Boolean;   //
    Var
      CTS, I: Integer;
      TPA: TPointArray;
      ATPA: Array of TPointArray;
    Begin
    If(Not(LoggedIn))Then Exit;
    CTS := GetColorToleranceSpeed;
    ColorToleranceSpeed(2);
    SetColorSpeed2Modifiers(0.48, 1.97);
    FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2676409, MSX1, MSY1, MSX2, MSY2, 15);
    ATPA := TPAToATPAEx(TPA, 15, 15);


      For I := 0 To High(ATPA) Do
      Begin
        MiddleTPAEx(ATPA[i], x, y);
        MMouse(x, y, 2, 2);
        If(IsUpTextMultiCustom(['arve','swee'])) Then
        Begin
          Writeln('Found harvest');
          GetMousePos(x, y);
          Result := True;
          Break;
        End;
      End;
    End;

    That searches and find the sweetcorn every time, but I am also wanting to search for anything planted in the herb patch, but I don't want to make a new function...I think I will have to though....agree?
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  2. #2
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    http://villavu.com/forum/showthread.php?t=73768

    Look how he does it, he uses a Type, and records.

  3. #3
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    I think that will be perfect and funny thing I was just looking at that for something else haha. Thanks mate!
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

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
  •