public void OnRoundStart(RoundStartEvent ev)
 {
     /// <summary>
     ///  This is the event handler for Round start events (before people are spawned in)
     /// </summary>
     plugin.SendMessageAsync(plugin.GetConfigString("discord_channel_onroundstart"), plugin.MultiLanguage(11));
 }
Example #2
0
        public override void EventStart(RoundStartEvent ev)
        {
            ev.Server.Map.Broadcast(20, Translation("game_tutorial"), false);
            bool        nowNerd = false;
            List <Door> doors   = ev.Server.Map.GetDoors();

            doors.Find(x => x.Name == "CHECKPOINT_LCZ_A").Locked = true;
            doors.Find(x => x.Name == "CHECKPOINT_LCZ_B").Locked = true;
            Player[] players = ev.Server.GetPlayers().ToArray();

            foreach (Player player in players)
            {
                if (nowNerd)
                {
                    player.ChangeRole(RoleType.SCIENTIST);
                    player.SetAmmo(AmmoType.AMMO9MM, 30);
                    player.GiveItem(ItemType.USP);
                }
                else
                {
                    player.ChangeRole(RoleType.CLASSD);
                    player.GiveItem(ItemType.MEDKIT);
                    player.SetAmmo(AmmoType.AMMO9MM, 30);
                    player.GiveItem(ItemType.USP);
                }
                nowNerd = !nowNerd;
            }
        }
Example #3
0
 public override void EventStart(RoundStartEvent ev)
 {
     Blinking = true;
     BlinkingLight().GetAwaiter();
     GiveFlashlight(ev.Server.GetPlayers()).GetAwaiter();
     CheckPlayers().GetAwaiter();
 }
 public void OnRoundStart(RoundStartEvent ev)
 {
     ban_id = new List <long>();
     ban_ip = new List <string>();
     Info("[RoundStart] 正在更新数据.");
     new Thread(new ThreadStart(() => new ListUpdateThread())).Start();
 }
Example #5
0
 public void OnRoundStart(RoundStartEvent ev)
 {
     canLog = true;
     bot.Post("Round Start", null, null, 3289800);
     teamkills_count = 0;
     bans_count      = 0;
 }
Example #6
0
 public void OnRoundStart(RoundStartEvent ev)
 {
     SHPlugin.shPlayers.Clear();
     SHPlugin.shPlayersInPocket.Clear();
     isRoundStarted = true;
     respawnCount   = 0;
 }
 public void OnRoundStart(RoundStartEvent ev)
 {
     access         = ConfigManager.Manager.Config.GetDictValue("cda_access_set");
     revokeAll      = ConfigManager.Manager.Config.GetBoolValue("cda_revoke_all", false);
     ScpAccess      = ConfigManager.Manager.Config.GetBoolValue("cda_scp_access", false);
     scpAccessDoors = ConfigManager.Manager.Config.GetListValue("cda_scp_access_doors", new string[] { string.Empty }, false);
 }
Example #8
0
        public override void EventStart(RoundStartEvent ev)
        {
            if (!isQueue)
            {
                return;
            }
            ev.Server.Map.Broadcast(20, Translation["game_tutorial"], false);
            bool nowNerd = false;
            List <Smod2.API.Door> doors = ev.Server.Map.GetDoors();

            doors.Find(x => x.Name == "CHECKPOINT_LCZ_A").Locked = true;
            doors.Find(x => x.Name == "CHECKPOINT_LCZ_B").Locked = true;
            Player[] players = ev.Server.GetPlayers().ToArray();

            foreach (Player player in players)
            {
                if (nowNerd)
                {
                    player.ChangeRole(Smod2.API.RoleType.SCIENTIST);
                    player.GiveItem(Smod2.API.ItemType.USP);
                }
                else
                {
                    player.ChangeRole(Smod2.API.RoleType.CLASSD);
                    player.GiveItem(Smod2.API.ItemType.MEDKIT);
                    player.GiveItem(Smod2.API.ItemType.USP);
                }
                nowNerd = !nowNerd;
            }
        }
