Jump to content

Creating a teleport with restricted use


You are about to reply to a thread that has been inactive for 2299 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello!

I am trying to Modify a Teleport script to enable only one user who is not the owner.   I have several scripts to create a teleport prim, that i use frequesntly,  but I need assistance on how to restrict its use to just one person.

 

Any help is appreciated.  In regards to modifying the script, I don't know where I would place additional content without messing up the script.  

 

thanks!

Link to comment
Share on other sites

You probably already know how to restrict use to the owner by checking

if (llGetOwner() == llDetectedKey(0) )

in the touch_start or changed event where your teleport action is triggered.  You can do that same test for any person's UUID:

key Bob = "01234567-89ab-cdef-0123-456789abcdef";

if (Bob == llDetectedKey(0) )

 

 

Link to comment
Share on other sites

most TP scripts can't use llTeleportAgent()  to TP anyone but the owner,

but you can do other things.

 

 string region = "Larsen"; vector slurl_vector = <33.0, 161.0, 1573.0>; // SLURL for wepage is....  http://maps.secondlife.com/secondlife/Larsen/33/161/1573 key tpKey = "06451596-818c-4975-8bc0-058ab2fe8274";  // for single person use
default{ state_entry() { llSetText("click to teleport to '" + region + "'", <1.0, 1.0, 1.0>, (float)TRUE); region = llEscapeURL(region); } touch_start(integer total_number) { if( llDetectedKey(0) == tpKey) { llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_LANDMARK, 0) ); // give Landmark llMapDestination(region, slurl_vector, ZERO_VECTOR); // open viewer map for destination // instant message the allowed person with clickable link llInstantMessage( llDetectedKey(0), " \nClick link below to Teleport\n secondlife:///app/teleport/" + region + "/"+(string)llRound(slurl_vector.x)+ "/" +(string)llRound(slurl_vector.y)+ "/" +(string)llRound(slurl_vector.z)); } }}

 

 just change tpKey, region, vector, etc and add your Landmark to the prim etc?

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2299 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...