Results 1 to 5 of 5

Thread: Map Walking Help?

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

    Default Map Walking Help?

    Edit: Ive tryed Radial Walking and DTMs but cant seem to get them to work could some give me pointers where to go because ive read tuts on them but never get them to work
    Last edited by rya; 03-02-2010 at 07:44 PM.
    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

    SCAR Code:
    Function TpaFind(No,look: integer; text: string):Integer;
    Var i,a: Integer;
        TPA: TPointArray;
        MyPoint: TPoint;
    Begin
    If Not LoggedIn Then Exit;

      x := MSCx;
      y := MSCy;
      A := 0;
      SetColours(No);

      FindColorsSpiralTolerance(x, y, TPA, Colour, MSx1, MSy1, MSx2, MSy2, 10);
      If Length(TPA) = 0 Then
      Begin
      Result := 0;
      Exit;
      End;
      SetColorSpeed2Modifiers(0.2, 0.2);
      ColorToleranceSpeed(1);

      If (Text = 'None') Then
      Begin
        Result := True; // not really sure what you want to do with this but you can't set an Integer to True obviously so you will need to change it.
        Exit;
      End;

      For i := 0 To High(TPA) Do
      Begin
        MyPoint := TPA[i]
        Inc(a);
        MMouse (MyPoint.x, MyPoint.y, 3, 3);

            If IsUpText(Text) Then
            Begin
              Result := GetColor(MyPoint.x, MyPoint.y);
              Exit;
            End Else
              Result := 0;

        If (A >= look) Then
        Begin
          Result := 0;
          Exit;
        End;

      End;
    End;

    I believe that's what you want. It should return the color at the spot where it finds the UpText.

  3. #3
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That's called autocoloring, there are plenty of tutorials on that. You can also use RadialWalkTolerance to avoid autocoloring.


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

    Default

    Quote Originally Posted by NCDS View Post
    SCAR Code:
    Function TpaFind(No,look: integer; text: string):Integer;
    Var i,a: Integer;
        TPA: TPointArray;
        MyPoint: TPoint;
    Begin
    If Not LoggedIn Then Exit;

      x := MSCx;
      y := MSCy;
      A := 0;
      SetColours(No);

      FindColorsSpiralTolerance(x, y, TPA, Colour, MSx1, MSy1, MSx2, MSy2, 10);
      If Length(TPA) = 0 Then
      Begin
      Result := 0;
      Exit;
      End;
      SetColorSpeed2Modifiers(0.2, 0.2);
      ColorToleranceSpeed(1);

      If (Text = 'None') Then
      Begin
        Result := True; // not really sure what you want to do with this but you can't set an Integer to True obviously so you will need to change it.
        Exit;
      End;

      For i := 0 To High(TPA) Do
      Begin
        MyPoint := TPA[i]
        Inc(a);
        MMouse (MyPoint.x, MyPoint.y, 3, 3);

            If IsUpText(Text) Then
            Begin
              Result := GetColor(MyPoint.x, MyPoint.y);
              Exit;
            End Else
              Result := 0;

        If (A >= look) Then
        Begin
          Result := 0;
          Exit;
        End;

      End;
    End;

    I believe that's what you want. It should return the color at the spot where it finds the UpText.
    Umm thanks but i kind of still need it to be a boolean but i thing i know how to do now so thanks

    Also the no uptext is to check if something is there E.x grass on the minimap
    I see Now, says the blind man

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

    Default

    Ok, if you still need help with it later you can MSN me if you'd like.

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
  •