Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Bixby Sayz

Grand Exchange routines

Recommended Posts

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 by Bixby Sayz

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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! ;)

Share this post


Link to post
Share on other sites

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.

Share this post


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

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.


×
×
  • Create New...