public void OnSetRole(PlayerSetRoleEvent ev)
 {
     if (ev.Role == Role.SCP_106)
     {
         ev.Player.PersonalBroadcast(10, "SCP106 has been changed on this server. Your portals will now randomly teleport you almost anywhere in the facility.", false);
     }
 }
예제 #2
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     if (this.plugin.enable)
     {
         this.plugin.OnCheckRemoveGuns(ev.Player);
     }
 }
예제 #3
0
 void IEventHandlerSetRole.OnSetRole(PlayerSetRoleEvent ev)
 {
     if (roundStarted && ev.Role == Role.CHAOS_INSUGENCY)
     {
         ev.Player.ChangeRole(Role.NTF_COMMANDER);
     }
     else if (ev.Role == Role.SPECTATOR || players.Contains(ev.Player.PlayerId))
     {
         return;
     }
     else if (!players.Contains(ev.Player.PlayerId))
     {
         plugin.Info("Spawning player " + ev.Player.Name);
         if (!oneSevenThreeSpawned)
         {
             players.Add(ev.Player.PlayerId);
             oneSevenThreeSpawned = true;
             ev.Player.ChangeRole(Role.SCP_173);
         }
         else
         {
             players.Add(ev.Player.PlayerId);
             ev.Player.ChangeRole(Role.CLASSD);
         }
     }
 }
예제 #4
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     /// <summary>
     /// Called after the player is set a class, at any point in the game.
     /// <summary>
     plugin.SendMessageAsync(plugin.GetConfigString("discord_channel_onsetrole"), ev.Player.Name + " (" + ev.Player.SteamId + plugin.MultiLanguage(32) + ev.TeamRole.Name + ".");
 }
예제 #5
0
        public void OnSetRole(PlayerSetRoleEvent ev)
        {
            // TENIENTE //


            if (ev.Player.TeamRole.Role == Role.NTF_LIEUTENANT)
            {
                if (!NTFli.ContainsKey(ev.Player.SteamId))
                {
                    NTFlic4.Add(ev.Player.SteamId, false);
                    NTFli.Add(ev.Player.SteamId, true);
                    ev.Player.SendConsoleMessage("[cambiar las tornas]: Cambiar las tornas es una pasiva Tactica con 40s de cooldown  la cual teletransporta al enemigo cuando este esta a menos del 50% de vida . (Esta habilidad no se aplica a SCPS pero si a Zombies y tampoco se aplica a aliados)", "blue");
                    ev.Player.PersonalBroadcast(10, "Tu pasiva es [cambiar las tornas]: Cambias la posición del enemigo de forma aleatoria cuando esta por debajo de 50%  (mas info en la consola), cuando has usado tu habilidad durante 40s tienes la pasiva", false);
                    ev.Player.PersonalBroadcast(10, "[De servicio] que aumenta tu daño en 15 a todos los objetivos y es el doble de daño contra chaos, con SCPS 1% de la vida actual del SCP", false);
                }
            }

            // CADETE //
            if (ev.Player.TeamRole.Role == Role.NTF_CADET)
            {
                ev.Player.SendConsoleMessage("[Flash rápido]: Tras lanzar una granada cegadora obtienes un escudo de 30 de salud, (este se anula si el comandante usa su granada para aplicarte 200 de salud pero se acumula si se aplicó los 200 de salud antes)", "blue");
                ev.Player.PersonalBroadcast(10, "Tu pasiva es [Tenacidad explosiva]: Recibes daño reducido entre 2 de las granadas.[Flash Rápido]: (mas info en la consola)", false);
            }
            // COMANDANTE //
            if ((ev.Player.TeamRole.Role == Role.NTF_COMMANDER))
            {
                ev.Player.SendConsoleMessage("[Preocupación por los tuyos]: Tus disparos hacen como cura parte del daño que causarían a tus aliados y las granadas Instacuran 200 de salud (¡OJO!: No se aplica a guardias ni científicos", "blue");
                ev.Player.PersonalBroadcast(10, "Tu pasiva es [Lider del Escudrón]: Causas daño adicional a secas (15) el doble contra sujetos a mitad de vida.[Preocupación por los tuyos]: tus ataques curan aliados (mas info en la consola)", false);
            }
        }
