Results 1 to 7 of 7

Thread: How do you make a script be able to deal with every random event?

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

    How do you make a script be able to deal with every random event?

    hey there,
    I've recently been working on modifying a basic powerminer because I am not knowledgeable enough to write my own full on script yet.

    I was wondering if anyone could tell me how to incorporate all of the anti-random files from: C:\Program Files\SCAR 3.15\Includes\SRL\SRL\core\AntiRandoms

    into a script?

    So far people have said to put in:

    SCAR Code:
    FindNormalRandoms;

    However this doesn't deal with any of the rarer random events like maze or frog.

    The script so far:
    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Mining.scar}
    Var
      x, y: integer;

    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;

    procedure AntiBan;
    begin
      case random(3) of
        0: RandomRClick;
        1: BoredHuman;
        2: HoverSkill('Mining', False);
          end;
    end;

    begin
      SetupSRL;
      DeclarePlayers;
      Repeat
        Mousespeed := 15
        DropAll;
        Repeat
          LoadRockRecords;
          FindObjRock(x, y, Rimmington_Iron);
          ClickMouse(x, y, True);
          FindNormalRandoms;
          AntiBan;
          Wait(3000+random(2000));
        Until (InvFull= True);
       until false
    end.

    How do you make a script that deals with every random event?
    Can you show me how my script should look if it could deal with all randoms?

    I just had old man random event - the one where you just have to click on him and he gives you a present. My script just kept on mining even though I have - FindNormalRandoms; in it. Is that normal? or is my script just not working properly?

    Thanks.

  2. #2
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    findnormal randoms incorperates all randoms, including frog, and the maze finder is only about 1/10 of the time accurate.
    “Ignorance, the root and the stem of every evil.”

  3. #3
    Join Date
    Feb 2007
    Posts
    211
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    There is currently no solution for mardaut, box, Freaky Forest~, Molly and maze has issues with SRL, mime / maze / box / Freaky Forest~ / Molly can be solved 100% with reflection.

    So there still is no solution for mardaut until we figure out how to work with the interface in reflection
    Current Project: Catching up on what I missed, re-writing some old includes I done in the past.
    Upcoming Project: Open For Suggestions

  4. #4
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    actually now only mordaut and mime have been solved without reflection
    the[cheese] has solved mime otherwise


  5. #5
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    I think they may have reverted the old box back. My script never 'can't' solve the box and I never get the fucked up tiny one.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  6. #6
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah i think jackex have changed it back but our scrit works all the same so i can't complain


  7. #7
    Join Date
    Sep 2008
    Location
    Nova Scotia, Canada
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Try this

    FindNormalRandoms will handle all the randoms that SRL is capable of handling. As SRL is updated to handle more, so will your script.

    But I would make a couple changes: Put a check in there for FindFight - It's possible to get into a fight through a number of non-random npcs interacting with your player.

    I find a lot of things (like color finding and random handling) work waaay better if I call DeclarePlayers before the call to SetupSRL. Also I would add a call to ActivateClient and LoginPlayer - let SRL handle the login, random handling seems to work better that way.

    And...a lot of people like to put their random handling into its own proc. So it would look something like this:

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Mining.scar}
    Var
      x, y: integer;
     
    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;
     
    procedure AntiBan;
    begin
      case random(3) of
        0: RandomRClick;
        1: BoredHuman;
        2: HoverSkill('Mining', False);
          end;
    end;
     
    procedure AntiRandom;
    begin
      FindNormalRandoms;
      if FindFight then
        RunTo('N', true);  // Or whichever dir you want
    end;
     
    begin
      DeclarePlayers;
      SetupSRL;
      ActivateClient;
      LoginPlayer;
      Repeat
        Mousespeed := 15
        DropAll;
        Repeat
          LoadRockRecords;
          FindObjRock(x, y, Rimmington_Iron);
          ClickMouse(x, y, True);
          AntiRandom;
          AntiBan;
          Wait(3000+random(2000));
        Until (InvFull= True);
       until false
    end.
    http://www.stats.srl-forums.com/sigs/6137.png

    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - Put this in your sig.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Random Event update!
    By Markus in forum RS has been updated.
    Replies: 20
    Last Post: 02-25-2009, 10:29 PM
  2. random event update?
    By sjlou in forum RS has been updated.
    Replies: 6
    Last Post: 09-15-2008, 06:24 AM
  3. random event
    By j035m03 in forum RuneScape News and General
    Replies: 4
    Last Post: 08-19-2008, 08:05 PM
  4. Random Event Items
    By Rick in forum News and General
    Replies: 9
    Last Post: 02-03-2007, 03:14 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
  •