IOSSL_Api.cs 31 KB

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