Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Teleport Elven Door Teleport System  

Elven Door Teleport System

Elven Door teleport System

Category: Teleport
By : Ferd Frederix
Created: 2014-12-04 Edited: 2015-04-14
Worlds: Second Life

the Zip file

Download all files for Elven Door Teleport System
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. crawl.bvh
Get file # 2. [34573 bytes] elven door image.jpg
Get file # 3. [1575527 bytes] Photo.png
Get file # 4. Elven Door.dae
Get file # 5. Elven Transport.dae
Get file # 6. elven door script.lsl
Get file # 7. door script.lsl
Get file # 8. spirals script.lsl
Get file # 9. script transporter.lsl
Get file # 10. door script.txt.txt
Get file # 11. elven door script.lsl.txt
Get file # 12. elven door.dae
Get file # 13. [20389 bytes] hypnosis_texture.jpg
Get file # 14. script transporter.txt.txt
Get file # 15. spirals script.txt.txt
Get file # 16. [158587 bytes] elven_door.png
Get file # 17. [155573 bytes] elven_door_inside.png
Get file # 18. [124978 bytes] elven_door_inside_NRM.png
Get file # 19. [143624 bytes] elven_door_NRM.png
Get file # 20. [24964 bytes] elven_door_top.png
Get file # 21. [27329 bytes] elven_door_top_NRM.png
Get file # 22. [45333 bytes] hypnosis_texture.png
Get file # 23. [115922 bytes] hypnosis_texture_NRM.png
Get file # 24. [2139759 bytes] wood_seamless.png
Get file # 25. [1695548 bytes] wood_seamless_NRM.png

This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1 ////----------------------------------------
2 //
3 //
4 // Q: What do I need to know right away?
5 //
6 // Use two or more doors to make a sim-wide teleport network.
7 //
8 // Click a door to open or close. Click the spiral to get a menu for teleport.
9 //
10 // Installation:
11 //
12 // Rename each door as you place it. This name appears in the menu. Use 12 characters or fewer for each name
13 //
14 // For more door networks, or to prevent interference, change the number in the Objects Description field to a new channel.
15 //
16 // The teleport will sync up automatically to a maximum of 16 doors.
17 //
18
19
20
21 integer debug = 0;
22
23
24 integer isopen ; // TRUE sf the door is open
25
26 // position it in front and up from the base
27 vector relativePosOffset = <0, -.80, 0.4>; // "Forward" of this prim
28 vector startROT = <0,0,90> ; // initial rotation
29
30
31 rotation MYROT ;
32
33 string moover;
34 integer channel = -44442; // listener from other prim
35 integer listener; // channel handle
36 string myName; // Name of this prim
37
38 integer startParam = 30; // seconds to poof, then door closes
39
40 Tell()
41 {
42 string location = (string) llGetPos() + "|" + (string) llGetRot();
43 if(! debug)
44 llRegionSay(channel,location);
45 else
46 llSay(channel,location);
47 }
48
49
50 default
51 {
53 {
54 channel = (integer) llGetObjectDesc();
55 if(debug) llOwnerSay("Channel=" + (string) channel);
56 listener = llListen(channel,"","","");
57 }
58
60 {
62 }
63
64 link_message(integer sender_num,integer num, string str, key id)
65 {
66
67 channel = (integer) llGetObjectDesc();
68 if(debug) llOwnerSay("Channel=" + (string) channel);
69 listener = llListen(channel,"","","");
70
71
72 if(str =="rez")
73 {
75 string myname = llGetObjectName();
76
77 rotation myRot = llGetRot();
78 rotation relativeRot = myRot * llEuler2Rot(startROT * DEG_TO_RAD) ;
79
80 vector myPos = llGetPos();
81
82 vector rezPos = myPos+relativePosOffset*myRot;
83 vector rezVel = <0,0,0>;
84
85
86 //llOwnerSay("Rezzing " + moover);
87 llRezObject(moover,rezPos, rezVel, relativeRot, channel);
88 }
89 }
90
91 listen(integer channel,string name, key id, string message)
92 {
93 if(debug) llOwnerSay("Heard " + message);
94
95 // ignore what I say to myself
96 if(id == llGetKey())
97 return;
98
99 // announce our location
100 if(message == "reset")
101 {
102 Tell();
103 return;
104 }
105
106 // If the person is coming, open the door
107 if(message == "open" && isopen == FALSE)
108 {
109 isopen = TRUE;
110 llMessageLinked(LINK_ALL_OTHERS, 0,"open","");
112 return;
113 }
114
115 }
116
117 timer()
118 {
119 llMessageLinked(LINK_ALL_OTHERS, 0,"close","");
121 isopen = FALSE;
122 }
123
124 }

