Table Of Contents

Previous topic

Welcome to SRL 5’s documentation!

Next topic

Animation

This Page

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

function TradeScreen: Integer;

Returns 1 or 2 for the respective tradescreens, 0 if neither is open.

Note

by Zephyrsfury

Example:

ShopScreen

Function ShopScreen : Boolean;

Returns true if a shop interface is opened.

Note

by ZephyrsFury fixed by NCDS

Example:

FindItemEx

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:

FindItem

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:

GetAmount

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:

AreaInfo

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:

CheckArea

function CheckArea(area: String): Boolean;

Checks if the given interface is opened.

Note

by masquerader streamlined by EvilChicken!

Example:

CheckArea

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:

CountItemsIn

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:

CountItemsArea

function CountItemsArea(area: String): Integer;

Counts items in a specified area. (Doesn’t count stacks)

Note

by masquerader

Example:

ItemAmount

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:

FindCoins

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:

CoinAmount

function CoinAmount(Area: String): Integer;

Returns the amount of coins in a specified interface.

Note

by ZephyrsFury.

Example:

RuneAmount

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:

ShopSwitchTab

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: