private static void AddBackpack( Mobile m )
		{
			Container pack = m.Backpack;

			if ( pack == null )
			{
				pack = new Backpack();
				pack.Movable = false;

				m.AddItem( pack );
			}

			PackItem( new Gold( 50000 ) ); // Starting gold can be customized here
			//PackItem( new MiniRewardCan() );
			//PackItem( new Dagger() );
            PackItem(new Spellbook(UInt64.MaxValue));
            //PackItem( new KeyRing());
            //PackItem( new PlayerGuide());
            PackItem( new Scissors());
             PackItem(new BagOfReagents());
            PackItem(new BagOfScrolls());
            PackItem(new ManaPotion( 5000 ) );
            PackItem(new GreaterHealPotion( 5000 ) );
            PackItem(new Bandage( 5000 ) );





		}
		public override void OnGaveMeleeAttack( Mobile defender )
		{
			base.OnGaveMeleeAttack( defender );

			if ( defender is PlayerMobile && ( defender.BodyValue == 400 || defender.BodyValue == 401 ) && CanBeHarmful(defender, false) )
			{
				Item robe = defender.FindItemOnLayer( Layer.OuterTorso );

				if ( robe != null && robe.Movable )
					defender.AddToBackpack( robe );

				Item[] items = defender.Backpack.FindItemsByType( typeof( Spellbook ) );

				foreach ( Spellbook book in items )
				{
					book.Delete();
				}

				defender.BodyMod = 155;
				defender.NameMod = "an infestation zombie";
				defender.Hidden = true;
				defender.Combatant = null;
				this.Combatant = null;
				defender.AddItem( new ZIRobe( defender ) );
			}
		}
        private static void AddBackpack( Mobile m )
        {
            Container pack = m.Backpack;

            if( pack == null )
            {
                pack = new Backpack();
                pack.Movable = false;

                m.AddItem(pack);
            }
        }
        private static void AddBackpack(Mobile m)
        {
            Container pack = m.Backpack;

            if (pack == null)
            {
                pack = new Backpack();
                pack.Movable = false;

                m.AddItem(pack);
            }

            PackItem(new BankCheck(100000));
            PackItem(new Gold(10000)); // Starting gold can be customized here
            PackItem(new Scissors());
            PackItem(new Welcometotheshard());
            PackItem(new Backpack());
            PackItem(new SkillBallPlus());
            PackItem(new StatBall());
            PackItem(new BookOfTravel());
            PackItem(new SeaNavigator());
            PackItem(new BankStoneDeed());
            PackItem(new StonePlasterHouseDeed());
            PackItem(new MasterLooterBackpack());
            PackItem(new TokenLedger());
            PackItem(new GoldLedger());
            PackItem(new Trash4TokensBackpack());
            PackItem(new Spellbook(UInt64.MaxValue));
            PackItem(new NecromancerSpellbook((UInt64)0xFFFF));
            PackItem(new BookOfChivalry((UInt64)0x3FF));
            PackItem(new BookOfBushido());	//Default ctor = full
            PackItem(new BookOfNinjitsu()); //Default ctor = full

         /*   Runebook runebook = new Runebook(10);
              runebook.CurCharges = runebook.MaxCharges;
              PackItem(new  runebook());

              for (int i = 0; i < 9; ++i)
              PackItem(new RecallRune());
           */

            if (m.Race != Race.Gargoyle)
            {
                PackItem(new Dagger());
                PackItem(new LetterofApprenticeship());
                PackItem(new EtherealHorse());
            }
            else
            {
                PackItem(new GargishDagger());
                PackItem(new LetterofGargoyleApprenticeship());
            }
        }
		private static void AddBackpack( Mobile m )
		{
			Container pack = m.Backpack;

			if ( pack == null )
			{
				pack = new StrongBackpack();
				pack.Movable = false;

				m.AddItem( pack );
			}

            PackItem(new Gold(Utility.Random(999, 1111)));
            PackItem(new Dagger());
            PackItem(new Lantern());
            PackItem(new RedBook("Journal", m.Name, 20, true));
            PackItem(new BreadLoaf(5));
            PackItem(new Pitcher(BeverageType.Water));
            // PackItem(new Brush());

            /* Checks if already has a house. If not, we give him a deed.
            Account a = m.Account as Account;

            int houses = 0;

            if (a != null)
            {
                for (int i = 0; i < a.Length; ++i)
                {
                    Mobile mob = a[i];

                    if (mob != null)
                        houses += Multis.BaseHouse.GetHouses(mob).Count;
                }
            }

            if (houses == 0)
            {
                PackItem(new Multis.Deeds.FieldStoneHouseDeed());
            }
            
            // PackItem(new VendorRentalContract());
            // PackItem(new InteriorDecorator());
            // PackItem(new Server.ACC.YS.YardShovel());
            */
        }
        private static void AddBackpack(Mobile m)
        {
            Container pack = m.Backpack;

            if (pack == null)
            {
                pack = new Backpack();
                pack.Movable = false;

                m.AddItem(pack);
            }

            PackItem(new RedBook("a book", m.Name, 20, true));
            PackItem(new Gold(1000)); // Starting gold can be customized here
            PackItem(new Dagger());
            PackItem(new Candle());
        }
Exemple #7
0
        private static void AddBackpack(Mobile m)
        {
            Container pack = m.Backpack;

            if (pack == null)
            {
                pack = new Backpack();
                pack.Movable = false;

                m.AddItem(pack);
            }

            PackItem(new Gold(1000)); // Starting gold can be customized here
            PackItem(new Candle());

            if (m.Race != Race.Gargoyle)
                PackItem(new Dagger());
            else
                PackItem(new GargishDagger());
        }
		private static void AddBackpack( Mobile m )
		{
			Container pack = m.Backpack;

			if ( pack == null )
			{
				pack = new Backpack();
				pack.Movable = false;

				m.AddItem( pack );
			}

			PackItem( new Gold( 3000 ) ); // Starting gold can be customized here
			PackItem( new MiniRewardCan() );
			PackItem( new Dagger() );
			PackItem( new Spellbook() );
            PackItem( new KeyRing());
            PackItem( new PlayerGuide());
            PackItem( new Scissors());
		
		}
		private static void AddBackpack(Mobile m, Expansion e)
		{
			Container pack = m.Backpack;

			if (pack == null)
			{
				pack = new Backpack
				{
					Movable = false
				};

				m.AddItem(pack);
			}

			PackItem(MakeNewbie(new RedBook("a book", m.Name, 20, true), e), e);
			PackItem(new Gold(500), e); // Starting gold can be customized here
			PackItem(MakeNewbie(new Dagger(), e), e);
			PackItem(MakeNewbie(new Candle(), e), e);
			PackItem(new Bandage(100), e);
			//PackItem(new ForeverWelcomeBag(), e);
		}
