Amount ====== The Amount include contains all kinds of functions to get the amount of items. Items can be in your bank or in your inventory. TradeScreen ~~~~~~~~~~~ .. code-block:: pascal function TradeScreen: Integer; Returns 1 or 2 for the respective tradescreens, 0 if neither is open. .. note:: by Zephyrsfury Example: .. code-block:: pascal ShopScreen ~~~~~~~~~~ .. code-block:: pascal Function ShopScreen : Boolean; Returns true if a shop interface is opened. .. note:: by ZephyrsFury fixed by NCDS Example: .. code-block:: pascal FindItemEx ~~~~~~~~~~ .. code-block:: pascal function FindItemEx(var x, y: Integer; IdentType: string; Ident: Integer; Area: TBox; Tol: TIntegerArray): Boolean; Finds an item in Area specified by TBox in Area. Valid IdentTypes are: bmp, mask, color, dtm. The Tol variable is: Tol[0] : Color Tolerance; Tol[1] : Contour Tolerance or minimum Colors to Find to be True. .. note:: by Nava2 Example: .. code-block:: pascal FindItem ~~~~~~~~ .. code-block:: pascal function FindItem(var x, y: Integer; IdentType: string; Ident, x1, y1, x2, y2: Integer; Tol: TIntegerArray): Boolean; Finds an item in Area specified by x1, y1, x2, y2 in the Area. - Valid IdentTypes are any of the SRL_Item types. The Tol variable is: - Tol[0] : Color Tolerance; - Tol[1] : Contour Tolerance or minimum Colors to Find to be True. True. .. note:: by Nava2 Example: .. code-block:: pascal GetAmount ~~~~~~~~~ .. code-block:: pascal function GetAmount(ItemX, ItemY: Integer): Integer; Returns the amount of an item at coordinates (ItemX, ItemY). Returns approximate values for 'K' and 'M'. .. note:: by Zeph, N1ke & Narcle Example: .. code-block:: pascal AreaInfo ~~~~~~~~ .. code-block:: pascal procedure AreaInfo(area: String; var startx, starty, rowsize, colsize, colnumber, rownumber: Integer); Returns info on certain interfaces. Row and col amounts, startcoords, sizes for inventory, bans, shop, ... .. note:: by masquerader fixed by Mr. Freeweed Example: .. code-block:: pascal CheckArea ~~~~~~~~~ .. code-block:: pascal function CheckArea(area: String): Boolean; Checks if the given interface is opened. .. note:: by masquerader streamlined by EvilChicken! Example: .. code-block:: pascal CheckArea ~~~~~~~~~ .. code-block:: pascal function ItemCoordinates(Area, ItemType: string; Item, Tol: TIntegerArray): TPointArray; Returns a TPA with the positions of all occurances of Item. Parameters: - Area: 'inv', 'shop', 'bank', 'trade', 'your trade'. - ItemType: DTM, Color, BitmapMask, Bitmap - Item: name/value of your dtm/bmp/color/bmpmask. - Tol: 'dtm' - [] (dtm's can't have tolerance). 'bmp' - [BMPTol]. 'color' - [COLOUR Tol, Minimum Colour Count]. 'bmpmask' - [BMPTol, ContourTol]. .. note:: by masquerader modified by ZephyrsFury Example: .. code-block:: pascal CountItemsIn ~~~~~~~~~~~~ .. code-block:: pascal function CountItemsIn(Area, ItemType: string; Item: Integer; Tol: TIntegerArray): Integer; Counts the number of items found within the Area. (Does not count stacks) Parameters: - Area: 'inv', 'shop', 'bank', 'trade', 'your trade'. - ItemType: SRL_DTM, SRL_Bitmap, SRL_BitmapMask, SRL_Color - Item: name/value of your dtm/bmp/color/bmpmask. - Tol: 'dtm' - [] (dtm's can't have tolerance). 'bmp' - [BMPTol]. 'color' - [COLOUR Tol, Min Colour Count]. 'bmpmask' - [BMPTol, ContourTol]. .. note:: by masquerader modified by ZephyrsFury Example: .. code-block:: pascal CountItemsArea ~~~~~~~~~~~~~~ .. code-block:: pascal function CountItemsArea(area: String): Integer; Counts items in a specified area. (Doesn't count stacks) .. note:: by masquerader Example: .. code-block:: pascal ItemAmount ~~~~~~~~~~ .. code-block:: pascal function ItemAmount(Area, ItemType: string; Item: Integer; Tol: TIntegerArray): Integer; Counts the number of items found with a color in a certain area. (Counts stacks) Parameters: - Area - 'inv', 'shop', 'bank', 'trade', 'your trade'. - ItemType - 'dtm', 'bmp', 'color', 'bmpmask'. - Item - name/value of your dtm/bmp/color/bmpmask. - Tol - 'dtm' - [] (dtm's can't have tolerance). 'bmp' - [BMPTol]. 'color' - [COLOUR Tol, Min Colour Count]. 'bmpmask' - [BMPTol, ContourTol]. .. note:: by masquerader modified by ZephyrsFury. Example: .. code-block:: pascal FindCoins ~~~~~~~~~ .. code-block:: pascal function FindCoins(var X, Y: Integer; Area: string): Boolean; Finds coins in Area and stores the coords in x and y. .. note:: by ZephyrsFury. Example: .. code-block:: pascal CoinAmount ~~~~~~~~~~ .. code-block:: pascal function CoinAmount(Area: String): Integer; Returns the amount of coins in a specified interface. .. note:: by ZephyrsFury. Example: .. code-block:: pascal RuneAmount ~~~~~~~~~~ .. code-block:: pascal function CoinAmount(Area: String): Integer; eturns the amount of a certain rune in the specified area. .. note:: by masquerader and modified by Ron and ZephyrsFury. Example: .. code-block:: pascal ShopSwitchTab ~~~~~~~~~~~~~ .. code-block:: pascal procedure ShopSwitchTab(name:string); Switches the shop tab to the one you want, only moves mouse if neccessary ShopSwitchTab('main') or ShopSwitchTab('player'). .. note:: by Rasta Magician & ZephyrsFury Example: .. code-block:: pascal