示例#1
0
        public string modSendCommand(string module, string command, string k)
        {
            ScriptProtection.CheckThreatLevel(ThreatLevel.Moderate, "modSendCommand", m_host, "MOD");

            UUID req = UUID.Random();

            m_comms.RaiseEvent(m_itemID, req.ToString(), module, command, k);

            return(req.ToString());
        }
示例#2
0
        /// <summary>
        /// Get the current Windlight scene
        /// </summary>
        /// <returns>List of windlight parameters</returns>
        public LSL_List lsGetWindlightScene(LSL_List rules)
        {
            ScriptProtection.CheckThreatLevel(ThreatLevel.None, "lsGetWindlightScene", m_host, "LS");

            /*RegionLightShareData wl = m_lightShareModule.WindLightSettings;
             *
             * LSL_List values = new LSL_List();
             * int idx = 0;
             * while (idx < rules.Length)
             * {
             *  uint rule = (uint)rules.GetLSLIntegerItem(idx);
             *  LSL_List toadd = new LSL_List();
             *
             *  switch (rule)
             *  {
             *      case (int)ScriptBaseClass.WL_AMBIENT:
             *          toadd.Add(new LSL_Rotation(wl.ambient.X, wl.ambient.Y, wl.ambient.Z, wl.ambient.W));
             *          break;
             *      case (int)ScriptBaseClass.WL_BIG_WAVE_DIRECTION:
             *          toadd.Add(new LSL_Vector(wl.bigWaveDirection.X, wl.bigWaveDirection.Y, 0.0f));
             *          break;
             *      case (int)ScriptBaseClass.WL_BLUE_DENSITY:
             *          toadd.Add(new LSL_Rotation(wl.blueDensity.X, wl.blueDensity.Y, wl.blueDensity.Z, wl.blueDensity.W));
             *          break;
             *      case (int)ScriptBaseClass.WL_BLUR_MULTIPLIER:
             *          toadd.Add(new LSL_Float(wl.blurMultiplier));
             *          break;
             *      case (int)ScriptBaseClass.WL_CLOUD_COLOR:
             *          toadd.Add(new LSL_Rotation(wl.cloudColor.X, wl.cloudColor.Y, wl.cloudColor.Z, wl.cloudColor.W));
             *          break;
             *      case (int)ScriptBaseClass.WL_CLOUD_COVERAGE:
             *          toadd.Add(new LSL_Float(wl.cloudCoverage));
             *          break;
             *      case (int)ScriptBaseClass.WL_CLOUD_DETAIL_XY_DENSITY:
             *          toadd.Add(new LSL_Vector(wl.cloudDetailXYDensity.X, wl.cloudDetailXYDensity.Y, wl.cloudDetailXYDensity.Z));
             *          break;
             *      case (int)ScriptBaseClass.WL_CLOUD_SCALE:
             *          toadd.Add(new LSL_Float(wl.cloudScale));
             *          break;
             *      case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X:
             *          toadd.Add(new LSL_Float(wl.cloudScrollX));
             *          break;
             *      case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X_LOCK:
             *          toadd.Add(new LSL_Integer(wl.cloudScrollXLock ? 1 : 0));
             *          break;
             *      case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y:
             *          toadd.Add(new LSL_Float(wl.cloudScrollY));
             *          break;
             *      case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y_LOCK:
             *          toadd.Add(new LSL_Integer(wl.cloudScrollYLock ? 1 : 0));
             *          break;
             *      case (int)ScriptBaseClass.WL_CLOUD_XY_DENSITY:
             *          toadd.Add(new LSL_Vector(wl.cloudXYDensity.X, wl.cloudXYDensity.Y, wl.cloudXYDensity.Z));
             *          break;
             *      case (int)ScriptBaseClass.WL_DENSITY_MULTIPLIER:
             *          toadd.Add(new LSL_Float(wl.densityMultiplier));
             *          break;
             *      case (int)ScriptBaseClass.WL_DISTANCE_MULTIPLIER:
             *          toadd.Add(new LSL_Float(wl.distanceMultiplier));
             *          break;
             *      case (int)ScriptBaseClass.WL_DRAW_CLASSIC_CLOUDS:
             *          toadd.Add(new LSL_Integer(wl.drawClassicClouds ? 1 : 0));
             *          break;
             *      case (int)ScriptBaseClass.WL_EAST_ANGLE:
             *          toadd.Add(new LSL_Float(wl.eastAngle));
             *          break;
             *      case (int)ScriptBaseClass.WL_FRESNEL_OFFSET:
             *          toadd.Add(new LSL_Float(wl.fresnelOffset));
             *          break;
             *      case (int)ScriptBaseClass.WL_FRESNEL_SCALE:
             *          toadd.Add(new LSL_Float(wl.fresnelScale));
             *          break;
             *      case (int)ScriptBaseClass.WL_HAZE_DENSITY:
             *          toadd.Add(new LSL_Float(wl.hazeDensity));
             *          break;
             *      case (int)ScriptBaseClass.WL_HAZE_HORIZON:
             *          toadd.Add(new LSL_Float(wl.hazeHorizon));
             *          break;
             *      case (int)ScriptBaseClass.WL_HORIZON:
             *          toadd.Add(new LSL_Rotation(wl.horizon.X, wl.horizon.Y, wl.horizon.Z, wl.horizon.W));
             *          break;
             *      case (int)ScriptBaseClass.WL_LITTLE_WAVE_DIRECTION:
             *          toadd.Add(new LSL_Vector(wl.littleWaveDirection.X, wl.littleWaveDirection.Y, 0.0f));
             *          break;
             *      case (int)ScriptBaseClass.WL_MAX_ALTITUDE:
             *          toadd.Add(new LSL_Integer(wl.maxAltitude));
             *          break;
             *      case (int)ScriptBaseClass.WL_NORMAL_MAP_TEXTURE:
             *          toadd.Add(new LSL_Key(wl.normalMapTexture.ToString()));
             *          break;
             *      case (int)ScriptBaseClass.WL_REFLECTION_WAVELET_SCALE:
             *          toadd.Add(new LSL_Vector(wl.reflectionWaveletScale.X, wl.reflectionWaveletScale.Y, wl.reflectionWaveletScale.Z));
             *          break;
             *      case (int)ScriptBaseClass.WL_REFRACT_SCALE_ABOVE:
             *          toadd.Add(new LSL_Float(wl.refractScaleAbove));
             *          break;
             *      case (int)ScriptBaseClass.WL_REFRACT_SCALE_BELOW:
             *          toadd.Add(new LSL_Float(wl.refractScaleBelow));
             *          break;
             *      case (int)ScriptBaseClass.WL_SCENE_GAMMA:
             *          toadd.Add(new LSL_Float(wl.sceneGamma));
             *          break;
             *      case (int)ScriptBaseClass.WL_STAR_BRIGHTNESS:
             *          toadd.Add(new LSL_Float(wl.starBrightness));
             *          break;
             *      case (int)ScriptBaseClass.WL_SUN_GLOW_FOCUS:
             *          toadd.Add(new LSL_Float(wl.sunGlowFocus));
             *          break;
             *      case (int)ScriptBaseClass.WL_SUN_GLOW_SIZE:
             *          toadd.Add(new LSL_Float(wl.sunGlowSize));
             *          break;
             *      case (int)ScriptBaseClass.WL_SUN_MOON_COLOR:
             *          toadd.Add(new LSL_Rotation(wl.sunMoonColor.X, wl.sunMoonColor.Y, wl.sunMoonColor.Z, wl.sunMoonColor.W));
             *          break;
             *      case (int)ScriptBaseClass.WL_UNDERWATER_FOG_MODIFIER:
             *          toadd.Add(new LSL_Float(wl.underwaterFogModifier));
             *          break;
             *      case (int)ScriptBaseClass.WL_WATER_COLOR:
             *          toadd.Add(new LSL_Vector(wl.waterColor.X, wl.waterColor.Y, wl.waterColor.Z));
             *          break;
             *      case (int)ScriptBaseClass.WL_WATER_FOG_DENSITY_EXPONENT:
             *          toadd.Add(new LSL_Float(wl.waterFogDensityExponent));
             *          break;
             *  }
             *
             *  if (toadd.Length > 0)
             *  {
             *      values.Add(rule);
             *      values.Add(toadd.Data[0]);
             *  }
             *  idx++;
             * }
             *
             *
             * return values;
             */
            return(null);
        }
示例#3
0
        public LSL_String botCreateBot(string FirstName, string LastName, string appearanceToClone, LSL_Vector startPos)
        {
            if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Moderate, "botCreateBot", m_host, "bot", m_itemID))
            {
                return("");
            }
            IBotManager manager = World.RequestModuleInterface <IBotManager>();

            if (manager != null)
            {
                return
                    (new LSL_String(
                         manager.CreateAvatar(FirstName, LastName, m_host.ParentEntity.Scene,
                                              UUID.Parse(appearanceToClone), m_host.OwnerID,
                                              new Vector3((float)startPos.x, (float)startPos.y, (float)startPos.z)).
                         ToString()));
            }
            return(new LSL_String(""));
        }
示例#4
0
        public void aaSetCloudDensity(LSL_Float density)
        {
            ScriptProtection.CheckThreatLevel(ThreatLevel.Moderate, "AASetCloudDensity", m_host, "AA");
            if (!World.Permissions.CanIssueEstateCommand(m_host.OwnerID, false))
            {
                return;
            }
            ICloudModule CloudModule = World.RequestModuleInterface <ICloudModule>();

            if (CloudModule == null)
            {
                return;
            }
            CloudModule.SetCloudDensity((float)density);
        }