예제 #6
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     if (!Portales.ContainsKey(ev.Player.PlayerId))
     {
         Portales.Add(ev.Player.PlayerId, (nulo));
     }
 }
예제 #7
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {//asignar roles///
     if (!Rolesss.ContainsKey(ev.Player.SteamId))
     {
         if (contador == 0)
         {
             ev.Player.ChangeRole(Role.CHAOS_INSURGENCY);
             contador = 1;
             Rolesss.Add(ev.Player.SteamId, ev.Player.TeamRole.Role);
         }
         if (contador == 1)
         {
             ev.Player.ChangeRole(Role.NTF_LIEUTENANT);
             contador = 0;
             Rolesss.Add(ev.Player.SteamId, ev.Player.TeamRole.Role);
         }
     }
     if (ev.Player.TeamRole.Role == Role.CHAOS_INSURGENCY)
     {
         ev.Player.GiveItem(ItemType.E11_STANDARD_RIFLE);
         ev.Player.SetAmmo(AmmoType.DROPPED_5, 1000);
         ev.Player.SetAmmo(AmmoType.DROPPED_7, 1000);
         ev.Player.SetAmmo(AmmoType.DROPPED_9, 1000);
     }
     if (ev.Player.TeamRole.Role == Role.NTF_LIEUTENANT)
     {
         ev.Player.GiveItem(ItemType.LOGICER);
         ev.Player.SetAmmo(AmmoType.DROPPED_5, 1000);
         ev.Player.SetAmmo(AmmoType.DROPPED_7, 1000);
         ev.Player.SetAmmo(AmmoType.DROPPED_9, 1000);
     }
 }
예제 #8
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     if (ev.Role == Role.SPECTATOR)
     {
         spawnGhost.Add(new Ghost {
             playerId = ev.Player.PlayerId, remainingTime = 3f, spawnPos = Vector.Zero
         });
     }
     if (ev.Role == Role.TUTORIAL)
     {
         ev.Player.SetGhostMode(true);
         ev.Player.SetGodmode(true);
         ev.Player.GiveItem(ItemType.RADIO);
         ev.Player.SetRadioBattery(999);
     }
     else
     {
         if (ev.Player.GetGhostMode())
         {
             ev.Player.SetGhostMode(false);
         }
         if (ev.Player.GetGodmode())
         {
             ev.Player.SetGodmode(false);
         }
     }
 }
예제 #9
0
        public void OnSetRole(PlayerSetRoleEvent ev)
        {
            if (GamemodeManager.GamemodeManager.CurrentMode == plugin)
            {
                foreach (Item item in ev.Player.GetInventory())
                {
                    if (item.Equals(ItemType.FRAG_GRENADE))
                    {
                        item.Remove();
                    }
                }

                if (ev.Role == Role.SCIENTIST)
                {
                    ev.Items.Add(ItemType.E11_STANDARD_RIFLE);
                    ev.Items.Add(ItemType.DISARMER);
                    ev.Items.Add(ItemType.RADIO);
                }
                else if (ev.Role == Role.NTF_SCIENTIST)
                {
                    ev.Items.Add(ItemType.FLASHBANG);
                    ev.Items.Add(ItemType.DISARMER);
                }
            }
            //CheckEndCondition();
        }
예제 #10
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     if (!Cooldown2.ContainsKey(ev.Player.SteamId))
     {
         Cooldown2.Add(ev.Player.SteamId, true);
     }
 }
