Jump to content

Get price per item?


HexMurder

Recommended Posts

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
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.

  • Recently Browsing   0 members

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