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
  • Proper Animation Checking?


    EpicPins

    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

    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.