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:
bool TotAdmin.RunScript( table<string> arguments )Example:
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:
bool TotAdmin.Teleport( Character player, Vector position [, float rotation = 0 ] )Warp function
Teleport the player to a warp by name.
Syntax:
bool TotAdmin.Warp( Character player, string warp )GiveKit function
Give the player a kit by name.
Syntax:
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:
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:
TotPuppet|nil TotAdmin.GetPuppet( int|string internalNameOrUID )GetPuppetsInRadius function
Syntax:
table<TotPuppet> TotAdmin.GetPuppetsInRadius( Vector location, float radius )GetMapMarkers function
Returns a list of all map markers as a table of TotMapMarker objects.
Syntax:
table<TotMapMarker> TotAdmin.GetMapMarkers()SetMapMarker function
Syntax:
void TotAdmin.SetMapMarker( TotMapMarker data )DeleteMapMarker function
Syntax:
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:
int TotZone:GetUID()GetName function
Syntax:
string TotZone:GetName()SetName function
Syntax:
void TotZone:SetName( string name )GetParam function
Syntax:
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:
void TotZone:SetParam( string name, string|float|bool value )GetActionModule function
Syntax:
string, string TotZone:GetActionModule( string event )SetActionModule function
Syntax:
bool TotZone:GetActionModule( string event, string moduleName, string data )SetRatchetEvent function
Syntax:
bool TotZone:SetRatchetEvent( string event, string ratchetEvent [, string argument = "" ] )TriggerEvent function
Syntax:
void TotZone:TriggerEvent( Character player, string event )IsBox function
Syntax:
bool TotZone:IsBox()IsSphere function
Syntax:
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:
void TotPuppet:Move( Vector position [, float rotation = 0 ] )GetPosition function
Syntax:
Vector TotPuppet:GetPosition()GetUID function
Syntax:
int TotPuppet:GetUID()GetName function
Syntax:
string TotPuppet:GetName()SetName function
Syntax:
void TotPuppet:SetName( string displayName )Delete function
Syntax:
void TotPuppet:Delete()SendLocal function
Syntax:
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:
string TotPuppet:GetSheet()SetSheet function
Saves a serialized RPR sheet on a puppet. Use format returned from RPR.ExportSheet.
Syntax:
void TotPuppet:SetSheet( string data )GetTags function
Syntax:
table<TotPuppetTag> TotPuppet:GetTags()SetTags function
Syntax:
void TotPuppet:SetTags( table<TotPuppetTag> tags )