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
HyperGate OpenSim WalkthroughTeleporter  

OpenSim WalkthroughTeleporter

An instant Hypergrid jump to a different grid simply by walking

Category: HyperGate
By : John Lester (PathFinder)
Created: 2014-02-09 Edited: 2014-02-08
Worlds: OpenSim

the Zip file

Download all files for OpenSim WalkthroughTeleporter
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Script.lsl
1 // This is the script I use in my WarpGates. Its a Hypergrid script I got on Pathlandia and I use it everywhere.
2 // For more info see http://becunningandfulloftricks.com/2010/10/29/the-metaphor-of-portals
3 // anti-loop code added by Jag Nishi/The Ham
4
5 string GridName = "Visit Pathlandia\n(4000,4000)\n";
6 string SimAddress = "pathlandia.dlinkddns.com:9000:Pathlandia"; // use region name for inworld locations
7 string LastVerified = "\nLast Verified: 04/05/2012";
8 string Message = "";
9 string BoilerPlate = "\nWalk through to teleport";
10 vector LandingPoint = <123.0, 130.0, 13.0>;
11 vector TextColor = <0,1,1>;
12 vector LookAt = <1.0,1.0,0.0>;
13
14 key AgentToTransfer;
15 list LastFewAgents;
16
17 string CONTROLLER_ID = "A";
18 integer AUTO_START = TRUE;
19 list particle_parameters = [];
20 list target_parameters = [];
21
22 StartEffects()
23 {
24 // llCollisionSound("Magic Chimes", 1.0);
25
26 particle_parameters = [
28 PSYS_PART_START_SCALE, <0.10,0.10, FALSE>,
29 PSYS_PART_END_SCALE, <1.00,1.00, FALSE>,
30 PSYS_PART_START_COLOR, <1,1,1>,
31 PSYS_PART_END_COLOR, <1,1,1>,
39 PSYS_SRC_ACCEL, <0.0,0.0,-3.0>,
44 PSYS_SRC_OMEGA, <0,0,0>,
51 )
52 ];
53
54 if( AUTO_START ) llParticleSystem( particle_parameters );
55 }
56
57 PerformTeleport( key WhomToTeleport )
58 {
59 integer CurrentTime = llGetUnixTime();
60 integer AgentIndex = llListFindList( LastFewAgents, [ WhomToTeleport ] );
61 if(AgentIndex != -1)
62 {
63 integer PreviousTime = llList2Integer( LastFewAgents, AgentIndex+1 );
64 if(PreviousTime >= (CurrentTime -5)) return;
65 LastFewAgents = llDeleteSubList( LastFewAgents, AgentIndex, AgentIndex+1);
66 }
67 LastFewAgents += [ WhomToTeleport, CurrentTime ];
68 osTeleportAgent( WhomToTeleport, SimAddress, LandingPoint, LookAt );
69 }
70
71 default
72 {
73 on_rez(integer start_param)
74 {
76 }
77
79 {
80 //llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 0, 0, 0, 0, .05);
81 llSetText(GridName + SimAddress + BoilerPlate + LastVerified + Message, TextColor, 1);
82 }
83
84 collision_start(integer num_detected)
85 {
86 StartEffects();
87
88 if(llDetectedKey(0) != AgentToTransfer)
89 {
90 AgentToTransfer=llDetectedKey(0);
91 PerformTeleport( llDetectedKey(0));
92 }
93 else
94 {
96 }
97 }
98
99 timer()
100 {
101 AgentToTransfer="";
103 }
104
105 touch_start(integer num_detected)
106 {
108 }
109
110 link_message( integer sibling, integer num, string mesg, key target_key )
111 {
112 if( mesg != CONTROLLER_ID ) { // this message isn't for me. Bail out.
113 return;
114 } else if( num == 0 ) { // Message says to turn particles OFF:
115 llParticleSystem( [ ] );
116 } else if( num == 1 ) { // Message says to turn particles ON:
117 llParticleSystem( particle_parameters + target_parameters );
118 } else if( num == 2 ) { // Turn on, and remember and use the key sent us as a target:
119 target_parameters = [ PSYS_SRC_TARGET_KEY, target_key ];
120 llParticleSystem( particle_parameters + target_parameters );
121 } else { // bad instruction number
122 // do nothing.
123 }
124 }
125 }
126
127 //// "Explosion" PARTICLE TEMPLATE v1 - by Jopsy Pendragon - 4/8/2008
128 //// You are free to use this script as you please, so long as you include this line:
129 //** The original 'free' version of this script came from THE PARTICLE LABORATORY. **//

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