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
  • Problem with smelting script


    Recommended Posts

    I made a script to smelt ore in Al Kharid. Banks fine, and interacts with the furnace nicely, but not sure what to do for the loop to wait so it does not spam click the furnace...


    I tried using...

    sleepWhile(() -> getLocalPlayer().getAnimation() != -1, 40000); 

    - problem with this is the players animation changes from -1 to animated after it smelts 1 bar


    sleepWhile(() -> getInventory().contains("Copper Ore", "Tin Ore"), 40000);

    -this gets the job done waiting for all ore to get gone, but if you level up the bot sits there till the delay ends


    I do handle the level up dialog, but it never gets called because its sleeping.


    Any help would be appreciated with this problem.

    Link to comment
    Share on other sites

    Try sleepUntil(()->)


    multiple sleepUntils switch between -1 and smelt animation

    you can probably come up with some better logic to run the script if you think about it


    track the count of the ore/bar


    also dont sleep for 40 seconds... lets the loop reaccess your smelt function if it finds ores and is not smetling

    Link to comment
    Share on other sites

    I would just sleepUntil you have no ores or you're in a dialogue (level up)

    thanks works, i was looking for another way, and was blind to using an or. =p.

    Link to comment
    Share on other sites


    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.