Jump to content

Selling item to grand exchange


futurepasts

Recommended Posts

First of all i'm not trying to make merching script i just wanna sell item once i have amount that i need but i can't understand how to sell item i looked at api and succesfully made script choose amount and confirm if i choose item manually.

 

 

Hope u understood me and willing to help biggrin.png Thanks!

Edited by futurepasts
Link to comment
Share on other sites

First of all i'm not trying to make merching script i just wanna sell item once i have amount that i need but i can't understand how to sell item i looked at api and succesfully made script choose amount and confirm if i choose item manually.

 

 

Hope u understood me and willing to help biggrin.png Thanks!

 

i don't think the OSBot API is atm having full good GE suppot so try using any of those, http://osbot.org/forum/topic/90148-simple-ge-api or Omni's API : http://osbot.org/forum/topic/83986-omniapi-a-super-simple-api-that-handles-most-things-for-you/

 

Progamerz

Edited by progamerz
Link to comment
Share on other sites

First of all i'm not trying to make merching script i just wanna sell item once i have amount that i need but i can't understand how to sell item i looked at api and succesfully made script choose amount and confirm if i choose item manually.

 

 

Hope u understood me and willing to help biggrin.png Thanks!

The OSBot Grand Exchange API unfortunately doesn't support actual interactions with the Grand Exchange as in buy, sell and abort. The buy and sell methods are not properly named because they cannot buy or sell items, they only click a Grand Exchange box, as for the abort method, that doesn't even exist.

 

In order to sell an item to the Grand Exchange, you don't have to click the sell button on a box, instead you have to click the item in your inventory. This cannot be done as usually because of the Grand Exchange interface being open. You will have to interact with the widget that contains the item you wish to sell instead of directly interacting with the item because OSBot will attempt to close the Grand Exchange interface if you want to interact with an inventory item. 

 

This method should properly offer an item:

public boolean offerItem(String string) {
	for (int n = 0; n < 27; n++) {
		RS2Widget inventoryWidget = getWidgets().get(467, 0, n);
		if (getInventory().getItemInSlot(n).getName().contains(string)) {
			return inventoryWidget.interact("Offer");
		}
	}
	return false;
}

Now all you have to do is set the price and quantity (either by using the OSBot Grand Exchange API, which might not work properly, or by interacting with widgets).

  • Like 2
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...