Welcome to TRiBot Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

botsallday

FlawlessFlaxPicker [Open Source] ABC

13 posts in this topic

Also make sure you zip the java files, not the class files.

Gotcha. Fortunately I'm a noob, so its all one file anyway. Also, I'm not sure how else to show the source so I am just going to paste it into the original post.

Share this post


Link to post
Share on other sites

Gotcha. Fortunately I'm a noob, so its all one file anyway. Also, I'm not sure how else to show the source so I am just going to paste it into the original post.

 

@botsallday

 

You should use some sort of repository for your source code, such as Github, Bitbucket, or GitLab.

 

This will greatly improve organization and readability for anyone looking at your code.

2 people like this

Share this post


Link to post
Share on other sites

@botsallday

 

You should use some sort of repository for your source code, such as Github, Bitbucket, or GitLab.

 

This will greatly improve organization and readability for anyone looking at your code.

Ill get it setup on one of them. I currently use github, however I would not like to link my professional github account with my botting one so I will use a new account.

1 person likes this

Share this post


Link to post
Share on other sites

Ok i'm new at this too, but ill give you some things I observer in your script. :).
 

        boolean bank_screen_is_open = Banking.openBank();                if (bank_screen_is_open) {        	General.sleep(250, 1340);            return depositAll();        }

you can just do: if(Banking.openBank(){ //no need to store it in a variable

General.sleep(250, 1340); should be replaced by a waitCondition you can find it under Timing :).You want to avoid static sleeps :)

 

You also have and odd way on naming variables :)

need_to_bank should be needToBank :)

if its a final variables than you name it like this:NEED_TO_BANK(all capitals)

if (Inventory.isFull()) {	        int items_deposited = Banking.depositAll();	        	        // if we deposited any items, print the number	        if (items_deposited > 0) {	        	General.sleep(845, 3558);	            log("Deposited "+ items_deposited +" items.");	            // close bank	            closeBankScreen();	        }        	        return true;    	} else {    		return false;    	}

you are not doing anything if the deposit fails(it will still return true).The bot can misclick the deposit button.

 int flax_per_hour = (int)(flax_picked * 3600000 / run_time); g.drawString("Flax Per Hour: "+ flax_per_hour, 330, 435);

this will print a shit number when you picked more than 600 flax :).

you need to cast flax_picked into a long before multiplying it by a big number like 3600000

int max value = 2,147,483,647

,so if you have 600 flax 600*3,600,000>2,147... you get the point.

 

So that's the general  mistakes I noticed.I hope that helps.And keep up the good work :)

Edited by Red_Spark
1 person likes this

Share this post


Link to post
Share on other sites

what happens if i get killed while running your flax script? do i walk back to the field? does it pick flax and pick it up? does it run to the bank?Also is there anyway you can make it so the bot checks the deposit box for a cammy tab before the deathwalk? 

Share this post


Link to post
Share on other sites

Ok i'm new at this too, but ill give you some things I observer in your script. :).

 

        boolean bank_screen_is_open = Banking.openBank();                if (bank_screen_is_open) {        	General.sleep(250, 1340);            return depositAll();        }

you can just do: if(Banking.openBank(){ //no need to store it in a variable

General.sleep(250, 1340); should be replaced by a waitCondition you can find it under Timing :).You want to avoid static sleeps :)

 

You also have and odd way on naming variables :)

need_to_bank should be needToBank :)

if its a final variables than you name it like this:NEED_TO_BANK(all capitals)

if (Inventory.isFull()) {	        int items_deposited = Banking.depositAll();	        	        // if we deposited any items, print the number	        if (items_deposited > 0) {	        	General.sleep(845, 3558);	            log("Deposited "+ items_deposited +" items.");	            // close bank	            closeBankScreen();	        }        	        return true;    	} else {    		return false;    	}

you are not doing anything if the deposit fails(it will still return true).The bot can misclick the deposit button.

 int flax_per_hour = (int)(flax_picked * 3600000 / run_time); g.drawString("Flax Per Hour: "+ flax_per_hour, 330, 435);

this will print a shit number when you picked more than 600 flax :).

you need to cast flax_picked into a long before multiplying it by a big number like 3600000

int max value = 2,147,483,647

,so if you have 600 flax 600*3,600,000>2,147... you get the point.

 

So that's the general  mistakes I noticed.I hope that helps.And keep up the good work :)

This is mostly great advice! The one thing I would say is that variable naming conventions (camelCasing vs snake_case) is merely preferential, so there is nothing wrong with either way. I personally prefer to camel case my functions and snake case variables. I think you are probably right about final variables being all caps. Everything else seems like awesome suggestions! Thanks.

 

 

what happens if i get killed while running your flax script? do i walk back to the field? does it pick flax and pick it up? does it run to the bank?Also is there anyway you can make it so the bot checks the deposit box for a cammy tab before the deathwalk? 

It should deathwalk back. I will look into checking for a cammy tab. I am planning to update this sometime today with better antiban (I actually got some of it working now, yay).

Share this post


Link to post
Share on other sites

Hey great post man!

 

I'm new to Java but i'm gonna try and bake me a script :)

 

Thanks for posting to GitHub, really appreciate it. =)

1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.