Results 1 to 4 of 4

Thread: All commands needed to detect randoms for SRL

  1. #1
    Join Date
    Jun 2007
    Location
    Canuckistan
    Posts
    306
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default All commands needed to detect randoms for SRL

    Hello everyone,
    What are the SRL commands needed to detect all of the randoms (talking, fighting, annoyances, etc.) that SRL can detect?

    I can implement them myself, but I just want the commands to get a grasp on what to do.

    -Nontitle

  2. #2
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    here wt-fawaki made it

    SCAR Code:
    {===============================================]
        this function finds randoms by:wt-fawaki
    [===============================================}

    Function FindFastRandoms: Boolean;
    var
      i: Integer;
    begin
      for i:=1 to 9 do
      begin
        case I of
         1:  If FindDead then
               Result := True;
         2:  If FindMod then
               Result := True;
         3:  If FindMime then
               Result := True;
         4:  If FindMaze then
               Result := True;
         5:  If FindQuiz then
               Result := True;
         6:  If FindDemon then
               Result := True;
         7: begin
               if NoGameTab then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'No GameTab';
                 Logout;
                 Exit;
               end;
             end;
         8: begin
               if InBlack then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'InBlack';
                 Logout;
                 Exit;
               end;
             end;
         9: begin
               if FindFight then
               begin
                 RunTo('N',False);
               end;
             end;
        end;

      end;
    end;
    ~Hermen

  3. #3
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    this one is for srl 4.0 and it's a litte more advaced
    SCAR Code:
    ////////////////////////////////////////////////////////////////////////////////
    // THE SRL TEAM
    function FindFastRandoms: Boolean;
    var
      i: Integer;
    begin
      for i := 1 to 9 do
      begin
        case I of
          1: if FindDead then
              Result := True;
          2: if FindMod then
              Result := True;
          3: if FindMime then
              Result := True;
          4: if FindMaze then
              Result := True;
          5: if FindQuiz then
              Result := True;
          6: if FindDemon then
              Result := True;
          7: begin
              if NoGameTab then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'No GameTab';
                Logout;
                Exit;
              end;
            end;
          8: begin
              if InBlack then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'InBlack';
                Logout;
                Exit;
              end;
            end;
          9: RC;
        end;
        Wait(1);
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////
    procedure Randoms;
    begin
      if not LoggedIn then Exit;
      FindTalk;
      //FindATradeByRick; <-- don't use this lol
      FindNormalRandoms;
      FindFastRandoms;
      FindLamp('mining');
      SolvePinball;
      if FindFight then
      begin
        RunTo('S', True);
        Wait(15000 + random(5000));
        RunBack;
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////

  4. #4
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    o.0 cooleo. I'm gonna have to put that in my script when I get home. Thanks MK, I didn't even know about that.
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to detect a virus
    By kingarabian in forum Computer Help and Tutorials
    Replies: 15
    Last Post: 09-27-2009, 06:50 AM
  2. Detect other players?
    By spamthis in forum OSR Help
    Replies: 5
    Last Post: 10-09-2008, 11:58 PM
  3. Replies: 5
    Last Post: 07-26-2008, 08:16 AM
  4. How to detect text?
    By I Karma I in forum OSR Help
    Replies: 14
    Last Post: 12-02-2006, 09:45 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
  •