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
  • Checking for animations instead of rest time?


    RawrRawr

    Recommended Posts

    I have been working on making a woodcutter to learn and I have noticed that my guy will click the tree constantly every few seconds instead of waiting for idle animation. Is there a way I can make it wait until my guys is idle again or have it do a check that its cutting the tree so it doesnt keep clicking?

    I just have a sleep return timer for it at the moment.

    Link to comment
    Share on other sites

    sleepUntil(()->getLocalPlayer().getAnimation()!=-1, Calculations.random(1145,4671); // if tree clicked Character will sleepUntil tree cutting animation occurs or 1.145-4.671 seconds passes;

    //include some random sleeps here

    sleepUntil(()->getLocalPlayer().getAnimation()==-1), Calculations.random(1745,8671); // sleepUntil finished cutting tree

    //include sleeps here

     

    //can also use getInventory().count("logType");

    //also gameObject check of tree stump to occur

    //also xp gain stop

     

     

    if(getLocalPlayer().getAnimation!=treeCuttingAnimation){

    tree.interact("Cut the mother fucker");

    }

    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.