The client is offline due to RuneScape update. You may see instance errors but this is due to the update and not actual instance errors. This should be resolved soon. Join our Discord for more information.

First script (fish and cook in Catherby), how'd I do?



  • https://github.com/samspeake/catchncook

    https://forums.rspeer.org/topic/963/free-sammy-s-catch-n-cook-stock-up-on-food-in-catherby-fishing-cooking-all-cathy-fish

    Looking for any advice on better methods that I could've used in any places, or general pointers. Thanks!


  • Script Writer

    Hey! Good job on your first script, keep it up.

    I didn't look through all the code, I skimmed most of it. One thing that would make your life a little easier is using the StopWatch class. It handles all the paint calculations and keeps track of the script running time.

    Overall I think your design could be improved by following the SOLID principles. Some of my scripts violate these principles because I dived into coding rather than planning and implementing a good design. I pay a high price every time I have to fix something or add a new feature, it's a hassle at times. But my scripts that do follow these principles tend to be flawless and continue to run flawlessly update after update, and adding new features or fixing bugs is a breeze.

    If after learning the SOLID principles, you are curious about more helpful resources, check out some common design patterns. Start with Singleton, then maybe take a look at some of the following: Factory, Builder, Observer, Visitor, State, Strategy, Command, Mediator, etc. There are so many patterns you can implement, and trying to implement these patterns in an RSPeer script would be very beneficial for your scripts and your overall coding skills.

    Good luck and keep scripting dude 👍


 

54
Online

16.6k
Users

1.4k
Topics

19.2k
Posts