예제 #11
0
        // El 049 cura instantaneo a los clases d y scientist y cada 6 clases d 1 puede mutar con un 35% en otro scp
        // Los zombies cuanto mas tiempo vivan mas daño hacen y reciben  150 de vida 5 veces

        public void OnSetRole(PlayerSetRoleEvent ev)
        {
            if ((ev.Player.TeamRole.Role == Role.SCP_049_2))
            {
                conta049 += 1;


                ev.Player.PersonalBroadcast(10, "Tu pasiva es [Recuerdos]:Recibes efectos según tu role anterior, si eras clase D: eres invisible cada 5s.", false);
                ev.Player.PersonalBroadcast(10, "Cientifico: inmortalidad cada 5s, cadete resistencia a disparos x/2 ", false);
                ev.Player.PersonalBroadcast(10, "Comandante: todos los efectos menos el clase d, cientifico NTF: dañar te cura 700 de vida", false);
                ev.Player.PersonalBroadcast(10, "Chaos: matas de un hit, Guardia: reflejas daño/10, Teniente: al morir explotas sin causar daño a aliados", false);
                int p = (int)System.Environment.OSVersion.Platform;
                if (Zombie.ContainsKey(ev.Player.SteamId))
                {
                    if (Zombie[ev.Player.SteamId] == 0)
                    {
                        if ((p == 4) || (p == 6) || (p == 128))
                        {
                            MEC.Timing.RunCoroutine(Zombie0(ev.Player), MEC.Segment.FixedUpdate);
                        }
                        else
                        {
                            MEC.Timing.RunCoroutine(Zombie0(ev.Player), 1);
                        }
                    }
                    if ((Zombie[ev.Player.SteamId] == 1) || (Zombie[ev.Player.SteamId] == 7))
                    {
                        if ((p == 4) || (p == 6) || (p == 128))
                        {
                            MEC.Timing.RunCoroutine(Zombie1(ev.Player), MEC.Segment.FixedUpdate);
                        }
                        else
                        {
                            MEC.Timing.RunCoroutine(Zombie1(ev.Player), 1);
                        }
                    }
                }


                if (conta049 >= 6)
                {
                    if ((p == 4) || (p == 6) || (p == 128))
                    {
                        MEC.Timing.RunCoroutine(Mutar(ev.Player), MEC.Segment.FixedUpdate);
                    }
                    else
                    {
                        MEC.Timing.RunCoroutine(Mutar(ev.Player), 1);
                    }
                    conta049 = 0;
                }
            }
            if (ev.Player.TeamRole.Role == Role.SCP_049)
            {
                ev.Player.SendConsoleMessage("[Mutar]: Cada 6 Zombies curados el zombie número 6 tiene un 35 % de mutar en otro SCP a los 3 minutos, No puede mutar en SCP-096 o en SCP-079, La mutación es totalmente aleatoria ", "red");
                ev.Player.PersonalBroadcast(10, "Tu pasiva es [Manipulador de cuerpos]: Curas de forma instantanea a clasesd/scientists [Mutar]: Cada 6 bajas una tiene posibilidades de mutar (mas info en la consola)  .", false);
                ev.Player.PersonalBroadcast(10, "Tu pasiva es [Padre vengativo]: cuando muere 1 zombie todo plaga se cura 75 de hp   .", false);
            }
        }
예제 #12
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     //Asignar puntos//
     if (!Puntuacion.ContainsKey(ev.Player.SteamId))
     {
         Puntuacion.Add(ev.Player.Name, 0);
     }
 }
예제 #13
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     if (ev.Player.TeamRole.Role == Role.CHAOS_INSURGENCY)
     {
         ev.Player.PersonalBroadcast(10, "Tu pasiva es [Carroñero]: Recibes un botiquin por cada NTF que asesines [Luchador de doble filo]: La vida que te falte la inflinges como daño adicional entre 2.", false);
         ev.Player.PersonalBroadcast(10, "Luchador de doble filo no afecta a SCPS de la misma forma, cuando estas a 80 o menos causas 20 de daño a SCPS y 3 de daño al 106", false);
     }
 }
예제 #14
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     if (((ev.Player.TeamRole.Role == Role.SCP_096)) && (Llorona == true))
     {
         Llorona = true;
         ev.Player.PersonalBroadcast(10, "Tu pasiva es [Gritos de guerra]: Matar a jugadores cura a todo tu equipo y te cura ,Habilidad [Recordatorio mortal]: revives perdiendo vida de forma progresiva.", false);
     }
 }
예제 #15
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     if ((ev.Player.TeamRole.Role == Role.SCP_106) && (!Scp106.ContainsKey(ev.Player.SteamId)))
     {
         Scp106.Add(ev.Player.SteamId, 0);
         ev.Player.PersonalBroadcast(10, "Tu pasiva es [Digestión]: Te curas cuando alguien muere en tu dimensión [Golpe Crítico]: Tu quinta victima muere al instante.", false);
         ev.Player.PersonalBroadcast(10, "Tu Habilidad es [Presencia Espectral]: Cuando ejecutas a una persona por Golpe crítico te haces invisible hasta que ataques a otra persona.", false);
     }
 }
