Results 1 to 4 of 4

Thread: For To Do and TPAs Help

  1. #1
    Join Date
    Aug 2009
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default For To Do and TPAs Help

    Well im trying to make some TPAs work and well i cant get them to compile so help would be nice
    SCAR Code:
    Function FindSpot:Boolean;
    Var x,y,i,MyPoint: Integer;
        TPA: TPointArray;
    Begin
    If Not LoggedIn Then Exit;

      x := MSCx;
      y := MSCy;

      FindColorsSpiralTolerance(x, y, TPA, Colour, MSx1, MSy1, MSx2, MSy2, 10);
      If Length(TPA) = 0 Then
      If FindColorsSpiralTolerance(x, y, TPA, Colour1, MSX1, MSY1, MSX2, MSY2, 10) Then
      If Length(TPA) = 0 Then
      Result := False;
     
      For i := 0 To High(TPA) Do
      Begin
        MyPoint := TPA[i]
        MMouse (MyPoint.x, MyPoint.y, 3, 3);

          If IsUpText(Cow) Then
            GetMousePos(x,y);

            If Random(8)=5 Then
            Begin
              Mouse(x,y,0,0,False);
              Wait(500+Random(750);
              ChooseOption(ill);
            End Else
              Mouse(x,y,0,0);
      End;
     
    End;
    Also in the For To Do bit would it spam click every point or just one point with uptext?
    I see Now, says the blind man

  2. #2
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    MyPoint needs to be a TPoint;

    SCAR Code:
    Function FindSpot:Boolean;
    Var x,y,i: Integer;
        TPA: TPointArray;
        MyPoint: TPoint;
    Begin
    If Not LoggedIn Then Exit;

      x := MSCx;
      y := MSCy;

      FindColorsSpiralTolerance(x, y, TPA, Colour, MSx1, MSy1, MSx2, MSy2, 10);
      If Length(TPA) = 0 Then
        If FindColorsSpiralTolerance(x, y, TPA, Colour1, MSX1, MSY1, MSX2, MSY2, 10) Then
          If Length(TPA) = 0 Then
            Exit;
     
      For i := 0 To High(TPA) Do
      Begin
        MyPoint := TPA[i]
        MMouse (MyPoint.x, MyPoint.y, 3, 3);

          If IsUpText('ow') Then
          begin
            GetMousePos(x,y);

            If Random(8)=5 Then
              Mouse(x,y,0,0,False)
            else
              Mouse(x, y, 0, 0, True);
            Wait(500+Random(750);
            WaitOption('ill', 2000);
            Break;
          end;
      End;
    End;
    There, I believe that's what you want.

    ChooseOption checks to see if the option is available first so it wont execute it you didn't right click
    Last edited by NCDS; 02-26-2010 at 11:31 PM.

  3. #3
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    After you have found the one you want, remember to break the loop.

    EDIT:
    SCAR Code:
    Function FindSpot:Boolean;
    Var x,y,i,MyPoint: Integer;
        TPA: TPointArray;
    Begin
    If Not LoggedIn Then Exit;

      x := MSCx;
      y := MSCy;

      FindColorsSpiralTolerance(x, y, TPA, Colour, MSx1, MSy1, MSx2, MSy2, 10);
      If Length(TPA) = 0 Then
      If FindColorsSpiralTolerance(x, y, TPA, Colour1, MSX1, MSY1, MSX2, MSY2, 10) Then
      If Length(TPA) = 0 Then
      Result := False;
     
      For i := 0 To High(TPA) Do
      Begin
        MyPoint := TPA[i]
        MMouse (MyPoint.x, MyPoint.y, 3, 3);

          If IsUpText(Cow) Then
            GetMousePos(x,y);

            If Random(8)=5 Then
            Begin
              Mouse(x,y,0,0,False);
              Wait(500+Random(750);
              ChooseOption(ill);
            End Else begin
              Mouse(x,y,0,0);
            end;
            Break;
      End;
     
    End;
    Last edited by Frement; 02-26-2010 at 11:23 PM.
    There used to be something meaningful here.

  4. #4
    Join Date
    Aug 2009
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks it me mixing tuts and stuff out but Thanks
    I see Now, says the blind man

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
  •