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
Pose Balls Leopard_Animball_V3  

Leopard_Animball_V3

Leopard Animball V3.lsl

Category: Pose Balls
By : Leopard Loveless
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Leopard_Animball_V3
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Leopard_Animball_V3_1.lsl
1
2 // Advanced Animball by Leopard Loveless. Feel free to copy and spread.
3
4 string floattext = "wall1";
5 string sittext = " ";
6 string animationfilename = "wl2";
7 string lockcommand = "lock";
8 string unlockcommand = "unlock";
9 string hidecommand = "hide";
10 string showcommand = "show";
11 string owneronlycommand = "owner";
12 string allcansitcommand = "all";
13 vector floatcolor=<1.0,1.0,1.0>; // Color of the floating text. RGB, from 0.0 to 1.0
14 vector offset=<-0.1,0.0,-0.7>; // Offset between the ball and the animation center, never set all 3 axis to 0..
15 integer channel = 9; // Channel to listen on for commands. Set to 0 if you want it public.
16
17 // Do net edit below this line.
18
19 integer listener=0;
20 integer owneronly=0;
21 integer locked;
22 key sitAgent = NULL_KEY;
23 integer gotPermission = FALSE;
24
25 default
26 {
28 {
29 llSetSitText(sittext);
30 llListenRemove(listener);
32 llListen(channel,"",NULL_KEY,"");
33 }
34 on_rez(integer start_param)
35 {
36 llSetText(floattext,floatcolor,1.0);
38 }
39 listen(integer channel, string name, key id, string message)
40 {
41 if((id==llGetOwner()) || (locked==0))
42 {
43 if(message==lockcommand)
44 {
45 locked=1;
46 return;
47 }
48 if(message==unlockcommand)
49 {
50 locked=0;
51 return;
52 }
53 if(message==hidecommand)
54 {
55 llSetText("",<0.0,0.0,0.0>,0.0);
57 return;
58 }
59 if(message==showcommand)
60 {
61 llSetText(floattext,floatcolor,1.0);
63 return;
64 }
65 if(message==owneronlycommand)
66 {
67 owneronly=1;
68 return;
69 }
70 if(message==allcansitcommand)
71 {
72 owneronly=0;
73 return;
74 }
75 }
76 }
77 touch_start(integer num_detected)
78 {
79 llSetText("",<0.0,0.0,0.0>,0.0);
81 }
82 changed(integer change) {
83 if(change & CHANGED_LINK)
84 {
85 key agent = llAvatarOnSitTarget();
86 if((agent==llGetOwner()) || (owneronly==0))
87 {
88 if( sitAgent == NULL_KEY && agent != NULL_KEY ) {
89 // Someone new sitting down
90 sitAgent = agent;
92 }
93 else if( sitAgent != NULL_KEY && agent == NULL_KEY) {
94 // sitting down person got up - wake up :)
95 if( gotPermission )
96 llStopAnimation(animationfilename);
97 // Reset the script because we don't have a way of releasing permissions :)
99 }
100 } else
101 {
102 llWhisper(0,"Sorry, only "+llKey2Name(llGetOwner())+" can use this.");
103 llSleep(0.5);
104 llUnSit(agent);
105 }
106 }
107 }
110 gotPermission = TRUE;
111 llStopAnimation("sit");
112 llStartAnimation(animationfilename);
113 }
114 }
115 }
116 // END //

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