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
  • Try asking for help in the chatbox
  • Questions about script structure in bigger projects.


    Nosta
     Share

    Recommended Posts

    Hello guys! I'm 1 month into scripting and I've just completed my Tutorial Island script!

    I'm planning on having one "do it all" script that I will run on 100+ accounts:
    Complete Tutorial Island --> Get the requirements to use GE --> Start making GP using various methods and transfering the profits to a mule.

    My question is in reguards to script structure. My Tutorial Island script is just about 1200 lines of code and uses a Enum structure with different States being executed within a loop. But as my character is now done with Tutorial Island and is about to do his first quest, how should I structure this quest to be a part of the same one script? Should I make a new Project for each quest and have my "main" script talk to those projects? If so, how do I do that? If not, then should I make a new class and make my "main" class speak with the other classes to complete different quests/tasks? How should I go about doing that?

    What are your suggestions? I bet it would be unwise to list more "states" for things outside of Tutorial Island right? Then I would end up with A LOT of different states and it would start to become unreadable at one point. Wouldn't it be wiser with a structure such as having a main class that communicates with other classes containing quests/tasks? How do I go about doing that? Anyone with experience? Perhaps links to some resourses?

    Thank you so much for reading, hope you have a fantastic day :)
    ~Nosta

     

    Link to comment
    Share on other sites

    I'd suggest looking at either a task/node framework to get started or a tree/branch/leaf version, node scripts tend to be easier to maintain and understand when working on some of your first complex scripts where tree/leaf framework will provide more efficient and precise actions desired with increased complexity. Both can provide what your looking for but it really boils down to what you prefer. Some searching around the forms can yield some source from other users. I believe Articron posted one a while back

    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
     Share

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