Table Of Contents

Previous topic

Gametab

Next topic

Login

This Page

Inventory

The Inventory include contains all inventory-related functions

GetInven

function GetInven(Inven: Integer): TInvenItem;

Returns The Width, Height, Count, ItemBox and CenterPoint of the Given Item Slot.

Note

by SKy Scripter

Example:

GetInventoryArray

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:

InvBox

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:

ItemCoords

function ItemCoords(i: Integer): TPoint;

Returns X and Y of Specified Inventory Spot

Note

by RsN

Example:

CoordsToItem

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:

GetInvItemBounds

function GetInvItemBounds(InvSpot: Integer; T: TBox): Boolean;

If item exists, returns TBox of the item, else returns the normal InvBox.

Note

by Wizzup?

Example:

ExistsItem

function ExistsItem(i: Integer): Boolean;

Checks if item in inventory at specified position exists

Note

by WT-Fakawi

Example:

ExistsItemDTM

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:

InvMouse

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
    1. Rightclick
    1. Move mouse to item

Note

by EvilChicken!

Example:

MMouseItem

procedure MMouseItem(i: Integer);

Moves mouse to specified inventory spot.

Note

by WT-Fakawi/EvilChicken!

Example:

MouseItem

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:

DragItem

procedure DragItem(Inv1, Inv2: Integer);

Drags Item from first position Inv1 to Inv2 (Inventory Slots)

Note

by NaumanAkhlaQ

Example:

InvCount

function InvCount: Integer;

Returns amount of items in your inventory

Note

by RsN

Example:

InvEmpty

function InvEmpty: Boolean;

Returns True if inventory is empty

Note

by WT-Fakawi

Example:

InvFull

function InvFull: Boolean;

Returns True if inventory is full

Note

by RsN

Example:

CountItems

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:

ClickAllItemsExcept

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:

ClickAllItems

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:

DropItem

procedure DropItem(i: Integer);

Drops item at given position (1-28)

Note

by Lorax

Example:

DropArray

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:

DropPattern

procedure DropPattern(Which: Integer);

Drops all items in inventory according to pattern which.

Note

by Rasta Magician

Example:

DropAll

procedure DropAll;

Drops all items in inventory.

Note

by Rasta Magician

Example:

DropAllExcept

procedure DropAllExcept(IgnoreInvSlots: TIntegerArray);

Drops everything in inventory. Ignores slots specified by DontDrop array.

Note

by Nava2

Example:

DropItemsByIdentifier

procedure DropItemsByIdentifier;

See description of ClickAllItemsExcept.

Note

by EvilChicken! Fixed by Coh3n

Example:

ArrangeInv

procedure ArrangeInv;

Arrange’s inventory in an orderly fashion.

Note

by Cheesehunk

Example:

CountItemsBlackLine

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:

ClickAllItemsBlackLine

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:

ItemActivated

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:

SelectedItem

function SelectedItem : integer;

Returns the selected item in invetory (if any), else returns -1.

Note

by MaaaassturrRrrraymond

Example: