IOSSL_Api.cs 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  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 osSetParcelMediaURL(string url);
  130. void osSetPrimFloatOnWater(int floatYN);
  131. void osSetParcelSIPAddress(string SIPAddress);
  132. // Avatar Info Commands
  133. LSL_List osGetAgents();
  134. string osGetAgentIP(string agent);
  135. // Teleport commands
  136. void osLocalTeleportAgent(LSL_Key agent, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, LSL_Types.Vector3 lookat, LSL_Integer flags);
  137. void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  138. void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  139. void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  140. void osTeleportOwner(string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  141. void osTeleportOwner(int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  142. void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  143. // Animation commands
  144. void osAvatarPlayAnimation(LSL_Key avatarId, string animation);
  145. void osAvatarStopAnimation(LSL_Key avatarId, string animation);
  146. #region Attachment commands
  147. /// <summary>
  148. /// Attach the object containing this script to the avatar that owns it without asking for PERMISSION_ATTACH
  149. /// </summary>
  150. /// <param name='attachment'>The attachment point. For example, ATTACH_CHEST</param>
  151. void osForceAttachToAvatar(int attachment);
  152. /// <summary>
  153. /// Attach an inventory item in the object containing this script to the avatar that owns it without asking for PERMISSION_ATTACH
  154. /// </summary>
  155. /// <remarks>
  156. /// Nothing happens if the owner is not in the region.
  157. /// </remarks>
  158. /// <param name='itemName'>Tha name of the item. If this is not found then a warning is said to the owner</param>
  159. /// <param name='attachment'>The attachment point. For example, ATTACH_CHEST</param>
  160. void osForceAttachToAvatarFromInventory(string itemName, int attachment);
  161. /// <summary>
  162. /// Attach an inventory item in the object containing this script to any avatar in the region without asking for PERMISSION_ATTACH
  163. /// </summary>
  164. /// <remarks>
  165. /// Nothing happens if the avatar is not in the region.
  166. /// </remarks>
  167. /// <param name='rawAvatarId'>The UUID of the avatar to which to attach. Nothing happens if this is not a UUID</para>
  168. /// <param name='itemName'>The name of the item. If this is not found then a warning is said to the owner</param>
  169. /// <param name='attachment'>The attachment point. For example, ATTACH_CHEST</param>
  170. void osForceAttachToOtherAvatarFromInventory(string rawAvatarId, string itemName, int attachmentPoint);
  171. /// <summary>
  172. /// Detach the object containing this script from the avatar it is attached to without checking for PERMISSION_ATTACH
  173. /// </summary>
  174. /// <remarks>Nothing happens if the object is not attached.</remarks>
  175. void osForceDetachFromAvatar();
  176. /// <summary>
  177. /// Returns a strided list of the specified attachment points and the number of attachments on those points.
  178. /// </summary>
  179. /// <param name="avatar">avatar UUID</param>
  180. /// <param name="attachmentPoints">list of ATTACH_* constants</param>
  181. /// <returns></returns>
  182. LSL_List osGetNumberOfAttachments(LSL_Key avatar, LSL_List attachmentPoints);
  183. /// <summary>
  184. /// Sends a specified message to the specified avatar's attachments on
  185. /// the specified attachment points.
  186. /// </summary>
  187. /// <remarks>
  188. /// Behaves as osMessageObject(), without the sending script needing to know the attachment keys in advance.
  189. /// </remarks>
  190. /// <param name="avatar">avatar UUID</param>
  191. /// <param name="message">message string</param>
  192. /// <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>
  193. /// <param name="flags">flags further constraining the attachments to deliver the message to.</param>
  194. void osMessageAttachments(LSL_Key avatar, string message, LSL_List attachmentPoints, int flags);
  195. #endregion
  196. //texture draw functions
  197. string osMovePen(string drawList, int x, int y);
  198. string osDrawLine(string drawList, int startX, int startY, int endX, int endY);
  199. string osDrawLine(string drawList, int endX, int endY);
  200. string osDrawText(string drawList, string text);
  201. string osDrawEllipse(string drawList, int width, int height);
  202. string osDrawFilledEllipse(string drawList, int width, int height);
  203. string osDrawRectangle(string drawList, int width, int height);
  204. string osDrawFilledRectangle(string drawList, int width, int height);
  205. string osDrawPolygon(string drawList, LSL_List x, LSL_List y);
  206. string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y);
  207. string osDrawResetTransform(string drawList);
  208. string osDrawRotationTransform(string drawList, LSL_Float x);
  209. string osDrawScaleTransform(string drawList, LSL_Float x, LSL_Float y);
  210. string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y);
  211. string osSetFontName(string drawList, string fontName);
  212. string osSetFontSize(string drawList, int fontSize);
  213. string osSetPenSize(string drawList, int penSize);
  214. string osSetPenColor(string drawList, string color);
  215. string osSetPenColour(string drawList, string colour); // Deprecated
  216. string osSetPenCap(string drawList, string direction, string type);
  217. string osDrawImage(string drawList, int width, int height, string imageUrl);
  218. vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize);
  219. void osSetStateEvents(int events);
  220. void osSetRegionWaterHeight(double height);
  221. void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour);
  222. void osSetEstateSunSettings(bool sunFixed, double sunHour);
  223. double osGetCurrentSunHour();
  224. double osGetSunParam(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. // Grid Info Functions
  251. string osGetGridNick();
  252. string osGetGridName();
  253. string osGetGridLoginURI();
  254. string osGetGridHomeURI();
  255. string osGetGridGatekeeperURI();
  256. string osGetGridCustom(string key);
  257. string osGetAvatarHomeURI(string uuid);
  258. LSL_String osFormatString(string str, LSL_List strings);
  259. LSL_List osMatchString(string src, string pattern, int start);
  260. LSL_String osReplaceString(string src, string pattern, string replace, int count, int start);
  261. // Information about data loaded into the region
  262. string osLoadedCreationDate();
  263. string osLoadedCreationTime();
  264. string osLoadedCreationID();
  265. LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules);
  266. /// <summary>
  267. /// Identical to llCreateLink() but does not require permission from the owner.
  268. /// </summary>
  269. /// <param name='target'></param>
  270. /// <param name='parent'></param>
  271. void osForceCreateLink(string target, int parent);
  272. /// <summary>
  273. /// Identical to llBreakLink() but does not require permission from the owner.
  274. /// </summary>
  275. /// <param name='linknum'></param>
  276. void osForceBreakLink(int linknum);
  277. /// <summary>
  278. /// Identical to llBreakAllLinks() but does not require permission from the owner.
  279. /// </summary>
  280. void osForceBreakAllLinks();
  281. /// <summary>
  282. /// Similar to llDie but given an object UUID
  283. /// </summary>
  284. /// <param name="objectUUID"></param>
  285. void osDie(LSL_Key objectUUID);
  286. /// <summary>
  287. /// Check if the given key is an npc
  288. /// </summary>
  289. /// <param name="npc"></param>
  290. /// <returns>TRUE if the key belongs to an npc in the scene. FALSE otherwise.</returns>
  291. LSL_Integer osIsNpc(LSL_Key npc);
  292. key osNpcCreate(string user, string name, vector position, string notecard);
  293. key osNpcCreate(string user, string name, vector position, string notecard, int options);
  294. LSL_Key osNpcSaveAppearance(key npc, string notecard);
  295. void osNpcLoadAppearance(key npc, string notecard);
  296. vector osNpcGetPos(key npc);
  297. void osNpcMoveTo(key npc, vector position);
  298. void osNpcMoveToTarget(key npc, vector target, int options);
  299. /// <summary>
  300. /// Get the owner of the NPC
  301. /// </summary>
  302. /// <param name="npc"></param>
  303. /// <returns>
  304. /// 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.
  305. /// </returns>
  306. LSL_Key osNpcGetOwner(key npc);
  307. rotation osNpcGetRot(key npc);
  308. void osNpcSetRot(LSL_Key npc, rotation rot);
  309. void osNpcStopMoveToTarget(LSL_Key npc);
  310. void osNpcSetProfileAbout(LSL_Key npc, string about);
  311. void osNpcSetProfileImage(LSL_Key npc, string image);
  312. void osNpcSay(key npc, string message);
  313. void osNpcSay(key npc, int channel, string message);
  314. void osNpcSayTo(LSL_Key npc, LSL_Key target, int channel, string msg);
  315. void osNpcShout(key npc, int channel, string message);
  316. void osNpcSit(key npc, key target, int options);
  317. void osNpcStand(LSL_Key npc);
  318. void osNpcRemove(key npc);
  319. void osNpcPlayAnimation(LSL_Key npc, string animation);
  320. void osNpcStopAnimation(LSL_Key npc, string animation);
  321. void osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num);
  322. void osNpcWhisper(key npc, int channel, string message);
  323. LSL_Key osOwnerSaveAppearance(string notecard);
  324. LSL_Key osAgentSaveAppearance(key agentId, string notecard);
  325. key osGetGender(LSL_Key rawAvatarId);
  326. key osGetMapTexture();
  327. key osGetRegionMapTexture(string regionNameOrID);
  328. LSL_List osGetRegionStats();
  329. vector osGetRegionSize();
  330. int osGetSimulatorMemory();
  331. int osGetSimulatorMemoryKB();
  332. void osKickAvatar(string FirstName, string SurName, string alert);
  333. void osKickAvatar(LSL_Key agentId, string alert);
  334. void osSetSpeed(string UUID, LSL_Float SpeedModifier);
  335. void osSetOwnerSpeed(LSL_Float SpeedModifier);
  336. LSL_Float osGetHealth(key agentId);
  337. void osCauseHealing(key agentId, LSL_Float healing);
  338. void osSetHealth(key agentId, LSL_Float health);
  339. void osSetHealRate(key agentId, LSL_Float health);
  340. LSL_Float osGetHealRate(key agentId);
  341. void osCauseDamage(key avatar, LSL_Float damage);
  342. void osForceOtherSit(string avatar);
  343. void osForceOtherSit(string avatar, string target);
  344. LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules);
  345. void osSetPrimitiveParams(LSL_Key prim, LSL_List rules);
  346. void osSetProjectionParams(LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb);
  347. void osSetProjectionParams(LSL_Key prim, LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb);
  348. void osSetProjectionParams(LSL_Integer linknumber, LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb);
  349. LSL_List osGetAvatarList();
  350. LSL_List osGetNPCList();
  351. LSL_String osUnixTimeToTimestamp(LSL_Integer time);
  352. LSL_Integer osInviteToGroup(LSL_Key agentId);
  353. LSL_Integer osEjectFromGroup(LSL_Key agentId);
  354. void osSetTerrainTexture(int level, LSL_Key texture);
  355. void osSetTerrainTextureHeight(int corner, double low, double high);
  356. /// <summary>
  357. /// Checks if thing is a UUID.
  358. /// </summary>
  359. /// <param name="thing"></param>
  360. /// <returns>1 if thing is a valid UUID, 0 otherwise</returns>
  361. LSL_Integer osIsUUID(string thing);
  362. /// <summary>
  363. /// Wraps to Math.Min()
  364. /// </summary>
  365. /// <param name="a"></param>
  366. /// <param name="b"></param>
  367. /// <returns></returns>
  368. LSL_Float osMin(double a, double b);
  369. /// <summary>
  370. /// Wraps to Math.max()
  371. /// </summary>
  372. /// <param name="a"></param>
  373. /// <param name="b"></param>
  374. /// <returns></returns>
  375. LSL_Float osMax(double a, double b);
  376. /// <summary>
  377. /// Get the key of the object that rezzed this object.
  378. /// </summary>
  379. /// <returns>Rezzing object key or NULL_KEY if rezzed by agent or otherwise unknown.</returns>
  380. LSL_Key osGetRezzingObject();
  381. /// <summary>
  382. /// Sets the response type for an HTTP request/response
  383. /// </summary>
  384. /// <returns></returns>
  385. void osSetContentType(LSL_Key id, string type);
  386. /// <summary>
  387. /// Attempts to drop an attachment to the ground
  388. /// </summary>
  389. void osDropAttachment();
  390. /// <summary>
  391. /// Attempts to drop an attachment to the ground while bypassing the script permissions
  392. /// </summary>
  393. void osForceDropAttachment();
  394. /// <summary>
  395. /// Attempts to drop an attachment at the specified coordinates.
  396. /// </summary>
  397. /// <param name="pos"></param>
  398. /// <param name="rot"></param>
  399. void osDropAttachmentAt(vector pos, rotation rot);
  400. /// <summary>
  401. /// Attempts to drop an attachment at the specified coordinates while bypassing the script permissions
  402. /// </summary>
  403. /// <param name="pos"></param>
  404. /// <param name="rot"></param>
  405. void osForceDropAttachmentAt(vector pos, rotation rot);
  406. /// <summary>
  407. /// Identical to llListen except for a bitfield which indicates which
  408. /// string parameters should be parsed as regex patterns.
  409. /// </summary>
  410. /// <param name="channelID"></param>
  411. /// <param name="name"></param>
  412. /// <param name="ID"></param>
  413. /// <param name="msg"></param>
  414. /// <param name="regexBitfield">
  415. /// OS_LISTEN_REGEX_NAME
  416. /// OS_LISTEN_REGEX_MESSAGE
  417. /// </param>
  418. /// <returns></returns>
  419. LSL_Integer osListenRegex(int channelID, string name, string ID,
  420. string msg, int regexBitfield);
  421. /// <summary>
  422. /// Wraps to bool Regex.IsMatch(string input, string pattern)
  423. /// </summary>
  424. /// <param name="input">string to test for match</param>
  425. /// <param name="regex">string to use as pattern</param>
  426. /// <returns>boolean</returns>
  427. LSL_Integer osRegexIsMatch(string input, string pattern);
  428. LSL_String osRequestURL(LSL_List options);
  429. LSL_String osRequestSecureURL(LSL_List options);
  430. void osCollisionSound(string impact_sound, double impact_volume);
  431. void osVolumeDetect(int detect);
  432. LSL_List osGetInertiaData();
  433. void osClearInertia();
  434. void osSetInertia(LSL_Float mass, vector centerOfMass, vector principalInertiaScaled, rotation rot);
  435. void osSetInertiaAsBox(LSL_Float mass, vector boxSize, vector centerOfMass, rotation rot);
  436. void osSetInertiaAsSphere(LSL_Float mass, LSL_Float radius, vector centerOfMass);
  437. void osSetInertiaAsCylinder(LSL_Float mass, LSL_Float radius, LSL_Float lenght, vector centerOfMass,rotation lslrot);
  438. LSL_Integer osTeleportObject(LSL_Key objectUUID, vector targetPos, rotation targetrotation, LSL_Integer flags);
  439. LSL_Integer osGetLinkNumber(LSL_String name);
  440. LSL_Float osRound(LSL_Float value, LSL_Integer digits);
  441. LSL_Float osVecMagSquare(vector a);
  442. LSL_Float osVecDistSquare(vector a, vector b);
  443. LSL_Float osAngleBetween(vector a, vector b);
  444. void osAdjustSoundVolume(LSL_Integer linknum, LSL_Float volume);
  445. void osLoopSound(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
  446. void osLoopSoundMaster(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
  447. void osLoopSoundSlave(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
  448. void osPlaySound(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
  449. void osPlaySoundSlave(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
  450. void osPreloadSound(LSL_Integer linknum, LSL_String sound);
  451. void osSetSoundRadius(LSL_Integer linknum, LSL_Float radius);
  452. void osStopSound(LSL_Integer linknum);
  453. void osTriggerSound(LSL_Integer linknum, LSL_String sound, LSL_Float volume);
  454. void osTriggerSoundLimited(LSL_Integer linknum, LSL_String sound, LSL_Float volume,
  455. vector top_north_east, vector bottom_south_west);
  456. LSL_String osDetectedCountry(LSL_Integer number);
  457. LSL_String osGetAgentCountry(LSL_Key agentId);
  458. LSL_String osStringSubString(LSL_String src, LSL_Integer start);
  459. LSL_String osStringSubString(LSL_String src, LSL_Integer start, LSL_Integer length);
  460. LSL_Integer osStringStartsWith(LSL_String src, LSL_String value, LSL_Integer ignorecase);
  461. LSL_Integer osStringEndsWith(LSL_String src, LSL_String value, LSL_Integer ignorecase);
  462. LSL_Integer osStringIndexOf(LSL_String src, LSL_String value, LSL_Integer ignorecase);
  463. LSL_Integer osStringIndexOf(LSL_String src, LSL_String value, LSL_Integer start, LSL_Integer count, LSL_Integer ignorecase);
  464. LSL_Integer osStringLastIndexOf(LSL_String src, LSL_String value, LSL_Integer ignorecase);
  465. LSL_Integer osStringLastIndexOf(LSL_String src, LSL_String value, LSL_Integer start, LSL_Integer count, LSL_Integer ignorecase);
  466. LSL_String osStringRemove(LSL_String src, LSL_Integer start, LSL_Integer count);
  467. LSL_String osStringReplace(LSL_String src, LSL_String oldvalue, LSL_String newvalue);
  468. LSL_Integer osApproxEquals(LSL_Float a, LSL_Float b);
  469. LSL_Integer osApproxEquals(LSL_Float a, LSL_Float b, LSL_Float margin);
  470. LSL_Integer osApproxEquals(vector va, vector vb);
  471. LSL_Integer osApproxEquals(vector va, vector vb, LSL_Float margin);
  472. LSL_Integer osApproxEquals(rotation ra, rotation rb);
  473. LSL_Integer osApproxEquals(rotation ra, rotation rb, LSL_Float margin);
  474. LSL_Key osGetInventoryLastOwner(LSL_String itemNameOrId);
  475. LSL_Key osGetInventoryItemKey(LSL_String name);
  476. LSL_String osGetInventoryName(LSL_Key itemId);
  477. LSL_String osGetInventoryDesc(LSL_String itemNameOrId);
  478. LSL_Key osGetLastChangedEventKey();
  479. LSL_Float osGetPSTWallclock();
  480. LSL_Rotation osSlerp(LSL_Rotation a, LSL_Rotation b, LSL_Float amount);
  481. void osResetAllScripts(LSL_Integer AllLinkset);
  482. LSL_Integer osIsNotValidNumber(LSL_Float v);
  483. }
  484. }