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
  • extremely simplistic cabbage picker


    darkjack7

    Recommended Posts

    Nice one mate. One thing: I never knew you could train crafting with cabbages rofl. (@ScriptManifest => category = Category.CRAFTING)

     

    and where is yo' paint m8 Kappa

    import java.awt.Color;
    import java.awt.Font;
    import java.awt.Graphics2D;
    
    Link to comment
    Share on other sites

    The first line couldn't throw an NPE and the null check might be necessary pending on how the getGameObjects() list is generated and how the Filter class is implemented. The second line could throw an NPE if there is nothing around that matches that filter though.

     

    Not sure if that's what you meant but I don't think (save execution time, even though that doesn't really matter) the null check really makes a difference.

    Yes thats what i mean, his filter checks for Gameobjects that arent null, but the actual "cabbabe" object could return null if nothing fits the filter, and then .interact would throw the NPE

    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.