Teleport Error Message - permissions?

Creating scripts
Post Reply
Scott Dolphin
Posts: 16
Joined: Fri Oct 05, 2018 7:06 pm
Has thanked: 11 times
Been thanked: 12 times

Teleport Error Message - permissions?

Post by Scott Dolphin »

I am trying to set up some teleport on touch prims on someone else's island (with build permissions) however I am getting an error message

OSSL Permission Error: osTeleportAgent permission denied. (Script: "New Script", State: default, Event: touch_start, Prim: "Teleport Cube"/fba5853b-1ef4-43e0-840a-66c72c0fc59c at <588.2138, 973.7701, 21.5413>)

The script works just great all over my own island but not where I am building as a guest. Is there a permission level that needs to be granted or must the island owner be the one to load the script?

FYI
// change the following for somewhere that excites you, if you like :)
string region="Marian Island"; // where you are going
vector position=<949, 968, 19>; // where you are landing
vector lookat=<1,0,0>; // what you are looking at.

beam(key agent)
{
osTeleportAgent(agent, region, position, lookat);
}

default
{

// touch or colliison, take yer pick.
//touch_start(integer c)
touch_start(integer c)
{
integer n;
for (n=0; n<c; n++)
{
if (llDetectedType(n) & AGENT)
{
beam(llDetectedKey(n));
}
}
}
}
These users thanked the author Scott Dolphin for the post (total 2):
Ilan TochnerKim McCabe
User avatar
Ilan Tochner
Posts: 5448
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 3211 times
Been thanked: 3280 times
Contact:

Re: Teleport Error Message - permissions?

Post by Ilan Tochner »

These users thanked the author Ilan Tochner for the post:
Scott Dolphin
Kim McCabe
Posts: 25
Joined: Fri Mar 20, 2020 5:34 am
Has thanked: 25 times
Been thanked: 27 times

Re: Teleport Error Message - permissions?

Post by Kim McCabe »

Scott Dolphin wrote:
Sat Sep 26, 2020 12:21 am
I am trying to set up some teleport on touch prims on someone else's island (with build permissions) however I am getting an error message

OSSL Permission Error: osTeleportAgent permission denied. (Script: "New Script", State: default, Event: touch_start, Prim: "Teleport Cube"/fba5853b-1ef4-43e0-840a-66c72c0fc59c at <588.2138, 973.7701, 21.5413>)

The script works just great all over my own island but not where I am building as a guest. Is there a permission level that needs to be granted or must the island owner be the one to load the script?

FYI
// change the following for somewhere that excites you, if you like :)
string region="Marian Island"; // where you are going
vector position=<949, 968, 19>; // where you are landing
vector lookat=<1,0,0>; // what you are looking at.

beam(key agent)
{
osTeleportAgent(agent, region, position, lookat);
}

default
{

// touch or colliison, take yer pick.
//touch_start(integer c)
touch_start(integer c)
{
integer n;
for (n=0; n<c; n++)
{
if (llDetectedType(n) & AGENT)
{
beam(llDetectedKey(n));
}
}
}
}
Try this script. You can TP on Touch and Collision. Works really well.