Example #9
0
        public void OnRoundStart(RoundStartEvent ev)
        {
            ServerTips.roundStarted = true;
            Thread TipHandler = new Thread(new ThreadStart(() => new TipHandler(plugin, plugin.GetConfigString("servertips"))));

            TipHandler.Start();
        }
        public void OnRoundStart(RoundStartEvent ev)
        {
            AdminToolbox.isRoundFinished = false;
            if (ConfigManager.Manager.Config.GetBoolValue("admintoolbox_round_info", true, false))
            {
                plugin.Info("Round: " + ++AdminToolbox.RoundCount + " started.");
                plugin.Info("Players this round: " + ev.Server.GetPlayers().Count);
            }
            AdminToolbox.AddMissingPlayerVariables();
            AdminToolbox.atfileManager.PlayerStatsFileManager(ev.Server.GetPlayers(), Managers.ATFileManager.PlayerFile.Write);
            AdminToolbox._logStartTime = DateTime.Now.Year.ToString() + "-" + ((DateTime.Now.Month >= 10) ? DateTime.Now.Month.ToString() : ("0" + DateTime.Now.Month.ToString())) + "-" + ((DateTime.Now.Day >= 10) ? DateTime.Now.Day.ToString() : ("0" + DateTime.Now.Day.ToString())) + " " + ((DateTime.Now.Hour >= 10) ? DateTime.Now.Hour.ToString() : ("0" + DateTime.Now.Hour.ToString())) + "." + ((DateTime.Now.Minute >= 10) ? DateTime.Now.Minute.ToString() : ("0" + DateTime.Now.Minute.ToString())) + "." + ((DateTime.Now.Second >= 10) ? DateTime.Now.Second.ToString() : ("0" + DateTime.Now.Second.ToString()));
            AdminToolbox.warpManager.RefreshWarps();

            AdminToolbox.roundStatsRecorded = false;

            if (intercomReady != string.Empty)
            {
                ev.Server.Map.SetIntercomContent(IntercomStatus.Ready, intercomReady);
            }
            if (intercomRestart != string.Empty)
            {
                ev.Server.Map.SetIntercomContent(IntercomStatus.Restarting, intercomRestart);
            }
            if (intercomTransmit != string.Empty)
            {
                ev.Server.Map.SetIntercomContent(IntercomStatus.Transmitting, intercomTransmit);
            }
        }
Example #11
0
        public void OnRoundStart(RoundStartEvent ev)
        {
            // Spawn in 457 if the chances are high enough
            if (Scp457SpawnChance <= 100 * Rng.NextDouble())
            {
                return;
            }

            Player scp457Player = null;

            List <Player> list = new List <Player>();

            foreach (Player player in plugin.pluginManager.Server.GetPlayers())
            {
                if (player.TeamRole.Role == Role.SCP_106)
                {
                    scp457Player = player;
                    break;
                }

                if (player.TeamRole.Team == Team.SCP)
                {
                    list.Add(player);
                }
            }

            if (scp457Player == null && list.Count > 0)
            {
                scp457Player = list[new Random().Next(list.Count)];
            }

            plugin.SpawnScp457(scp457Player);
        }
Example #12
0
 public void OnRoundStart(RoundStartEvent ev)
 {
     /// <summary>
     ///  This is the event handler for Round start events (before people are spawned in)
     /// </summary>
     plugin.SendMessage(Config.GetArray("channels.onroundstart"), "round.onroundstart");
     plugin.roundStarted = true;
 }
 public void OnRoundStart(RoundStartEvent ev)
 {
     while (CIQueue.Count != 0)
     {
         CusItemInfo info = CIQueue.Dequeue();
         Spawner.SpawnCustomItem(info.room, info.id, info.position, info.rotation);
     }
 }
        void OnRoundStart(RoundStartEvent e)
        {
            _text.enabled = true;

            _text.text = string.Format("{0} {1} {2}", PreRoundNumberText, e.Round.Manager.CurrentRoundIndex + 1, PostRoundNumberText);

            StartCoroutine(DisableText());
        }
Example #15
0
 public void OnRoundStart(RoundStartEvent ev)
 {
     if (SCPSpeech.s939I)
     {
         Coroutines.Add(Timing.RunCoroutine(CheckFor939Intercom()));
         intercomeArea = null;
     }
 }
 public void OnRoundStart(RoundStartEvent ev)
 {
     if (!plugin.UpToDate)
     {
         plugin.outdatedmsg();
     }
     RoundNumber++;
 }
