Results 1 to 6 of 6

Thread: Randoms WillowChopper

  1. #1
    Join Date
    Jun 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Randoms WillowChopper

    Version 2.0 : Fixed mass clicking
    So anyways guys, first day here at SRL, still learning to script. I did make a basic script and I want to see how it is. Would really appreciate it if someone tests it out and proggies.
    99% of the credits goes to Griff for his thread about how to make a simple rs script tree. I modified it to cut willow trees and improved (i think) the antiban so it should at least function. As I said, this is my first day here so don't expect this script to be a miracle!
    Version 2.0:
    Simba Code:
    program Randoms_WillowChopper;
    {$DEFINE SMART}
    {$i srl/srl.simba}

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

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

    procedure AntiBan;
    begin
      if(not(LoggedIn))then
      Exit;
      FindNormalRandoms;
      case Random(100) of
       0:
       begin
         HoverSkill('Woodcutting', false);
         wait(2453+Random(432));
       end;
       1: BoredHuman;
       2:
       begin
         MakeCompass('N');
         wait(100+random(133));
         MakeCompass('S');
         wait(50+random(133));
         MakeCompass('N');
         FindNormalRandoms;
       end;
      end;
    end;
    function IsWoodcutting: Boolean;
    var
    PBox: TBox;
    begin
    PBox := IntToBox(245, 130, 285, 195);
    Result := (AveragePixelShift(PBox, 250, 500) > 750);
    end;

    procedure ChopTree;
    var x, y: integer;
    begin
        repeat
        FindNormalRandoms;
        While IsWoodcutting Do Wait(200+Random(50));
        if FindObj(x, y, 'hop', 2239532, 40) then
        begin
          Mouse(x, y, 0, 0, false);
          ChooseOption('hop');
        end;
          repeat
          wait(400+random(250));
          AntiBan;
          Until not IsUpText('ew') or (InvFull);
      until(InvFull);
    end;

    begin
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;
      ChopTree;
    end.
    Bugs that I know of:
    -Mass clicking on Willow trees. Anyone know a fix for this?
    Last edited by Randoms; 06-13-2012 at 12:10 AM.

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

    Default

    Do a Procedure for pixel shift to fix the spam clicking. Something like..

    function IsWoodcutting: Boolean;
    var
    PBox: TBox;
    begin
    PBox := IntToBox(245, 130, 285, 195);
    Result := (AveragePixelShift(PBox, 250, 500) > 750);
    end;


    then before "Procedure ChopTree"

    Put this:

    While IsWoodcutting Do Wait(200+Random(50));

    Basically what I just said is here: http://villavu.com/forum/archive/index.php/t-82977.html

  3. #3
    Join Date
    Jun 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Sokkr7 View Post
    Do a Procedure for pixel shift to fix the spam clicking. Something like..

    function IsWoodcutting: Boolean;
    var
    PBox: TBox;
    begin
    PBox := IntToBox(245, 130, 285, 195);
    Result := (AveragePixelShift(PBox, 250, 500) > 750);
    end;


    then before "Procedure ChopTree"

    Put this:

    While IsWoodcutting Do Wait(200+Random(50));

    Basically what I just said is here: http://villavu.com/forum/archive/index.php/t-82977.html
    Ahh ok, I will add that when I get home. Where should I put this in my script? I'm new at this (like 5 hours after I have heard of Simba :P)? I'm talking about he function you mentioned by the way.
    Last edited by Randoms; 06-12-2012 at 10:46 PM.

  4. #4
    Join Date
    Jul 2008
    Location
    Poland
    Posts
    79
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You can do smth like :

    Simba Code:
    procedure ChopTree;
    var x, y: integer;
    begin
        repeat
        FindNormalRandoms;
        while(IsWoodcutting) do wait(200+random(100))
        if FindObj(x, y, 'hop', 2239532, 40) then
        begin
          Mouse(x, y, 0, 0, false);
          ChooseOption('hop');
        end;
          repeat
          wait(400+random(250));
          AntiBan;
          Until not IsUpText('ew') or (InvFull);
      until(InvFull);
    end;
    Last edited by Endzior; 06-12-2012 at 11:11 PM. Reason: damn c++ >.>
    "Egoist: person, who cares more about himself rather then me." J.Tuwim

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

    Default

    Quote Originally Posted by Randoms View Post
    Ahh ok, I will add that when I get home. Where should I put this in my script? I'm new at this (like 5 hours after I have heard of Simba :P)? I'm talking about he function you mentioned by the way.
    Do you have teamviewer? I could try to explain it (by showing) a little bit better through that.

  6. #6
    Join Date
    Jun 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Talking

    Quote Originally Posted by Sokkr7 View Post
    Do you have teamviewer? I could try to explain it (by showing) a little bit better through that.
    Never mind :P got it to work thanks
    Last edited by Randoms; 06-13-2012 at 12:05 AM.

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
  •