Exemplo n.º 1
0
 private void PrintRollName(Entity player, RTDItem item, bool rollagain = false)
 {
     if (rollagain)
     {
         player.PrintlnBold("You rolled: " + item.FullName + " and Roll Again");
         Utility.Println(player.Name + " rolled - " + item.FullName + " and Roll Again");
     }
     else
     {
         player.PrintlnBold("You rolled: " + item.FullName);
         Utility.Println(player.Name + " rolled - " + item.FullName);
     }
 }
Exemplo n.º 2
0
        public override void OnPlayerKilled(Entity player, Entity inflictor, Entity attacker, int damage, string mod, string weapon, Vector3 dir, string hitLoc)
        {
            if (mod == "MOD_SUICIDE" || attacker == null || !attacker.IsPlayer || attacker.GetTeam() == player.GetTeam())
            {
                player.SetField("rtd_canroll", 0);
            }
            else
            {
                if (player.GetTeam() == "axis")
                {
                    player.SetField("deathstreak", player.GetField <int>("deathstreak") + 1);
                }
                else if (attacker.GetTeam() == "axis")
                {
                    player.SetField("deathstreak", 0);
                }
            }

            if (weapon == "nuke_mp")
            {
                player.Call("detachall");
                return;
            }

            else if (player.GetField <int>("rtd_flag") == 1)
            {
                player.Call("detach", RTDItem.GetCarryFlag(), "j_spine4");
            }
            else if (player.GetField <int>("rtd_king") == 1)
            {
                player.Call("detach", RTDItem.GetCarryFlag(), "j_spine4");
            }
            else if (player.GetField <int>("rtd_tombstone") == 1)
            {
                player.SetField("rtd_tombstoneorigin", player.Origin);
            }
            else if (player.GetField <int>("rtd_boomer") == 1)
            {
                foreach (var item in GetClosingHumans(player))
                {
                    if (item.GetField <int>("perk_cherry") == 1)
                    {
                        item.Call("setblurforplayer", 6, 0.5f);
                        item.Call("shellshock", "concussion_grenade_mp", 2);
                        item.AfterDelay(2000, e =>
                        {
                            item.Call("setblurforplayer", 0, 0.3f);
                        });
                    }
                    else
                    {
                        item.Call("setblurforplayer", 6, 0.5f);
                        item.Call("shellshock", "concussion_grenade_mp", 5);
                        item.AfterDelay(5000, e =>
                        {
                            item.Call("setblurforplayer", 0, 0.3f);
                        });
                    }
                }
            }
            else if (player.GetField <int>("rtd_spider") == 1)
            {
                SpiderAcidArea(player, player.Origin);
            }
            else if (player.GetField <int>("rtd_somker") == 1)
            {
                player.Notify("smoker");
            }
            else if (player.GetField <int>("rtd_ice") == 1)
            {
                Effects.PlayFx(Effects.smallempfx, player.Origin);
                foreach (var item in PerkColaFunction.GetClosingZombies(player))
                {
                    if (item.GetField <float>("speed") >= 1f)
                    {
                        item.SetSpeed(0.5f);
                        item.AfterDelay(5000, e => item.SetSpeed(1));
                    }
                }
            }
            else if (player.GetField <int>("rtd_mystery") == 1)
            {
                switch (Utility.Random.Next(2))
                {
                case 0:
                    attacker.Health = 1000;
                    attacker.Notify("radius_exploed", player.Origin);
                    player.GamblerText("Incantation!", new Vector3(0, 0, 0), new Vector3(1, 1, 1), 1, 0);
                    AfterDelay(200, () => attacker.SetMaxHealth());
                    break;

                case 1:
                    player.Notify("isis_exploed");
                    break;
                }
            }
            else if (player.GetField <int>("rtd_tesla") == 1)
            {
                foreach (var item in GetClosingHumans(player))
                {
                    item.Notify("emp_grenaded", player);
                }
            }

            if (mod == "MOD_HEAD_SHOT")
            {
                player.Call("detachall");
            }
        }