Example #17
0
 void IEventHandlerRoundStart.OnRoundStart(RoundStartEvent ev)
 {
     /*foreach (Player plr in ev.Server.GetPlayers())
      * {
      *  ((GameObject)plr.GetGameObject()).GetComponent<Inventory>().ServerDropAll();
      * }*/
     //eMan.program.RoundStartParseData(ev);
 }
 public void OnRoundStart(RoundStartEvent ev)
 {
     /// <summary>
     ///  This is the event handler for Round start events (before people are spawned in)
     /// </summary>
     plugin.SendMessageToBot(plugin.GetConfigString("discord_channel_onroundstart"), "round.onroundstart");
     roundHasStarted = true;
 }
 public void OnRoundStart(RoundStartEvent ev)
 {
     if (plugin.GetConfigBool("ss_doors_stay_shut"))
     {
         foreach (Smod2.API.Door door in ev.Server.Map.GetDoors())
         {
             door.DontOpenOnWarhead = true;
         }
     }
 }
Example #20
0
        public void OnRoundStart(RoundStartEvent ev)
        {
            int spawnTries = 0;

            SelectPickup();
            while ((Scp035Pickup.ItemId == ItemType.Ammo556 || Scp035Pickup.ItemId == ItemType.Ammo9mm || Scp035Pickup.ItemId == ItemType.Ammo762) && spawnTries < 5)
            {
                Scp035Pickup = null;
                SelectPickup();
            }
        }
Example #21
0
        private void HandleRoundStart(object sender, RoundStartedEventArgs e)
        {
            RoundStartEvent newEvent = new RoundStartEvent()
            {
                TimeLimit = e.TimeLimit,
                FragLimit = e.FragLimit,
                Objective = e.Objective,
            };

            CurrentTick.Events.Add(newEvent);
        }
Example #22
0
 public void OnRoundStart(RoundStartEvent ev)
 {
     plugin.Info("ROUND START EVENT CALLER");
     plugin.Info("Players: " + ev.Server.GetPlayers().Count);
     foreach (Player player in ev.Server.GetPlayers())
     {
         // Print the player info and then their class info
         plugin.Info(player.ToString());
         plugin.Info(player.TeamRole.ToString());
     }
 }
Example #23
0
 public void OnRoundStart(RoundStartEvent ev)
 {
     AdminToolbox.isRoundFinished = false;
     AdminToolbox.roundCount++;
     if (ConfigManager.Manager.Config.GetBoolValue("admintoolbox_round_info", true, false))
     {
         plugin.Info("Round: " + AdminToolbox.roundCount + " started.");
         plugin.Info("Players this round: " + ev.Server.GetPlayers().Count);
     }
     AdminToolbox.AddMissingPlayerVariables();
     AdminToolbox._roundStartTime = DateTime.Now.Year.ToString() + "-" + ((DateTime.Now.Month >= 10) ? DateTime.Now.Month.ToString() : ("0" + DateTime.Now.Month.ToString())) + "-" + ((DateTime.Now.Day >= 10) ? DateTime.Now.Day.ToString() : ("0" + DateTime.Now.Day.ToString())) + " " + ((DateTime.Now.Hour >= 10) ? DateTime.Now.Hour.ToString() : ("0" + DateTime.Now.Hour.ToString())) + "." + ((DateTime.Now.Minute >= 10) ? DateTime.Now.Minute.ToString() : ("0" + DateTime.Now.Minute.ToString())) + "." + ((DateTime.Now.Second >= 10) ? DateTime.Now.Second.ToString() : ("0" + DateTime.Now.Second.ToString()));
 }
Example #24
0
 public void OnRoundStart(RoundStartEvent ev)
 {
     if (NextEvent != null)
     {
         eventOnGoing = true;
         NextEvent.EventStart(ev);
         if (NextEvent is IEventHandler)
         {
             Plugin.AddEventHandlers(NextEvent as IEventHandler);
         }
     }
 }
Example #25
0
 public void OnRoundStart(RoundStartEvent ev)
 {
     if (!Sitrep.Events.Contains("roundstartevent"))
     {
         return;
     }
     if (!Sitrep.CustomChannelIds.TryGetValue("roundstartevent", out ulong channel))
     {
         channel = Sitrep.EventsId;
     }
     Send(":zap: **Kolo začalo**!", channel);
 }
Example #26
0
 public void OnRoundStart(RoundStartEvent ev)
 {
     if (Commands.Exists(e => e.isQueue))
     {
         Commands.Find(e => e.isQueue).EventStart(new RoundStartEvent(ev.Server));
     }
     else
     {
         return;
     }
     this.round_ongoing = true;
     queue_event        = null;
 }