예제 #16
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     send(ev, new IdMapping()
          .appendId(Lib.PLAYER_ID, ev.Player)
          .appendId(Lib.PLAYER_EVENT_SCPDATA_ID, ev.Player.Scp079Data)
          .appendId(Lib.PLAYER_EVENT_TEAM_ROLE_ID, ev.Player.TeamRole)
          .appendId(Lib.PLAYER_TEAM_ROLE_ID, ev.TeamRole)
          );
 }
예제 #17
0
 /// <summary>
 /// If you change your role while being 343 it gives you back your old rank name and color (Not permissions).
 /// </summary>
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     if (Is343(ev.Player))
     {
         SCP_343Manager _343Manager = Get343Manager(ev.Player);
         _343Manager.Is343 = false;
         ev.Player.SetRank(_343Manager.PreviousBadgeColor, _343Manager.PreviousBadgeColor);
     }
 }
예제 #18
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     if (GamemodeManager.GamemodeManager.GetCurrentMode().Equals(plugin))
     {
         ev.Player.SetAmmo(AmmoType.DROPPED_5, 1000);
         ev.Player.SetAmmo(AmmoType.DROPPED_7, 1000);
         ev.Player.SetAmmo(AmmoType.DROPPED_9, 1000);
     }
 }
예제 #19
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     if ((ev.Player.TeamRole.Role == Smod2.API.Role.SCP_173) && (!Scp173.ContainsKey(ev.Player.SteamId)))
     {
         ev.Player.PersonalBroadcast(10, "Tu pasiva es [Go big or go Home]: cuando mueres te vas a lo GRANDE, tu habilidad es [Resurgir etereo]: revives al minuto con intervalos de invisibilidad. ", false);
         Scp173deads.Add(ev.Player.SteamId, true);
         Scp173.Add(ev.Player.SteamId, true);
     }
 }
예제 #20
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     if ((ev.Role == Role.CLASSD) && (!Classdh.ContainsKey(ev.Player.SteamId)))
     {
         cooldownn.Add(ev.Player.SteamId, 0);
         Classdh.Add(ev.Player.SteamId, true);
         ev.Player.PersonalBroadcast(10, "Tu pasiva es [Astucia] robas munición al disparar. [Dboy rules]: cuando estas a poca vida robas vida. Tu Habilidad es [Sigilo de doble filo]tirar tu linterna te hace invisible 10s . ", false);
         ev.Player.PersonalBroadcast(10, " [Sigilo de doble filo]:resta 35 de salud cada vez que la usas (puedes morir si tienes menos de 36 de salud), y para hacerte invisible TIRA LA LINTERNA AL SUELO. ", false);
     }
 }
예제 #21
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     if (ev.Player.TeamRole.Role == Role.SCP_079)
     {
         ev.Player.PersonalBroadcast(10, "079Upgrade: puedes usar los comandos: .nukeoff .nukenow .nanobots .doorsclosed y .elevatorsoff", false);
         if (!Pasivaa.ContainsKey(ev.Player.SteamId))
         {
             Pasivaa.Add(ev.Player.SteamId, true); Speakers.Add(ev.Player.SteamId, false);
         }
     }
 }
예제 #22
0
        public void OnSetRole(PlayerSetRoleEvent ev)
        {
            if (!plugin.spawnBroadcast || !plugin.enable)
            {
                return;
            }

            if (ev.Role == SMRole.SCP_079)
            {
                MEC.Timing.RunCoroutine(Pro079Logic.DelaySpawnMsg(ev.Player), 1);
            }
        }
