Simple Teleport Script

Written by: Headmaster

From Kimm Paulino:

// Teleports on 'left click' (touch).
//
// Set the coordinates to tp to in the DEST= line after these comments.
//
//  Kimm Paulino
//  Sept 2009
//
// Teleport bit based on the following:
//
// Copyright (c) 2008, Scripting Your World
// All rights reserved.
//
// Scripting Your World
// By Dana Moore, Michael Thome, and Dr. Karen Zita Haigh
// http://syw.fabulo.us
// http://www.amazon.com/Scripting-Your-World-Official-Second/dp/0470339837/
//
// You are permitted to use, share, and adapt this code under the 
// terms of the Creative Commons Public License described in full
// at http://creativecommons.org/licenses/by/3.0/legalcode.
// That means you must keep the credits, do nothing to damage our
// reputation, and do not suggest that we endorse you or your work.
//
// Listing 2.4: Teleport3 - Optimized Intrasim Teleport
 
vector DEST = <224, 213, 22>; // the teleport will be to this location
vector SITPOS = <0,0,0.5>;
key gAv;
 
moveTo(vector origin, vector destination ) { // removed jumpdist
    float dist = llVecDist(origin, destination);
    integer passes = llCeil( llLog(dist/10.0) / llLog(2.0) );
    integer i;
    list params = [PRIM_POSITION, destination];
    for (i=0; i