Tom Posted March 7, 2015 Share Posted March 7, 2015 (edited) Thread finished, source now hidden. Edited April 12, 2015 by Mykindos 1 Quote Link to comment Share on other sites More sharing options...
Cache Money Posted March 8, 2015 Share Posted March 8, 2015 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. Quote Link to comment Share on other sites More sharing options...
Cache Money Posted March 8, 2015 Share Posted March 8, 2015 Fixed your bait bug. *Made it so it checks if you have bait in inventory before taking bait out of bank. Code: Quote Link to comment Share on other sites More sharing options...
Tom Posted March 8, 2015 Author Share Posted March 8, 2015 (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 ! , 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 March 8, 2015 by Mykindos 1 Quote Link to comment Share on other sites More sharing options...
Cache Money Posted March 8, 2015 Share Posted March 8, 2015 Personally I think it is the best fishing script I have yet to use. It works like a charm, I am only scared to use it sometimes because I don't know how safe it is to even use. Quote Link to comment Share on other sites More sharing options...
AresScripts Posted March 8, 2015 Share Posted March 8, 2015 You should look into the node framework on the tutorials section. Its alot easier to code and everything feels clean. Its like that feeling you get when you buy a new car Quote Link to comment Share on other sites More sharing options...
Cache Money Posted March 8, 2015 Share Posted March 8, 2015 node framework? Sounds Interesting. I found another game breaking bug! *When in dropping mode/state you drop the fishing pole! (Kinda problematic.) I will try to fix it on my own, will let you know. Quote Link to comment Share on other sites More sharing options...
VladBots Posted March 8, 2015 Share Posted March 8, 2015 A couple of things: Read up on access modifiers Package names should be lowercase Inventory#interact returns a boolean, so you should use it as one (https://github.com/Tomhoogstra/osFisher/blob/master/src/com/ggplugins/osFisher/Handlers/DropHandler.java#L37) Other than that, well done on your first script! Quote Link to comment Share on other sites More sharing options...
Cache Money Posted March 8, 2015 Share Posted March 8, 2015 (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 March 8, 2015 by Cache Money Quote Link to comment Share on other sites More sharing options...
VladBots Posted March 8, 2015 Share Posted March 8, 2015 (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 March 8, 2015 by VladBots Quote Link to comment Share on other sites More sharing options...
Joseph Posted March 8, 2015 Share Posted March 8, 2015 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. Quote Link to comment Share on other sites More sharing options...
milo1337 Posted March 8, 2015 Share Posted March 8, 2015 What does using instance do compared to just using the method or this? Quote Link to comment Share on other sites More sharing options...
Tom Posted March 9, 2015 Author Share Posted March 9, 2015 (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: Read up on access modifiers 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 March 9, 2015 by Mykindos Quote Link to comment Share on other sites More sharing options...
VladBots Posted March 12, 2015 Share Posted March 12, 2015 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. Quote Link to comment Share on other sites More sharing options...
Tom Posted March 12, 2015 Author Share Posted March 12, 2015 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 Quote Link to comment Share on other sites More sharing options...