Skip to content

Tot ! Admin ​

This library will not function if your server doesn't have Tot ! Admin 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 ] )

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 )

SendHome function ​

Syntax:

lua
bool TotAdmin.SendHome( Character player [, string name ] )

SetHome function ​

Syntax:

lua
bool TotAdmin.SetHome( Character player, string name, Vector position [, float rotation ] )

ClearHome function ​

Syntax:

lua
bool TotAdmin.ClearHome( Character player )

ListHomes function ​

Syntax:

lua
table TotAdmin.ListHomes( Character player )

Map Markers ​

TotMapMarker constructor ​

Creates a new TotMapMarker object from a table. All fields are optional.

FieldTypeDefault
guidGUIDnew random GUID
namestring""
xfloat0
yfloat0
iconstring""
iconNamestring""
radiusfloat0
colorColorwhite
hideIconboolfalse
zOrderint0

Syntax:

lua
TotMapMarker TotMapMarker( table data )

TIP

Use the SetMapMarker function to actually place the marker on the map (or update existing one).

GetMapMarkers function ​

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

Syntax:

lua
table<TotMapMarker> TotAdmin.GetMapMarkers()

SetMapMarker function ​

Creates a new map marker, or updates an existing one with the same guid.

Syntax:

lua
void TotAdmin.SetMapMarker( TotMapMarker data )

Example:

lua
TotAdmin.SetMapMarker(TotMapMarker({
    name = "Tavern",
    x = 12500,
    y = -48000,
    color = Color(0xffcc00),
}))

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.

TotZone constructor ​

Zones can be constructed directly using a function of the same name.

Shape can be either Sphere or Box.

Syntax:

lua
TotZone TotZone( string shape, Vector location )

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 )

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

Delete function ​

Syntax:

lua
void TotZone:Delete()

Basic NPCs ​

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

Basic NPCs are considered decoration pieces, any BuildingPiece function can be used on NPCs as well.

TotBasicNPC constructor ​

NPCs can be constructed directly using a function of the same name.

Syntax:

lua
TotBasicNPC TotBasicNPC( Vector location [, Rotator rotation ] )

GetName function ​

Syntax:

lua
string TotBasicNPC:GetName()

SetName function ​

Syntax:

lua
void TotBasicNPC:SetName( string displayName )

Delete function ​

Syntax:

lua
void TotBasicNPC:Delete()

Puppets ​

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

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

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

TotPuppet constructor ​

Puppets can be constructed directly using a function of the same name.

Syntax:

lua
TotPuppet TotPuppet( Vector location [, Rotator rotation ] )

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 )

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 )

GetSysName function ​

Syntax:

lua
string TotPuppet:GetSysName()

SetSysName function ​

Syntax:

lua
void TotPuppet:SetSysName( string internalName )

IsInvisible function ​

Syntax:

lua
bool TotPuppet:IsInvisible()

SetInvisible function ​

Syntax:

lua
void TotPuppet:SetInvisible( bool invisible )

IsNameplateHidden function ​

Syntax:

lua
bool TotPuppet:IsNameplateHidden()

SetNameplateHidden function ​

Syntax:

lua
void TotPuppet:SetNameplateHidden( bool hidden )

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 ​

Returns a list of TotPuppetTag objects.

Syntax:

lua
table<TotPuppetTag> TotPuppet:GetTags()

SetTags function ​

Syntax:

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

GetActionModule function ​

Syntax:

lua
string, string TotPuppet:GetActionModule( string event )

SetActionModule function ​

Syntax:

lua
bool TotPuppet:SetActionModule( string event, string moduleName, string data )

SetRatchetEvent function ​

Syntax:

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