Results 1 to 7 of 7

Thread: How to add commands after failsafes?

  1. #1
    Join Date
    Aug 2007
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default How to add commands after failsafes?

    Basically, my question is this:


    How do I add comands after a radialwalk failsafe? It sounds silly but I couldn't for the life of me figure it out lol.

    That may sound abstract so here's an example of what i mean:

    SCAR Code:
    If not Radialwalk(54256, 0, 90, 70, -1, -1) then
    If not Radialwalk(21346, 0, 80, 70, -1, -1) then
    If not Radialwalk(92345, 0, 70, 70, -1, -1) then
    If not Radialwalk(23455, 0, 60, 70, -1, -1) then
    logout;

    From what I know, that basically says if scar doesnt find any of those colors at any of those points, it logs out.

    What I want to know is, how do I script it so where if doesn't find those colors, it logs out, but if it does, it does a set of commands, like Fflag(10), disguise,writeln, antiban, etc.?

  2. #2
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    If Radialwalk(54256, 0, 90, 70, -1, -1) then
    begin
      WalkingStuff;//change this to whatever - can be multiple lines
      exit;//stops checking for other paths
    end else
    If Radialwalk(21346, 0, 80, 70, -1, -1) then
    begin
      WalkingStuff;
      exit;
    end else
    If Radialwalk(92345, 0, 70, 70, -1, -1) then
    begin
      WalkingStuff;
      exit;
    end else
    If Radialwalk(23455, 0, 60, 70, -1, -1) then
    begin
      WalkingStuff;
      exit;
    end else
    begin
      Writeln('WTF it still missed');
      Logout;
    end;
    Project: Welcome To Rainbow

  3. #3
    Join Date
    Aug 2007
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Tyvm, I appriciate it

  4. #4
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    youre most welcome

    good luck with the script
    Project: Welcome To Rainbow

  5. #5
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If not Radialwalk(54256, 0, 90, 70, -1, -1) then
    If not Radialwalk(21346, 0, 80, 70, -1, -1) then
    If not Radialwalk(92345, 0, 70, 70, -1, -1) then
    If not Radialwalk(23455, 0, 60, 70, -1, -1) then
    logout
    else
    Dothisstuff;

    ~Sandstorm

  6. #6
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by Sandstorm View Post
    If not Radialwalk(54256, 0, 90, 70, -1, -1) then
    If not Radialwalk(21346, 0, 80, 70, -1, -1) then
    If not Radialwalk(92345, 0, 70, 70, -1, -1) then
    If not Radialwalk(23455, 0, 60, 70, -1, -1) then
    logout
    else
    Dothisstuff;

    ~Sandstorm
    that won't work because the else will only work for the last if.

    there's a few ways to do it.

    SCAR Code:
    procedure walkthis;
    var Found: boolean;
    begin
      Found := true;
      If not Radialwalk(21346, 0, 80, 70, -1, -1) then
        If not Radialwalk(92345, 0, 70, 70, -1, -1) then
          If not Radialwalk(23455, 0, 60, 70, -1, -1) then
          begin
            LogOut;
            Found := False;
          end;

      if Found then
      begin
         ...
      end;
    end;

    or you can use exit (depending on what you might have after / before)

    SCAR Code:
    procedure walkthis;
    begin
      If not Radialwalk(21346, 0, 80, 70, -1, -1) then
        If not Radialwalk(92345, 0, 70, 70, -1, -1) then
          If not Radialwalk(23455, 0, 60, 70, -1, -1) then
          begin
            LogOut;
            exit;
          end;

      //the rest comes here
    end;

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  7. #7
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    that won't work because the else will only work for the last if.
    that's what i thought, but i didn't want to point it out in case i was incorrect
    Project: Welcome To Rainbow

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. A - Z on Failsafes!
    By Sir R. M8gic1an in forum OSR Advanced Scripting Tutorials
    Replies: 3
    Last Post: 08-19-2009, 06:15 PM
  2. Failsafes
    By Iron Man in forum OSR Intermediate Scripting Tutorials
    Replies: 11
    Last Post: 01-17-2009, 12:46 PM
  3. How are my failsafes?
    By Jethr0x in forum OSR Help
    Replies: 11
    Last Post: 04-30-2008, 06:37 AM
  4. Failsafes???
    By deviney in forum OSR Help
    Replies: 7
    Last Post: 07-02-2007, 07:58 PM
  5. Failsafes?
    By A G E N T in forum OSR Help
    Replies: 9
    Last Post: 03-31-2007, 12:57 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
  •