Results 1 to 9 of 9

Thread: I Need Proffesional Help :(

  1. #1
    Join Date
    Jun 2008
    Location
    Somewhere between here and there
    Posts
    117
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default I Need Proffesional Help :(

    Ok my problem is that i do not have a clue what to do. I'm just learning how to use reflection and it would be nice if i could have a little help.. Ive read tuts and sometimes i just dont get my questions answered. So here's my one question for right now.
    1. I used sumilions new reflection path maker tool to get all this

    SCAR Code:
    function LoadPath: TPointArray;
    begin
      SetLength(Result, 42);

      Result[0] := Point(3012, 3354);
      Result[1] := Point(3008, 3362);
      Result[2] := Point(3000, 3362);
      Result[3] := Point(2995, 3367);
      Result[4] := Point(2987, 3371);
      Result[5] := Point(2980, 3377);
      Result[6] := Point(2971, 3378);
      Result[7] := Point(2967, 3384);
      Result[8] := Point(2967, 3394);
      Result[9] := Point(2965, 3402);
      Result[10] := Point(2969, 3409);
      Result[11] := Point(2975, 3414);
      Result[12] := Point(2984, 3419);
      Result[13] := Point(2988, 3426);
      Result[14] := Point(2997, 3432);
      Result[15] := Point(3008, 3431);
      Result[16] := Point(3016, 3425);
      Result[17] := Point(3022, 3422);
      Result[18] := Point(3027, 3425);
      Result[19] := Point(3036, 3425);
      Result[20] := Point(3041, 3415);
      Result[21] := Point(3051, 3414);
      Result[22] := Point(3057, 3415);
      Result[23] := Point(3068, 3416);
      Result[24] := Point(3079, 3416);
      Result[25] := Point(3087, 3421);
      Result[26] := Point(3098, 3420);
      Result[27] := Point(3112, 3420);
      Result[28] := Point(3119, 3417);
      Result[29] := Point(3126, 3414);
      Result[30] := Point(3137, 3416);
      Result[31] := Point(3147, 3416);
      Result[32] := Point(3158, 3418);
      Result[33] := Point(3166, 3426);
      Result[34] := Point(3176, 3428);
      Result[35] := Point(3175, 3442);
      Result[36] := Point(3171, 3453);
      Result[37] := Point(3166, 3460);
      Result[38] := Point(3164, 3467);
      Result[39] := Point(3164, 3475);
      Result[40] := Point(3164, 3481);
      Result[41] := Point(3165, 3487);

    end;

    Now that I have all that how do I make that into a script that will walk that path? It might be something really simple, but please help me anyways it would be much appreciated.

  2. #2
    Join Date
    Mar 2007
    Location
    Players[-1].Loc
    Posts
    962
    Mentioned
    4 Post(s)
    Quoted
    5 Post(s)

    Default

    SCAR Code:
    function WalkThePath: boolean;
    var
      Path: TPointArray;
      i: integer;
    begin
      Path := LoadPath;
      for i := 0 to High(Path) do
        WalkToTile(Path[i], 3, 3);
      result := DistanceFrom(Path[High(Path)])<5;
    end;
    I think that should do it

  3. #3
    Join Date
    Jun 2008
    Location
    Somewhere between here and there
    Posts
    117
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Figured it out

    Figured it out thanks anyways. Using this instead.

    SCAR Code:
    {-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
    Function WalkToTile2(TileX, TileY: Integer): Boolean;
    By: Timer
    Description: Walks to the tile using minimap.
    -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-}

    Function WalkToTile2(TileX, TileY, Rx, Ry: Integer): Boolean;

    Var
      Tw: TPoint;

    Begin
      Tw := TileToMM(IntToPoint(Tilex, Tiley));
      if (not (InCircle(Tw.x, Tw.y, MMCX, MMCY, 74))) then
      begin
        Writeln('Tile off minimap!');
        Result := False;
        Exit;
      end;
      Mouse(Tw.x, Tw.y, Rx, Rx, True);
      Result := True;
    end;

    {-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
    Function GetMyPosOnPath(Var aVar: Integer; Path: TPointArray): Boolean;
    By: Timer
    Description: Finds your character on a specified path.  Results True If Sucsess.
    aVar is the tile in array;
    -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-}

    Function GetMyPosOnPath(Var aVar: Integer; Path: TPointArray): Boolean;

    Var
      aPath: TPointArray;
      I: Integer;
      PosG: TPoint;

    Begin
      PosG := GetMyPos;
      aPath := Path;
      SortTPAFrom(aPath, IntToPoint(PosG.x, PosG.y));
      If (Not (TileOnMM(IntToPoint(aPath[0].X, aPath[0].Y)))) Then
        Exit;
      For I := 0 To High(Path) Do
        If ((Path[i].X = aPath[0].X) And (Path[i].Y = aPath[0].Y)) Then
        Begin
          aVar := I;
          Result := True;
          Exit;
        End;
    End;

    {-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
    Function PathWalk(Path: TPointArray): Boolean;
    By: Timer
    Description: Walks The Path, If Lost, Finds Character, And Reverts To A
    R_FFlag(0); Instead Of R_FFlag(8); - Randomizes Tiles.
    -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-}

    Function PathWalk(Path: TPointArray): Boolean;

    Var
      I, I2: Integer;

    Begin
      For I := 0 To High(Path) Do
        If (Not (WalkToTile2(Path[i].X + (Random(3) - Random(3)), Path[i].Y + (Random(3) - Random(3)), (Random(3) - Random(3)), (Random(3) - Random(3))))) Then
        Begin
          Result := False;
          Break;
        End Else
        Begin
          R_FFlag(8);
          FindNormalRandoms;
          Result := True;
        End;
      If (Result) Then
        Exit;
      If (GetMyPosOnPath(I2, Path)) Then
      Begin
        For I := I2 To High(Path) Do
          If (Not (WalkToTile2(Path[i].X + (Random(3) - Random(3)), Path[i].Y + (Random(3) - Random(3)), 3, 3))) Then
          Begin
            Result := False;
            Exit;
          End Else
          Begin
            R_FFlag(0);
            FindNormalRandoms;
            Result := True;
          End;
      End;
    End;

    function LoadPath: TPointArray;
    begin
      SetLength(Result, 42);

      Result[0] := Point(3012, 3354);
      Result[1] := Point(3008, 3362);
      Result[2] := Point(3000, 3362);
      Result[3] := Point(2995, 3367);
      Result[4] := Point(2987, 3371);
      Result[5] := Point(2980, 3377);
      Result[6] := Point(2971, 3378);
      Result[7] := Point(2967, 3384);
      Result[8] := Point(2967, 3394);
      Result[9] := Point(2965, 3402);
      Result[10] := Point(2969, 3409);
      Result[11] := Point(2975, 3414);
      Result[12] := Point(2984, 3419);
      Result[13] := Point(2988, 3426);
      Result[14] := Point(2997, 3432);
      Result[15] := Point(3008, 3431);
      Result[16] := Point(3016, 3425);
      Result[17] := Point(3022, 3422);
      Result[18] := Point(3027, 3425);
      Result[19] := Point(3036, 3425);
      Result[20] := Point(3041, 3415);
      Result[21] := Point(3051, 3414);
      Result[22] := Point(3057, 3415);
      Result[23] := Point(3068, 3416);
      Result[24] := Point(3079, 3416);
      Result[25] := Point(3087, 3421);
      Result[26] := Point(3098, 3420);
      Result[27] := Point(3112, 3420);
      Result[28] := Point(3119, 3417);
      Result[29] := Point(3126, 3414);
      Result[30] := Point(3137, 3416);
      Result[31] := Point(3147, 3416);
      Result[32] := Point(3158, 3418);
      Result[33] := Point(3166, 3426);
      Result[34] := Point(3176, 3428);
      Result[35] := Point(3175, 3442);
      Result[36] := Point(3171, 3453);
      Result[37] := Point(3166, 3460);
      Result[38] := Point(3164, 3467);
      Result[39] := Point(3164, 3475);
      Result[40] := Point(3164, 3481);
      Result[41] := Point(3165, 3487);
    end;

    Procedure SetupSMART;
    Begin
      SmartSetupEx(136, True, True, False);
      SetTargetDC(SmartGetDC);
      If Not (LoggedIn) Then
        While Not (SmartGetColor(360, 172) = 13158) Do
          Wait(100);
    End;
    begin
      SetupSRL;
      SetupSMART;
      DeclarePlayers;
      LoginPlayer;
      Wait(2000 + Random(500));
      PathWalk(LoadPath);
    end.

  4. #4
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think all those Point(x, y) should be changed to IntToPoint(x, y).

  5. #5
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by TheVoiceInYourHead View Post
    I think all those Point(x, y) should be changed to IntToPoint(x, y).
    Why? Both functions return a TPoint as a result and, as far as I know, both functions do exactly the same thing (though maybe not the same way).
    :-)

  6. #6
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I didn't think Point did the same thing as IntToPoint..
    [flame]do you have to disagree with everything i say?[/flame]

  7. #7
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by TheVoiceInYourHead View Post
    [flame]do you have to disagree with everything i say?[/flame]
    I've replied to two of your posts because you gave a user the wrong information. Since when it is a bad thing to give the correct information?
    :-)

  8. #8
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Method View Post
    I've replied to two of your posts because you gave a user the wrong information. Since when it is a bad thing to give the correct information?
    You = Always.
    Anyone Else = Never.

    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  9. #9
    Join Date
    Jun 2008
    Location
    Somewhere between here and there
    Posts
    117
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OK, OK now that's enough i will not have all this fighting on my thread. And point and IntToPoint do the same thing...

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
  •