IOSSL_Api.cs 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  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. using System;
  28. using System.Collections;
  29. using OpenSim.Region.ScriptEngine.Interfaces;
  30. using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
  31. using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
  32. using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
  33. using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
  34. using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
  35. using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
  36. using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
  37. using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
  38. using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
  39. namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
  40. {
  41. /// <summary>
  42. /// To permit region owners to enable the extended scripting functionality
  43. /// of OSSL, without allowing malicious scripts to access potentially
  44. /// troublesome functions, each OSSL function is assigned a threat level,
  45. /// and access to the functions is granted or denied based on a default
  46. /// threshold set in OpenSim.ini (which can be overridden for individual
  47. /// functions on a case-by-case basis)
  48. /// </summary>
  49. public enum ThreatLevel
  50. {
  51. NoAccess = -1,
  52. /// <summary>
  53. /// Function is no threat at all. It doesn't constitute a threat to
  54. /// either users or the system and has no known side effects.
  55. /// </summary>
  56. None = 0,
  57. /// <summary>
  58. /// Abuse of this command can cause a nuisance to the region operator,
  59. /// such as log message spew.
  60. /// </summary>
  61. Nuisance = 1,
  62. /// <summary>
  63. /// Extreme levels of abuse of this function can cause impaired
  64. /// functioning of the region, or very gullible users can be tricked
  65. /// into experiencing harmless effects.
  66. /// </summary>
  67. VeryLow = 2,
  68. /// <summary>
  69. /// Intentional abuse can cause crashes or malfunction under certain
  70. /// circumstances, which can be easily rectified; or certain users can
  71. /// be tricked into certain situations in an avoidable manner.
  72. /// </summary>
  73. Low = 3,
  74. /// <summary>
  75. /// Intentional abuse can cause denial of service and crashes with
  76. /// potential of data or state loss; or trusting users can be tricked
  77. /// into embarrassing or uncomfortable situations.
  78. /// </summary>
  79. Moderate = 4,
  80. /// <summary>
  81. /// Casual abuse can cause impaired functionality or temporary denial
  82. /// of service conditions. Intentional abuse can easily cause crashes
  83. /// with potential data loss, or can be used to trick experienced and
  84. /// cautious users into unwanted situations, or changes global data
  85. /// permanently and without undo ability.
  86. /// </summary>
  87. High = 5,
  88. /// <summary>
  89. /// Even normal use may, depending on the number of instances, or
  90. /// frequency of use, result in severe service impairment or crash
  91. /// with loss of data, or can be used to cause unwanted or harmful
  92. /// effects on users without giving the user a means to avoid it.
  93. /// </summary>
  94. VeryHigh = 6,
  95. /// <summary>
  96. /// Even casual use is a danger to region stability, or function allows
  97. /// console or OS command execution, or function allows taking money
  98. /// without consent, or allows deletion or modification of user data,
  99. /// or allows the compromise of sensitive data by design.
  100. /// </summary>
  101. Severe = 7
  102. };
  103. public interface IOSSL_Api
  104. {
  105. void CheckThreatLevel(ThreatLevel level, string function);
  106. //OpenSim functions
  107. string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer);
  108. string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
  109. int timer, int alpha);
  110. string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams,
  111. bool blend, int disp, int timer, int alpha, int face);
  112. string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer);
  113. string osSetDynamicTextureDataFace(string dynamicID, string contentType, string data, string extraParams, int timer, int face);
  114. string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
  115. int timer, int alpha);
  116. string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams,
  117. bool blend, int disp, int timer, int alpha, int face);
  118. LSL_Float osGetTerrainHeight(int x, int y);
  119. LSL_Float osTerrainGetHeight(int x, int y); // Deprecated
  120. LSL_Integer osSetTerrainHeight(int x, int y, double val);
  121. LSL_Integer osTerrainSetHeight(int x, int y, double val); //Deprecated
  122. //ApiDesc Send terrain to all agents
  123. void osTerrainFlush();
  124. int osRegionRestart(double seconds);
  125. int osRegionRestart(double seconds, string msg);
  126. void osRegionNotice(string msg);
  127. void osRegionNotice(LSL_Key agentID, string msg);
  128. bool osConsoleCommand(string Command);
  129. void osSetParcelMusicURL(LSL_String url);
  130. void osSetParcelMediaURL(LSL_String url);
  131. void osSetPrimFloatOnWater(int floatYN);
  132. void osSetParcelSIPAddress(string SIPAddress);
  133. // Avatar Info Commands
  134. LSL_List osGetAgents();
  135. string osGetAgentIP(string agent);
  136. // Teleport commands
  137. void osLocalTeleportAgent(LSL_Key agent, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, LSL_Types.Vector3 lookat, LSL_Integer flags);
  138. void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  139. void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  140. void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  141. void osTeleportOwner(string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  142. void osTeleportOwner(int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  143. void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  144. // Animation commands
  145. void osAvatarPlayAnimation(LSL_Key avatarId, string animation);
  146. void osAvatarStopAnimation(LSL_Key avatarId, string animation);
  147. #region Attachment commands
  148. /// <summary>
  149. /// Attach the object containing this script to the avatar that owns it without asking for PERMISSION_ATTACH
  150. /// </summary>
  151. /// <param name='attachment'>The attachment point. For example, ATTACH_CHEST</param>
  152. void osForceAttachToAvatar(int attachment);
  153. /// <summary>
  154. /// Attach an inventory item in the object containing this script to the avatar that owns it without asking for PERMISSION_ATTACH
  155. /// </summary>
  156. /// <remarks>
  157. /// Nothing happens if the owner is not in the region.
  158. /// </remarks>
  159. /// <param name='itemName'>Tha name of the item. If this is not found then a warning is said to the owner</param>
  160. /// <param name='attachment'>The attachment point. For example, ATTACH_CHEST</param>
  161. void osForceAttachToAvatarFromInventory(string itemName, int attachment);
  162. /// <summary>
  163. /// Attach an inventory item in the object containing this script to any avatar in the region without asking for PERMISSION_ATTACH
  164. /// </summary>
  165. /// <remarks>
  166. /// Nothing happens if the avatar is not in the region.
  167. /// </remarks>
  168. /// <param name='rawAvatarId'>The UUID of the avatar to which to attach. Nothing happens if this is not a UUID</para>
  169. /// <param name='itemName'>The name of the item. If this is not found then a warning is said to the owner</param>
  170. /// <param name='attachment'>The attachment point. For example, ATTACH_CHEST</param>
  171. void osForceAttachToOtherAvatarFromInventory(string rawAvatarId, string itemName, int attachmentPoint);
  172. /// <summary>
  173. /// Detach the object containing this script from the avatar it is attached to without checking for PERMISSION_ATTACH
  174. /// </summary>
  175. /// <remarks>Nothing happens if the object is not attached.</remarks>
  176. void osForceDetachFromAvatar();
  177. /// <summary>
  178. /// Returns a strided list of the specified attachment points and the number of attachments on those points.
  179. /// </summary>
  180. /// <param name="avatar">avatar UUID</param>
  181. /// <param name="attachmentPoints">list of ATTACH_* constants</param>
  182. /// <returns></returns>
  183. LSL_List osGetNumberOfAttachments(LSL_Key avatar, LSL_List attachmentPoints);
  184. /// <summary>
  185. /// Sends a specified message to the specified avatar's attachments on
  186. /// the specified attachment points.
  187. /// </summary>
  188. /// <remarks>
  189. /// Behaves as osMessageObject(), without the sending script needing to know the attachment keys in advance.
  190. /// </remarks>
  191. /// <param name="avatar">avatar UUID</param>
  192. /// <param name="message">message string</param>
  193. /// <param name="attachmentPoints">list of ATTACH_* constants, or -1 for all attachments. If -1 is specified and OS_ATTACH_MSG_INVERT_POINTS is present in flags, no action is taken.</param>
  194. /// <param name="flags">flags further constraining the attachments to deliver the message to.</param>
  195. void osMessageAttachments(LSL_Key avatar, string message, LSL_List attachmentPoints, int flags);
  196. #endregion
  197. //texture draw functions
  198. string osMovePen(string drawList, int x, int y);
  199. string osDrawLine(string drawList, int startX, int startY, int endX, int endY);
  200. string osDrawLine(string drawList, int endX, int endY);
  201. string osDrawText(string drawList, string text);
  202. string osDrawEllipse(string drawList, int width, int height);
  203. string osDrawFilledEllipse(string drawList, int width, int height);
  204. string osDrawRectangle(string drawList, int width, int height);
  205. string osDrawFilledRectangle(string drawList, int width, int height);
  206. string osDrawPolygon(string drawList, LSL_List x, LSL_List y);
  207. string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y);
  208. string osDrawResetTransform(string drawList);
  209. string osDrawRotationTransform(string drawList, LSL_Float x);
  210. string osDrawScaleTransform(string drawList, LSL_Float x, LSL_Float y);
  211. string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y);
  212. string osSetFontName(string drawList, string fontName);
  213. string osSetFontSize(string drawList, int fontSize);
  214. string osSetPenSize(string drawList, int penSize);
  215. string osSetPenColor(string drawList, string color);
  216. string osSetPenColour(string drawList, string colour); // Deprecated
  217. string osSetPenCap(string drawList, string direction, string type);
  218. string osDrawImage(string drawList, int width, int height, string imageUrl);
  219. vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize);
  220. void osSetRegionWaterHeight(double height);
  221. void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour);
  222. void osSetEstateSunSettings(bool sunFixed, double sunHour);
  223. LSL_Float osGetCurrentSunHour();
  224. LSL_Float osGetSunParam(LSL_String param);
  225. double osSunGetParam(string param); // Deprecated
  226. void osSetSunParam(string param, double value);
  227. void osSunSetParam(string param, double value); // Deprecated
  228. // Wind Module Functions
  229. string osWindActiveModelPluginName();
  230. void osSetWindParam(string plugin, string param, LSL_Float value);
  231. LSL_Float osGetWindParam(string plugin, string param);
  232. // Parcel commands
  233. LSL_Integer osGetParcelDwell(vector pos);
  234. void osParcelJoin(vector pos1, vector pos2);
  235. void osParcelSubdivide(vector pos1, vector pos2);
  236. void osSetParcelDetails(vector pos, LSL_List rules);
  237. void osParcelSetDetails(vector pos, LSL_List rules); // Deprecated
  238. string osGetScriptEngineName();
  239. string osGetSimulatorVersion();
  240. LSL_Integer osCheckODE();
  241. string osGetPhysicsEngineType();
  242. string osGetPhysicsEngineName();
  243. void osMessageObject(key objectUUID,string message);
  244. void osMakeNotecard(string notecardName, LSL_Types.list contents);
  245. string osGetNotecardLine(string name, int line);
  246. string osGetNotecard(string name);
  247. int osGetNumberOfNotecardLines(string name);
  248. string osAvatarName2Key(string firstname, string lastname);
  249. string osKey2Name(string id);
  250. string osSHA256(string input);
  251. // Grid Info Functions
  252. string osGetGridNick();
  253. string osGetGridName();
  254. string osGetGridLoginURI();
  255. string osGetGridHomeURI();
  256. string osGetGridGatekeeperURI();
  257. string osGetGridCustom(string key);
  258. string osGetAvatarHomeURI(string uuid);
  259. LSL_String osFormatString(string str, LSL_List strings);
  260. LSL_List osMatchString(string src, string pattern, int start);
  261. LSL_String osReplaceString(string src, string pattern, string replace, int count, int start);
  262. // Information about data loaded into the region
  263. string osLoadedCreationDate();
  264. string osLoadedCreationTime();
  265. string osLoadedCreationID();
  266. LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules);
  267. /// <summary>
  268. /// Identical to llCreateLink() but does not require permission from the owner.
  269. /// </summary>
  270. /// <param name='target'></param>
  271. /// <param name='parent'></param>
  272. void osForceCreateLink(string target, int parent);
  273. /// <summary>
  274. /// Identical to llBreakLink() but does not require permission from the owner.
  275. /// </summary>
  276. /// <param name='linknum'></param>
  277. void osForceBreakLink(int linknum);
  278. /// <summary>
  279. /// Identical to llBreakAllLinks() but does not require permission from the owner.
  280. /// </summary>
  281. void osForceBreakAllLinks();
  282. /// <summary>
  283. /// Similar to llDie but given an object UUID
  284. /// </summary>
  285. /// <param name="objectUUID"></param>
  286. void osDie(LSL_Key objectUUID);
  287. /// <summary>
  288. /// Check if the given key is an npc
  289. /// </summary>
  290. /// <param name="npc"></param>
  291. /// <returns>TRUE if the key belongs to an npc in the scene. FALSE otherwise.</returns>
  292. LSL_Integer osIsNpc(LSL_Key npc);
  293. key osNpcCreate(string user, string name, vector position, string notecard);
  294. key osNpcCreate(string user, string name, vector position, string notecard, int options);
  295. LSL_Key osNpcSaveAppearance(key npc, LSL_String notecard);
  296. LSL_Key osNpcSaveAppearance(key npc, LSL_String notecard, LSL_Integer includeHuds);
  297. void osNpcLoadAppearance(key npc, string notecard);
  298. vector osNpcGetPos(key npc);
  299. void osNpcMoveTo(key npc, vector position);
  300. void osNpcMoveToTarget(key npc, vector target, int options);
  301. /// <summary>
  302. /// Get the owner of the NPC
  303. /// </summary>
  304. /// <param name="npc"></param>
  305. /// <returns>
  306. /// The owner of the NPC for an owned NPC. The NPC's agent id for an unowned NPC. UUID.Zero if the key is not an npc.
  307. /// </returns>
  308. LSL_Key osNpcGetOwner(key npc);
  309. rotation osNpcGetRot(key npc);
  310. void osNpcSetRot(LSL_Key npc, rotation rot);
  311. void osNpcStopMoveToTarget(LSL_Key npc);
  312. void osNpcSetProfileAbout(LSL_Key npc, string about);
  313. void osNpcSetProfileImage(LSL_Key npc, string image);
  314. void osNpcSay(key npc, string message);
  315. void osNpcSay(key npc, int channel, string message);
  316. void osNpcSayTo(LSL_Key npc, LSL_Key target, int channel, string msg);
  317. void osNpcShout(key npc, int channel, string message);
  318. void osNpcSit(key npc, key target, int options);
  319. void osNpcStand(LSL_Key npc);
  320. void osNpcRemove(key npc);
  321. void osNpcPlayAnimation(LSL_Key npc, string animation);
  322. void osNpcStopAnimation(LSL_Key npc, string animation);
  323. void osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num);
  324. void osNpcWhisper(key npc, int channel, string message);
  325. LSL_Key osOwnerSaveAppearance(LSL_String notecard);
  326. LSL_Key osOwnerSaveAppearance(LSL_String notecard, LSL_Integer includeHuds);
  327. LSL_Key osAgentSaveAppearance(key agentId, LSL_String notecard);
  328. LSL_Key osAgentSaveAppearance(key agentId, LSL_String notecard, LSL_Integer includeHuds);
  329. key osGetGender(LSL_Key rawAvatarId);
  330. key osGetMapTexture();
  331. key osGetRegionMapTexture(string regionNameOrID);
  332. LSL_List osGetRegionStats();
  333. vector osGetRegionSize();
  334. int osGetSimulatorMemory();
  335. int osGetSimulatorMemoryKB();
  336. void osKickAvatar(string FirstName, string SurName, string alert);
  337. void osKickAvatar(LSL_Key agentId, string alert);
  338. void osSetSpeed(string UUID, LSL_Float SpeedModifier);
  339. void osSetOwnerSpeed(LSL_Float SpeedModifier);
  340. LSL_Float osGetHealth(key agentId);
  341. void osCauseHealing(key agentId, LSL_Float healing);
  342. void osSetHealth(key agentId, LSL_Float health);
  343. void osSetHealRate(key agentId, LSL_Float health);
  344. LSL_Float osGetHealRate(key agentId);
  345. void osCauseDamage(key avatar, LSL_Float damage);
  346. void osForceOtherSit(string avatar);
  347. void osForceOtherSit(string avatar, string target);
  348. LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules);
  349. void osSetPrimitiveParams(LSL_Key prim, LSL_List rules);
  350. void osSetProjectionParams(LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb);
  351. void osSetProjectionParams(LSL_Key prim, LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb);
  352. void osSetProjectionParams(LSL_Integer linknumber, LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb);
  353. LSL_List osGetAvatarList();
  354. LSL_List osGetNPCList();
  355. LSL_String osUnixTimeToTimestamp(LSL_Integer time);
  356. LSL_Integer osInviteToGroup(LSL_Key agentId);
  357. LSL_Integer osEjectFromGroup(LSL_Key agentId);
  358. void osSetTerrainTexture(int level, LSL_Key texture);
  359. void osSetTerrainTextureHeight(int corner, double low, double high);
  360. /// <summary>
  361. /// Checks if thing is a UUID.
  362. /// </summary>
  363. /// <param name="thing"></param>
  364. /// <returns>1 if thing is a valid UUID, 0 otherwise</returns>
  365. LSL_Integer osIsUUID(string thing);
  366. /// <summary>
  367. /// Wraps to Math.Min()
  368. /// </summary>
  369. /// <param name="a"></param>
  370. /// <param name="b"></param>
  371. /// <returns></returns>
  372. LSL_Float osMin(double a, double b);
  373. /// <summary>
  374. /// Wraps to Math.max()
  375. /// </summary>
  376. /// <param name="a"></param>
  377. /// <param name="b"></param>
  378. /// <returns></returns>
  379. LSL_Float osMax(double a, double b);
  380. /// <summary>
  381. /// Get the key of the object that rezzed this object.
  382. /// </summary>
  383. /// <returns>Rezzing object key or NULL_KEY if rezzed by agent or otherwise unknown.</returns>
  384. LSL_Key osGetRezzingObject();
  385. /// <summary>
  386. /// Sets the response type for an HTTP request/response
  387. /// </summary>
  388. /// <returns></returns>
  389. void osSetContentType(LSL_Key id, string type);
  390. /// <summary>
  391. /// Attempts to drop an attachment to the ground
  392. /// </summary>
  393. void osDropAttachment();
  394. /// <summary>
  395. /// Attempts to drop an attachment to the ground while bypassing the script permissions
  396. /// </summary>
  397. void osForceDropAttachment();
  398. /// <summary>
  399. /// Attempts to drop an attachment at the specified coordinates.
  400. /// </summary>
  401. /// <param name="pos"></param>
  402. /// <param name="rot"></param>
  403. void osDropAttachmentAt(vector pos, rotation rot);
  404. /// <summary>
  405. /// Attempts to drop an attachment at the specified coordinates while bypassing the script permissions
  406. /// </summary>
  407. /// <param name="pos"></param>
  408. /// <param name="rot"></param>
  409. void osForceDropAttachmentAt(vector pos, rotation rot);
  410. /// <summary>
  411. /// Identical to llListen except for a bitfield which indicates which
  412. /// string parameters should be parsed as regex patterns.
  413. /// </summary>
  414. /// <param name="channelID"></param>
  415. /// <param name="name"></param>
  416. /// <param name="ID"></param>
  417. /// <param name="msg"></param>
  418. /// <param name="regexBitfield">
  419. /// OS_LISTEN_REGEX_NAME
  420. /// OS_LISTEN_REGEX_MESSAGE
  421. /// </param>
  422. /// <returns></returns>
  423. LSL_Integer osListenRegex(int channelID, string name, string ID,
  424. string msg, int regexBitfield);
  425. /// <summary>
  426. /// Wraps to bool Regex.IsMatch(string input, string pattern)
  427. /// </summary>
  428. /// <param name="input">string to test for match</param>
  429. /// <param name="regex">string to use as pattern</param>
  430. /// <returns>boolean</returns>
  431. LSL_Integer osRegexIsMatch(string input, string pattern);
  432. LSL_String osRequestURL(LSL_List options);
  433. LSL_String osRequestSecureURL(LSL_List options);
  434. void osCollisionSound(string impact_sound, double impact_volume);
  435. void osVolumeDetect(int detect);
  436. LSL_List osGetInertiaData();
  437. void osClearInertia();
  438. void osSetInertia(LSL_Float mass, vector centerOfMass, vector principalInertiaScaled, rotation rot);
  439. void osSetInertiaAsBox(LSL_Float mass, vector boxSize, vector centerOfMass, rotation rot);
  440. void osSetInertiaAsSphere(LSL_Float mass, LSL_Float radius, vector centerOfMass);
  441. void osSetInertiaAsCylinder(LSL_Float mass, LSL_Float radius, LSL_Float lenght, vector centerOfMass,rotation lslrot);
  442. LSL_Integer osTeleportObject(LSL_Key objectUUID, vector targetPos, rotation targetrotation, LSL_Integer flags);
  443. LSL_Integer osGetLinkNumber(LSL_String name);
  444. LSL_Float osRound(LSL_Float value, LSL_Integer digits);
  445. LSL_Float osVecMagSquare(vector a);
  446. LSL_Float osVecDistSquare(vector a, vector b);
  447. LSL_Float osAngleBetween(vector a, vector b);
  448. void osAdjustSoundVolume(LSL_Integer linknum, LSL_Float volume);
  449. void osLoopSound(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
  450. void osLoopSoundMaster(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
  451. void osLoopSoundSlave(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
  452. void osPlaySound(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
  453. void osPlaySoundSlave(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
  454. void osPreloadSound(LSL_Integer linknum, LSL_String sound);
  455. void osSetSoundRadius(LSL_Integer linknum, LSL_Float radius);
  456. void osStopSound(LSL_Integer linknum);
  457. void osTriggerSound(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
  458. void osTriggerSoundLimited(LSL_Integer linknum, LSL_String sound, LSL_Float volume,
  459. vector top_north_east, vector bottom_south_west);
  460. LSL_String osDetectedCountry(LSL_Integer number);
  461. LSL_String osGetAgentCountry(LSL_Key agentId);
  462. LSL_String osStringSubString(LSL_String src, LSL_Integer start);
  463. LSL_String osStringSubString(LSL_String src, LSL_Integer start, LSL_Integer length);
  464. LSL_Integer osStringStartsWith(LSL_String src, LSL_String value, LSL_Integer ignorecase);
  465. LSL_Integer osStringEndsWith(LSL_String src, LSL_String value, LSL_Integer ignorecase);
  466. LSL_Integer osStringIndexOf(LSL_String src, LSL_String value, LSL_Integer ignorecase);
  467. LSL_Integer osStringIndexOf(LSL_String src, LSL_String value, LSL_Integer start, LSL_Integer count, LSL_Integer ignorecase);
  468. LSL_Integer osStringLastIndexOf(LSL_String src, LSL_String value, LSL_Integer ignorecase);
  469. LSL_Integer osStringLastIndexOf(LSL_String src, LSL_String value, LSL_Integer start, LSL_Integer count, LSL_Integer ignorecase);
  470. LSL_String osStringRemove(LSL_String src, LSL_Integer start, LSL_Integer count);
  471. LSL_String osStringReplace(LSL_String src, LSL_String oldvalue, LSL_String newvalue);
  472. LSL_Integer osApproxEquals(LSL_Float a, LSL_Float b);
  473. LSL_Integer osApproxEquals(LSL_Float a, LSL_Float b, LSL_Float margin);
  474. LSL_Integer osApproxEquals(vector va, vector vb);
  475. LSL_Integer osApproxEquals(vector va, vector vb, LSL_Float margin);
  476. LSL_Integer osApproxEquals(rotation ra, rotation rb);
  477. LSL_Integer osApproxEquals(rotation ra, rotation rb, LSL_Float margin);
  478. LSL_Key osGetInventoryLastOwner(LSL_String itemNameOrId);
  479. LSL_Key osGetInventoryItemKey(LSL_String name);
  480. LSL_String osGetInventoryName(LSL_Key itemId);
  481. LSL_String osGetInventoryDesc(LSL_String itemNameOrId);
  482. LSL_Key osGetLastChangedEventKey();
  483. LSL_Float osGetPSTWallclock();
  484. LSL_Rotation osSlerp(LSL_Rotation a, LSL_Rotation b, LSL_Float amount);
  485. vector osSlerp(vector a, vector b, LSL_Float amount);
  486. void osResetAllScripts(LSL_Integer AllLinkset);
  487. LSL_Integer osIsNotValidNumber(LSL_Float v);
  488. void osSetSitActiveRange(LSL_Float v);
  489. void osSetLinkSitActiveRange(LSL_Integer linkNumber, LSL_Float v);
  490. LSL_Float osGetSitActiveRange();
  491. LSL_Float osGetLinkSitActiveRange(LSL_Integer linkNumber);
  492. void osSetStandTarget(vector v);
  493. void osSetLinkStandTarget(LSL_Integer linkNumber, vector v);
  494. vector osGetStandTarget();
  495. vector osGetLinkStandTarget(LSL_Integer linkNumber);
  496. LSL_Integer osClearObjectAnimations();
  497. LSL_Float osGetApparentTime();
  498. LSL_String osGetApparentTimeString(LSL_Integer format24);
  499. LSL_Float osGetApparentRegionTime();
  500. LSL_String osGetApparentRegionTimeString(LSL_Integer format24);
  501. LSL_Integer osReplaceAgentEnvironment(LSL_Key agentkey, LSL_Integer transition, LSL_String daycycle);
  502. LSL_Integer osReplaceParcelEnvironment(LSL_Integer transition, LSL_String daycycle);
  503. LSL_Integer osReplaceRegionEnvironment(LSL_Integer transition, LSL_String daycycle,
  504. LSL_Float daylen, LSL_Float dayoffset, LSL_Float altitude1, LSL_Float altitude2, LSL_Float altitude3);
  505. LSL_Integer osResetEnvironment(LSL_Integer parcelOrRegion, LSL_Integer transition);
  506. }
  507. }