Elven Door Teleport System

DESCRIPTION: []::Elven Door teleport System

Category: Teleport
By : Ferd Frederix
Created: 2014-12-04 Edited: 2015-04-14
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1 // door swing script
2
3 integer open = 0;
4
5
6 opendoor()
7 {
8 if(open == TRUE)
9 return;
10 llSetLocalRot( llEuler2Rot(<0,0,120> * DEG_TO_RAD) );
11 open = TRUE;
12 llSetTimerEvent(30.0);
13 }
14
15 closedoor()
16 {
17 llSetLocalRot( llEuler2Rot(<0,0,-90> * DEG_TO_RAD) );
18 open = FALSE;
19 }
20
21 default
22 {
24 {
25 closedoor();
26 }
27
28 touch_start(integer total_number)
29 {
30 if(open)
31 {
32 llSetTimerEvent(0.1); //close door
33 }
34 else
35 {
36 opendoor();
38
39 }
40 }
41
42 timer()
43 {
44 closedoor();
45 llSetTimerEvent(0.0);
46 }
47
48 link_message(integer sender_num,integer num, string str, key id)
49 {
50 //llOwnerSay("Heard:" + str);
51 if(str =="open")
52 {
53 llSetTimerEvent(30.0);
54 opendoor();
55 }
56 else if(str =="close")
57 {
58 llSetTimerEvent(0.0);
59 closedoor();
60 }
61
62 }
63
65 {
67 }
68 }

Elven Door Teleport System

DESCRIPTION: []::Elven Door teleport System

Category: Teleport
By : Ferd Frederix
Created: 2014-12-04 Edited: 2015-04-14
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2 default
3 {
5 {
6 llSetTextureAnim(ANIM_ON | LOOP, 4,4,2,0,0,6.0);
7 }
9 {
11 }
12 }

Elven Door Teleport System

DESCRIPTION: []::Elven Door teleport System invisible prim - put inside the main system

