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
Weapons Stalking_lava_Fire  

Stalking_lava_Fire

Sends fire to an avatar

Category: Weapons
By : Anonymous
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Stalking_lava_Fire
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Stalking_lava_Fire_1.lsl
1 string victim;
2 key target;
3 key sound = "awakebun";
4 float min = 15;
5 float max = 25;
6 integer changed_pos = FALSE;
7 vector start_pos = <128,128,10>;
8
9
10 warpPos( vector destpos)
11 { //R&D by Keknehv Psaltery, 05/25/2006
12 //with a little pokeing by Strife, and a bit more
13 //some more munging by Talarus Luan
14 //Final cleanup by Keknehv Psaltery
15 // Compute the number of jumps necessary
16 integer jumps = (integer)(llVecDist(destpos, llGetPos()) / 10.0) + 1;
17 // Try and avoid stack/heap collisions
18 if(jumps > 100 )
19 jumps = 100; // 1km should be plenty
20 list rules = [ PRIM_POSITION, destpos ]; //The start for the rules list
21 integer count = 1;
22 while( ( count = count << 1 ) < jumps)
23 rules = (rules=[]) + rules + rules; //should tighten memory use.
24 llSetPrimitiveParams( rules + llList2List( rules, (count - jumps) << 1, count) );
25 }
26
27
28
29 default
30 {
32 {
33
34 llListen(6645,"",llGetOwner() ,"");
35 }
36 on_rez(integer start_param)
37 {
38
39
40 start_pos = llGetPos();
41 llPlaySound("bambagrowl",1.0);
42 llOwnerSay("touch me to start scanning");
43 }
44 touch_start(integer num_detected)
45 {
47 {
49 }
50 }
51 no_sensor()
52 {
53 llSay(0,"waiting...");
54 state searching;
55 }
56 sensor(integer num)
57 {
58 list targets;
59 integer i;
60 if(num > 12)
61 num = 12;
62 for(i=0;i<num;i++)
63 {
64 targets += [llDetectedName(i)];
65 }
66 llDialog(llGetOwner(),"select target to trace",targets,6645);
67 }
68 listen(integer channel, string name, key id, string message)
69 {
70 victim = message;
71 llOwnerSay("touch again to stop assimilation");
72 state tracing;
73 }
74 }
75
76 state tracing
77 {
78
79
81 {
82 llSetText("", <1,0,0>, 1.0);
83 llSetTimerEvent(5.0);
84 llSensorRepeat(victim,NULL_KEY,AGENT,96,PI,1.0);
85
86 }
87 no_sensor()
88 {
89 state searching;
90 }
91 sensor(integer num)
92 {
93
94 warpPos(llDetectedPos(0) + <0, 0, 0> );
95
96
97 }
98 touch_start(integer num_detected)
99 {
101 {
102 llOwnerSay("touch again to start scanning");
103
104
105 state default;
106 }
107
108 }
109 timer()
110 {
111
112
113 float time = min + llFrand(max - min);
114 llSetTimerEvent(time);
115 }
116
117 }
118
119
120
121 state searching
122 {
124 {
125 llSetTextureAnim(FALSE | SMOOTH | PING_PONG | LOOP | REVERSE, ALL_SIDES, 1, 1, 0.70, 0.2, 0.2);
126 llSetText(victim + " out of range...", <1,0,0>, 1.0);
128 }
129 timer()
130 {
131 llSensor(victim,NULL_KEY,AGENT,96,PI);
132 if(changed_pos==FALSE)
133 {
135 } else {
137 }
138 }
139 no_sensor()
140 {
141
142 if(changed_pos==FALSE)
143 {
144 llOwnerSay("target out of range - going back to start position " + (string)start_pos);
145 warpPos(start_pos);
146 changed_pos=TRUE;
147
148 }
149 }
150 sensor(integer num)
151 {
152 vector here = llGetPos();
153 string str="located "+(string)victim+" at "+(string)here;
154 llOwnerSay(str);
155 changed_pos=FALSE;
156 llPlaySound("bambagrowl",1.0);
157 state tracing;
158 }
159 touch_start(integer num_detected)
160 {
162 {
163 llOwnerSay("touch again to start scanning");
164 llSetText("no target", <1,0,0>, 1.0);
166 state default;
167 }
168
169 }
170
171
172 }

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