MARS Client Scripting Library - MarsStandardCommands
From Multiverse
| MARS Client Scripting Library | |
|
MarsAbility
|
MarsQuest
|
| Additional Modules | |
| MarsStandardCommands | |
| Examples | |
| InstancePortal | |
MarsStandardCommands is a module in the MARS Client Scripting Library with functions that implement commands useful in most worlds.
For more information, see Client Commands.
Methods
DisplayVoiceHelp
Call this function to display help information about the voice chat system.
Example
/voice help
HandleAcquire
Call this function to cause the PC to pick up items in the world. The function sends a message to the server to attempt to acquire the targeted object.
Called by the acquire command.
Example
/acquire
HandleAttack
Call this function to cause the PC to attack the targeted object.
Called by the attack command.
Example
/attack
HandleGenerate
Call this function to send a proxy.GENERATE_OBJECT extension message to the server to generate a marker or persistent object. Use -m to generate a marker and -P to generate a persistent object.
Example
/generate -m templateName /generate -P templateName
HandleGroup
Call this function to send a group chat message. See also MARS Group System.
Example
/group what's up?
HandleHelp
Call this function to display a list of available client commands in the chat window.
Called by the help command.
Example
/help
HandleInfo
Call this function to display information about the targeted object, or the player object if no object is targeted. Displays the following information:
- oid - long
- location -
Vector3 - orientation -
Quaternion - camera position -
Vector3 - camera orientation -
Quaternion
Called by the info command.
Example
/info
HandleInstance
/instance [[-n | -name] instanceName] [[-m | -waypoint] markerName] [-push] [-pop] [-r restoreMarker]
Call this function to change server instances. The options are:
- n: change to the named instance
- m: spawn at the given marker name in the instance
- push: push the current instance and location onto the instance restore stack.
- r: when used with -push, specifies the location to push on the restore stack
- pop: change location to the top of the instance restore stack and pop the stack. markerName and instanceName are ignored.
Example
/instance -n default -m spawn
HandleInvite
Call this function to invite the player with the specified OID to join your group.
Example
HandleLoc
Call this function to display the location of the player avatar.
Called by the loc command.
Example
/loc
HandleLogout
Call this function to send a message to the server that could initiate a logout. The server currently ignores this message.
Called by the logout command.
Example
/logout
HandlePickup
Call this function to cause the PC to pick up items in the world and attempt to equip the item in the primaryWeapon slot.
Called by the pickup command.
Example
/pickup
HandleProperties
Call this function to display all of the properties of the targeted object.
Called by the properties and props commands.
Example
/props
HandleQuit
Call this function to exit the Multiverse Client.
Called by the quit command.
Example
/quit
HandleReloadUI
Call this function to reload the user interface and UI scripts.
Called by the reloadui command.
Example
/reloadui
HandleSay
Call this function to say the specified text.
Called by the say command.
Example
/say Hello
HandleScript
Call this function to execute a script on the Client. The Client evaluates the argument as a Python script; this can be useful for debugging or complex behavior.
Called by the script command.
Example
/script ClientAPI.TakeScreenshot()
HandleServer
Call this function to run the argument as a command on the server. See Defining Command Handlers for information on defining server commands.
Called by the server command.
Example
/server who
HandleTarget
Call this function to target the specified object.
Called by the target command.
Example
/target Zombie
HandleVoice
| Voice Chat System |
|
Voice Chat System • Multiverse Voice Server • Configuring Voice Chat • |
Call this function to initiate a voice server connection from this client; to configure voice processing; to close such a connection; or to get help on legal command options. It is expected that this command will not be present in finished games; instead client UI will use the methods in the Voice class to change the configuration.
The format of the /voice command is:
/voice command parm_name1 parm_value1 ... parm_nameN parm_valueN
The allowed commands are:
- /voice start parm_name1 parm_value1 ... parm_nameN parm_valueN: Initiate a connection to the voice server.
- /voice config parm_name1 parm_value1 ... parm_nameN parm_valueN: Configure the client's voice manager.
- /voice stop: Terminate a connection to the voice server.
- /voice help: Display the most commonly-used options.
- /voice detailedhelp: Display all the options.
The /voice start and /voice config commands accept a dizzying variety of name/value pair options, documented in Client Scripting API - Voice. The majority of these options are abstruse codec parameters that you're unlikely to need to change. The options labeled "Constructor" options in the referenced table require destruction of the client's VoiceManager instance, closing and then reopening the client's voice server connection. All other configuration option changes are made on-the-fly without closing the voice server connection.
Example:
/voice start player_oid 12345 group_oid 678 agc_level 10