Exemple #10
0
        public void OnDropTarget(Mobile from, object obj)
        {
            if (!(obj is SlayerForge))
            {
                from.SendMessage("Cela ne servirait à rien de verser le liquide ici");
                return;
            }
            
            SlayerForge targ = (SlayerForge)obj;

            if (targ.Movable)
            {
                from.SendMessage("Cela doit être fixé dans une maison pour être utilisé");
                return;
            }
            
            if (this.AlchemyLiquidType == LiquidType.None)
            {
                from.SendMessage("Vous ne pouvez verser une éprouvette vide");
                return;
            }
            
            if (this.AlchemyLiquidType == LiquidType.ChangelingBlood)
            {
                from.SendMessage("Ce contenu est destiné à un autre usage");
                return;
            }
            
            if (targ.CountVial >= targ.MaxVials)
            {
                from.SendMessage("Cette bassine est pleine");
                return;
            }

            from.SendMessage("Vous jetez le contenu de l'éprouvette dans la forge");
            targ.AddVial(this);
            Consume();

            if (Utility.RandomDouble() < (from.RawDex-10))
                from.AddItem(new AlchemyVial());
            else
            {
                from.SendMessage("L'éprouvette vous glisse des mains et se brise");
            }
        }
			public void EquipOneOfThese( Mobile mobile, Item orgItem )
			{
				if ( orgItem == null )
					return;
				else
				{
					Item newItem = DupeThis( orgItem );
					if ( newItem == null )
						return;
					newItem.LootType = orgItem.LootType;
					mobile.AddItem( newItem );
				}
			}
