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
  • How to make Scripts use less CPU?


    Juggles

    Recommended Posts

    I created a script that runs very fast and has fast interactions but now my computer lags when I try to run two bots. Is this due to the script I made?

    Link to comment
    Share on other sites

    • 3 weeks later...

    And try to make as less objects as you can. ("new" keyword).

     

    I once accidentally created new objects inside my onLoop() method. This wasn't visible while running the bot, but it kept making the objects over and over until my CPU and RAM memory couldnt handle the data anymore. My computer crashed and burned down and i had to buy myself a new computer. - just kidding - over time it made so many objects that my pc slowed down to like 2 FPS.

    Link to comment
    Share on other sites

    Increase the sleep time between loops, if you have it super low (like 0), then complex calculations like WorldToScreen etc, maybe even getNPC blah blah, will use ALOT of cpu because they are being called a large amount of times per second.

    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.