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
  • Problem with Filters and Question on interact() method


    xaklon

    Recommended Posts

    Hi!

     

    I have two questions:

     

    1. I recently got back into Java development, and within Eclipse, even using the Java SE 1.8 runtime build, filters do *not* work, offering me the option to make the filter object into a local variable (AKA not recognizing the Lambda expression)

     

    2. How can I recognize when my character is in action? I have seen the method to retrieve if character is currently in combat, but for example I'm learning through making a simple mining script, and do not want it to click while he is mining - but this is obviously variable depending on ore and level, so sleep() interval does not work unless its >20 seconds. What methods can I use within my mine() method so that it does not do rocks.interact("Mine") until it has finished the mining process?

     

     

    The community is so helpful - thank you!

     

     

     

    Link to comment
    Share on other sites

    1. regardless of what IDE you're using, you're still writing the same code in the same language. eclipse and intellij are basically the same. if your compiler isn't recognizing lambda, chances are you dont have java 8. 

     

    2. conditional sleep until your character is done animating

     

    getLocalPlayer().isAnimating()

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

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