Category: Teleport
By : Ferd Frederix
Created: 2014-12-04 Edited: 2015-04-14
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1 // Ferd Frederix
2
3
4 integer debug = 0;
5
6 float TIME = 6.0; // animation play time
7 integer channelin; // listener from other prim
8 integer menuchannel; // a random channel for hearing the Dialog box
9 integer chathandle; // handle for the menu, we destroy it to kill lag
10 integer listener; // channel handle
11
12 float oldDist;
13
14 vector StartSeatedRotation = <0, 0, 0>; // animation start rotation
15 vector StopSeatedRotation = <0, 0, -90>; // animation stop rotation
16
17 vector StartSeatedOffset = <0, 0, 0.5>; // where we sit to start
18 vector StopSeatedOffset = <0, .5, 0.2>; // where we end up after teleport
19
20 vector DestPosition; // calculated offset to the other door
21 rotation DestRotation; // calculated rotation when we get there
22 string animation ; // calculated animation name
23
24 key AvatarKey; // key of who touched the door
25
26 list menu; // storage for all the remoted doors
27
28 Menu()
29 {
30
31 menuchannel = llCeil(llFrand(1000000) + 99999); // large random #
32 chathandle = llListen(menuchannel,"","",""); // listen for Dialog
33 integer i = llGetListLength(menu);
34 list buttons;
35 integer j;
36 // make a menu from what we have heard
37 for (j = 0; j < i; j+=3)
38 buttons += llList2String(menu,j);
39
40 if(debug) llOwnerSay("button channel = " + (string)menuchannel +":" + llDumpList2String(buttons,"=="));
41
42 llDialog(AvatarKey,"Pick a destination",buttons,menuchannel);
43 }
44
45 BootUp(integer newchannel)
46 {
47 oldDist = 0;
48 channelin = newchannel;
49
50 if(debug) llOwnerSay("Channel=" + (string) channelin);
51 listener = llListen(channelin,"","","");
52
53 rotation SeatedRotation = llEuler2Rot( StartSeatedRotation * DEG_TO_RAD) * llGetRot();
54 //llOwnerSay("bootup=" + (string) StartSeatedOffset+ "..." + (string) SeatedRotation);
55 llSitTarget(StartSeatedOffset, <0,0,0,1>);
56
58 llSetSitText("Enter");
59 llRegionSay(channelin,"reset");
60 llSetTimerEvent(30); // die when the door shuts
61 }
62
63
64 MovePrim(float dir)
65 {
66
67 vector vPosOffset = <dir, 0.0, 0.0>; //-- creates an offset one tick in the positive X direction.
68 integer i = 0;
69 for (i = 0; i < 20; i++)
70 {
71 vector vPosRotOffset = vPosOffset * llGetRot(); //-- rotate the offset to be relative to objects rotation
72 vector vPosOffsetIsAt = llGetPos() + vPosRotOffset; //-- get the region position of the rotated offset
73 llSetPos(vPosOffsetIsAt);
74 }
75 }
76
77
78
79 Go()
80 {
81 if(debug) llOwnerSay("starting animation");
82 llStartAnimation(animation);
83 MovePrim(.1);
84
85 if(debug) llOwnerSay("starting movement to " + (string )DestPosition);
86 warpPos();
87
88 MovePrim(.1);
89 if(debug) llOwnerSay("ending animation");
90
91 llStopAnimation(animation);
92 llUnSit(AvatarKey);
93
94 if(! debug)
95 llDie();
96
97 }
98
99 warpPos()
100 {
101 llSetRegionPos( DestPosition );
102
103
104 DestRotation = llEuler2Rot( StopSeatedRotation * DEG_TO_RAD) * DestRotation ; // maybe rotate
105 //DestRotation = llGetRot() * DestRotation ; // maybe rotate
106
107 llSetRot(DestRotation); // set dest rotation
108
109 llWhisper(channelin,"open");
110 llSleep(1.0);
111
112 }
113
114
115
116 default
117 {
119 {
120
121 if(((integer) llGetObjectDesc()) == 0)
122 llSetObjectDesc("22221");
123
124
125 BootUp((integer) llGetObjectDesc());
126 }
127
128 changed (integer what)
129 {
130 if(what & CHANGED_LINK)
131 {
132 if(debug) llOwnerSay("changed");
133
134
135 AvatarKey = llAvatarOnSitTarget();
136 if(AvatarKey != NULL_KEY)
137 {
138 integer i = llGetListLength(menu);
139 if(debug) llOwnerSay("Menu L= " + (string) i);
140 if(i > 0)
141 Menu();
142 }
143 }
144 else
145 {
147 }
148
149 }
150
151
152
154 {
156 {
157 if(debug) llOwnerSay("perms granted");
158 Go();
159 }
160 }
161
163 {
164 if(p ==0)
166
167 BootUp(p);
168 }
169
170 timer()
171 {
173 if(! debug)
174 llDie();
175
176
177 }
178
179 listen(integer channels,string name, key id, string message)
180 {
181 if(debug) llOwnerSay("Heard:" + message);
182
183 if(channels == channelin)
184 {
185
186 if(id == llGetKey())
187 return;
188 if(message == "reset")
189 return;
190 if(message == "open")
191 return;
192
193 list params = llParseString2List(message,["|"],[""]);
194 vector DestPositionproto = (vector) llList2String(params,0);
195
196 rotation DestRotationproto = (rotation) llList2String(params,1);
197
198 // remember the furthest prim that responds
199 float dist = llVecDist(DestPositionproto,llGetPos());
200 menu += name;
201 menu += DestPositionproto;
202 menu += DestRotationproto;
203
204 if(debug) llOwnerSay("Set Pos:" + (string) DestPosition + " rot:" + (string) DestRotation);
205 }
206 else if(channels == menuchannel)
207 {
208 llListenRemove(chathandle);
209 integer i = llGetListLength(menu);
210 integer j;
211
212 for (j = 0; j < i; j+=3)
213 {
214 if( llList2String(menu,j) == message) // they want to go somewhere
215 {
216 DestPosition = llList2Vector(menu,j+1);
217 DestRotation = llList2Rot(menu,j+2);
218
219 // convert position to lsl rotated form
220 if(debug) llOwnerSay("Located:" + (string) DestPosition + " rot:" + (string) DestRotation);
221
222 vector vPosRotOffset = StopSeatedOffset * DestRotation; //-- rotate the offset to be relative to objects rotation
223
224 DestPosition = DestPosition + vPosRotOffset; //-- get the region position of the rotated offset
225
226
227 if(DestPosition != <0,0,0>)
228 {
229 if(debug) llOwnerSay("request perms");
231 }
232
233
234 }
235 }
236 }
237 }
238
239
240
241 }

Back to the Best Free Tools in Second Life and OpenSim.