Results 1 to 14 of 14

Thread: Antiban & Randoms

  1. #1
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Antiban & Randoms

    Hey, I just made my first script that actually runs for more then 30 seconds, super super simple alcher, but I'd like to incorperate a randomdectection and antiban into it, can anyone help me with this? Heres my script

    Simba Code:
    program Alcher;
    {$i srl/srl.simba}

    Procedure alch;
    var
      x, y:integer;
    begin
    if findcolorspiraltolerance(x, y, 226957, 568, 370, 580, 382, 5) then
    mouse(x, y, 3, 3, 1);
    wait(randomrange(100, 213));
    mouse(x, y, 3, 3, 1);
    wait(randomrange(1612, 2136));
    end;

    begin
    setupSRL
    repeat
    Alch
    until(false);
    end.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  2. #2
    Join Date
    May 2012
    Location
    Chaaaaiir
    Posts
    376
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Yeah, here's the updated code:

    Simba Code:
    program Alcher;
    {$i srl/srl.simba}

    Procedure AntiBan;
    begin
    {Insert antiban here}
    {If you need help....}
    {just PM me...........}
    end;

    Procedure alch;
    var
      x, y:integer;
    begin
    If (Not(FindNormalRandoms)) then
    Begin
     if findcolorspiraltolerance(x, y, 226957, 568, 370, 580, 382, 5) then
     mouse(x, y, 3, 3, 1);
     wait(randomrange(100, 213));
     mouse(x, y, 3, 3, 1);
     wait(randomrange(1612, 2136));
     end;
    end;

    begin
    setupSRL
    repeat
    Alch
    AntiBan;
    until(false);
    end.

    What I edited:
    FindNormalRandoms= SRL's compilation of random events
    & AntiBan procedure!

  3. #3
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol, I've only been scripting for 3 days, so I have 0 idea how I'd do it, and it also cant slow down my aching by much. Also, would I insert an if text failsafe into my script? Thanks!
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  4. #4
    Join Date
    Mar 2012
    Location
    Australia
    Posts
    625
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Generally with antibans, its easier just to copy someone elses, simple hover skill magic, quick afks, hover random skills, just look in some other magic scripts and steal it, always good to give credit, things like that do not have to be unique. also dont forget to include it in the mainloop. and it is best to have the antiban procedure right after you declare players i believe.
    Bored of playing rs, and bored of botting it, why am i here?

  5. #5
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, I haven't learned declare players, is it necessary if I'm not using smart, and only using the script for myself? I'll just find another slicers antiban and nip that. But how would I do a failsafe, so if I stop aching, of I run out of nats, it stops?
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  6. #6
    Join Date
    Mar 2012
    Location
    Australia
    Posts
    625
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Well seem as though you are using colour of the alch thing, if you run out of nats it wont be coloured, so if it doesn't find the colour then it logs out, not entirely sure how to implement that,

    You dont need to declare, if you are already logged in. And also generally you would alch in soulwars, so you don't get randoms, hence not needing the find normal randoms bit, but it doesnt hurt to have that in.
    Bored of playing rs, and bored of botting it, why am i here?

  7. #7
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    I'd suggest just using it in soulwars if you are going to run it for an extended period of time, otherwise implement the anti-randoms between clicking the high alch symbol and clicking the item you wish to alch.

    FindNormalRandoms will open up your inventory tab so that's why I put it there with a short wait before it calls the anti-randoms so that the InvTab is already open.

    For anti-ban do as suggested above, find another person's antiban on a released script and use that (with credit). Antiban doesn't differ all that much from script to script so it's not a huge issue, but before using it try to have a flick through and learn what each of the bits of code does so that you understand it a bit better and can then implement it yourself next time without just copying others.

    I'd look more in-depth into adding failsafes for when things could possibly go wrong in your Alch procedure and such, like at the moment you search for the colour of the high alchemy logo and then click, short wait and then click again.

    I would recommend maybe using ExistsItem and CoordsToItem to make sure that there is actually something there to alch because otherwise if you run out of items and still have runes it will just sit there constantly clicking nothing (looks alot like a bot, no human would do that).

  8. #8
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol, ive been alching in soul wars the whole time, didnt even think about that. I tried what you said, but im not sure if im doing it right... When I run it, it presses the alch button, then shuts down...
    Simba Code:
    program Alcher;
    {$i srl/srl.simba}

    Procedure alch;
    var
      x, y:integer;
    begin
    if findcolorspiraltolerance(x, y, 226957, 568, 370, 580, 382, 5) then
    mouse(x, y, 3, 3, 1) else
    logout;
    terminatescript;
    wait(randomrange(100, 213));
    ClickMouse2(1);
    wait(randomrange(1612, 2136));
    end;

    procedure AntiBan;
    begin
      if(not(LoggedIn))then
        exit;
      Findnoninventoryrandoms;
      Case Random (2500) of
        0..18: Begin SleepAndMoveMouse(5000 + Random(750)); End;
        19..24: Begin GameTab(tab_Inv) ExamineInv; GameTab(tab_Magic); SleepAndMoveMouse(2500 + Random(553)); End;
        25..42: Begin RandomAngle(1); End;
        43..48: Begin GameTab(Tab_Stats); Wait(3000 + Random(400)); GameTab(tab_Magic); SleepAndMoveMouse(2550 + Random(658)); End;
        49..54: Begin GameTab(tab_Stats) HoverSkill('random', False); GameTab(tab_Magic); SleepAndMoveMouse(2200 + Random(545)); End;
        55..60: Begin PickUpMouse; End;
        61..66: Begin RandomMovement; End;
        67..72: Begin BoredHuman; GameTab(tab_Magic); End;
        73..78: if(gametab(tab_inv))then Begin ExamineInv; GameTab(tab_Magic); End;
        End;
    end;

    begin
    setupSRL
    repeat
    Alch
    Antiban
    until(false);
    end.
    and i got an awesome antiban from LEETZalcher,

    E: Just read your post Ping, about the failsafe, i have no idea what either of those things do, so I would have no idea how to implement them into my script... Could you put them into the above script, then show me how you did it and what they mean?
    Thanks soo much!
    Last edited by Footy; 06-25-2012 at 12:27 AM.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  9. #9
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Simba Code:
    if findcolorspiraltolerance(x, y, 226957, 568, 370, 580, 382, 5) then
    mouse(x, y, 3, 3, 1) else
    logout;
    terminatescript;

    What you are telling the script here is if you find this colour then click it otherwise logout.
    When you are done doing one of those two things, terminate the script.

  10. #10
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ooooooh, so if i put an and inbetween them, it would mean if it doesent find it, do both?

    E: this is what i attempted, got a type mismatch
    Simba Code:
    if findcolorspiraltolerance(x, y, 226957, 568, 370, 580, 382, 5) then
    mouse(x, y, 3, 3, 1) else
    logout and
    terminatescript;
    Last edited by Footy; 06-25-2012 at 12:37 AM.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  11. #11
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Simba Code:
    begin
        if FindColorSpiralTolerance(x,y,226957,568,370,580,382,5) then
          Mouse(x,y,3,3,mouse_Left) else
        begin
          LogOut;
          TerminateScript;
        end;

    Instead of using an 'and' (you were on the right sort of track) use a begin and end;

  12. #12
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    that makes sense. Thanks, everything compiles and works!
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  13. #13
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Simba Code:
    if ExistsItem(CoordsToItem(x,y)) then //Is there an item where your mouse is?
    begin
      ClickMouse2(mouse_Left); //if yes then click it
      WriteLn('Successfully clicked the item');
    end else
    begin
      WriteLn('No item available'); //we do this if there was no item there
      LogOut; //player logs out
      TerminateScript; //script shuts down
    end;

    ExistsItem - This checks if there is an item at the integer you specified. Each inventory slot has a number associated with it i.e. inventory slot 1 through to 28.
    CoordsToItem(x,y) - This gets the position of your mouse and then converts it into the appropriate integer for the inventory slot. Thus, I used this to replace putting in a single number which would limit the player to having their spellbook setup a certain way to ensure their high alch and item were lined up.

    Hopefully that all makes sense to you what I did there
    Last edited by P1ng; 06-25-2012 at 01:02 AM.

  14. #14
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Makes sense, and I've just expanded my scripting "vocabulary", I assume I add this in after I click the high alch button, as that's all that makes sence to me... Thanks so much to everyone who helped! I am now a little bit less of a noob!
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •