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
Scanner Avatar_Alert_Script  

Avatar_Alert_Script

Avatar Alert Script.lsl

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

the Zip file

Download all files for Avatar_Alert_Script
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Avatar_Alert_Script_1.lsl
1
2 integer switch=0;
3 key name;
4
5 default
6 {
8 {
9 llWhisper(0,"Alert Script Active");
10 name = llGetOwner();
11 }
12
13 touch_start(integer total_number)
14 {
15 if(switch==0)
16 {
17 switch=1;
18 llSensorRepeat("","",AGENT,90.0,PI,20.0);
19 llWhisper(0,"Alert on");
20 }
21 else if(switch==1)
22 {
23 switch=0;
25 llWhisper(0,"Alert off");
26 }
27 }
28
29 sensor(integer total_number)
30 {
31 vector pos = llGetPos();
32 integer j;
33 integer count = total_number;
34 for (j = 0; j < count; j++)
35 {
36 if(llDetectedKey(j) != name)
37 {
38 float diff = llVecDist(pos,llDetectedPos(j));
39 integer dist = llRound(diff);
40 string result = (llDetectedName(j)) + " " + ((string)dist) + "m";
41 llWhisper(0,result);
42 }
43 }
44 }
45
46 no_sensor()
47 {
48 llWhisper(0,"Nothing Found");
49 }
50
51 }
52 // END //

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