Jump to content

Search the Community

Showing results for tags 'api'.

Found 15 results

  1. Many beginners fail to understand how to navigate API's. Today I am going to show you how to navigate and understand TRiBots documentation. I. Open TRiBots API by following this link: https://tribot.org/doc/ Your main screen should look like so: Don't be alarmed it's actually pretty easy to follow! I will begin by discussing the three main sections of our current screen. II. 3 Section main API page a) The API Packages: Here is where you can find select classes per package and then broaden your search for a specific class in that package. *Helpful for import finding!* For the next screenshot, I clicked on org.tribot.api . b ) Here is where we can search a specific class available from all of the combined packages the API documents has to offer. Selecting a class will introduce the methods and descriptions associated with them. c) Finally, Here is the overview panel where we can use the navigation bar to our liking and also see class documentation! You can search the Class Hierarchy, Deprecated Methods, Index, and Help section! Importance of the Index section The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields. Which is helpful for searching a specific method in the API documentation! For this GIF example, I select the Index section and followed the alphabetical list to search for the getHealthPercent() method. https://i.imgur.com/JxnRL5p.gif III. Part A: Class Documentation For the following information, I will select the class RSNPC from the classes section shown in II. b . Your overview panel should now show the RSNPC class documentation as follows This is the classes name and associated package. This is the classes implemented interfaces *If applicable*. Implementing the methods that allow us to get the RSNPC#RSTile, and RSNPC#Click methods. This shows the classes that it extends Allowing us to use the methods associated with RSCharacter . Some classes also show the description of the class as shown here . II. Part B: Class documentation Method Summary Scrolling down will show us the Method Summary . This section shows us the Method & Description and the return types each method returns. 1st column = data type of the method 2nd column = Method and Description of that method Clicking on any of those methods it will bring you down to a more in-depth explanation of the method. For this picture example I chose RSNPC#getDefinition() Marked in RED is the Name Marked in GREEN is the DataType, Method Name, and Possible parameters a method could have Marked in BLUE is the description of the method. Marked in YELLOW is the return type of the method. I hope my tutorial helped some of you. If a topic needs a better explanation, please feel free to address it to me in the comment section. Thank you, AliveInMe
  2. GrandExchange API

    Hi, Does anyone have an API for the Grand Exchange they don't mind sharing with me, or giving me a few pointers on creating one myself, as the current TRiBot API seems to be having some issues with Interface IDs
  3. Login Helper

    In the past, I've experienced consistency issues with certain methods in the API that return false/inconsistent information on certain occasions, especially upon logins. Here is something I've created a while ago that became very useful to combat that issue. import org.tribot.api.General; import org.tribot.api2007.Game; import org.tribot.api2007.Login; /** * @author JDezzy1 */ public class LoginAccess extends Login implements Access { /** * The amount of settings in the gamesettings array to confirm consistency * in ingame data */ public static final transient int settingsArrayLength = 70; /** * The ban message upon logging in */ public static final transient String BAN_HOOK = "Your account has been disabled. Please check your message-centre for details."; /* * (non-Javadoc) * * @see scripts.dezapi.wrappers.accessor.Access#access() */ @Override public Class<Login> access() { return Login.class; } /** * @return true if in game */ public static boolean inGame() { final STATE ST8 = getLoginState(); return ST8 != null && ST8.equals(STATE.INGAME); } /** * @return true if at the login screen */ public static boolean inLoginScreen() { final STATE ST8 = getLoginState(); return ST8 != null && ST8.equals(STATE.LOGINSCREEN); } /** * @return true if at the welcome screen */ public static boolean inWelcomeScreen() { final STATE ST8 = getLoginState(); return ST8 != null && ST8.equals(STATE.WELCOMESCREEN); } /** * @return true if there is a ban message */ public static boolean banMessage() { final String response = Login.getLoginResponse(); return response != null && response.equals(BAN_HOOK); } /** * Does what it says * * @return Game setting.length > ~70 plus all other hooks */ public static boolean isEverythingFuckingLoadedAndReadyToBeRead() { return !inWelcomeScreen() && inGame() && Game.getGameState() == 30 && Game.getSettingsArray().length >= settingsArrayLength; } /** * @return true if the login was successful */ public static boolean waitLogin() { return Waiting07.waitCondition(() -> { return isEverythingFuckingLoadedAndReadyToBeRead(); }, System.currentTimeMillis() + General.randomSD(35000, 45000, 4250)); } /** * @return true if the logout was successful */ public static boolean waitLogout() { return Waiting07.waitCondition(() -> { return inLoginScreen(); }, System.currentTimeMillis() + General.randomSD(35000, 45000, 4250)); } /** * * @param user * @param pass * @return */ public static boolean handleLogin(final String user, final String pass) { General.println("Login => attempting login => " + user); if (login(user, pass)) { General.println("Login => waiting for login..."); if (waitLogin()) { General.println("Login => logging in => successful login"); return true; } } return false; } }
  4. Help setting up local script

    Hi guys. This is my first time posting here since I just made an account today. I am a VIP user and am trying to get local scripts to work. I'm having trouble working with the API. I folllowed the instructions but the tribot jar file I downloaded does not seem to have the same classes available. For example, I tried copying this script into Intellij. I added the jar file as a dependency but there is no "org.tribot.api" import in that jar file. Am I using the the wrong version or something? I attached some pictures of what I'm getting in Intellij. Any help for a newbie would be appreciated. Thank you guys!
  5. Any APIs out for C++

    I love C++ more then I love Java and would love to start writing scripts in c++. Any API's or material I can use to start writing scripts? I've never written a script before, and I'm assuming its much more different then doing it with java. Any advice or tips would be awesome ^.^ #include <iostream>#include <string>using namespace std;int main(){ cout << "Hello World!!! << endl;}Much more efficient then having to write std:: all the time XD Also, I prefer Code::Blocks as an ide over anything the microsoft makes and eclipse (though Eclipse has some things going for it.
  6. Hi! I have this question: What is needed to start off with making good botting script in Java? Is Api knowledge > Java knowledge? I've completed basic programming course on Scala (also project course, where i made a Tetris with my friend) and i have basic knowledge in Java. Should i get as much Java knowledge as possible or start making scripts here? At a first glance at the script source code didn't seem complicate just some methods and if/else statemets. Preferably i need scipters feedback. Thanks!
  7. Hello, I am new to the Tribot API and I have a question related to the Grand Exchange close window methods for someone that is more familiar with the API... (From the Tribot API documentation) GrandExchange.close()... GrandExchange.close(boolean wait)... Is one of these deprecated? Thank you
  8. Method sleep is undefined

    I'm trying to write my first script and I'm running into issues while trying to use sleep(int). "The method sleep(int) is undefined for the type FlaxSpinner" I don't understand why it is not defined from one of the imports, so what do I have to import in order to use this method? I copy and pasted a full script into a new eclipse class to see if it would give me the same error, and it didn't; I then copy and pasted all of those imports into my class and it still didn't fix my issue. Please help, thanks in advance. -JamesHalpert
  9. Unfortunately, the amount of time I have for programming side projects has decreased. Somewhere within seemingly no time at all, I have mustered up enough spare time to start development on a Grand Exchange API. https://github.com/Warfront1/GrandExchangeAPI For an overall overview of the functionality take a look here: http://i.imgur.com/iVvZFjd.png I encourage anyone/everyone to contribute if they would like. Most interfaces have been hooked very solid (it's still missing a few important ones). There is a lot of duplicate code, and a TON of room for changes/fixes/optimization/documentation. This is a one way write through, with maybe 3-4 sessions of a 1 hour development period. I personally will carry this project through to a point where I deem it acceptable. I'll keep this thread, and github updated throughout the process! Take note I licensed under GNU public license V2 Enjoy, Warfront1
  10. RS3 ScreenModel Debugger

    This is a simple tool I made to assist me with ScreenModel debugging/exploring. This Tool has 2 primary Modes: 1) Debug any ScreenModel Via Hovering: 2) Debug A Screen Model By Entering it's ID, Locking the Debugger onto ONLY that Screen Model. IE. Mouse/Camera Movements will not effect the object being debugged. If at any point you would like to have a text version of the debug, you can hit the print screen key on your keyboard to output to the Tribot Log. Add with One Click Via the Repository: --------------------------------------------- : Click Here --------------------------------------------- Warfront1
  11. Creating a New API

    I am pretty new to scripting, so bare with me here. I am wanting to break down some of my methods in my scripts to increase reusability and and decrease some of the clutter in my code. For example, I was to have a separate class for my antiban methods. I have seen all the tutorials on creating these classes, but I am not sure how to integrate them into the api. Could someone help me our here? Possibly linking me to a good tutorial? Edit: I am using Eclipse as my IDE.
  12. Where are the tribot libraries?

    Hello there, I'm very new here and I want to get started with tribot scripting. I have experience in java programming but the problem is that I can't find the tribot libraries. Where am I supposed to find them? Do I have to pay for them? Did I miss something? Thanks in advance.
  13. How to set up the tribot API+ javadoc on a created project! Nothing revolutionary, but being able to read up the method's descriptions and other things inside the IDE (commonly on auto-completion) rather than go jumping between the IDE and the https://tribot.org/doc/ API everytime is abit more pleasant and might save you some time. This tutorial will show you how to add the tribot libs and have it link to it's Javadoc, in a simple project-independent way. Javadoc not added: Javadoc added: Steps: 1 - Download the Javadoc Trilez provided on this link: https://tribot.org/doc.zip 2 - Place it somewhere, I advise "user/AppData/Roaming/.tribot/dependancies/", since that's where the libs already are, so it shouldn't be moved around and keeps tidy. For Netbeans: 3 - Go into Tools > Libraries. 4 - Add a New Library. 5 - Name it whatever you wish and press Ok. 6 - Select it on the list (should be there after creating, but confirm it 7 - Select Add Jar/Folder. 8 - Select all the .jar files inside "user/AppData/Roaming/.tribot/dependancies/" and press Add Jar/Folder. 9 - Press the Javadoc tab. 10 - Press Add Zip/Folder. 11 - Browse to where you put your doc.zip, select it, and then Add Zip/Folder. 12 - Press Ok. 13 - Right click your scripts project, and select Properties. 14 - Select Libraries. 15 - Click Add Library. 16 - Select the library we just created and click Add Library. 17 - Press Ok. 18 - You can confirm everything has been added successfully! Enjoy~
  14. API Suggestion: RSTileZone

    Hey there, this is my first post, i know, so please dont flame me for posting this. As a somewhat seasoned scripter from another community (rscheata), When I started scripting, I quickly noticed something that would help speed up, and randomize scripts. As far as I can tell, there is no way for you to tell if you are in a certain area, other than to check the tile you are on, and then reference that to an array. Why not simply add RSTileZones into the api. they could look something like this.... RSTileZone edgevilleFurnace = new RSTileZone(new AryanTile(3107,350), new RSTile(3107,3501));^^^^^ direct copy of code from one of my scripts for ibot, simply converting the AryanTileZone to an RSTileZone This method would greatly help randomize walking to banks and locations. It would allow the scripter easy access to an area when pinpoint accuracy wasn't of the utmost importance, and therefore making the bot seem more human. (by not going to the same tile every time) It also allows for easy checks to see if you are in a certain area, for example: RSTile ourLocation;RSTileZone fishingArea = new RSTileZone(new RSTile(3100,3435,0), new RSTile(3103,3421,0));RSTile fishingSpot = new RSTile(3104,3429,0);ourLocation = getLocation(); if(!fishingArea.isInZone(ourLocation)){ status = "walking to the fishing area."; theWorldMap.walkTo(fishingSpot); } Im sorry if there is already something in the API similair to this. I looked for about an hour before posting. If there is somthing similair please let me know, it would greatly help me in my scripting :-)
  15. Checking chat

    I'm trying to use Chat class from the API but even though there are a lot of lines of chat, it gives me none. Is there any other way to get what other users have said?