qwAQ 17 Share Posted July 11, 2018 Just now, SwagLordGuy said: Thanks for the suggestion, I spent a good 10 hours over the past week on the basics. I struggle to learn by watching someone else, I just need experiencing and I find that best through going backwards up and messing with the code. Alright I understand, then my other suggestion would be to google your syntax problems. You will most likely find an explanation to the problem and the solution. Link to comment Share on other sites More sharing options...
SwagLordGuy 2 Author Share Posted July 11, 2018 1 minute ago, qwAQ said: Alright I understand, then my other suggestion would be to google your syntax problems. You will most likely find an explanation to the problem and the solution. Well I think the syntax error was rooted in the api AdvancedLisener (or whatever it was called) my imported API was saying that it had no uses despite using "onMessage, Message, etc) Link to comment Share on other sites More sharing options...
SwagLordGuy 2 Author Share Posted July 11, 2018 Also I have another error where my woodcutter randomly stops clicking the tree although puts the mouse on it eventually the mouse stops trying to click and I solved that by putting it on auto-login. Link to comment Share on other sites More sharing options...
qwAQ 17 Share Posted July 11, 2018 3 minutes ago, SwagLordGuy said: Well I think the syntax error was rooted in the api AdvancedLisener (or whatever it was called) my imported API was saying that it had no uses despite using "onMessage, Message, etc) Alright, here are the steps you will have to following: 1. Go to the class where you extend AbstractScript. After extending AbstractScript, implement the interface 'AdvancedMessageListener' 2. Now your IDE will either auto-import this interface for you, or will give you a warning that it has to be imported. Your IDE probably has an option to import the interface 3. After you've imported the interface, you'll get another warning saying you have to Overrride a few methods from the interface you just implemented. Go ahead and let your IDE auto-Override these methods for you 4. Now you should be ready to add Nex's solution. ^ These are the steps you will have to do by yourself to learn. If you're having trouble to follow any of them, say for example implementing the interface, you should google 'Java implement interface'. Good luck Link to comment Share on other sites More sharing options...
SwagLordGuy 2 Author Share Posted July 11, 2018 5 minutes ago, qwAQ said: Alright, here are the steps you will have to following: 1. Go to the class where you extend AbstractScript. After extending AbstractScript, implement the interface 'AdvancedMessageListener' 2. Now your IDE will either auto-import this interface for you, or will give you a warning that it has to be imported. Your IDE probably has an option to import the interface 3. After you've imported the interface, you'll get another warning saying you have to Overrride a few methods from the interface you just implemented. Go ahead and let your IDE auto-Override these methods for you 4. Now you should be ready to add Nex's solution. ^ These are the steps you will have to do by yourself to learn. If you're having trouble to follow any of them, say for example implementing the interface, you should google 'Java implement interface'. Good luck Thanks, this is pretty much what I did the first time except I don't really know how to implement the interface correctly other than typing an object and having the IDE import it. I'll look more into it. More so I wasn't really sure how to fit it into the code, to make it say if "I can't reach this!" try next nearest tree. But thats the next step anyway. Link to comment Share on other sites More sharing options...
SwagLordGuy 2 Author Share Posted July 11, 2018 Yea i've given up lol a shit filled error tastic effort of trying to get it work with no sucess what so every. It doesn't dectect the implemented structure and asks for ; to be placed everywhere that the varibles are incorrect that I have incorrect placement Link to comment Share on other sites More sharing options...
qwAQ 17 Share Posted July 11, 2018 32 minutes ago, SwagLordGuy said: Yea i've given up lol a shit filled error tastic effort of trying to get it work with no sucess what so every. It doesn't dectect the implemented structure and asks for ; to be placed everywhere that the varibles are incorrect that I have incorrect placement Proper scripting is not just about simple logic like it may sound. The syntax is just the beginning. Thereafter you need to learn how to design to make a structured script/application that you can maintain. If you cannot structure properly, then you will not be able to make good scripts as they grow in complexity quite fast. So if you have no intentions of spending months learning programming, you're wasting your time and I'd suggest just using others' scripts. Link to comment Share on other sites More sharing options...
Articron 738 Share Posted July 11, 2018 15 minutes ago, qwAQ said: Proper scripting is not just about simple logic like it may sound. The syntax is just the beginning. Thereafter you need to learn how to design to make a structured script/application that you can maintain. If you cannot structure properly, then you will not be able to make good scripts as they grow in complexity quite fast. So if you have no intentions of spending months learning programming, you're wasting your time and I'd suggest just using others' scripts. Now that is a very negatively phrased response to someone who's on the verge of giving up. SwagLord, if you want any help you can PM me on Discord: Articron#5089 Link to comment Share on other sites More sharing options...
SwagLordGuy 2 Author Share Posted July 11, 2018 9 hours ago, Articron said: Now that is a very negatively phrased response to someone who's on the verge of giving up. SwagLord, if you want any help you can PM me on Discord: Articron#5089 Thanks for that, I've added you. Hopefully I can find some useful help through you! Link to comment Share on other sites More sharing options...
Snout 0 Share Posted July 18, 2018 You've come this far, now don't give up because something doesn't seem to work. Use a filter that looks like this: GameObject tree = getGameObjects().closest(gameObject -> gameObject != null && gameObject.getName().contains("Tree") && gameObject.hasAction("Chop down") && getMap().canReach(gameObject)); This part will do the trick: getMap().canReach(gameObject) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.