List of standard classes and functions. More...
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) |
void AllowSlot | ( | uint8 | index, | |
string& | iniOption | |||
) |
void SetRegistrationParameter | ( | uint | index, | |
bool | enabled | |||
) |
float cos | ( | float | x | ) |
Returns the cosine of the specified angle.
x | Floating point value representing an angle expressed in radians. |
float sin | ( | float | x | ) |
Returns the sine of the specified angle.
x | Floating point value representing an angle expressed in radians. |
float tan | ( | float | x | ) |
Returns the tangent of the specified angle.
x | Floating point value representing an angle expressed in radians. |
float acos | ( | float | x | ) |
Returns the principal value of the arc cosine of the specified angle.
x | Floating point value in the interval [-1,+1] . |
[0,pi]
radians. float asin | ( | float | x | ) |
Returns the principal value of the arc sine of the specified angle.
x | Floating point value in the interval [-1,+1] . |
[-pi/2,+pi/2]
radians. float atan | ( | float | x | ) |
Returns the principal value of the arc tangent of the specified angle.
x | Floating point value. |
float atan2 | ( | float | y, | |
float | x | |||
) |
Returns the principal value of the arc tangent of y/x
, expressed in radians.
y | Floating point value representing an y-coordinate. | |
x | Floating point value representing an x-coordinate. |
y/x
, in the interval [-pi,+pi]
radians. float cosh | ( | float | x | ) |
Returns the hyperbolic cosine of x.
x | Floating point value. |
float sinh | ( | float | x | ) |
Returns the hyperbolic sine of x.
x | Floating point value. |
float tanh | ( | float | x | ) |
Returns the hyperbolic tangent of x.
x | Floating point value. |
float log | ( | float | x | ) |
Returns the natural logarithm of x.
x | Floating point value. |
float log10 | ( | float | x | ) |
Returns the common (base-10) logarithm of x.
x | Floating point value. |
float pow | ( | float | base, | |
float | exponent | |||
) |
Returns base raised to the power exponent: baseexponent.
base | Floating point value. | |
exponent | Floating point value. |
float sqrt | ( | float | x | ) |
Returns the square root of x.
x | Floating point value (x>=0 ). |
float ceil | ( | float | x | ) |
Returns the smallest integral value that is not less than x.
x | Floating point value. |
float abs | ( | float | x | ) |
Returns the absolute value of x.
x | Floating point value. |
float floor | ( | float | x | ) |
Returns the largest integral value that is not greater than x.
x | Floating point value. |
float fraction | ( | float | x | ) |
Returns the fractional part of x.
x | Floating point value. |
Returns a substring of the specified string.
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. |
Searches the input string for the specified substring and returns the position of the first occurrence in the string.
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. |
Searches the input string for the specified substring and returns the position of the first occurrence in the string.
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. |
Searches the input string for the specified substring and returns the position of the last occurrence in the string.
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. |
Searches the input string for the specified substring and returns the position of the last occurrence in the string.
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. |
Searches the input string for any of the characters that are part of set and returns the position of the first occurrence.
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. |
Searches the input string for any of the characters that are part of set and returns the position of the first occurrence.
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. |
Searches for the first character in the input string which is not part of set and returns its position.
str | Input string. | |
set | String containing the characters to match against in the input string. |
Searches for the first character in the input string which is not part of set and returns its position.
str | Input string. | |
set | String containing the characters to match against in the input string. | |
startAt | The search starting position in the input string. |
Searches the input string for any of the characters that are part of set and returns the position of the last occurrence.
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. |
Searches the input string for any of the characters that are part of set and returns the position of the last occurrence.
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. |
Searches for the last character in the input string which is not part of set and returns its position.
str | Input string. | |
set | String containing the characters to match against in the input string. |
Searches for the last character in the input string which is not part of set and returns its position.
str | Input string. | |
set | String containing the characters to match against in the input string. | |
startAt | The search starting position in the input string. |
Splits the string into an array of substrings.
str | String to split. | |
delimiter | String that delimit the substrings in the splitted string. |
Joins an array of strings into a larger string separated by a delimiter.
str | An array of strings. | |
delimiter | A string. |
Converts the specified string to lowercase.
str | Input string. |
Converts the specified string to uppercase.
str | Input string. |
uint GetStrHash | ( | string@ | str | ) |
str | Strings of which is calculated hash ("/" character in the original string will be automatically replaced by "\"). Function is case-insensitive. |
int GetCritterAnimType | ( | uint | crType | ) |