Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Ernest the Chicken code - Seeking critique


    coff

    Recommended Posts

    Yo all

    I'm new to DreamBot. Here's a link to a part of my script which does the Ernest the Chicken quest. I'm keen to hear the critique of you more experienced scripters, if you feel like giving your 2c. I want to make my code as reliable and maintainable as possible.

    https://github.com/CoffMakesThings/ErnestTheChicken/blob/main/ErnestTheChicken.java

    Cheers

    Edited by coff
    Link to comment
    Share on other sites

    At a quick glance I noticed a few things.

    What happens during the quest if the user does not have inventory space to pick up the items needed? Will it spam click ground items forever if my inventory is full?

    Also there's a few interactions that aren't null checked such as picking up the spade. What happens if someone else has picked up the spade and it doesn't exist?

    Overall looks alright - bit hard to follow. However Earnest the chicken is one of the older quests in OSRS so doesn't have many player configs that change throughout the quest. As you start writing other quests you notice that they have many config changes and you can better write the script into more readable chunks based on where you are in the quest state

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

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.