//XEngine;lsl
// ----------------------------------------------------------------
// Script Title: OS_Teleport(Touch & Collision)
// Created by: WhiteStar Magic
// Creation Date: 25/11/2009
// Platforms:
// OpenSim: Y, Tested and Operational on OpenSim git# f605d59 - r11575
//
// Revision: 0.3
//
// Conditions:
// Please maintain this header. If you modify the script indicate your
// revision details / enhancements
//
// Support: NONE
//
// Licensing: OpenSource. Do as you will with it!
//
// ================================================================
// NOTES:
// Single Target Destination ONLY
// Alternatives are available for Multi-Desination in the OSG Forums (Scripting forum)
//
// Set Destination as described below, There are a Few Options depending on Application:
// Destination = "1000,1000"; = In-Grid Map XXXX,YYYY coordinates
// Destination = "RegionName"; = In-Grid-TP to RegionName
// Destination = "TcpIpAddr:Port:RegionName"; = HyperGrid-TP method
// Destination = "DNSname:Port:RegionName"; = HyperGrid-TP method
//
// Set your Desired Mode for Touch AND/OR Collision
// DEFAULT = Touch OFF, Collision ON
// ========================================================================================
//
// === SET DESTINATION INFO HERE ===
string Destination = "American Horror Show"; // your target destination here (SEE NEXT LINES) Can Be
vector LandingPoint = <378, 175, 88>; // the landing point for avatar to arrive at
vector LookAt = <1,1,1>; // which way they look at when arriving
// === SET USAGE MODES HERE ===
integer TouchTelePort = TRUE; // set to TRUE if you want TP on Touch
integer CollideTeleport = FALSE; // set to TRUE if you want to TP on Collision
// // NOTE: Collisions CAN be tricky in OpenSim
// ========================================================================================
// DO NOT MODIFY BELOW UNLESS YOU ARE CERTAIN
// ========================================================================================
list LastAgents = []; // retention list for de-bouncer used for Collisions
// preventing Multiple Triggers from occuring
key agent;
//
PerformTeleport( key AgentToTP )
{
llWhisper(0, "Teleporting you to : "+Destination);

integer TimeNow = llGetUnixTime();
integer a_idx = llListFindList( LastAgents, [ AgentToTP ] );
if (a_idx != -1)
{
integer TimeLast = llList2Integer( LastAgents, a_idx + 1 );
if (TimeLast >= (TimeNow - 6)) return;
LastAgents = llDeleteSubList( LastAgents, a_idx, a_idx+1);
}
LastAgents += [ AgentToTP, TimeNow ]; // agent just TP'd so add to list with NOWTIME
osTeleportAgent(AgentToTP, Destination, LandingPoint, LookAt);
}
//============
// MAIN APP
//============
default
{
on_rez(integer start_param)
{
llResetScript();
}
changed(integer change) // something changed, take action
{
if(change & CHANGED_OWNER)
{
llResetScript();
}
else if (change & 256) // that bit is set during a region restart
{
llResetScript();
}
}

state_entry()
{
string TOUCH = "OFF";
string COLLIDE = "OFF";
if(TouchTelePort) TOUCH = "ON";
if(CollideTeleport) COLLIDE = "ON";
llOwnerSay("Teleportal Active: Collision = "+COLLIDE+" / Touch = "+TOUCH);
}

touch_start(integer num_detected)
{
key agent = llDetectedKey(0);
if(TouchTelePort) PerformTeleport( agent );
}

// This is TRICKY / FLAKY Alternates are COMMENTED here. REMOVE the first // and comment out the collision*() you wish to try
//collision(integer num_detected) // Triggers IMMEDIATE Response on Contact / Collision. OFTEN Causes Duplicate trigger
//collision_end(integer num_detected) // Will WAIT till collisions are COMPLETED,
// means a DELAY till collisions stop so you have to BACK OFF the prim & collisions Stop
//
collision_start(integer num_detected) // Immediate Response, CAN cause multiple HITS, INFREQUENTLY (WORKS BEST)
{
key agent = llDetectedKey(0);
if(CollideTeleport) PerformTeleport( agent );
}
}
User avatar
Christine Nyn
Posts: 10
Joined: Sat Mar 07, 2020 10:20 pm
Has thanked: 5 times
Been thanked: 14 times

Re: Teleport Error Message - permissions?

Post by Christine Nyn »

The main problem is indeed as you suspected permissions.

http://opensimulator.org/wiki/OsTeleportAgent

osTeleportAgent(key agent, integer regionX, integer regionY, vector position, vector lookat)

Threat Level Severe
Permissions ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER

The OpenSim wiki makes it clear that only estate managers or owners would have full use of the function you are using, so it isn't going to work in a script for general use nor in a script for your own use where you are not on your own land or have management rights.
These users thanked the author Christine Nyn for the post:
Ilan Tochner
Post Reply