//Teleport
v2.01 by Pablo Pharmanaut
//based
on old SL TP script by Cubey
Terra
integer
totalPos
=
5;
//This
integer
should equal total number of positions
integer
currentPos
=
1;
string
currentpos;
vector
vPos1
=
<190.824,168.0,41>; //These
are vectors for the positions
to
vector
vPos2
=
<221.0,99.5,24>; //which
you wish to teleport
vector
vPos3
=
<128.0,128.0,40>;
//Add
or take away to have the desired number of
vector
vPos4
=
<45,85,81>;
//positions.
vector
vPos5
=
<45,85,91>;
string
sPos1
=
"house";
//name
of
positions, if desired. This helps
string
sPos2
=
"waterfront";
//you
to know where you are
going!
string
sPos3
=
"entry
point";
//Again,
add or take away to have the desired number
string
sPos4
=
"Scriptwerks
Level 2";
//of
positions.
string
sPos5
=
"Scriptwerks
Level 3";
vector
currentvPos;
setPos()
{
if
(currentPos
==
1)
{
currentpos
=
sPos1;
currentvPos
=
vPos1;
}
else
if
(currentPos
==
2)
//
{
// add or delete this section of
script to change
currentpos
=
sPos2;
// number of TP destinations.
Change currentPos
currentvPos
=
vPos2;
// integer to number of destinations.
}
//
else
if
(currentPos
==
3)
{
currentpos
=
sPos3;
currentvPos
=
vPos3;
}
else
if
(currentPos
==
4)
{
currentpos
=
sPos4;
currentvPos
=
vPos4;
}
else
if
(currentPos
==
5)
{
currentpos
=
sPos5;
currentvPos
=
vPos5;
}
//add
else if section here with higher
currentPos integer to add TP destinations.
//Don't
forget to increase totalPos
integer at top of script
vector
pos
=
llGetPos();
llSetText("Teleport
to "+currentpos+"\nTouch
me to change destination",<1,1,1>,1.0);
vector
offset
=
currentvPos
-
pos;
llSitTarget(offset,
ZERO_ROTATION);
}
default
{
state_entry()
{
llSetSitText("Teleport");
//This
changes HUD display from
"Sit" to "Teleport"
}
touch_start(integer
total_number)
{
currentPos
+=
1;
if
(currentPos
>
totalPos)
currentPos
=
1;
setPos();
}
}