Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Question Dropping items via inventory

Joined
Apr 30, 2016
Messages
4
Code:
for (SpriteItem i : Inventory.getItems("Iron ore")) {

            Execution.delay(1000, 1500);
            i.interact("Drop");
        }
        if(Inventory.contains("Iron ore"))
            dropOre();

I'm making a simple powerminer (Just trying to learn how to make bots), and I'm attempting to drop items from the inventory when full. The above works but it often misses items in the inventory hence why I attempted recursion, is there a better way to do it? Right now it looks clumsy.
 
Java Warlord
Joined
Nov 17, 2014
Messages
4,906
Only drop one item per loop, or generally speaking, only do one action (interacting, turning camera, etc) per loop.
 
Top