Jump to content
Sign in to follow this  

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • By NeuroGenix
      Post rewritten after rewritting and updating the code multiple times.
      So I decided to give writing my own GE API a go and this is what I've come up with so far, using Exchange#offer(name, price, quantity, buy) will do the following:
      If the GE is closed, it will open it and continue making the offer. If the price is set to -1 then it will use the buttons to increase or decrease the price, depending on whether it is a buy or sell offer, until it is at a price that will buy/sell instantly. Otherwise it will use the custom input button to set the price. It will set the quantity using the 1/10/100/1000 buttons. I plan on updating this to randomise between using them and the custom input method shortly. Edit* I hadn't even remembered implementing this until I saw it do it whilst testing the method, and it was beautiful, but if it goes over the buy quantity accidently, in the example I saw it was clicking +100 and clicked it again too fast so instead of stopping before its target of 875 it got to 900, it will then use the custom amount interface to input 875, beautiful. It will prioritise buy offers over sell offers so that if there isn't an empty slot available, or any items to collect, then it will cancel a sell offer, collect it and continue now it has a free slot. If there isn't a free slot available and we are trying to sell something it will return true, this is so that in my scripts it will remove the item from a toSell HashMap and put it back into the bank to sell later because it has bought the items it needs to continue botting. If it is instead trying to buy something and there are no empty slots or sell offers to cancel then it will wait for something to buy and continue once it can collect something and therefore has an empty slot. Update* It will now search for the item 1-3 words at a time checking the first 9 results each time and will choose the item as soon as it is visible as a human would. I might update this so that it randomises more, sometimes entering the whole first word of an items name straight away, because I sometimes do that, most of the time though I enter as few characters as I need to, I think, thoughts? Let me know what you think, the code is probably disgusting to look at for some of you but for others just starting out like me it could be a valuable learning tool, for how not to code All feedback and constructive criticism appreciated.
      Exchange Class
      GEInterfaces Class
      GEConditions Class
      InfoHelper Class
      Thank you to everyone that has read this far, it is appreciated
      Rewritten, if you have read again, even more appreciation!
    • By AliveInMe
      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
    • By JoeDezzy1
      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; } }  
    • By namzug
      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!



    • By xCode
      Buy it now!
      Monthly (3 instances per auth)
      $7.49 (7.5 credits)
      Two weeks (3 instances per auth)
      $4.20 (4.2 credits)
      Or try the Trial (2 hours)
       
      Repository URL: https://tribot.org/repository/script/id/2088
       
       
       
      Current Features
      Grand Exchange support for buying and selling; Herb cleaning; Unfinished potions support; Potions support; Task driven workflow; ABC2 Antiban; Stopping when out of resources (or skipping the task); ~Basically, Everything you need within a Premium Herblore script!~
       
      Images
       
      FAQ
      Q: How do I set it up to use as much as possible herbs/unf pots/pots for a task?
      A: Use '0' for the amount.
      Q: What will happen when it can't find any more of the resources?
      A: It will skip that task or stop the script if there aren't any tasks left.
      Q: Does this script support the Druidic Ritual quest?
      A: Atm, no. I might add it in the future.
      Q: Will the script logout when it ends or if it's done with all the tasks?
      A: Yes, you can set this up in the GUI.
      Q: Can I set let the tasks list repeat?
      A: Yes, you can set this up in the GUI.
      Q: I find ABC2 sleep delays very slow, could I disable it?
      A:  Yes, you can set this up in the GUI.
       
      If you have any questions regarding this or my other scripts, feel free to contact my by PM .
      or

    • By SerialCerealKiller
      Request: - simple G.E. script
      Description: -  open G.E. ,collect finished offers, abort pending offers,  make new offers. (Items, prices, amounts, sell/buy should be customizable ) 
      Payment Amount: - pm me
      Time: - not in a hurry
      Additional: - should have command lines
  • Our picks

    • This release will:

      Add support for using custom F key bindings to switch between game tabs (Thanks @erickho123)


      Fix tab opening for "Skills" and "Kourend Tasks" (Thanks @erickho123)



      Note: If you are using LG, please restart both the RS client and TRiBot
        • Like
      • 30 replies
    • This release will:

      Fix an issue where breaks would stop firing


      Fix Combat#getWildernessLevel, use dynamic search for text and cache ID for later calls


      Fix an NPE in the Combat API


      Fix Mouse#leaveGame bug where the mouse wouldn't actually leave the game screen
        • Like
      • 21 replies
    • This release will:

      Add LG support for Runelite


      Fix NPCChat issues


      Fix a bug where the camera angle setter would just hold down a key for 5 seconds (the timeout)


      Slightly adjust the rotation via keys to be more accurate


      Add the ability for asynchronous camera movement via keys


      Make Camera rotation via mouse more fluid, with more antiban, and work much better in resizable mode


      Add a "Camera#setCamera" method, allowing the rotation and angle to be set in parallel


      Increase the likelihood of using the mouse for camera movements


      Add support for adjusting the camera to positionable entities (Positionable#adjustCameraTo)



      Upcoming updates:

      Improved CLI support


      Much more



      Note: If you are using LG, please restart both the RS client and TRiBot
        • Thanks
        • Like
      • 59 replies
    • This update will:

      Allow for clicking through the chat box when possible (Thanks @Todd)


      Fix Combat#selectIndex (Thanks @Encoded)


      Ensure worlds stay sorted and added a check to avoid misclicks in the in-game world hopper (Thanks @erickho123)


      Fix out-dated Options API interface indices (Thanks @Todd)



      Upcoming updates:

      Break handler bug fix


      Improved CLI support


      Much more



      Note: If you are using LG, please restart both the RS client and TRiBot
        • Like
      • 12 replies
    • This release will:

      Fix login bot after today's game update (Thanks @JoeDezzy1)


      Fix latest in-game world hopping issues (Thanks @erickho123)


      Compact Settings UI and set location relative to TRiBot (Thanks @JoeDezzy1)


      Fix an older implementation of GrandExchange#getWindowState (Thanks @JoeDezzy1)


      Improve the preformance of NPCChat by only searching in certain interface parents (Thanks @JoeDezzy1)



      Upcoming updates:

      Break handler bug fix


      Improved CLI support


      LG support for RuneLite


      Much more



      Note: If you are using LG, please restart both the RS client and TRiBot
        • Thanks
        • Like
      • 16 replies
  • Recently Browsing   0 members

    No registered users viewing this page.

×