Results 1 to 4 of 4

Thread: FindTPAInTPA

  1. #1
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default FindTPAInTPA

    I've been trying to find some way to make the script tell me if my MOUSE POSITION is in a tpa with findtpaintpa.

    I couldn't get this working (on the below picture ) no matter what, it keeps on telling me tpa matched...


    Simba Code:
    program TPA;
    {$i SRL\SRL.scar}
    {$i SRL\SRL\misc\Debug.scar}

    Var
      TP, MSCP, MSEP: Tpoint;
      OldDB: String;

    Procedure FindWaterBound;
    Var
      TP : Tpoint;
      TPA, RandomTPA: TPointArray;
    Begin
      GetClientDImensions( MSEP.X, MSEP.Y);
      If FindColorsSpiralTolerance( TP.X, TP.Y, TPA, 16711422, 0, 0, MSEP.X - 1, MSEP.Y - 1, 200) Then
      Begin
        DebugTPA( TPA, '');
        Repeat
          GetMousePos( TP.X, TP.Y);
          If FindTPAInTPA( [TP], TPA, RandomTPA) Then
            Disguise( 'TPA matched')
          Else
            Disguise( 'TPA did not match');
        Until False
      End;
    End;

    Begin
      SetupSRL;
      MouseSpeed := 999;
      FindWaterBound;
    End.
    Oh Hai Dar

  2. #2
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    GetMousePos(P.X, P.Y);
    PointInTPA(P, TPA);

    ?

  3. #3
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    FindTPAinTPA returns true if the first TPA points are found in the second one. That is, if P1.x == P2.x and P1.y == P2.y. It doesn't check if they are ``in the area of the tpa''. You'll need other functions for that.

    Regardless, I think this should work? Did you trying printing out the mouse location? Perhaps the value is something you don't expect.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  4. #4
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    I did try the print mouse thing. But Zyt3x i'll try that fo sho tomorrow:P
    Oh Hai Dar

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
  •