Results 1 to 8 of 8

Thread: Running Back Procedure

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

    Default Running Back Procedure

    Well, since there was no more running back procedure, i decided to make my own. Now i know that you can run back using the RunAway procedure by nielsie95 but this will run you back when you use the RunTo procedure.

    NOTE: This requires to modify an SRL root file. If you're inexperienced then read some tutorials to learn how. You'll need to know about variables and procedures before continuing!

    Location: Includes\SRL\SRL\Core/MapWalk.scar
    Replace all of the RunTo procedure with this code for this to work properly:
    SCAR Code:
    {*******************************************************************************
    procedure RunTo(dir: String; runfar: Boolean);
    By: Mutant Squirrle and Nielsie95 modified by IP-Drowner (minor changes)
    Description: Runs to direction
    *******************************************************************************}


    procedure RunTo(dir: string; runfar: Boolean);
    var
     OffSet, Tab: Integer;
    begin
      Tab := GetCurrentTab;
      SetRun(True);
      if RunFar then
        OffSet := 63
      else
        OffSet := 30;
      case UpperCase(dir) of
        'N': MouseFlag(648, 83 - OffSet, 0, 0)
        'S': MouseFlag(648, 83 + OffSet, 0, 0)
        'E': MouseFlag(648 + OffSet, 83, 0, 0)
        'W': MouseFlag(648 - OffSet, 83, 0, 0)
      end;
      Wait(6500 + Random(2000));
      IdleTime(6000, 500, 1.0);
      case UpperCase(dir) of
        'N': MouseFlag(648, 83 + OffSet, 0, 0)
        'S': MouseFlag(648, 83 - OffSet, 0, 0)
        'E': MouseFlag(648 - OffSet, 83, 0, 0)
        'W': MouseFlag(648 + OffSet, 83, 0, 0)
      end;
      SetRun(False);
      GameTab(Tab);
      DirectionRan:=dir;
      RanFurther:=runfar;
    end;

    {*******************************************************************************
    procedure RunBack(Direction: String; RanFar: Boolean);
    By: IP-Drowner
    Description: Will run back to original position.
    *******************************************************************************}


    procedure RunBack;
    var OppDirection: String;
    begin
      case Lowercase(DirectionRan) of
        'n': OppDirection:='s';
        'e': OppDirection:='w';
        's': OppDirection:='n';
        'w': OppDirection:='e';
      end;
      RunTo(OppDirection, RanFurther);
    end;

    Also declare these variables as global variables, put under the DebugRadialRoad declare:
    SCAR Code:
    var
      RanFurther: Boolean;
      DirectionRan: String;
    //* Running Back procedures.

    Enjoy
    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 |

  2. #2
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Haven't you posted this in three different threads?

  3. #3
    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 ZephyrsFury View Post
    Haven't you posted this in three different threads?
    Actually i only posted this in the SRL Member part on anything worth implementing into SRL. Which, it should be in SRL.

    And i also wanted it to get released to the public so here it is.

    P.S: Only 2 threads made
    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 |

  4. #4
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    kl ill use this. credits to you

  5. #5
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Which, it should be in SRL.
    Ehh, you've kinda gotten the wrong picture, minor things are kept as they are, unless some dev feels like updating them, but usually no functions from the forums are picked.

  6. #6
    Join Date
    Jul 2007
    Posts
    1,055
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    How does it require to change the root files? Just copy & paste it into your script and change name from like "procedure RunTo(dir: string; runfar: Boolean);" to "procedure RunTo2(dir: string; runfar: Boolean);" and it is now 1000x easyer for all the leechers using your script .

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

    Default

    Hush, osmm. I wanted leechers to edit the root files, and if they can't they learn to script.
    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 |

  8. #8
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    [Error] No sense in line 1 in IP-Drowner's post -

    Leechers that cannot script would learn to script to use a function that'd they maybe want to use while scripting?

    xD

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 8
    Last Post: 05-24-2007, 11:57 PM
  2. Procedure that calls random procedure?
    By Secet in forum OSR Help
    Replies: 2
    Last Post: 03-03-2007, 03:56 PM

Posting Permissions

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