Jump to content
memelord123

Barbarian Village Fisher & Cooker

Recommended Posts

AUnnTzY.png

Fly fishes trout and salmon at Barbarian Village then cooks the raw fish on the permanent fire.

Option to drop cooked fish or to bank them.

Current Version 1.1

Download: http://www.mediafire.com/file/35ftk4721uz144f/BarbVilleFisher%26Cooker.zip/file

 

Progress Reports:

Spoiler

Quick proggie I did while testing the script. Send in your proggies and I'll include them here.

090fad9c7d432ea0985b8a166578388e.png

Change Log:

Spoiler

1.0 - Initial release

1.1 - Fixed the bot occasionally not picking up the fire on default zoom, optimised script

 

Edited by memelord123
  • Like 1

Share this post


Link to post
Share on other sites

Good job on the release... I would try and refactor your code a little to be more maintainable. Rather than have a giant onLoop() you can break it down to functions and boolean checks. 

if ( ! myPlayer().isAnimating() ){
  if ( !getInventory().isFull() ){
    fish(); 
  } else {
    if ( shouldBank() ){
      bank(); 
    } else { 
      cook(); 
    }
  }
} else { 
  // Wait as we are fishing or cooking
} 

Also wrap your interactions in conditionals

if ( fishingSpot.interact("Lure") ){
  status = "Fishing"; 
  //handle post interaction logic
}

This ensures you can check for interaction success / failure. 

Look into walking#walkPath as you shouldn't need to use webWalk for this.  

Edited by jca
  • Like 1

Share this post


Link to post
Share on other sites
34 minutes ago, jca said:

Good job on the release... I would try and refactor your code a little to be more maintainable. Rather than have a giant onLoop() you can break it down to functions and boolean checks. 


if ( ! myPlayer().isAnimating() ){
  if ( !getInventory().isFull() ){
    fish(); 
  } else {
    if ( shouldBank() ){
      bank(); 
    } else { 
      cook(); 
    }
  }
} else { 
  // Wait as we are fishing or cooking
} 

Also wrap your interactions in conditionals


if ( fishingSpot.interact("Lure") ){
  status = "Fishing"; 
  //handle post interaction logic
}

This ensures you can check for interaction success / failure. 

Look into walking#walkPath as you shouldn't need to use webWalk for this.  

Thanks for the advice. I plan on breaking the onLoop down to a few methods but as I initially wrote it like this I kept it like this in the thread so others can easily read it without scrolling to each method. Second point makes total sense and I should be putting booleans like that in conditional statements but as I viewed it as "just an action" I didn't really think to write it the way you describe. Finally, I just used webWalk because I knew about it so I didn't look into any other methods of walking but I realised while using webWalk that it's not ideal, so I'll definitely look into walkPath.

 

20 minutes ago, Juggles said:

Start the bracket { on the line above please. 
Easier to read xD

Imo it looks prettier and easier to follow the way I do it and doesn't break the code conventions. But I realise most people write like the way you described and to them it probably seems like a lot of brackets flying around :D

  • Like 1

Share this post


Link to post
Share on other sites

[INFO][Bot #1][10/13 04:53:22 PM]: Terminating script BarbVilleFisher&Cooker...
[WARN][Bot #1][10/13 04:53:27 PM]: Event executor is taking too long to suspend; terminating now...
[INFO][Bot #1][10/13 04:53:27 PM]: Time ran: 15:28:54
[INFO][Bot #1][10/13 04:53:27 PM]: Fishing Xp gained: 365,250
[INFO][Bot #1][10/13 04:53:27 PM]: Cooking Xp gained: 471,640
[INFO][Bot #1][10/13 04:53:27 PM]: Script BarbVilleFisher&Cooker has exited!

Ran for nearly 15.5 hours good script

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...