Results 1 to 7 of 7

Thread: Map Walking via Distance.

  1. #1
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default Map Walking via Distance.


    Note: This WON'T Work until the next version of SRL is out. All of the root procedures and functions are in there. So for now, Just comment on how you think it would work. Unless you are a dev and have access to the rest

    • procedure WalkDist(Distance, RoadColor, Tol: integer; Direction: String);

    • procedure WalkDistEstimate(Steps, RoadColor, Tol: Integer; Direction: String);


    The whole idea of this is Map Walking via distance between the Centre of the minimap (Where the user is), And the Flag. When it mapwalks in a direction it will calculate as soon as it finds the flag the distance between both the user and flag and then add it on to an integer. As soon as the integer distance is more than the distance specified by the user it stops. Therefore walking the distance you choose.

    The second one will, if you don't know the distance, estimate the distance via how many steps to take. By steps it means every time it clicks in the direction again and waits for the flag to go away, so basically every mapwalk. I suggest the second procedure if you don't know how to measure distance or the correct distance.

    Examples:

    Code:
      WalkDist(200, 0, 7, 'S');
    This will walk South by a total of 200 distance.

    Code:
     WalkDistEstimate(4, 0, 7, 'N');
    This will walk north 4 steps (The distance is estimated in scar).

    Code:
    {*******************************************************************************
    function EstimateDist(Steps: integer; Direction: String): integer;
    By: XxKanexX
    Description: returns with the estimate amount of walking distance via steps.
    *******************************************************************************}
    function EstimateDist(Steps: integer; Direction: String): integer;
    begin
      case uppercase(Direction) of
        'S', 'E': result:= 37 * Steps;
        'N', 'W', 'SW', 'NE': result:= 46 * Steps;
        'NW': result:= 42 * Steps;
        'SE': result:= 32 * Steps;
      end;
    end;
    
    {*******************************************************************************
    function StepsDist(Dist: Integer; Direction: String): Integer;
    By: XxKanexX
    Description: returns with the estimate amount of steps via the distance.
    *******************************************************************************}
    function StepsDist(Dist: Integer; Direction: String): Integer;
    begin
     result:= Trunc(Dist/(EstimateDist(1, Direction)));
    end;
    
    {*******************************************************************************
    procedure WalkDist(Distance, RoadColor, Tol: integer; Direction: String);
    By: XxKanexX
    Description: Repeats walking in a direction for a specific amount of distance
                 between the Flag and User on the minimap.
    *******************************************************************************}
    procedure WalkDist(Distance, RoadColor, Tol: integer; Direction: String);
    var TDist, buff, breaker: integer;
    begin
     repeat
       RoadWalkGDist(buff, RoadColor, Direction, Tol);
      TDist:= TDist + buff;
       Wait(100 + random(50));
      breaker:= breaker + 1;
     until(TDist + (10 + StepsDist(Distance, Direction)) >= Distance) or (Breaker > (StepsDist(Distance, Direction)+10));
      Writeln('Total Walking Distance: '+Uppercase(Direction)+', '+Inttostr(TDist));
    end;
    
    {*******************************************************************************
    procedure WalkDistEstimate(Steps, RoadColor, Tol: Integer; Direction: String);
    By: XxKanexX
    Description: Scar generates an estimate amount of distance via steps and walks it.
    *******************************************************************************}
    procedure WalkDistEstimate(Steps, RoadColor, Tol: Integer; Direction: String);
    begin
      WalkDist(EstimateDist(Steps, Direction), RoadColor, Tol, Direction);
    end;

  2. #2
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    You're probably thinking why post unless people can use it.

    But i just want comments on if you think it was a good idea. You can probably guess how it works from the coding anyway. <3 Kane.

  3. #3
    Join Date
    Feb 2006
    Location
    California-Foster City
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    err.......



    Great job kane
    The Welcoming Party
    Don't be a Fakawi! Get 25 hours of sleep a day!

  4. #4
    Join Date
    Mar 2006
    Posts
    201
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    looks very hot, good idear.
    |>|-|33|2 /\/\ '/ 1337 |-|@>< 0|2 |)1 3

    " There are no stupid questions, only stupid people "

  5. #5
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    Kane was testing it when we were chatting on msn. It will walk long distances no problems <3
    Very useful procedure for walking a certain number of steps to a bank etc. Can't wait to test it for ya

  6. #6
    Join Date
    Mar 2006
    Posts
    141
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Krazy_Meerkat
    Kane was testing it when we were chatting on msn. It will walk long distances no problems <3
    Very useful procedure for walking a certain number of steps to a bank etc. Can't wait to test it for ya
    wow wow wow, this will be so cool kane. Thx

  7. #7
    Join Date
    Feb 2006
    Posts
    582
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Why does weasel have a cat?
    Free File Hosting
    No download timers!

    Rifkwtf.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. procedure FFlag(Distance: Integer);
    By WT-Fakawi in forum OSR Outdated Tutorials
    Replies: 10
    Last Post: 07-27-2008, 02:47 PM
  2. Distance Finder
    By TViYH in forum RS3 Outdated / Broken Scripts
    Replies: 6
    Last Post: 03-07-2008, 12:48 PM
  3. How about Find Distance Map Walk?
    By Dustin in forum SRL Site Discussion
    Replies: 0
    Last Post: 09-05-2006, 04:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •