ILSL_Api.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  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 OpenSim 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_Vector llGetGeometricCenter();
  120. LSL_Float llGetGMTclock();
  121. LSL_Key llGetInventoryCreator(string item);
  122. LSL_Key llGetInventoryKey(string name);
  123. LSL_String llGetInventoryName(int type, int number);
  124. LSL_Integer llGetInventoryNumber(int type);
  125. LSL_Integer llGetInventoryPermMask(string item, int mask);
  126. LSL_Integer llGetInventoryType(string name);
  127. LSL_Key llGetKey();
  128. LSL_Key llGetLandOwnerAt(LSL_Vector pos);
  129. LSL_Key llGetLinkKey(int linknum);
  130. LSL_String llGetLinkName(int linknum);
  131. LSL_Integer llGetLinkNumber();
  132. LSL_Integer llGetListEntryType(LSL_List src, int index);
  133. LSL_Integer llGetListLength(LSL_List src);
  134. LSL_Vector llGetLocalPos();
  135. LSL_Rotation llGetLocalRot();
  136. LSL_Float llGetMass();
  137. void llGetNextEmail(string address, string subject);
  138. LSL_String llGetNotecardLine(string name, int line);
  139. LSL_Key llGetNumberOfNotecardLines(string name);
  140. LSL_Integer llGetNumberOfPrims();
  141. LSL_Integer llGetNumberOfSides();
  142. LSL_String llGetObjectDesc();
  143. LSL_List llGetObjectDetails(string id, LSL_List args);
  144. LSL_Float llGetObjectMass(string id);
  145. LSL_String llGetObjectName();
  146. LSL_Integer llGetObjectPermMask(int mask);
  147. LSL_Integer llGetObjectPrimCount(string object_id);
  148. LSL_Vector llGetOmega();
  149. LSL_Key llGetOwner();
  150. LSL_Key llGetOwnerKey(string id);
  151. LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param);
  152. LSL_Integer llGetParcelFlags(LSL_Vector pos);
  153. LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide);
  154. LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide);
  155. LSL_List llGetParcelPrimOwners(LSL_Vector pos);
  156. LSL_Integer llGetPermissions();
  157. LSL_Key llGetPermissionsKey();
  158. LSL_Vector llGetPos();
  159. LSL_List llGetPrimitiveParams(LSL_List rules);
  160. LSL_Integer llGetRegionAgentCount();
  161. LSL_Vector llGetRegionCorner();
  162. LSL_Integer llGetRegionFlags();
  163. LSL_Float llGetRegionFPS();
  164. LSL_String llGetRegionName();
  165. LSL_Float llGetRegionTimeDilation();
  166. LSL_Vector llGetRootPosition();
  167. LSL_Rotation llGetRootRotation();
  168. LSL_Rotation llGetRot();
  169. LSL_Vector llGetScale();
  170. LSL_String llGetScriptName();
  171. LSL_Integer llGetScriptState(string name);
  172. LSL_String llGetSimulatorHostname();
  173. LSL_Integer llGetStartParameter();
  174. LSL_Integer llGetStatus(int status);
  175. LSL_String llGetSubString(string src, int start, int end);
  176. LSL_Vector llGetSunDirection();
  177. LSL_String llGetTexture(int face);
  178. LSL_Vector llGetTextureOffset(int face);
  179. LSL_Float llGetTextureRot(int side);
  180. LSL_Vector llGetTextureScale(int side);
  181. LSL_Float llGetTime();
  182. LSL_Float llGetTimeOfDay();
  183. LSL_String llGetTimestamp();
  184. LSL_Vector llGetTorque();
  185. LSL_Integer llGetUnixTime();
  186. LSL_Vector llGetVel();
  187. LSL_Float llGetWallclock();
  188. void llGiveInventory(string destination, string inventory);
  189. void llGiveInventoryList(string destination, string category, LSL_List inventory);
  190. LSL_Integer llGiveMoney(string destination, int amount);
  191. void llGodLikeRezObject(string inventory, LSL_Vector pos);
  192. LSL_Float llGround(LSL_Vector offset);
  193. LSL_Vector llGroundContour(LSL_Vector offset);
  194. LSL_Vector llGroundNormal(LSL_Vector offset);
  195. void llGroundRepel(double height, int water, double tau);
  196. LSL_Vector llGroundSlope(LSL_Vector offset);
  197. LSL_String llHTTPRequest(string url, LSL_List parameters, string body);
  198. LSL_String llInsertString(string dst, int position, string src);
  199. void llInstantMessage(string user, string message);
  200. LSL_String llIntegerToBase64(int number);
  201. LSL_String llKey2Name(string id);
  202. LSL_String llList2CSV(LSL_List src);
  203. LSL_Float llList2Float(LSL_List src, int index);
  204. LSL_Integer llList2Integer(LSL_List src, int index);
  205. LSL_Key llList2Key(LSL_List src, int index);
  206. LSL_List llList2List(LSL_List src, int start, int end);
  207. LSL_List llList2ListStrided(LSL_List src, int start, int end, int stride);
  208. LSL_Rotation llList2Rot(LSL_List src, int index);
  209. LSL_String llList2String(LSL_List src, int index);
  210. LSL_Vector llList2Vector(LSL_List src, int index);
  211. LSL_Integer llListen(int channelID, string name, string ID, string msg);
  212. void llListenControl(int number, int active);
  213. void llListenRemove(int number);
  214. LSL_Integer llListFindList(LSL_List src, LSL_List test);
  215. LSL_List llListInsertList(LSL_List dest, LSL_List src, int start);
  216. LSL_List llListRandomize(LSL_List src, int stride);
  217. LSL_List llListReplaceList(LSL_List dest, LSL_List src, int start, int end);
  218. LSL_List llListSort(LSL_List src, int stride, int ascending);
  219. LSL_Float llListStatistics(int operation, LSL_List src);
  220. void llLoadURL(string avatar_id, string message, string url);
  221. LSL_Float llLog(double val);
  222. LSL_Float llLog10(double val);
  223. void llLookAt(LSL_Vector target, double strength, double damping);
  224. void llLoopSound(string sound, double volume);
  225. void llLoopSoundMaster(string sound, double volume);
  226. void llLoopSoundSlave(string sound, double volume);
  227. void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset);
  228. void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset);
  229. void llMakeFountain(int particles, float scale, float vel, float lifetime, float arc, int bounce, string texture, LSL_Vector offset, float bounce_offset);
  230. void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset);
  231. void llMapDestination(string simname, LSL_Vector pos, LSL_Vector look_at);
  232. LSL_String llMD5String(string src, int nonce);
  233. void llMessageLinked(int linknum, int num, string str, string id);
  234. void llMinEventDelay(double delay);
  235. void llModifyLand(int action, int brush);
  236. LSL_Integer llModPow(int a, int b, int c);
  237. void llMoveToTarget(LSL_Vector target, double tau);
  238. void llOffsetTexture(double u, double v, int face);
  239. void llOpenRemoteDataChannel();
  240. LSL_Integer llOverMyLand(string id);
  241. void llOwnerSay(string msg);
  242. void llParcelMediaCommandList(LSL_List commandList);
  243. LSL_List llParcelMediaQuery(LSL_List aList);
  244. LSL_List llParseString2List(string str, LSL_List separators, LSL_List spacers);
  245. LSL_List llParseStringKeepNulls(string src, LSL_List seperators, LSL_List spacers);
  246. void llParticleSystem(LSL_List rules);
  247. void llPassCollisions(int pass);
  248. void llPassTouches(int pass);
  249. void llPlaySound(string sound, double volume);
  250. void llPlaySoundSlave(string sound, double volume);
  251. void llPointAt(LSL_Vector pos);
  252. LSL_Float llPow(double fbase, double fexponent);
  253. void llPreloadSound(string sound);
  254. void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local);
  255. void llRefreshPrimURL();
  256. void llRegionSay(int channelID, string text);
  257. void llReleaseCamera(string avatar);
  258. void llReleaseControls();
  259. void llRemoteDataReply(string channel, string message_id, string sdata, int idata);
  260. void llRemoteDataSetRegion();
  261. void llRemoteLoadScript(string target, string name, int running, int start_param);
  262. void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param);
  263. void llRemoveFromLandBanList(string avatar);
  264. void llRemoveFromLandPassList(string avatar);
  265. void llRemoveInventory(string item);
  266. void llRemoveVehicleFlags(int flags);
  267. LSL_Key llRequestAgentData(string id, int data);
  268. LSL_Key llRequestInventoryData(string name);
  269. void llRequestPermissions(string agent, int perm);
  270. LSL_Key llRequestSimulatorData(string simulator, int data);
  271. void llResetLandBanList();
  272. void llResetLandPassList();
  273. void llResetOtherScript(string name);
  274. void llResetScript();
  275. void llResetTime();
  276. void llRezAtRoot(string inventory, LSL_Vector position, LSL_Vector velocity, LSL_Rotation rot, int param);
  277. void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param);
  278. LSL_Float llRot2Angle(LSL_Rotation rot);
  279. LSL_Vector llRot2Axis(LSL_Rotation rot);
  280. LSL_Vector llRot2Euler(LSL_Rotation r);
  281. LSL_Vector llRot2Fwd(LSL_Rotation r);
  282. LSL_Vector llRot2Left(LSL_Rotation r);
  283. LSL_Vector llRot2Up(LSL_Rotation r);
  284. void llRotateTexture(double rotation, int face);
  285. LSL_Rotation llRotBetween(LSL_Vector start, LSL_Vector end);
  286. void llRotLookAt(LSL_Rotation target, double strength, double damping);
  287. LSL_Integer llRotTarget(LSL_Rotation rot, double error);
  288. void llRotTargetRemove(int number);
  289. LSL_Integer llRound(double f);
  290. LSL_Integer llSameGroup(string agent);
  291. void llSay(int channelID, string text);
  292. void llScaleTexture(double u, double v, int face);
  293. LSL_Integer llScriptDanger(LSL_Vector pos);
  294. LSL_Key llSendRemoteData(string channel, string dest, int idata, string sdata);
  295. void llSensor(string name, string id, int type, double range, double arc);
  296. void llSensorRemove();
  297. void llSensorRepeat(string name, string id, int type, double range, double arc, double rate);
  298. void llSetAlpha(double alpha, int face);
  299. void llSetBuoyancy(double buoyancy);
  300. void llSetCameraAtOffset(LSL_Vector offset);
  301. void llSetCameraEyeOffset(LSL_Vector offset);
  302. void llSetCameraParams(LSL_List rules);
  303. void llSetClickAction(int action);
  304. void llSetColor(LSL_Vector color, int face);
  305. void llSetDamage(double damage);
  306. void llSetForce(LSL_Vector force, int local);
  307. void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local);
  308. void llSetHoverHeight(double height, int water, double tau);
  309. void llSetInventoryPermMask(string item, int mask, int value);
  310. void llSetLinkAlpha(int linknumber, double alpha, int face);
  311. void llSetLinkColor(int linknumber, LSL_Vector color, int face);
  312. void llSetLinkPrimitiveParams(int linknumber, LSL_List rules);
  313. void llSetLinkTexture(int linknumber, string texture, int face);
  314. void llSetLocalRot(LSL_Rotation rot);
  315. void llSetObjectDesc(string desc);
  316. void llSetObjectName(string name);
  317. void llSetObjectPermMask(int mask, int value);
  318. void llSetParcelMusicURL(string url);
  319. void llSetPayPrice(int price, LSL_List quick_pay_buttons);
  320. void llSetPos(LSL_Vector pos);
  321. void llSetPrimitiveParams(LSL_List rules);
  322. void llSetPrimURL(string url);
  323. void llSetRemoteScriptAccessPin(int pin);
  324. void llSetRot(LSL_Rotation rot);
  325. void llSetScale(LSL_Vector scale);
  326. void llSetScriptState(string name, int run);
  327. void llSetSitText(string text);
  328. void llSetSoundQueueing(int queue);
  329. void llSetSoundRadius(double radius);
  330. void llSetStatus(int status, int value);
  331. void llSetText(string text, LSL_Vector color, double alpha);
  332. void llSetTexture(string texture, int face);
  333. void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate);
  334. void llSetTimerEvent(double sec);
  335. void llSetTorque(LSL_Vector torque, int local);
  336. void llSetTouchText(string text);
  337. void llSetVehicleFlags(int flags);
  338. void llSetVehicleFloatParam(int param, LSL_Float value);
  339. void llSetVehicleRotationParam(int param, LSL_Rotation rot);
  340. void llSetVehicleType(int type);
  341. void llSetVehicleVectorParam(int param, LSL_Vector vec);
  342. void llShout(int channelID, string text);
  343. LSL_Float llSin(double f);
  344. void llSitTarget(LSL_Vector offset, LSL_Rotation rot);
  345. void llSleep(double sec);
  346. void llSound(string sound, double volume, int queue, int loop);
  347. void llSoundPreload(string sound);
  348. LSL_Float llSqrt(double f);
  349. void llStartAnimation(string anim);
  350. void llStopAnimation(string anim);
  351. void llStopHover();
  352. void llStopLookAt();
  353. void llStopMoveToTarget();
  354. void llStopPointAt();
  355. void llStopSound();
  356. LSL_Integer llStringLength(string str);
  357. LSL_String llStringToBase64(string str);
  358. LSL_String llStringTrim(string src, int type);
  359. LSL_Integer llSubStringIndex(string source, string pattern);
  360. void llTakeCamera(string avatar);
  361. void llTakeControls(int controls, int accept, int pass_on);
  362. LSL_Float llTan(double f);
  363. LSL_Integer llTarget(LSL_Vector position, double range);
  364. void llTargetOmega(LSL_Vector axis, double spinrate, double gain);
  365. void llTargetRemove(int number);
  366. void llTeleportAgentHome(string agent);
  367. void llTextBox(string avatar, string message, int chat_channel);
  368. LSL_String llToLower(string source);
  369. LSL_String llToUpper(string source);
  370. void llTriggerSound(string sound, double volume);
  371. void llTriggerSoundLimited(string sound, double volume, LSL_Vector top_north_east, LSL_Vector bottom_south_west);
  372. LSL_String llUnescapeURL(string url);
  373. void llUnSit(string id);
  374. LSL_Float llVecDist(LSL_Vector a, LSL_Vector b);
  375. LSL_Float llVecMag(LSL_Vector v);
  376. LSL_Vector llVecNorm(LSL_Vector v);
  377. void llVolumeDetect(int detect);
  378. LSL_Float llWater(LSL_Vector offset);
  379. void llWhisper(int channelID, string text);
  380. LSL_Vector llWind(LSL_Vector offset);
  381. LSL_String llXorBase64Strings(string str1, string str2);
  382. LSL_String llXorBase64StringsCorrect(string str1, string str2);
  383. }
  384. }