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
  • Feeling kinda stupid, condition to switch nodes


    GaneratedBots
     Share

    Recommended Posts

    So this is my first time scripting, I'm trying to get a handle on the framework of using nodes. I know this script would probably be easier to implement in a single java class but I want to learn how to use nodes as it seems like the go to framework for more complex tasks. 

    Currently, I'm trying to build a fly fisher that will automatically go and kill chickens when it runs out of feathers. It consists of two nodes. One for killing chickens and the other for fly fishing. My issue is how to correctly set a good validate condition to switch between the two based on the number of feathers in the characters inventory. The way I was doing it (which doesn't really make sense since it will only kill a single chicken and go back) is 
     

    Fly fish Node -> (c.getInventory().count(FEATHERS) > 150)
    Kill Chicken Node -> (c.getInventory().count(FEATHERS) <= 150)

    I feel sorta silly because I can't figure out a good way to create a good switching condition. Any help would be appreciated!

    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.