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
  • Implementing listeners


    Recommended Posts

    Why do you need to put a listener on a task node? What're you trying to accomplish?

    I'm putting many different scripts into 1 big, I thought about making the controller as a TaskScript and the scripts as TaskNodes.

    I overcame that issue by implementing listeners on the TaskScript and created a new abstract class that extends TaskNode, then I created a variable (that has the abstract class as its type) inside the TaskScript that holds the required (As selected by user from a GUI) TaskNode... Then simply whenever a listener fires I'd call a method from the "AbstractClass" variable that I am overriding inside the actual TaskNode... This way I'm avoiding creating different variables for each TaskNode and detecting which one to use.

    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.