OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
OSSL_Stub.cs
Go to the documentation of this file.
1 /*
2  * Copyright (c) Contributors, http://opensimulator.org/
3  * See CONTRIBUTORS.TXT for a full list of copyright holders.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of the OpenSimulator Project nor the
13  * names of its contributors may be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 using System;
29 using System.Runtime.Remoting.Lifetime;
30 using System.Threading;
31 using System.Reflection;
32 using System.Collections;
33 using System.Collections.Generic;
34 using OpenSim.Framework;
35 using OpenSim.Region.Framework.Interfaces;
36 using OpenSim.Region.ScriptEngine.Interfaces;
37 using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
47 
48 namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
49 {
50  public partial class ScriptBaseClass : MarshalByRefObject
51  {
53 
54  public void ApiTypeOSSL(IScriptApi api)
55  {
56  if (!(api is IOSSL_Api))
57  return;
58 
59  m_OSSL_Functions = (IOSSL_Api)api;
60 
61  Prim = new OSSLPrim(this);
62  }
63 
64  public void osSetRegionWaterHeight(double height)
65  {
66  m_OSSL_Functions.osSetRegionWaterHeight(height);
67  }
68 
69  public void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour)
70  {
71  m_OSSL_Functions.osSetRegionSunSettings(useEstateSun, sunFixed, sunHour);
72  }
73 
74  public void osSetEstateSunSettings(bool sunFixed, double sunHour)
75  {
76  m_OSSL_Functions.osSetEstateSunSettings(sunFixed, sunHour);
77  }
78 
79  public double osGetCurrentSunHour()
80  {
81  return m_OSSL_Functions.osGetCurrentSunHour();
82  }
83 
84  public double osGetSunParam(string param)
85  {
86  return m_OSSL_Functions.osGetSunParam(param);
87  }
88  // Deprecated
89  public double osSunGetParam(string param)
90  {
91  return m_OSSL_Functions.osSunGetParam(param);
92  }
93 
94  public void osSetSunParam(string param, double value)
95  {
96  m_OSSL_Functions.osSetSunParam(param, value);
97  }
98  // Deprecated
99  public void osSunSetParam(string param, double value)
100  {
101  m_OSSL_Functions.osSunSetParam(param, value);
102  }
103 
105  {
106  return m_OSSL_Functions.osWindActiveModelPluginName();
107  }
108 
109  public void osSetWindParam(string plugin, string param, LSL_Float value)
110  {
111  m_OSSL_Functions.osSetWindParam(plugin, param, value);
112  }
113 
114  public LSL_Float osGetWindParam(string plugin, string param)
115  {
116  return m_OSSL_Functions.osGetWindParam(plugin, param);
117  }
118 
119  public void osParcelJoin(vector pos1, vector pos2)
120  {
121  m_OSSL_Functions.osParcelJoin(pos1,pos2);
122  }
123 
124  public void osParcelSubdivide(vector pos1, vector pos2)
125  {
126  m_OSSL_Functions.osParcelSubdivide(pos1, pos2);
127  }
128 
129  public void osSetParcelDetails(vector pos, LSL_List rules)
130  {
131  m_OSSL_Functions.osSetParcelDetails(pos, rules);
132  }
133  // Deprecated
134  public void osParcelSetDetails(vector pos, LSL_List rules)
135  {
136  m_OSSL_Functions.osParcelSetDetails(pos,rules);
137  }
138 
139  public double osList2Double(LSL_Types.list src, int index)
140  {
141  return m_OSSL_Functions.osList2Double(src, index);
142  }
143 
144  public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams,
145  int timer)
146  {
147  return m_OSSL_Functions.osSetDynamicTextureURL(dynamicID, contentType, url, extraParams, timer);
148  }
149 
150  public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams,
151  int timer)
152  {
153  return m_OSSL_Functions.osSetDynamicTextureData(dynamicID, contentType, data, extraParams, timer);
154  }
155 
156  public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
157  int timer, int alpha)
158  {
159  return m_OSSL_Functions.osSetDynamicTextureURLBlend(dynamicID, contentType, url, extraParams, timer, alpha);
160  }
161 
162  public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
163  int timer, int alpha)
164  {
165  return m_OSSL_Functions.osSetDynamicTextureDataBlend(dynamicID, contentType, data, extraParams, timer, alpha);
166  }
167 
168  public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams,
169  bool blend, int disp, int timer, int alpha, int face)
170  {
171  return m_OSSL_Functions.osSetDynamicTextureURLBlendFace(dynamicID, contentType, url, extraParams,
172  blend, disp, timer, alpha, face);
173  }
174 
175  public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams,
176  bool blend, int disp, int timer, int alpha, int face)
177  {
178  return m_OSSL_Functions.osSetDynamicTextureDataBlendFace(dynamicID, contentType, data, extraParams,
179  blend, disp, timer, alpha, face);
180  }
181 
182  public LSL_Float osGetTerrainHeight(int x, int y)
183  {
184  return m_OSSL_Functions.osGetTerrainHeight(x, y);
185  }
186  // Deprecated
187  public LSL_Float osTerrainGetHeight(int x, int y)
188  {
189  return m_OSSL_Functions.osTerrainGetHeight(x, y);
190  }
191 
192  public LSL_Integer osSetTerrainHeight(int x, int y, double val)
193  {
194  return m_OSSL_Functions.osSetTerrainHeight(x, y, val);
195  }
196  // Deprecated
197  public LSL_Integer osTerrainSetHeight(int x, int y, double val)
198  {
199  return m_OSSL_Functions.osTerrainSetHeight(x, y, val);
200  }
201 
202  public void osTerrainFlush()
203  {
204  m_OSSL_Functions.osTerrainFlush();
205  }
206 
207  public int osRegionRestart(double seconds)
208  {
209  return m_OSSL_Functions.osRegionRestart(seconds);
210  }
211 
212  public void osRegionNotice(string msg)
213  {
214  m_OSSL_Functions.osRegionNotice(msg);
215  }
216 
217  public bool osConsoleCommand(string Command)
218  {
219  return m_OSSL_Functions.osConsoleCommand(Command);
220  }
221 
222  public void osSetParcelMediaURL(string url)
223  {
224  m_OSSL_Functions.osSetParcelMediaURL(url);
225  }
226 
227  public void osSetParcelSIPAddress(string SIPAddress)
228  {
229  m_OSSL_Functions.osSetParcelSIPAddress(SIPAddress);
230  }
231 
232  public void osSetPrimFloatOnWater(int floatYN)
233  {
234  m_OSSL_Functions.osSetPrimFloatOnWater(floatYN);
235  }
236 
237  // Teleport Functions
238 
239  public void osTeleportAgent(string agent, string regionName, vector position, vector lookat)
240  {
241  m_OSSL_Functions.osTeleportAgent(agent, regionName, position, lookat);
242  }
243 
244  public void osTeleportAgent(string agent, int regionX, int regionY, vector position, vector lookat)
245  {
246  m_OSSL_Functions.osTeleportAgent(agent, regionX, regionY, position, lookat);
247  }
248 
249  public void osTeleportAgent(string agent, vector position, vector lookat)
250  {
251  m_OSSL_Functions.osTeleportAgent(agent, position, lookat);
252  }
253 
254  public void osTeleportOwner(string regionName, vector position, vector lookat)
255  {
256  m_OSSL_Functions.osTeleportOwner(regionName, position, lookat);
257  }
258 
259  public void osTeleportOwner(int regionX, int regionY, vector position, vector lookat)
260  {
261  m_OSSL_Functions.osTeleportOwner(regionX, regionY, position, lookat);
262  }
263 
264  public void osTeleportOwner(vector position, vector lookat)
265  {
266  m_OSSL_Functions.osTeleportOwner(position, lookat);
267  }
268 
269  // Avatar info functions
270  public string osGetAgentIP(string agent)
271  {
272  return m_OSSL_Functions.osGetAgentIP(agent);
273  }
274 
276  {
277  return m_OSSL_Functions.osGetAgents();
278  }
279 
280  // Animation Functions
281 
282  public void osAvatarPlayAnimation(string avatar, string animation)
283  {
284  m_OSSL_Functions.osAvatarPlayAnimation(avatar, animation);
285  }
286 
287  public void osAvatarStopAnimation(string avatar, string animation)
288  {
289  m_OSSL_Functions.osAvatarStopAnimation(avatar, animation);
290  }
291 
292  #region Attachment commands
293 
294  public void osForceAttachToAvatar(int attachmentPoint)
295  {
296  m_OSSL_Functions.osForceAttachToAvatar(attachmentPoint);
297  }
298 
299  public void osForceAttachToAvatarFromInventory(string itemName, int attachmentPoint)
300  {
301  m_OSSL_Functions.osForceAttachToAvatarFromInventory(itemName, attachmentPoint);
302  }
303 
304  public void osForceAttachToOtherAvatarFromInventory(string rawAvatarId, string itemName, int attachmentPoint)
305  {
306  m_OSSL_Functions.osForceAttachToOtherAvatarFromInventory(rawAvatarId, itemName, attachmentPoint);
307  }
308 
310  {
311  m_OSSL_Functions.osForceDetachFromAvatar();
312  }
313 
314  public LSL_List osGetNumberOfAttachments(LSL_Key avatar, LSL_List attachmentPoints)
315  {
316  return m_OSSL_Functions.osGetNumberOfAttachments(avatar, attachmentPoints);
317  }
318 
319  public void osMessageAttachments(LSL_Key avatar, string message, LSL_List attachmentPoints, int flags)
320  {
321  m_OSSL_Functions.osMessageAttachments(avatar, message, attachmentPoints, flags);
322  }
323 
324  #endregion
325 
326  // Texture Draw functions
327 
328  public string osMovePen(string drawList, int x, int y)
329  {
330  return m_OSSL_Functions.osMovePen(drawList, x, y);
331  }
332 
333  public string osDrawLine(string drawList, int startX, int startY, int endX, int endY)
334  {
335  return m_OSSL_Functions.osDrawLine(drawList, startX, startY, endX, endY);
336  }
337 
338  public string osDrawLine(string drawList, int endX, int endY)
339  {
340  return m_OSSL_Functions.osDrawLine(drawList, endX, endY);
341  }
342 
343  public string osDrawText(string drawList, string text)
344  {
345  return m_OSSL_Functions.osDrawText(drawList, text);
346  }
347 
348  public string osDrawEllipse(string drawList, int width, int height)
349  {
350  return m_OSSL_Functions.osDrawEllipse(drawList, width, height);
351  }
352 
353  public string osDrawRectangle(string drawList, int width, int height)
354  {
355  return m_OSSL_Functions.osDrawRectangle(drawList, width, height);
356  }
357 
358  public string osDrawFilledRectangle(string drawList, int width, int height)
359  {
360  return m_OSSL_Functions.osDrawFilledRectangle(drawList, width, height);
361  }
362 
363  public string osDrawPolygon(string drawList, LSL_List x, LSL_List y)
364  {
365  return m_OSSL_Functions.osDrawPolygon(drawList, x, y);
366  }
367 
368  public string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y)
369  {
370  return m_OSSL_Functions.osDrawFilledPolygon(drawList, x, y);
371  }
372 
373  public string osSetFontSize(string drawList, int fontSize)
374  {
375  return m_OSSL_Functions.osSetFontSize(drawList, fontSize);
376  }
377 
378  public string osSetFontName(string drawList, string fontName)
379  {
380  return m_OSSL_Functions.osSetFontName(drawList, fontName);
381  }
382 
383  public string osSetPenSize(string drawList, int penSize)
384  {
385  return m_OSSL_Functions.osSetPenSize(drawList, penSize);
386  }
387 
388  public string osSetPenCap(string drawList, string direction, string type)
389  {
390  return m_OSSL_Functions.osSetPenCap(drawList, direction, type);
391  }
392 
393  public string osSetPenColor(string drawList, string color)
394  {
395  return m_OSSL_Functions.osSetPenColor(drawList, color);
396  }
397  // Deprecated
398  public string osSetPenColour(string drawList, string colour)
399  {
400  return m_OSSL_Functions.osSetPenColour(drawList, colour);
401  }
402 
403  public string osDrawImage(string drawList, int width, int height, string imageUrl)
404  {
405  return m_OSSL_Functions.osDrawImage(drawList, width, height, imageUrl);
406  }
407 
408  public vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize)
409  {
410  return m_OSSL_Functions.osGetDrawStringSize(contentType, text, fontName, fontSize);
411  }
412 
413  public void osSetStateEvents(int events)
414  {
415  m_OSSL_Functions.osSetStateEvents(events);
416  }
417 
418  public string osGetScriptEngineName()
419  {
420  return m_OSSL_Functions.osGetScriptEngineName();
421  }
422 
424  {
425  return m_OSSL_Functions.osCheckODE();
426  }
427 
428  public string osGetPhysicsEngineType()
429  {
430  return m_OSSL_Functions.osGetPhysicsEngineType();
431  }
432 
433  public string osGetSimulatorVersion()
434  {
435  return m_OSSL_Functions.osGetSimulatorVersion();
436  }
437 
438  public Hashtable osParseJSON(string JSON)
439  {
440  return m_OSSL_Functions.osParseJSON(JSON);
441  }
442 
443  public Object osParseJSONNew(string JSON)
444  {
445  return m_OSSL_Functions.osParseJSONNew(JSON);
446  }
447 
448  public void osMessageObject(key objectUUID,string message)
449  {
450  m_OSSL_Functions.osMessageObject(objectUUID,message);
451  }
452 
453  public void osMakeNotecard(string notecardName, LSL_Types.list contents)
454  {
455  m_OSSL_Functions.osMakeNotecard(notecardName, contents);
456  }
457 
458  public string osGetNotecardLine(string name, int line)
459  {
460  return m_OSSL_Functions.osGetNotecardLine(name, line);
461  }
462 
463  public string osGetNotecard(string name)
464  {
465  return m_OSSL_Functions.osGetNotecard(name);
466  }
467 
468  public int osGetNumberOfNotecardLines(string name)
469  {
470  return m_OSSL_Functions.osGetNumberOfNotecardLines(name);
471  }
472 
473  public string osAvatarName2Key(string firstname, string lastname)
474  {
475  return m_OSSL_Functions.osAvatarName2Key(firstname, lastname);
476  }
477 
478  public string osKey2Name(string id)
479  {
480  return m_OSSL_Functions.osKey2Name(id);
481  }
482 
483  public string osGetGridNick()
484  {
485  return m_OSSL_Functions.osGetGridNick();
486  }
487 
488  public string osGetGridName()
489  {
490  return m_OSSL_Functions.osGetGridName();
491  }
492 
493  public string osGetGridLoginURI()
494  {
495  return m_OSSL_Functions.osGetGridLoginURI();
496  }
497 
498  public string osGetGridHomeURI()
499  {
500  return m_OSSL_Functions.osGetGridHomeURI();
501  }
502 
503  public string osGetGridGatekeeperURI()
504  {
505  return m_OSSL_Functions.osGetGridGatekeeperURI();
506  }
507 
508  public string osGetGridCustom(string key)
509  {
510  return m_OSSL_Functions.osGetGridCustom(key);
511  }
512 
513  public string osGetAvatarHomeURI(string uuid)
514  {
515  return m_OSSL_Functions.osGetAvatarHomeURI(uuid);
516  }
517 
518  public LSL_String osFormatString(string str, LSL_List strings)
519  {
520  return m_OSSL_Functions.osFormatString(str, strings);
521  }
522 
523  public LSL_List osMatchString(string src, string pattern, int start)
524  {
525  return m_OSSL_Functions.osMatchString(src, pattern, start);
526  }
527 
528  public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start)
529  {
530  return m_OSSL_Functions.osReplaceString(src,pattern,replace,count,start);
531  }
532 
533 
534  // Information about data loaded into the region
535  public string osLoadedCreationDate()
536  {
537  return m_OSSL_Functions.osLoadedCreationDate();
538  }
539 
540  public string osLoadedCreationTime()
541  {
542  return m_OSSL_Functions.osLoadedCreationTime();
543  }
544 
545  public string osLoadedCreationID()
546  {
547  return m_OSSL_Functions.osLoadedCreationID();
548  }
549 
550  public LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules)
551  {
552  return m_OSSL_Functions.osGetLinkPrimitiveParams(linknumber, rules);
553  }
554 
555  public void osForceCreateLink(string target, int parent)
556  {
557  m_OSSL_Functions.osForceCreateLink(target, parent);
558  }
559 
560  public void osForceBreakLink(int linknum)
561  {
562  m_OSSL_Functions.osForceBreakLink(linknum);
563  }
564 
565  public void osForceBreakAllLinks()
566  {
567  m_OSSL_Functions.osForceBreakAllLinks();
568  }
569 
571  {
572  return m_OSSL_Functions.osIsNpc(npc);
573  }
574 
575  public key osNpcCreate(string user, string name, vector position, key cloneFrom)
576  {
577  return m_OSSL_Functions.osNpcCreate(user, name, position, cloneFrom);
578  }
579 
580  public key osNpcCreate(string user, string name, vector position, key cloneFrom, int options)
581  {
582  return m_OSSL_Functions.osNpcCreate(user, name, position, cloneFrom, options);
583  }
584 
585  public key osNpcSaveAppearance(key npc, string notecard)
586  {
587  return m_OSSL_Functions.osNpcSaveAppearance(npc, notecard);
588  }
589 
590  public void osNpcLoadAppearance(key npc, string notecard)
591  {
592  m_OSSL_Functions.osNpcLoadAppearance(npc, notecard);
593  }
594 
596  {
597  return m_OSSL_Functions.osNpcGetOwner(npc);
598  }
599 
601  {
602  return m_OSSL_Functions.osNpcGetPos(npc);
603  }
604 
605  public void osNpcMoveTo(key npc, vector position)
606  {
607  m_OSSL_Functions.osNpcMoveTo(npc, position);
608  }
609 
610  public void osNpcMoveToTarget(key npc, vector target, int options)
611  {
612  m_OSSL_Functions.osNpcMoveToTarget(npc, target, options);
613  }
614 
616  {
617  return m_OSSL_Functions.osNpcGetRot(npc);
618  }
619 
620  public void osNpcSetRot(key npc, rotation rot)
621  {
622  m_OSSL_Functions.osNpcSetRot(npc, rot);
623  }
624 
626  {
627  m_OSSL_Functions.osNpcStopMoveToTarget(npc);
628  }
629 
630  public void osNpcSay(key npc, string message)
631  {
632  m_OSSL_Functions.osNpcSay(npc, message);
633  }
634 
635  public void osNpcSay(key npc, int channel, string message)
636  {
637  m_OSSL_Functions.osNpcSay(npc, channel, message);
638  }
639 
640 
641  public void osNpcShout(key npc, int channel, string message)
642  {
643  m_OSSL_Functions.osNpcShout(npc, channel, message);
644  }
645 
646  public void osNpcSit(LSL_Key npc, LSL_Key target, int options)
647  {
648  m_OSSL_Functions.osNpcSit(npc, target, options);
649  }
650 
651  public void osNpcStand(LSL_Key npc)
652  {
653  m_OSSL_Functions.osNpcStand(npc);
654  }
655 
656  public void osNpcRemove(key npc)
657  {
658  m_OSSL_Functions.osNpcRemove(npc);
659  }
660 
661  public void osNpcPlayAnimation(LSL_Key npc, string animation)
662  {
663  m_OSSL_Functions.osNpcPlayAnimation(npc, animation);
664  }
665 
666  public void osNpcStopAnimation(LSL_Key npc, string animation)
667  {
668  m_OSSL_Functions.osNpcStopAnimation(npc, animation);
669  }
670 
671  public void osNpcWhisper(key npc, int channel, string message)
672  {
673  m_OSSL_Functions.osNpcWhisper(npc, channel, message);
674  }
675 
676  public void osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num)
677  {
678  m_OSSL_Functions.osNpcTouch(npcLSL_Key, object_key, link_num);
679  }
680 
681  public LSL_Key osOwnerSaveAppearance(string notecard)
682  {
683  return m_OSSL_Functions.osOwnerSaveAppearance(notecard);
684  }
685 
686  public LSL_Key osAgentSaveAppearance(LSL_Key agentId, string notecard)
687  {
688  return m_OSSL_Functions.osAgentSaveAppearance(agentId, notecard);
689  }
690 
691  public OSSLPrim Prim;
692 
693  [Serializable]
694  public class OSSLPrim
695  {
696  internal ScriptBaseClass OSSL;
698  {
699  OSSL = bc;
700  Position = new OSSLPrim_Position(this);
701  Rotation = new OSSLPrim_Rotation(this);
702  }
703 
706  private TextStruct _text;
707  public TextStruct Text
708  {
709  get { return _text; }
710  set
711  {
712  _text = value;
713  OSSL.llSetText(_text.Text, _text.color, _text.alpha);
714  }
715  }
716 
717  [Serializable]
718  public struct TextStruct
719  {
720  public string Text;
722  public double alpha;
723  }
724  }
725 
726  [Serializable]
727  public class OSSLPrim_Position
728  {
729  private OSSLPrim prim;
730  private LSL_Types.Vector3 Position;
732  {
733  prim = _prim;
734  }
735  private void Load()
736  {
737  Position = prim.OSSL.llGetPos();
738  }
739  private void Save()
740  {
741  /* Remove temporarily until we have a handle to the region size
742  if (Position.x > ((int)Constants.RegionSize - 1))
743  Position.x = ((int)Constants.RegionSize - 1);
744  if (Position.y > ((int)Constants.RegionSize - 1))
745  Position.y = ((int)Constants.RegionSize - 1);
746  */
747  if (Position.x < 0)
748  Position.x = 0;
749  if (Position.y < 0)
750  Position.y = 0;
751  if (Position.z < 0)
752  Position.z = 0;
754  Position.z = Constants.RegionHeight;
755  prim.OSSL.llSetPos(Position);
756  }
757 
758  public double x
759  {
760  get
761  {
762  Load();
763  return Position.x;
764  }
765  set
766  {
767  Load();
768  Position.x = value;
769  Save();
770  }
771  }
772  public double y
773  {
774  get
775  {
776  Load();
777  return Position.y;
778  }
779  set
780  {
781  Load();
782  Position.y = value;
783  Save();
784  }
785  }
786  public double z
787  {
788  get
789  {
790  Load();
791  return Position.z;
792  }
793  set
794  {
795  Load();
796  Position.z = value;
797  Save();
798  }
799  }
800  }
801 
802  [Serializable]
803  public class OSSLPrim_Rotation
804  {
805  private OSSLPrim prim;
808  {
809  prim = _prim;
810  }
811  private void Load()
812  {
813  Rotation = prim.OSSL.llGetRot();
814  }
815  private void Save()
816  {
817  prim.OSSL.llSetRot(Rotation);
818  }
819 
820  public double x
821  {
822  get
823  {
824  Load();
825  return Rotation.x;
826  }
827  set
828  {
829  Load();
830  Rotation.x = value;
831  Save();
832  }
833  }
834  public double y
835  {
836  get
837  {
838  Load();
839  return Rotation.y;
840  }
841  set
842  {
843  Load();
844  Rotation.y = value;
845  Save();
846  }
847  }
848  public double z
849  {
850  get
851  {
852  Load();
853  return Rotation.z;
854  }
855  set
856  {
857  Load();
858  Rotation.z = value;
859  Save();
860  }
861  }
862  public double s
863  {
864  get
865  {
866  Load();
867  return Rotation.s;
868  }
869  set
870  {
871  Load();
872  Rotation.s = value;
873  Save();
874  }
875  }
876  }
877 
878  public string osGetGender(LSL_Key rawAvatarId)
879  {
880  return m_OSSL_Functions.osGetGender(rawAvatarId);
881  }
882 
884  {
885  return m_OSSL_Functions.osGetMapTexture();
886  }
887 
888  public key osGetRegionMapTexture(string regionName)
889  {
890  return m_OSSL_Functions.osGetRegionMapTexture(regionName);
891  }
892 
894  {
895  return m_OSSL_Functions.osGetRegionStats();
896  }
897 
899  {
900  return m_OSSL_Functions.osGetRegionSize();
901  }
902 
909  {
910  return m_OSSL_Functions.osGetSimulatorMemory();
911  }
912 
913  public void osKickAvatar(string FirstName,string SurName,string alert)
914  {
915  m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert);
916  }
917 
918  public void osSetSpeed(string UUID, LSL_Float SpeedModifier)
919  {
920  m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier);
921  }
922 
923  public LSL_Float osGetHealth(string avatar)
924  {
925  return m_OSSL_Functions.osGetHealth(avatar);
926  }
927 
928  public void osCauseDamage(string avatar, double damage)
929  {
930  m_OSSL_Functions.osCauseDamage(avatar, damage);
931  }
932 
933  public void osCauseHealing(string avatar, double healing)
934  {
935  m_OSSL_Functions.osCauseHealing(avatar, healing);
936  }
937 
938  public void osForceOtherSit(string avatar)
939  {
940  m_OSSL_Functions.osForceOtherSit(avatar);
941  }
942 
943  public void osForceOtherSit(string avatar, string target)
944  {
945  m_OSSL_Functions.osForceOtherSit(avatar, target);
946  }
947 
949  {
950  return m_OSSL_Functions.osGetPrimitiveParams(prim, rules);
951  }
952 
953  public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules)
954  {
955  m_OSSL_Functions.osSetPrimitiveParams(prim, rules);
956  }
957 
958  public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb)
959  {
960  m_OSSL_Functions.osSetProjectionParams(projection, texture, fov, focus, amb);
961  }
962 
963  public void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb)
964  {
965  m_OSSL_Functions.osSetProjectionParams(prim, projection, texture, fov, focus, amb);
966  }
967 
969  {
970  return m_OSSL_Functions.osGetAvatarList();
971  }
972 
974  {
975  return m_OSSL_Functions.osUnixTimeToTimestamp(time);
976  }
977 
978  public LSL_String osGetInventoryDesc(string item)
979  {
980  return m_OSSL_Functions.osGetInventoryDesc(item);
981  }
982 
984  {
985  return m_OSSL_Functions.osInviteToGroup(agentId);
986  }
987 
989  {
990  return m_OSSL_Functions.osEjectFromGroup(agentId);
991  }
992 
993  public void osSetTerrainTexture(int level, LSL_Key texture)
994  {
995  m_OSSL_Functions.osSetTerrainTexture(level, texture);
996  }
997 
998  public void osSetTerrainTextureHeight(int corner, double low, double high)
999  {
1000  m_OSSL_Functions.osSetTerrainTextureHeight(corner, low, high);
1001  }
1002 
1003  public LSL_Integer osIsUUID(string thing)
1004  {
1005  return m_OSSL_Functions.osIsUUID(thing);
1006  }
1007 
1008  public LSL_Float osMin(double a, double b)
1009  {
1010  return m_OSSL_Functions.osMin(a, b);
1011  }
1012 
1013  public LSL_Float osMax(double a, double b)
1014  {
1015  return m_OSSL_Functions.osMax(a, b);
1016  }
1017 
1019  {
1020  return m_OSSL_Functions.osGetRezzingObject();
1021  }
1022 
1023  public void osSetContentType(LSL_Key id, string type)
1024  {
1025  m_OSSL_Functions.osSetContentType(id,type);
1026  }
1027 
1028  public void osDropAttachment()
1029  {
1030  m_OSSL_Functions.osDropAttachment();
1031  }
1032 
1034  {
1035  m_OSSL_Functions.osForceDropAttachment();
1036  }
1037 
1038  public void osDropAttachmentAt(vector pos, rotation rot)
1039  {
1040  m_OSSL_Functions.osDropAttachmentAt(pos, rot);
1041  }
1042 
1044  {
1045  m_OSSL_Functions.osForceDropAttachmentAt(pos, rot);
1046  }
1047 
1048  public LSL_Integer osListenRegex(int channelID, string name, string ID, string msg, int regexBitfield)
1049  {
1050  return m_OSSL_Functions.osListenRegex(channelID, name, ID, msg, regexBitfield);
1051  }
1052 
1053  public LSL_Integer osRegexIsMatch(string input, string pattern)
1054  {
1055  return m_OSSL_Functions.osRegexIsMatch(input, pattern);
1056  }
1057 
1059  {
1060  return m_OSSL_Functions.osRequestURL(options);
1061  }
1062 
1064  {
1065  return m_OSSL_Functions.osRequestSecureURL(options);
1066  }
1067  }
1068 }
void osMessageAttachments(LSL_Key avatar, string message, LSL_List attachmentPoints, int flags)
Definition: OSSL_Stub.cs:319
void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour)
Definition: OSSL_Stub.cs:69
string osDrawLine(string drawList, int startX, int startY, int endX, int endY)
Definition: OSSL_Stub.cs:333
void osNpcPlayAnimation(LSL_Key npc, string animation)
Definition: OSSL_Stub.cs:661
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat LSL_Float
Definition: CM_Api.cs:48
string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, int timer, int alpha)
Definition: OSSL_Stub.cs:162
void osNpcWhisper(key npc, int channel, string message)
Definition: OSSL_Stub.cs:671
string osSetPenCap(string drawList, string direction, string type)
Definition: OSSL_Stub.cs:388
string osAvatarName2Key(string firstname, string lastname)
Definition: OSSL_Stub.cs:473
OpenSim.Region.ScriptEngine.Shared.LSL_Types.list LSL_List
Definition: CM_Api.cs:51
string osDrawLine(string drawList, int endX, int endY)
Definition: OSSL_Stub.cs:338
void osKickAvatar(string FirstName, string SurName, string alert)
Definition: OSSL_Stub.cs:913
string osMovePen(string drawList, int x, int y)
Definition: OSSL_Stub.cs:328
void osSetWindParam(string plugin, string param, LSL_Float value)
Definition: OSSL_Stub.cs:109
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger integer
Definition: CM_Stub.cs:38
LSL_String osFormatString(string str, LSL_List strings)
Definition: OSSL_Stub.cs:518
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString LSL_Key
Definition: CM_Api.cs:50
LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
Definition: OSSL_Stub.cs:948
string osDrawRectangle(string drawList, int width, int height)
Definition: OSSL_Stub.cs:353
void osTeleportOwner(string regionName, vector position, vector lookat)
Definition: OSSL_Stub.cs:254
void osSetTerrainTextureHeight(int corner, double low, double high)
Definition: OSSL_Stub.cs:998
LSL_List osGetNumberOfAttachments(LSL_Key avatar, LSL_List attachmentPoints)
Definition: OSSL_Stub.cs:314
void osAvatarPlayAnimation(string avatar, string animation)
Definition: OSSL_Stub.cs:282
key osNpcCreate(string user, string name, vector position, key cloneFrom)
Definition: OSSL_Stub.cs:575
LSL_Key osAgentSaveAppearance(LSL_Key agentId, string notecard)
Definition: OSSL_Stub.cs:686
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString key
Definition: OSSL_Stub.cs:41
void osSetSpeed(string UUID, LSL_Float SpeedModifier)
Definition: OSSL_Stub.cs:918
LSL_List osMatchString(string src, string pattern, int start)
Definition: OSSL_Stub.cs:523
void osMakeNotecard(string notecardName, LSL_Types.list contents)
Definition: OSSL_Stub.cs:453
string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y)
Definition: OSSL_Stub.cs:368
string osSetPenColor(string drawList, string color)
Definition: OSSL_Stub.cs:393
void osTeleportAgent(string agent, string regionName, vector position, vector lookat)
Definition: OSSL_Stub.cs:239
LSL_String osReplaceString(string src, string pattern, string replace, int count, int start)
Definition: OSSL_Stub.cs:528
void osSetEstateSunSettings(bool sunFixed, double sunHour)
Definition: OSSL_Stub.cs:74
void osTeleportAgent(string agent, vector position, vector lookat)
Definition: OSSL_Stub.cs:249
string osDrawFilledRectangle(string drawList, int width, int height)
Definition: OSSL_Stub.cs:358
string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, bool blend, int disp, int timer, int alpha, int face)
Definition: OSSL_Stub.cs:168
LSL_Float osGetWindParam(string plugin, string param)
Definition: OSSL_Stub.cs:114
LSL_Integer osListenRegex(int channelID, string name, string ID, string msg, int regexBitfield)
Definition: OSSL_Stub.cs:1048
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString key
Definition: ICM_Api.cs:31
string osDrawPolygon(string drawList, LSL_List x, LSL_List y)
Definition: OSSL_Stub.cs:363
string osSetFontSize(string drawList, int fontSize)
Definition: OSSL_Stub.cs:373
void osForceAttachToOtherAvatarFromInventory(string rawAvatarId, string itemName, int attachmentPoint)
Definition: OSSL_Stub.cs:304
double osList2Double(LSL_Types.list src, int index)
Definition: OSSL_Stub.cs:139
LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules)
Definition: OSSL_Stub.cs:550
void osNpcShout(key npc, int channel, string message)
Definition: OSSL_Stub.cs:641
key osNpcCreate(string user, string name, vector position, key cloneFrom, int options)
Definition: OSSL_Stub.cs:580
OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion rotation
Definition: ICM_Api.cs:32
string osSetFontName(string drawList, string fontName)
Definition: OSSL_Stub.cs:378
void osNpcSay(key npc, int channel, string message)
Definition: OSSL_Stub.cs:635
string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, bool blend, int disp, int timer, int alpha, int face)
Definition: OSSL_Stub.cs:175
void osCauseHealing(string avatar, double healing)
Definition: OSSL_Stub.cs:933
string osSetPenSize(string drawList, int penSize)
Definition: OSSL_Stub.cs:383
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger LSL_Integer
Definition: CM_Api.cs:49
void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb)
Definition: OSSL_Stub.cs:963
LSL_Integer osRegexIsMatch(string input, string pattern)
Definition: OSSL_Stub.cs:1053
void osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num)
Definition: OSSL_Stub.cs:676
LSL_Integer osSetTerrainHeight(int x, int y, double val)
Definition: OSSL_Stub.cs:192
void osNpcMoveToTarget(key npc, vector target, int options)
Definition: OSSL_Stub.cs:610
void osForceAttachToAvatarFromInventory(string itemName, int attachmentPoint)
Definition: OSSL_Stub.cs:299
string osSetPenColour(string drawList, string colour)
Definition: OSSL_Stub.cs:398
LSL_Integer osTerrainSetHeight(int x, int y, double val)
Definition: OSSL_Stub.cs:197
string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer)
Definition: OSSL_Stub.cs:144
string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, int timer, int alpha)
Definition: OSSL_Stub.cs:156
LSL_Integer osGetSimulatorMemory()
Returns the amount of memory in use by the Simulator Daemon. Amount in bytes - if >= 4GB...
Definition: OSSL_Stub.cs:908
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger LSLInteger
Definition: CM_Constants.cs:31
string osDrawImage(string drawList, int width, int height, string imageUrl)
Definition: OSSL_Stub.cs:403
vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize)
Definition: OSSL_Stub.cs:408
void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb)
Definition: OSSL_Stub.cs:958
void osAvatarStopAnimation(string avatar, string animation)
Definition: OSSL_Stub.cs:287
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString LSL_String
Definition: CM_Api.cs:53
void osNpcStopAnimation(LSL_Key npc, string animation)
Definition: OSSL_Stub.cs:666
string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer)
Definition: OSSL_Stub.cs:150
void osMessageObject(key objectUUID, string message)
Definition: OSSL_Stub.cs:448
void osSetPrimitiveParams(LSL_Key prim, LSL_List rules)
Definition: OSSL_Stub.cs:953
void osForceOtherSit(string avatar, string target)
Definition: OSSL_Stub.cs:943
void osTeleportOwner(int regionX, int regionY, vector position, vector lookat)
Definition: OSSL_Stub.cs:259
OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3 vector
Definition: ICM_Api.cs:33
void osNpcSit(LSL_Key npc, LSL_Key target, int options)
Definition: OSSL_Stub.cs:646
string osDrawText(string drawList, string text)
Definition: OSSL_Stub.cs:343
void osTeleportAgent(string agent, int regionX, int regionY, vector position, vector lookat)
Definition: OSSL_Stub.cs:244
string osDrawEllipse(string drawList, int width, int height)
Definition: OSSL_Stub.cs:348
void osTeleportOwner(vector position, vector lookat)
Definition: OSSL_Stub.cs:264