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
  • Scripting 101


    Hashtag

    Recommended Posts

    Hey, thanks for the feedback.

     

    The code you posted wouldn't be good since when player is standing still/moving, isAnimating() returns false. This means the bot would click the tree and sleep until you are not animating (neither standing still or moving) and notice you are walking to the tree, which means it wouldn't sleep at all. This results in spam clicking the tree. If you happen to stand next to the tree and somehow manage to animate before your script checks for animation, it would work.

     

    What my code does is clicks the tree, sleeps until we are moving and then sleeps more until we are animating (chopping). If a lag spike happens to occur, it would sleep for max 7 seconds in total, which is quite a long time. Therefore it rarely spam clicks. I can imagine it clicks the tree twice if the distance to the tree is long and you get a lag spike. To avoid that, increase the timeouts for the sleeps =).

     

    I hope I managed to answer your question.

     

    Hey, I appreciate the fast response.

     

    I was indeed looking more from the perspective that you are already standing next to tree and that if a player is moving isAnimating() would return true. With isAnimating() returning false when moving this of course changes it a lot, because then it would indeed spamclick the tree when running to it. (when chopping already your function isChopping() would prevent the spamclicks of course)

     

    I'm new to the dreambot API and looking to start scripting for it so thanks for pointing that out already ;)

     

    Thanks again.

    Link to comment
    Share on other sites

    • 1 month later...
    • 1 month later...

    How is this "Scripting 101"? Even if someone has programmed before, you are literally spoonfeeding (baby feeding) them lines of code of your own silly programming habits.

     

    Sure, explaining the functionality of certain implementations such as the GUI painting method helps a lot, but the screenshots of 'free code' for others to live and breathe on as what a script should look like does not help one bit.

    Link to comment
    Share on other sites

    • 1 month later...
    • 1 month later...

    Hey im trying to get into scripting and have a couple of questions:

     

    How to get multiple tabs in the GUI like your #1 woodcutting script has for example,

     

    What would be the best way of traversing and depositing things at a bank,

     

    How to get camera and mouse movement to look human-like?

     

    Thats all, thanks.

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