Results 1 to 5 of 5

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.

    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.

    Well, enjoy and i hope this gets added into SRL
    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
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    RunTo runs To and Back?
    And what about the RunAway procedure?
    Hup Holland Hup!

  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 nielsie95 View Post
    RunTo runs To and Back?
    And what about the RunAway procedure?
    Yes it can run back but it saves putting in all the parametres and adding one more function into the script.

    The RunAway procedure i don't particularly like, and again saves inputting parameters.
    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
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    i dont think this was needed though gj keep it up

    and yes runto does waits/runback

  5. #5
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    i agree with pinky not really needed but heck at least you aint leaching

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Running Back Procedure
    By Daniel in forum Research & Development Lounge
    Replies: 7
    Last Post: 01-22-2008, 04:06 PM
  2. Replies: 8
    Last Post: 05-24-2007, 11:57 PM
  3. 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
  •