ILSL_Api.cs 21 KB

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