Example #1
0
        /// <summary>
        /// Ontick for Roleplay Bots
        /// </summary>
        public override void Execute()
        {
            try
            {
                #region Available Bot Timer Manager
                foreach (RoomUser RoleplayBot in RoleplayBotManager.DeployedRoleplayBots.Values)
                {
                    if (RoleplayBot == null)
                    {
                        continue;
                    }

                    if (RoleplayBot.GetBotRoleplay() == null)
                    {
                        continue;
                    }

                    if (!RoleplayBot.GetBotRoleplay().Deployed)
                    {
                        continue;
                    }

                    RoleplayBot.GetBotRoleplayAI().RandomSpeechTick();
                    RoleplayBot.GetBotRoleplayAI().OnTimerTick();
                }
                #endregion
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
        }