Results 1 to 8 of 8

Thread: I thought i was doing TPA's right....

  1. #1
    Join Date
    Mar 2009
    Location
    Illinois
    Posts
    292
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default I thought i was doing TPA's right....

    SCAR Code:
    procedure WoodCutColor;
    var
      OakTPA: TPointArray;
      OakTP: Tpoint;
    begin
      repeat
      if(FindColorsTolerance(OakTPA, 3832687, MSx1, MSy1, MSx2, MSy2, 15))then
      for i := 0 to high(OakTPA) do
      begin
        OakTPA[i] := OakTP;
        MMouse(OakTP.x, OakTP.y, 3, 3);
        if(IsUpText('hop'))then
        begin
          D('We have found an Oak Tree');
          GetMousePos(x, y);
          case random(2) of
            0: Mouse(x, y, 0, 0, true);
            1: begin
                 Mouse(x, y, 0, 0, false);
                 W(500, 500);
                 ChooseOption('hop');
               end;
          end;
        end;
      end;
      WoodCuttingWait;
      until(R_invfull)
    end;

    Just moves the mouse around the top right hand corner?

  2. #2
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OakTP doesn't equal anything?

    You do this:
    SCAR Code:
    OakTPA[i] := OakTP;
    MMouse(OakTP.x, OakTP.y, 3, 3);

    When All the information is in OakTPA. It should be MMouse(OakTPA[i].x,OakTPA[i].y,3,3);

    Or you should have done:

    SCAR Code:
    OakTP := OakTPA[i];

    Then you could have left MMouse the same.
    Last edited by JAD; 07-27-2009 at 12:22 AM.

  3. #3
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by All that is man View Post
    SCAR Code:
    procedure WoodCutColor;
    var
      OakTPA: TPointArray;
      OakTP: Tpoint;
    begin
      repeat
      if(FindColorsTolerance(OakTPA, 3832687, MSx1, MSy1, MSx2, MSy2, 15))then
      for i := 0 to high(OakTPA) do
      begin
        OakTPA[i] := OakTP;
        MMouse(OakTP.x, OakTP.y, 3, 3);
        if(IsUpText('hop'))then
        begin
          D('We have found an Oak Tree');
          GetMousePos(x, y);
          case random(2) of
            0: Mouse(x, y, 0, 0, true);
            1: begin
                 Mouse(x, y, 0, 0, false);
                 W(500, 500);
                 ChooseOption('hop');
               end;
          end;
        end;
      end;
      WoodCuttingWait;
      until(R_invfull)
    end;

    Just moves the mouse around the top right hand corner?
    There is a TPA tut by PoW (Prisoner of Wolf)
    You should check it out, it's great
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  4. #4
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by JAD View Post
    OakTP doesn't equal anything?

    You do this:
    SCAR Code:
    OakTPA[i] := OakTP;
    MMouse(OakTP.x, OakTP.y, 3, 3);

    When All the information is in OakTPA. It should be MMouse(OakTPA[i].x,OakTP[i].y,3,3);

    Or you should have done:

    SCAR Code:
    OakTP := OakTPA[i];


    Then you could have left MMouse the same.
    Right?
    ~Hermen

  5. #5
    Join Date
    Mar 2009
    Location
    Illinois
    Posts
    292
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks >.< Rep +

  6. #6
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Hermen View Post
    Right?
    I typo'd. I actually missed a A after the second TPA too

    But I think he was trying to do the second thing, which was set OakTP to OakTPA (not the other way around) for the clicking of the mouse.

  7. #7
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    He got the rep but made a mistake .
    weener
    ~Hermen

  8. #8
    Join Date
    Mar 2009
    Location
    Illinois
    Posts
    292
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh i noticed it but I just set OakTp := OakTpa[i];
    And i'm reading that tut right now, but thanks guys.

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
  •