CrashBandiboob Posted September 27, 2019 Share Posted September 27, 2019 Very good guide, thanks my dude! Quote Link to comment Share on other sites More sharing options...
Nicholas99GHz Posted December 14, 2019 Share Posted December 14, 2019 Thank you so much for this guide. I've learned a ton from both yours and Explv's. I just made a super simple willow powerchopper based off your code. It's been great practice for me and really inspired me to start slowly moving towards more ambitious projects. Thanks again! Quote Link to comment Share on other sites More sharing options...
imachi Posted December 17, 2019 Share Posted December 17, 2019 hi @Apaec ! Thanks for the guide. This has probably asked before, but when developing the script, do i have to close out OSBot and relog in to build the project and see the changes made? Quote Link to comment Share on other sites More sharing options...
Apaec Posted December 18, 2019 Author Share Posted December 18, 2019 13 hours ago, imachi said: hi @Apaec ! Thanks for the guide. This has probably asked before, but when developing the script, do i have to close out OSBot and relog in to build the project and see the changes made? Nope - you should be fine just overriding the JAR in the scripts directory. No need to restart OSBot. Quote Link to comment Share on other sites More sharing options...
xjax1 Posted March 26, 2020 Share Posted March 26, 2020 Hey, great guide, im just curious if the script manifest has changed since this tutorial was created? because i cant seem to get OSbot to recognize the custom script. I havent changed much past the original script but i exported just to make sure it worked and it doesnt package testingBot.main; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(author = "xjax1", info = "Testing Script", name = "testbot", version = 1, logo = "") public class Main extends Script { @Override public void onStart() { log("Starting Up"); } @Override public int onLoop() throws InterruptedException { return 0; } @Override public void onExit() { log("Exiting"); } } As you can see, not many changes, but it still wont load, i have made sure(multiple times) its exported as a JAR and in the right file, and have restarted and re-installed OSbot quite a few times. is there any possible fix for this? or does OSbot just not like my pc script for some reason? Quote Link to comment Share on other sites More sharing options...
Pomography Posted March 30, 2020 Share Posted March 30, 2020 Hmm. Totally new to programming so I'll have a few questions. FI copied and pasted in the backbone, and already got a lot of red lines. Here's what the console reads. Error: Unable to initialize main class core.Main in module TeaThiever2 Caused by: java.lang.NoClassDefFoundError: Graphics2D Got the OSBot jar file in the referenced libraries - Looks like I have a new edition of Eclipse since this tutorial was made though, so I exported it under ClassPath. First red line and error is appearing at this code line: import java.awt.Graphics2D; Any idea on the issue? Quote Link to comment Share on other sites More sharing options...
Conscious Realm Posted May 24, 2020 Share Posted May 24, 2020 I appreciate you so much for writing this I've just started learning today and set everything up. Going to code a Woodcutting script with the end goal in a year of coding a Raids script for myself! Quote Link to comment Share on other sites More sharing options...
Supamen Posted June 9, 2020 Share Posted June 9, 2020 This is amazing! Thank you. Quote Link to comment Share on other sites More sharing options...
gmcain09 Posted July 12, 2020 Share Posted July 12, 2020 Not to overstate - but this is so helpful. Thanks for taking the time to create a guide for newbies. This is much more concise and easy to understand than some of the YouTube tut's I've been using. Thanks again! Quote Link to comment Share on other sites More sharing options...
badjie Posted July 23, 2020 Share Posted July 23, 2020 I recently got into scripting and im having some difficulties searching for stuff i need in the api, i know what i need but i have trouble finding what is the right method to use and how to use it. For example the myPlayer method, there's no way i would know that i need to do !myPlayer instead of myPlayer. Also if i find a method, i dont know what do i have to import in order to use it. Sorry for the noob question but essencially if i know how to search the api, i would script much faster since i have some programming knowledge already. Thanks! Quote Link to comment Share on other sites More sharing options...
Apaec Posted July 23, 2020 Author Share Posted July 23, 2020 29 minutes ago, badjie said: I recently got into scripting and im having some difficulties searching for stuff i need in the api, i know what i need but i have trouble finding what is the right method to use and how to use it. For example the myPlayer method, there's no way i would know that i need to do !myPlayer instead of myPlayer. Also if i find a method, i dont know what do i have to import in order to use it. Sorry for the noob question but essencially if i know how to search the api, i would script much faster since i have some programming knowledge already. Thanks! APIs can take a bit of scavenging to find what you need. Useful links are the alphabetical 'index' at the top of the docs, when you are looking for a method but don't know which class it might belong to. Also, the '!' is a negation operator, i.e., if you take something that evaluates to true and negate it with a '!', the result will be false (just thought i'd clear that up as that's unrelated to the OSBot API). It just takes a bit of practice to learn where most things are, as with all APIs. I'd suggest asking for help on specifics when you get stuck (perhaps in the OSBot discord). Good luck! Quote Link to comment Share on other sites More sharing options...
badjie Posted July 24, 2020 Share Posted July 24, 2020 On 8/15/2014 at 9:51 AM, Apaec said: RS2Object stall = getObjects().closest("Tea Stall"); if (stall != null && !myPlayer().isAnimating()) { stall.interact("Steal-from"); } // ... So here the !myPlayer().isAnimating() part is basically saying if my player is NOT(negating with !) in the middle of an animation? Quote Link to comment Share on other sites More sharing options...
Apaec Posted July 24, 2020 Author Share Posted July 24, 2020 9 hours ago, badjie said: So here the !myPlayer().isAnimating() part is basically saying if my player is NOT(negating with !) in the middle of an animation? Exactly 1 Quote Link to comment Share on other sites More sharing options...
badjie Posted July 24, 2020 Share Posted July 24, 2020 13 hours ago, Apaec said: Exactly Thank you for the fast answers! Quote Link to comment Share on other sites More sharing options...
badjie Posted July 24, 2020 Share Posted July 24, 2020 I actually have 1 more question, getObjects().closest() what is the "." just before "closest" doing? i also didnt find anything on the api so im assuming its a language thing 1 Quote Link to comment Share on other sites More sharing options...