December 29, 20187 yr I'm having some trouble understanding how to properly use this. I'm trying different things but they aren't working.
December 29, 20187 yr We're not mind readers here. What's not working and what have you tried? Post the complete source of your code.
December 29, 20187 yr Just go with this - It's more recent and should work. I was having issues with the thread you posted as well.
December 29, 20187 yr Author 15 hours ago, Sonysi said: Just go with this - It's more recent and should work. I was having issues with the thread you posted as well. Thanks, I used their code to get the price for a dragon chainbody (like they do in their post) but the console output was: core.RSBuddyExchangePrice@7946e1f4 Any idea on what I'm doing wrong? This is the full code public static void main(String[] args) throws IOException { RSBuddyExchangeOracle.retrievePriceGuide(); // ... RSBuddyExchangePrice price; price = RSBuddyExchangeOracle.getItemByName("Dragon chainbody"); System.out.println(price); } 12 hours ago, Malcolm said: getGrandExchange().getOverallPrice(int ID) If you mix this with int itemID = getInventory().getItem("STRING").getId(); Of course this only works if you have one of the items in your inventory and if you're selling the item but its better to not use item IDs but using the string name and getting the ID should be fine. Other than that if you do choose to use the item ID just know that if Jagex changes the ID it will break the script. If you're buying an item you can just do getGrandExchange().buyItem(intID, "STRING NAME", (int) getGrandExchange().getOverallPrice(intID), int AMOUNT)) I would change the overall price to do +/- a little bit just for leadway. Just multiply or divide the overall price by a little bit and you're likely always going to buy/sell the item I tried using the: getGrandExchange().getOverallPrice(int ID) method before and it didn't work. That's why I'm so confused.
December 29, 20187 yr You have some fundamental lack of understanding of Java (and/or programming) in general that's going to have you coming back here every other day for help on topics you should already know. The RSBuddyExchangePrice is an object, not a String.
December 30, 20187 yr Author 22 minutes ago, NoxMerc said: You have some fundamental lack of understanding of Java (and/or programming) in general that's going to have you coming back here every other day for help on topics you should already know. The RSBuddyExchangePrice is an object, not a String. That's the code the person who released the RSBuddyExchangePrice had on their post, I literally copied and pasted it, and it still didn't work. That's why I continue to have questions.
December 30, 20187 yr 6 hours ago, Jack Shep said: I literally copied and pasted it, and it still didn't work And you don't know why you think it doesn't work, which is a problem. It probably worked as intended, you're just using it incorrectly. You have an object, not a numeric (int/long) representation of a price. This is why I said you have a fundamental misunderstanding. That GE Price API gave you back a price object, not a number.
December 30, 20187 yr Sorry that's my fault, I missed out a method in the RSBuddyExchangePrice.java that would translate that squiggly bit of weird text to something that can actually be understood. I've uploaded a fixed version of RSBuddyExchangePrice.java and attached it to the thread: https://osbot.org/forum/topic/150093-rsbuddy-exchange-oracle Edited December 30, 20187 yr by liverare
December 30, 20187 yr Author 3 hours ago, liverare said: Sorry that's my fault, I missed out a method in the RSBuddyExchangePrice.java that would translate that squiggly bit of weird text to something that can actually be understood. I've uploaded a fixed version of RSBuddyExchangePrice.java and attached it to the thread: https://osbot.org/forum/topic/150093-rsbuddy-exchange-oracle Thank you for the help man, I've been struggling with this for a little while. I really appreciate it
Create an account or sign in to comment