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
  • Galaxy Framework


    sini
     Share

    Recommended Posts

    Galaxy Scripts

     

    1). Purpose

     

    The purpose of the Galaxy framework is to create a robust simple way to develop scripts for the Dreambot client. Galaxy employs Typescript which is prepackaged using Webpack to run on the Java 8 Nashorn engine. This allows for a user to simply run the control scripts and then instruct the controller which script to run, and during development, easily reload the script without having to stop or restart the script the Dreambot client is currently executing.

     

    Galaxy defines an simple way to script, by trying to keep much of the logic code as slim as possible by employing a pattern similar to the Entity Component System architecture.

     

    2). Links

     

    - Repository

    - Typescript

     

    3). Examples:

     

    This is an example of using the Galaxy API to configure a script and access a script state component.

    import {Script} from './script';
    import {ExampleState} from "./state/example";
    import {Galaxy} from "./galaxy";
    
    Galaxy.initializer((script : Script) => {
      const state = script.getState(ExampleState);
      state.meow();
    });
    
    Edited by sini
    Link to comment
    Share on other sites

    Does this bring more advantages than the DreamBot API?

     

    Than using the API? It has to rely on the hooks from Dreambot to do anything. In the future? It may. Just depends on what I personally need to do my scripts.

    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.