RemoteAdmin:admin teleport agent

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m
(7 intermediate revisions by 4 users not shown)
Line 92: Line 92:
  
 
== Notes ==
 
== Notes ==
* From commit 415b7b7 on Wed 7 Dec 2011 (OpenSim 0.7.3-dev)
+
* From commit 415b7b7 on Wed 7 Dec 2011 (OpenSimulator 0.7.3-dev)
  
 
== Example ==
 
== Example ==
 
=== PHP ===
 
=== PHP ===
 +
This example needs the RemoteAdmin PHP Class file available [http://code.google.com/p/opensimtools/wiki/RemoteAdminPHPClass here].
 +
 
<source lang="php">
 
<source lang="php">
 
<?php
 
<?php
 +
 +
This example needs the RemoteAdmin PHP Class file available [http://code.google.com/p/opensimtools/wiki/RemoteAdminPHPClass here]. <source lang="php">
  
 
// Including the RemoteAdmin PHP class.
 
// Including the RemoteAdmin PHP class.
Line 106: Line 110:
  
 
// Invoke admin_teleport_agent (multiple parameters)
 
// Invoke admin_teleport_agent (multiple parameters)
$parameters = array('region_name' => 'My Plaza', 'user_firstname' => 'John', 'user_lastname' => 'Doe', 'pos_x' => '15', 'pos_y' => '10');
+
$parameters = array('region_name' => 'My Plaza', 'agent_first_name' => 'John', 'agent_last_name' => 'Doe', 'pos_x' => '15', 'pos_y' => '10');
 
$myRemoteAdmin->SendCommand('admin_teleport_agent', $parameters);
 
$myRemoteAdmin->SendCommand('admin_teleport_agent', $parameters);
 
?>
 
?>
 
</source>
 
</source>
  
 
+
=== Python ===
=== Example in Python ===
+
  
 
<source lang="python">
 
<source lang="python">
Line 128: Line 131:
 
</source>
 
</source>
  
[[RemoteAdmin]]
+
[[Category:RemoteAdmin]]
[[RemoteAdmin:Commands]]
+
[[Category:RemoteAdmin Commands]]

Revision as of 16:30, 24 October 2015

admin_teleport_agent remotely teleport an agent to a given region and/or position


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

  • From commit 415b7b7 on Wed 7 Dec 2011 (OpenSimulator 0.7.3-dev)

Example

PHP

This example needs the RemoteAdmin PHP Class file available here.

<?php
 
This example needs the RemoteAdmin PHP Class file available [http://code.google.com/p/opensimtools/wiki/RemoteAdminPHPClass here]. <source lang="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', 'agent_first_name' => 'John', 'agent_last_name' => 'Doe', 'pos_x' => '15', 'pos_y' => '10');
$myRemoteAdmin->SendCommand('admin_teleport_agent', $parameters);
?>

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