Server Mandatory Functions

Server mandatory functions are called by engine and therefore must be defined for server to start.

start
Syntax: bool start  Returns: If you return false the server will not start giving "Initialization fail!" error. Description: Called when the server starts.

finish
Syntax: void finish  Description: Called when the server stops.

loop
Syntax: uint loop  Returns: Time in milliseconds, after which the function will be called again. If 0 is returned, this function won't be called again. Description: Called periodically with frequency specified by returned value.

Configuration

get_start_time
Syntax: void get_start_time ( uint16& multiplier, uint16& year, uint16& month, uint16& day, uint& hour, uint& minute ) Parameters: multiplier - time acceleration year, month, day - starting date (1700-30000, 1-12, 1-31) hour, minute</tt> - starting time (0-23, 0-59) Description: Sets starting date/time. Called on world initialization.

Critters

critter_init
<p style="margin-left: 40px">Syntax: void get_start_time ( Critter& cr, bool firstTime )</tt> Parameters: cr</tt> - critter object registration</tt> - true if called first time for the critter (at registration). Description: Called on registration/login of player character or NPC created/loaded. Default start position for players is center of global map.

critter_idle
<p style="margin-left: 40px">Syntax: void critter_idle ( Critter& cr )</tt> Parameters: cr</tt> - critter object Description: Called for every critter with frequency determined by the global variable __CritterIdleTick.

critter_finish
<p style="margin-left: 40px">Syntax: void critter_idle ( Critter& cr )</tt> Parameters: cr</tt> - critter object Description: Called when the critter leaves the game.

critter_dead
<p style="margin-left: 40px">Syntax: void critter_dead ( Critter& cr, Critter@ killer )</tt> Parameters: cr</tt> - critter which died killer</tt> - a pointer to the killer critter, null if there wasn't any killer Description: Called when a critter dies / is murdered.

critter_respawn
<p style="margin-left: 40px">Syntax: void critter_respawn ( Critter& cr )</tt> Parameters: cr</tt> - critter object Description: Called when the critter is respawned.

...