Example #27
0
 void OnRoundStartEvent(RoundStartEvent e)
 {
     AgendaItemsManager.instance.ClearItems();
     if (MultiplayerManager.instance.Hosting)
     {
         BeanPotManager.instance.OnRoundStart();
         RoleManager.instance.SetRandomRoles();
         MessageSender.instance.ScheduleMessage("UpdateAgendaItems");
         MessageSender.instance.ScheduleMessage("SendVotableItems");
         // TODO: fire this for the first round -- RoundState raises RoundStartEvent when a Decider is selected, so this won't work here
         // Player.instance.deciderManager.SetDecider (Player.instance.Name);
     }
 }
 public void OnRoundStart(RoundStartEvent ev)
 {
     roundstarted = true;
     foreach (Player player in ev.Server.GetPlayers())
     {
         blacklist.Add(player.SteamId);
         FilledTeams.Add((byte)player.TeamRole.Team);
         if (enabledSCPs.Contains((byte)player.TeamRole.Role))
         {
             enabledSCPs.Remove((byte)player.TeamRole.Role);
         }
     }
 }
Example #29
0
 public void OnRoundStart(RoundStartEvent ev)
 {
     AdminToolbox.isRoundFinished = false;
     if (ConfigManager.Manager.Config.GetBoolValue("admintoolbox_round_info", true, false))
     {
         plugin.Info("Round: " + AdminToolbox.roundCount + " started.");
         plugin.Info("Players this round: " + ev.Server.GetPlayers().Count);
     }
     AdminToolbox.AddMissingPlayerVariables();
     AdminToolbox.AdminToolboxLogger.PlayerStatsFileManager(null, LogHandlers.PlayerFile.Write);
     AdminToolbox._roundStartTime = DateTime.Now.Year.ToString() + "-" + ((DateTime.Now.Month >= 10) ? DateTime.Now.Month.ToString() : ("0" + DateTime.Now.Month.ToString())) + "-" + ((DateTime.Now.Day >= 10) ? DateTime.Now.Day.ToString() : ("0" + DateTime.Now.Day.ToString())) + " " + ((DateTime.Now.Hour >= 10) ? DateTime.Now.Hour.ToString() : ("0" + DateTime.Now.Hour.ToString())) + "." + ((DateTime.Now.Minute >= 10) ? DateTime.Now.Minute.ToString() : ("0" + DateTime.Now.Minute.ToString())) + "." + ((DateTime.Now.Second >= 10) ? DateTime.Now.Second.ToString() : ("0" + DateTime.Now.Second.ToString()));
     AdminToolbox.warpVectors     = new Dictionary <string, Vector>(AdminToolbox.presetWarps);
 }
        public void OnRoundStart(RoundStartEvent ev)
        {
            var randomlo = plugin.Config.GetBool("aerutils_randomlo_enable", true);

            if (!randomlo)
            {
                return;
            }
            {
                var utilsenable   = plugin.Config.GetBool("aerutils_enable", true);
                var aerutils_lo   = plugin.Config.GetBool("aerutils_lo_enable", true);
                var lo_cassie_msg = plugin.Config.GetString("aerutils_lo_cassie", "Warning . Generator malfunction detected");
                if (!utilsenable)
                {
                    return;
                }
                if (!aerutils_lo)
                {
                    return;
                }
                var randomlo_time      = plugin.Config.GetInt("aerutils_randomlo_time", 20);
                var randomlo_delay_min = plugin.Config.GetInt("aerutils_randomlo_delay_min", 30);
                var randomlo_delay_max = plugin.Config.GetInt("aerutils_randomlo_delay_min", 60);
                var randomlo_onlyhcz   = plugin.Config.GetBool("aerutils_randomlo_onlyhcz", true);
                if (randomlo_time <= 0)
                {
                    return;
                }
                if (randomlo_delay_min <= 0 || randomlo_delay_max <= 0)
                {
                    return;
                }
                if (randomlo == true && randomlo_time >= 1 && randomlo_delay_min >= 1 && randomlo_delay_max >= 1)
                {
                    Timing.RunCoroutine(RandomLODelay());

                    IEnumerator <float> RandomLODelay()
                    {
                        while (true)
                        {
                            var rdelay = random.Next(randomlo_delay_min, randomlo_delay_max + 1);
                            Server.Round.EnableFlickering(randomlo_time, randomlo_onlyhcz);
                            yield return(Timing.WaitForSeconds(rdelay));

                            Server.Round.CustomCassieSL(lo_cassie_msg);
                        }
                    }
                }
            }
        }