Bixby Sayz Posted June 5, 2012 Share Posted June 5, 2012 (edited) A few routines for the Grand Exchange I wrote for use in one of my own scripts. Also includes collecting/checking status of trades from a Banker. Threw in a function I use for looking up ge prices just because. Didn't post the actual code before because it wasn't completed and I had to uncouple it from my custom routines to make it standalone. If someone is in a position to field test it in their own scripts that would be awesome. Note: One thing I agonized over is the return value of collecting all items. Suppose you have multiple trades, one of which is 0 percent complete. Collecting will succeed for the others, but fail for that one. Was the collect all successful? Edit: Do you think get percent complete (for a trade) would be of any use, or just fluff? [sCAR]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= UnOfficial SCAR Include Runescape 2 Grand Exchange routines -------------------------------------------------------------------------------- * const Amount Indexes By: Bixby Sayz * const Price Indexes By: Bixby Sayz * const Npc Indexes By: Bixby Sayz * function GELookupPrice(ItemId: Integer): Integer; By: Bixby Sayz * function GEScreen: Boolean; By: Bixby Sayz * function GEBuyScreen: Boolean; By: Bixby Sayz * function GESellScreen: Boolean; By: Bixby Sayz * function GECloseBuySellScreen: Boolean; By: Bixby Sayz * function GEFindNpc(WhichNpc: Integer; out Loc: TPoint): Boolean; By: Bixby Sayz * function GEOpenGE: Boolean; By: Bixby Sayz, Wanted * function GECloseGE: Boolean; By: Bixby Sayz * function GEOpenGETutor(DoTutorial: Boolean): Boolean; By: Bixby Sayz, Wanted * function GEMember: Boolean; By: Bixby Sayz * function GEGetSlotBounds(GESlot: Integer): TBox; By: Bixby Sayz * function GEGetProgressBarBounds(GESlot: Integer): TBox; By: Bixby Sayz * function GESlotFree(GESlot: Integer): Boolean; By: Bixby Sayz * function GEFindFreeSlot(out GESlot: Integer): Boolean; By: Bixby Sayz * function GETradeFinished(GESlot: Integer): Boolean; By: Bixby Sayz * function GETradeCancelled(GESlot: Integer): Boolean; By: Bixby Sayz * function GECollectItems(GESlot: Integer; Noted: Boolean): Boolean; By: Bixby Sayz * function GECollectAllItems(Noted: Boolean): Boolean; By: Bixby Sayz * function GECancelTrade(GESlot: Integer; Noted: Boolean): Boolean; By: Bixby Sayz * function GEBuyItem(ItemName: string; Amount, Price: Integer): Boolean; By: Bixby Sayz * function GESellItem(InvSlot, Amount, Price: Integer): Boolean; By: Bixby Sayz * function GEBankerGEScreen: Boolean; By: Bixby Sayz * function GEBankerCloseGE: Boolean; By: Bixby Sayz * function GEBankerGetSlotBounds(GESlot: Integer): TBox; By: Bixby Sayz * function GEBankerGetProgressBarBounds(GESlot: Integer): TBox; By: Bixby Sayz * function GEBankerTradeFinished(GESlot: Integer): Boolean; By: Bixby Sayz * function GEBankerTradeCancelled(GESlot: Integer): Boolean; By: Bixby Sayz * function GEBankerSlotFree(GESlot: Integer): Boolean; By: Bixby Sayz * function GEBankerCollectItems(GESlot: Integer; Noted: Boolean): Boolean; By: Bixby Sayz * function GEBankerCollectAllItems(Noted: Boolean): Boolean; By: Bixby Sayz =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}[/sCAR] GrandExchange.scar Edited June 7, 2012 by Bixby Sayz Quote Link to comment Share on other sites More sharing options...
Wanted Posted June 5, 2012 Share Posted June 5, 2012 UnOfficial SCAR Include Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted June 5, 2012 Author Share Posted June 5, 2012 UnOfficial SCAR Include Yes, unofficial. The template is taken from the official OSI includes, but it is not officially part of the OSI includes. Merely something I cooked up. Good catch btw. Thought for sure everyone would overlook that seemingly minor detail. Quote Link to comment Share on other sites More sharing options...
Wanted Posted June 6, 2012 Share Posted June 6, 2012 Yes, unofficial. The template is taken from the official OSI includes, but it is not officially part of the OSI includes. Merely something I cooked up. Good catch btw. Thought for sure everyone would overlook that seemingly minor detail. Thought it was funny. You do know you only posted the file header and none of the functions right? Quote Link to comment Share on other sites More sharing options...
rsutton Posted June 6, 2012 Share Posted June 6, 2012 Very nice resource. Though putting it into a working external script I dont see myself doing anytime soon. But having this library of code available is still unique and nicely done. Congrats. Quote Link to comment Share on other sites More sharing options...
sjesper Posted June 6, 2012 Share Posted June 6, 2012 This looks pretty awesome :-) All there isn't there is a: GetFinishedFromChat That should detect if a item has bought/sell in the chat (You get a little message) Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted June 6, 2012 Author Share Posted June 6, 2012 Posted actual include file. Wasn't in a position to do so until I finished it and removed references to some of my custom routines. Includes full? grand exchange support as well as collecting from a banker. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted June 7, 2012 Share Posted June 7, 2012 All i can see is damn! Bro you put some time into this GE include! Have'nt tried it but did browse through the code! Nicely laid out, like always! Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted June 7, 2012 Author Share Posted June 7, 2012 FYI, put up a newer version in the time you were reading the include. Realized my test for whether GEBankerCollectItems succeeded was wrong. And with that sleepy go bye bye. Been a long long day irl. Quote Link to comment Share on other sites More sharing options...