Vilius Posted February 29, 2016 Share Posted February 29, 2016 (edited) For some people looking at the API's documentation might be overwhelming Reading the documentation is really easy and everyone can do it without an issue. Simple explanation of what the documentation page has. Getting to the documentation page is really simple you just simply click the API button on any page of the OSBot forums. After we get there we are greeted with this page Marked in red we see the API's packages Marked in blue we see the API's classes Marked in green is the documentations of a class. Basic know about's in the documentation of a class Marked in red is the name of the class Marked in blue is the classes it extends Marked in green is a short description of a class Scrolling down we see much more Marked in green is the data type of the method Marked in blue is the method and a short description Clicking on any of those methods it will bring you down to a more in depth explanation of the method Marked in red we see the method and the parameters it can have Marked in blue is the short description. Marked in green is the parameter and a short description of what the parameter means. Marked in yellow is the return type of the method Looking back at the red we can see depositAll(int... ids) int... is the datatype the method will accept as a parameter. Simply put you can only pass an int variable to the parameter which would look like this: depositAll(111); A more detailed guide on how to find your needed methods and how to use them Lets say we are making a woodcutting script and now you need to interact with the tree object. You know its an RS2Object so you write: RS2Object tree = getObjects().closest("Tree"); You defined the objects variable but you now want to interact with it, but you have no idea. You go to the chatbox and ask people how do I do it? They will just point you to the API, where you are met with this page Now you just really want to see what method you need to use to interact with the tree so you start at the obvious "search for RS2Object" Simply press the hotkeys CTRL + F and enter "RS2Object", you will see a lot of matches, but you need to search it in the box called "All classes" We open the found class documentation We see a lot of stuff, which I'm going to go trough it. Marked red is the name of the class Marked blue is the other classes the RS2Object class inherits/implements. Marked in green is a short description of what the class does. Moving on we see the methods the class has. Marked in red is the RS2Objects classes own methods Marked in pink is the methods it inherits from the class Entity Marked in blue is the methods it inherits from the class Identifiable Marked in green is the methods it inherits from the class Intractable Well now you are asking why is the RS2Object class inheriting so many methods from other classes, but it only extends Entity? Quickly looking at the Entity class docs we can see that it extends the class Identifiable and Intractable. After this short gander at these methods one catches our eye called "Interact" which I think we are looking for, aren't we? Now we are getting somewhere, after clicking on the interact method we are redirected to another page. We see the method details marked in red. In blue we see it has parameters that we can pass in in a String form, which simply means we can do .interact("Action") Remember how we made a variable? RS2Object tree = getObjects().closest("Tree"); So we found our method and now we can interact with the object by doing RS2Object tree = getObjects().closest("Tree"); tree.interact("Action"); So after this long journey we know what methods RS2Object has and what we can use, we found out how to interact with the object too. I hope this simple guide helped you to understand the documentation page more easily Edited February 29, 2016 by Vilius 12 Quote Link to comment Share on other sites More sharing options...
Harry Posted February 29, 2016 Share Posted February 29, 2016 Very nice guide. Easy to read and understand, thanks! 1 Quote Link to comment Share on other sites More sharing options...
Muffins Posted February 29, 2016 Share Posted February 29, 2016 Trough Quote Link to comment Share on other sites More sharing options...
Vilius Posted February 29, 2016 Author Share Posted February 29, 2016 (edited) TroughJee willikers, that typo Edited February 29, 2016 by Vilius Quote Link to comment Share on other sites More sharing options...
iTz EcLiPsE Posted March 5, 2016 Share Posted March 5, 2016 (edited) very nice guide helps alot never even knew this existed lol is helping so much with my learning Edited March 5, 2016 by iTz EcLiPsE 1 Quote Link to comment Share on other sites More sharing options...
The Hero of Time Posted March 7, 2016 Share Posted March 7, 2016 so what if you don't know you have to use rs2object? Quote Link to comment Share on other sites More sharing options...
kerklais Posted March 9, 2016 Share Posted March 9, 2016 Thank you, helped me a lot! 1 Quote Link to comment Share on other sites More sharing options...
Vilius Posted March 22, 2016 Author Share Posted March 22, 2016 so what if you don't know you have to use rs2object?Then you refer to this: http://osbot.org/forum/topic/93981-guidetypes-of-entities-and-how-to-use-them-correctly/ Quote Link to comment Share on other sites More sharing options...
Juggles Posted November 2, 2016 Share Posted November 2, 2016 Good guide will help beginners Quote Link to comment Share on other sites More sharing options...
Explv Posted November 2, 2016 Share Posted November 2, 2016 (edited) Seriously? A tutorial for reading documentation lel Edited November 2, 2016 by Explv Quote Link to comment Share on other sites More sharing options...
kazemaru Posted November 13, 2016 Share Posted November 13, 2016 Seriously? A tutorial for reading documentation lel i think it is not that weird. if i had something you never knew about and i show you that you prob won't understand it. like a technical plan of a car or house. Quote Link to comment Share on other sites More sharing options...
inv0ked Posted September 7, 2017 Share Posted September 7, 2017 Thank you so much, this is exactly what I needed! Quote Link to comment Share on other sites More sharing options...
Psybration Posted April 8, 2021 Share Posted April 8, 2021 Very helpful, thanks! Quote Link to comment Share on other sites More sharing options...
primordialsoup11 Posted August 19, 2022 Share Posted August 19, 2022 This really helped me learn how to use inheritence, instantiation and other aspects of OOP that I was struggling with. Quote Link to comment Share on other sites More sharing options...