Results 1 to 4 of 4

Thread: Please help with anti-random.

  1. #1
    Join Date
    Oct 2008
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Please help with anti-random.

    Hello again,

    Thanks to the people who helped me out on my other question.

    I've done what people said and added FindNormalRandoms; and procedure DeclarePlayers; into the script.

    This is what it looks like now:

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Mining.scar}

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := 'Username';
      Players[0].Pass := 'Password';
      Players[0].Nick := 'Nick';
      Players[0].Active := True;
    end;

    Var
    x, y: integer;
    begin
      Repeat
      Mousespeed := 15
      DropAll;
      Repeat
        LoadRockRecords;
        FindObjRock(x, y, Varrock_Iron);
        ClickMouse(x, y, True);
        FindNormalRandoms;
        Wait(3000+random(2000));
        Until (InvFull= True);
        Until false
    end.
    However when I try and run the script, the following message comes up in the debug box: [Runtime Error] : Out Of Range in line 1087 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar

    Then it opens up a new tab - AntiRandoms.scar and shows me line 1087.

    What do I need to do to get the anti-random to work?
    And is there anything that needs to be done to my script?

  2. #2
    Join Date
    Dec 2007
    Location
    Middle of Here and There
    Posts
    417
    Mentioned
    6 Post(s)
    Quoted
    25 Post(s)

    Default

    Rearrange your script so that...

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Mining.scar}
    Var
      x, y: integer;                     //<=======  This is above everything except your program name and includes.

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := 'Username';
      Players[0].Pass := 'Password';
      Players[0].Nick := 'Nick';
      Players[0].Active := True;
    end;


    begin
      SetupSRL;            //SetupSRL and DeclarePlayers were not called. That's what gave you the errors.
      DeclarePlayers;
      Repeat
        Mousespeed := 15
        DropAll;
        Repeat
          LoadRockRecords;
          FindObjRock(x, y, Varrock_Iron);
          ClickMouse(x, y, True);
          FindNormalRandoms;
          Wait(3000+random(2000));
        Until (InvFull= True);
      Until false
    end.

    Your error was caused because you didn't have SetupSRL and DeclarePlayers in your script.

    Good luck with your scripting future ^.^

  3. #3
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Scar tags look pretty
    ~ Metagen

  4. #4
    Join Date
    Dec 2007
    Location
    Middle of Here and There
    Posts
    417
    Mentioned
    6 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Metagen View Post
    Scar tags look pretty
    ROFL. Nice input =P

    Yes, they do ^.^

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Anti-Random help?
    By 666d3v1l666 in forum OSR Help
    Replies: 0
    Last Post: 11-11-2008, 04:35 AM
  2. anti random help
    By del_signo in forum OSR Help
    Replies: 6
    Last Post: 04-09-2007, 04:54 AM
  3. Help on Anti-Random
    By UnKnOwN ScrIPTeR in forum OSR Help
    Replies: 1
    Last Post: 12-30-2006, 11:44 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
  •