Question Cooking Bot Help

Discussion in 'Developer Support' started by NZL, May 18, 2016.

  1. Whats an effective way of,
    Selecting Fish -> Use on Fire -> Cook-All

    Code (Text):
    1. SpriteItem sI1 = Inventory.newQuery().names(nzl.getFish()).results().random();
    2. InterfaceComponent iC = Interfaces.newQuery().textContains(nzl.getFish()).containers(309, 6).results().first();
    3. GameObject fire = GameObjects.getLoaded("Fire").nearest();
    4.  
    5. if (sI1 != null && Inventory.contains(nzl.getFish()) && fire !=null && !Inventory.contains(nzl.getCFish)){
    6.    sI1.interact("Use");
    7.    fire.click();
    8.    iC.interact("Cook All");
    9. }
    Another Problem I'm having is
    Code (Text):
    1.     if(fire.interact("Use")){
    2.         Execution.delayUntil(() -> iC != null && iC.isVisible(), 500, 1000);
    3.     }
    4.  
    it is clicking on the people around the fire because their hit box's are over the fire
     
    #1 NZL, May 18, 2016
    Last edited: May 18, 2016
  2. 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 :)
     

Share This Page

Loading...