damightyshmo Posted March 27, 2020 Share Posted March 27, 2020 Hello! I've always been wanting to write a bot script and recently after getting a job as a Junior Software Dev i figued why the hell not start now! So basically i'm still in the process of learning a few things. However, when writing a Sheep Shearer script. It will only continue the convo with Farmer Fred if i'm running OSBOT with remote debugging enabled. https://pastebin.com/FLmy0qqm Thanks for any replies Quote Link to comment Share on other sites More sharing options...
Apaec Posted March 27, 2020 Share Posted March 27, 2020 A few things to note: As the bot is interacting with a live game, you cannot rely on API calls to execute successfully. For example, if you have the line 'entity.interact(....', and then hit some lag, the call might not affect game state and so your script will continue without actually having interacted. You have to build in resilience to this with your script. Ideally, your script should be entirely deterministic and only execute one game interaction per onLoop call. The onLoop function loops, so you will end up unnecessarily trying to walk to the area you have specified every iteration, which i'm guessing is not what you had in mind. Avoid static sleeps (e.g sleep(random(300,400));...). These don't really anything other than hinder the efficiency of your script. The interaction API handles camera movement etc, so no need to do that manually Best of luck Apa Quote Link to comment Share on other sites More sharing options...