Results 1 to 20 of 20

Thread: AntiRandoms.scar

  1. #1
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default AntiRandoms.scar

    For my script i want AntiRandoms, but do i have to copy the whole AntiRandoms.scar file to my script? Or is Including SRL\SRL.scar good?
    Or do i need to include SRL\SRL\Core\AntiRandoms.scar?

    Help me out

    Imma eat now back in max 45 min
    Ce ne sont que des gueux


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

    Default

    you need to find those stuff and result true if found look in other scripts for procedure's called findfastrandoms or findrandoms or somthing like anti randoms look through and you will get it

  3. #3
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Hermpiee, though gj helping already, BUT he asked does he need to include SRL/SRL/Core/Antirandoms/Antirandoms.scar - and the answer is... (drumroll) no. SRL/SRL.scar does fine.

  4. #4
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    EDIT: Oh, ok, nesses, so if i Include SRL.scar, the randoms will (probably) be solved IF gotten?

    Umm i once saw a FindFastRandoms by WT-Fakawi i belive
    Ce ne sont que des gueux


  5. #5
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Using {.include SRL\SRL.scar} is sufficient.

    EDIT: Way late, haha.
    :-)

  6. #6
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    And, the 'SrlRandomsReport'? Do i also not need to copy that into my script?

    And Metho D read this too please, and answer it too
    Ce ne sont que des gueux


  7. #7
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    By including SRL\SRL.scar, you CAN use the procedures and functions in the AntiRandoms.scar file. However, YOU have to call them in your script. They won't activate by themselves. Same with SRLRandomsReport. That bring up a report of all the random events you've had during that script run and sends the results to the server if you have SRL Stats.
    :-)

  8. #8
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Uhmm, so i need to include these antirandom stuff in my MainLoop?

    EDIT: I removed the whole SrlRandomsReport procedure from my script, and put it in my mainloop, it compiles good.
    Ce ne sont que des gueux


  9. #9
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    To use them, all you have to do is call something like FindNormalRandoms;, FindInventoryRandoms;, etc. in your procedures/functions wherever a random can happen and it'll check for them during that time.
    :-)

  10. #10
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Okay thanks!
    Ce ne sont que des gueux


  11. #11
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Yes, SRL doesnt do them automatically, so you need to do "FindNormalRandoms;" or "FindTalk;" or if you have the function, "FindFastRandoms;" in where you feel it'd be good.

  12. #12
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Huh.. 2 mins ago my GasCheck worked.. now i get:
    Line 91: [Error] (14786:1): Unknown identifier 'GasCheck' in script C:\Program Files\SCAR 3.12\Scripts\Miner.scar
    Ce ne sont que des gueux


  13. #13
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Did you do {.include SRL/SRL/skill/Mining.scar}?
    :-)

  14. #14
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Nope, but when i do, i get:
    Line 92: [Error] (15438:9): Invalid number of parameters in script C:\Program Files\SCAR 2.03\Scripts\Miner.scar

    Line 92 is the GasCheck;

    And i can remember, that GasCheck worked with only SRL\SRL.scar included

    Do u maybe need the complete script?
    Ce ne sont que des gueux


  15. #15
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    SCAR Code:
    function GasCheck(gx, gy: Integer): Boolean;

    Put the two integers that are the x and y coordinates of the rock there.
    :-)

  16. #16
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    So i do a:
    SCAR Code:
    procedure FindTheOre;
    begin
    FindColor(x, y, IronColor, 0, 0, 500, 336);
    GasCheck(x, y); //EDIT - : Boolean; doesnt need to be put here(?)
    end;

    ??
    Ce ne sont que des gueux


  17. #17
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Or something like:

    SCAR Code:
    procedure MineOre;
    var
      x, y: Integer;
    begin
      if(FindObj(x, y, 'ine', IronColor, 10)) then
        if(not(GasCheck(x, y))) then
          Mouse(x, y, 2, 2, true);
    end;

    That's just some basic stuff, you should add failsafes, etc. but that's the general idea.
    :-)

  18. #18
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Failsafes are?
    Like when something fails it trys again or so?
    Or when a color isnt there it logs?

    And, about the FindObj, is that better then FindColor, because I use IsUpText
    Ce ne sont que des gueux


  19. #19
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Look at some of the tutorials in the Beginner and Intermediate Tutorials forum and you'll learn about them.
    :-)

  20. #20
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Omfg i accidently posted my acc info and it was memb, pfew cud delete it, changed pass in record speed!
    here the script is, but now good:
    SCAR Code:
    program Miner;
    {.include SRL\SRL.scar}
    {.include SRL\SRL\skill\Mining.scar}

    {*
    Start Logged In/Out, it will Re-Log In tough.
    Have pick in 1st inv. slot.

    I made almost ALL of the script, except some. :P
    *}


    var
    x, y, o: Integer;

    const
    MSpeed=20;                      {*//Set MouseSpeed 1 For Slowest, 50 For Fastest.
    ^^^^^^^^^^                       //I recommend 20.*}

    OresToDo=1000;                  //The amount of Ore to mine
    BColor=584;                    //Dont Touch
    IronColor=2437714;            //Dont Touch
    PickColor=7725;              //Dont Touch
    Username = 'Username';      //Username
    Password = 'Password';     //Password


    procedure LogIn;
    begin
    LoggedIn; // Credits to WT-Fakawi //
    if (LoggedIn = True) then
    begin
    gametab(10);
    FindColor(x, y, 1711221, 551, 258, 737, 515);
    Mouse(x, y, 1, 1, true);
    wait(2500+random(1000));
    Mouse(460, 293, 10, 10, true);
    Mouse(294, 257, 1, 1, true);
    TypeSend(Username);
    Mouse(311, 278, 1, 1, true);
    TypeSend(Password);
    Mouse(303, 325, 10, 10, true);
    end else
    Mouse(460, 293, 10, 10, true);
    Mouse(294, 257, 1, 1, true);
    TypeSend(Username);
    Mouse(311, 278, 1, 1, true);
    TypeSend(Password);
    Mouse(303, 325, 10, 10, true);
    end;


    procedure ClickButton;
    begin
    if (FindColor(x, y, BColor, 0, 0, 1280, 1024)) then
    begin
    Writeln('Found Red Button, Clicking now');
    Mouse(390, 353, 10, 10, true);
    end else
    Writeln('Did not find the red button, Stopping');
    end;

    procedure PickInInv;
    begin
    MakeCompass('W');
    wait(30+random(10));
    HighestAngle;
    gametab(4);
    Findcolor(x, y, 7725, 520, 234, 1, 1);
    Writeln('Found pick, starting to search ore now!');
    end;

    procedure LoggingOut;
    begin
    gametab(10);
    FindColor(x, y, 1711221, 551, 258, 737, 515);
    Mouse(x, y, 1, 1, true);
    end;

    procedure FindTheOre;
    begin
    FindColor(x, y, IronColor, 0, 0, 516, 336);
    GasFound(x, y);
    end;

    procedure MineTheOre;
    begin
    FindTheOre;
    MMouse(x, y, 1, 1);
    if IsUpText('ine') then
    begin
    Mouse(x, y, 1, 1, true);
    FindPickHeadColor;
    FindPick;
    end else
    LoggingOut;
    end;

    procedure AntiBan;
    begin
    BoredHuman;
    end;

    begin
    SetUpSrl;
    MouseSpeed := MSpeed;
    LogIn;
    wait(4000+random(1000));
    ClickButton;
    PickInInv;
    wait(2000+random(1000));
    repeat
    o:=o+1
    AntiBan;
    MineTheOre;
    wait(500+random(500));
    FindNormalRandoms;
    FindTalk;
    FindInventoryRandoms;
    FindNonInventoryRandoms;
    FindFight;
    until(o = OresToDo)
    SRLRandomsReport;
    LoggingOut;
    end.
    Ce ne sont que des gueux


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. AntiRandoms.scar
    By D1zl3 in forum OSR Help
    Replies: 8
    Last Post: 12-04-2008, 11:43 PM
  2. out of range in AntiRandoms.scar HuH?
    By kor in forum OSR Help
    Replies: 5
    Last Post: 05-21-2008, 11:24 AM
  3. Problem with antirandoms.scar
    By orion pax in forum OSR Help
    Replies: 0
    Last Post: 10-25-2007, 06:03 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
  •