예제 #23
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     if ((ev.Player.TeamRole.Role == Role.FACILITY_GUARD) && (!Guardias.ContainsKey(ev.Player.SteamId)))
     {
         Guardias.Add(ev.Player.SteamId, 0);
         ev.Player.SendConsoleMessage("[Cazadores]: Ganancia de XP = 1 por atacar un SCP, 1 por atacar a un chaos, 30 por eliminar un chaos o zombie , (60-100) por eliminar un SCP. Nivel: 2 Ganas 500 de todas las municiones y vida, Nivel 3 Ganas Veneno el las balas que causa 3 de daño adicional, Nivel: 4 Ganas 1 granada y cada vez que la lanzas la vuelves a obtener y obtienes mas vida, Nivel 5 nueva pasiva [Mismo destino]: te llevas a tu asesino con tigo ");
     }
     if (ev.Player.TeamRole.Role == Role.FACILITY_GUARD)
     {
         ev.Player.PersonalBroadcast(10, "Tu pasiva es [Cazadores]: subes de nivel por atacar y matar scps y chaos, recompensas por nivel en la consola.", false);
     }
 }
예제 #24
0
        public void OnSetRole(PlayerSetRoleEvent ev)
        {
            // asigna la pasiva al 079
            if (!Pasivaa.ContainsKey(ev.Player.SteamId))
            {
                Pasivaa.Add(ev.Player.SteamId, true);
            }

            if (ev.Player.TeamRole.Role == Role.SCP_079)
            {
                ev.Player.PersonalBroadcast(10, "Tu habilidad es [control absoluto]: puedes usar los comandos .nukeoff .cellsopen .nukenow  y .elevatorsoff", false);
            }
        }
예제 #25
0
        public void OnSetRole(PlayerSetRoleEvent ev)
        {
            if (!isEnabled)
            {
                return;
            }

            // Counter admins changing roles through RA
            if (ev.Player.PlayerId == scpPlayer?.PlayerId)
            {
                KillScp035();
            }
        }
예제 #26
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     if (PluginManager.Manager.Server.Round.Duration < 5)
     {
         foreach (Player player in PluginManager.Manager.Server.GetPlayers())
         {
             if ((player.TeamRole.Role == Role.CHAOS_INSURGENCY) && (contadorcaos == false))
             {
                 contadorcaos = true;
                 PluginManager.Manager.Server.Map.AnnounceCustomMessage("attention all facility personnel, Unauthorized personnel has been detected on the surface");
             }
         }
     }
 }
예제 #27
0
        public void OnSetRole(PlayerSetRoleEvent e)
        {
            Player player = e.Player;

            if (SCP457.SteamIDIsSCP457(player.SteamId) && e.Role == Role.SCP_106)
            {
                player.SetHealth(this.plugin.GetConfigInt("scp457_health"), DamageType.NUKE);
                new Thread(new ThreadStart(this.DelayHealthSet)).Start();
            }
            if (SCP457.SteamIDIsSCP457(player.SteamId) && e.Role != Role.SCP_106)
            {
                this.plugin.RemoveSCP457(player.SteamId);
            }
        }
예제 #28
0
 public void OnSetRole(PlayerSetRoleEvent ev)
 {
     if (Plugin.isEnabled)
     {
         if (ev.Player.TeamRole.Role.Equals(Role.UNASSIGNED))
         {
             return;
         }
         if (Plugin.SpyDict.ContainsKey(ev.Player.SteamId) && ev.Player.TeamRole.Team != Smod2.API.Team.NINETAILFOX && ev.Player.TeamRole.Team != Smod2.API.Team.CHAOS_INSURGENCY)
         {
             Plugin.SpyDict.Remove(ev.Player.SteamId);
         }
     }
 }
예제 #29
0
    public JsonSetting[] handle(object api, Dictionary <string, string> mapper)
    {
        string[]        strs  = Lib.getArray(mapper["items"]);
        List <ItemType> types = new List <ItemType>();

        for (int i = 0; i < strs.Length; i++)
        {
            types.Add((ItemType)JsonConvert.DeserializeObject(strs[i], typeof(ItemType)));
        }
        PlayerSetRoleEvent e = api as PlayerSetRoleEvent;

        e.Items = types;
        return(null);
    }
예제 #30
0
        public void OnSetRole(PlayerSetRoleEvent ev)
        {
            ev.Items.AddRange(GetPatronItems(ev.Player, ev.TeamRole));

            foreach (Patron patron in PatreonPlugin.GetPatrons())
            {
                if (patron.SteamId != ev.Player.SteamId || !patron.AutoRefresh)
                {
                    continue;
                }

                PlayerJoinHandler.SetPatronRoles(ev.Player);
                break;
            }
        }