Classes

Standard classes and functions

List of standard classes and functions. More...


Detailed Description

List of standard classes and functions.

These functions and classes are available for scripting in the both client and server parts of FOnline.

Classes

class  dictionary
 The dictionary objects map string values to values or objects of other types. More...
class  file
 This class provides support for reading and writing text files. More...
class  string
 String class. More...

Standard game functions



void AllowSlot (uint8 index, string& iniOption)
void SetRegistrationParameter (uint index, bool enabled)

Math functions



float cos (float x)
 Returns the cosine of the specified angle.
float sin (float x)
 Returns the sine of the specified angle.
float tan (float x)
 Returns the tangent of the specified angle.
float acos (float x)
 Returns the principal value of the arc cosine of the specified angle.
float asin (float x)
 Returns the principal value of the arc sine of the specified angle.
float atan (float x)
 Returns the principal value of the arc tangent of the specified angle.
float atan2 (float y, float x)
 Returns the principal value of the arc tangent of y/x, expressed in radians.
float cosh (float x)
 Returns the hyperbolic cosine of x.
float sinh (float x)
 Returns the hyperbolic sine of x.
float tanh (float x)
 Returns the hyperbolic tangent of x.
float log (float x)
 Returns the natural logarithm of x.
float log10 (float x)
 Returns the common (base-10) logarithm of x.
float pow (float base, float exponent)
 Returns base raised to the power exponent: baseexponent.
float sqrt (float x)
 Returns the square root of x.
float ceil (float x)
 Returns the smallest integral value that is not less than x.
float abs (float x)
 Returns the absolute value of x.
float floor (float x)
 Returns the largest integral value that is not greater than x.
float fraction (float x)
 Returns the fractional part of x.

String functions



string substring (const string& in str, int start, int length)
 Returns a substring of the specified string.
int findFirst (const string& in str, const string& in sub)
 Searches the input string for the specified substring and returns the position of the first occurrence in the string.
int findFirst (const string& in str, const string& in sub, int startAt)
 Searches the input string for the specified substring and returns the position of the first occurrence in the string.
int findLast (const string& in str, const string& in sub)
 Searches the input string for the specified substring and returns the position of the last occurrence in the string.
int findLast (const string& in str, const string& in sub, int startAt)
 Searches the input string for the specified substring and returns the position of the last occurrence in the string.
int findFirstOf (const string& in str, const string& in set)
 Searches the input string for any of the characters that are part of set and returns the position of the first occurrence.
int findFirstOf (const string& in str, const string& in set, int startAt)
 Searches the input string for any of the characters that are part of set and returns the position of the first occurrence.
int findFirstNotOf (const string& in str, const string& in set)
 Searches for the first character in the input string which is not part of set and returns its position.
int findFirstNotOf (const string& in str, const string& in set, int startAt)
 Searches for the first character in the input string which is not part of set and returns its position.
int findLastOf (const string& in str, const string& in set)
 Searches the input string for any of the characters that are part of set and returns the position of the last occurrence.
int findLastOf (const string& in str, const string& in set, int startAt)
 Searches the input string for any of the characters that are part of set and returns the position of the last occurrence.
int findLastNotOf (const string& in str, const string& in set)
 Searches for the last character in the input string which is not part of set and returns its position.
int findLastNotOf (const string& in str, const string& in set, int startAt)
 Searches for the last character in the input string which is not part of set and returns its position.
string[] split (const string& in str, const string& in delimiter)
 Splits the string into an array of substrings.
string[] splitEx (const string& in str, const string& in delimiter)
string join (const string@[]& in str, const string& in delimiter)
 Joins an array of strings into a larger string separated by a delimiter.
string strlwr (const string& in str)
 Converts the specified string to lowercase.
string strupr (const string& in str)
 Converts the specified string to uppercase.
uint GetStrHash (string@ str)



int GetCritterAnimType (uint crType)

Function Documentation

void AllowSlot ( uint8  index,
string iniOption 
)
void SetRegistrationParameter ( uint  index,
bool  enabled 
)
float cos ( float  x  ) 

Returns the cosine of the specified angle.

Parameters:
x Floating point value representing an angle expressed in radians.
Returns:
Cosine of x.
float sin ( float  x  ) 

Returns the sine of the specified angle.

Parameters:
x Floating point value representing an angle expressed in radians.
Returns:
Sine of x.
float tan ( float  x  ) 

Returns the tangent of the specified angle.

