futurepasts Posted February 5, 2016 Posted February 5, 2016 (edited) 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 Thanks! Edited February 5, 2016 by futurepasts
progamerz Posted February 5, 2016 Posted February 5, 2016 (edited) 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 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 February 5, 2016 by progamerz
Token Posted February 5, 2016 Posted February 5, 2016 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 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). 2
futurepasts Posted February 5, 2016 Author Posted February 5, 2016 Thanks token now im using widgets to do my things