Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //exterior tp
- integer warpchannel = -1716231163; //Channel to receive the id of the exit prim of the wormhole or console to teleport to.
- integer send = -1716231164; // Channel to send a message to the exit prim to stop broadcasting its id.
- integer delete_channel = -1716231166; // Channel to delete the exterior when in flight.
- integer listen_handle;
- integer listen_handle2;
- vector exitprim; // The vector of the exit prim.
- list destination; // Adding the vector of the exit prim to a list.
- key toucher;
- default
- {
- on_rez(integer start_param)
- {
- llResetScript();
- }
- state_entry()
- {
- integer Channel = (integer) ( "0x" + (string) llGetOwner() ) - 654321;
- listen_handle = llListen(Channel,"","",""); //Listens on the channel for the id of the exit prim.
- listen_handle2 = llListen(Channel,"","","");
- llRequestPermissions(llGetOwner(), PERMISSION_TELEPORT);
- }
- touch_end(integer num)
- { toucher = llDetectedKey(0);
- if(toucher == llGetOwner())
- {
- llTeleportAgent(llGetOwner(),"",llList2Vector(llGetObjectDetails(llList2Key(destination,0), [OBJECT_POS]),0),<0.0, 0.0, 0.1>);
- }
- }
- listen(integer channel, string name, key id, string message)
- {
- integer Channel = (integer) ( "0x" + (string) llGetOwner() ) - 654321;
- if(channel == Channel) //If we hear the id from the exit prim.
- {
- llListenRemove(listen_handle);
- exitprim = llList2Vector(llGetObjectDetails(id, [OBJECT_POS]),0);
- //Set the vector to the position of the exit prim.
- destination += id; //Add the id of the exit prim to a list so we can call the list to update its position when changed.
- llRegionSay(Channel,"Stop"); //Sends a message to the exit prim to stop broadcasting its id.
- }
- }
- }
- // rezzer
- integer rezext = -1716231165;
- integer listen_handle;
- default
- {
- state_entry()
- {
- integer Channel = (integer) ( "0x" + (string) llGetOwner() ) - 654321;
- listen_handle = llListen(Channel,"","","");
- }
- listen(integer channel, string name, key id, string message)
- {
- integer Channel = (integer) ( "0x" + (string) llGetOwner() ) - 654321;
- if(channel == Channel)
- {
- if(message == "Land")
- {
- llRezObject("~MPBDr12-2.24", llGetPos() + <0.0,0.0,2.0>, <0.0,0.0,0.0>, <0.0,0.0,0.0,1.0>, 0);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement