Shop Interface

For interacting with various shop interfaces. All may not work, but I think most should work. There’s a good chance the only thing lacking is that title of your shop interface, so if it doesn’t work add the shops title - or a subset of it by doing

ShopScreen.AppendTitle('Wallmart');

PS: You are expected to find and open the interface yourself.


var ShopScreen: TRSShopScreen;

ShopScreen.__Setup

procedure TRSShopScreen.__Setup();

Every interface needs some internal setup procedure..


ShopScreen.__Prepare

function TRSShopScreen.__Prepare(): Boolean;

Internal method that’s used to generate the boundaries of the interface - automatically.


ShopScreen.IsOpen

function TRSShopScreen.IsOpen(): Boolean;

Checks if the interface is open. Internally also used to prepare the boundaries of the interface


ShopScreen.Debug

function TRSShopScreen.Debug(RetImage: Boolean = False): TMufasaBitmap;

Debugs the bounds of the interface, mainly used when maintenance is needed.


ShopScreen.MouseOver

function TRSShopScreen.ItemName(Slot: Int32): Boolean;

Returns True if the interface is open, and we moved the mouse to the given slot.


ShopScreen.IsEmpty

function TRSShopScreen.IsEmpty(Slot: Int32): Boolean;

Returns True if the slot is empty


ShopScreen.FindItem

function TRSShopScreen.FindItem(DTM: Integer): Int32;

Returns the slot index for the given item, if it’s found, otherwise -1


ShopScreen.GetStackAmount

function TRSShopScreen.GetStackAmount(Slot: Int32): Int32;

Returns the number of items stacked in the given slot. -1 if failed.


ShopScreen.ItemPrice

function TRSShopScreen.ItemPrice(Slot: Int32): Int32;

Returns the price of the given item by id in the shop.


ShopScreen.SellValue

function TRSShopScreen.SellValue(InventorySlot: Int32): Int32;

Returns the value of the item in your inventory.


ShopScreen.BuyItem

function TRSShopScreen.BuyItem(Slot, Amount: Int32): Boolean;

Buy the item in the given shop slot.


ShopScreen.SellItem

function TRSShopScreen.SellItem(InvSlot, Amount: Int32): Boolean;

Sell the item in the given invetory slot.


ShopScreen.Close

function TRSShopScreen.Close(): Boolean;

Closes the interface.