Results 1 to 3 of 3

Thread: Procedure that calls random procedure?

  1. #1
    Join Date
    Jan 2007
    Posts
    526
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Procedure that calls random procedure?

    Hello, is there any way to make procedure that calls random procedure of list?
    Like this:
    I would have created 5 procedures procedure1,procedure2,procedure3,procedure4 and procedure5.

    I would like to call one of them randomly in other procedure, is it possible?

    Hard to explain here is what I mean:

    SCAR Code:
    procedure RandomSelectOneOfThese;
    begin
           procedure1;
           procedure2;
           procedure3;
           procedure4;
           procedure5;
    end;

    How can I make it call just one of the procedures in RandomSelectOneOfThese?

  2. #2
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Look in your other thread. I left you a reply

  3. #3
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    procedure RandomSelectOneOfThese;
    begin
      case Random(5) of
        0: procedure1;
        1: procedure2;
        2: procedure3;
        3: procedure4;
        4: procedure5;
      end;
    end;
    That should work...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Procedure SCAR calls when terminating?
    By mickaliscious in forum OSR Help
    Replies: 7
    Last Post: 01-06-2008, 10:23 PM
  2. Random mouse procedure
    By HairyDuncan2 in forum OSR Help
    Replies: 4
    Last Post: 08-18-2007, 04:17 AM
  3. Need procedure for the cage random when thieving
    By rostaryms in forum RS3 Outdated / Broken Scripts
    Replies: 7
    Last Post: 07-29-2007, 04:30 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
  •