RemoteAdmin:admin teleport agent
From OpenSimulator
(Difference between revisions)
(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...") |
JeffKelley (Talk | contribs) m (→PHP: Fixed broken Google Code link, replacing with internal page) |
||
(13 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | === | + | '''admin_teleport_agent''' remotely teleport an agent to a given region and/or position |
+ | |||
+ | |||
+ | === 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 == | ||
+ | * From commit 415b7b7 on Wed 7 Dec 2011 (OpenSimulator 0.7.3-dev) | ||
+ | |||
+ | == Example == | ||
+ | === PHP === | ||
+ | This example needs the RemoteAdmin PHP Class file available [[RemoteAdmin:RemoteAdmin_Class|here]]. | ||
+ | |||
+ | |||
+ | <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', 'agent_first_name' => 'John', 'agent_last_name' => 'Doe', 'pos_x' => '15', 'pos_y' => '10'); | ||
+ | $myRemoteAdmin->SendCommand('admin_teleport_agent', $parameters); | ||
+ | ?> | ||
+ | </source> | ||
+ | |||
+ | === Python === | ||
<source lang="python"> | <source lang="python"> | ||
Line 12: | Line 127: | ||
# invoke admin_alert: requires password and message | # invoke admin_alert: requires password and message | ||
− | simulator.admin_teleport_agent({'password':'secret', 'agent_first_name':' | + | 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:RemoteAdmin]] | ||
+ | [[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'})