Skip to content

Tot ! Admin

This library will not function if your server doesn't have the Tot ! Admin mod installed.

General

RunScript function

Runs a Tot script based on command and arguments. This is essentially the same as the totscript RCON command.

Syntax:

lua
bool TotAdmin.RunScript( table<string> arguments )

Example:

lua
TotAdmin.RunScript({ "scriptcmd", "Hello world!", player.ID })

Teleport function

Teleport the player to the given position using Tot's internal teleport mechanism.

This will save a return position. Teleportation under 200m will be without loading screen.

Syntax:

lua
bool TotAdmin.Teleport( Character player, Vector position [, float rotation = 0 ] )

Warp function

Teleport the player to a warp by name.

Syntax:

lua
bool TotAdmin.Warp( Character player, string warp )

GiveKit function

Give the player a kit by name.

Syntax:

lua
bool TotAdmin.GiveKit( Character player, string kit )

GetPuppet function

Use number if you want to find a puppet by its UID.
Use string if you want to find a puppet by its internal name.

Syntax:

lua
TotPuppet|nil TotAdmin.GetPuppet( int|string internalNameOrUID )

GetPuppetsInRadius function

Syntax:

lua
table<TotPuppet> TotAdmin.GetPuppetsInRadius( Vector location, float radius )

GetMapMarkers function

Returns a list of all map markers as a table of TotMapMarker objects.

Syntax:

lua
table<TotMapMarker> TotAdmin.GetMapMarkers()

SetMapMarker function

Syntax:

lua
void TotAdmin.SetMapMarker( TotMapMarker data )

DeleteMapMarker function

Syntax:

lua
bool TotAdmin.DeleteMapMarker( GUID markerId )

Puppets

Functions in this section are to be called on a TotPuppet object.

Puppets inherit functions from Actors, any Actor functions can be used on Puppets as well.

Appearance of Puppets can be manipulated with Tot ! Custom library.

Move function

Syntax:

lua
void TotPuppet:Move( Vector position [, float rotation = 0 ] )

GetPosition function

Syntax:

lua
Vector TotPuppet:GetPosition()

GetName function

Syntax:

lua
string TotPuppet:GetName()

SetName function

Syntax:

lua
void TotPuppet:SetName( string displayName )

Delete function

Syntax:

lua
void TotPuppet:Delete()

SendLocal function

Syntax:

lua
void TotPuppet:SendLocal( string message [, float distance = 10 ] )

GetSheet function

Returns serialized RPR sheet. This is the same format that can be used in RPR.ImportSheet.

Syntax:

lua
string TotPuppet:GetSheet()

SetSheet function

Saves a serialized RPR sheet on a puppet. Use format returned from RPR.ExportSheet.

Syntax:

lua
void TotPuppet:SetSheet( string data )

GetTags function

Syntax:

lua
table<TotPuppetTag> TotPuppet:GetTags()

SetTags function

Syntax:

lua
void TotPuppet:SetTags( table<TotPuppetTag> tags )