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 Cooking Bot Help

nzl

Joined
Dec 3, 2015
Messages
22
Whats an effective way of,
Selecting Fish -> Use on Fire -> Cook-All

Code:
SpriteItem sI1 = Inventory.newQuery().names(nzl.getFish()).results().random();
InterfaceComponent iC = Interfaces.newQuery().textContains(nzl.getFish()).containers(309, 6).results().first();
GameObject fire = GameObjects.getLoaded("Fire").nearest();

if (sI1 != null && Inventory.contains(nzl.getFish()) && fire !=null && !Inventory.contains(nzl.getCFish)){
   sI1.interact("Use");
   fire.click();
   iC.interact("Cook All");
}

Another Problem I'm having is
Code:
    if(fire.interact("Use")){
        Execution.delayUntil(() -> iC != null && iC.isVisible(), 500, 1000);
    }

it is clicking on the people around the fire because their hit box's are over the fire
 
Last edited:
Joined
Apr 30, 2016
Messages
16
I'm a bit new with Bot writing and the API. But i would at least recommend you make sure that the actions you make are successful before you move on to the next one :)
 
Top