Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
warfront1

Grand Exchange API [Development]

Recommended Posts

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

Edited by warfront1
  • Like 3

Share this post


Link to post
Share on other sites

A little more API has been added. Just enough to send out a Buy offer and collect.

Changes are pushed to the Github link posted on the first thread.

 

The below Gif is executed by the following:

buyItem(7936);

70da7fe9d8f4ec1226e241f78e40e679.gif

 

Filling in additional API, and more high level methods like the above coming soon. 

Nothing is ready for production level scripts at this point, I'll keep the thread updated.

 

Enjoy,

Warfront1

Edited by warfront1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Similar Content

    • By fl0shizzle
      Hey guys.
      Trying to accept an incoming trade but whenever I try to get the chatBox interface it's always null? It's definitely visible on the screen?
      My code is simply (where CHAT_PARENT is 137):
       
      When I use the following code to see if the interface is there, its not shown:
      Any ideas?
       
       
    • 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 IceKontroI
      [ICE] Market Buddy
      Market Buddy is the ultimate utility script for both manual flippers and users of merching scripts. It's a free and feature rich application designed to provide meaningful feedback to users and botters that flip items on the Grand Exchange. Typically you're only able to run one script at a time on TRiBot, however MB can be run alongside other scripts which makes it compatible with scripts like Tau Grand Exchange. MB doesn't actually perform any actions or antibans in-game so it won't interfere with any script you decide to run with it. This is also the reason this script has a banrate of 0. The only thing to worry about is the banrate of another script you might be running with it and whether or not the TRiBot client is detectable (it's not).
      ATTENTION: Currently the script cannot fetch buy limits from GE-Tracker. Everything else works as intended, and this is the only broken aspect as far as I know right now.
      This will be fixed at some point, but I have a lot on my plate so that could be a while.
      It's free, why not give it a try?

      Features
      Can be run alongside other scripts Simply activate this script first and you'll find you can run another script after User friendly interface to display information Detailed tooltips for each piece of data on display Can be toggled on/off under settings menu Tracks total profit while using the script Profit per hour Total profit Return on investment (in parentheses) Total profit / Total spending Only takes completed offers into account Displays how much profit each item is bringing in Profit / Time spent being traded More intuitive formula than Profit / Script runtime Displays margin as a percentage of average buy price in parentheses Visual breakdown of how your time is being spent on each item Comprehensive breakdown of the item's trade volume statistics Update mode Average amount of progress made on offers Average time it takes to increment progress for an offer Minute view Quantity traded (bought and sold) in one minute Tracks your progress and buy limits Overall mode Total sold / Total bought Buy limit mode Total bought / Item's buy limit  Resets progress every 4 hours Screenshot

      FAQ
      What's the banrate of this script? There is no banrate as it doesn't actually perform any actions in-game. Banrate can come from other sources like client detection and any script you run alongside it. What do you mean you can run this alongside other scripts? Run this script first, then you'll find you can run another script immediately after. Can I turn off those annoying tooltips? Yes, you can do this through the settings menu. Why is my Net Profit (Hourly) not as good as the profit of some of my individual items? This is probably because you made a lot of cash quickly from those items but didn't spend a long time trading them. If you make 1000 GP trading 1000 Nature runes in the span of 30 seconds it's going to be a lot of money during those 30 seconds. But the Net Profit (Hourly) is based on Market Buddy runtime so that 30 seconds will have only a small impact on say 1 hour of MB runtime.
    • 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 Endvr
      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
    • 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!



  • Our picks

    • Hello TRiBot,

      Today we have a significant release that has been in the works for the last month addressing several key issues, features and bugs in the backlog.

      With these changes, we are also including a new TRiBot Loader which will allow you to select any version that is released. This adds the flexibility of allowing you to revert to a previous version should an issue arise, run development only builds, view an accurate change log between versions etc. we are very proud to offer this feature and think it will add a lot more functionality down the road as we continue to release new versions.

      These changes include 80+ commits by our development team, a list of them is summarized below and also available for your viewing pleasure in the new TRiBot Loader.

      In addition, we have taken additional steps to improve as a development team by adding continuous integration and deployment into our workflow to assist in delivering timely releases such as bug fixes as well as new features on a weekly basis depending on our development cycle.
        • Thanks
        • Like
      • 39 replies
    • Over the last three weeks, I've been working on upgrading our server infrastructure. It's finally ready and is now live!

      Why?

      Increased reliability - less server errors


      Increased availability - less downtime


      Increased security - keeping us and you secure


      Increased capacity - ability to serve you better


      Increased speed - less waiting for things to load


      Faster development - server and service updates will come faster


      What are the changes?

      Move from a single AWS EC2 instance to AWS ECS (Elastic Container Service)


      Distributed computing


      Load balancing


      Git management of server files and filesystem


      Redis caching


      How?

      AWS ECS (with 10 EC2 instances)


      AWS ElastiCache (Redis)


      AWS Load Balancing


      AWS EFS (Elastic file system)


      Please bare with us as I continue to tune the server for maximum performance. Slow loading speeds may occur temporarily. I thank everyone for their patience.

      Please post on this thread if you experience any issues other than slow loading times.
        • Like
      • 51 replies
    • This update features:

      Fixed broken hooks from today's update


      Fix wilderness level with RuneLite (Thanks @Todd)


      Add support for Kotlin .class files in scripts (Thanks @wastedbro)


      Overhaul Inventory API (Thanks @wastedbro)


      Add List support for common methods


      Change method grouping to make more sense (by functionality)


      Refactor methods to utilize Java 8 streams instead of cumbersome loops




      Recognize chatbox minimization (Thanks @JoeDezzy1)


      Fix Screen#isInViewport when NPC chat is open (Thanks @JoeDezzy1)


      Fix login bot bugs (Thanks @erickho123)


      Fix hint arrow return values (Thanks @Encoded)


      Fix depositAllExcept functionality (Thanks @wastedbro)


      Change containing box interface bound and adjust for Y values (Thanks @erickho123)
        • Like
      • 151 replies
    • This release will:

      Fix prayers and world hopper API (Thanks @JoeDezzy1 and @erickho123)


      Improve banking API (Thanks @Encoded)


      Adds methods for returning and using Java Lists, rather than arrays


      Slightly randomizes some hardcoded behaviour


      Removes sleeps from waitConditions; the efficiency saving potential is negligible in these use-cases, therefore cleaner code is preferable


      Other back-end improvements





      Note: If you are using LG, please restart both the RS client and TRiBot.
        • Sad
        • Haha
        • Thanks
        • Like
      • 90 replies
    • This release will:

      Add new internal framework for capturing exceptions


      Fix issue with not selecting the last column in world hopper (Thanks @Todd)


      Add a message about pin usage in Banking#openBank (Thanks @Todd)


      Disable the firewall by default (Thanks @Todd)


      Fix handling of the welcome screen after login (Thanks @Encoded)


      Fix wrong amount bank withdrawal (Thanks @Encoded)


      Fix Screen#isInViewport


      Fix Game#isInViewport (Thanks @Encoded)


      Call onBreakEnd for ListenerManager Breaking Listeners (Thanks @Encoded)


      Fix Prayer#getPrayerPoints NumberFormatException (Thanks @JoeDezzy1)



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

    No registered users viewing this page.

×
×
  • Create New...