RemoteAdmin:admin teleport agent

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Created page with "=== Example in Python === <source lang="python"> #!/usr/bin/python import xmlrpclib # XML-RPC URL (http_listener_port) simulatorURL = "http://127.0.0.1:5000" # instantia...")
 
Line 1: Line 1:
 +
'''admin_teleport_agent''' remotely allows to teleport agents
 +
 +
 +
=== Enabling admin_teleport_agent ===
 +
If not all functions are enabled, use admin_create_teleport_agent to enable the function in the [RemoteAdmin] section
 +
<source lang="csharp">
 +
enabled_methods = admin_teleport_agent,...
 +
</source>
 +
 +
 +
== Parameters ==
 +
=== Required Parameters ===
 +
These parameters are required
 +
{| cellspacing="0" cellpadding="4" border="1"
 +
|-
 +
! parameter
 +
! Description
 +
! Values
 +
|-
 +
| ''region_name''
 +
| Name of the new region
 +
|
 +
|-
 +
| ''agent_id''
 +
| agent uuid, optionaly agent_first_name and agent_last_name
 +
|
 +
|}
 +
 +
 +
=== Optional Parameters ===
 +
These parameters are optional and do not need to be set
 +
 +
{| cellspacing="0" cellpadding="4" border="1"
 +
|-
 +
! parameter
 +
! Description
 +
! Values
 +
|-
 +
| ''agent_first_name''
 +
| first name of agent
 +
|
 +
|-
 +
| ''agent_last_name''
 +
| last name of agent
 +
|
 +
|-
 +
| ''pos_x''
 +
| teleport to region position x
 +
|
 +
|-
 +
| ''pos_y''
 +
| teleport to region position y
 +
|
 +
|-
 +
| ''pos_z''
 +
| teleport to region position z
 +
|
 +
|-
 +
| ''lookat_x''
 +
| look in direction x
 +
|
 +
|-
 +
| ''lookat_y''
 +
| look in direction y
 +
|
 +
|-
 +
| ''lookat_z''
 +
| look in direction z
 +
|
 +
|}
 +
 +
 +
== Returned Parameters ==
 +
=== Returned Parameters ===
 +
These parameters are returned by Remote Admin
 +
 +
{| cellspacing="0" cellpadding="4" border="1"
 +
|-
 +
! parameter
 +
! Description
 +
! Values
 +
|-
 +
| ''success''
 +
|
 +
| true
 +
|}
 +
 +
 +
=== Error messages ===
 +
No error messages
 +
 +
 +
== Notes ==
 +
 +
 +
== Example ==
 +
=== PHP ===
 +
<source lang="php">
 +
<?php
 +
 +
// Including the RemoteAdmin PHP class.
 +
include('RemoteAdmin.php');
 +
 +
// Instantiate the class with parameters identical to the Python example above
 +
$myRemoteAdmin = new RemoteAdmin('127.0.0.1', 9000, 'secret');
 +
 +
// Invoke admin_teleport_agent (multiple parameters)
 +
$parameters = array('region_name' => 'My Plaza', 'user_firstname' => 'John', 'user_lastname' => 'Doe', 'pos_x' => '15', 'pos_y' => '10');
 +
$myRemoteAdmin->SendCommand('admin_teleport_agent', $parameters);
 +
?>
 +
</source>
 +
 +
 
=== Example in Python  ===
 
=== Example in Python  ===
  
Line 12: Line 125:
 
   
 
   
 
# invoke admin_alert: requires password and message  
 
# invoke admin_alert: requires password and message  
simulator.admin_teleport_agent({'password':'secret', 'agent_first_name':'Lord','agent_last_name':'Lucan','region_name':'test', 'pos_x':'15', 'pos_y':'10'})
+
simulator.admin_teleport_agent({'password':'secret', 'agent_first_name':'John','agent_last_name':'Doe','region_name':'My Plaza', 'pos_x':'15', 'pos_y':'10'})
 
</source>
 
</source>
 +
 +
[[Category:Development]]

Revision as of 13:09, 9 December 2011

admin_teleport_agent remotely allows to teleport agents


Contents

Enabling admin_teleport_agent

If not all functions are enabled, use admin_create_teleport_agent to enable the function in the [RemoteAdmin] section

enabled_methods = admin_teleport_agent,...


Parameters

Required Parameters

These parameters are required

parameter Description Values
region_name Name of the new region
agent_id agent uuid, optionaly agent_first_name and agent_last_name


Optional Parameters

These parameters are optional and do not need to be set

parameter Description Values
agent_first_name first name of agent
agent_last_name last name of agent
pos_x teleport to region position x
pos_y teleport to region position y
pos_z teleport to region position z
lookat_x look in direction x
lookat_y look in direction y
lookat_z look in direction z


Returned Parameters

Returned Parameters

These parameters are returned by Remote Admin

parameter Description Values
success true


Error messages

No error messages


Notes

Example

PHP

<?php
 
// Including the RemoteAdmin PHP class.
include('RemoteAdmin.php');
 
// Instantiate the class with parameters identical to the Python example above
$myRemoteAdmin = new RemoteAdmin('127.0.0.1', 9000, 'secret');
 
// Invoke admin_teleport_agent (multiple parameters)
$parameters = array('region_name' => 'My Plaza', 'user_firstname' => 'John', 'user_lastname' => 'Doe', 'pos_x' => '15', 'pos_y' => '10');
$myRemoteAdmin->SendCommand('admin_teleport_agent', $parameters);
?>


Example in Python

#!/usr/bin/python 
import xmlrpclib 
 
# XML-RPC URL (http_listener_port) 
simulatorURL = "http://127.0.0.1:5000"
 
# instantiate server object 
simulator = xmlrpclib.Server(simulatorURL) 
 
# invoke admin_alert: requires password and message 
simulator.admin_teleport_agent({'password':'secret', 'agent_first_name':'John','agent_last_name':'Doe','region_name':'My Plaza', 'pos_x':'15', 'pos_y':'10'})
Personal tools
General
About This Wiki