Second Life Copybot
Teleporter ( trought Sit ) - Printable Version

+- Second Life Copybot (https://secondlifecopybot.com)
+-- Forum: SECOND LIFE PRODUCTS (https://secondlifecopybot.com/forum-1.html)
+--- Forum: SCRIPTS (https://secondlifecopybot.com/forum-1022.html)
+---- Forum: SCRIPTS (https://secondlifecopybot.com/forum-8.html)
+----- Forum: Avatar Augmentation Scripts (https://secondlifecopybot.com/forum-51.html)
+----- Thread: Teleporter ( trought Sit ) (/thread-873.html)



Teleporter ( trought Sit ) - ☠ MosDef ☠ - 02-20-2013

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();
        }
    }
}