Task Functions

Summary
Schedule execution of a game task.
Remove a scheduled game task.
Schedule execution of a player task.
Remove a scheduled player task.
Schedule execution of a room task.
Remove a scheduled room task.
Schedule execution of a replica task.
Remove a scheduled replica task.
Check for any pending tasks and run the first one found.
Search the list of game tasks.
Search the list of player (node) tasks.
Search the list of room tasks.
Search the list of replica tasks.
Returns the number of ticks until task fire.
Returns the number of ticks until task fire.
Returns the number of ticks until task fire.
Returns the number of ticks until task fire.

game_task

Schedule execution of a game task.  A game task is used for any task not associated with any specific internal database record.  The id given when scheduling the task will be available in <game.task_object> when the task finally executes.

Params

idthe id to associate with this
task$name of the task to schedule
whencenti-seconds until first fire
repeatrepeat in X centi-seconds
groupa numeric group id (currently unused)

Returns

nothing

clear_game_task

Remove a scheduled game task.  Use this to prevent a scheduled task from executing.  All tasks scheduled for the given id and name combination will be removed.  If id is 0, then all tasks matching the given name will be removed.

Params

idthe id to associate with this
task$name of the task to schedule

Returns

nothing

player_task

Schedule execution of a player task.  A player task is used for a player (or node) and is automatically deleted if that record becomes invalid (or logs off).

Params

idthe id to associate with this
task$name of the task to schedule
whencenti-seconds until first fire
repeatrepeat in X centi-seconds
groupa numeric group id (currently unused)

Returns

nothing

clear_player_task

Remove a scheduled player task.  Use this to prevent a scheduled task from executing.  All tasks scheduled for the given id and name combination will be removed.  If id is 0, then all tasks matching the given name will be removed.

Params

idthe id to associate with this
task$name of the task to schedule

Returns

nothing

room_task

Schedule execution of a room task.  A room task is used for a room record and is automatically deleted if that corresponding record is deleted.

Params

idthe id to associate with this
task$name of the task to schedule
whencenti-seconds until first fire
repeatrepeat in X centi-seconds
groupa numeric group id (currently unused)

Returns

nothing

clear_room_task

Remove a scheduled room task.  Use this to prevent a scheduled task from executing.  All tasks scheduled for the given id and name combination will be removed.  If id is 0, then all tasks matching the given name will be removed.

Params

idthe id to associate with this
task$name of the task to schedule

Returns

nothing

replica_task

Schedule execution of a replica task.  A replica task is used for a replica record and is automatically deleted if that corresponding record is deleted.

Params

idthe id to associate with this
task$name of the task to schedule
whencenti-seconds until first fire
repeatrepeat in X centi-seconds
groupa numeric group id (currently unused)

Returns

nothing

clear_replica_task

Remove a scheduled replica task.  Use this to prevent a scheduled task from executing.  All tasks scheduled for the given id and name combination will be removed.  If id is 0, then all tasks matching the given name will be removed.

Params

idthe id to associate with this
task$name of the task to schedule

Returns

nothing

check_tasks

Check for any pending tasks and run the first one found.  This routine is deprecated, and <wait_for_input>() should be used instead.  It will check for any pending tasks (pending meaning the time to fire has occurred between the previous call and this call of this routine.

Params

none

Returns

nothing

game_tasks@

Search the list of game tasks.  Returns a vector containing information about all scheduled game tasks that match the id and taskname provided.  If id is 0, this function will match all game task ids.  If task$ is an empty string, this function will match all game task names.

Params

idsearch for tasks with this id (use 0 to match all tasks)
task$search for tasks with this name (use “” for all tasks)

Returns

A vector of strings.  Each string in the vector contains the following information about matching tasks: tick time for next task fire, how many ticks until the task will fire, how many ticks between task repeats, id associated with the task, the task group (1 = game, 2 = player, 3 = room, 4 = replica), and the task name.

player_tasks@

Search the list of player (node) tasks.  Returns a vector containing information about all scheduled player tasks that match the id and taskname provided.  If id is 0, this function will match all player task ids.  If task$ is an empty string, this function will match all player task names.

Params

idsearch for tasks with this id (use 0 to match all tasks)
task$search for tasks with this name (use “” for all tasks)

Returns

A vector of strings.  Each string in the vector contains the following information about matching tasks: tick time for next task fire, how many ticks until the task will fire, how many ticks between task repeats, id associated with the task, the task group (1 = game, 2 = player, 3 = room, 4 = replica), and the task name.

room_tasks@

Search the list of room tasks.  Returns a vector containing information about all scheduled room tasks that match the id and taskname provided.  If id is 0, this function will match all room task ids.  If task$ is an empty string, this function will match all room task names.

Params

idsearch for tasks with this id (use 0 to match all tasks)
task$search for tasks with this name (use “” for all tasks)

Returns

A vector of strings.  Each string in the vector contains the following information about matching tasks: tick time for next task fire, how many ticks until the task will fire, how many ticks between task repeats, id associated with the task, the task group (1 = game, 2 = player, 3 = room, 4 = replica), and the task name.

replica_tasks@

Search the list of replica tasks.  Returns a vector containing information about all scheduled replica tasks that match the id and taskname provided.  If id is 0, this function will match all replica task ids.  If task$ is an empty string, this function will match all replica task names.

Params

idsearch for tasks with this id (use 0 to match all tasks)
task$search for tasks with this name (use “” for all tasks)

Returns

A vector of strings.  Each string in the vector contains the following information about matching tasks: tick time for next task fire, how many ticks until the task will fire, how many ticks between task repeats, id associated with the task, the task group (1 = game, 2 = player, 3 = room, 4 = replica), and the task name.

game_task_time

Returns the number of ticks until task fire.  This function searches for tasks that match the id and taskname$ provided.  If id is 0, this function will match all game task ids.  If task$ is an empty string, this function will match all game task names.

Params

idsearch for tasks with this id (use 0 to match all tasks)
task$search for tasks with this name (use “” for all tasks)

Returns

An integer that indicates the number of ticks until the next task that matches will fire.  This function can return a negative number if Rapture has been doing something intensive recently and has not been processing tasks.

player_task_time

Returns the number of ticks until task fire.  This function searches for tasks that match the id and taskname$ provided.  If id is 0, this function will match all player task ids.  If task$ is an empty string, this function will match all player task names.

Params

idsearch for tasks with this id (use 0 to match all tasks)
task$search for tasks with this name (use “” for all tasks)

Returns

An integer that indicates the number of ticks until the next task that matches will fire.  This function can return a negative number if Rapture has been doing something intensive recently and has not been processing tasks.

room_task_time

Returns the number of ticks until task fire.  This function searches for tasks that match the id and taskname$ provided.  If id is 0, this function will match all room task ids.  If task$ is an empty string, this function will match all room task names.

Params

idsearch for tasks with this id (use 0 to match all tasks)
task$search for tasks with this name (use “” for all tasks)

Returns

An integer that indicates the number of ticks until the next task that matches will fire.  This function can return a negative number if Rapture has been doing something intensive recently and has not been processing tasks.

replica_task_time

Returns the number of ticks until task fire.  This function searches for tasks that match the id and taskname$ provided.  If id is 0, this function will match all replica task ids.  If task$ is an empty string, this function will match all replica task names.

Params

idsearch for tasks with this id (use 0 to match all tasks)
task$search for tasks with this name (use “” for all tasks)

Returns

An integer that indicates the number of ticks until the next task that matches will fire.  This function can return a negative number if Rapture has been doing something intensive recently and has not been processing tasks.