RemoteAdmin:admin teleport agent

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (PHP: Fixed broken Google Code link, replacing with internal page)
 
(8 intermediate revisions by 5 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 [[RemoteAdmin:RemoteAdmin_Class|here]].
 +
 +
 
<source lang="php">
 
<source lang="php">
 
<?php
 
<?php
Line 106: Line 109:
  
 
// 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 130:
 
</source>
 
</source>
  
[[RemoteAdmin]]
+
[[Category:RemoteAdmin]]
[[RemoteAdmin:Commands]]
+
[[Category:RemoteAdmin Commands]]

Latest revision as of 11:39, 16 March 2021

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


Contents

[edit] 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,...


[edit] Parameters

[edit] 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


[edit] 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


[edit] Returned Parameters

[edit] Returned Parameters

These parameters are returned by Remote Admin

parameter Description Values
success true


[edit] Error messages

No error messages


[edit] Notes

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

[edit] Example

[edit] PHP

This example needs the RemoteAdmin PHP Class file available here.


<?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);
?>

[edit] 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