Here are described skriptovye functions of " the Damned Grounds ". Before continuation of reading it is useful to familiarize with introduction in scripts. With some functions to me to understand and it was not possible - you can see their list here. Usually functions are applied as actual parameters by a call of procedures. If you simply want to see the value returned by function for this purpose it is possible to take advantage of a console command *. 
The basic functions for work with objects and players 
Functions for work with groups 
Coordinate functions 
Arithmetic and logic functions 
Functions AI 
Functions of work with parameters of units and players 
Other functions 

The basic functions for work with objects and players 

object GetLeader () 
Returns object of a unit - the leader of a command. In a single it will be Zak, and in a multiplayer - the working character of the player. For management of the leader it is the fastest and convenient way. 

float GetMercsNumber (nPlayer) 
Returns number of mercenaries at the player number nPlayer (does not include the leader). 

object GetObject (idObject) 
Returns a copy object for object with the identifier idObject. See also filter and GetObjectID (). 

object GetObjectByName (strName) 
Returns a copy object for object with a name strName. 

float GetObjectID (objUnit) 
Returns the identifier of object objUnit. See also GetObject () 

float GetPlayer (objUnit) 
Returns number of the player for a unit objUnit. See also SetPlayer () 

object GetUnitOfPlayer (nPlayer, nUnit) 
Returns a copy object for a unit number nUnit the player with number nPlayer. 

Functions for work with groups 

group GetPlayerUnits (nPlayer) 
Vozvrashaet group of units of the player number nPlayer. 

group GroupAdd (grpA, grpB) 
Teoretiko-plural operation of association - returns group of those units which are even in one of groups grpA and grpB. 

group GroupCross (grpA, grpB) 
Teoretiko-plural operation of crossing - returns group of units which are both in grpA, and in grpB. 

bool GroupHas (grp, objUnit) 
Returns true if the group grp contains a unit objUnit. 

group GroupSee (grp) 
Group of units which see units from group grp. This operation is reflective - units see also themselves. 

float GroupSize (grp) 
Returns number of units in group grp. 

group GroupSub (grpA, grpB) 
Teoretiko-plural operation of a difference - returns the group consisting of those units of group grpA which are not present in grpB. 

group PlayerSee (nPlayer) 
Group of units which the player sees number nPlayer, - i.e., all those units which are visible to units of the given player. This operation is reflective - units see also themselves. It is equivalent to call GroupSee (GetPlayerUnits (nPlayer)). 

group UnitSee (objUnit) 
Group of units which are seen with a unit objUnit. This operation is reflective - a unit see also itself. 

Coordinate functions 

float DistanceUnitPoint (objUnit, x, y) 
Returns distance between a unit objUnit and a point (x, y). 

float DistanceUnitUnit (objUnitA, objUnitB) 
Returns distance between units objUnitA and objUnitB. 

float GetFutureX (objUnit, flTime) 
Extrapolates coordinate x a unit objUnit through time flTime, being based on its current direction of movement and speed. This function is used with traps on a single-card "Portal". 

float GetFutureY (objUnit, flTime) 
Extrapolates coordinate y a unit objUnit through time flTime, being based on its current direction of movement and speed. This function is used with traps on a single-card "Portal". 

float GetX (objUnit) 
Returns the current coordinate x a unit objUnit. 

float GetY (objUnit) 
Returns the current coordinate y a unit objUnit. 

float GetZ (objUnit) 
Returns the current coordinate z a unit objUnit. 

bool IsInArea (idArea x, y) 
Returns true, if the point (x, y) is in area with the identifier idArea. See procedures of management by areas. 

bool IsInSquare (x, y, x1, y1, x2, y2) 
Returns true if the point (x, y) is in a rectangular (x1, y1) - (x2, y2). 

bool UnitInSquare (objUnit, x1, y1, x2, y2) 
Returns true if the unit objUnit is in a rectangular (x1, y1) - (x2, y2). 

Arithmetic and logic functions 

float Add (flA, flB) 
Returns the sum of numbers flA and flB. 

float Div (flA, flB) 
Returns private numbers flA and flB. 

bool IsEqual (flA, flB) 
Returns true if numbers flA and flB are equal, and lie otherwise. 

bool IsEqualString (strA, strB) 
Returns true if lines strA and strB are equal match case, and lie otherwise. 

bool IsGreater (flA, flB) 
Returns true if the number flA is more than flB, and lie otherwise. 

bool IsLess (flA, flB) 
Returns true if the number flA is less than flB, and lie otherwise. 

float Mul (flA, flB) 
Returns product of numbers flA and flB. 

bool Not (bf) 
Returns denying logic value bf: true if bf it is equal to zero, and lie otherwise. 

float Random (flMax) 
Returns a random number from an interval [0, flMax). 

float Sub (flA, flB) 
Returns a difference of numbers flA and flB. 

Functions AI 

float GetDiplomacy (nPlayerA, nPlayerB) 
Returns type of diplomacy - whom is the player number nPlayerA for the player number nPlayerB. Possible values: 
1 - the ally 
0 - nejtral 
-1 - the enemy 
See also IsEnemy (), GetPlayer (), SetDiplomacy () and SetPlayer () 

bool IsAlive (objUnit) 
Returns true if the unit objUnit is alive, and lie otherwise. 

bool IsDead (objUnit) 
Returns true if the unit objUnit is dead, and lie otherwise. 

bool IsEnemy (objUnit, nPlayer) 
Returns true if the unit objUnit is the enemy for the player number nPlayer. See also GetDiplomacy (), GetPlayer (), SetDiplomacy () and SetPlayer () 

bool IsUnitBlocked (objUnit) 
Returns true if the unit objUnit is blocked. See also BlockUnit (). 

bool IsUnitInWater (objUnit) 
Returns true if the unit objUnit is in water. 

Functions of work with parameters of units and players 

float GetMoney (nPlayer) 
Returns quantity of money at the player number nPlayer. 

float GetLootItemsCount (nPlayer) 
Returns number of subjects in a transport at the player number nPlayer. 

float HP (objUnit) 
Returns current value HP (lives) at a unit objUnit. This number takes into account effects spellov easing and the amplification, imposed on a unit. 

float Mana (objUnit) 
Returns the current value many at a unit objUnit. 

float MaxHP (objUnit) 
Returns greatest possible value HP (lives) at a unit objUnit. This number takes into account effects spellov easing and the amplification, imposed on a unit. 

float MaxMana (objUnit) 
Returns the greatest possible value many at a unit objUnit. 

bool WasLooted (objUnit) 
Returns true if the corpse of a unit objUnit is already taken, and lie otherwise (in particular if the unit is still alive). 

Other functions 

bool GetLeverState (objLever) 
Returns true if "lever" objLever "is included", and lie otherwise. See also SetLeverState (). 

float GetWorldTime () 
Returns current time vnutriigroyh day (in hours). See also IsNight (), FixWorldTime () and RunWorldTime () 

float GSGetVar (nPlayer, strVar) 
Returns value of a variable with a name strVar at the player number nPlayer. See also GSSetVar (). 

float IsNight () 
See also GetWorldTime (), FixWorldTime () and RunWorldTime ()