Exemple #12
0
        public static void RandomClothing(Mobile mob)
        {
            if (mob == null)
            {
                return;
            }

            switch (Utility.Random(3))
            {
            case 0:
                mob.AddItem(new FancyShirt(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                break;

            case 1:
                mob.AddItem(new Doublet(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                break;

            case 2:
                mob.AddItem(new Shirt(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                break;
            }

            switch (Utility.Random(4))
            {
            case 0:
                mob.AddItem(new Shoes(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                break;

            case 1:
                mob.AddItem(new Boots(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                break;

            case 2:
                mob.AddItem(new Sandals(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                break;

            case 3:
                mob.AddItem(new ThighBoots(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                break;
            }

            if (mob.Female)
            {
                switch (Utility.Random(6))
                {
                case 0:
                    mob.AddItem(new ShortPants(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                    break;

                case 1:
                case 2:
                    mob.AddItem(new Kilt(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                    break;

                case 3:
                case 4:
                case 5:
                    mob.AddItem(new Skirt(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                    break;
                }
            }
            else
            {
                switch (Utility.Random(2))
                {
                case 0:
                    mob.AddItem(new LongPants(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                    break;

                case 1:
                    mob.AddItem(new ShortPants(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                    break;
                }
            }
        }
Exemple #13
0
        public void OnTarget(Mobile from, object obj)
        {
            if (!(obj is Corpse))
            {
                from.SendMessage("Il vous faut trouver autre chose pour la remplir");
                return;
            }

            Corpse targcorpse = (Corpse)obj;

            if (targcorpse.Channeled)
            {
                from.SendMessage("Vous ne pouvez récolter que sur un corps frais");
                return;
            }

            Type type = null;

            if (targcorpse.Owner != null)
                type = targcorpse.Owner.GetType();

            AlchemyVial vial = new AlchemyVial();

            #region Check des différents corps
            // Ogre Trashing 
            if (type == typeof(Ogre) || type == typeof(OgreLord) || type == typeof(ArcticOgreLord))
            {
                from.SendMessage("Vous recueillez du sang d'ogre");
                vial.AlchemyLiquidType = LiquidType.OgreBlood;
            }
            //Orc Slaying 
            else if (type == typeof(Orc) || type == typeof(OrcBomber) || type == typeof(OrcBrute) || type == typeof(OrcCaptain) || type == typeof(OrcScout) || type == typeof(OrcishLord) || type == typeof(OrcishMage))
            {
                from.SendMessage("Vous recueillez du sang d'orc");
                vial.AlchemyLiquidType = LiquidType.OrcBlood;
            }
            //Troll Slaughter 
            else if (type == typeof(Troll) || type == typeof(FrostTroll))
            {
                from.SendMessage("Vous recueillez du sang de troll");
                vial.AlchemyLiquidType = LiquidType.TrollBlood;
            }
            //Blood Drinking
            else if (type == typeof(BloodElemental))
            {
                from.SendMessage("Vous recueillez de l'élément de sang");
                vial.AlchemyLiquidType = LiquidType.BloodElemental;
            }
            //Earth Shatter
            else if (type == typeof(AgapiteElemental) || type == typeof(BronzeElemental) || type == typeof(CopperElemental) || type == typeof(DullCopperElemental) || type == typeof(EarthElemental) || type == typeof(GoldenElemental) || type == typeof(ShadowIronElemental) || type == typeof(ValoriteElemental) || type == typeof(VeriteElemental))
            {
                from.SendMessage("Vous recueillez de l'élément de terre");
                vial.AlchemyLiquidType = LiquidType.EarthElemental;
            }
            //Elemental Health
            else if (type == typeof(PoisonElemental))
            {
                from.SendMessage("Vous recueillez de l'élément de poison");
                vial.AlchemyLiquidType = LiquidType.PoisonElemental;
            }
            //Flame Dousing
            else if (type == typeof(FireElemental))
            {
                from.SendMessage("Vous recueillez de l'élément de feu");
                vial.AlchemyLiquidType = LiquidType.FireElemental;
            }
            //Summer Wind
            else if (type == typeof(SnowElemental) || type == typeof(IceElemental))
            {
                from.SendMessage("Vous recueillez de l'élément de glace");
                vial.AlchemyLiquidType = LiquidType.IceElemental;
            }
            //Vacuum
            else if (type == typeof(AirElemental))
            {
                from.SendMessage("Vous recueillez de l'élément de vent");
                vial.AlchemyLiquidType = LiquidType.AirElemental;
            }
            //Water Dissipation
            else if (type == typeof(WaterElemental))
            {
                from.SendMessage("Vous recueillez de l'élément d'eau");
                vial.AlchemyLiquidType = LiquidType.WaterElemental;
            }
            //Gargoyle Foes
            else if (type == typeof(EnslavedGargoyle) || type == typeof(FireGargoyle) || type == typeof(Gargoyle) || type == typeof(GargoyleDestroyer) || type == typeof(GargoyleEnforcer) || type == typeof(StoneGargoyle))
            {
                from.SendMessage("Vous recueillez du sang de gargouille");
                vial.AlchemyLiquidType = LiquidType.GargoyleBlood;
            }
            //Scorpions Bane
            else if (type == typeof(Scorpion))
            {
                from.SendMessage("Vous recueillez du sang de scorpion");
                vial.AlchemyLiquidType = LiquidType.ScorpionBlood;
            }
            //Spiders Death
            else if (type == typeof(DreadSpider) || type == typeof(FrostSpider) || type == typeof(GiantBlackWidow) || type == typeof(GiantSpider) || type == typeof(Mephitis))
            {
                from.SendMessage("Vous recueillez du sang d'araignée");
                vial.AlchemyLiquidType = LiquidType.SpiderBlood;
            }
            //Terathan Avenger
            else if (type == typeof(TerathanAvenger) || type == typeof(TerathanDrone) || type == typeof(TerathanMatriarch) || type == typeof(TerathanWarrior))
            {
                from.SendMessage("Vous recueillez du sang de Terathan");
                vial.AlchemyLiquidType = LiquidType.TerathanBlood;
            }
            //Dragon Slayer
            else if (type == typeof(AncientWyrm) || type == typeof(GreaterDragon) || type == typeof(Dragon) || type == typeof(Drake) || type == typeof(Hiryu) || type == typeof(LesserHiryu) || type == typeof(SerpentineDragon) || type == typeof(ShadowWyrm) || type == typeof(SkeletalDragon) || type == typeof(SwampDragon) || type == typeof(WhiteWyrm) || type == typeof(Wyvern))
            {
                from.SendMessage("Vous recueillez du sang de dragon");
                vial.AlchemyLiquidType = LiquidType.DragonBlood;
            }
            //Lizardman Slaughter
            else if (type == typeof(Lizardman))
            {
                from.SendMessage("Vous recueillez du sang d'homme lézard");
                vial.AlchemyLiquidType = LiquidType.LizardmanBlood;
            }
            //Ophidian
            else if (type == typeof(OphidianArchmage) || type == typeof(OphidianKnight) || type == typeof(OphidianMage) || type == typeof(OphidianMatriarch) || type == typeof(OphidianWarrior))
            {
                from.SendMessage("Vous recueillez du sang d'ophidien");
                vial.AlchemyLiquidType = LiquidType.OphidianBlood;
            }
            //Snakes Bane
            else if (type == typeof(DeepSeaSerpent) || type == typeof(GiantIceWorm) || type == typeof(GiantSerpent) || type == typeof(IceSerpent) || type == typeof(IceSnake) || type == typeof(LavaSerpent) || type == typeof(LavaSnake) || type == typeof(SeaSerpent) || type == typeof(Serado) || type == typeof(SilverSerpent) || type == typeof(Snake) || type == typeof(Yamandon))
            {
                from.SendMessage("Vous recueillez du sang de serpent");
                vial.AlchemyLiquidType = LiquidType.SerpentBlood;
            }
            else if (type == typeof(AncientLich) || type == typeof(DarknightCreeper) || type == typeof(FleshGolem) || type == typeof(LadyOfTheSnow) || type == typeof(Lich) || type == typeof(LichLord) || type == typeof(Mummy) || type == typeof(PestilentBandage) || type == typeof(RevenantLion) || type == typeof(RottingCorpse) || type == typeof(ShadowKnight))
            {
                from.SendMessage("Vous recueillez du sang de mort-vivant");
                vial.AlchemyLiquidType = LiquidType.UndeadBlood;
            }
            else if (type == typeof(Centaur) || type == typeof(EtherealWarrior) || type == typeof(Kirin) || type == typeof(LordOaks) || type == typeof(Silvani) || type == typeof(Treefellow) || type == typeof(Unicorn) || type == typeof(MLDryad) || type == typeof(Satyr))
            {
                from.SendMessage("Vous recueillez du sang féérique");
                vial.AlchemyLiquidType = LiquidType.FairyBlood;
            }
            else if (type == typeof(AbysmalHorror) || type == typeof(ArcaneDaemon) || type == typeof(Balron) || type == typeof(BoneDemon) || type == typeof(ChaosDaemon) || type == typeof(Daemon) || type == typeof(DemonKnight) || type == typeof(Devourer) || type == typeof(FanDancer) || type == typeof(Gibberling) || type == typeof(IceFiend) || type == typeof(Impaler) || type == typeof(Oni) || type == typeof(Ravager) || type == typeof(Semidar) || type == typeof(Succubus) || type == typeof(TsukiWolf))
            {
                from.SendMessage("Vous recueillez du sang démoniaque");
                vial.AlchemyLiquidType = LiquidType.DaemonBlood;
            }
            //Potion de changement de sexe
            else if (type == typeof(Changeling))
            {
                from.SendMessage("Vous recueillez du sang de changeling");
                vial.AlchemyLiquidType = LiquidType.ChangelingBlood;
            }
            else
            {
                from.SendMessage("Cela ne vous servira à rien");
                return;
            }
            #endregion

            from.AddItem(vial);
            Consume();
            targcorpse.Channeled = true;
        }
 // copy what the possessee has equipped and wear it
 static void CopyLayer(Mobile possessed, Mobile from, Layer layer)
 {
     Item anItem = possessed.FindItemOnLayer(layer);
     if (anItem != null)
     {
         Item myitem = new Item();
         myitem.ItemID = anItem.ItemID;
         myitem.Hue = anItem.Hue;
         myitem.Layer = layer;
         from.AddItem(myitem);
     }
 }
Exemple #15
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is Mobile)
                {
                    Mobile targ = (Mobile)targeted;
                    if (from != targ)
                    {
                        from.SendMessage("You may only set your own body to GM style.");
                    }

                    else
                    {
                        m_Mobile = from;

                        CommandLogging.WriteLine(from, "{0} {1} is assuming a GM body", from.AccessLevel, CommandLogging.Format(from));

                        Container pack = from.Backpack;

                        if (pack == null)
                        {
                            pack         = new Backpack();
                            pack.Movable = false;

                            from.AddItem(pack);
                        }

                        from.Hunger  = 20;
                        from.Thirst  = 20;
                        from.Fame    = 0;
                        from.Karma   = 0;
                        from.Kills   = 0;
                        from.Hidden  = true;
                        from.Blessed = true;
                        from.Hits    = from.HitsMax;
                        from.Mana    = from.ManaMax;
                        from.Stam    = from.StamMax;

                        if (from.AccessLevel >= AccessLevel.Counselor)
                        {
                            EquipItem(new StaffRing());
                            Spellbook book1 = new Spellbook((ulong)18446744073709551615);
                            Spellbook book2 = new NecromancerSpellbook((ulong)0xffff);
                            Spellbook book3 = new BookOfChivalry();
                            Spellbook book4 = new BookOfBushido();
                            Spellbook book5 = new BookOfNinjitsu();

                            PackItem(new GMHidingStone());

                            PackItem(book1);
                            PackItem(book2);
                            PackItem(book3);
                            PackItem(book4);
                            PackItem(book5);
                            from.RawStr = 100;
                            from.RawDex = 100;
                            from.RawInt = 100;
                            from.Hits   = from.HitsMax;
                            from.Mana   = from.ManaMax;
                            from.Stam   = from.StamMax;

                            for (int i = 0; i < targ.Skills.Length; ++i)
                            {
                                targ.Skills[i].Base = 120;
                            }
                        }

                        if (from.AccessLevel == AccessLevel.Counselor)
                        {
                            EquipItem(new CounselorRobe());
                            EquipItem(new ThighBoots(3));
                            from.Title = "[Counselor]";
                        }

                        if (from.AccessLevel == AccessLevel.GameMaster)
                        {
                            EquipItem(new GMRobe());
                            EquipItem(new ThighBoots(39));
                            from.Title = "[GM]";
                        }

                        if (from.AccessLevel == AccessLevel.Seer)
                        {
                            EquipItem(new SeerRobe());
                            EquipItem(new ThighBoots(467));
                            from.Title = "[Seer]";
                        }

                        if (from.AccessLevel == AccessLevel.Administrator)
                        {
                            EquipItem(new AdminRobe());
                            EquipItem(new ThighBoots(1001));
                            from.Title = "[Admin]";
                        }

                        if (from.AccessLevel == AccessLevel.Developer)
                        {
                            EquipItem(new AdminRobe());
                            EquipItem(new ThighBoots(1001));
                            from.Title = "[Developer]";
                        }

                        if (from.AccessLevel == AccessLevel.Owner)
                        {
                            EquipItem(new AdminRobe());
                            EquipItem(new ThighBoots(1001));
                            from.Title = "[Owner]";
                        }
                    }
                }
            }
Exemple #16
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is Mobile)
                {
                    Mobile targ = (Mobile)targeted;
                    if (from != targ)
                    {
                        from.SendMessage("You may only set your own body to GM style.");
                    }

                    else
                    {
                        m_Mobile = from;

                        CommandLogging.WriteLine(from, "{0} {1} is assuming a GM body", from.AccessLevel, CommandLogging.Format(from));

                        Container pack = from.Backpack;

                        ArrayList ItemsToDelete = new ArrayList();

                        foreach (Item item in from.Items)
                        {
                            if (item.Layer != Layer.Bank && item.Layer != Layer.Hair && item.Layer != Layer.FacialHair && item.Layer != Layer.Mount && item.Layer != Layer.Backpack)
                            {
                                ItemsToDelete.Add(item);
                            }
                        }
                        foreach (Item item in ItemsToDelete)
                        {
                            item.Delete();
                        }

                        if (pack == null)
                        {
                            pack         = new Backpack();
                            pack.Movable = false;

                            from.AddItem(pack);
                        }
                        else
                        {
                            pack.Delete();
                            pack         = new Backpack();
                            pack.Movable = false;

                            from.AddItem(pack);
                        }

                        from.Hunger  = 20;
                        from.Thirst  = 20;
                        from.Fame    = 0;
                        from.Karma   = 0;
                        from.Kills   = 0;
                        from.Hidden  = true;
                        from.Blessed = true;
                        from.Hits    = from.HitsMax;
                        from.Mana    = from.ManaMax;
                        from.Stam    = from.StamMax;

                        if (from.IsStaff())
                        {
                            EquipItem(new StaffRing());
                            EquipItem(new StaffRobe());

                            PackItem(new GMHidingStone());
                            PackItem(new GMEthereal());
                            PackItem(new StaffOrb(from));

                            PackItem(new Spellbook((ulong)18446744073709551615));
                            PackItem(new NecromancerSpellbook((ulong)0xffff));
                            PackItem(new BookOfChivalry());
                            PackItem(new BookOfBushido());
                            PackItem(new SpellweavingBook((ulong)0xffff));

                            from.RawStr = 100;
                            from.RawDex = 100;
                            from.RawInt = 100;

                            from.Hits = from.HitsMax;
                            from.Mana = from.ManaMax;
                            from.Stam = from.StamMax;

                            for (int i = 0; i < targ.Skills.Length; ++i)
                            {
                                targ.Skills[i].Base = 120;
                            }
                        }

                        if (from.IsStaff() && from.AccessLevel <= AccessLevel.Spawner)
                        {
                            EquipItem(new FurBoots(3));
                        }
                        else if (from.AccessLevel == AccessLevel.GameMaster)
                        {
                            EquipItem(new FurBoots(39));
                        }
                        if (from.AccessLevel == AccessLevel.Seer)
                        {
                            EquipItem(new FurBoots(467));
                        }
                        if (from.AccessLevel == AccessLevel.Administrator)
                        {
                            EquipItem(new FurBoots(1001));
                        }
                        if (from.AccessLevel == AccessLevel.Developer)
                        {
                            EquipItem(new FurBoots(1001));
                        }
                        if (from.AccessLevel >= AccessLevel.CoOwner)
                        {
                            EquipItem(new FurBoots(1001));
                        }
                    }
                }
            }
Exemple #17
0
        public void KillPlayer(Mobile player)
        {
            player.SendMessage("You have been Painted!");
            player.Warmode = false;
            int team = -1;

            if (player.FindItemOnLayer(Layer.Cloak) != null)
            {
                team = player.FindItemOnLayer(Layer.Cloak).Hue;
            }

            else if (player.FindItemOnLayer(Layer.TwoHanded) != null)
            {
                team = player.FindItemOnLayer(Layer.TwoHanded).Hue;
                player.FindItemOnLayer(Layer.TwoHanded).Delete();
                Cloak cloak = new Cloak(team);
                cloak.Movable = false;
                player.AddItem(cloak);
            }

            bool Decrement = true;

            foreach (Item i in player.Backpack.Items)
            {
                if (i is Squash)
                {
                    Decrement = false;
                }
            }

            if (Decrement)
            {
                Squash squash = new Squash();
                squash.Visible = false;
                player.AddToBackpack(squash);
            }

            switch (team)
            {
            case 3:  { player.MoveToWorld(Exit1Dest, MapDest);    if (Decrement)
                       {
                           m_Team1 -= 1;
                       }
                       break; }

            case 38: { player.MoveToWorld(Exit2Dest, MapDest);    if (Decrement)
                       {
                           m_Team2 -= 1;
                       }
                       break; }

            case 68: { player.MoveToWorld(Exit3Dest, MapDest);    if (Decrement)
                       {
                           m_Team3 -= 1;
                       }
                       break; }

            case 53: { player.MoveToWorld(Exit4Dest, MapDest);    if (Decrement)
                       {
                           m_Team4 -= 1;
                       }
                       break; }

            default: break;
            }
        }
Exemple #18
0
 private void EquipItemFromLayer(Mobile equiper, Mobile from, Layer layer)
 {
     Item item = CopyItemFromLayer(from, layer);
     if (item != null)
     {
         equiper.AddItem(item);
     }
 }
Exemple #19
0
        // TODO: Angry fire
        public override void OnDamagedBySpell(Mobile from)
        {
            if (from.Combatant == null)
            {
                return;
            }

            Mobile m = from.Combatant;

            if (m.Body == 58)
            {
                m.Say("I now own your soul!!!");
            }

            if (m.Body != from.Body)
            {
                m.BoltEffect(0);

                m.Body = from.Body;
                m.Hue  = from.Hue;
                m.Name = from.Name;

                m.Fame  = from.Fame;
                m.Karma = (0 - from.Karma);
                m.Title = from.Title;

                m.Str = from.Str;
                m.Int = from.Int;
                m.Dex = from.Dex;

                m.Hits = from.Hits + 2000;

                m.Dex  = from.Dex;
                m.Mana = from.Mana;
                m.Stam = from.Stam;

                m.Female = from.Female;

                m.VirtualArmor = (from.VirtualArmor + 95);

                Item hair = new Item(Utility.RandomList(8265));
                hair.Hue     = 1167;
                hair.Layer   = Layer.Hair;
                hair.Movable = false;
                m.AddItem(hair);

                Kasa hat = new Kasa();
                hat.Hue     = 1167;
                hat.Movable = false;
                m.AddItem(hat);

                DeathRobe robe = new DeathRobe();
                robe.Name    = "Death Robe";
                robe.Hue     = 1167;
                robe.Movable = false;
                m.AddItem(robe);

                Sandals sandals = new Sandals();
                sandals.Hue     = 1167;
                sandals.Movable = false;
                m.AddItem(sandals);

                BagOfAllReagents bag = new BagOfAllReagents();
                m.AddToBackpack(bag);

                m.BoltEffect(0);
            }
            switch (Utility.Random(5))
            {
            case 0: m.Say("We are now one with each other!!"); break;

            case 1: m.Say("Your weak spells have no effect on me, muahahaha!!"); break;

            case 2: m.Say("Your end is near young adventurer!!"); break;

            case 3: m.Say("Thou shalt not pass my post!!"); break;

            case 4: m.Say("I now own your soul!!!"); break;
            }
            from.BoltEffect(0);
            from.Damage(Utility.Random(1, 50));
            m.Hits += (Utility.Random(1, 50));
        }
Exemple #20
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is Mobile)
                {
                    Mobile targ = (Mobile)targeted;
                    if (from != targ)
                    {
                        from.SendMessage("You may only set your own body to GM style.");
                    }

                    else
                    {
                        m_Mobile = from;

                        if (Config.Get("Staff.Staffbody", true))
                        {
                            m_Mobile.BodyValue = 987;

                            if (Config.Get("Staff.UseColoring", true))
                            {
                                switch (m_Mobile.AccessLevel)
                                {
                                case AccessLevel.Owner: m_Mobile.Hue = Config.Get("Staff.Owner", 1001); break;

                                case AccessLevel.Developer: m_Mobile.Hue = Config.Get("Staff.Developer", 1001); break;

                                case AccessLevel.Administrator: m_Mobile.Hue = Config.Get("Staff.Administrator", 1001); break;

                                case AccessLevel.Seer: m_Mobile.Hue = Config.Get("Staff.Seer", 467); break;

                                case AccessLevel.GameMaster: m_Mobile.Hue = Config.Get("Staff.GameMaster", 39); break;

                                case AccessLevel.Counselor: m_Mobile.Hue = Config.Get("Staff.Counselor", 3); break;
                                }
                            }
                        }

                        if (Config.Get("Staff.CutHair", true))
                        {
                            m_Mobile.HairItemID = 0;
                        }

                        if (Config.Get("Staff.CutFacialHair", true))
                        {
                            m_Mobile.FacialHairItemID = 0;
                        }

                        CommandLogging.WriteLine(from, "{0} {1} is assuming a GM body", from.AccessLevel, CommandLogging.Format(from));

                        Container pack = from.Backpack;

                        ArrayList ItemsToDelete = new ArrayList();

                        foreach (Item item in from.Items)
                        {
                            if (item.Layer != Layer.Bank && item.Layer != Layer.Hair && item.Layer != Layer.FacialHair && item.Layer != Layer.Mount && item.Layer != Layer.Backpack)
                            {
                                ItemsToDelete.Add(item);
                            }
                        }
                        foreach (Item item in ItemsToDelete)
                        {
                            item.Delete();
                        }

                        if (pack == null)
                        {
                            pack         = new Backpack();
                            pack.Movable = false;

                            from.AddItem(pack);
                        }
                        else
                        {
                            pack.Delete();
                            pack         = new Backpack();
                            pack.Movable = false;

                            from.AddItem(pack);
                        }

                        from.Hunger  = 20;
                        from.Thirst  = 20;
                        from.Fame    = 0;
                        from.Karma   = 0;
                        from.Kills   = 0;
                        from.Hidden  = true;
                        from.Blessed = true;
                        from.Hits    = from.HitsMax;
                        from.Mana    = from.ManaMax;
                        from.Stam    = from.StamMax;

                        if (from.IsStaff())
                        {
                            EquipItem(new StaffRing());

                            PackItem(new GMHidingStone());
                            PackItem(new GMEthereal());
                            PackItem(new StaffOrb());

                            from.RawStr = 100;
                            from.RawDex = 100;
                            from.RawInt = 100;

                            from.Hits = from.HitsMax;
                            from.Mana = from.ManaMax;
                            from.Stam = from.StamMax;

                            for (int i = 0; i < targ.Skills.Length; ++i)
                            {
                                targ.Skills[i].Base = 120;
                            }
                        }

                        if (Config.Get("Staff.GiveBoots", true))
                        {
                            int color = 0;
                            if (Config.Get("Staff.UseColoring", true))
                            {
                                switch (m_Mobile.AccessLevel)
                                {
                                case AccessLevel.Owner: color = Config.Get("Staff.Owner", 1001); break;

                                case AccessLevel.Developer: color = Config.Get("Staff.Developer", 1001); break;

                                case AccessLevel.Administrator: color = Config.Get("Staff.Administrator", 1001); break;

                                case AccessLevel.Seer: color = Config.Get("Staff.Seer", 467); break;

                                case AccessLevel.GameMaster: color = Config.Get("Staff.GameMaster", 39); break;

                                case AccessLevel.Counselor: color = Config.Get("Staff.Counselor", 3); break;
                                }
                            }

                            if (from.IsStaff() && from.AccessLevel <= AccessLevel.Spawner)
                            {
                                EquipItem(new FurBoots(color));
                            }
                            else if (from.AccessLevel == AccessLevel.GameMaster)
                            {
                                EquipItem(new FurBoots(color));
                            }
                            if (from.AccessLevel == AccessLevel.Seer)
                            {
                                EquipItem(new FurBoots(color));
                            }
                            if (from.AccessLevel == AccessLevel.Administrator)
                            {
                                EquipItem(new FurBoots(color));
                            }
                            if (from.AccessLevel == AccessLevel.Developer)
                            {
                                EquipItem(new FurBoots(color));
                            }
                            if (from.AccessLevel >= AccessLevel.CoOwner)
                            {
                                EquipItem(new FurBoots(color));
                            }
                        }
                    }
                }
            }
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is Mobile)
                {
                    Mobile targ = (Mobile)targeted;

                    if (from != targ && (!real || from.AccessLevel > targ.AccessLevel))
                    {
                        CommandLogging.WriteLine(from, "{0} {1} is cloning {2}", from.AccessLevel, CommandLogging.Format(from), CommandLogging.Format(targ));

                        from.Dex = targ.Dex;
                        from.Int = targ.Int;
                        from.Str = targ.Str;
                        from.Fame = targ.Fame;
                        from.Karma = targ.Karma;
                        from.NameHue = targ.NameHue;
                        from.SpeechHue = targ.SpeechHue;

                        from.Name = targ.Name;
                        from.Title = targ.Title;
                        from.Female = targ.Female;
                        from.Body = targ.Body;
                        from.Hue = targ.Hue;

                        from.Hits = from.HitsMax;
                        from.Mana = from.ManaMax;
                        from.Stam = from.StamMax;

                        if (location)
                        {
                            from.Location = targ.Location;
                            from.Direction = targ.Direction;
                            from.Map = targ.Map;
                        }

                        from.HairItemID = targ.HairItemID;
                        from.FacialHairItemID = targ.FacialHairItemID;
                        from.HairHue = targ.HairHue;
                        from.FacialHairHue = targ.FacialHairHue;

                        if (!targ.Player)
                            from.BodyMod = targ.Body;
                        else
                            from.BodyMod = 0;

                        for (int i = 0; i < from.Skills.Length; i++)
                            from.Skills[i].Base = targ.Skills[i].Base;

                        ArrayList m_items = new ArrayList(from.Items);
                        for (int i = 0; i < m_items.Count; i++)
                        {
                            Item item = (Item)m_items[i];
                            if (((item.Parent == from) && (item != from.Backpack)))
                                item.Delete();
                        }

                        ArrayList items = new ArrayList(targ.Items);
                        for (int i = 0; i < items.Count; i++)
                        {
                            Item item = (Item)items[i]; //my favorite line of code, ever.

                            if (((item != null) && (item.Parent == targ) && (item != targ.Backpack)))
                            {
                                Type t = item.GetType();
                                ConstructorInfo c = t.GetConstructor(Type.EmptyTypes);
                                if (c != null)
                                {
                                    try
                                    {
                                        object o = c.Invoke(null);
                                        if (o != null && o is Item)
                                        {
                                            Item newItem = (Item)o;
                                            CopyProperties(newItem, item);
                                            item.OnAfterDuped(newItem);
                                            newItem.Parent = null;
                                            from.AddItem(newItem);
                                        }
                                    }
                                    catch
                                    {
                                    }
                                }
                            }
                        }
                        if( !real)
                            CopyProps(from, targ, true, true, location);
                    }
                }
            }
Exemple #22
0
        public void BackpackCheck( Mobile mob )
        {
            if( !( mob is PlayerMobile ) )
               return;

            if( mob.Backpack == null )
            {
                Container pack = new ArmourBackpack();
                pack.Movable = false;
                mob.AddItem( pack );
            }
        }
        public static void RandomClothing( Mobile mob)
        {
            if (mob == null)
            {
                return;
            }

            switch (Utility.Random(3))
            {
                case 0:
                    mob.AddItem(new FancyShirt(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                    break;
                case 1:
                    mob.AddItem(new Doublet(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                    break;
                case 2:
                    mob.AddItem(new Shirt(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                    break;
            }

            switch (Utility.Random(4))
            {
                case 0:
                    mob.AddItem(new Shoes(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                    break;
                case 1:
                    mob.AddItem(new Boots(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                    break;
                case 2:
                    mob.AddItem(new Sandals(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                    break;
                case 3:
                    mob.AddItem(new ThighBoots(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                    break;
            }

            if (mob.Female)
            {
                switch (Utility.Random(6))
                {
                    case 0:
                        mob.AddItem(new ShortPants(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                        break;
                    case 1:
                    case 2:
                        mob.AddItem(new Kilt(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                        break;
                    case 3:
                    case 4:
                    case 5:
                        mob.AddItem(new Skirt(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                        break;
                }
            }
            else
            {
                switch (Utility.Random(2))
                {
                    case 0:
                        mob.AddItem(new LongPants(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                        break;
                    case 1:
                        mob.AddItem(new ShortPants(0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue()));
                        break;
                }
            }
        }
		private void EquipItems( Mobile Player, int TeamHue )
		{
			Player.SendMessage( "Equiping Team Items" );
			Player.AddItem( new PBArmor( TeamHue, 5136, Layer.Arms ) );
			Player.AddItem( new PBArmor( TeamHue, 5137, Layer.Pants ) );
			Player.AddItem( new PBArmor( TeamHue, 5138, Layer.Helm ) );
			Player.AddItem( new PBArmor( TeamHue, 5139, Layer.Neck ) );
			Player.AddItem( new PBArmor( TeamHue, 5140, Layer.Gloves ) );
			Player.AddItem( new PBArmor( TeamHue, 5141, Layer.InnerTorso ) );
			Player.AddItem( new PBWeapon( TeamHue, this ) );
			Cloak cloak = new Cloak( TeamHue );
			cloak.Movable = false;
			Player.AddItem( cloak );
			Player.AddToBackpack( new PaintBall( TeamHue, 200 ) );

			switch( TeamHue )
			{
				case 3:  {Player.MoveToWorld( Team1Dest, MapDest );	m_Team1+=1;	break;}
				case 38: {Player.MoveToWorld( Team2Dest, MapDest );	m_Team2+=1;	break;}
				case 68: {Player.MoveToWorld( Team3Dest, MapDest );	m_Team3+=1;	break;}
				case 53: {Player.MoveToWorld( Team4Dest, MapDest );	m_Team4+=1;	break;}
				default: {Player.MoveToWorld( Team1Dest, MapDest );	m_Team1+=1;	break;}
			}

			Player.Frozen = true;
		}
		public void KillPlayer( Mobile player )
		{
			player.SendMessage( "You have been Painted!" );
			player.Warmode = false;
			int team = -1;

			if( player.FindItemOnLayer( Layer.Cloak ) != null )
				team = player.FindItemOnLayer( Layer.Cloak ).Hue;

			else if( player.FindItemOnLayer( Layer.TwoHanded ) != null )
			{
				team = player.FindItemOnLayer( Layer.TwoHanded ).Hue;
				player.FindItemOnLayer( Layer.TwoHanded ).Delete();
				Cloak cloak = new Cloak( team );
				cloak.Movable = false;
				player.AddItem( cloak );
			}

			bool Decrement = true;
			foreach( Item i in player.Backpack.Items )
				if( i is Squash )
					Decrement = false;

			if( Decrement )
			{
				Squash squash = new Squash();
				squash.Visible = false;
				player.AddToBackpack( squash );
			}

			switch( team )
			{
				case 3:  { player.MoveToWorld( Exit1Dest, MapDest );	if( Decrement )m_Team1 -= 1;	break; }
				case 38: { player.MoveToWorld( Exit2Dest, MapDest );	if( Decrement )m_Team2 -= 1;	break; }
				case 68: { player.MoveToWorld( Exit3Dest, MapDest );	if( Decrement )m_Team3 -= 1;	break; }
				case 53: { player.MoveToWorld( Exit4Dest, MapDest );	if( Decrement )m_Team4 -= 1;	break; }
				default: break;
			}
		}
Exemple #26
0
		private void EquipItems( Mobile Player, int TeamHue )
		{
			Player.SendMessage( "Equiping Team Items" );
			Player.AddItem( new PBArmor( TeamHue, 5136, Layer.Arms ) );
			Player.AddItem( new PBArmor( TeamHue, 5137, Layer.Pants ) );
			Player.AddItem( new PBArmor( TeamHue, 5138, Layer.Helm ) );
			Player.AddItem( new PBArmor( TeamHue, 5139, Layer.Neck ) );
			Player.AddItem( new PBArmor( TeamHue, 5140, Layer.Gloves ) );
			Player.AddItem( new PBArmor( TeamHue, 5141, Layer.InnerTorso ) );
			Player.AddItem( new PBWeapon( TeamHue, this ) );
			Cloak cloak = new Cloak( TeamHue );
			cloak.Movable = false;
			Player.AddItem( cloak );
			Player.AddToBackpack( new PaintBall( TeamHue, 200 ) );

            if (m_Mod == 0)
            {

                for (int i = 0; i < m_NumNades; ++i)
                {
                    Player.AddToBackpack(new PBGrenade(TeamHue, this));
                }
            }
			
			if ( TeamHue == m_Team1Hue)
			{
				Player.Name = Player.Name + " (" + m_Team1Name + ")";
				foreach( Mobile mob in Announcers )
				{
		
				mob.PublicOverheadMessage( MessageType.Regular, 0x22, false, Player.Name + " Has Joined " + m_Team1Name );
				}
				Player.MoveToWorld( Team1Dest, MapDest );	
				m_Team1 += 1;
			}
			else if ( TeamHue == m_Team2Hue )
			{
				Player.Name = Player.Name + " (" + m_Team2Name + ")";
				foreach( Mobile mob in Announcers )
				{
		
				mob.PublicOverheadMessage( MessageType.Regular, 0x22, false, Player.Name + " Has Joined " + m_Team2Name );
				}
				Player.MoveToWorld( Team2Dest, MapDest );	
				m_Team2 += 1;
			}
			else if ( TeamHue == m_Team3Hue )
			{
				Player.Name = Player.Name + " (" + m_Team3Name + ")";
				foreach( Mobile mob in Announcers )
				{
		
				mob.PublicOverheadMessage( MessageType.Regular, 0x22, false, Player.Name + " Has Joined " + m_Team3Name );
				}
				Player.MoveToWorld( Team3Dest, MapDest );	
				m_Team3 += 1;
			}
			else if ( TeamHue == m_Team4Hue )
			{
				Player.Name = Player.Name + " (" + m_Team4Name + ")";
				foreach( Mobile mob in Announcers )
				{
		
				mob.PublicOverheadMessage( MessageType.Regular, 0x22, false, Player.Name + " Has Joined " + m_Team4Name );
				}
				Player.MoveToWorld( Team4Dest, MapDest );	
				m_Team4 += 1;
			}
			
			Player.Frozen = true;
			
		}
Exemple #27
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is Mobile)
                {
                    Mobile targ = (Mobile)targeted;
                    if (from != targ)
                        from.SendMessage("You may only set your own body to GM style.");

                    else
                    {
                        m_Mobile = from;

                        CommandLogging.WriteLine(from, "{0} {1} is assuming a GM body", from.AccessLevel, CommandLogging.Format(from));

                        Container pack = from.Backpack;

                        ArrayList ItemsToDelete = new ArrayList();

                        foreach (Item item in from.Items)
                        {
                            if (item.Layer != Layer.Bank && item.Layer != Layer.Hair && item.Layer != Layer.FacialHair && item.Layer != Layer.Mount && item.Layer != Layer.Backpack)
                            {
                                ItemsToDelete.Add(item);
                            }
                        }
                        foreach (Item item in ItemsToDelete)
                            item.Delete();

                        if (pack == null)
                        {
                            pack = new Backpack();
                            pack.Movable = false;

                            from.AddItem(pack);
                        }
                        else
                        {
                            pack.Delete();
                            pack = new Backpack();
                            pack.Movable = false;

                            from.AddItem(pack);
                        }

                        from.Hunger = 20;
                        from.Thirst = 20;
                        from.Fame = 0;
                        from.Karma = 0;
                        from.Kills = 0;
                        from.Hidden = true;
                        from.Blessed = true;
                        from.Hits = from.HitsMax;
                        from.Mana = from.ManaMax;
                        from.Stam = from.StamMax;

                        if (from.IsStaff())
                        {
                            EquipItem(new StaffRing());
                            EquipItem(new StaffRobe());

                            PackItem(new GMHidingStone());
                            PackItem(new GMEthereal());
                            PackItem(new StaffOrb(from));

                            PackItem(new Spellbook((ulong)18446744073709551615));
                            PackItem(new NecromancerSpellbook((ulong)0xffff));
                            PackItem(new BookOfChivalry());
                            PackItem(new BookOfBushido());
                            PackItem(new SpellweavingBook((ulong)0xffff));

                            from.RawStr = 100;
                            from.RawDex = 100;
                            from.RawInt = 100;

                            from.Hits = from.HitsMax;
                            from.Mana = from.ManaMax;
                            from.Stam = from.StamMax;

                            for (int i = 0; i < targ.Skills.Length; ++i)
                                targ.Skills[i].Base = 120;
                        }

                        if (from.IsStaff() && from.AccessLevel <= AccessLevel.Spawner)
                            EquipItem(new FurBoots(3));
                        else if (from.AccessLevel == AccessLevel.GameMaster)
                            EquipItem(new FurBoots(39));
                        if (from.AccessLevel == AccessLevel.Seer)
                            EquipItem(new FurBoots(467));
                        if (from.AccessLevel == AccessLevel.Administrator)
                            EquipItem(new FurBoots(1001));
                        if (from.AccessLevel == AccessLevel.Developer)
                            EquipItem(new FurBoots(1001));
                        if (from.AccessLevel >= AccessLevel.CoOwner)
                            EquipItem(new FurBoots(1001));
                    }
                }
            }
        public void TestMobileIncoming(
            ProtocolChanges protocolChanges, int hairItemId, int hairHue, int facialHairItemId, int facialHairHue
            )
        {
            var beholder = new Mobile(0x1)
            {
                Name = "Random Mobile 1"
            };

            beholder.DefaultMobileInit();

            var beheld = new Mobile(0x2)
            {
                Name = "Random Mobile 2"
            };

            beheld.DefaultMobileInit();
            beheld.AddItem(
                new Item((Serial)0x1000)
            {
                Layer = Layer.OneHanded
            }
                );

            // Test Dupe
            beheld.AddItem(
                new Item((Serial)0x1001)
            {
                Layer = Layer.OneHanded
            }
                );

            beheld.HairItemID       = hairItemId;
            beheld.HairHue          = hairHue;
            beheld.FacialHairItemID = facialHairItemId;
            beheld.FacialHairHue    = facialHairHue;

            var ns = new NetState(null)
            {
                ProtocolChanges = protocolChanges
            };

            var data = new MobileIncoming(ns, beholder, beheld).Compile();

            var sa         = ns.StygianAbyss;
            var newPacket  = ns.NewMobileIncoming;
            var itemIdMask = newPacket ? 0xFFFF : 0x7FFF;

            Span <bool> layers = stackalloc bool[256];

#if NO_LOCAL_INIT
            layers.Clear();
#endif

            var items = beheld.Items;
            var count = items.Count;

            if (beheld.HairItemID > 0)
            {
                count++;
            }

            if (beheld.FacialHairItemID > 0)
            {
                count++;
            }

            var length = 23 + count * 9; // Max Size

            Span <byte> expectedData = stackalloc byte[length];
            var         pos          = 0;

            expectedData.Write(ref pos, (byte)0x78);
            pos += 2; // Length

            var isSolidHue = beheld.SolidHueOverride >= 0;

            expectedData.Write(ref pos, beheld.Serial);
            expectedData.Write(ref pos, (ushort)beheld.Body);
            expectedData.Write(ref pos, (ushort)beheld.X);
            expectedData.Write(ref pos, (ushort)beheld.Y);
            expectedData.Write(ref pos, (byte)beheld.Z);
            expectedData.Write(ref pos, (byte)beheld.Direction);
            expectedData.Write(ref pos, (ushort)(isSolidHue ? beheld.SolidHueOverride : beheld.Hue));
            expectedData.Write(ref pos, (byte)beheld.GetPacketFlags(sa));
            expectedData.Write(ref pos, (byte)Notoriety.Compute(beholder, beheld));

            byte layer;

            for (var i = 0; i < items.Count; i++)
            {
                var item = items[i];

                layer = (byte)item.Layer;

                if (!item.Deleted && !layers[layer] && beholder.CanSee(item))
                {
                    layers[layer] = true;

                    expectedData.Write(ref pos, item.Serial);

                    var hue      = isSolidHue ? beheld.SolidHueOverride : item.Hue;
                    var itemID   = item.ItemID & itemIdMask;
                    var writeHue = newPacket || hue != 0;

                    if (!newPacket)
                    {
                        itemID |= 0x8000;
                    }

                    expectedData.Write(ref pos, (ushort)itemID);
                    expectedData.Write(ref pos, layer);
                    if (writeHue)
                    {
                        expectedData.Write(ref pos, (ushort)hue);
                    }
                }
            }

            layer = (byte)Layer.Hair;
            var itemId = beheld.HairItemID;

            if (itemId > 0 && !layers[layer])
            {
                expectedData.Write(ref pos, HairInfo.FakeSerial(beheld));
                var hue = isSolidHue ? beheld.SolidHueOverride : beheld.HairHue;
                itemId &= itemIdMask;
                var writeHue = newPacket || hue != 0;

                if (!newPacket)
                {
                    itemId |= 0x8000;
                }

                expectedData.Write(ref pos, (ushort)itemId);
                expectedData.Write(ref pos, layer);
                if (writeHue)
                {
                    expectedData.Write(ref pos, (ushort)hue);
                }
            }

            layer  = (byte)Layer.FacialHair;
            itemId = beheld.FacialHairItemID;

            if (itemId > 0 && !layers[layer])
            {
                expectedData.Write(ref pos, FacialHairInfo.FakeSerial(beheld));
                var hue = isSolidHue ? beheld.SolidHueOverride : beheld.FacialHairHue;
                itemId &= itemIdMask;
                var writeHue = newPacket || hue != 0;

                if (!newPacket)
                {
                    itemId |= 0x8000;
                }

                expectedData.Write(ref pos, (ushort)itemId);
                expectedData.Write(ref pos, layer);
                if (writeHue)
                {
                    expectedData.Write(ref pos, (ushort)hue);
                }
            }

#if NO_LOCAL_INIT
            expectedData.Write(ref pos, 0); // Zero serial, terminate list
#else
            pos += 4;
#endif

            expectedData.Slice(1, 2).Write((ushort)pos); // Length
            expectedData = expectedData.Slice(0, pos);

            AssertThat.Equal(data, expectedData);
        }