Jump to content

Get price per item?


Recommended Posts

Posted (edited)

Trying to get the price per item of the item I am currently looking at in the GE. i.e. the bot looks up a law rune and the value is "367" by default, so i want to retrieve the "367". I tried using the getOfferPrice method but it always returns 0.

my code is below. Thanks in advance.

grandExchange563,"Law rune", grandExchange.getOfferPrice(), 1;

also tried

grandExchange563,"Law rune", getGrandExchange.getOfferPrice(), 1;
Edited by HexMurder
Posted
11 minutes ago, LoudPacks said:

getOfferPrice() only returns the value of a pending / complete GE offer. It doesn't work if you just preview an item, ie. select an item but don't confirm the offer. You can use widgets to read the price that is loaded on the interface when you lookup an item.

I see.. Thanks. Is there a way to look up items in the api already? i'm currently using the grandExchange.buyItem method, which always results in the item being bought, and I just want to search it, and then query the price.

Posted (edited)
1 hour ago, HexMurder said:

I see.. Thanks. Is there a way to look up items in the api already? i'm currently using the grandExchange.buyItem method, which always results in the item being bought, and I just want to search it, and then query the price.

There's a class snippet on here which could help you get the price of different items.

https://osbot.org/forum/topic/68912-grand-exchange-price-api/

Not sure if it's outdated, but you should 100% try it out.

Edited by Medusaa

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...