Results 1 to 15 of 15

Thread: My first unf pots/herb cleaning script

  1. #1
    Join Date
    Feb 2012
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    84 Post(s)

    Default My first unf pots/herb cleaning script

    Hey, I have recently taken interest in scripting and mainly thanks to Mayor's all-in-one guide I made a simple unf pots making and herb cleaning script. Even though I included some antiban and all the clicks are of course random, it got me banned on 2 accounts already. Could you have a look and critize what in the script is still "bot like"? Thanks!
    Simba Code:
    program GEunfPots;

    {$DEFINE SMART}              // Always have this to load smart
    {$I SRL-6/SRL.simba}         // To load the SRL include files
    {$I SPS/lib/SPS-RS3.Simba}   // To load the SPS include files

    const
    whatToDo = 'Pots';
    playerNumb := 5;

    var
    runsDone: integer;
    outOfHerbsCheck: integer;
    var
    AntiB, MouseB: integer;
    procedure declarePlayers();
    begin
      setLength(players, 0);
      with players[0] do
      begin
        loginName := '';
        password := '';
        isActive := true;
        isMember := true;
      end

      currentPlayer := playerNumb;
    end;


    Function Antiban: Boolean;
    Var
      I: Integer;
    Begin
      I := Random(600);
      Case I Of
        1..3:
          begin
            boredHuman(true);
            minimap.clickCompass();
          end;
        4..31:
          Begin
            hoverSkill(Skill_crafting);
            Wait(GaussRangeInt(1000,2000));
          End;
        32..70: mouseMovingObject;
        71..115: SleepAndMoveMouse(RandomRange(100,MouseB));
        116..350:
          Begin
            MouseOffClient(Random(4));
            Wait(RandomRange(2000, MouseB));
          End;
        501..600: Wait(RandomRange(1000, 2000));

      End;
      Wait(GaussRangeInt(0, AntiB));
    End;


    procedure openGEbank;
    var
    x, y, i, c: integer;
    TPA: TPointArray;
    ATPA: T2DPointArray;

    begin
      if (not bankScreen.isOpen()) then
      begin
      repeat
        if (bankScreen.isOpen()) then
          exit;
        productionScreen.clickStart;
        findColorsSpiralTolerance(x, y, TPA, 818592, mainScreen.getBounds(), 13, colorSetting(2, 0.12, 0.83));
        ATPA := TPA.toATPA(30, 30);
        atpa.sortFromFirstPoint(point(289, 40));
        smartImage.debugATPA(ATPA);

        if length(TPA) < 1 then
        continue;
        mouse(287, 82, 5, 30, MOUSE_MOVE);
        inc(c);
        writeln(intToStr(c));
        if isMouseOverText(['anker'], 500) then
        begin
            fastClick(MOUSE_RIGHT);
            wait(100 + random(100));
          try
            chooseOption.select(['ank']);
            wait(800 + random(200));
          except
            continue;
          end;
        end else
          begin
            if (bankScreen.isOpen()) then
              exit;
            mouse(middleTPA(ATPA[0]), MOUSE_MOVE);
            writeln('Something block us from clicking the chest. Clicking the head..');
          if isMouseOverText(['anker'], 500) then
          begin
            fastClick(MOUSE_RIGHT);
            wait(100 + random(100));
            try
              chooseOption.select(['ank']);
              wait(random(4000 + random(5000)));
            except
              continue;
            end;
          end;

          if (c > 3) then
          begin
            if (bankScreen.isOpen()) then
              exit;
          writeln('--- Cannot find banker, resetting angle. ---');
          minimap.clickCompass();
          wait(1000 + random (2000));
          end;
        end;
      until (c = 30);
      if c = 30 then
        begin
        Writeln('Failed to find the banker. Shutting down.');
        TerminateScript;
        end;
      end;
    end;

    procedure bankDeposit;
    var
    c: integer;
    begin
      if not isLoggedIn() then
        exit
      else
        if (bankScreen.isOpen()) then
          bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
    end;

    procedure withdrawPots;
    begin
      if not isLoggedIn() then
        exit
        if  (not bankScreen.isOpen()) then
          begin
            Writeln('We are not at bank');
            openGEbank;
          end else
          if random(75) > 73 then
          begin
              writeln('Pretending to looking at another website');
            mouseOffClient(OFF_CLIENT_RANDOM);
            wait(randomRange(5000, 25000));
          end;
          try
          begin
          bankScreen.withdraw(9, 14, ['']);                           //withraw 14 vials
          bankScreen.withdraw(10, -1, ['']);                         //withraw "all" (the -1) clean herbs                                         //close the bank...
          end;
          except
          bankDeposit;
          end;
    end;

    procedure withdrawCleans;
    begin
      if not isLoggedIn() then
        exit
        if  (not bankScreen.isOpen()) then
          begin
            Writeln('We are not at bank');
            openGEbank;
          end else
          if random(75) > 73 then
          begin
              writeln('Pretending to looking at another website');
            mouseOffClient(OFF_CLIENT_RANDOM);
            wait(randomRange(5000, 25000));
          end;
          try
          begin
          bankScreen.withdraw(8, 28, ['']);                           //withraw 14 vials                                        //close the bank...
          end;
          except
          bankDeposit;
          end;
    end;


    procedure blueButtom;
    var
    x, y, i, blueButtonDTM: integer;

    begin
      if not isLoggedIn() then
        exit;
        wait(1500 + random(500))
      if (productionScreen.isOpen(500)) then
        productionScreen.clickStart;
        wait(1500 + random(500))
     if (productionScreen.isOpen(500)) then
        productionScreen.clickStart;

    end;


    procedure checkForTickets; //checks for Squeal of Fortune tickets and claims them
    var
      ticketDTM, x, y: integer;
    begin
      ticketDTM := DTMFromString('mlwAAAHicY2dgYNBlZ2BQAWIrILYGYh0glgdiOSCWZGJgEARiPiBWBmIVKC0BxD1JdkDdTFDMCMUQviQDbsCIB0MBAIV0A4Y=');
      if findDTM(ticketDTM, x, y, tabBackPack.getBounds()) then
      begin
        mouse(x, y, 3, 3, MOUSE_MOVE);
        sleep(30+random(64));
        fastClick(mouse_left);
       end else
       Exit;
    end;



    procedure Pots;
    var
      vialDTM, x, y, c: integer;
    begin
        vialDTM := DTMFromString('mwQAAAHic42RgYFjJwsCwAog3AfFaKAbxlwDxAig2ZGJgsAFiCyDWA2JVIJYDYk0gNgJiKyDOKlwINA3IYGCE0phYkoEwYCQCwwEAyS0JgQ==');
      if not isLoggedIn() then
        exit
      else
      writeln('Withrawed wrongly ' + IntToStr(outOfHerbsCheck) + ' times');
      openGEbank;
      bankDeposit;
      withdrawPots;
      repeat
        bankScreen.close();
        wait(400 + random(400));
        inc(c);
       until findDTM(vialDTM, x, y, tabBackPack.getBounds()) or (c =6);
       if ( not findDTM(vialDTM, x, y, tabBackPack.getBounds())) then
       begin
         writeln('--- Could not find Vial of water in your backpack. ---');
         exit;
       end else
      if (tabBackpack.isFull) then
        begin
          wait(200 + random(200));
        if (Random(20) < 6) then
          mouse(771, 413, 5, 5, MOUSE_MOVE)
        else
          mouse(733, 449, 5, 5, MOUSE_MOVE);
          wait(50 + random(30));
        if isMouseOverText(['lea'], 1000) then
        begin
          fastClick(MOUSE_LEFT);
          wait(200 + random(200));
          mouse(729, 416, 5, 5, MOUSE_MOVE);
          mouse(729, 416, 5, 5, MOUSE_LEFT);
        end else
        begin
          inc(outOfHerbsCheck);
          case outOfHerbsCheck of
          1..2:
            begin
              writeln('--- The second ingredient in your backpack is not clean herb. Trying to bank once again. ---');
              exit;
            end;

          3:
            begin
              openGEbank;
              bankDeposit;
              mouse(491, 109, 5, 5, MOUSE_MOVE);
               if isMouseOverText(['lea'], 1000) then
               begin
                exit;
                outOfHerbsCheck := 0;
               end else
                 begin
                  writeln('Out of herbs. There is no clean herb in bank slot 10. Terminating.');
                  TerminateScript;
                 end;
            end;
          end;
          end;
          blueButtom;
          antiban;
          tabBackpack.waitSlotPixelChange(14,16000);
          tabBackpack.open();
          checkForTickets;
          if (random(50) > 44) then
            wait(randomRange(3000, 10000)) //antiban
          else
            wait(300 + random(800))
        end else
      begin
        Writeln('You dont have full backpack. Trying again.');
        Exit;
      end;
    end;

      procedure Cleaner;
    var
      vialDTM, x, y, c: integer;
    begin
        vialDTM := DTMFromString('mwQAAAHic42RgYFjJwsCwAog3AfFaKAbxlwDxAig2ZGJgsAFiCyDWA2JVIJYDYk0gNgJiKyDOKlwINA3IYGCE0phYkoEwYCQCwwEAyS0JgQ==');
      if not isLoggedIn() then
        exit
      else
      openGEbank;
      bankDeposit;
      withdrawCleans;
        bankScreen.close();
        wait(2000 + random(600));
        inc(c);
      if (tabBackpack.isFull) then
        begin
          wait(200 + random(200));
          mouse(727, 451, 5, 5, MOUSE_MOVE)
        if isMouseOverText(['rimy'], 500) then
        begin
          fastClick(MOUSE_LEFT);
          wait(200 + random(200));
        end;
      end else
        begin
          Writeln('You dont have full backpack. Trying again.');
          Exit;
        end;
    end;

    // main loop
    procedure MainLoop;
    begin
        clearDebug();
        disableSRLDebug := true;               // Clear the debug box
        smartEnableDrawing := true; // So we can draw on SMART
        setupSRL();
        MouseSpeed := randomRange(40, 46);
        declarePlayers();             // Set up your username/pass
        repeat
        if not isLoggedIn() then             // If player isn't logged in then
        begin
          players[currentPlayer].login();   // Log them in
          wait(4000 + random(3000));
          exitSquealOfFortune();
          minimap.clickCompass();
          tabBackpack.open();
        end;
        if WhatToDo = 'Pots' then
          begin
            Pots;
          end;
          if WhatToDo = 'Cleans' then
          begin
            Cleaner;
          end;

        inc(runsDone);
        writeln('--------' + (Timerunning) + '--------');
        writeln('-------------Made ' + IntToStr(runsDone) + ' runs----------------');
        smartImage.clear();
        until(false) or (not isLoggedIn());
      end;

    begin
    MainLoop;
    end.

  2. #2
    Join Date
    Dec 2013
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Sorry for 1st post, i looked only at code ;_;
    Last edited by flarde; 02-15-2014 at 08:30 PM.

  3. #3
    Join Date
    Mar 2013
    Location
    Freedomville.
    Posts
    155
    Mentioned
    2 Post(s)
    Quoted
    107 Post(s)

    Default

    The only thing I really picked up on was your rediculous mouse speed (slow it down, and vary it after each completed loop). If you don't mind me asking, were you goldfarm macro banned or macro majoring banned?

  4. #4
    Join Date
    Feb 2012
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    84 Post(s)

    Default

    Quote Originally Posted by sdf View Post
    The only thing I really picked up on was your rediculous mouse speed (slow it down, and vary it after each completed loop). If you don't mind me asking, were you goldfarm macro banned or macro majoring banned?
    Macroing goldfarmer. What does it mean to me?

  5. #5
    Join Date
    Mar 2013
    Location
    Freedomville.
    Posts
    155
    Mentioned
    2 Post(s)
    Quoted
    107 Post(s)

    Default

    Quote Originally Posted by Nufineek View Post
    Goldfarm. What does it mean?
    Goldfarm introduces the possibility that it was a targeted activity.

  6. #6
    Join Date
    Feb 2012
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    84 Post(s)

    Default

    Quote Originally Posted by sdf View Post
    Goldfarm introduces the possibility that it was a targeted activity.
    You mean like pursuant to ip flag or something like that?

  7. #7
    Join Date
    Feb 2012
    Location
    UK
    Posts
    909
    Mentioned
    10 Post(s)
    Quoted
    191 Post(s)

    Default

    He means to ask what sort of ban were the accounts given, as stated on the accounts status page of the runescape website? Were they all given the same type of offence, and were they "Macroing Major" or "Macroing Goldfarmer"?
    Solar from RiD.

  8. #8
    Join Date
    Feb 2012
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    84 Post(s)

    Default

    Yes I answered him - macroing goldfarmer.

  9. #9
    Join Date
    Dec 2013
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by Nufineek View Post
    Yes I answered him - macroing goldfarmer.
    How many hrs daily did u run it? Did u use powerbot on those accounts? Maybe u were flagged.

  10. #10
    Join Date
    Feb 2012
    Location
    UK
    Posts
    909
    Mentioned
    10 Post(s)
    Quoted
    191 Post(s)

    Default

    Quote Originally Posted by Nufineek View Post
    Yes I answered him - macroing goldfarmer.
    Sorry. Didn't read that post.
    Solar from RiD.

  11. #11
    Join Date
    Feb 2012
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    84 Post(s)

    Default

    Never used powerbot on any of them. About 15hrs a day.

  12. #12
    Join Date
    Feb 2012
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    84 Post(s)

    Default

    Anybody else has an idea what should I improve/what I got banned for this?

  13. #13
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Quote Originally Posted by Nufineek View Post
    Anybody else has an idea what should I improve/what I got banned for this?
    I would definitely say that the main reason would be the mouse speed as previously stated. But your anti ban isn't setup how it should be. The way you have it, every time it is called, there is a antiban "procedure" that is called. You also don't call it very often in the script, only at one spot. So here is how I would like to see it:
    Simba Code:
    Function Antiban: Boolean;
    Var
      I: Integer;
    Begin
      I := Random(600);
      Case I Of
        1..3:
          begin
            boredHuman(true);
            minimap.clickCompass();
          end;
        4..15:
          Begin
            hoverSkill(Skill_crafting);
            Wait(GaussRangeInt(1000,2000));
          End;
        16..25: mouseMovingObject;
        26..39: SleepAndMoveMouse(RandomRange(100,MouseB));
        40..64:
          Begin
            MouseOffClient(Random(4));
            Wait(RandomRange(2000, MouseB));
          End;
        65..80: Wait(RandomRange(1000, 2000));

      End;
    End;

    So now, you want to call this throughout your script, and it will only perform an action when the random number is within the numbers listed in the case. This makes it much more human like. When you try it, if it isn't doing an action often enough, or not enough, just change the number in the random(600) more or less! Also, you have a procedure that has it's own antiban within it, that is redundant and you should just call AntiBan;

    Let me know if you didn't understand something or need any help!

    Congrats on the script and hope you keep going!
    Last edited by Kyle; 02-16-2014 at 05:24 PM.
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  14. #14
    Join Date
    Feb 2012
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    84 Post(s)

    Default

    Quote Originally Posted by sdf View Post
    Goldfarm introduces the possibility that it was a targeted activity.
    Got goldfarm ban again on another one fresh account. With mousespeed 20, 25 instead of 40, 46. Do you think it's just the activity or just all the IPs I use have to be flagged?

  15. #15
    Join Date
    Mar 2013
    Location
    Freedomville.
    Posts
    155
    Mentioned
    2 Post(s)
    Quoted
    107 Post(s)

    Default

    Quote Originally Posted by Nufineek View Post
    Got goldfarm ban again on another one fresh account. With mousespeed 20, 25 instead of 40, 46. Do you think it's just the activity or just all the IPs I use have to be flagged?
    There are too many possibilities for us to be certain on why you're being banned. Could be anything from your VPN's all being IP flagged/detecting MAC spoofing/having same MAC addresses/activity targeting.

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
  •