Parameters:
x Floating point value representing an angle expressed in radians.
Returns:
Tangent of x.
float acos ( float  x  ) 

Returns the principal value of the arc cosine of the specified angle.

Parameters:
x Floating point value in the interval [-1,+1].
Returns:
Principal arc cosine of x, in the interval [0,pi] radians.
float asin ( float  x  ) 

Returns the principal value of the arc sine of the specified angle.

Parameters:
x Floating point value in the interval [-1,+1].
Returns:
Principal arc sine of x, in the interval [-pi/2,+pi/2] radians.
float atan ( float  x  ) 

Returns the principal value of the arc tangent of the specified angle.

Parameters:
x Floating point value.
Returns:
Principal arc tangent of x, in the interval [-pi/2,+pi/2] radians.
float atan2 ( float  y,
float  x 
)

Returns the principal value of the arc tangent of y/x, expressed in radians.

Parameters:
y Floating point value representing an y-coordinate.
x Floating point value representing an x-coordinate.
Returns:
Principal arc tangent of y/x, in the interval [-pi,+pi] radians.
float cosh ( float  x  ) 

Returns the hyperbolic cosine of x.

Parameters:
x Floating point value.
Returns:
Hyperbolic cosine of x.
float sinh ( float  x  ) 

Returns the hyperbolic sine of x.

Parameters:
x Floating point value.
Returns:
Hyperbolic sine of x.
float tanh ( float  x  ) 

Returns the hyperbolic tangent of x.

Parameters:
x Floating point value.
Returns:
Hyperbolic tangent of x.
float log ( float  x  ) 

Returns the natural logarithm of x.

Parameters:
x Floating point value.
Returns:
Natural logarithm of x.
float log10 ( float  x  ) 

Returns the common (base-10) logarithm of x.

Parameters:
x Floating point value.
Returns:
Common logarithm of x, for values of x greater than zero.
float pow ( float  base,
float  exponent 
)

Returns base raised to the power exponent: baseexponent.

Parameters:
base Floating point value.
exponent Floating point value.
Returns:
The result of raising base to the power exponent.
float sqrt ( float  x  ) 

Returns the square root of x.

Parameters:
x Floating point value (x>=0).
Returns:
Square root of x.
float ceil ( float  x  ) 

Returns the smallest integral value that is not less than x.

Parameters:
x Floating point value.
Returns:
The smallest integral value not less than x.
float abs ( float  x  ) 

Returns the absolute value of x.

Parameters:
x Floating point value.
Returns:
The absolute value of x.
float floor ( float  x  ) 

Returns the largest integral value that is not greater than x.

Parameters:
x Floating point value.
Returns:
The largest integral value not greater than x.
float fraction ( float  x  ) 

Returns the fractional part of x.

Parameters:
x Floating point value.
Returns:
The fractional part of x, with the same sign.
string substring ( const string& in  str,
int  start,
int  length 
)

Returns a substring of the specified string.

Parameters:
str Input string.
start Position of a character in the input string to be used as starting character for the substring.
length Length of the substring.
Returns:
String containing the substring of the input string.
int findFirst ( const string& in  str,
const string& in  sub 
)

Searches the input string for the specified substring and returns the position of the first occurrence in the string.

Parameters:
str Input string.
sub String to be searched for in the input string. The entire content of sub must be matched in some part of the string to be considered a match.
Returns:
The position of the first occurrence in the string of the searched substring. If the substring doesn't exist in the input string, -1 is returned.
int findFirst ( const string& in  str,
const string& in  sub,
int  startAt 
)

Searches the input string for the specified substring and returns the position of the first occurrence in the string.

Parameters:
str Input string.
sub String to be searched for in the input string. The entire content of sub must be matched in some part of the string to be considered a match.
startAt The search starting position in the input string.
Returns:
The position of the first occurrence in the string of the searched substring. If the substring doesn't exist in the input string, -1 is returned.
int findLast ( const string& in  str,
const string& in  sub 
)

Searches the input string for the specified substring and returns the position of the last occurrence in the string.

Parameters:
str Input string.
sub String to be searched for in the input string. The entire content of sub must be matched in some part of the string to be considered a match.
Returns:
The position of the last occurrence in the string of the searched substring. If the substring doesn't exist in the input string, -1 is returned.
int findLast ( const string& in  str,
const string& in  sub,
int  startAt 
)

Searches the input string for the specified substring and returns the position of the last occurrence in the string.

