diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 98f3c6c3f9..1089d22bd2 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -269,6 +269,14 @@ set(llcommon_HEADER_FILES ndintrin.h ) +# Add OSSL constants for OpenSim builds +if (HAS_OPENSIM_SUPPORT) + LIST(APPEND llcommon_HEADER_FILES + osslconstants.h + ) +endif (HAS_OPENSIM_SUPPORT) +# + set_source_files_properties(${llcommon_HEADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/indra/llcommon/osslconstants.h b/indra/llcommon/osslconstants.h new file mode 100644 index 0000000000..a1c8596f4b --- /dev/null +++ b/indra/llcommon/osslconstants.h @@ -0,0 +1,159 @@ +/* + * @file osconstants.h + * @brief Constants used in OSSL and ASL + * + * Copyright (c) 2012 Cinder Roxley All rights reserved. + * + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * Cinder Roxley wrote this file. As long as you retain this notice you can do + * whatever you want with this stuff. If we meet some day, and you think this + * stuff is worth it, you can buy me a beer in return + * ---------------------------------------------------------------------------- + */ + +#ifndef LL_OSSLCONSTANTS_H +#define LL_OSSLCONSTANTS_H + +// Current as of OpenSimulator 0.7.5 dev and Aurora 0.5.0.1 (13 December 2012) + +/// OSSL Constants +/// Reference: https://github.com/opensim/opensim/blob/master/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs + +// osMessageAttachments +const S32 OS_ATTACH_MSG_ALL = -65535; +const S32 OS_ATTACH_MSG_INVERT_POINTS = 1; +const S32 OS_ATTACH_MSG_OBJECT_CREATOR = 2; +const S32 OS_ATTACH_MSG_SCRIPT_CREATOR = 4; + +// llSetCameraParams +const S32 CAMERA_FOCUS_OFFSET_X = 2; +const S32 CAMERA_FOCUS_OFFSET_Y = 3; +const S32 CAMERA_FOCUS_OFFSET_Z = 4; +const S32 CAMERA_POSITION_X = 14; +const S32 CAMERA_POSITION_Y = 15; +const S32 CAMERA_POSITION_Z = 16; +const S32 CAMERA_FOCUS_X = 18; +const S32 CAMERA_FOCUS_Y = 19; +const S32 CAMERA_FOCUS_Z = 20; + +// osSetParcelDetails +const S32 PARCEL_DETAILS_CLAIMDATE = 10; + +// osGetRegionStats +const S32 STATS_TIME_DILATION = 0; +const S32 STATS_SIM_FPS = 1; +const S32 STATS_PHYSICS_FPS = 2; +const S32 STATS_AGENT_UPDATES = 3; +const S32 STATS_ROOT_AGENTS = 4; +const S32 STATS_CHILD_AGENTS = 5; +const S32 STATS_TOTAL_PRIMS = 6; +const S32 STATS_ACTIVE_PRIMS = 7; +const S32 STATS_FRAME_MS = 8; +const S32 STATS_NET_MS = 9; +const S32 STATS_PHYSICS_MS = 10; +const S32 STATS_IMAGE_MS = 11; +const S32 STATS_OTHER_MS = 12; +const S32 STATS_IN_PACKETS_PER_SECOND = 13; +const S32 STATS_OUT_PACKETS_PER_SECOND = 14; +const S32 STATS_UNACKED_BYTES = 15; +const S32 STATS_AGENT_MS = 16; +const S32 STATS_PENDING_DOWNLOADS = 17; +const S32 STATS_PENDING_UPLOADS = 18; +const S32 STATS_ACTIVE_SCRIPTS = 19; +const S32 STATS_SCRIPT_LPS = 20; + +// osNPC* +const U32 NPC = 0x20; +const U32 OS_NPC = 0x01000000; +const S32 OS_NPC_FLY = 0; +const S32 OS_NPC_NO_FLY = 1; +const S32 OS_NPC_LAND_AT_TARGET = 2; +const S32 OS_NPC_RUNNING = 4; +const S32 OS_NPC_SIT_NOW = 0; +const U32 OS_NPC_CREATOR_OWNED = 0x1; +const U32 OS_NPC_NOT_OWNED = 0x2; +const U32 OS_NPC_SENSE_AS_AGENT = 0x4; + +// osListenRegex +const U32 OS_LISTEN_REGEX_NAME = 0x1; +const U32 OS_LISTEN_REGEX_MESSAGE = 0x2; + +// changed() event +const S32 CHANGED_ANIMATION = 16384; + +/// Meta7 Lightshare Constants +/// Reference: https://github.com/opensim/opensim/blob/master/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs +const S32 WL_WATER_COLOR = 0; +const S32 WL_WATER_FOG_DENSITY_EXPONENT = 1; +const S32 WL_UNDERWATER_FOG_MODIFIER = 2; +const S32 WL_REFLECTION_WAVELET_SCALE = 3; +const S32 WL_FRESNEL_SCALE = 4; +const S32 WL_FRESNEL_OFFSET = 5; +const S32 WL_REFRACT_SCALE_ABOVE = 6; +const S32 WL_REFRACT_SCALE_BELOW = 7; +const S32 WL_BLUR_MULTIPLIER = 8; +const S32 WL_BIG_WAVE_DIRECTION = 9; +const S32 WL_LITTLE_WAVE_DIRECTION = 10; +const S32 WL_NORMAL_MAP_TEXTURE = 11; +const S32 WL_HORIZON = 12; +const S32 WL_HAZE_HORIZON = 13; +const S32 WL_BLUE_DENSITY = 14; +const S32 WL_HAZE_DENSITY = 15; +const S32 WL_DENSITY_MULTIPLIER = 16; +const S32 WL_DISTANCE_MULTIPLIER = 17; +const S32 WL_MAX_ALTITUDE = 18; +const S32 WL_SUN_MOON_COLOR = 19; +const S32 WL_AMBIENT = 20; +const S32 WL_EAST_ANGLE = 21; +const S32 WL_SUN_GLOW_FOCUS = 22; +const S32 WL_SUN_GLOW_SIZE = 23; +const S32 WL_SCENE_GAMMA = 24; +const S32 WL_STAR_BRIGHTNESS = 25; +const S32 WL_CLOUD_COLOR = 26; +const S32 WL_CLOUD_XY_DENSITY = 27; +const S32 WL_CLOUD_COVERAGE = 28; +const S32 WL_CLOUD_SCALE = 29; +const S32 WL_CLOUD_DETAIL_XY_DENSITY = 30; +const S32 WL_CLOUD_SCROLL_X = 31; +const S32 WL_CLOUD_SCROLL_Y = 32; +const S32 WL_CLOUD_SCROLL_Y_LOCK = 33; +const S32 WL_CLOUD_SCROLL_X_LOCK = 34; +const S32 WL_DRAW_CLASSIC_CLOUDS = 35; +const S32 WL_SUN_MOON_POSITION = 36; + +/// Aurora-Sim Constants +/// Reference: https://github.com/aurora-sim/Aurora-Sim/blob/master/Aurora/AuroraDotNetEngine/APIs/AA_Constants.cs + +char const* const ENABLE_GRAVITY = "enable_gravity"; +char const* const GRAVITY_FORCE_X = "gravity_force_x"; +char const* const GRAVITY_FORCE_Y = "gravity_force_y"; +char const* const GRAVITY_FORCE_Z = "gravity_force_z"; +char const* const ADD_GRAVITY_POINT = "add_gravity_point"; +char const* const ADD_GRAVITY_FORCE = "add_gravity_force"; +char const* const START_TIME_REVERSAL_SAVING = "start_time_reversal_saving"; +char const* const STOP_TIME_REVERSAL_SAVING = "stop_time_reversal_saving"; +char const* const START_TIME_REVERSAL = "start_time_reversal"; +char const* const STOP_TIME_REVERSAL = "stop_time_reversal"; + +//Aurora bot constants +const S32 BOT_FOLLOW_FLAG_NONE = 0; +const S32 BOT_FOLLOW_FLAG_INDEFINITELY = 1; +const S32 BOT_FOLLOW_WALK = 0; +const S32 BOT_FOLLOW_RUN = 1; +const S32 BOT_FOLLOW_FLY = 2; +const S32 BOT_FOLLOW_TELEPORT = 3; +const S32 BOT_FOLLOW_WAIT = 4; +const S32 BOT_FOLLOW_TRIGGER_HERE_EVENT = 1; +const S32 BOT_FOLLOW_FLAG_FORCEDIRECTPATH = 4; + +// Aurora Lightshare Constants +const S32 WL_OK = -1; +const S32 WL_ERROR = -2; +const S32 WL_ERROR_NO_SCENE_SET = -3; +const S32 WL_ERROR_SCENE_MUST_BE_STATIC = -4; +const S32 WL_ERROR_SCENE_MUST_NOT_BE_STATIC = -5; +const S32 WL_ERROR_BAD_SETTING = -6; +const S32 WL_ERROR_NO_PRESET_FOUND = -7; + +#endif // LL_OSSLCONSTANTS_H diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l index 09483d0d41..b6a297bc4a 100644 --- a/indra/lscript/lscript_compile/indra.l +++ b/indra/lscript/lscript_compile/indra.l @@ -38,6 +38,11 @@ FS (f|F) #include "lscript_http.h" #include "llclickaction.h" #include "llmediaentry.h" +// Add OSSL constants for OS builds +#ifdef HAS_OPENSIM_SUPPORT +#include "osslconstants.h" +#endif // HAS_OPENSIM_SUPPORT +// void count(); void line_comment(); diff --git a/indra/lscript/lscript_library/lscript_library.cpp b/indra/lscript/lscript_library/lscript_library.cpp index 1d5c4e4ddd..f0fd7bcc7c 100644 --- a/indra/lscript/lscript_library/lscript_library.cpp +++ b/indra/lscript/lscript_library/lscript_library.cpp @@ -536,6 +536,233 @@ void LLScriptLibrary::init() // Server RC LeTigre 12.10.12.265819 new function addFunction(0.f, 0.f, dummy_func, "llGetSimStats", "f", "i"); // According to Kelly Linden we don't need to obey the function ID order in the viewer! + +// Opensim/Aurora scripting functions - Please add Second Life LSL functions above this line! +#ifdef HAS_OPENSIM_SUPPORT + /// OSSL/Aurora Functions (current as of 13 December 2012) + /// Reference: https://github.com/opensim/opensim/blob/master/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs + addFunction(10.f, 0.f, dummy_func, "osSetRegionWaterHeight", NULL, "f"); + addFunction(10.f, 0.f, dummy_func, "osSetRegionSunSettings", NULL, "iif"); + addFunction(10.f, 0.f, dummy_func, "osSetEstateSunSettings", NULL, "if"); + addFunction(10.f, 0.f, dummy_func, "osGetCurrentSunHour", "f", NULL); + addFunction(10.f, 0.f, dummy_func, "osGetSunParam","f", "s"); + addFunction(10.f, 0.f, dummy_func, "osSetSunParam", "sf", NULL); + // Wind Module Functions + addFunction(10.f, 0.f, dummy_func, "osWindActiveModelPluginName", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "osSetWindParam", NULL, "ssf"); + addFunction(10.f, 0.f, dummy_func, "osGetWindParam", "f", "ss"); + // Parcel commands + addFunction(10.f, 0.f, dummy_func, "osParcelJoin", NULL, "vv"); + addFunction(10.f, 0.f, dummy_func, "osParcelSubdivide", NULL, "vv"); + addFunction(10.f, 0.f, dummy_func, "osSetParcelDetails", NULL, "vl"); + + addFunction(10.f, 0.f, dummy_func, "osList2Double", "f", "li"); + + addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureURL", NULL, "ksssi"); + addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureURLBlend", NULL, "ksssii"); + addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureURLBlendFace", NULL, "ksssfiiii"); + addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureData", NULL, "ksssi"); + addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureDataBlend", NULL, "ksssii"); + addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureDataBlendFace", NULL, "ksssfiiii"); + addFunction(10.f, 0.f, dummy_func, "osGetTerrainHeight", "f", "ii"); + addFunction(10.f, 0.f, dummy_func, "osSetTerrainHeight", NULL, "iif"); + addFunction(10.f, 0.f, dummy_func, "osTerrainFlush", NULL, NULL); + addFunction(10.f, 0.f, dummy_func, "osRegionRestart", "i", "f"); + addFunction(10.f, 0.f, dummy_func, "osRegionNotice",NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "osConsoleCommand", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "osSetParcelMediaURL", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "osSetParcelSIPaddress", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "osSetPrimFloatOnWater", NULL, "i"); + // Teleport functions + addFunction(10.f, 0.f, dummy_func, "osTeleportAgent", NULL, "ksvv"); + addFunction(10.f, 0.f, dummy_func, "osTeleportOwner", NULL, "svv"); + // Avatar Info functions + addFunction(10.f, 0.f, dummy_func, "osGetAgentIP", "s", "k"); + addFunction(10.f, 0.f, dummy_func, "osGetAgents", "l", NULL); + // Animation functions + addFunction(10.f, 0.f, dummy_func, "osAvatarPlayAnimation", NULL, "ks"); + addFunction(10.f, 0.f, dummy_func, "osAvatarStopAnimation", NULL, "ks"); + // #region Attachment functions + addFunction(10.f, 0.f, dummy_func, "osForceAttachToAvatar", NULL, "i"); + addFunction(10.f, 0.f, dummy_func, "osForceAttachToAvatarFromInventory", NULL, "si"); + addFunction(10.f, 0.f, dummy_func, "osForceAttachToOtherAvatarFromInventory", NULL, "ssi"); + addFunction(10.f, 0.f, dummy_func, "osForceDetachFromAvatar", NULL, NULL); + addFunction(10.f, 0.f, dummy_func, "osGetNumberOfAttachments", "l", "kl"); + addFunction(10.f, 0.f, dummy_func, "osMessageAttachments", NULL, "ksli"); + // Texture Draw functions + addFunction(10.f, 0.f, dummy_func, "osMovePen", NULL, "sii"); + addFunction(10.f, 0.f, dummy_func, "osDrawLine", NULL, "siiii"); + addFunction(10.f, 0.f, dummy_func, "osDrawText", NULL, "ss"); + addFunction(10.f, 0.f, dummy_func, "osDrawEllipse", NULL, "sii"); + addFunction(10.f, 0.f, dummy_func, "osDrawRectangle", NULL, "sii"); + addFunction(10.f, 0.f, dummy_func, "osDrawFilledRectangle", NULL, "sii"); + addFunction(10.f, 0.f, dummy_func, "osDrawPolygon", "s", "sll"); + addFunction(10.f, 0.f, dummy_func, "osDrawFilledPolygon", "s", "sll"); + addFunction(10.f, 0.f, dummy_func, "osSetFontSize", NULL, "si"); + addFunction(10.f, 0.f, dummy_func, "osSetFontName", NULL, "ss"); + addFunction(10.f, 0.f, dummy_func, "osSetPenSize", NULL, "si"); + addFunction(10.f, 0.f, dummy_func, "osSetPenColor", NULL, "ss"); + addFunction(10.f, 0.f, dummy_func, "osSetPenCap", NULL, "sss"); + addFunction(10.f, 0.f, dummy_func, "osDrawImage", NULL, "siis"); + addFunction(10.f, 0.f, dummy_func, "osGetDrawStringSize", "v", "sssi"); + + // DEPRECIATED addFunction(10.f, 0.f, dummy_func, "osSetStateEvents", NULL, "i"); + addFunction(10.f, 0.f, dummy_func, "osGetScriptEngineName", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "osGetSimulatorVersion", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "osParseJSON", "s", "s"); + addFunction(10.f, 0.f, dummy_func, "osParseJSONNew", "s", "s"); + + addFunction(10.f, 0.f, dummy_func, "osMessageObject", NULL, "ks"); + + addFunction(10.f, 0.f, dummy_func, "osMakeNotecard", NULL, "sl"); + addFunction(10.f, 0.f, dummy_func, "osGetNotecardLine", "s", "si"); + addFunction(10.f, 0.f, dummy_func, "osGetNotecard", "s", "s"); + addFunction(10.f, 0.f, dummy_func, "osGetNumberOfNotecardLines", "i", "s"); + addFunction(10.f, 0.f, dummy_func, "osAvatarName2Key", "k", "ss"); + addFunction(10.f, 0.f, dummy_func, "osKey2Name", "s", "k"); + addFunction(10.f, 0.f, dummy_func, "osGetGridNick", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "osGetGridName", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "osGetGridLoginURI", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "osGetGridHomeURI","s",NULL); + addFunction(10.f, 0.f, dummy_func, "osGetGridCustom","s","k"); + addFunction(10.f, 0.f, dummy_func, "osFormatString", "s", "sl"); + addFunction(10.f, 0.f, dummy_func, "osMatchString", "l", "ssi"); + addFunction(10.f, 0.f, dummy_func, "osReplaceString", "s", "sssi"); + // Information about data loaded into the region + addFunction(10.f, 0.f, dummy_func, "osLoadedCreationDate", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "osLoadedCreationTime", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "osLoadedCreationID", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "osGetLinkPrimitiveParams", "l", "il"); + // osNpc + addFunction(10.f, 0.f, dummy_func, "osIsNpc", "k", "k"); + addFunction(10.f, 0.f, dummy_func, "osNpcCreate", "k", "ssvk"); + addFunction(10.f, 0.f, dummy_func, "osNpcSaveAppearance", NULL, "ks"); + addFunction(10.f, 0.f, dummy_func, "osNpcLoadAppearance", NULL,"ks"); + addFunction(10.f, 0.f, dummy_func, "osNpcGetOwner","k","k"); + addFunction(10.f, 0.f, dummy_func, "osNpcGetPos","k","k"); + addFunction(10.f, 0.f, dummy_func, "osNpcMoveTo", NULL, "kv"); + addFunction(10.f, 0.f, dummy_func, "osNpcMoveToTarget",NULL,"kvi"); + addFunction(10.f, 0.f, dummy_func, "osNpcGetRot","r","k"); + addFunction(10.f, 0.f, dummy_func, "osNpcSetRot", NULL, "kr"); + addFunction(10.f, 0.f, dummy_func, "osNpcStopMoveToTarget", NULL, "k"); + addFunction(10.f, 0.f, dummy_func, "osNpcSay", NULL, "ks"); + addFunction(10.f, 0.f, dummy_func, "osNpcShout", NULL, "ks"); + addFunction(10.f, 0.f, dummy_func, "osNpcSit", NULL, "kki"); + addFunction(10.f, 0.f, dummy_func, "osNpcStand", NULL, "kki"); + addFunction(10.f, 0.f, dummy_func, "osNpcRemove", NULL, "k"); + addFunction(10.f, 0.f, dummy_func, "osNpcPlayAnimation", NULL, "ks"); + addFunction(10.f, 0.f, dummy_func, "osNpcStopAnimation", NULL, "ks"); + addFunction(10.f, 0.f, dummy_func, "osNpcWhisper", NULL, "ks"); + addFunction(10.f, 0.f, dummy_func, "osNpcTouch", NULL, "kki"); + addFunction(10.f, 0.f, dummy_func, "osOwnerSaveAppearance", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "osAgentSaveAppearance", NULL, "ks"); + + addFunction(10.f, 0.f, dummy_func, "osGetMapTexture", "k", NULL); + addFunction(10.f, 0.f, dummy_func, "osGetRegionMapTexture", "k", "s"); + addFunction(10.f, 0.f, dummy_func, "osGetRegionStats", "l", NULL); + addFunction(10.f, 0.f, dummy_func, "osGetSimulatorMemory", "i", NULL); + addFunction(10.f, 0.f, dummy_func, "osKickAvatar", NULL, "sss"); + addFunction(10.f, 0.f, dummy_func, "osSetSpeed", NULL, "kf"); + addFunction(10.f, 0.f, dummy_func, "osGetHealth", "f", "k"); + addFunction(10.f, 0.f, dummy_func, "osCauseDamage", NULL, "kf"); + addFunction(10.f, 0.f, dummy_func, "osCauseHealing", NULL, "kf"); + addFunction(10.f, 0.f, dummy_func, "osGetPrimitiveParams", "l", "kl"); + addFunction(10.f, 0.f, dummy_func, "osSetPrimitiveParams", NULL, "kl"); + addFunction(10.f, 0.f, dummy_func, "osSetProjectionParams", NULL, "kikfff"); + addFunction(10.f, 0.f, dummy_func, "osGetAvatarList", "l", NULL); + addFunction(10.f, 0.f, dummy_func, "osUnixTimeToTimestamp", "s", "i"); + addFunction(10.f, 0.f, dummy_func, "osGetInventoryDesc", "s", "s"); + addFunction(10.f, 0.f, dummy_func, "osInviteToGroup", "i", "i"); + addFunction(10.f, 0.f, dummy_func, "osEjectFromGroup", "i", "i"); + addFunction(10.f, 0.f, dummy_func, "osSetTerrainTexture", NULL, "ik"); + addFunction(10.f, 0.f, dummy_func, "osSetTerrainTextureHeight", NULL, "iff"); + + addFunction(10.f, 0.f, dummy_func, "osIsUUID", "i","s"); + + addFunction(10.f, 0.f, dummy_func, "osMin", "f", "ff"); + addFunction(10.f, 0.f, dummy_func, "osMax", "f", "ff"); + addFunction(10.f, 0.f, dummy_func, "osGetRezzingObject", "k", NULL); + addFunction(10.f, 0.f, dummy_func, "osSetContentType", NULL, "ks"); + + addFunction(10.f, 0.f, dummy_func, "osDropAttachment", NULL, NULL); + addFunction(10.f, 0.f, dummy_func, "osDropAttachmentAt", NULL, "vr"); + addFunction(10.f, 0.f, dummy_func, "osForceDropAttachment", NULL, NULL); + addFunction(10.f, 0.f, dummy_func, "osForceDropAttachmentAt", NULL, "vr"); + + addFunction(10.f, 0.f, dummy_func, "osListenRegex", "i", "issi"); + addFunction(10.f, 0.f, dummy_func, "osRegexIsMatch", "i", "ss"); + /// LightShare functions + /// Reference: https://github.com/opensim/opensim/blob/master/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LS_Stub.cs + addFunction(10.f, 0.f, dummy_func, "lsGetWindlightScene", "l", "l"); + addFunction(10.f, 0.f, dummy_func, "lsSetWindlightScene", "i", "l"); + addFunction(10.f, 0.f, dummy_func, "lsSetWindlightSceneTargeted", "i", "lk"); + /// Aurora-exclusive OSSL functions + /// Reference: https://github.com/aurora-sim/Aurora-Sim/blob/master/Aurora/AuroraDotNetEngine/APIs/OSSL_Api.cs + addFunction(10.f, 0.f, dummy_func, "osReturnObject", NULL, "k"); + addFunction(10.f, 0.f, dummy_func, "osReturnObjects", NULL, "f"); + addFunction(10.f, 0.f, dummy_func, "osShutDown", NULL, NULL); + addFunction(10.f, 0.f, dummy_func, "osAddAgentToGroup", NULL, "kss"); + addFunction(10.f, 0.f, dummy_func, "osRezObject", NULL, "svvriiiii"); + /// Aurora-only functions + /// Reference: https://github.com/aurora-sim/Aurora-Sim/blob/master/Aurora/AuroraDotNetEngine/APIs/AA_API.cs + addFunction(10.f, 0.f, dummy_func, "aaSetCloudDensity", NULL, "f"); + addFunction(10.f, 0.f, dummy_func, "aaUpdateDatabase", NULL, "sss"); + addFunction(10.f, 0.f, dummy_func, "aaQueryDatabase", "l", "ss"); + addFunction(10.f, 0.f, dummy_func, "aaSerializeXML", "s", "ll"); + addFunction(10.f, 0.f, dummy_func, "aaDeserializeXMLKeys","l", "s"); + addFunction(10.f, 0.f, dummy_func, "aaDeserializeXMLValues", "l", "s"); + addFunction(10.f, 0.f, dummy_func, "aaSetConeOfSilence", NULL, "f"); + addFunction(10.f, 0.f, dummy_func, "aaJoinCombatTeam", NULL, "ks"); + addFunction(10.f, 0.f, dummy_func, "aaLeaveCombat", NULL, "k"); + addFunction(10.f, 0.f, dummy_func, "aaJoinCombat", NULL, "k"); + addFunction(10.f, 0.f, dummy_func, "aaGetHealth", "f", "k"); + addFunction(10.f, 0.f, dummy_func, "aaGetTeam", "s", "k"); + addFunction(10.f, 0.f, dummy_func, "aaGetTeamMembers", "l", "s"); + addFunction(10.f, 0.f, dummy_func, "aaGetLastOwner", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "aaSayDistance", NULL, "ifs"); + addFunction(10.f, 0.f, dummy_func, "aaSayTo", NULL, "ss"); + addFunction(10.f, 0.f, dummy_func, "aaGetText", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "aaGetTextColor", "r", NULL); + addFunction(10.f, 0.f, dummy_func, "aaRaiseError", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "aaFreezeAvatar", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "aaThawAvatar", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "aaRequestCombatPermission", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "aaGetWalkDisabled", "i", "s"); + addFunction(10.f, 0.f, dummy_func, "aaSetWalkDisabled", NULL, "si"); + addFunction(10.f, 0.f, dummy_func, "aaGetFlyDisabled", "i", "s"); + addFunction(10.f, 0.f, dummy_func, "aaSetFlyDisabled", NULL, "sf"); + addFunction(10.f, 0.f, dummy_func, "aaAvatarFullName2Key", "s", "s"); + addFunction(10.f, 0.f, dummy_func, "aaSetEnv", NULL, "sl"); + addFunction(10.f, 0.f, dummy_func, "aaGetIsInfiniteRegion", "i", NULL); + addFunction(10.f, 0.f, dummy_func, "aaAllRegionInstanceSay", NULL, "is"); + addFunction(10.f, 0.f, dummy_func, "aaWindlightGetSceneIsStatic", "i", NULL); + addFunction(10.f, 0.f, dummy_func, "aaWindlightGetSceneDayCycleKeyFrameCount", "i", NULL); + addFunction(10.f, 0.f, dummy_func, "aaWindlightGetDayCycle", "l", NULL); + addFunction(10.f, 0.f, dummy_func, "aaWindlightAddDayCycleFrame", "i", "fi"); + addFunction(10.f, 0.f, dummy_func, "aaWindlightRemoveDayCycleFrame", "i", "i"); + addFunction(10.f, 0.f, dummy_func, "aaWindlightGetScene", "l", "il"); + addFunction(10.f, 0.f, dummy_func, "aaWindlightSetScene", "i", "il"); + /// Aurora bot functions + /// Reference: https://github.com/aurora-sim/Aurora-Sim/blob/master/Aurora/BotManager/Bot_API.cs + addFunction(10.f, 0.f, dummy_func, "botCreateBot", "s", "sssv"); + addFunction(10.f, 0.f, dummy_func, "botGetWaitingTime", "v", "i"); + addFunction(10.f, 0.f, dummy_func, "botPauseMovement", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "botResumeMovement", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "botSetShouldFly", NULL, "si"); + addFunction(10.f, 0.f, dummy_func, "botSetMap", NULL, "slii"); + addFunction(10.f, 0.f, dummy_func, "botRemoveBot", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "botFollowAvatar", NULL, "ssff"); + addFunction(10.f, 0.f, dummy_func, "botStopFollowAvatar", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "botSendChatMessage", NULL, "ssii"); + addFunction(10.f, 0.f, dummy_func, "botSendIM",NULL,"sss"); + addFunction(10.f, 0.f, dummy_func, "botTouchObject", NULL, "ss"); + addFunction(10.f, 0.f, dummy_func, "botSitObject", NULL, "ssv"); + addFunction(10.f, 0.f, dummy_func, "botStandUp", NULL, "s"); + addFunction(10.f, 0.f, dummy_func, "botAddTag", NULL, "ss"); + addFunction(10.f, 0.f, dummy_func, "botGetBotsWithTag", "l", "s"); + addFunction(10.f, 0.f, dummy_func, "botRemoveBotsWithTag", NULL, "s"); +#endif // HAS_OPENSIM_SUPPORT +// Opensim/Aurora scripting functions } LLScriptLibraryFunction::LLScriptLibraryFunction(F32 eu, F32 st, void (*exec_func)(LLScriptLibData *, LLScriptLibData *, const LLUUID &), const char *name, const char *ret_type, const char *args, BOOL god_only) diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index 9c6459db2b..0e10419d64 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -850,3 +850,123 @@ return Leave current function or event handler " String literal #functions are supplied by the program now + +# OSSL/AA keywords +# Reference: http://opensimulator.org/wiki/OSSL_Constants (13 December 2012) +OS_ATTACH_MSG_ALL Send the message to attachments on every point +OS_ATTACH_MSG_INVERT_POINTS Invert how the attachment points list should be treated +OS_ATTACH_MSG_OBJECT_CREATOR Send only to those have the same CreatorID with host object CreatorID +OS_ATTACH_MSG_SCRIPT_CREATOR Send only to those have the same CreatorID with sender script CreatorID + +CHANGED_ANIMATION The set of animations playing on the avatar to whom this object is attached has been changed. +LIST_STAT_HARMONIC_MEAN Returns the harmonic mean of a list of numbers, Value 100. +CAMERA_FOCUS_OFFSET_X Adjusts the camera focus x position relative to the target. (float) +CAMERA_FOCUS_OFFSET_Y Adjusts the camera focus y position relative to the target. (float) +CAMERA_FOCUS_OFFSET_Z Adjusts the camera focus z position relative to the target. (float) +CAMERA_POSITION_X Sets camera x position in region coordinates. (float) +CAMERA_POSITION_Y Sets camera y position in region coordinates. (float) +CAMERA_POSITION_Z Sets camera z position in region coordinates. (float) +CAMERA_FOCUS_X Sets camera x focus (target position) in region coordinates. (float) +CAMERA_FOCUS_Y Sets camera y focus (target position) in region coordinates. (float) +CAMERA_FOCUS_Z Sets camera z focus (target position) in region coordinates. (float) +OS_LISTEN_REGEX_NAME Process name parameter as regex, Value = 0x1 +OS_LISTEN_REGEX_MESSAGE Process name parameter as regex, Value = 0x2 +PARCEL_DETAILS_CLAIMDATE Set parcel claim date + +STATS_TIME_DILATION Time Dilation, Value 0 +STATS_SIM_FPS Sim FPS, Value 1 +STATS_PHYSICS_FPS Physics FPS, Value 2 +STATS_AGENT_UPDATES Agent Updates/Sec, Value 3 +STATS_ROOT_AGENTS Main Agents, Value 4 +STATS_CHILD_AGENTS Child Agents, Value 5 +STATS_TOTAL_PRIMS Objects, Value 6 +STATS_ACTIVE_PRIMS Active Objects, Value 7 +STATS_FRAME_MS Total Frame Time, Value 8 +STATS_NET_MS Net Time, Value 9 +STATS_PHYSICS_MS Physics Time, Value 10 +STATS_IMAGE_MS Images Time, Value 11 +STATS_OTHER_MS (Other Time), Value 12 +STATS_IN_PACKETS_PER_SECOND Packets in, Value 13 +STATS_OUT_PACKETS_PER_SECOND Packets out, Value 14 +STATS_UNACKED_BYTES Total Unacked Bytes, Value 15 +STATS_AGENT_MS Agent Time, Value 16 +STATS_PENDING_DOWNLOADS Pending Downloads, Value 17 +STATS_PENDING_UPLOADS Pending Downloads, Value 18 +STATS_ACTIVE_SCRIPTS Active Scripts, Value 19 +STATS_SCRIPT_LPS Script Line Per Second, Value 20 +OS_NPC Target is NPC. Use this instead of NPC, Value 0x01000000 +OS_NPC_FLY Value 0 +OS_NPC_NO_FLY Value 1 +OS_NPC_LAND_AT_TARGET Value 2 +OS_NPC_SIT_NOW Value 0 +OS_NPC_CREATOR_OWNED Value 0x1 +OS_NPC_NOT_OWNED Value 0x2 +OS_NPC_SENSE_AS_AGENT Value 0x4 +OS_NPC_RUNNING Value 4 +WL_WATER_COLOR Windlight Water Colour +WL_WATER_FOG_DENSITY_EXPONENT Windlight Water Fog Density Exponent +WL_UNDERWATER_FOG_MODIFIER Windlight Underwater Fog Modifier +WL_REFLECTION_WAVELET_SCALE Windlight Reflection Wavelet Scale +WL_FRESNEL_SCALE Windlight Fresnel Scale +WL_FRESNEL_OFFSET Windlight Fresnel Offset +WL_REFRACT_SCALE_ABOVE Windlight Refract Scale Above +WL_REFRACT_SCALE_BELOW Windlight Refract Scale Below +WL_BLUR_MULTIPLIER Windlight Blur Multiplier +WL_BIG_WAVE_DIRECTION Windlight Big Wave Direction +WL_LITTLE_WAVE_DIRECTION Windlight Little Wave Direction +WL_NORMAL_MAP_TEXTURE Windlight Normal Map Texture +WL_HORIZON Windlight Horizon Colour +WL_HAZE_HORIZON Windlight Haze Horizon +WL_BLUE_DENSITY Windlight Blue Density +WL_HAZE_DENSITY Windlight Haze Density +WL_DENSITY_MULTIPLIER Windlight Density Multiplier +WL_DISTANCE_MULTIPLIER Windlight Distance Multiplier +WL_MAX_ALTITUDE Windlight Max Altitude +WL_SUN_MOON_COLOR Windlight Sun/Moon Colour +WL_SUN_MOON_POSITION Windlight Sun/Moon Position +WL_AMBIENT Windlight Ambient Colour +WL_EAST_ANGLE Windlight Sun/Position East +WL_SUN_GLOW_FOCUS Windlight Sun Glow Focus +WL_SUN_GLOW_SIZE Windlight Sun Glow Size +WL_SCENE_GAMMA Windlight Scene Gamma +WL_STAR_BRIGHTNESS Windlight Star Brightness +WL_CLOUD_COLOR Windlight Cloud Colour +WL_CLOUD_XY_DENSITY Windlight Cloud X/Y/Density +WL_CLOUD_COVERAGE Windlight Cloud Coverage +WL_CLOUD_SCALE Windlight Cloud Scale +WL_CLOUD_DETAIL_XY_DENSITY Windlight Cloud Detail X/Y/Density +WL_CLOUD_SCROLL_X Windlight Cloud Scroll X +WL_CLOUD_SCROLL_Y Windlight Cloud Scroll Y +WL_CLOUD_SCROLL_Y_LOCK Windlight Cloud Scroll Y Lock +WL_CLOUD_SCROLL_X_LOCK Windlight Cloud Scroll X Lock +WL_DRAW_CLASSIC_CLOUDS Windlight Draw Classic Clouds + +## Aurora-sim keywords +## Reference: https://github.com/aurora-sim/Aurora-Sim/blob/master/Aurora/AuroraDotNetEngine/APIs/AA_Constants.cs +ENABLE_GRAVITY enable_gravity +GRAVITY_FORCE_X gravity_force_x +GRAVITY_FORCE_Y gravity_force_y +GRAVITY_FORCE_Z gravity_force_z +ADD_GRAVITY_POINT add_gravity_point +ADD_GRAVITY_FORCE add_gravity_force +START_TIME_REVERSAL_SAVING start_time_reversal_saving +STOP_TIME_REVERSAL_SAVING stop_time_reversal_saving +START_TIME_REVERSAL start_time_reversal +STOP_TIME_REVERSAL stop_time_reversal +WL_OK Value -1 +WL_ERROR Value -2 +WL_ERROR_NO_SCENE_SET Value -3 +WL_ERROR_SCENE_MUST_BE_STATIC Value -4 +WL_ERROR_SCENE_MUST_NOT_BE_STATIC Value -5 +WL_ERROR_BAD_SETTING Value -6 +WL_ERROR_NO_PRESET_FOUND Value -7 +BOT_FOLLOW_FLAG_NONE value 0 +BOT_FOLLOW_FLAG_INDEFINITELY value 1 +BOT_TAG_FIND_ALL value AllBots +BOT_FOLLOW_WALK value 0 +BOT_FOLLOW_RUN value 1 +BOT_FOLLOW_FLY value 2 +BOT_FOLLOW_TELEPORT value 3 +BOT_FOLLOW_WAIT value 4 +BOT_FOLLOW_TRIGGER_HERE_EVENT value 1 +BOT_FOLLOW_FLAG_FORCEDIRECTPATH value 4 diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index c660466ea6..78821d2d65 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2159,6 +2159,807 @@ float llGetSimStats(integer stat_type) Returns the value of a particular simulator statistic. + + + + + +osSetRegionWaterHeight(float height) +Adjusts water height in current region. + + +osSetRegionSunSettings(integer useEstateSun, integer sunFixed, float sunHour) +Set the current region's sun settings. + + +osSetEstateSunSettings(integer sunFixed, float sunHour) +Set current estate's sun settings. + + +osGetCurrentSunHour() +Returns the value of the current region's sun hour. + + +osGetSunParam(string param) +Returns region's current sun parameters. +Param are: day_length, year_length, day_night_offset, update_interval. + + +osSetSunParam(string param, float value) +Sets the current region's sun parameters. +Param are: day_length, year_length, day_night_offset, update_interval. + + +osWindActiveModelPluginName() +Gets active wind plugin name, specified by "wind_plugin" in OpenSim.ini ("SimpleRandomWind" or "ConfigurableWind"). + + +osSetWindParam(string plugin, string param, float value) +Sets value of param property for plugin module. +SimpleRandomWind plugin param is: strength. +ConfigurableWind plugin params are: avgStrength, avgDirection, varStrength, varDirection, rateChange. + + +osGetWindParam(string plugin, string param) +Gets the value of param property for plugin module. +SimpleRandomWind plugin param is: strength. +ConfigurableWind plugin params are: avgStrength, avgDirection, varStrength, varDirection, rateChange. + + +osParcelJoin(vector start, vector end) +Joins two adjacent parcels within the same region. + + +osParcelSubdivide(vector start, vector end) +Subdivides a parcel into two adjacent parcels within the same region. + + +osSetParcelDetails(vector pos, list rules) +This function is the counterpart to llGetParcelDetails. Currently PARCEL_DETAILS_NAME, PARCEL_DETAILS_DESC, PARCEL_DETAILS_OWNER, PARCEL_DETAILS_GROUP, PARCEL_DETAILS_CLAIMDATE are implemented + + +osList2Double(list src, integer index) +This function converts a value in the specified index of the list src to the double data type. However, OSSL does not have a double data type. C# contains a double type, but the current LSL implementation does not. + + +osSetDynamicTextureURL(key dynamicID, string contentType, string url, string extraParams, integer timer) +Renders a web texture on the prim containing the script and returns the UUID of the newly created texture. + + +osSetDynamicTextureURLBlend(key dynamicID, string contentType, string url, string extraParams, integer timer, integer alpha) +Allows for two dynamic textures to blend on the prim containing this script. + + +osSetDynamicTextureURLBlendFace(key dynamicID, string contentType, string url, string extraParams, integer blend, integer disp, integer timer, integer alpha, integer face) +Allows for two dynamic textures to blend on the specified face of the prim containing this script. + + +osSetDynamicTextureData(key dynamicID, string contentType, string data, string extraParams, integer timer) +Renders a dynamically created texture on the prim containing the script and returns the UUID of the newly created texture. + + +osGetTerrainHeight(integer x, integer y) +Returns the current region's terrain height as a float at the given coordinates. + + +osSetTerrainHeight(integer x, integer y, float val) +Sets the current region's terrain height at the given coordinates. + + +osTerrainFlush() +Updates terrain changes to OpenSimulator database. This should be called after all the terrain-changes have been done to update Terrain Data. + + +osRegionRestart(float seconds) +Restarts a region after a specified timeout in seconds. + + +osRegionNotice(string msg) +Sends a region notice to the entire current region. + + +osConsoleCommand(string command) +There are no security checks, so it can do anything a user with access to the command console could do, such as changing the avatar passwords, deleting sims, changing the terrain, and just about everything else. +NOTE: DO NOT USE THIS COMMAND UNLESS YOU ARE ABSOLUTELY SURE YOU KNOW WHAT YOU ARE DOING! + + +osSetParcelMediaURL(string url) +Set parcel media to specified url. + + +osSetParcelSIPAddress(string SIPAddress) +Set parcel SIP Address for voice. + + +osSetPrimFloatOnWater(integer float) +Make physical prims float at the water level, boolean. + + +osTeleportAgent(key agent, integer regionX, integer regionY, vector position, vector lookat); +osTeleportAgent(key agent, string regionName, vector position, vector lookat); +osTeleportAgent(key agent, vector position, vector lookat) +Teleports an agent to the specified location. The first variant is able to teleport to any addressable region, including hypergrid destinations. The second variant teleports to a region in the local grid; the region coordinates are specified as region cells (not as global coordinates based on meters). The third variant teleports within the current region. +For osTeleportAgent() to work, the owner of the prim containing the script must be the same as the parcel that the avatar is currently on. If this isn't the case then the function fails silently. + + +osTeleportOwner(integer regionX, integer regionY, vector position, vector lookat); +osTeleportOwner(string regionName, vector position, vector lookat); +osTeleportOwner(vector position, vector lookat) +Teleports the owner of the object containing the script to the specified location. The first variant is able to teleport to any addressable region, including hypergrid destinations. The second variant teleports to a region in the local grid; the region coordinates are specified as region cells (not as global coordinates based on meters). The third variant teleports within the current region. + + +osAvatarPlayAnimation(key UUID, string animation) + Causes an animation to be played on the specified avatar. The variable animation can be either the name of an animation within the prim's inventory, or it can be the animation's UUID. Instead of the name of an animation in the prim's inventory, you can also use the names of the viewer's built-in animations. +No PERMISSION_TRIGGER_ANIMATION check. + + +osAvatarStopAnimation(key UUID, string animation) +This function stops the specified animation if it is playing on the avatar given. +The value avatar is a UUID, and the animation value is either the name of an animation in the prim's inventory or the UUID of an animation. +If the specified avatar is not logged in or on the same sim as the script, then osAvatarStopAnimation silently fails. + + +string osGetAgentIP(key agent) +Returns a string representing the Avatars IP Address. + + +list osGetAgents() +Returns a list of all the agents names in the region. + + +osForceAttachToAvatar(integer attachmentPoint) +Works exactly like llAttachToAvatar() except that PERMISSION_ATTACH is not required. + + +osForceAttachToAvatarFromInventory(string itemName, integer attachmentPoint) +Attach an inventory item in the object containing this script to any avatar in the region without asking for PERMISSION_ATTACH. Nothing happens if the avatar is not in the region. + itemName - The name of the item. If this is not found then a warning is said to the owner. + attachmentPoint - The attachment point. For example, ATTACH_CHEST. + + +osForceAttachToOtherAvatarFromInventory(string rawAvatarId, string itemName, integer attachmentPoint) +Attach an inventory item in the object containing this script to any avatar in the region without asking for PERMISSION_ATTACH. +rawAvatarId = The UUID of the avatar to which to attach. itemName = The name of the item. attachmentPoint = The attachment point. Example, ATTACH_CHEST. + + +osForceDetachFromAvatar() +Works exactly like llDetachFromAvatar() except that PERMISSION_ATTACH is not required. + + +osGetNumberOfAttachments(key avatar, list attachmentPoints) +Returns a strided list of the specified attachment points and the number of attachments on those points. + + +osMessageAttachments(key avatar, string message, list attachmentPoints, integer flags) + Sends a specified message to the specified avatar's attachments on the specified attachment points. + Behaves as osMessageObject, without the sending script needing to know the attachment keys in advance. + + +osMovePen(string drawList, integer x, integer y) +Moves the pen's location to the coordinates specified by the x and y parameters, without drawing anything. + + +osDrawLine(string drawList, integer startX, integer startY, integer endX, integer endY) + or +osDrawLine(string drawList, integer endX, integer endY) +NOTE: Polymorphic Command ! Draws a line on a dynamic texture. + + +osDrawText(string drawList, string text) +Renders text on a dynamic texture. + + +osDrawEllipse(string drawList, integer width, integer height) +Draws an ellipse on a dynamic texture. + + +osDrawRectangle(string drawList, integer width, integer height) +Draws a rectangle on a dynamic texture. + + +osDrawFilledRectangle(string drawList, integer width, integer height) +Draws a rectangle on a dynamic texture, and fills it with the current pen color. + + +osDrawPolygon (string drawList, list x, list y) +Draws a polygon on a dynamic texture. + + +osDrawFilledPolygon (string drawList, list x, list y) +Draws a polygon on a dynamic texture, and fills it with the current pen color. + + +osSetFontSize(string drawList, integer fontSize) +Sets the font size to be used in osDrawText. + + +osSetFontName(string drawList, string fontName) +Sets current font to be used by osDrawText. Font must exist on region server to display. + + +osSetPenSize(string drawList, integer penSize) +Sets the pen size (line thickness) that is to be used when drawing dynamic textures. + + +osSetPenColor(string drawList, string color) +Sets the pen color that is to be used when drawing dynamic textures. + + +osSetPenCap(string drawList, string direction, string type) +Apply a shape on the end of a line. This allows using arrow, diamond, round and flat caps. + + +osDrawImage(string drawList, integer width, integer height, string imageUrl) +Retrieves an image specified by the imageUrl parameter and draws it at the specified height and width. + + +osGetDrawStringSize(string contentType, string text, string fontName, integer fontSize) +Returns a vector containing the horizontal and vertical dimensions in pixels of the specified text. + + +string osGetScriptEngineName() +Returns the name of the script engine which is currently enabled on the server. + + +string osGetSimulatorVersion() +Returns current server version information as a string. + + +string osParseJSON(string JSON) +Returns a hashtable containing the structured JSON contents. + + +osParseJSON(string JSON) +Returns a hashtable containing the structured JSON contents. + + +osMessageObject(key UUID, string message) +Sends string to object identified by UUID. Receiving object requires a dataserver(key queryid, string data) in contained script(s). The queryid passed will be the id of the calling object. + + +osMakeNotecard(string notecardName, list contents) +Writes a Notecard contained inside the prim with contents of list. + + +string osGetNotecardLine(string name, integer line) +Reads the requested notecard line and return its data as a string. + + +string osGetNotecard(string name) +Reads the entire notecard and return its data as a string. + + +integer osGetNumberOfNotecardLines(string name) +Returns the total number of lines in a notecard. + + +key osAvatarName2Key(string firstname, string lastname) +Returns the avatar's UUID from their firstname, lastname. + + +string osKey2Name(key UUID) +Returns avatar name from their UUID key. + + +string osGetGridNick() +Returns the grid's nickname. + + +string osGetGridName() +Returns the grid's name. + + +string osGetGridLoginURI() +Returns the grid's LoginURI. + + +string osFormatString(string to_format, list strings) +Return the string with parameters substituted into it. These parameters need to be incrementing numbers, starting at zero, and surrounded by single accolades (also known as curly brackets). + + +list osMatchString(string src, string pattern, integer start) +This function returns a list containing the matches from the given string. + + +string osLoadedCreationDate() +This function returns a string containing the date that a sim was first created. It will return empty string if the region hasn't been created by oar import, or the region uses SQLite for region database. + + +string osLoadedCreationTime() +This function returns a string containing the time that a sim was first created. It will return empty string if the region hasn't been created by oar import, or the region uses SQLite for region database. + + +string osLoadedCreationID() +This function returns a string containing the UUID that a sim was originally created with. It will return empty string if the region hasn't been created by oar import, or the region uses SQLite for region database. + + +list osGetLinkPrimitiveParams(integer linknumber, list rules) +Returns prim params for the linkset prims specified by linknum. +If using linkset constants (e.g. LINK_SET, LINK_ALL_CHILDREN, etc), the requested params of each relevant prim are concatenated to the end of the list. Usage is otherwise identical to llGetPrimitiveParams(). + + +integer osIsNpc(key npc) +Returns TRUE (1) / FALSE (0) if key provided is an NPC + + +key osNpcCreate(string firstname, string lastname, vector position, string cloneFrom) +key osNpcCreate(string firstname, string lastname, vector position, string cloneFrom, integer options) +Creates an NPC named firstname lastname at position from avatar appearance resource cloneFrom + + +osNpcSaveAppearance(key npc, string notecard) +Save the NPC's current appearance to a notecard in the prim's inventory. This includes body part data, clothing items and attachments. If a notecard with the same name already exists then it is replaced. The avatar must be present in the region when this function is invoked. The baked textures for the avatar (necessary to recreate appearance) are saved permanently. + + +osNpcLoadAppearance(key npc, string notecard) +Load appearance from a notecard. This notecard must contain appearance data created with one of the save appearance functions. + + +vector osNpcGetPos(key npc) +Returns current position vector of the NPC. + + +osNpcMoveTo(key npc, vector position) +Moves an NPC to a location within the region. + + +osNpcMoveToTarget(key npc, vector target, integer options) +Moves NPC to given target over time. Options = OS_NPC_FLY, OS_NPC_NO_FLY, OS_NPC_LAND_AT_TARGET + + +rotation osNpcGetRot(key npc) +Gets the rotation of the avatar. Only the rotation around the Z plane in Euler rotation (horizontal rotation) has any meaning. + + +osNpcSetRot(key npc, rotation rot) +Set the rotation of the NPC. +Only setting the rotation in the Z plane in Euler rotation will have any meaningful effect (turning NPC facing direction). Setting X or Y Euler values will result in the avatar rotating in an undefined manner. + + +osNpcStopMoveToTarget(key npc) +Stop a current move to a target. + + +osNpcSay(key npc, string message) +npc says message. + + +osNpcTouch(key npcKey, key object_key, integer link_num) +Allows an NPC to touch the specified object determined by it's key and specific link number of the target object. Only LINK_THIS and LINK_ROOT are valid for this function. Any other of the LINK_* constants will be ignored and no touch takes place. + + +osNpcRemove(key npc) +Removes the NPC specified by key npc. + + +key osOwnerSaveAppearance(string notecard) +Save the owner's current appearance to a notecard in the prim's inventory. This includes body part data, clothing items and attachments. If a notecard with the same name already exists then it is replaced. The owner must be present in the region when this function is invoked. The baked textures for the owner (necessary to recreate appearance on the NPC) are saved permanently. + + +key osAgentSaveAppearance(key agentId, string notecard) +Save an arbitrary avatar's appearance to a notecard in the prim's inventory. This includes body part data, clothing items and attachments. If a notecard with the same name already exists then it is replaced. The avatar must be present in the region when this function is invoked. The baked textures for the avatar (necessary to recreate appearance on the NPC) are saved permanently. + + +key osGetMapTexture() +Returns the UUID of the map texture of the current region. + + +key osGetRegionMapTexture(string regionName) +This function retrieves the UUID of the texture used to represent the named region on the world map, and returns it. + + +list osGetRegionStats() +Returns a list of float values representing a number of region statistics (many of the values shown in the "Stats Bar" of LL-based clients). Provides similar functionality to llGetRegionFPS() and llGetRegionTimeDilation(), but returns 21 statistics simultaneously. + + +integer osGetSimulatorMemory() +Returns current memory used by simulator instance. + + +osKickAvatar(string FirstName, string LastName, string alert) +Kicks specified avatar from the current region. + + +osSetSpeed(key UUID, float SpeedModifier) +Allows for users to speed themselves up by multiplying the running, walking, rotating and flying of the avatar. + + +osGetHealth(key avatar) +Return the target avatar's health. + + +osCauseDamage(key UUID, float damage) +Causes damage to the specified avatar. Region must be damage enabled. + + +osCauseHealing(key UUID, float healing) +Heals the specified avatar. + + +list osGetPrimitiveParams(key prim, list rules) +Gets the parameters of a primitive, specified by its key. + + +osSetPrimitiveParams(key prim, list rules) +Sets the parameters for the prim specified by prim_uuid according to rules. This function has the same behave as llSetPrimitiveParams except you can specify target prim anywhere in the scene. + + +osSetProjectionParams(integer projection, key texture, float fov, float focus, float ambience); +osSetProjectionParams(key prim, integer projection, key texture, float fov, float focus, float ambience) + 2 Variations possible: bool = TRUE / FALSE or double = float + + +list osGetAvatarList() +Returns strided list of the UUID, position, and name of each avatar in the region except for the owner. + + +string osUnixTimeToTimestamp(integer unixtime) +Converts unixtime to an llGetTimeStamp() formated string. + + +string osGetInventoryDesc(string name) +Returns a string that is the description of inventory item "name" + + +integer osInviteToGroup(key user) +Invite the given agent to the group the object is set to. + + +integer osEjectFromGroup(key user) +Eject the given agent to the group the object is set to. + + +void osSetTerrainTexture(integer level, key texture) +Set the terrain texture of the estate to the texture given as key. The level can be 0, 1, 2 or 3. + + +void osSetTerrainTextureHeight(integer corner, float low, float high) +Set the terrain texture height of the estate. The level can be 0, 1, 2 or 3. The values low and high are float values for the altitude measured in meters. + + +osIsUUID(string thing) +Returns 1 if the supplied string is a valid UUID, returns 0 otherwise. + + +osMin(float A, float B) +Returns the smaller of two numbers. Wraps to the system Math.Min() function + + +osMax(float A, float B) +Returns the larger of two numbers. Wraps to system Math.Max() + + +osGetRezzingObject() +Get the key of the object that rezzed this object. Will return NULL_KEY if rezzed by agent or otherwise unknown source. Should only be reliable inside the on_rez event. + + +osSetContentType(key id, string type) +Sets an arbitrary content return type for an llRequestUrl(). + + +osDropAttachment() +Requires script to be granted PERMISSION_ATTACH, drops an attachment like a user-triggered attachment drop. + + +osDropAttachmentAt(vector pos, rotation rot) +Requires script to be granted PERMISSION_ATTACH, drops an attachment at position pos with rotation rot + + +osForceDropAttachment() +Drops an attachment like a user-triggered attachment drop without checking if PERMISSION_ATTACH has been granted. + + +osForceDropAttachmentAt(vector pos, rotation rot) +Drops an attachment at position pos with rotation rot without checking if PERMISSION_ATTACH has been granted. + + +osListenRegex(integer channelID, string name, string ID, string msg, integer regexBitfield) +Allows the server to filter listen events by regular expressions. name or message parameters can be regular expressions, these are behaviours are controlled via the regexBitField parameter using the constants OS_LISTEN_REGEX_NAME and OS_LISTEN_REGEX_MESSAGE. If the regex strings are invalid, an error will be shouted on the debug channel. + + +osRegexIsMatch(string input, string pattern) +Returns 1 if the input string matches the regular expression pattern. Wraps to Regex.IsMatch() + + +osGetGridGatekeeperURI() +Returns the current grid's Gatekeeper URI as a string. + + +osGetGridHomeURI() +Returns the current grid's home URI as a string. + + +osGetGridCustom(string key) +Returns the value of the GridInfo key as a string. + + +osParseJSONNew(string JSON) +Returns osd deserialized JSON to object. + + +osReplaceString(string src, string pattern, string replace, integer count, integer start) +This function is for regular expression-based string replacement. The count parameter specifies the total number of replacements to make where -1 makes all possible replacements. + + +osReturnObject(key userID) +Returns object to specified avatars UUID. + + +osReturnObjects(float Parameter) +Returns group of objects. Parameters are numeric, values are as follows: owner objects = 0, everyone except owner objects = 1, group objects = 2. + + +osShutDown() +Shut down current Simulator. +Authorized Admin Only by config. + + +osAddAgentToGroup(key avatarID, string group_name, string role_name) +Adds an avatar to a group. Where group_name = name of the target group, role_name = role to assign within the group. + + +osRezObject(string inventory, vector position, vector velocity, rotation rot, integer param, integer isRezAtRoot, integer doRecoil, integer SetDieAtEdge, integer CheckPos) +Where inventory = object to rez. Position = vector to rez object. Velocity = initial velocity. Rot = initial rotation. Param = onrez event. IzAtRoot = TRUE/FALSE flag changes llRezAtRoot to llRezObject. doRecoil =TRUE/FALSE to push avatar. SetDieAtEdge = TRUE/FALSE for rezzed object to die at edge of region. CheckPos = TRUE/FALSE enable/disable 10m rez limit. + + +lsSetWindlightScene(list rules) +Set the current WindLight scene. Estate managers and owners only. + + +lsSetWindlightSceneTargeted(list rules, key target) +Set the current WindLight scene directed at a specific avatar. Estate managers and owners only. + + +list lsGetWindlightScene(list rules) +Get the current WindLight settings. + + +cmSetWindlightScene(list rules) +Set the current WindLight scene. Estate managers and owners only. + + +cmSetWindlightSceneTargeted(list rules, key target) +Set the current WindLight scene directed at a specific avatar. Estate managers and owners only. + + +list cmGetWindlightScene(list rules) +Returns the current LightShare settings. + + +AaSetCloudDensity(0.5) +Where float density values are 0.0 = no cloud to 1.0 = 100% cloud. + + +aaUpdateDatabase(Key, xmlDataToPutIntoTheDatabase, Token) +Where Key = database field name, xmlDataToPutIntoTheDatabase = serialized XML data, Token = data-password + + +aaQueryDatabase(Key, Token) +Returns a list with first value is the token, the second the Key, and the third the value +Where Key = database field name, Token = data-password + + +aaSerializeXML(keys, values) +Returns xml formatted string of the keys and values. +Where keys = list of keys in the database, values = fields to retrieve from database. + + +aaDeserializeXMLKeys(string xmlData) +Returns a list of keys from XML data. +Where xmlData = xml formatted data keys. + + +aaDeserializeXMLValues(string xmlData) +Returns a list of Values from XML data. +Where xmlData = xml formatted data Values. + + +aaSetConeOfSilence(float radius) +Where radius = metres radius from centre of scripted item. This creates an area that sounds can only be heard by the people within the area(radius) and not heard outside and visa-versa. + + +aaJoinCombatTeam(uuid, team) +Where uuid = key of avatar, team = string of the team name. + + +aaLeaveCombat(uuid) +Where uuid = avatar key. + + +aaJoinCombat(uuid) +Where uuid = avatar key. If (perm and PERMISSION_COMBAT == PERMISSION_COMBAT) and permission is granted then join combat. + + +aaGetHealth(uuid) +Returns float value (0.0 to 100.0) of current health. Where uuid = avatar key. + + +aaGetTeam(uuid) +Returns a string of avatars team name. Where uuid = avatar key. + + +aaGetTeamMembers(team) +Return a list of team members. Where team = string of team name. + + +aaGetLastOwner(PrimID) +Returns last owner UUID of PrimID where PrimID = uuid of prim. + or +aaGetLastOwner() +Returns last owner uuid of prim containg script. + + +aaSayDistance(channelID, Distance, text) +Where channelID = channel to say on, Distance = float in meters for distance to say, text = string to say. + + +aaSayTo(userID, text) + Where userID = avatar key, text = string msg. Similar to llOwnerSay but can be directly targeted to an avatar. + + +aaGetText() +Returns a string of the hover text of an object. + + +aaGetTextColor() +Returns the hovertext color in rotation. + + +aaRaiseError(message) +Allows you to have errors that end the execution of the event and fire another event in the script. + + +aaFreezeAvatar(id) +If combat permission are granted then avatar can be frozen (no movement). + + +aaThawAvatar(id) +If combat permission are granted then avatar can be un-frozen (movement re-enabled). + + +aaRequestCombatPermission(id) +Requests target avatar for Permissions to enter into combat mode. +Raises a run_time_permissions event. +if (perm and PERMISSION_COMBAT == PERMISSION_COMBAT). + + +aaGetWalkDisabled(id) +Returns integer of TRUE or FALSE for specifid ID. + + +aaSetWalkDisabled(id, value) +If PERMISSION_COMBAT is accepted, this disables walk, forcing avatar to fly. + + +aaGetFlyDisabled(id) +Returns integer of TRUE or FALSE for specifid ID. Where ID = avatar uuid + + +aaSetFlyDisabled(id, value) +Where ID = avatar uuid, Value = TRUE or FALSE. +If PERMISSION_COMBAT is accepted, this disables flying, forcing avatar to walk. + + +aaAvatarFullName2Key(FullName) +Returns the avatar uuid from their fullname. Where FullName = "Firstname Lastname". + + +aaSetCharacterStat(id, StatName, statValue) +Sets Character Stats. Where ID = avatar uuid, StatName = stat to change, ststValue the value to change it to. + + +aaSetEnv( EnvName, value) + Sets environment values. Where EnvName = ENABLE_GRAVITY, GRAVITY_FORCE_X, GRAVITY_FORCE_Y, GRAVITY_FORCE_Z, ADD_GRAVITY_POINT, ADD_GRAVITY_FORCE, START_TIME_REVERSAL_SAVING, STOP_TIME_REVERSAL_SAVING, START_TIME_REVERSAL, STOP_TIME_REVERSAL. + + +aaAllRegionInstanceSay(integer channelID, string text) + + +aaWindlightGetSceneIsStatic() +Returns TRUE / FALSE + + +aaWindlightGetSceneDayCycleKeyFrameCount() +Returns integer value + + +aaWindlightGetDayCycle() +Returns a List of settings + + +aaWindlightAddDayCycleFrame(float dayCyclePosition, integer dayCycleFrameToCopy) +Returns TRUE / FALSE + + +aaWindlightRemoveDayCycleFrame(int dayCycleFrame) + Returns TRUE / FALSE + + +aaWindlightGetScene(list rules) Returns a List + or +aaWindlightGetScene(integer dayCycleKeyFrame, list rules) +Returns a list + + +aaWindlightSetScene(list list) +Returns TRUE/FALSE + or +aaWindlightSetScene(integer dayCycleIndex, list list) +Returns TRUE/FALSE + + +aaGetIsInfiniteRegion() + Returns TRUE/FALSE + + +botGetWaitingTime (waitTime) +Returns waitTime as vector. + + +botSetMap(keyOfBot, positions, movementType, flags) +keyOfBot = bot uuid, positions = list of position vectors, movementType = corresponding list of move modes: 0 – walk, 1 – fly, flags = BOT_FOLLOW_FLAG_NONE and BOT_FOLLOW_FLAG_INDEFINITELY. + + +botCreateBot(FirstName, LastName, idToClone, startPos) +Where FirstName and LastName = strings for new bot name. idToClone = uuid of prebuild avatar to clone OR another existing avatar. startPos = vector of starting position on region. + + +botRemoveBot(botID) +Where botID = uuid of bot. Removes bot identified by botID. + + +botPauseMovement(botID) +Where botID = bot uuid. Pauses bot at current position. + + +botResumeMovement(botID) +Where botID = bot uuid. Resumes bot movement. + + +botFollowAvatar(botID, avName, startFollowDistance, endFollowDistance) +Where botID = bot uuid. AvName = sting of avatar name OR avatar uuid. StartFollowDistance = distance to start following from. EndFollowDistance = distance to stop following avatar. + + +botStopFollowAvatar(botID) +Where botID = bot uuid. Stops bot from following an avatar. + + +botSendChatMessage(botID, message, channel, sayType) +Where botID = bot uuid. Message = string msg. Channel = channel to speak on. SayType = (0=whisper, 1=say, 2=shout). + + +botSetShouldFly(botID, ShouldFly) +Where botID = bot uuid. ShouldFly = TRUE/FALSE. Enables or disables flight mode. + + +botSendIM(string bot, string user, string message) +bot = bot UUID. user = Target Avatar UUID, message = text to send. + + +botSitObject( botID, objectID, offset) +Where botID = bot uuid, objectID = uuid of object to sit on, offset = Vector for sit position (note that VECTOR_ZERO = default sit pos). + + +botStandUp(botID) +Where botID = bot uuid. Command bot to stand up. + + +botTouchObject(botID, objectID) +Where botID = bot uuid, objectID = object uuid. Causes bot to touch object identified. + + +botAddTag(botID, tag) +Where botID = bot uuid, tag = string tag over bot. + + +botGetBotsWithTag(tag) +Where tag = tag string to match. Return a list of bot UUID's in region with the matching tag. + + +botRemoveBotsWithTag(tag) +Where tag = tag string to match. Removes bot's matching the tag. + + Not Away