Question How can I stop Script from clicking an object again

Discussion in 'Developer Support' started by Matty20, Aug 2, 2016.

  1. Hi Guys,

    You have been a big help,
    I have a question.

    I have tried a number of different things to try and stop my script bot from clicking on a GameObject again.

    I am smelting and in between smelts, my players animation ID is set to -1, which then clicks the object again.

    The code I have for clicking is below

    public static boolean clickOnObject(GameObject object) {
    if(Players.getLocal().getAnimationId() == -1){;
    return Execution.delayUntil(() -> (Players.getLocal().getAnimationId() != -1), 2000);
    } else
    return false;
  2. Consider instead of delaying until the player isn't animating to be until the player doesn't not have the bars in their inventory :D
  3. Thanks for the reply, I have tried that.
  4. And it didnt work?
    Execution.delayUntil(() -> !Inventory.contains("Whatever"), 30000);
  5. yup thats the exact code i had except my delay was shorter. I had 10000
  6. Well 10000 is only 10 seconds. Which seems too short ad a max delay

Share This Page