Lemonade 1 Posted April 29, 2017 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.
ArmyofDragons 28 Posted August 17, 2017 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.
templex 5 Posted November 14, 2017 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.