Jump to content

roguehippo's Basket Filler


roguehippo

Recommended Posts

Hello everyone, I am thinking about applying for scripter status and decided to show the community what i can do. Here is a script i quickly made to fill baskets! :) 

works by any banker npc just have the empty baskets and whatever object you want to fill them with in the bank.

includes: 

easy to use gui

all fruit / vegetable options 

 

let me know if any bugs are found, thanks!

( I updated with gui of time spent and baskets made)

the baskets made / hr will be around 1600 and can profit from like 150k - 300k depending on prices

BasketFiller.jar

Edited by roguehippo
updated file
  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
  • 2 months later...

I used a decompiler to take a look at your code and there are a few things I can see that could use some fixing up before applying for scripter status.

1) OSbot's API methods can fail and so you should be checking if they return true before sleeping after calling them. Example:

if (bank.depositAll()) {
	sleep;
}

2) You should be using conditional sleeps instead of just random sleeps so that the script waits till the condition has passed.

3) I don't know why you're declaring String arrays every time you want to interact with something. 

NPC banker = (NPC)this.getNpcs().closest(new String[]{"Banker"});

should be

NPC banker = (NPC)this.getNpcs().closest("Banker");

And even then, it's a good idea to store things as variables and even final variables if you know the value is never going to change.

Link to comment
Share on other sites

1 hour ago, d0zza said:

I used a decompiler to take a look at your code and there are a few things I can see that could use some fixing up before applying for scripter status.

1) OSbot's API methods can fail and so you should be checking if they return true before sleeping after calling them. Example:


if (bank.depositAll()) {
	sleep;
}

2) You should be using conditional sleeps instead of just random sleeps so that the script waits till the condition has passed.

3) I don't know why you're declaring String arrays every time you want to interact with something. 


NPC banker = (NPC)this.getNpcs().closest(new String[]{"Banker"});

should be

NPC banker = (NPC)this.getNpcs().closest("Banker");

And even then, it's a good idea to store things as variables and even final variables if you know the value is never going to change.

i didnt even know that osbot functions returned true if they were successful, i can think of so many places where this would get rid of some bugs. thanks so much for the helpful information!

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...