Results 1 to 9 of 9

Thread: [SRL] drynorWillowChopper

  1. #1
    Join Date
    Feb 2018
    Posts
    23
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default [SRL] drynorWillowChopper

    No idea how stable it is, Currently has no anti bans, breaking, or failsafes of any kind.

    drynor.png needs to be placed inside of Includes\RSWalker\maps

    Code:
    program drynorWillowChopper;
    {$define SMART} //If not using SMART, then comment this line out
    {$I SRL/OSR.simba}
    {$I RSWalker/Walker.simba}
    const
      LOGIN_NAME = '';
      LOGIN_PASS = '';
      RS_WORLD   = -1;
      IS_MEMBER  = False;
    
    var
      leWalker: TRSWalker;
    
    procedure declarePlayers();
    begin
      with Players.New()^ do
      begin
        LoginName  := LOGIN_NAME;
        Password   := LOGIN_PASS;
        IsActive   := True;
        IsMember   := IS_MEMBER;
        World      := RS_WORLD;
      end;
      Players.SetCurrent(0);
    end;
    
    function isChopping(): Boolean;
    var
      invCount: Integer;
    begin
      invCount := Inventory.Count;
      wait(randomRange(7000, 15000));
      Result := (Inventory.Count <> invCount);
    end;
    
    procedure startup();
    begin
      SRL.Setup([]);          
      leWalker.Init('world[4_5].png', -1);    
    
      declarePlayers();            
    
      if (not SRL.isLoggedIn) then
      begin
         Players.LoginCurrent();    
         MainScreen.setAngle(True); 
      end;
    end;
    
    procedure walkToWillows();
    var
      path: TPointArray;
    begin
      path := [[338, 406], [317, 444]];
      leWalker.WalkPath(path);
    end;
    
    procedure chopWillows();
    var
      TPA, willowTree: TPointArray;
      ATPA: T2DPointArray;
    begin
      if (SRL.FindColors(TPA, CTS2(1918270, 9, 0.05, 1.11), MainScreen.GetBounds) > 0) then
      begin
        ATPA := TPA.Cluster(12);
        ATPA.FilterSize(1, 95);
        ATPA.SortByIndex(MainScreen.GetMiddle);
    
        for willowTree in ATPA do
        begin
          Mouse.Move(willowTree[Random(Length(willowTree))]);
    
          if MainScreen.IsUpText(['Chop down W', 'hop down W', 'p down W']) then
          begin
            Mouse.Click(mouse_left);
            Break;
          end;
        end;
        repeat
          wait(randomRange(500, 1500));
        until(not isChopping);
      end;
    end;
    
    procedure walkToBank();
    var
      path: TPointArray;
    begin
      path := [[317, 444], [338, 406]];
      leWalker.WalkPath(path);
    end;
    
    procedure doBank();
    begin
      BankScreen.Open(blDrynor);
      wait(randomRange(250, 400));
      BankScreen.DepositAll;
      BankScreen.Close;
    end;
    
    begin
      clearDebug();
      startup();
    
      repeat
        walkToWillows();
        repeat
          chopWillows();
        until(Inventory.IsFull);
        walkToBank();
        doBank();
      until(false);
    end.
    Attached Images Attached Images
    Last edited by 6b49WR7VbUjs9Hqeq5Etr; 06-24-2018 at 12:09 AM.

  2. #2
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Congratulations on the release!
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  3. #3
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    It's a nice first released script, reminds me of my own earlier scripts :-)
    Thanks for the contribution!
    PS: you are loading the map from RSWalker's slices, which means people don't need to download the given map - they already have it
    Last edited by slacky; 06-23-2018 at 11:10 PM.
    !No priv. messages please

  4. #4
    Join Date
    Feb 2018
    Posts
    23
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by slacky View Post
    It's a nice first released script, reminds me of my own earlier scripts :-)
    Thanks for the contribution! PS: you are loading the map from RSWalker's slices, so people don't need to download the given map - they already have it
    Quote Originally Posted by KeepBotting View Post
    Congratulations on the release!
    Should go without saying, But if there is anyway i can improve on the tree detection I would love to hear about it and try it out, And thank you both, I wrote it in like 5 minutes before leaving this morning and came back like 2 hours later with it still running.

  5. #5
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Quote Originally Posted by 6b49WR7VbUjs9Hqeq5Etr View Post
    Should go without saying, But if there is anyway i can improve on the tree detection I would love to hear about it and try it out.
    I published something that could be useful some time ago:
    https://villavu.com/forum/showthread.php?t=117808

    Ofc that find any type of tree as is, but I think it could be made to only find willows with the right parameters.
    !No priv. messages please

  6. #6
    Join Date
    Feb 2012
    Location
    Portugal
    Posts
    91
    Mentioned
    3 Post(s)
    Quoted
    41 Post(s)

    Default

    Grats on the first release ma dude!

  7. #7
    Join Date
    Jul 2018
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    getting this error;

    Error: Plugin(.) has not been found
    Compiling failed.

  8. #8
    Join Date
    Apr 2012
    Posts
    3,356
    Mentioned
    34 Post(s)
    Quoted
    218 Post(s)

    Default

    Quote Originally Posted by jonnyhotpockets View Post
    getting this error;

    Error: Plugin(.) has not been found
    Compiling failed.
    Have you followed this guide: https://villavu.com/forum/showthread.php?t=118211

  9. #9
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    Reminds me of my first script - Draynor Willow Chopper&Banker.

    Awesome release, keep adding onto it

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
  •