ILSL_Api.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  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 LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
  29. using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
  30. using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
  31. using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
  32. using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
  33. using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
  34. using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
  35. namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
  36. {
  37. public interface ILSL_Api
  38. {
  39. void state(string newState);
  40. LSL_Integer llAbs(int i);
  41. LSL_Float llAcos(double val);
  42. void llAddToLandBanList(string avatar, double hours);
  43. void llAddToLandPassList(string avatar, double hours);
  44. void llAdjustSoundVolume(double volume);
  45. void llAllowInventoryDrop(int add);
  46. LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b);
  47. void llApplyImpulse(LSL_Vector force, int local);
  48. void llApplyRotationalImpulse(LSL_Vector force, int local);
  49. LSL_Float llAsin(double val);
  50. LSL_Float llAtan2(double x, double y);
  51. void llAttachToAvatar(int attachment);
  52. LSL_Key llAvatarOnSitTarget();
  53. LSL_Rotation llAxes2Rot(LSL_Vector fwd, LSL_Vector left, LSL_Vector up);
  54. LSL_Rotation llAxisAngle2Rot(LSL_Vector axis, double angle);
  55. LSL_Integer llBase64ToInteger(string str);
  56. LSL_String llBase64ToString(string str);
  57. void llBreakAllLinks();
  58. void llBreakLink(int linknum);
  59. LSL_Integer llCeil(double f);
  60. void llClearCameraParams();
  61. void llCloseRemoteDataChannel(string channel);
  62. LSL_Float llCloud(LSL_Vector offset);
  63. void llCollisionFilter(string name, string id, int accept);
  64. void llCollisionSound(string impact_sound, double impact_volume);
  65. void llCollisionSprite(string impact_sprite);
  66. LSL_Float llCos(double f);
  67. void llCreateLink(string target, int parent);
  68. LSL_List llCSV2List(string src);
  69. LSL_List llDeleteSubList(LSL_List src, int start, int end);
  70. LSL_String llDeleteSubString(string src, int start, int end);
  71. void llDetachFromAvatar();
  72. LSL_Vector llDetectedGrab(int number);
  73. LSL_Integer llDetectedGroup(int number);
  74. LSL_Key llDetectedKey(int number);
  75. LSL_Integer llDetectedLinkNumber(int number);
  76. LSL_String llDetectedName(int number);
  77. LSL_Key llDetectedOwner(int number);
  78. LSL_Vector llDetectedPos(int number);
  79. LSL_Rotation llDetectedRot(int number);
  80. LSL_Integer llDetectedType(int number);
  81. LSL_Vector llDetectedTouchBinormal(int index);
  82. LSL_Integer llDetectedTouchFace(int index);
  83. LSL_Vector llDetectedTouchNormal(int index);
  84. LSL_Vector llDetectedTouchPos(int index);
  85. LSL_Vector llDetectedTouchST(int index);
  86. LSL_Vector llDetectedTouchUV(int index);
  87. LSL_Vector llDetectedVel(int number);
  88. void llDialog(string avatar, string message, LSL_List buttons, int chat_channel);
  89. void llDie();
  90. LSL_String llDumpList2String(LSL_List src, string seperator);
  91. LSL_Integer llEdgeOfWorld(LSL_Vector pos, LSL_Vector dir);
  92. void llEjectFromLand(string pest);
  93. void llEmail(string address, string subject, string message);
  94. LSL_String llEscapeURL(string url);
  95. LSL_Rotation llEuler2Rot(LSL_Vector v);
  96. LSL_Float llFabs(double f);
  97. LSL_Integer llFloor(double f);
  98. void llForceMouselook(int mouselook);
  99. LSL_Float llFrand(double mag);
  100. LSL_Vector llGetAccel();
  101. LSL_Integer llGetAgentInfo(string id);
  102. LSL_String llGetAgentLanguage(string id);
  103. LSL_Vector llGetAgentSize(string id);
  104. LSL_Float llGetAlpha(int face);
  105. LSL_Float llGetAndResetTime();
  106. LSL_String llGetAnimation(string id);
  107. LSL_List llGetAnimationList(string id);
  108. LSL_Integer llGetAttached();
  109. LSL_List llGetBoundingBox(string obj);
  110. LSL_Vector llGetCameraPos();
  111. LSL_Rotation llGetCameraRot();
  112. LSL_Vector llGetCenterOfMass();
  113. LSL_Vector llGetColor(int face);
  114. LSL_String llGetCreator();
  115. LSL_String llGetDate();
  116. LSL_Float llGetEnergy();
  117. LSL_Vector llGetForce();
  118. LSL_Integer llGetFreeMemory();
  119. LSL_Integer llGetFreeURLs();
  120. LSL_Vector llGetGeometricCenter();
  121. LSL_Float llGetGMTclock();
  122. LSL_String llGetHTTPHeader(LSL_Key request_id, string header);
  123. LSL_Key llGetInventoryCreator(string item);
  124. LSL_Key llGetInventoryKey(string name);
  125. LSL_String llGetInventoryName(int type, int number);
  126. LSL_Integer llGetInventoryNumber(int type);
  127. LSL_Integer llGetInventoryPermMask(string item, int mask);
  128. LSL_Integer llGetInventoryType(string name);
  129. LSL_Key llGetKey();
  130. LSL_Key llGetLandOwnerAt(LSL_Vector pos);
  131. LSL_Key llGetLinkKey(int linknum);
  132. LSL_String llGetLinkName(int linknum);
  133. LSL_Integer llGetLinkNumber();
  134. LSL_List llGetLinkPrimitiveParams(int linknum, LSL_List rules);
  135. LSL_Integer llGetListEntryType(LSL_List src, int index);
  136. LSL_Integer llGetListLength(LSL_List src);
  137. LSL_Vector llGetLocalPos();
  138. LSL_Rotation llGetLocalRot();
  139. LSL_Float llGetMass();
  140. void llGetNextEmail(string address, string subject);
  141. LSL_String llGetNotecardLine(string name, int line);
  142. LSL_Key llGetNumberOfNotecardLines(string name);
  143. LSL_Integer llGetNumberOfPrims();
  144. LSL_Integer llGetNumberOfSides();
  145. LSL_String llGetObjectDesc();
  146. LSL_List llGetObjectDetails(string id, LSL_List args);
  147. LSL_Float llGetObjectMass(string id);
  148. LSL_String llGetObjectName();
  149. LSL_Integer llGetObjectPermMask(int mask);
  150. LSL_Integer llGetObjectPrimCount(string object_id);
  151. LSL_Vector llGetOmega();
  152. LSL_Key llGetOwner();
  153. LSL_Key llGetOwnerKey(string id);
  154. LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param);
  155. LSL_Integer llGetParcelFlags(LSL_Vector pos);
  156. LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide);
  157. LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide);
  158. LSL_List llGetParcelPrimOwners(LSL_Vector pos);
  159. LSL_Integer llGetPermissions();
  160. LSL_Key llGetPermissionsKey();
  161. LSL_Vector llGetPos();
  162. LSL_List llGetPrimitiveParams(LSL_List rules);
  163. LSL_Integer llGetRegionAgentCount();
  164. LSL_Vector llGetRegionCorner();
  165. LSL_Integer llGetRegionFlags();
  166. LSL_Float llGetRegionFPS();
  167. LSL_String llGetRegionName();
  168. LSL_Float llGetRegionTimeDilation();
  169. LSL_Vector llGetRootPosition();
  170. LSL_Rotation llGetRootRotation();
  171. LSL_Rotation llGetRot();
  172. LSL_Vector llGetScale();
  173. LSL_String llGetScriptName();
  174. LSL_Integer llGetScriptState(string name);
  175. LSL_String llGetSimulatorHostname();
  176. LSL_Integer llGetStartParameter();
  177. LSL_Integer llGetStatus(int status);
  178. LSL_String llGetSubString(string src, int start, int end);
  179. LSL_Vector llGetSunDirection();
  180. LSL_String llGetTexture(int face);
  181. LSL_Vector llGetTextureOffset(int face);
  182. LSL_Float llGetTextureRot(int side);
  183. LSL_Vector llGetTextureScale(int side);
  184. LSL_Float llGetTime();
  185. LSL_Float llGetTimeOfDay();
  186. LSL_String llGetTimestamp();
  187. LSL_Vector llGetTorque();
  188. LSL_Integer llGetUnixTime();
  189. LSL_Vector llGetVel();
  190. LSL_Float llGetWallclock();
  191. void llGiveInventory(string destination, string inventory);
  192. void llGiveInventoryList(string destination, string category, LSL_List inventory);
  193. LSL_Integer llGiveMoney(string destination, int amount);
  194. void llGodLikeRezObject(string inventory, LSL_Vector pos);
  195. LSL_Float llGround(LSL_Vector offset);
  196. LSL_Vector llGroundContour(LSL_Vector offset);
  197. LSL_Vector llGroundNormal(LSL_Vector offset);
  198. void llGroundRepel(double height, int water, double tau);
  199. LSL_Vector llGroundSlope(LSL_Vector offset);
  200. LSL_String llHTTPRequest(string url, LSL_List parameters, string body);
  201. void llHTTPResponse(LSL_Key id, int status, string body);
  202. LSL_String llInsertString(string dst, int position, string src);
  203. void llInstantMessage(string user, string message);
  204. LSL_String llIntegerToBase64(int number);
  205. LSL_String llKey2Name(string id);
  206. void llLinkParticleSystem(int linknum, LSL_List rules);
  207. LSL_String llList2CSV(LSL_List src);
  208. LSL_Float llList2Float(LSL_List src, int index);
  209. LSL_Integer llList2Integer(LSL_List src, int index);
  210. LSL_Key llList2Key(LSL_List src, int index);
  211. LSL_List llList2List(LSL_List src, int start, int end);
  212. LSL_List llList2ListStrided(LSL_List src, int start, int end, int stride);
  213. LSL_Rotation llList2Rot(LSL_List src, int index);
  214. LSL_String llList2String(LSL_List src, int index);
  215. LSL_Vector llList2Vector(LSL_List src, int index);
  216. LSL_Integer llListen(int channelID, string name, string ID, string msg);
  217. void llListenControl(int number, int active);
  218. void llListenRemove(int number);
  219. LSL_Integer llListFindList(LSL_List src, LSL_List test);
  220. LSL_List llListInsertList(LSL_List dest, LSL_List src, int start);
  221. LSL_List llListRandomize(LSL_List src, int stride);
  222. LSL_List llListReplaceList(LSL_List dest, LSL_List src, int start, int end);
  223. LSL_List llListSort(LSL_List src, int stride, int ascending);
  224. LSL_Float llListStatistics(int operation, LSL_List src);
  225. void llLoadURL(string avatar_id, string message, string url);
  226. LSL_Float llLog(double val);
  227. LSL_Float llLog10(double val);
  228. void llLookAt(LSL_Vector target, double strength, double damping);
  229. void llLoopSound(string sound, double volume);
  230. void llLoopSoundMaster(string sound, double volume);
  231. void llLoopSoundSlave(string sound, double volume);
  232. void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset);
  233. void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset);
  234. void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset);
  235. void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset);
  236. void llMapDestination(string simname, LSL_Vector pos, LSL_Vector look_at);
  237. LSL_String llMD5String(string src, int nonce);
  238. LSL_String llSHA1String(string src);
  239. void llMessageLinked(int linknum, int num, string str, string id);
  240. void llMinEventDelay(double delay);
  241. void llModifyLand(int action, int brush);
  242. LSL_Integer llModPow(int a, int b, int c);
  243. void llMoveToTarget(LSL_Vector target, double tau);
  244. void llOffsetTexture(double u, double v, int face);
  245. void llOpenRemoteDataChannel();
  246. LSL_Integer llOverMyLand(string id);
  247. void llOwnerSay(string msg);
  248. void llParcelMediaCommandList(LSL_List commandList);
  249. LSL_List llParcelMediaQuery(LSL_List aList);
  250. LSL_List llParseString2List(string str, LSL_List separators, LSL_List spacers);
  251. LSL_List llParseStringKeepNulls(string src, LSL_List seperators, LSL_List spacers);
  252. void llParticleSystem(LSL_List rules);
  253. void llPassCollisions(int pass);
  254. void llPassTouches(int pass);
  255. void llPlaySound(string sound, double volume);
  256. void llPlaySoundSlave(string sound, double volume);
  257. void llPointAt(LSL_Vector pos);
  258. LSL_Float llPow(double fbase, double fexponent);
  259. void llPreloadSound(string sound);
  260. void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local);
  261. void llRefreshPrimURL();
  262. void llRegionSay(int channelID, string text);
  263. void llReleaseCamera(string avatar);
  264. void llReleaseControls();
  265. void llReleaseURL(string url);
  266. void llRemoteDataReply(string channel, string message_id, string sdata, int idata);
  267. void llRemoteDataSetRegion();
  268. void llRemoteLoadScript(string target, string name, int running, int start_param);
  269. void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param);
  270. void llRemoveFromLandBanList(string avatar);
  271. void llRemoveFromLandPassList(string avatar);
  272. void llRemoveInventory(string item);
  273. void llRemoveVehicleFlags(int flags);
  274. LSL_Key llRequestAgentData(string id, int data);
  275. LSL_Key llRequestInventoryData(string name);
  276. void llRequestPermissions(string agent, int perm);
  277. LSL_String llRequestSecureURL();
  278. LSL_Key llRequestSimulatorData(string simulator, int data);
  279. LSL_Key llRequestURL();
  280. void llResetLandBanList();
  281. void llResetLandPassList();
  282. void llResetOtherScript(string name);
  283. void llResetScript();
  284. void llResetTime();
  285. void llRezAtRoot(string inventory, LSL_Vector position, LSL_Vector velocity, LSL_Rotation rot, int param);
  286. void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param);
  287. LSL_Float llRot2Angle(LSL_Rotation rot);
  288. LSL_Vector llRot2Axis(LSL_Rotation rot);
  289. LSL_Vector llRot2Euler(LSL_Rotation r);
  290. LSL_Vector llRot2Fwd(LSL_Rotation r);
  291. LSL_Vector llRot2Left(LSL_Rotation r);
  292. LSL_Vector llRot2Up(LSL_Rotation r);
  293. void llRotateTexture(double rotation, int face);
  294. LSL_Rotation llRotBetween(LSL_Vector start, LSL_Vector end);
  295. void llRotLookAt(LSL_Rotation target, double strength, double damping);
  296. LSL_Integer llRotTarget(LSL_Rotation rot, double error);
  297. void llRotTargetRemove(int number);
  298. LSL_Integer llRound(double f);
  299. LSL_Integer llSameGroup(string agent);
  300. void llSay(int channelID, string text);
  301. void llScaleTexture(double u, double v, int face);
  302. LSL_Integer llScriptDanger(LSL_Vector pos);
  303. LSL_Key llSendRemoteData(string channel, string dest, int idata, string sdata);
  304. void llSensor(string name, string id, int type, double range, double arc);
  305. void llSensorRemove();
  306. void llSensorRepeat(string name, string id, int type, double range, double arc, double rate);
  307. void llSetAlpha(double alpha, int face);
  308. void llSetBuoyancy(double buoyancy);
  309. void llSetCameraAtOffset(LSL_Vector offset);
  310. void llSetCameraEyeOffset(LSL_Vector offset);
  311. void llSetCameraParams(LSL_List rules);
  312. void llSetClickAction(int action);
  313. void llSetColor(LSL_Vector color, int face);
  314. void llSetDamage(double damage);
  315. void llSetForce(LSL_Vector force, int local);
  316. void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local);
  317. void llSetHoverHeight(double height, int water, double tau);
  318. void llSetInventoryPermMask(string item, int mask, int value);
  319. void llSetLinkAlpha(int linknumber, double alpha, int face);
  320. void llSetLinkColor(int linknumber, LSL_Vector color, int face);
  321. void llSetLinkPrimitiveParams(int linknumber, LSL_List rules);
  322. void llSetLinkTexture(int linknumber, string texture, int face);
  323. void llSetLinkTextureAnim(int linknum, int mode, int face, int sizex, int sizey, double start, double length, double rate);
  324. void llSetLocalRot(LSL_Rotation rot);
  325. void llSetObjectDesc(string desc);
  326. void llSetObjectName(string name);
  327. void llSetObjectPermMask(int mask, int value);
  328. void llSetParcelMusicURL(string url);
  329. void llSetPayPrice(int price, LSL_List quick_pay_buttons);
  330. void llSetPos(LSL_Vector pos);
  331. void llSetPrimitiveParams(LSL_List rules);
  332. void llSetLinkPrimitiveParamsFast(int linknum, LSL_List rules);
  333. void llSetPrimURL(string url);
  334. void llSetRemoteScriptAccessPin(int pin);
  335. void llSetRot(LSL_Rotation rot);
  336. void llSetScale(LSL_Vector scale);
  337. void llSetScriptState(string name, int run);
  338. void llSetSitText(string text);
  339. void llSetSoundQueueing(int queue);
  340. void llSetSoundRadius(double radius);
  341. void llSetStatus(int status, int value);
  342. void llSetText(string text, LSL_Vector color, double alpha);
  343. void llSetTexture(string texture, int face);
  344. void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate);
  345. void llSetTimerEvent(double sec);
  346. void llSetTorque(LSL_Vector torque, int local);
  347. void llSetTouchText(string text);
  348. void llSetVehicleFlags(int flags);
  349. void llSetVehicleFloatParam(int param, LSL_Float value);
  350. void llSetVehicleRotationParam(int param, LSL_Rotation rot);
  351. void llSetVehicleType(int type);
  352. void llSetVehicleVectorParam(int param, LSL_Vector vec);
  353. void llShout(int channelID, string text);
  354. LSL_Float llSin(double f);
  355. void llSitTarget(LSL_Vector offset, LSL_Rotation rot);
  356. void llSleep(double sec);
  357. void llSound(string sound, double volume, int queue, int loop);
  358. void llSoundPreload(string sound);
  359. LSL_Float llSqrt(double f);
  360. void llStartAnimation(string anim);
  361. void llStopAnimation(string anim);
  362. void llStopHover();
  363. void llStopLookAt();
  364. void llStopMoveToTarget();
  365. void llStopPointAt();
  366. void llStopSound();
  367. LSL_Integer llStringLength(string str);
  368. LSL_String llStringToBase64(string str);
  369. LSL_String llStringTrim(string src, int type);
  370. LSL_Integer llSubStringIndex(string source, string pattern);
  371. void llTakeCamera(string avatar);
  372. void llTakeControls(int controls, int accept, int pass_on);
  373. LSL_Float llTan(double f);
  374. LSL_Integer llTarget(LSL_Vector position, double range);
  375. void llTargetOmega(LSL_Vector axis, double spinrate, double gain);
  376. void llTargetRemove(int number);
  377. void llTeleportAgentHome(string agent);
  378. void llTextBox(string avatar, string message, int chat_channel);
  379. LSL_String llToLower(string source);
  380. LSL_String llToUpper(string source);
  381. void llTriggerSound(string sound, double volume);
  382. void llTriggerSoundLimited(string sound, double volume, LSL_Vector top_north_east, LSL_Vector bottom_south_west);
  383. LSL_String llUnescapeURL(string url);
  384. void llUnSit(string id);
  385. LSL_Float llVecDist(LSL_Vector a, LSL_Vector b);
  386. LSL_Float llVecMag(LSL_Vector v);
  387. LSL_Vector llVecNorm(LSL_Vector v);
  388. void llVolumeDetect(int detect);
  389. LSL_Float llWater(LSL_Vector offset);
  390. void llWhisper(int channelID, string text);
  391. LSL_Vector llWind(LSL_Vector offset);
  392. LSL_String llXorBase64Strings(string str1, string str2);
  393. LSL_String llXorBase64StringsCorrect(string str1, string str2);
  394. void SetPrimitiveParamsEx(LSL_Key prim, LSL_List rules);
  395. LSL_List GetLinkPrimitiveParamsEx(LSL_Key prim, LSL_List rules);
  396. }
  397. }