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 )

GetZone function

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

Syntax:

lua
TotZone|nil TotAdmin.GetZone( int|string nameOrUID )

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 )

Zones

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

Zones can either be spheres or boxes.

GetUID function

Syntax:

lua
int TotZone:GetUID()

GetName function

Syntax:

lua
string TotZone:GetName()

SetName function

Syntax:

lua
void TotZone:SetName( string name )

GetParam function

Syntax:

lua
string TotZone:GetParam( string name )

Available parameters:

  • Name
  • Radius (Sphere only)
  • Extends (Box only)
  • Enabled
  • Trigger for Players
  • Trigger for Spawned NPC
  • Trigger for Vanilla NPC
  • Trigger for Thralls
  • Rules

SetParam function

Syntax:

lua
void TotZone:SetParam( string name, string|float|bool value )

GetActionModule function

Syntax:

lua
string, string TotZone:GetActionModule( string event )

SetActionModule function

Syntax:

lua
bool TotZone:GetActionModule( string event, string moduleName, string data )

SetRatchetEvent function

Syntax:

lua
bool TotZone:SetRatchetEvent( string event, string ratchetEvent [, string argument = "" ] )

TriggerEvent function

Syntax:

lua
void TotZone:TriggerEvent( Character player, string event )

IsBox function

Syntax:

lua
bool TotZone:IsBox()

IsSphere function

Syntax:

lua
bool TotZone:IsSphere()

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()

GetUID function

Syntax:

lua
int TotPuppet:GetUID()

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 )