aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs1601
1 files changed, 787 insertions, 814 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
index fe20e99..3404bac 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
@@ -1,814 +1,787 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using libsecondlife; 4using libsecondlife;
5using OpenSim.Region.Environment.Scenes; 5using OpenSim.Region.Environment.Scenes;
6using OpenSim.Region.Environment.Scenes.Scripting; 6using OpenSim.Region.Environment.Scenes.Scripting;
7using OpenSim.Region.Environment.Interfaces; 7using OpenSim.Region.Environment.Interfaces;
8using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler; 8using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler;
9using OpenSim.Region.ScriptEngine.Common; 9using OpenSim.Region.ScriptEngine.Common;
10using OpenSim.Framework.Console; 10using OpenSim.Framework.Console;
11using OpenSim.Framework.Utilities; 11using OpenSim.Framework.Utilities;
12using System.Runtime.Remoting.Lifetime; 12using System.Runtime.Remoting.Lifetime;
13 13
14namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler 14namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
15{ 15{
16 16
17 /// <summary> 17 /// <summary>
18 /// Contains all LSL ll-functions. This class will be in Default AppDomain. 18 /// Contains all LSL ll-functions. This class will be in Default AppDomain.
19 /// </summary> 19 /// </summary>
20 public class LSL_BuiltIn_Commands: MarshalByRefObject, LSL_BuiltIn_Commands_Interface 20 public class LSL_BuiltIn_Commands : MarshalByRefObject, LSL_BuiltIn_Commands_Interface
21 { 21 {
22 22
23 private System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); 23 private System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
24 private ScriptEngine m_ScriptEngine; 24 private ScriptEngine m_ScriptEngine;
25 private SceneObjectPart m_host; 25 private SceneObjectPart m_host;
26 private uint m_localID; 26 private uint m_localID;
27 private LLUUID m_itemID; 27 private LLUUID m_itemID;
28 28 private bool throwErrorOnNotImplemented = true;
29 public LSL_BuiltIn_Commands(ScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID) 29
30 { 30 public LSL_BuiltIn_Commands(ScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID)
31 m_ScriptEngine = ScriptEngine; 31 {
32 m_host = host; 32 m_ScriptEngine = ScriptEngine;
33 m_localID = localID; 33 m_host = host;
34 m_itemID = itemID; 34 m_localID = localID;
35 35 m_itemID = itemID;
36 36
37 //MainLog.Instance.Notice("ScriptEngine", "LSL_BaseClass.Start() called. Hosted by [" + m_host.Name + ":" + m_host.UUID + "@" + m_host.AbsolutePosition + "]"); 37
38 } 38 //MainLog.Instance.Notice("ScriptEngine", "LSL_BaseClass.Start() called. Hosted by [" + m_host.Name + ":" + m_host.UUID + "@" + m_host.AbsolutePosition + "]");
39 39 }
40 40
41 private string m_state = "default"; 41
42 42 private string m_state = "default";
43 public string State() 43
44 { 44 public string State()
45 return m_state; 45 {
46 } 46 return m_state;
47 47 }
48 // Object never expires 48
49 public override Object InitializeLifetimeService() 49 // Object never expires
50 { 50 public override Object InitializeLifetimeService()
51 //Console.WriteLine("LSL_BuiltIn_Commands: InitializeLifetimeService()"); 51 {
52 // return null; 52 //Console.WriteLine("LSL_BuiltIn_Commands: InitializeLifetimeService()");
53 ILease lease = (ILease)base.InitializeLifetimeService(); 53 // return null;
54 54 ILease lease = (ILease)base.InitializeLifetimeService();
55 if (lease.CurrentState == LeaseState.Initial) 55
56 { 56 if (lease.CurrentState == LeaseState.Initial)
57 lease.InitialLeaseTime = TimeSpan.Zero; // TimeSpan.FromMinutes(1); 57 {
58 // lease.SponsorshipTimeout = TimeSpan.FromMinutes(2); 58 lease.InitialLeaseTime = TimeSpan.Zero; // TimeSpan.FromMinutes(1);
59 // lease.RenewOnCallTime = TimeSpan.FromSeconds(2); 59 // lease.SponsorshipTimeout = TimeSpan.FromMinutes(2);
60 } 60 // lease.RenewOnCallTime = TimeSpan.FromSeconds(2);
61 return lease; 61 }
62 } 62 return lease;
63 63 }
64 64
65 public Scene World 65
66 { 66 public Scene World
67 get { return m_ScriptEngine.World; } 67 {
68 } 68 get { return m_ScriptEngine.World; }
69 69 }
70 //These are the implementations of the various ll-functions used by the LSL scripts. 70
71 //starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07 71 //These are the implementations of the various ll-functions used by the LSL scripts.
72 public double llSin(double f) { return (double)Math.Sin(f); } 72 //starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07
73 public double llCos(double f) { return (double)Math.Cos(f); } 73 public double llSin(double f) { return (double)Math.Sin(f); }
74 public double llTan(double f) { return (double)Math.Tan(f); } 74 public double llCos(double f) { return (double)Math.Cos(f); }
75 public double llAtan2(double x, double y) { return (double)Math.Atan2(y, x); } 75 public double llTan(double f) { return (double)Math.Tan(f); }
76 public double llSqrt(double f) { return (double)Math.Sqrt(f); } 76 public double llAtan2(double x, double y) { return (double)Math.Atan2(y, x); }
77 public double llPow(double fbase, double fexponent) { return (double)Math.Pow(fbase, fexponent); } 77 public double llSqrt(double f) { return (double)Math.Sqrt(f); }
78 public int llAbs(int i) { return (int)Math.Abs(i); } 78 public double llPow(double fbase, double fexponent) { return (double)Math.Pow(fbase, fexponent); }
79 public double llFabs(double f) { return (double)Math.Abs(f); } 79 public int llAbs(int i) { return (int)Math.Abs(i); }
80 80 public double llFabs(double f) { return (double)Math.Abs(f); }
81 public double llFrand(double mag) 81
82 { 82 public double llFrand(double mag)
83 lock (Util.RandomClass) 83 {
84 { 84 lock (Util.RandomClass)
85 return Util.RandomClass.Next((int)mag); 85 {
86 } 86 return Util.RandomClass.Next((int)mag);
87 } 87 }
88 88 }
89 public int llFloor(double f) { return (int)Math.Floor(f); } 89
90 public int llCeil(double f) { return (int)Math.Ceiling(f); } 90 public int llFloor(double f) { return (int)Math.Floor(f); }
91 public int llRound(double f) { return (int)Math.Round(f, 3); } 91 public int llCeil(double f) { return (int)Math.Ceiling(f); }
92 92 public int llRound(double f) { return (int)Math.Round(f, 3); }
93 //This next group are vector operations involving squaring and square root. ckrinke 93
94 public double llVecMag(LSL_Types.Vector3 v) 94 //This next group are vector operations involving squaring and square root. ckrinke
95 { 95 public double llVecMag(LSL_Types.Vector3 v)
96 return (v.X*v.X + v.Y*v.Y + v.Z*v.Z); 96 {
97 } 97 return (v.X * v.X + v.Y * v.Y + v.Z * v.Z);
98 98 }
99 public LSL_Types.Vector3 llVecNorm(LSL_Types.Vector3 v) 99
100 { 100 public LSL_Types.Vector3 llVecNorm(LSL_Types.Vector3 v)
101 double mag = v.X * v.X + v.Y * v.Y + v.Z * v.Z; 101 {
102 LSL_Types.Vector3 nor = new LSL_Types.Vector3(); 102 double mag = v.X * v.X + v.Y * v.Y + v.Z * v.Z;
103 nor.X = v.X / mag; nor.Y = v.Y / mag; nor.Z = v.Z / mag; 103 LSL_Types.Vector3 nor = new LSL_Types.Vector3();
104 return nor; 104 nor.X = v.X / mag; nor.Y = v.Y / mag; nor.Z = v.Z / mag;
105 } 105 return nor;
106 106 }
107 public double llVecDist(LSL_Types.Vector3 a, LSL_Types.Vector3 b) 107
108 { 108 public double llVecDist(LSL_Types.Vector3 a, LSL_Types.Vector3 b)
109 double dx = a.X - b.X; double dy = a.Y - b.Y; double dz = a.Z - b.Z; 109 {
110 return Math.Sqrt(dx * dx + dy * dy + dz * dz); 110 double dx = a.X - b.X; double dy = a.Y - b.Y; double dz = a.Z - b.Z;
111 } 111 return Math.Sqrt(dx * dx + dy * dy + dz * dz);
112 112 }
113 //Now we start getting into quaternions which means sin/cos, matrices and vectors. ckrinke 113
114 public LSL_Types.Vector3 llRot2Euler(LSL_Types.Quaternion r) 114 //Now we start getting into quaternions which means sin/cos, matrices and vectors. ckrinke
115 { 115 public LSL_Types.Vector3 llRot2Euler(LSL_Types.Quaternion r)
116 //This implementation is from http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryRotationFunctions. ckrinke 116 {
117 LSL_Types.Quaternion t = new LSL_Types.Quaternion(r.X * r.X, r.Y * r.Y, r.Z * r.Z, r.R * r.R); 117 //This implementation is from http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryRotationFunctions. ckrinke
118 double m = (t.X + t.Y + t.Z + t.R); 118 LSL_Types.Quaternion t = new LSL_Types.Quaternion(r.X * r.X, r.Y * r.Y, r.Z * r.Z, r.R * r.R);
119 if (m == 0) return new LSL_Types.Vector3(); 119 double m = (t.X + t.Y + t.Z + t.R);
120 double n = 2 * (r.Y * r.R + r.X * r.Z); 120 if (m == 0) return new LSL_Types.Vector3();
121 double p = m * m - n * n; 121 double n = 2 * (r.Y * r.R + r.X * r.Z);
122 if (p > 0) 122 double p = m * m - n * n;
123 return new LSL_Types.Vector3(Math.Atan2(2.0 * (r.X*r.R - r.Y*r.Z),(-t.X - t.Y + t.Z + t.R)), 123 if (p > 0)
124 Math.Atan2(n,Math.Sqrt(p)), Math.Atan2(2.0 * (r.Z*r.R - r.X*r.Y),( t.X - t.Y - t.Z + t.R))); 124 return new LSL_Types.Vector3(Math.Atan2(2.0 * (r.X * r.R - r.Y * r.Z), (-t.X - t.Y + t.Z + t.R)),
125 else if(n>0) 125 Math.Atan2(n, Math.Sqrt(p)), Math.Atan2(2.0 * (r.Z * r.R - r.X * r.Y), (t.X - t.Y - t.Z + t.R)));
126 return new LSL_Types.Vector3( 0.0, Math.PI/2, Math.Atan2((r.Z*r.R + r.X*r.Y), 0.5 - t.X - t.Z)); 126 else if (n > 0)
127 else 127 return new LSL_Types.Vector3(0.0, Math.PI / 2, Math.Atan2((r.Z * r.R + r.X * r.Y), 0.5 - t.X - t.Z));
128 return new LSL_Types.Vector3( 0.0, -Math.PI/2, Math.Atan2((r.Z*r.R + r.X*r.Y), 0.5 - t.X - t.Z)); 128 else
129 } 129 return new LSL_Types.Vector3(0.0, -Math.PI / 2, Math.Atan2((r.Z * r.R + r.X * r.Y), 0.5 - t.X - t.Z));
130 130 }
131 public LSL_Types.Quaternion llEuler2Rot(LSL_Types.Vector3 v) 131
132 { 132 public LSL_Types.Quaternion llEuler2Rot(LSL_Types.Vector3 v)
133 //this comes from from http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryRotationFunctions but is incomplete as of 8/19/07 133 {
134 float err = 0.00001f; 134 //this comes from from http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryRotationFunctions but is incomplete as of 8/19/07
135 double ax = Math.Sin(v.X / 2); double aw = Math.Cos(v.X / 2); 135 float err = 0.00001f;
136 double by = Math.Sin(v.Y / 2); double bw = Math.Cos(v.Y / 2); 136 double ax = Math.Sin(v.X / 2); double aw = Math.Cos(v.X / 2);
137 double cz = Math.Sin(v.Z / 2); double cw = Math.Cos(v.Z / 2); 137 double by = Math.Sin(v.Y / 2); double bw = Math.Cos(v.Y / 2);
138 LSL_Types.Quaternion a1 = new LSL_Types.Quaternion(0.0, 0.0, cz, cw); 138 double cz = Math.Sin(v.Z / 2); double cw = Math.Cos(v.Z / 2);
139 LSL_Types.Quaternion a2 = new LSL_Types.Quaternion(0.0, by, 0.0, bw); 139 LSL_Types.Quaternion a1 = new LSL_Types.Quaternion(0.0, 0.0, cz, cw);
140 LSL_Types.Quaternion a3 = new LSL_Types.Quaternion(ax, 0.0, 0.0, aw); 140 LSL_Types.Quaternion a2 = new LSL_Types.Quaternion(0.0, by, 0.0, bw);
141 LSL_Types.Quaternion a = new LSL_Types.Quaternion(); 141 LSL_Types.Quaternion a3 = new LSL_Types.Quaternion(ax, 0.0, 0.0, aw);
142//This multiplication doesnt compile, yet. a = a1 * a2 * a3; 142 LSL_Types.Quaternion a = new LSL_Types.Quaternion();
143 LSL_Types.Quaternion b = new LSL_Types.Quaternion(ax * bw * cw + aw * by * cz, 143 //This multiplication doesnt compile, yet. a = a1 * a2 * a3;
144 aw * by * cw - ax * bw * cz, aw * bw * cz + ax * by * cw, aw * bw * cw - ax * by * cz); 144 LSL_Types.Quaternion b = new LSL_Types.Quaternion(ax * bw * cw + aw * by * cz,
145 LSL_Types.Quaternion c = new LSL_Types.Quaternion(); 145 aw * by * cw - ax * bw * cz, aw * bw * cz + ax * by * cw, aw * bw * cw - ax * by * cz);
146//This addition doesnt compile yet c = a + b; 146 LSL_Types.Quaternion c = new LSL_Types.Quaternion();
147 LSL_Types.Quaternion d = new LSL_Types.Quaternion(); 147 //This addition doesnt compile yet c = a + b;
148//This addition doesnt compile yet d = a - b; 148 LSL_Types.Quaternion d = new LSL_Types.Quaternion();
149 if ((Math.Abs(c.X) > err && Math.Abs(d.X) > err) || 149 //This addition doesnt compile yet d = a - b;
150 (Math.Abs(c.Y) > err && Math.Abs(d.Y) > err) || 150 if ((Math.Abs(c.X) > err && Math.Abs(d.X) > err) ||
151 (Math.Abs(c.Z) > err && Math.Abs(d.Z) > err) || 151 (Math.Abs(c.Y) > err && Math.Abs(d.Y) > err) ||
152 (Math.Abs(c.R) > err && Math.Abs(d.R) > err)) 152 (Math.Abs(c.Z) > err && Math.Abs(d.Z) > err) ||
153 { 153 (Math.Abs(c.R) > err && Math.Abs(d.R) > err))
154 //return a new Quaternion that is null until I figure this out 154 {
155 // return b; 155 //return a new Quaternion that is null until I figure this out
156 // return a; 156 // return b;
157 } 157 // return a;
158 return new LSL_Types.Quaternion(); 158 }
159 } 159 return new LSL_Types.Quaternion();
160 160 }
161 public LSL_Types.Quaternion llAxes2Rot(LSL_Types.Vector3 fwd, LSL_Types.Vector3 left, LSL_Types.Vector3 up) { return new LSL_Types.Quaternion(); } 161
162 public LSL_Types.Vector3 llRot2Fwd(LSL_Types.Quaternion r) { return new LSL_Types.Vector3(); } 162 public LSL_Types.Quaternion llAxes2Rot(LSL_Types.Vector3 fwd, LSL_Types.Vector3 left, LSL_Types.Vector3 up) { return new LSL_Types.Quaternion(); }
163 public LSL_Types.Vector3 llRot2Left(LSL_Types.Quaternion r) { return new LSL_Types.Vector3(); } 163 public LSL_Types.Vector3 llRot2Fwd(LSL_Types.Quaternion r) { return new LSL_Types.Vector3(); }
164 public LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r) { return new LSL_Types.Vector3(); } 164 public LSL_Types.Vector3 llRot2Left(LSL_Types.Quaternion r) { return new LSL_Types.Vector3(); }
165 public LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 start, LSL_Types.Vector3 end) { return new LSL_Types.Quaternion(); } 165 public LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r) { return new LSL_Types.Vector3(); }
166 166 public LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 start, LSL_Types.Vector3 end) { return new LSL_Types.Quaternion(); }
167 public void llWhisper(int channelID, string text) 167
168 { 168 public void llWhisper(int channelID, string text)
169 //type for whisper is 0 169 {
170 World.SimChat(Helpers.StringToField(text), 170 //type for whisper is 0
171 0, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 171 World.SimChat(Helpers.StringToField(text),
172 } 172 0, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
173 173 }
174 public void llSay(int channelID, string text) 174
175 { 175 public void llSay(int channelID, string text)
176 //type for say is 1 176 {
177 177 //type for say is 1
178 World.SimChat(Helpers.StringToField(text), 178
179 1, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 179 World.SimChat(Helpers.StringToField(text),
180 } 180 1, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
181 181 }
182 public void llShout(int channelID, string text) 182
183 { 183 public void llShout(int channelID, string text)
184 //type for shout is 2 184 {
185 World.SimChat(Helpers.StringToField(text), 185 //type for shout is 2
186 2, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 186 World.SimChat(Helpers.StringToField(text),
187 } 187 2, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
188 188 }
189 public int llListen(int channelID, string name, string ID, string msg) { return 0; } 189
190 public void llListenControl(int number, int active) { return; } 190 public int llListen(int channelID, string name, string ID, string msg) { NotImplemented("llListen"); return 0; }
191 public void llListenRemove(int number) { return; } 191 public void llListenControl(int number, int active) { NotImplemented("llListenControl"); return; }
192 public void llSensor(string name, string id, int type, double range, double arc) { return; } 192 public void llListenRemove(int number) { NotImplemented("llListenRemove"); return; }
193 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) { return; } 193 public void llSensor(string name, string id, int type, double range, double arc) { NotImplemented("llSensor"); return; }
194 public void llSensorRemove() { return; } 194 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) { NotImplemented("llSensorRepeat"); return; }
195 public string llDetectedName(int number) { return ""; } 195 public void llSensorRemove() { NotImplemented("llSensorRemove"); return; }
196 public string llDetectedKey(int number) { return ""; } 196 public string llDetectedName(int number) { NotImplemented("llDetectedName"); return ""; }
197 public string llDetectedOwner(int number) { return ""; } 197 public string llDetectedKey(int number) { NotImplemented("llDetectedKey"); return ""; }
198 public int llDetectedType(int number) { return 0; } 198 public string llDetectedOwner(int number) { NotImplemented("llDetectedOwner"); return ""; }
199 public LSL_Types.Vector3 llDetectedPos(int number) { return new LSL_Types.Vector3(); } 199 public int llDetectedType(int number) { NotImplemented("llDetectedType"); return 0; }
200 public LSL_Types.Vector3 llDetectedVel(int number) { return new LSL_Types.Vector3(); } 200 public LSL_Types.Vector3 llDetectedPos(int number) { NotImplemented("llDetectedPos"); return new LSL_Types.Vector3(); }
201 public LSL_Types.Vector3 llDetectedGrab(int number) { return new LSL_Types.Vector3(); } 201 public LSL_Types.Vector3 llDetectedVel(int number) { NotImplemented("llDetectedVel"); return new LSL_Types.Vector3(); }
202 public LSL_Types.Quaternion llDetectedRot(int number) { return new LSL_Types.Quaternion(); } 202 public LSL_Types.Vector3 llDetectedGrab(int number) { NotImplemented("llDetectedGrab"); return new LSL_Types.Vector3(); }
203 public int llDetectedGroup(int number) { return 0; } 203 public LSL_Types.Quaternion llDetectedRot(int number) { NotImplemented("llDetectedRot"); return new LSL_Types.Quaternion(); }
204 public int llDetectedLinkNumber(int number) { return 0; } 204 public int llDetectedGroup(int number) { NotImplemented("llDetectedGroup"); return 0; }
205 public void llDie() { return; } 205 public int llDetectedLinkNumber(int number) { NotImplemented("llDetectedLinkNumber"); return 0; }
206 public double llGround(LSL_Types.Vector3 offset) { return 0; } 206 public void llDie() { NotImplemented("llDie"); return; }
207 public double llCloud(LSL_Types.Vector3 offset) { return 0; } 207 public double llGround(LSL_Types.Vector3 offset) { NotImplemented("llGround"); return 0; }
208 public LSL_Types.Vector3 llWind(LSL_Types.Vector3 offset) { return new LSL_Types.Vector3(); } 208 public double llCloud(LSL_Types.Vector3 offset) { NotImplemented("llCloud"); return 0; }
209 public void llSetStatus(int status, int value) { return; } 209 public LSL_Types.Vector3 llWind(LSL_Types.Vector3 offset) { NotImplemented("llWind"); return new LSL_Types.Vector3(); }
210 public int llGetStatus(int status) { return 0; } 210 public void llSetStatus(int status, int value) { NotImplemented("llSetStatus"); return; }
211 211 public int llGetStatus(int status) { NotImplemented("llGetStatus"); return 0; }
212 public void llSetScale(LSL_Types.Vector3 scale) 212
213 { 213 public void llSetScale(LSL_Types.Vector3 scale)
214 // TODO: this needs to trigger a persistance save as well 214 {
215 LLVector3 tmp = m_host.Scale; 215 // TODO: this needs to trigger a persistance save as well
216 tmp.X = (float)scale.X; 216 LLVector3 tmp = m_host.Scale;
217 tmp.Y = (float)scale.Y; 217 tmp.X = (float)scale.X;
218 tmp.Z = (float)scale.Z; 218 tmp.Y = (float)scale.Y;
219 m_host.Scale = tmp; 219 tmp.Z = (float)scale.Z;
220 return; 220 m_host.Scale = tmp;
221 } 221 return;
222 public LSL_Types.Vector3 llGetScale() 222 }
223 { 223 public LSL_Types.Vector3 llGetScale()
224 return new LSL_Types.Vector3(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z); 224 {
225 } 225 return new LSL_Types.Vector3(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z);
226 226 }
227 public void llSetColor(LSL_Types.Vector3 color, int face) { return; } 227
228 public double llGetAlpha(int face) { return 0; } 228 public void llSetColor(LSL_Types.Vector3 color, int face) { NotImplemented("llSetColor"); return; }
229 public void llSetAlpha(double alpha, int face) { return; } 229 public double llGetAlpha(int face) { NotImplemented("llGetAlpha"); return 0; }
230 public LSL_Types.Vector3 llGetColor(int face) { return new LSL_Types.Vector3(); } 230 public void llSetAlpha(double alpha, int face) { NotImplemented("llSetAlpha"); return; }
231 public void llSetTexture(string texture, int face) { return; } 231 public LSL_Types.Vector3 llGetColor(int face) { NotImplemented("llGetColor"); return new LSL_Types.Vector3(); }
232 public void llScaleTexture(double u, double v, int face) { return; } 232 public void llSetTexture(string texture, int face) { NotImplemented("llSetTexture"); return; }
233 public void llOffsetTexture(double u, double v, int face) { return; } 233 public void llScaleTexture(double u, double v, int face) { NotImplemented("llScaleTexture"); return; }
234 public void llRotateTexture(double rotation, int face) { return; } 234 public void llOffsetTexture(double u, double v, int face) { NotImplemented("llOffsetTexture"); return; }
235 235 public void llRotateTexture(double rotation, int face) { NotImplemented("llRotateTexture"); return; }
236 public string llGetTexture(int face) 236
237 { 237 public string llGetTexture(int face)
238 return ""; 238 {
239 } 239 throw new NotImplementedException(cni); return "";
240 240 }
241 public void llSetPos(LSL_Types.Vector3 pos) 241
242 { 242 public void llSetPos(LSL_Types.Vector3 pos)
243 LLVector3 tmp; 243 {
244 if (m_host.ParentID != 0) 244 LLVector3 tmp;
245 { 245 if (m_host.ParentID != 0)
246 m_host.UpdateOffSet(new LLVector3((float)pos.X, (float)pos.Y, (float)pos.Z)); 246 {
247 } 247 m_host.UpdateOffSet(new LLVector3((float)pos.X, (float)pos.Y, (float)pos.Z));
248 else 248 }
249 { 249 else
250 m_host.UpdateGroupPosition(new LLVector3((float)pos.X, (float)pos.Y, (float)pos.Z)); 250 {
251 } 251 m_host.UpdateGroupPosition(new LLVector3((float)pos.X, (float)pos.Y, (float)pos.Z));
252 } 252 }
253 253 }
254 public LSL_Types.Vector3 llGetPos() 254
255 { 255 public LSL_Types.Vector3 llGetPos()
256 return new LSL_Types.Vector3(m_host.AbsolutePosition.X, 256 {
257 m_host.AbsolutePosition.Y, 257 return new LSL_Types.Vector3(m_host.AbsolutePosition.X,
258 m_host.AbsolutePosition.Z); 258 m_host.AbsolutePosition.Y,
259 } 259 m_host.AbsolutePosition.Z);
260 260 }
261 public LSL_Types.Vector3 llGetLocalPos() 261
262 { 262 public LSL_Types.Vector3 llGetLocalPos()
263 if (m_host.ParentID != 0) { 263 {
264 return new LSL_Types.Vector3(m_host.OffsetPosition.X, 264 if (m_host.ParentID != 0)
265 m_host.OffsetPosition.Y, 265 {
266 m_host.OffsetPosition.Z); 266 return new LSL_Types.Vector3(m_host.OffsetPosition.X,
267 } else { 267 m_host.OffsetPosition.Y,
268 return new LSL_Types.Vector3(m_host.AbsolutePosition.X, 268 m_host.OffsetPosition.Z);
269 m_host.AbsolutePosition.Y, 269 }
270 m_host.AbsolutePosition.Z); 270 else
271 } 271 {
272 } 272 return new LSL_Types.Vector3(m_host.AbsolutePosition.X,
273 public void llSetRot(LSL_Types.Quaternion rot) 273 m_host.AbsolutePosition.Y,
274 { 274 m_host.AbsolutePosition.Z);
275 m_host.UpdateRotation(new LLQuaternion((float)rot.X, (float)rot.Y, (float)rot.Z, (float)rot.R)); 275 }
276 } 276 }
277 public LSL_Types.Quaternion llGetRot() 277 public void llSetRot(LSL_Types.Quaternion rot)
278 { 278 {
279 LLQuaternion q = m_host.RotationOffset; 279 m_host.UpdateRotation(new LLQuaternion((float)rot.X, (float)rot.Y, (float)rot.Z, (float)rot.R));
280 return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); 280 }
281 } 281 public LSL_Types.Quaternion llGetRot()
282 public LSL_Types.Quaternion llGetLocalRot() { return new LSL_Types.Quaternion(); } 282 {
283 public void llSetForce(LSL_Types.Vector3 force, int local) { } 283 LLQuaternion q = m_host.RotationOffset;
284 public LSL_Types.Vector3 llGetForce() { return new LSL_Types.Vector3(); } 284 return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W);
285 public int llTarget(LSL_Types.Vector3 position, double range) { return 0; } 285 }
286 public void llTargetRemove(int number) { } 286 public LSL_Types.Quaternion llGetLocalRot() { NotImplemented("llGetLocalRot"); return new LSL_Types.Quaternion(); }
287 public int llRotTarget(LSL_Types.Quaternion rot, double error) { return 0; } 287 public void llSetForce(LSL_Types.Vector3 force, int local) { NotImplemented("llSetForce"); }
288 public void llRotTargetRemove(int number) { } 288 public LSL_Types.Vector3 llGetForce() { NotImplemented("llGetForce"); return new LSL_Types.Vector3(); }
289 public void llMoveToTarget(LSL_Types.Vector3 target, double tau) { } 289 public int llTarget(LSL_Types.Vector3 position, double range) { NotImplemented("llTarget"); return 0; }
290 public void llStopMoveToTarget() { } 290 public void llTargetRemove(int number) { NotImplemented("llTargetRemove"); }
291 public void llApplyImpulse(LSL_Types.Vector3 force, int local) { } 291 public int llRotTarget(LSL_Types.Quaternion rot, double error) { NotImplemented("llRotTarget"); return 0; }
292 public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) { } 292 public void llRotTargetRemove(int number) { NotImplemented("llRotTargetRemove"); }
293 public void llSetTorque(LSL_Types.Vector3 torque, int local) { } 293 public void llMoveToTarget(LSL_Types.Vector3 target, double tau) { NotImplemented("llMoveToTarget"); }
294 public LSL_Types.Vector3 llGetTorque() { return new LSL_Types.Vector3(); } 294 public void llStopMoveToTarget() { NotImplemented("llStopMoveToTarget"); }
295 public void llSetForceAndTorque(LSL_Types.Vector3 force, LSL_Types.Vector3 torque, int local) { } 295 public void llApplyImpulse(LSL_Types.Vector3 force, int local) { NotImplemented("llApplyImpulse"); }
296 public LSL_Types.Vector3 llGetVel() { return new LSL_Types.Vector3(); } 296 public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) { NotImplemented("llApplyRotationalImpulse"); }
297 public LSL_Types.Vector3 llGetAccel() { return new LSL_Types.Vector3(); } 297 public void llSetTorque(LSL_Types.Vector3 torque, int local) { NotImplemented("llSetTorque"); }
298 public LSL_Types.Vector3 llGetOmega() { return new LSL_Types.Vector3(); } 298 public LSL_Types.Vector3 llGetTorque() { NotImplemented("llGetTorque"); return new LSL_Types.Vector3(); }
299 public double llGetTimeOfDay() { return 0; } 299 public void llSetForceAndTorque(LSL_Types.Vector3 force, LSL_Types.Vector3 torque, int local) { NotImplemented("llSetForceAndTorque"); }
300 300 public LSL_Types.Vector3 llGetVel() { NotImplemented("llGetVel"); return new LSL_Types.Vector3(); }
301 public double llGetWallclock() 301 public LSL_Types.Vector3 llGetAccel() { NotImplemented("llGetAccel"); return new LSL_Types.Vector3(); }
302 { 302 public LSL_Types.Vector3 llGetOmega() { NotImplemented("llGetOmega"); return new LSL_Types.Vector3(); }
303 return DateTime.Now.TimeOfDay.TotalSeconds; 303 public double llGetTimeOfDay() { NotImplemented("llGetTimeOfDay"); return 0; }
304 } 304
305 305 public double llGetWallclock()
306 public double llGetTime() { return 0; } 306 {
307 public void llResetTime() { } 307 return DateTime.Now.TimeOfDay.TotalSeconds;
308 public double llGetAndResetTime() { return 0; } 308 }
309 public void llSound() { } 309
310 public void llPlaySound(string sound, double volume) { } 310 public double llGetTime() { NotImplemented("llGetTime"); return 0; }
311 public void llLoopSound(string sound, double volume) { } 311 public void llResetTime() { NotImplemented("llResetTime"); }
312 public void llLoopSoundMaster(string sound, double volume) { } 312 public double llGetAndResetTime() { NotImplemented("llGetAndResetTime"); return 0; }
313 public void llLoopSoundSlave(string sound, double volume) { } 313 public void llSound() { NotImplemented("llSound"); }
314 public void llPlaySoundSlave(string sound, double volume) { } 314 public void llPlaySound(string sound, double volume) { NotImplemented("llPlaySound"); }
315 public void llTriggerSound(string sound, double volume) { } 315 public void llLoopSound(string sound, double volume) { NotImplemented("llLoopSound"); }
316 public void llStopSound() { } 316 public void llLoopSoundMaster(string sound, double volume) { NotImplemented("llLoopSoundMaster"); }
317 public void llPreloadSound(string sound) { } 317 public void llLoopSoundSlave(string sound, double volume) { NotImplemented("llLoopSoundSlave"); }
318 318 public void llPlaySoundSlave(string sound, double volume) { NotImplemented("llPlaySoundSlave"); }
319 public string llGetSubString(string src, int start, int end) 319 public void llTriggerSound(string sound, double volume) { NotImplemented("llTriggerSound"); }
320 { 320 public void llStopSound() { NotImplemented("llStopSound"); }
321 return src.Substring(start, end); 321 public void llPreloadSound(string sound) { NotImplemented("llPreloadSound"); }
322 } 322
323 323 public string llGetSubString(string src, int start, int end)
324 public string llDeleteSubString(string src, int start, int end) {return "";} 324 {
325 public string llInsertString(string dst, int position, string src) { return ""; } 325 return src.Substring(start, end);
326 326 }
327 public string llToUpper(string src) 327
328 { 328 public string llDeleteSubString(string src, int start, int end) { NotImplemented("llDeleteSubString"); return ""; }
329 return src.ToUpper(); 329 public string llInsertString(string dst, int position, string src) { NotImplemented("llInsertString"); return ""; }
330 } 330
331 331 public string llToUpper(string src)
332 public string llToLower(string src) 332 {
333 { 333 return src.ToUpper();
334 return src.ToLower(); 334 }
335 } 335
336 336 public string llToLower(string src)
337 public int llGiveMoney(string destination, int amount) { return 0; } 337 {
338 public void llMakeExplosion() { } 338 return src.ToLower();
339 public void llMakeFountain() { } 339 }
340 public void llMakeSmoke() { } 340
341 public void llMakeFire() { } 341 public int llGiveMoney(string destination, int amount) { NotImplemented("llGiveMoney"); return 0; }
342 public void llRezObject(string inventory, LSL_Types.Vector3 pos, LSL_Types.Quaternion rot, int param) { } 342 public void llMakeExplosion() { NotImplemented("llMakeExplosion"); }
343 public void llLookAt(LSL_Types.Vector3 target, double strength, double damping) { } 343 public void llMakeFountain() { NotImplemented("llMakeFountain"); }
344 public void llStopLookAt() { } 344 public void llMakeSmoke() { NotImplemented("llMakeSmoke"); }
345 345 public void llMakeFire() { NotImplemented("llMakeFire"); }
346 public void llSetTimerEvent(double sec) 346 public void llRezObject(string inventory, LSL_Types.Vector3 pos, LSL_Types.Quaternion rot, int param) { NotImplemented("llRezObject"); }
347 { 347 public void llLookAt(LSL_Types.Vector3 target, double strength, double damping) { NotImplemented("llLookAt"); }
348 // Setting timer repeat 348 public void llStopLookAt() { NotImplemented("llStopLookAt"); }
349 m_ScriptEngine.m_LSLLongCmdHandler.SetTimerEvent(m_localID, m_itemID, sec); 349
350 } 350 public void llSetTimerEvent(double sec)
351 351 {
352 public void llSleep(double sec) 352 // Setting timer repeat
353 { 353 m_ScriptEngine.m_LSLLongCmdHandler.SetTimerEvent(m_localID, m_itemID, sec);
354 System.Threading.Thread.Sleep((int)(sec * 1000)); 354 }
355 } 355
356 356 public void llSleep(double sec)
357 public double llGetMass() { return 0; } 357 {
358 public void llCollisionFilter(string name, string id, int accept) { } 358 System.Threading.Thread.Sleep((int)(sec * 1000));
359 public void llTakeControls(int controls, int accept, int pass_on) { } 359 }
360 public void llReleaseControls() { } 360
361 public void llAttachToAvatar(int attachment) { } 361 public double llGetMass() { NotImplemented("llGetMass"); return 0; }
362 public void llDetachFromAvatar() { } 362 public void llCollisionFilter(string name, string id, int accept) { NotImplemented("llCollisionFilter"); }
363 public void llTakeCamera() { } 363 public void llTakeControls(int controls, int accept, int pass_on) { NotImplemented("llTakeControls"); }
364 public void llReleaseCamera() { } 364 public void llReleaseControls() { NotImplemented("llReleaseControls"); }
365 365 public void llAttachToAvatar(int attachment) { NotImplemented("llAttachToAvatar"); }
366 public string llGetOwner() 366 public void llDetachFromAvatar() { NotImplemented("llDetachFromAvatar"); }
367 { 367 public void llTakeCamera() { NotImplemented("llTakeCamera"); }
368 return m_host.ObjectOwner.ToStringHyphenated(); 368 public void llReleaseCamera() { NotImplemented("llReleaseCamera"); }
369 } 369
370 370 public string llGetOwner()
371 public void llInstantMessage(string user, string message) { } 371 {
372 public void llEmail(string address, string subject, string message) { } 372 return m_host.ObjectOwner.ToStringHyphenated();
373 public void llGetNextEmail(string address, string subject) { } 373 }
374 374
375 public string llGetKey() 375 public void llInstantMessage(string user, string message) { NotImplemented("llInstantMessage"); }
376 { 376 public void llEmail(string address, string subject, string message) { NotImplemented("llEmail"); }
377 return m_host.UUID.ToStringHyphenated(); 377 public void llGetNextEmail(string address, string subject) { NotImplemented("llGetNextEmail"); }
378 } 378
379 379 public string llGetKey()
380 public void llSetBuoyancy(double buoyancy) { } 380 {
381 public void llSetHoverHeight(double height, int water, double tau) { } 381 return m_host.UUID.ToStringHyphenated();
382 public void llStopHover() { } 382 }
383 public void llMinEventDelay(double delay) { } 383
384 public void llSoundPreload() { } 384 public void llSetBuoyancy(double buoyancy) { NotImplemented("llSetBuoyancy"); }
385 public void llRotLookAt(LSL_Types.Quaternion target, double strength, double damping) { } 385 public void llSetHoverHeight(double height, int water, double tau) { NotImplemented("llSetHoverHeight"); }
386 386 public void llStopHover() { NotImplemented("llStopHover"); }
387 public int llStringLength(string str) 387 public void llMinEventDelay(double delay) { NotImplemented("llMinEventDelay"); }
388 { 388 public void llSoundPreload() { NotImplemented("llSoundPreload"); }
389 if (str.Length > 0) 389 public void llRotLookAt(LSL_Types.Quaternion target, double strength, double damping) { NotImplemented("llRotLookAt"); }
390 { 390
391 return str.Length; 391 public int llStringLength(string str)
392 } 392 {
393 else 393 if (str.Length > 0)
394 { 394 {
395 return 0; 395 return str.Length;
396 } 396 }
397 } 397 else
398 398 {
399 public void llStartAnimation(string anim) { } 399 return 0;
400 public void llStopAnimation(string anim) { } 400 }
401 public void llPointAt() { } 401 }
402 public void llStopPointAt() { } 402
403 public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain) { } 403 public void llStartAnimation(string anim) { NotImplemented("llStartAnimation"); }
404 public int llGetStartParameter() { return 0; } 404 public void llStopAnimation(string anim) { NotImplemented("llStopAnimation"); }
405 public void llGodLikeRezObject(string inventory, LSL_Types.Vector3 pos) { } 405 public void llPointAt() { NotImplemented("llPointAt"); }
406 public void llRequestPermissions(string agent, int perm) { } 406 public void llStopPointAt() { NotImplemented("llStopPointAt"); }
407 public string llGetPermissionsKey() { return ""; } 407 public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain) { NotImplemented("llTargetOmega"); }
408 public int llGetPermissions() { return 0; } 408 public int llGetStartParameter() { NotImplemented("llGetStartParameter"); return 0; }
409 public int llGetLinkNumber() { return 0; } 409 public void llGodLikeRezObject(string inventory, LSL_Types.Vector3 pos) { NotImplemented("llGodLikeRezObject"); }
410 public void llSetLinkColor(int linknumber, LSL_Types.Vector3 color, int face) { } 410 public void llRequestPermissions(string agent, int perm) { NotImplemented("llRequestPermissions"); }
411 public void llCreateLink(string target, int parent) { } 411 public string llGetPermissionsKey() { NotImplemented("llGetPermissionsKey"); return ""; }
412 public void llBreakLink(int linknum) { } 412 public int llGetPermissions() { NotImplemented("llGetPermissions"); return 0; }
413 public void llBreakAllLinks() { } 413 public int llGetLinkNumber() { NotImplemented("llGetLinkNumber"); return 0; }
414 public string llGetLinkKey(int linknum) { return ""; } 414 public void llSetLinkColor(int linknumber, LSL_Types.Vector3 color, int face) { NotImplemented("llSetLinkColor"); }
415 public void llGetLinkName(int linknum) { } 415 public void llCreateLink(string target, int parent) { NotImplemented("llCreateLink"); }
416 public int llGetInventoryNumber(int type) { return 0; } 416 public void llBreakLink(int linknum) { NotImplemented("llBreakLink"); }
417 public string llGetInventoryName(int type, int number) { return ""; } 417 public void llBreakAllLinks() { NotImplemented("llBreakAllLinks"); }
418 public void llSetScriptState(string name, int run) { } 418 public string llGetLinkKey(int linknum) { NotImplemented("llGetLinkKey"); return ""; }
419 public double llGetEnergy() { return 1.0f; } 419 public void llGetLinkName(int linknum) { NotImplemented("llGetLinkName"); }
420 public void llGiveInventory(string destination, string inventory) { } 420 public int llGetInventoryNumber(int type) { NotImplemented("llGetInventoryNumber"); return 0; }
421 public void llRemoveInventory(string item) { } 421 public string llGetInventoryName(int type, int number) { NotImplemented("llGetInventoryName"); return ""; }
422 422 public void llSetScriptState(string name, int run) { NotImplemented("llSetScriptState"); }
423 public void llSetText(string text, LSL_Types.Vector3 color, double alpha) 423 public double llGetEnergy() { return 1.0f; }
424 { 424 public void llGiveInventory(string destination, string inventory) { NotImplemented("llGiveInventory"); }
425 // TEMP DISABLED UNTIL WE CAN AGREE UPON VECTOR/ROTATION FORMAT 425 public void llRemoveInventory(string item) { NotImplemented("llRemoveInventory"); }
426 //m_host.SetText(text, color, alpha); 426
427 } 427 public void llSetText(string text, LSL_Types.Vector3 color, double alpha) { NotImplemented("llSetText"); }
428 428
429 public double llWater(LSL_Types.Vector3 offset) { return 0; } 429 public double llWater(LSL_Types.Vector3 offset) { NotImplemented("llWater"); return 0; }
430 public void llPassTouches(int pass) { } 430 public void llPassTouches(int pass) { NotImplemented("llPassTouches"); }
431 public string llRequestAgentData(string id, int data) { return ""; } 431 public string llRequestAgentData(string id, int data) { NotImplemented("llRequestAgentData"); return ""; }
432 public string llRequestInventoryData(string name) { return ""; } 432 public string llRequestInventoryData(string name) { NotImplemented("llRequestInventoryData"); return ""; }
433 public void llSetDamage(double damage) { } 433 public void llSetDamage(double damage) { NotImplemented("llSetDamage"); }
434 public void llTeleportAgentHome(string agent) { } 434 public void llTeleportAgentHome(string agent) { NotImplemented("llTeleportAgentHome"); }
435 public void llModifyLand(int action, int brush) { } 435 public void llModifyLand(int action, int brush) { }
436 public void llCollisionSound(string impact_sound, double impact_volume) { } 436 public void llCollisionSound(string impact_sound, double impact_volume) { NotImplemented("llCollisionSound"); }
437 public void llCollisionSprite(string impact_sprite) { } 437 public void llCollisionSprite(string impact_sprite) { NotImplemented("llCollisionSprite"); }
438 public string llGetAnimation(string id) { return ""; } 438 public string llGetAnimation(string id) { NotImplemented("llGetAnimation"); return ""; }
439 public void llResetScript() { } 439 public void llResetScript() { }
440 public void llMessageLinked(int linknum, int num, string str, string id) { } 440 public void llMessageLinked(int linknum, int num, string str, string id) { }
441 public void llPushObject(string target, LSL_Types.Vector3 impulse, LSL_Types.Vector3 ang_impulse, int local) { } 441 public void llPushObject(string target, LSL_Types.Vector3 impulse, LSL_Types.Vector3 ang_impulse, int local) { }
442 public void llPassCollisions(int pass) { } 442 public void llPassCollisions(int pass) { }
443 public string llGetScriptName() { return ""; } 443 public string llGetScriptName() { return ""; }
444 444
445 public int llGetNumberOfSides() { return 0; } 445 public int llGetNumberOfSides() { return 0; }
446 446
447 public LSL_Types.Quaternion llAxisAngle2Rot(LSL_Types.Vector3 axis, double angle) { return new LSL_Types.Quaternion(); } 447 public LSL_Types.Quaternion llAxisAngle2Rot(LSL_Types.Vector3 axis, double angle) { return new LSL_Types.Quaternion(); }
448 public LSL_Types.Vector3 llRot2Axis(LSL_Types.Quaternion rot) { return new LSL_Types.Vector3(); } 448 public LSL_Types.Vector3 llRot2Axis(LSL_Types.Quaternion rot) { return new LSL_Types.Vector3(); }
449 public void llRot2Angle() { } 449 public void llRot2Angle() { }
450 450
451 public double llAcos(double val) 451 public double llAcos(double val)
452 { 452 {
453 return (double)Math.Acos(val); 453 return (double)Math.Acos(val);
454 } 454 }
455 455
456 public double llAsin(double val) 456 public double llAsin(double val)
457 { 457 {
458 return (double)Math.Asin(val); 458 return (double)Math.Asin(val);
459 } 459 }
460 460
461 public double llAngleBetween(LSL_Types.Quaternion a, LSL_Types.Quaternion b) { return 0; } 461 public double llAngleBetween(LSL_Types.Quaternion a, LSL_Types.Quaternion b) { return 0; }
462 public string llGetInventoryKey(string name) { return ""; } 462 public string llGetInventoryKey(string name) { return ""; }
463 public void llAllowInventoryDrop(int add) { } 463 public void llAllowInventoryDrop(int add) { }
464 public LSL_Types.Vector3 llGetSunDirection() { return new LSL_Types.Vector3(); } 464 public LSL_Types.Vector3 llGetSunDirection() { return new LSL_Types.Vector3(); }
465 public LSL_Types.Vector3 llGetTextureOffset(int face) { return new LSL_Types.Vector3(); } 465 public LSL_Types.Vector3 llGetTextureOffset(int face) { return new LSL_Types.Vector3(); }
466 public LSL_Types.Vector3 llGetTextureScale(int side) { return new LSL_Types.Vector3(); } 466 public LSL_Types.Vector3 llGetTextureScale(int side) { return new LSL_Types.Vector3(); }
467 public double llGetTextureRot(int side) { return 0; } 467 public double llGetTextureRot(int side) { return 0; }
468 468
469 public int llSubStringIndex(string source, string pattern) 469 public int llSubStringIndex(string source, string pattern)
470 { 470 {
471 return source.IndexOf(pattern); 471 return source.IndexOf(pattern);
472 } 472 }
473 473
474 public string llGetOwnerKey(string id) 474 public string llGetOwnerKey(string id) { NotImplemented("llGetOwnerKey"); return ""; }
475 { 475
476 return ""; 476 public LSL_Types.Vector3 llGetCenterOfMass() { NotImplemented("llGetCenterOfMass"); return new LSL_Types.Vector3(); }
477 } 477
478 478 public List<string> llListSort(List<string> src, int stride, int ascending) { NotImplemented("llListSort"); return new List<string>(); ; }
479 public LSL_Types.Vector3 llGetCenterOfMass() { return new LSL_Types.Vector3(); } 479
480 480 public int llGetListLength(List<string> src)
481 public List<string> llListSort(List<string> src, int stride, int ascending) 481 {
482 { 482 return src.Count;
483 //List<string> nlist = src.Sort(); 483 }
484 484
485 //if (ascending == 0) 485 public int llList2Integer(List<string> src, int index)
486 //{ 486 {
487 //nlist.Reverse(); 487 return Convert.ToInt32(src[index]);
488 //} 488 }
489 489
490 //return nlist; 490 public double llList2double(List<string> src, int index)
491 return new List<string>(); ; 491 {
492 } 492 return Convert.ToDouble(src[index]);
493 493 }
494 public int llGetListLength(List<string> src) 494
495 { 495 public float llList2Float(List<string> src, int index)
496 return src.Count; 496 {
497 } 497 return Convert.ToSingle(src[index]);
498 498 }
499 public int llList2Integer(List<string> src, int index) 499
500 { 500 public string llList2String(List<string> src, int index)
501 return Convert.ToInt32(src[index]); 501 {
502 } 502 return src[index];
503 503 }
504 public double llList2double(List<string> src, int index) 504
505 { 505 public string llList2Key(List<string> src, int index)
506 return Convert.ToDouble(src[index]); 506 {
507 } 507 //return OpenSim.Framework.Types.ToStringHyphenated(src[index]);
508 508 return "";
509 public float llList2Float(List<string> src, int index) 509 }
510 { 510
511 return Convert.ToSingle(src[index]); 511 public LSL_Types.Vector3 llList2Vector(List<string> src, int index) { NotImplemented("llList2Vector"); return new LSL_Types.Vector3(); }
512 } 512 public LSL_Types.Quaternion llList2Rot(List<string> src, int index) { NotImplemented("llList2Rot"); return new LSL_Types.Quaternion(); }
513 513 public List<string> llList2List(List<string> src, int start, int end) { NotImplemented("llList2List"); return new List<string>(); }
514 public string llList2String(List<string> src, int index) 514 public List<string> llDeleteSubList(List<string> src, int start, int end) { NotImplemented("llDeleteSubList"); return new List<string>(); }
515 { 515 public int llGetListEntryType(List<string> src, int index) { NotImplemented("llGetListEntryType"); return 0; }
516 return src[index]; 516 public string llList2CSV(List<string> src) { NotImplemented("llList2CSV"); return ""; }
517 } 517 public List<string> llCSV2List(string src) { NotImplemented("llCSV2List"); return new List<string>(); }
518 518 public List<string> llListRandomize(List<string> src, int stride) { NotImplemented("llListRandomize"); return new List<string>(); }
519 public string llList2Key(List<string> src, int index) 519 public List<string> llList2ListStrided(List<string> src, int start, int end, int stride) { NotImplemented("llList2ListStrided"); return new List<string>(); }
520 { 520
521 //return OpenSim.Framework.Types.ToStringHyphenated(src[index]); 521 public LSL_Types.Vector3 llGetRegionCorner()
522 return ""; 522 {
523 } 523 return new LSL_Types.Vector3(World.RegionInfo.RegionLocX * 256, World.RegionInfo.RegionLocY * 256, 0);
524 524 }
525 public LSL_Types.Vector3 llList2Vector(List<string> src, int index) 525
526 { return new LSL_Types.Vector3(); } 526 public List<string> llListInsertList(List<string> dest, List<string> src, int start) { NotImplemented("llListInsertList"); return new List<string>(); }
527 public LSL_Types.Quaternion llList2Rot(List<string> src, int index) 527 public int llListFindList(List<string> src, List<string> test) { return 0; }
528 { return new LSL_Types.Quaternion(); } 528
529 public List<string> llList2List(List<string> src, int start, int end) 529 public string llGetObjectName()
530 { return new List<string>(); } 530 {
531 public List<string> llDeleteSubList(List<string> src, int start, int end) 531 return m_host.Name;
532 { return new List<string>(); } 532 }
533 public int llGetListEntryType(List<string> src, int index) { return 0; } 533
534 public string llList2CSV(List<string> src) { return ""; } 534 public void llSetObjectName(string name)
535 public List<string> llCSV2List(string src) 535 {
536 { return new List<string>(); } 536 m_host.Name = name;
537 public List<string> llListRandomize(List<string> src, int stride) 537 }
538 { return new List<string>(); } 538
539 public List<string> llList2ListStrided(List<string> src, int start, int end, int stride) 539 public string llGetDate()
540 { return new List<string>(); } 540 {
541 541 DateTime date = DateTime.Now.ToUniversalTime();
542 public LSL_Types.Vector3 llGetRegionCorner() 542 string result = date.ToString("yyyy-MM-dd");
543 { 543 return result;
544 return new LSL_Types.Vector3(World.RegionInfo.RegionLocX * 256, World.RegionInfo.RegionLocY * 256, 0); 544 }
545 } 545
546 546 public int llEdgeOfWorld(LSL_Types.Vector3 pos, LSL_Types.Vector3 dir) { NotImplemented("llEdgeOfWorld"); return 0; }
547 public List<string> llListInsertList(List<string> dest, List<string> src, int start) 547 public int llGetAgentInfo(string id) { NotImplemented("llGetAgentInfo"); return 0; }
548 { return new List<string>(); } 548 public void llAdjustSoundVolume(double volume) { NotImplemented("llAdjustSoundVolume"); }
549 public int llListFindList(List<string> src, List<string> test) { return 0; } 549 public void llSetSoundQueueing(int queue) { NotImplemented("llSetSoundQueueing"); }
550 550 public void llSetSoundRadius(double radius) { NotImplemented("llSetSoundRadius"); }
551 public string llGetObjectName() 551 public string llKey2Name(string id) { NotImplemented("llKey2Name"); return ""; }
552 { 552 public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) { NotImplemented("llSetTextureAnim"); }
553 return m_host.Name; 553 public void llTriggerSoundLimited(string sound, double volume, LSL_Types.Vector3 top_north_east, LSL_Types.Vector3 bottom_south_west) { NotImplemented("llTriggerSoundLimited"); }
554 } 554 public void llEjectFromLand(string pest) { NotImplemented("llEjectFromLand"); }
555 555
556 public void llSetObjectName(string name) 556 public void llParseString2List() { NotImplemented("llParseString2List"); }
557 { 557
558 m_host.Name = name; 558 public int llOverMyLand(string id) { NotImplemented("llOverMyLand"); return 0; }
559 } 559 public string llGetLandOwnerAt(LSL_Types.Vector3 pos) { NotImplemented("llGetLandOwnerAt"); return ""; }
560 560 public string llGetNotecardLine(string name, int line) { NotImplemented("llGetNotecardLine"); return ""; }
561 public string llGetDate() 561 public LSL_Types.Vector3 llGetAgentSize(string id) { NotImplemented("llGetAgentSize"); return new LSL_Types.Vector3(); }
562 { 562 public int llSameGroup(string agent) { NotImplemented("llSameGroup"); return 0; }
563 DateTime date = DateTime.Now.ToUniversalTime(); 563 public void llUnSit(string id) { NotImplemented("llUnSit"); }
564 string result = date.ToString("yyyy-MM-dd"); 564 public LSL_Types.Vector3 llGroundSlope(LSL_Types.Vector3 offset) { NotImplemented("llGroundSlope"); return new LSL_Types.Vector3(); }
565 return result; 565 public LSL_Types.Vector3 llGroundNormal(LSL_Types.Vector3 offset) { NotImplemented("llGroundNormal"); return new LSL_Types.Vector3(); }
566 } 566 public LSL_Types.Vector3 llGroundContour(LSL_Types.Vector3 offset) { NotImplemented("llGroundContour"); return new LSL_Types.Vector3(); }
567 567 public int llGetAttached() { NotImplemented("llGetAttached"); return 0; }
568 public int llEdgeOfWorld(LSL_Types.Vector3 pos, LSL_Types.Vector3 dir) { return 0; } 568 public int llGetFreeMemory() { NotImplemented("llGetFreeMemory"); return 0; }
569 public int llGetAgentInfo(string id) { return 0; } 569
570 public void llAdjustSoundVolume(double volume) { } 570 public string llGetRegionName()
571 public void llSetSoundQueueing(int queue) { } 571 {
572 public void llSetSoundRadius(double radius) { } 572 return World.RegionInfo.RegionName;
573 public string llKey2Name(string id) { return ""; } 573 }
574 public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) { } 574
575 public void llTriggerSoundLimited(string sound, double volume, LSL_Types.Vector3 top_north_east, LSL_Types.Vector3 bottom_south_west) { } 575 public double llGetRegionTimeDilation() { return 1.0f; }
576 public void llEjectFromLand(string pest) { } 576 public double llGetRegionFPS() { return 10.0f; }
577 577 public void llParticleSystem(List<Object> rules) { NotImplemented("llParticleSystem"); }
578 public void llParseString2List() { } 578 public void llGroundRepel(double height, int water, double tau) { NotImplemented("llGroundRepel"); }
579 579 public void llGiveInventoryList() { NotImplemented("llGiveInventoryList"); }
580 public int llOverMyLand(string id) { return 0; } 580 public void llSetVehicleType(int type) { NotImplemented("llSetVehicleType"); }
581 public string llGetLandOwnerAt(LSL_Types.Vector3 pos) { return ""; } 581 public void llSetVehicledoubleParam(int param, double value) { NotImplemented("llSetVehicledoubleParam"); }
582 public string llGetNotecardLine(string name, int line) { return ""; } 582 public void llSetVehicleVectorParam(int param, LSL_Types.Vector3 vec) { NotImplemented("llSetVehicleVectorParam"); }
583 public LSL_Types.Vector3 llGetAgentSize(string id) { return new LSL_Types.Vector3(); } 583 public void llSetVehicleRotationParam(int param, LSL_Types.Quaternion rot) { NotImplemented("llSetVehicleRotationParam"); }
584 public int llSameGroup(string agent) { return 0; } 584 public void llSetVehicleFlags(int flags) { NotImplemented("llSetVehicleFlags"); }
585 public void llUnSit(string id) { } 585 public void llRemoveVehicleFlags(int flags) { NotImplemented("llRemoveVehicleFlags"); }
586 public LSL_Types.Vector3 llGroundSlope(LSL_Types.Vector3 offset) { return new LSL_Types.Vector3(); } 586 public void llSitTarget(LSL_Types.Vector3 offset, LSL_Types.Quaternion rot) { NotImplemented("llSitTarget"); }
587 public LSL_Types.Vector3 llGroundNormal(LSL_Types.Vector3 offset) { return new LSL_Types.Vector3(); } 587 public string llAvatarOnSitTarget() { NotImplemented("llAvatarOnSitTarget"); return ""; }
588 public LSL_Types.Vector3 llGroundContour(LSL_Types.Vector3 offset) { return new LSL_Types.Vector3(); } 588 public void llAddToLandPassList(string avatar, double hours) { NotImplemented("llAddToLandPassList"); }
589 public int llGetAttached() { return 0; } 589
590 public int llGetFreeMemory() { return 0; } 590 public void llSetTouchText(string text)
591 591 {
592 public string llGetRegionName() 592 m_host.TouchName = text;
593 { 593 }
594 return World.RegionInfo.RegionName; 594
595 } 595 public void llSetSitText(string text)
596 596 {
597 public double llGetRegionTimeDilation() { return 1.0f; } 597 m_host.SitName = text;
598 public double llGetRegionFPS() { return 10.0f; } 598 }
599 public void llParticleSystem(List<Object> rules) { } 599
600 public void llGroundRepel(double height, int water, double tau) { } 600 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) { NotImplemented("llSetCameraEyeOffset"); }
601 public void llGiveInventoryList() { } 601 public void llSetCameraAtOffset(LSL_Types.Vector3 offset) { NotImplemented("llSetCameraAtOffset"); }
602 public void llSetVehicleType(int type) { } 602 public void llDumpList2String() { NotImplemented("llDumpList2String"); }
603 public void llSetVehicledoubleParam(int param, double value) { } 603 public void llScriptDanger(LSL_Types.Vector3 pos) { NotImplemented("llScriptDanger"); }
604 public void llSetVehicleVectorParam(int param, LSL_Types.Vector3 vec) { } 604 public void llDialog(string avatar, string message, List<string> buttons, int chat_channel) { NotImplemented("llDialog"); }
605 public void llSetVehicleRotationParam(int param, LSL_Types.Quaternion rot) { } 605 public void llVolumeDetect(int detect) { NotImplemented("llVolumeDetect"); }
606 public void llSetVehicleFlags(int flags) { } 606 public void llResetOtherScript(string name) { NotImplemented("llResetOtherScript"); }
607 public void llRemoveVehicleFlags(int flags) { } 607
608 public void llSitTarget(LSL_Types.Vector3 offset, LSL_Types.Quaternion rot) { } 608 public int llGetScriptState(string name) { NotImplemented("llGetScriptState"); return 0; }
609 public string llAvatarOnSitTarget() { return ""; } 609
610 public void llAddToLandPassList(string avatar, double hours) { } 610 public void llRemoteLoadScript() { NotImplemented("llRemoteLoadScript"); }
611 611 public void llSetRemoteScriptAccessPin(int pin) { NotImplemented("llSetRemoteScriptAccessPin"); }
612 public void llSetTouchText(string text) 612 public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) { NotImplemented("llRemoteLoadScriptPin"); }
613 { 613 public void llOpenRemoteDataChannel() { NotImplemented("llOpenRemoteDataChannel"); }
614 m_host.TouchName = text; 614 public string llSendRemoteData(string channel, string dest, int idata, string sdata) { NotImplemented("llSendRemoteData"); return ""; }
615 } 615 public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) { NotImplemented("llRemoteDataReply"); }
616 616 public void llCloseRemoteDataChannel(string channel) { NotImplemented("llCloseRemoteDataChannel"); }
617 public void llSetSitText(string text) 617
618 { 618 public string llMD5String(string src, int nonce)
619 m_host.SitName = text; 619 {
620 } 620 return Util.Md5Hash(src + ":" + nonce.ToString());
621 621 }
622 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) { } 622
623 public void llSetCameraAtOffset(LSL_Types.Vector3 offset) { } 623 public void llSetPrimitiveParams(List<string> rules) { NotImplemented("llSetPrimitiveParams"); }
624 public void llDumpList2String() { } 624 public string llStringToBase64(string str) { NotImplemented("llStringToBase64"); return ""; }
625 public void llScriptDanger(LSL_Types.Vector3 pos) { } 625 public string llBase64ToString(string str) { NotImplemented("llBase64ToString"); return ""; }
626 public void llDialog(string avatar, string message, List<string> buttons, int chat_channel) { } 626 public void llXorBase64Strings() { NotImplemented("llXorBase64Strings"); }
627 public void llVolumeDetect(int detect) { } 627 public void llRemoteDataSetRegion() { NotImplemented("llRemoteDataSetRegion"); }
628 public void llResetOtherScript(string name) { } 628 public double llLog10(double val) { return (double)Math.Log10(val); }
629 629 public double llLog(double val) { return (double)Math.Log(val); }
630 public int llGetScriptState(string name) 630 public List<string> llGetAnimationList(string id) { NotImplemented("llGetAnimationList"); return new List<string>(); }
631 { 631 public void llSetParcelMusicURL(string url) { NotImplemented("llSetParcelMusicURL"); }
632 return 0; 632
633 } 633 public LSL_Types.Vector3 llGetRootPosition() { NotImplemented("llGetRootPosition"); return new LSL_Types.Vector3(); }
634 634
635 public void llRemoteLoadScript() { } 635 public LSL_Types.Quaternion llGetRootRotation() { NotImplemented("llGetRootRotation"); return new LSL_Types.Quaternion(); }
636 public void llSetRemoteScriptAccessPin(int pin) { } 636
637 public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) { } 637 public string llGetObjectDesc()
638 public void llOpenRemoteDataChannel() { } 638 {
639 public string llSendRemoteData(string channel, string dest, int idata, string sdata) { return ""; } 639 return m_host.Description;
640 public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) { } 640 }
641 public void llCloseRemoteDataChannel(string channel) { } 641
642 642 public void llSetObjectDesc(string desc)
643 public string llMD5String(string src, int nonce) 643 {
644 { 644 m_host.Description = desc;
645 return Util.Md5Hash(src + ":" + nonce.ToString()); 645 }
646 } 646
647 647 public string llGetCreator()
648 public void llSetPrimitiveParams(List<string> rules) { } 648 {
649 public string llStringToBase64(string str) { return ""; } 649 return m_host.ObjectCreator.ToStringHyphenated();
650 public string llBase64ToString(string str) { return ""; } 650 }
651 public void llXorBase64Strings() { } 651
652 public void llRemoteDataSetRegion() { } 652 public string llGetTimestamp() { NotImplemented("llGetTimestamp"); return ""; }
653 public double llLog10(double val) { return (double)Math.Log10(val); } 653 public void llSetLinkAlpha(int linknumber, double alpha, int face) { NotImplemented("llSetLinkAlpha"); }
654 public double llLog(double val) { return (double)Math.Log(val); } 654 public int llGetNumberOfPrims() { NotImplemented("llGetNumberOfPrims"); return 0; }
655 public List<string> llGetAnimationList(string id) { return new List<string>(); } 655 public string llGetNumberOfNotecardLines(string name) { NotImplemented("llGetNumberOfNotecardLines"); return ""; }
656 public void llSetParcelMusicURL(string url) { } 656 public List<string> llGetBoundingBox(string obj) { NotImplemented("llGetBoundingBox"); return new List<string>(); }
657 657 public LSL_Types.Vector3 llGetGeometricCenter() { NotImplemented("llGetGeometricCenter"); return new LSL_Types.Vector3(); }
658 public LSL_Types.Vector3 llGetRootPosition() 658 public void llGetPrimitiveParams() { NotImplemented("llGetPrimitiveParams"); }
659 { 659 public string llIntegerToBase64(int number) { NotImplemented("llIntegerToBase64"); return ""; }
660 throw new NotImplementedException("llGetRootPosition"); 660 public int llBase64ToInteger(string str) { NotImplemented("llBase64ToInteger"); return 0; }
661 //return m_root.AbsolutePosition; 661
662 } 662 public double llGetGMTclock()
663 663 {
664 public LSL_Types.Quaternion llGetRootRotation() 664 return DateTime.UtcNow.TimeOfDay.TotalSeconds;
665 { 665 }
666 return new LSL_Types.Quaternion(); 666
667 } 667 public string llGetSimulatorHostname()
668 668 {
669 public string llGetObjectDesc() 669 return System.Environment.MachineName;
670 { 670 }
671 return m_host.Description; 671
672 } 672 public void llSetLocalRot(LSL_Types.Quaternion rot) { NotImplemented("llSetLocalRot"); }
673 673 public List<string> llParseStringKeepNulls(string src, List<string> seperators, List<string> spacers) { NotImplemented("llParseStringKeepNulls"); return new List<string>(); }
674 public void llSetObjectDesc(string desc) 674 public void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, LSL_Types.Quaternion rot, int param) { NotImplemented("llRezAtRoot"); }
675 { 675
676 m_host.Description = desc; 676 public int llGetObjectPermMask(int mask) { NotImplemented("llGetObjectPermMask"); return 0; }
677 } 677
678 678 public void llSetObjectPermMask(int mask, int value) { NotImplemented("llSetObjectPermMask"); }
679 public string llGetCreator() 679
680 { 680 public void llGetInventoryPermMask(string item, int mask) { NotImplemented("llGetInventoryPermMask"); }
681 return m_host.ObjectCreator.ToStringHyphenated(); 681 public void llSetInventoryPermMask(string item, int mask, int value) { NotImplemented("llSetInventoryPermMask"); }
682 } 682 public string llGetInventoryCreator(string item) { NotImplemented("llGetInventoryCreator"); return ""; }
683 683 public void llOwnerSay(string msg) { NotImplemented("llOwnerSay"); }
684 public string llGetTimestamp() { return ""; } 684 public void llRequestSimulatorData(string simulator, int data) { NotImplemented("llRequestSimulatorData"); }
685 public void llSetLinkAlpha(int linknumber, double alpha, int face) { } 685 public void llForceMouselook(int mouselook) { NotImplemented("llForceMouselook"); }
686 public int llGetNumberOfPrims() { return 0; } 686 public double llGetObjectMass(string id) { NotImplemented("llGetObjectMass"); return 0; }
687 public string llGetNumberOfNotecardLines(string name) { return ""; } 687 public void llListReplaceList() { NotImplemented("llListReplaceList"); }
688 public List<string> llGetBoundingBox(string obj) { return new List<string>(); } 688
689 public LSL_Types.Vector3 llGetGeometricCenter() { return new LSL_Types.Vector3(); } 689 public void llLoadURL(string avatar_id, string message, string url)
690 public void llGetPrimitiveParams() { } 690 {
691 public string llIntegerToBase64(int number) { return ""; } 691 LLUUID avatarId = new LLUUID(avatar_id);
692 public int llBase64ToInteger(string str) { return 0; } 692 m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, url);
693 693 }
694 public double llGetGMTclock() 694
695 { 695 public void llParcelMediaCommandList(List<string> commandList) { NotImplemented("llParcelMediaCommandList"); }
696 return DateTime.UtcNow.TimeOfDay.TotalSeconds; 696 public void llParcelMediaQuery() { NotImplemented("llParcelMediaQuery"); }
697 } 697
698 698 public int llModPow(int a, int b, int c)
699 public string llGetSimulatorHostname() 699 {
700 { 700 Int64 tmp = 0;
701 return System.Environment.MachineName; 701 Int64 val = Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp);
702 } 702 return Convert.ToInt32(tmp);
703 703 }
704 public void llSetLocalRot(LSL_Types.Quaternion rot) { } 704
705 public List<string> llParseStringKeepNulls(string src, List<string> seperators, List<string> spacers) 705 public int llGetInventoryType(string name) { NotImplemented("llGetInventoryType"); return 0; }
706 { return new List<string>(); } 706
707 public void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, LSL_Types.Quaternion rot, int param) { } 707 public void llSetPayPrice(int price, List<string> quick_pay_buttons) { NotImplemented("llSetPayPrice"); }
708 708 public LSL_Types.Vector3 llGetCameraPos() { NotImplemented("llGetCameraPos"); return new LSL_Types.Vector3(); }
709 public int llGetObjectPermMask(int mask) { return 0; } 709 public LSL_Types.Quaternion llGetCameraRot() { NotImplemented("llGetCameraRot"); return new LSL_Types.Quaternion(); }
710 710 public void llSetPrimURL() { NotImplemented("llSetPrimURL"); }
711 public void llSetObjectPermMask(int mask, int value) { } 711 public void llRefreshPrimURL() { NotImplemented("llRefreshPrimURL"); }
712 712
713 public void llGetInventoryPermMask(string item, int mask) { } 713 public string llEscapeURL(string url)
714 public void llSetInventoryPermMask(string item, int mask, int value) { } 714 {
715 public string llGetInventoryCreator(string item) { return ""; } 715 try
716 public void llOwnerSay(string msg) { } 716 {
717 public void llRequestSimulatorData(string simulator, int data) { } 717 return Uri.EscapeUriString(url);
718 public void llForceMouselook(int mouselook) { } 718 }
719 public double llGetObjectMass(string id) { return 0; } 719 catch (Exception ex)
720 public void llListReplaceList() { } 720 {
721 721 return "llEscapeURL: " + ex.ToString();
722 public void llLoadURL(string avatar_id, string message, string url) 722 }
723 { 723 }
724 LLUUID avatarId = new LLUUID(avatar_id); 724
725 m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, url); 725 public string llUnescapeURL(string url)
726 } 726 {
727 727 try
728 public void llParcelMediaCommandList(List<string> commandList) { } 728 {
729 public void llParcelMediaQuery() { } 729 return Uri.UnescapeDataString(url);
730 730 }
731 public int llModPow(int a, int b, int c) 731 catch (Exception ex)
732 { 732 {
733 Int64 tmp = 0; 733 return "llUnescapeURL: " + ex.ToString();
734 Int64 val = Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); 734 }
735 return Convert.ToInt32(tmp); 735 }
736 } 736 public void llMapDestination(string simname, LSL_Types.Vector3 pos, LSL_Types.Vector3 look_at) { NotImplemented("llMapDestination"); }
737 737 public void llAddToLandBanList(string avatar, double hours) { NotImplemented("llAddToLandBanList"); }
738 public int llGetInventoryType(string name) { return 0; } 738 public void llRemoveFromLandPassList(string avatar) { NotImplemented("llRemoveFromLandPassList"); }
739 739 public void llRemoveFromLandBanList(string avatar) { NotImplemented("llRemoveFromLandBanList"); }
740 public void llSetPayPrice(int price, List<string> quick_pay_buttons) { } 740 public void llSetCameraParams(List<string> rules) { NotImplemented("llSetCameraParams"); }
741 public LSL_Types.Vector3 llGetCameraPos() { return new LSL_Types.Vector3(); } 741 public void llClearCameraParams() { NotImplemented("llClearCameraParams"); }
742 public LSL_Types.Quaternion llGetCameraRot() { return new LSL_Types.Quaternion(); } 742 public double llListStatistics(int operation, List<string> src) { NotImplemented("llListStatistics"); return 0; }
743 public void llSetPrimURL() { } 743
744 public void llRefreshPrimURL() { } 744 public int llGetUnixTime()
745 745 {
746 public string llEscapeURL(string url) 746 return Util.UnixTimeSinceEpoch();
747 { 747 }
748 try 748
749 { 749 public int llGetParcelFlags(LSL_Types.Vector3 pos) { NotImplemented("llGetParcelFlags"); return 0; }
750 return Uri.EscapeUriString(url); 750 public int llGetRegionFlags() { NotImplemented("llGetRegionFlags"); return 0; }
751 } 751 public string llXorBase64StringsCorrect(string str1, string str2) { NotImplemented("llXorBase64StringsCorrect"); return ""; }
752 catch (Exception ex) 752 public void llHTTPRequest() { NotImplemented("llHTTPRequest"); }
753 { 753 public void llResetLandBanList() { NotImplemented("llResetLandBanList"); }
754 return "llEscapeURL: " + ex.ToString(); 754 public void llResetLandPassList() { NotImplemented("llResetLandPassList"); }
755 } 755 public int llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide) { NotImplemented("llGetParcelPrimCount"); return 0; }
756 } 756 public List<string> llGetParcelPrimOwners(LSL_Types.Vector3 pos) { NotImplemented("llGetParcelPrimOwners"); return new List<string>(); }
757 757 public int llGetObjectPrimCount(string object_id) { NotImplemented("llGetObjectPrimCount"); return 0; }
758 public string llUnescapeURL(string url) 758 public int llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide) { NotImplemented("llGetParcelMaxPrims"); return 0; }
759 { 759 public List<string> llGetParcelDetails(LSL_Types.Vector3 pos, List<string> param) { NotImplemented("llGetParcelDetails"); return new List<string>(); }
760 try 760
761 { 761 //
762 return Uri.UnescapeDataString(url); 762 // OpenSim functions
763 } 763 //
764 catch (Exception ex) 764 public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer)
765 { 765 {
766 return "llUnescapeURL: " + ex.ToString(); 766 if (dynamicID == "")
767 } 767 {
768 } 768 IDynamicTextureManager textureManager = this.World.RequestModuleInterface<IDynamicTextureManager>();
769 public void llMapDestination(string simname, LSL_Types.Vector3 pos, LSL_Types.Vector3 look_at) { } 769 LLUUID createdTexture = textureManager.AddDynamicTextureURL(World.RegionInfo.SimUUID, this.m_host.UUID, contentType, url, extraParams, timer);
770 public void llAddToLandBanList(string avatar, double hours) { } 770 return createdTexture.ToStringHyphenated();
771 public void llRemoveFromLandPassList(string avatar) { } 771 }
772 public void llRemoveFromLandBanList(string avatar) { } 772 else
773 public void llSetCameraParams(List<string> rules) { } 773 {
774 public void llClearCameraParams() { } 774 //TODO update existing dynamic textures
775 public double llListStatistics(int operation, List<string> src) { return 0; } 775 }
776 776
777 public int llGetUnixTime() 777 return LLUUID.Zero.ToStringHyphenated();
778 { 778 }
779 return Util.UnixTimeSinceEpoch(); 779
780 } 780 private void NotImplemented(string Command)
781 781 {
782 public int llGetParcelFlags(LSL_Types.Vector3 pos) { return 0; } 782 if (throwErrorOnNotImplemented)
783 public int llGetRegionFlags() { return 0; } 783 throw new NotImplementedException("Command not implemented: " + Command);
784 public string llXorBase64StringsCorrect(string str1, string str2) { return ""; } 784 }
785 public void llHTTPRequest() { } 785
786 public void llResetLandBanList() { } 786 }
787 public void llResetLandPassList() { } 787}
788 public int llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide) { return 0; }
789 public List<string> llGetParcelPrimOwners(LSL_Types.Vector3 pos) { return new List<string>(); }
790 public int llGetObjectPrimCount(string object_id) { return 0; }
791 public int llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide) { return 0; }
792 public List<string> llGetParcelDetails(LSL_Types.Vector3 pos, List<string> param) { return new List<string>(); }
793
794 //
795 // OpenSim functions
796 //
797 public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer)
798 {
799 if (dynamicID == "")
800 {
801 IDynamicTextureManager textureManager = this.World.RequestModuleInterface<IDynamicTextureManager>();
802 LLUUID createdTexture = textureManager.AddDynamicTextureURL(World.RegionInfo.SimUUID, this.m_host.UUID, contentType, url, extraParams, timer);
803 return createdTexture.ToStringHyphenated();
804 }
805 else
806 {
807 //TODO update existing dynamic textures
808 }
809
810 return LLUUID.Zero.ToStringHyphenated();
811 }
812
813 }
814}