예제 #1
0
        public void llPursue(LSL_String target, LSL_List options)
        {
            IBotManager botManager = World.RequestModuleInterface <IBotManager>();

            if (botManager != null)
            {
                float   fuzz       = 2;
                Vector3 offset     = Vector3.Zero;
                bool    requireLOS = false;
                // 20131224 not used                bool intercept;  = false; //Not implemented
                for (int i = 0; i < options.Length; i += 2)
                {
                    LSL_Integer opt = options.GetLSLIntegerItem(i);
                    if (opt == ScriptBaseClass.PURSUIT_FUZZ_FACTOR)
                    {
                        fuzz = (float)options.GetLSLFloatItem(i + 1).value;
                    }
                    if (opt == ScriptBaseClass.PURSUIT_OFFSET)
                    {
                        offset = options.GetVector3Item(i + 1).ToVector3();
                    }
                    if (opt == ScriptBaseClass.REQUIRE_LINE_OF_SIGHT)
                    {
                        requireLOS = options.GetLSLIntegerItem(i + 1) == 1;
                    }
                    // 20131224 not used                    if (opt == ScriptBaseClass.PURSUIT_INTERCEPT)
                    // 20131224 not used                        intercept = options.GetLSLIntegerItem(i + 1) == 1;
                }
                botManager.FollowAvatar(m_host.ParentEntity.UUID, target.m_string, fuzz, fuzz, requireLOS, offset,
                                        m_host.ParentEntity.OwnerID);
            }
        }
예제 #2
0
파일: Bot_API.cs 프로젝트: kow/Aurora-Sim
        public void botFollowAvatar(string bot, string avatarName)
        {
            IBotManager manager = World.RequestModuleInterface <IBotManager> ();

            if (manager != null)
            {
                manager.FollowAvatar(UUID.Parse(bot), avatarName);
            }
        }
예제 #3
0
        public void botFollowAvatar(string bot, string avatarName, LSL_Float startFollowDistance,
                                    LSL_Float endFollowDistance)
        {
            if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Moderate, "botFollowAvatar", m_host, "bot", m_itemID))
            {
                return;
            }
            IBotManager manager = World.RequestModuleInterface <IBotManager>();

            if (manager != null)
            {
                manager.FollowAvatar(UUID.Parse(bot), avatarName, (float)startFollowDistance, (float)endFollowDistance, false, Vector3.Zero,
                                     m_host.OwnerID);
            }
        }