Parameters:
str Input string.
sub String to be searched for in the input string. The entire content of sub must be matched in some part of the string to be considered a match.
startAt The search starting position in the input string.
Returns:
The position of the last occurrence in the string of the searched substring. If the substring doesn't exist in the input string, -1 is returned.
int findFirstOf ( const string& in  str,
const string& in  set 
)

Searches the input string for any of the characters that are part of set and returns the position of the first occurrence.

Parameters:
str Input string.
set String containing the characters to search for. The first character in the input string that compares equal to any of the characters in str is considered a match.
Returns:
The position of the first occurrence in the string of any of the characters searched for. If such character isn't found, -1 is returned.
int findFirstOf ( const string& in  str,
const string& in  set,
int  startAt 
)

Searches the input string for any of the characters that are part of set and returns the position of the first occurrence.

Parameters:
str Input string.
set String containing the characters to search for. The first character in the input string that compares equal to any of the characters in str is considered a match.
startAt The search starting position in the input string.
Returns:
The position of the first occurrence in the string of any of the characters searched for. If such character isn't found, -1 is returned.
int findFirstNotOf ( const string& in  str,
const string& in  set 
)

Searches for the first character in the input string which is not part of set and returns its position.

Parameters:
str Input string.
set String containing the characters to match against in the input string.
Returns:
The position of the first character in the input string that is not part of characters it is being matched against. If such character isn't found, -1 is returned.
int findFirstNotOf ( const string& in  str,
const string& in  set,
int  startAt 
)

Searches for the first character in the input string which is not part of set and returns its position.

Parameters:
str Input string.
set String containing the characters to match against in the input string.
startAt The search starting position in the input string.
Returns:
The position of the first character in the input string that is not part of characters it is being matched against. If such character isn't found, -1 is returned.
int findLastOf ( const string& in  str,
const string& in  set 
)

Searches the input string for any of the characters that are part of set and returns the position of the last occurrence.

Parameters:
str Input string.
set String containing the characters to search for. The last character in the input string that compares equal to any of the characters in str is considered a match.
Returns:
The position of the last occurrence in the string of any of the characters searched for. If such character isn't found, -1 is returned.
int findLastOf ( const string& in  str,
const string& in  set,
int  startAt 
)

Searches the input string for any of the characters that are part of set and returns the position of the last occurrence.

Parameters:
str Input string.
set String containing the characters to search for. The last character in the input string that compares equal to any of the characters in str is considered a match.
startAt The search starting position in the input string.
Returns:
The position of the last occurrence in the string of any of the characters searched for. If such character isn't found, -1 is returned.
int findLastNotOf ( const string& in  str,
const string& in  set 
)

Searches for the last character in the input string which is not part of set and returns its position.

Parameters:
str Input string.
set String containing the characters to match against in the input string.
Returns:
The position of the last character in the input string that is not part of characters it is being matched against. If such character isn't found, -1 is returned.
int findLastNotOf ( const string& in  str,
const string& in  set,
int  startAt 
)

Searches for the last character in the input string which is not part of set and returns its position.

Parameters:
str Input string.
set String containing the characters to match against in the input string.
startAt The search starting position in the input string.
Returns:
The position of the last character in the input string that is not part of characters it is being matched against. If such character isn't found, -1 is returned.
string [] split ( const string& in  str,
const string& in  delimiter 
)

Splits the string into an array of substrings.

Parameters:
str String to split.
delimiter String that delimit the substrings in the splitted string.
Returns:
An array whose elements contain the substrings of the string str that are delimited by the delimiter.
string [] splitEx ( const string& in  str,
const string& in  delimiter 
)
string join ( const string@[]& in  str,
const string& in  delimiter 
)

Joins an array of strings into a larger string separated by a delimiter.

Parameters:
str An array of strings.
delimiter A string.
Returns:
A string consisting of the elements of str interspersed with the delimiter string.
string strlwr ( const string& in  str  ) 

Converts the specified string to lowercase.

Parameters:
str Input string.
Returns:
String str in lowercase.
string strupr ( const string& in  str  ) 

Converts the specified string to uppercase.

Parameters:
str Input string.
Returns:
String str in uppercase.
uint GetStrHash ( string str  ) 
Parameters:
str Strings of which is calculated hash ("/" character in the original string will be automatically replaced by "\"). Function is case-insensitive.
Returns:
String hash
See also:
Item::PicMap
ItemCl::PicMap
Item::PicInv
ItemCl::PicInv
int GetCritterAnimType ( uint  crType  )