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
  • Search the Community

    Showing results for tags 'smelting'.

    • Search By Tags

      Type tags separated by commas.
    • Search By Author

    Content Type


    Forums

    • Requests
    • DreamBot
      • Announcements
      • Client Support
      • Site Support
    • Community
      • General Discussion
      • Runescape
      • Spam
      • Applications
    • Scripts
      • SDN Scripts
      • Local Scripts
      • Private Scripting Shops
      • Script Requests
      • Script Management
    • Development
      • Scripting
      • Programming
    • Market
      • Vouchers / Store Credit
      • Middleman Services
      • Gold Exchange
      • Membership Sales
      • Account Sales
      • Item Exchange
      • Services
      • Graphics
      • Other
    • Management
      • Disputes
      • Appeals
      • Archive

    Product Groups

    • Donator
    • VIP
    • Sponsor
    • Scripts
      • Agility
      • Combat
      • Construction
      • Cooking
      • Crafting
      • Fletching
      • Firemaking
      • Fishing
      • Herblore
      • Hunter
      • Magic
      • Mining
      • Farming
      • Prayer
      • Ranged
      • Runecrafting
      • Slayer
      • Smithing
      • Thieving
      • Woodcutting
      • Money Making
      • Mini-Games
      • Quests
      • Other

    Find results in...

    Find results that contain...


    Date Created

    • Start

      End


    Last Updated

    • Start

      End


    Filter by number of...

    Joined

    • Start

      End


    Group


    Website URL


    Discord


    Skype


    Location


    Interests

    Found 1 result

    1. import org.dreambot.api.methods.interactive.GameObjects; import org.dreambot.api.methods.interactive.Players; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.script.listener.AnimationListener; import org.dreambot.api.wrappers.interactive.GameObject; import org.dreambot.api.wrappers.interactive.Player; @ScriptManifest(author = "Deep Slayer", name = "Testing script", version = 1.0, description = "for testing snippets", category = Category.MISC ) public class TestingPurposes extends AbstractScript implements AnimationListener { private long idleAnimationStartTime = -1; // Time when the idle animation starts private boolean finishedSmelting = false; @Override public void onPlayerAnimation(Player player, int animation, int animationDelay) { // Check if not animating if (Players.getLocal().getAnimation() == -1) { // If not animating record the time if (idleAnimationStartTime == -1) { idleAnimationStartTime = System.currentTimeMillis(); } else { // Check if it has been more than 2 seconds if (System.currentTimeMillis() - idleAnimationStartTime > 2000) { finishedSmelting = true; log("We are finished smelting"); } } } else { // Reset the timer if the player starts a new animation idleAnimationStartTime = -1; finishedSmelting = false; log("We are NOT finished smelting"); } } @Override public int onLoop() { GameObject furnace = GameObjects.closest("Furnace"); if (furnace != null && furnace.isOnScreen() && Players.getLocal().isStandingStill()) { if (finishedSmelting) { furnace.interact("Smelt"); sleep(2000, 2500); // Adjust sleep as necessary finishedSmelting = false; // Reset flag after interaction } } return 500; } }
    ×
    ×
    • 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.