GridTalk.de
Teleport-Script innerhalb der Region - Druckversion

+- GridTalk.de (https://www.gridtalk.de)
+-- Forum: Werkstatt (https://www.gridtalk.de/forumdisplay.php?fid=4)
+--- Forum: Scripting (https://www.gridtalk.de/forumdisplay.php?fid=23)
+---- Forum: Fertige Scripts (https://www.gridtalk.de/forumdisplay.php?fid=24)
+---- Thema: Teleport-Script innerhalb der Region (/showthread.php?tid=212)



Teleport-Script innerhalb der Region - Klarabella Karamell - 21.11.2010

endlich hat die Rennerei ein Ende, seufz.....
Code:
integer CHANNEL = 42; // dialog channel
list MENU_MAIN = ["Plattform", "Villa Schepp","Grotte","Klamotten", "Haus"];
key lastAVkey = NULL_KEY;
string fltText = "Teleport";
vector dest ;
default
{
    state_entry()
    {
          llListen(CHANNEL, "", NULL_KEY, ""); // listen for dialog answers (from multiple users)
llSetSitText("Teleport");
        llSetText(fltText, <1,1,1>, 1);
      
    }
    touch_start(integer i)
    {
       llDialog(llDetectedKey(0), "Ziele", MENU_MAIN, CHANNEL); // present dialog on click
    }
    listen(integer channel, string name, key id, string message)
     /// Menu selber ende
     {
  
     if (message == "Plattform") dest = <116.309013,126.735489,498.082306> ;
   if (message == "Grotte") dest =  <203.817749,33.219597,21.493137>;
if (message == "Villa Schepp") dest = <86.953094,207.898895,21.250000>  ;
if (message == "Klamotten") dest = <11.276321,129.932083,21.332373> ;
if (message == "Haus") dest = <51.443775,38.852882,21.336037>;
llSitTarget(dest-llGetPos(), <0,0,0,1>);  
        

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