Shop Interface¶
For interacting with various shop interfaces. They may not all 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.Debug¶
function TRSShopScreen.Debug(RetImage: Boolean = False): TMufasaBitmap; override;
Debugs the bounds of the interface, mainly used when maintenance is needed.
ShopScreen.IsOpen¶
function TRSShopScreen.IsOpen(): Boolean;
Checks if the interface is open. Internally also used to prepare the boundaries of the interface
ShopScreen.Find????¶
function TRSBankScreen.FindDTM(DTM: Integer): Int32;
function TRSBankScreen.FindBMP(BMP: TMufasaBitmap; Tolerance: Int32): Int32;
function TRSBankScreen.FindMask(Mask: TMask; Tolerance, ContourTolerance: Int32): Int32;
Returns the index of the given DTM, BMP or Mask, otherwise -1
if it’s not found.
ShopScreen.MouseOver¶
function TRSShopScreen.MouseOver(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.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.