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
  • Try asking for help in the chatbox
  • Proper Animation Checking?


    EpicPins
     Share

    Recommended Posts

    Hi I'm new here. I've been out of the botting scene for many years but decided I wanted to try scripting as I now (hopefully!) have the development skills to do so.

    I'm currently making a smithing/smelting script but have run into problems while detecting the smelting animation.

    When deciding whether to Smelt, I thought it was a good idea to check the player animation to determine if the work has been completed, or if the furnace must be clicked again. I've been using  the isAnimating method within my condition for this check. 

    getLocalPlayer().isAnimating()

    and also tried checking the animation value:

    getLocalPlayer().getAnimation() == 899

    So you might see where this is going, but between actions, the player model switches from doing the animation to just standing. This means this check can show that the player as not animating. Is there a 'proper' way of determining if the player is animating - or between animations?

     

    Thanks!

    Link to comment
    Share on other sites

    I personally use this for smithing after I've interacted with the furnace and told it to smelt all:

    int smithingLevel = Skills.getRealLevel(Skill.SMITHING);
    sleepUntil(() -> !Inventory.contains("Iron ore") || Skills.getRealLevel(Skill.SMITHING) > smithingLevel,
            Calculations.random(50000, 60000));
    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    ×
    ×
    • 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.