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


    brbxd

    Recommended Posts

    public void GrabWine() {
    		if (grabLocation.distance() == 0 && !getInventory().isFull()) {
    			getMagic().castSpell(Normal.TELEKINETIC_GRAB);
    			getMouse().move(wineLocation);
    			GroundItem wine = getGroundItems().closest("Wine of zamorak");
    			if (wine.exists() && wine != null) {
    				getMagic().castSpellOn(Normal.TELEKINETIC_GRAB, wine);
    			}
    		}
    	}

    This method is supposed to grab a wine, click telegrab, hover over wine spot, wait for a new wine to spawn, and grab that. But after the first initial grab, it starts spamming the wine tile randomly with the error:

    [ERROR]23:26:28: Exception has occurred while running! Please report error to developer if problem persists:
    	java.lang.NullPointerException
    	at org.dreambot.brbXD.main.GrabWine(main.java:32)
    	at org.dreambot.brbXD.main.onLoop(main.java:18)
    	at org.dreambot.api.script.AbstractScript.run(AbstractScript.java:250)
    	at java.lang.Thread.run(Thread.java:748)
    

    Can somebody point me in the right direction? I've been having trouble on this for awhile now, I don't think I fully understand getGroundItems in general...

    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.