Jump to content

Wanting feedback on my script/code


Recommended Posts

Posted

Ran threw most of your code, and tested it out. Codded well, and everything works fine. Here are a few bugs.

*I have feathers in inventory but I still get a error saying that I have no feathers. 

*Does not take fishing rod out of bank, it will just sit there if you don't start the bot with one in inventory. 

 

- That is all I encountered so far... I wan't to understand and learn from your source code so thank you for uploading this. 

Currently seeing how you did the GUI System and made the drop down menus I don't see how you did it with your code with JFrame. Anyway thank you for the information and awesome bot. 

 

Posted (edited)

Fixed your bait bug.

*Made it so it checks if you have bait in inventory before taking bait out of bank. 

 

 

I see, i forgot the ! smile.png, I havent really gotten around to testing the bait side of things, since i pretty much re wrote the entire thing yesterday. Other than this, what do you think?

Note: still working on the gui code, it is utter shit in my opinion

Edited by Mykindos
  • Like 1
Posted (edited)

Any one here willing to give me more information on the best way to make scripts? Some people say Node, others say Sates like what OP did. Any information on what is the "correct" way of making a bot. I know the API pretty well, just structuring a bot to work the best it my issue. 


Fixed dropping fishing poles bug... 

	ArrayList<String> safelist = new ArrayList<String>(){{
		add("Feather");
		add("Fishing Bait");
		add("Harpoon");
		add("Lobster Pot");
		add("Small fishing net");
		add("Coins");
		add("Fly fishing rod");
		add("Fishing rod");
	}};
Edited by Cache Money
Posted (edited)

 

Any one here willing to give me more information on the best way to make scripts? Some people say Node, others say Sates like what OP did. Any information on what is the "correct" way of making a bot. I know the API pretty well, just structuring a bot to work the best it my issue. 

Fixed dropping fishing poles bug... 

	ArrayList<String> safelist = new ArrayList<String>(){{
		add("Feather");
		add("Fishing Bait");
		add("Harpoon");
		add("Lobster Pot");
		add("Small fishing net");
		add("Coins");
		add("Fly fishing rod");
		add("Fishing rod");
	}};

 

They're both good. Some people will argue nodes are always better and some people will argue that states are always better. Use what you like best. In the end they do the same thing.

Edited by VladBots
Posted

They're both good. Some people will argue nodes are always better and some people will argue that states are always better. Use what you like best. In the end they do the same thing.

It all depends on what the current project is. If your doing a skill where all it is one different data but the some actions. You will mostly use states. When it become more complex, different script modes doing different action for example spinner and armoury. You would use node because it easier to implement different methods.

 

at op:

i just seemed though your stuff. Look ok except for 

i saw this http://prntscr.com/6ec2bq be careful varage does not return null they do return length of 0. So in case you need getPosition() to return null you can force it null by checking the length.

Posted (edited)

What does using instance do compared to just using the method or this?

 

The instance lets me access all of the Script features that are extended in the main class

 

 

A couple of things:

 

Why do you say this? Is it because of my use of the static class WalkHandler? Or the excess use of public variables throughout main and GUI? Or perhaps i should be using protected?

Edited by Mykindos
Posted

The instance lets me access all of the Script features that are extended in the main class

 

 

 

Why do you say this? Is it because of my use of the static class WalkHandler? Or the excess use of public variables throughout main and GUI? Or perhaps i should be using protected?

Excessive use of the public modifier.

Posted

Excessive use of the public modifier.

So would protected be a better options? Or even re adjusting my packages so i dont have to use these modifiers at all?

 

Thanks for pointing it out though, I do feel very clumsy using it a lot, my entire GUI class is utter shit in my opinion

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.
×
×
  • Create New...