02-20-2013, 09:03 PM
Code:
/*
Anonymous presents...
Teleporter ( trought Sit )
This script can handle: Animations, Avatar, Chat, Communications, Effects, Permissions, Primitive, Scripts, Sit, Text, SitText, Teleport, Touch, Vehicle, todo
http://secondlife.coolminds.org
*/
key lastAVkey = NULL_KEY;
string fltText = "Teleportation Script";
vector dest = <17.144,154.847,26.836>;
default
{
state_entry()
{
llSetSitText("Teleport");
llSetText(fltText, <1,1,1>, 1);
llSitTarget(dest-llGetPos(), <0,0,0,1>);
}
touch_start(integer i)
{
llSay(0,"Right click me and chose 'Teleport'");
}
changed(integer change)
{
key currentAVkey = llAvatarOnSitTarget();
if (currentAVkey != NULL_KEY && lastAVkey == NULL_KEY)
{
lastAVkey = currentAVkey;
if (!(llGetPermissions() & PERMISSION_TRIGGER_ANIMATION))
llRequestPermissions(currentAVkey,PERMISSION_TRIGGER_ANIMATION);
llUnSit(currentAVkey);
llStopAnimation("sit");
llResetScript();
}
}
}