Inventory ========= The Inventory include contains all inventory-related functions GetInven ~~~~~~~~ .. code-block:: pascal function GetInven(Inven: Integer): TInvenItem; Returns The Width, Height, Count, ItemBox and CenterPoint of the Given Item Slot. .. note:: by SKy Scripter Example: .. code-block:: pascal GetInventoryArray ~~~~~~~~~~~~~~~~~ .. code-block:: pascal function GetInventoryArray : array of TInvenItem; Returns The Width, Height, Count, ItemBox and CenterPoint in array [0..27] of all Items in the inventory. .. note:: by SKy Scripter Example: .. code-block:: pascal InvBox ~~~~~~ .. code-block:: pascal Function InvBox(i :Integer): TBox; Returns TBox of surrounding Inventory SlotBox 1-2-3-4 5-6-7-8 etc. .. note:: by Boreas, created by WT-Fakawi. Coords by Ogre July 15th 2009. Example: .. code-block:: pascal ItemCoords ~~~~~~~~~~ .. code-block:: pascal function ItemCoords(i: Integer): TPoint; Returns X and Y of Specified Inventory Spot .. note:: by RsN Example: .. code-block:: pascal CoordsToItem ~~~~~~~~~~~~ .. code-block:: pascal function CoordsToItem(X, Y: Integer): Integer; Returns which Inventory slot the X and Y coords are in. If the coords are between slots (or not in the inventory area at all) it will return 0. .. note:: by Boreas Example: .. code-block:: pascal GetInvItemBounds ~~~~~~~~~~~~~~~~ .. code-block:: pascal function GetInvItemBounds(InvSpot: Integer; T: TBox): Boolean; If item exists, returns TBox of the item, else returns the normal InvBox. .. note:: by Wizzup? Example: .. code-block:: pascal ExistsItem ~~~~~~~~~~ .. code-block:: pascal function ExistsItem(i: Integer): Boolean; Checks if item in inventory at specified position exists .. note:: by WT-Fakawi Example: .. code-block:: pascal ExistsItemDTM ~~~~~~~~~~~~~ .. code-block:: pascal function ExistsItemDTM(dtm: Integer; var x, y: Integer): Boolean; Checks if the item with dtm is in the inventory. Returns the item's coordinates. .. note:: by NCDS Example: .. code-block:: pascal InvMouse ~~~~~~~~ .. code-block:: pascal function InvMouse(InvSlot, Action: Byte) : boolean; A combined MouseItem & MMouseItem, will hopefully replace both one day. Usage is like SRL's MouseBox, Action determines what to do: - 1. Leftclick - 2. Rightclick - 3. Move mouse to item .. note:: by EvilChicken! Example: .. code-block:: pascal MMouseItem ~~~~~~~~~~ .. code-block:: pascal procedure MMouseItem(i: Integer); Moves mouse to specified inventory spot. .. note:: by WT-Fakawi/EvilChicken! Example: .. code-block:: pascal MouseItem ~~~~~~~~~ .. code-block:: pascal procedure MouseItem(i: Byte; Left: Boolean); Moves Mouse to inv spot then clicks left or right. .. note:: by WT-Fakawi/EvilChicken!, edit by NaumanAkhlaQ Example: .. code-block:: pascal DragItem ~~~~~~~~ .. code-block:: pascal procedure DragItem(Inv1, Inv2: Integer); Drags Item from first position Inv1 to Inv2 (Inventory Slots) .. note:: by NaumanAkhlaQ Example: .. code-block:: pascal InvCount ~~~~~~~~ .. code-block:: pascal function InvCount: Integer; Returns amount of items in your inventory .. note:: by RsN Example: .. code-block:: pascal InvEmpty ~~~~~~~~ .. code-block:: pascal function InvEmpty: Boolean; Returns True if inventory is empty .. note:: by WT-Fakawi Example: .. code-block:: pascal InvFull ~~~~~~~ .. code-block:: pascal function InvFull: Boolean; Returns True if inventory is full .. note:: by RsN Example: .. code-block:: pascal CountItems ~~~~~~~~~~ .. code-block:: pascal function CountItems(ItemType: string; Identifier: Integer; tol: TIntegerArray): Integer; Counts Items in the inventory. - ItemType - 'dtm', 'bitmap', 'bitmap mask', 'color' - Item - name/value of your dtm/bmp/color/bmpmask. - Tol - 'dtm' - [] (dtm's can't have tolerance). - 'bmp' - [BMPTol]. - 'color' - [COLOUR Tol, Colour Count]. - 'bmpmask' - [BMPTol, ContourTol]. .. note:: by WT-Fakawi / Sumilion Example: .. code-block:: pascal ClickAllItemsExcept ~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function ClickAllItemsExcept(ItemType: String; Identifier: Integer; option: string; SlotIgnores: TIntegerArray; waitnum: Integer; tol: TIntegerArray):Integer; Performs "option" popup menu action on all items with - ItemType - 'dtm', 'bitmap', 'bitmap mask', 'color' - Identifier - name/value of your dtm/bmp/color/bmpmask. - Tol - 'dtm' - [] (dtm's can't have tolerance). - 'bmp' - [BMPTol]. - 'color' - [COLOUR Tol, Colour Count]. - 'bmpmask' - [BMPTol, ContourTol]. Will not click items in slots SlotIgnores .. note:: by WT-Fakawi, Sumilion & Nava2 Example: .. code-block:: pascal ClickAllItems ~~~~~~~~~~~~~ .. code-block:: pascal function ClickAllItems(ItemType: String; Identifier: Integer; option: string; waitnum: Integer; tol: TIntegerArray):Integer; See ClickAllItemsExcept, this doesn't ignore any slots. .. note:: by Nava2 Example: .. code-block:: pascal DropItem ~~~~~~~~ .. code-block:: pascal procedure DropItem(i: Integer); Drops item at given position (1-28) .. note:: by Lorax Example: .. code-block:: pascal DropArray ~~~~~~~~~ .. code-block:: pascal procedure DropArray(InvSlots: TIntegerArray); Drops item positioned equivalent to numbers in "InvSlots" array. Example: "DropArray([2, 4, 9, 12]);" would drop items in InvSlot 2, 4, 9 and 12. .. note:: by Lorax/EvilChicken!, Tickyy for idea. Example: .. code-block:: pascal DropPattern ~~~~~~~~~~~ .. code-block:: pascal procedure DropPattern(Which: Integer); Drops all items in inventory according to pattern which. .. note:: by Rasta Magician Example: .. code-block:: pascal DropAll ~~~~~~~ .. code-block:: pascal procedure DropAll; Drops all items in inventory. .. note:: by Rasta Magician Example: .. code-block:: pascal DropAllExcept ~~~~~~~~~~~~~ .. code-block:: pascal procedure DropAllExcept(IgnoreInvSlots: TIntegerArray); Drops everything in inventory. Ignores slots specified by DontDrop array. .. note:: by Nava2 Example: .. code-block:: pascal DropItemsByIdentifier ~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal procedure DropItemsByIdentifier; See description of ClickAllItemsExcept. .. note:: by EvilChicken! Fixed by Coh3n Example: .. code-block:: pascal ArrangeInv ~~~~~~~~~~ .. code-block:: pascal procedure ArrangeInv; Arrange's inventory in an orderly fashion. .. note:: by Cheesehunk Example: .. code-block:: pascal CountItemsBlackLine ~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function CountItemsBlackLine(Count, Tol: Integer): Integer; Returns the number of items in inventory with Count amount of blackline points and Tol tolerance in the amount of points. .. note:: by n3ss3s Example: .. code-block:: pascal ClickAllItemsBlackLine ~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function ClickAllItemsBlackLine(Count, Tol: Integer; Option: String): Integer; Finds all items in inventory with blackline points amount of Count with Tol tolerance, and returns the amount of items could choose the option Option to. Waits the WaitT amount of millisecs between items, with WaitR randomness of milliseconds. .. note:: by n3ss3s Example: .. code-block:: pascal ItemActivated ~~~~~~~~~~~~~ .. code-block:: pascal function ItemActivated(Slot: Integer): Boolean; Checks if item in specified inventory slot has a white outline. Returns True if the item has a white outline, otherwise returns false. .. note:: by marpis Example: .. code-block:: pascal SelectedItem ~~~~~~~~~~~~ .. code-block:: pascal function SelectedItem : integer; Returns the selected item in invetory (if any), else returns -1. .. note:: by MaaaassturrRrrraymond Example: .. code-block:: pascal