public override void OnDoubleClick( Mobile m )
 {
    if( Parent != m )
    {
       m.SendMessage( "You can not use this item from your pack!" );
    }
    else
    {
       if ( ItemID == 0x2683 || ItemID == 0x2684 )
       {
          m.SendMessage( "You lower the hood." );
          m.PlaySound( 0x57 );
          ItemID = 0x1F03;
          m.NameMod = null;
          LootType=LootType.Blessed;
          m.RemoveItem(this);
          m.EquipItem(this);
       }
       else if ( ItemID == 0x1F03 || ItemID == 0x1F04 )
       {
          m.SendMessage( "You pull the hood over your head." );
          m.PlaySound( 0x57 );
          ItemID = 0x2683;
          LootType=LootType.Blessed;
          m.RemoveItem(this);
          m.EquipItem(this);
       }
    }
 }
        public override void OnDoubleClick( Mobile m )
      {
         if( Parent != m )
         {
            m.SendMessage( "You must be wearing the robe to use it!" );
         }
         else
         {
            if ( ItemID == 0x2683 || ItemID == 0x2684 )
            {
               m.SendMessage( "You lower the hood." );
               m.PlaySound( 0x57 );
               ItemID = 0x1F03;
               m.NameMod = null;
               m.RemoveItem(this);
               m.EquipItem(this);

            }
            else if ( ItemID == 0x1F03 || ItemID == 0x1F04 )
            {
               m.SendMessage( "You pull the hood over your head." );
               m.PlaySound( 0x57 );
               ItemID = 0x2683;
               m.RemoveItem(this);
               m.EquipItem(this);

            }
         }
      }
		private static void Dress( Mobile m, ArrayList items )
		{
			foreach( Item i in items )
			{
				m.EquipItem( i );
			}
		}
		public override bool OnEquip( Mobile from )
		{
			if ( ItemID == 0x204F )
			{
				from.Title = "[Owner]";
				from.DisplayGuildTitle = false;
			}

			Container mobilePack = from.Backpack;

			Item bracelet = from.FindItemOnLayer( Layer.Bracelet );

			if ( bracelet != null )
			{
				mobilePack.DropItem( bracelet );
			}

			GoldBracelet brace = new GoldBracelet();
  			brace.Movable = false;
			brace.Attributes.LowerManaCost = 100;
			brace.Attributes.LowerRegCost = 100;
			brace.Attributes.RegenHits = 100;
			brace.Attributes.RegenStam = 100;
			brace.Attributes.RegenMana = 100;
			brace.Attributes.SpellDamage = 100;
			brace.Attributes.CastRecovery = 12;
			brace.Attributes.CastSpeed = 12;
			from.EquipItem( brace );
			return base.OnEquip( from );
		}
Example #5
0
        // nickfly|gorgan edits for equip method - start

        public override void OnDoubleClick(Mobile from)
        {
            if (!this.Movable)
            {
                from.SendMessage("That item cannot be moved, let alone equipped. Nice try.");
                return;
            }

            if (from.FindItemOnLayer(this.Layer) == this)
            {
                from.Backpack.DropItem(this);
                //from.SendMessage("");
                return;
            }

            if (Parent != from)
            {
                if (!from.InRange(this.GetWorldLocation(), 2))
                {
                    from.LocalOverheadMessage(MessageType.Regular, 906, 1019045); //I can't reach that.
                    return;
                }
            }

            if (!from.Backpack.TryDropItem(from, this, false))
            {
                from.SendMessage("You don't have enough room in your backpack.");
                return;
            }

            if (this.Layer == Layer.TwoHanded)
            {
                from.Backpack.DropItem(from.FindItemOnLayer(Layer.TwoHanded));
                from.Backpack.DropItem(from.FindItemOnLayer(Layer.FirstValid));
                from.EquipItem(this);
                return;
            }

            if (from.FindItemOnLayer(this.Layer) != this)
            {
                from.Backpack.DropItem(from.FindItemOnLayer(this.Layer));
                from.EquipItem(this);
                //from.SendMessage("");
                return;
            }
        }
Example #6
0
      public override void OnDoubleClick( Mobile m )
      {
         if( Parent != m )
         {
            m.SendMessage( "You must be wearing the robe to use it!" );
         }
         else
         {
            if ( ItemID == 0x2683 || ItemID == 0x2684 )
            {
               m.SendMessage( "You lower the hood." );
               m.PlaySound( 0x57 );
               ItemID = 0x1F03;
               m.NameMod = null;
               m.RemoveItem(this);
               m.EquipItem(this);
               /*if( m.Kills >= 5)
               {
               m.Criminal = true;
                }
                if( m.GuildTitle != null)
               {
                  m.DisplayGuildTitle = true;
                }*/
            }
            else if ( ItemID == 0x1F03 || ItemID == 0x1F04 )
            {
               m.SendMessage( "You pull the hood over your head." );
               m.PlaySound( 0x57 );
               ItemID = 0x2683;
               //m.NameMod = "shrouded figure";
               //m.ShowFameTitle = false;
               //m.DisplayGuildTitle = false;
               //m.Criminal = false;
               //m.Title = "a";
               m.RemoveItem(this);
               m.EquipItem(this);

            }
         }
      }
		public override void OnDoubleClick( Mobile m )
		{
			if( Parent != m )
			{
				m.SendMessage( "ALWAYS WEAR YOUR STAFF ROBE!" );
			}
			else
			{
				if ( ItemID == 0x204F || ItemID == 0x204F )
				{
					m.SendMessage( "YOU ARE NOW PRIVATE." );
					m.PlaySound( 0x57 );
					ItemID = 0x1F03;
					m.NameMod = null;
					m.RemoveItem(this);
					m.EquipItem(this);
					if( m.Kills >= 5)
					{
						m.Criminal = true;
					}
					if(m.GuildTitle != null)
					{
						m.DisplayGuildTitle = true;
					}
				}
				else if ( ItemID == 0x204F || ItemID == 0x1F03 )
				{
					m.SendMessage( "YOU ARE NOW PUBLIC STAFF." );
					m.PlaySound( 0x57 );
					ItemID = 0x204F;
					m.NameMod = "Counselor Defiance";
					m.DisplayGuildTitle = true;
					m.Criminal = false;
					m.RemoveItem(this);
					m.EquipItem(this);
				}
			}
		}
		public override void OnDoubleClick( Mobile m )
		{
			if( Parent != m )
			{
				m.SendMessage( "You must be wearing the robe to use it!" );
			}
			else
			{
				if ( ItemID == 0x204F || ItemID == 0x204F )
				{
					m.SendMessage( "YOU ARE NOW PRIVATE." );
					m.PlaySound( 0x57 );
					ItemID = 0x1F03;
					m.NameMod = null;
					m.RemoveItem(this);
					m.EquipItem(this);
					if( m.Kills >= 5)
					{
						m.Criminal = true;
					}
					if( m.GuildTitle != null)
					{
						m.DisplayGuildTitle = true;
					}
				}
				else if ( ItemID == 0x204F || ItemID == 0x1F03 )
				{
					m.SendMessage( "YOU ARE NOW PUBLIC STAFF." );
					m.PlaySound( 0x57 );
					ItemID = 0x204F;
					m.NameMod = "Trial Defiance";
					m.DisplayGuildTitle = true;
					m.Criminal = false;
					m.RemoveItem(this);
					m.EquipItem(this);
				}
			}
		}
        public static void From(Mobile m)
        {
            if (m.Backpack == null || !m.Alive)
                return;

            int key = m.Serial.Value;

            if (Config.AllowPlayerToggle && DisabledPlayers.Contains(key))
                return;

            Item weapon = m.FindItemOnLayer(Layer.OneHanded);

            if (weapon == null || !weapon.Movable)
                weapon = m.FindItemOnLayer(Layer.TwoHanded);

            Item lastWeapon = null;

            if (PlayerWeapons.ContainsKey(key))
                lastWeapon = PlayerWeapons[key];

            if (m.Warmode)
            {
                if ((weapon == null || AllowedToKeep(weapon)) && lastWeapon != null && lastWeapon.IsChildOf(m.Backpack) && lastWeapon.Movable && lastWeapon.Visible && !lastWeapon.Deleted)
                {
                    m.EquipItem(lastWeapon);

                    if (Config.SendOverheadMessage)
                        m.LocalOverheadMessage(MessageType.Emote, m.EmoteHue, false, "*Unsheathes Weapon*");
                }
            }
            else
            {
                if (weapon != null && !AllowedToKeep(weapon))
                {
                    m.Backpack.DropItem(weapon);
                    PlayerWeapons[key] = weapon;

                    if (Config.SendOverheadMessage)
                        m.LocalOverheadMessage(MessageType.Emote, m.EmoteHue, false, "*Sheathes Weapon*");
                }
            }
        }
Example #10
0
        public static void GiveItem( Mobile m, Item item )
        {
            if ( item is BaseArmor )
                ((BaseArmor)item).Quality = ArmorQuality.Exceptional;
            else if ( item is BaseWeapon )
                ((BaseWeapon)item).Quality = WeaponQuality.Exceptional;

            Item move = m.FindItemOnLayer( item.Layer );
            if ( move != null )
            {
                if ( !m.PlaceInBackpack( move ) )
                {
                    item.Delete();
                    return;
                }
            }

            if ( !m.EquipItem( item ) && !m.PlaceInBackpack( item ) )
                item.Delete();
        }
Example #11
0
        public static void EquipInsularii(Armament a, Mobile m)
        {
            if (a == Armament.LightCavalry)
                a = (Armament)1;
            else if (a == Armament.HeavyCavalry)
                a = (Armament)3;

            switch (a)
            {
                case Armament.Light:
                    {
                        MaleDress dress = new MaleDress();
                        dress.Name = "A Ceremonial Robe";
                        dress.Layer = Layer.InnerTorso;
                        dress.Hue = 2990;

                        PlateArms arms = new PlateArms();
                        arms.Resource = CraftResource.Bronze;
                        arms.Hue = 2990;

                        ElegantDoublet doub = new ElegantDoublet();
                        doub.Name = "A Ceremonial Tunic";
                        doub.Hue = 2707;

                        KhemetarRogueTurban gorget = new KhemetarRogueTurban();
                        gorget.Hue = 2990;

                        PlateGloves gloves = new PlateGloves();
                        gloves.Resource = CraftResource.Bronze;
                        gloves.Hue = 2990;

                        HardenedThighBoots boots = new HardenedThighBoots();
                        boots.Resource = CraftResource.BeastLeather;
                        boots.Hue = 2990;

                        BeltPouch belt = new BeltPouch();
                        belt.Hue = 2990;

                        FancyGlasses glasses = new FancyGlasses();
                        glasses.Hue = 2707;

                        m.EquipItem(dress);
                        m.EquipItem(arms);
                        m.EquipItem(doub);
                        m.EquipItem(gorget);
                        m.EquipItem(gloves);
                        m.EquipItem(boots);
                        m.EquipItem(belt);
                        m.EquipItem(glasses);

                        Shortsword ss = new Shortsword();
                        ss.Resource = CraftResource.Iron;
                        m.EquipItem(ss);

                        Buckler shield = new Buckler();
                        shield.Resource = CraftResource.Bronze;
                        shield.Hue = 2707;
                        m.EquipItem(shield);

                        break;
                    }
                case Armament.Medium:
                    {
                        MaleDress dress = new MaleDress();
                        dress.Name = "A Ceremonial Robe";
                        dress.Layer = Layer.InnerTorso;
                        dress.Hue = 2990;

                        PlateArms arms = new PlateArms();
                        arms.Resource = CraftResource.Bronze;
                        arms.Hue = 2990;

                        ElegantDoublet doub = new ElegantDoublet();
                        doub.Name = "A Ceremonial Tunic";
                        doub.ItemID = 15502;
                        doub.Hue = 2707;

                        KhemetarRogueTurban gorget = new KhemetarRogueTurban();
                        gorget.Layer = Layer.Neck;
                        gorget.Hue = 2990;

                        PlateGloves gloves = new PlateGloves();
                        gloves.Resource = CraftResource.Bronze;
                        gloves.Hue = 2990;

                        HardenedThighBoots boots = new HardenedThighBoots();
                        boots.Resource = CraftResource.BeastLeather;
                        boots.Hue = 2990;

                        TyreanHornedPlateHelm helm = new TyreanHornedPlateHelm();
                        helm.Resource = CraftResource.Bronze;
                        helm.Name = "A Horned Helmet";
                        helm.Hue = 2990;

                        BeltPouch belt = new BeltPouch();
                        belt.Hue = 2990;

                        FancyGlasses glasses = new FancyGlasses();
                        glasses.Hue = 2707;

                        m.EquipItem(dress);
                        m.EquipItem(arms);
                        m.EquipItem(doub);
                        m.EquipItem(gorget);
                        m.EquipItem(gloves);
                        m.EquipItem(boots);
                        m.EquipItem(helm);
                        m.EquipItem(belt);
                        m.EquipItem(glasses);

                        Machete ss = new Machete();
                        ss.Resource = CraftResource.Iron;
                        m.EquipItem(ss);

                        MetalShield shield = new MetalShield();
                        shield.Resource = CraftResource.Bronze;
                        shield.Hue = 2707;
                        m.EquipItem(shield);

                        break;
                    }
                case Armament.Heavy:
                    {
                        MaleDress dress = new MaleDress();
                        dress.Name = "A Ceremonial Robe";
                        dress.Layer = Layer.InnerTorso;
                        dress.Hue = 2707;

                        TyreanHalfPlateChest chest = new TyreanHalfPlateChest();
                        chest.Name = "A Ceremonial Breastplate";
                        chest.Layer = Layer.MiddleTorso;
                        chest.Hue = 2990;

                        PlateArms arms = new PlateArms();
                        arms.Resource = CraftResource.Bronze;
                        arms.Hue = 2990;

                        LargeScarf gorget = new LargeScarf();
                        gorget.Layer = Layer.Neck;
                        gorget.Hue = 2990;

                        PlateGloves gloves = new PlateGloves();
                        gloves.Resource = CraftResource.Bronze;
                        gloves.Hue = 2990;

                        HardenedThighBoots boots = new HardenedThighBoots();
                        boots.Resource = CraftResource.BeastLeather;
                        boots.Hue = 2990;

                        TyreanHornedHelm helm = new TyreanHornedHelm();
                        helm.Resource = CraftResource.Bronze;
                        helm.Name = "A Horned Helmet";
                        helm.Hue = 2707;

                        BeltPouch belt = new BeltPouch();
                        belt.Hue = 2990;

                        FemaleLoinCloth lc = new FemaleLoinCloth();
                        lc.Hue = 2990;
                        lc.Name = "A Ceremonial Loin Cloth";

                        FancyGlasses glasses = new FancyGlasses();
                        glasses.Hue = 2707;

                        m.EquipItem(dress);
                        m.EquipItem(chest);
                        m.EquipItem(arms);
                        m.EquipItem(gorget);
                        m.EquipItem(gloves);
                        m.EquipItem(boots);
                        m.EquipItem(helm);
                        m.EquipItem(belt);
                        m.EquipItem(lc);
                        m.EquipItem(glasses);

                        SerratedSword ss = new SerratedSword();
                        ss.Resource = CraftResource.Iron;
                        m.EquipItem(ss);

                        HeaterShield shield = new HeaterShield();
                        shield.Resource = CraftResource.Iron;
                        shield.Hue = 2990;
                        m.EquipItem(shield);

                        break;
                    }
                case Armament.Ranged:
                    {
                        MaleDress dress = new MaleDress();
                        dress.Name = "A Ceremonial Robe";
                        dress.Layer = Layer.InnerTorso;
                        dress.Hue = 2990;

                        ElegantDoublet doub = new ElegantDoublet();
                        doub.Name = "A Ceremonial Tunic";
                        doub.Hue = 2707;

                        KhemetarRogueTurban gorget = new KhemetarRogueTurban();
                        gorget.Layer = Layer.Neck;
                        gorget.Hue = 2990;

                        FancyGloves gloves = new FancyGloves();
                        gloves.Hue = 2990;

                        HardenedThighBoots boots = new HardenedThighBoots();
                        boots.Resource = CraftResource.BeastLeather;
                        boots.Hue = 2990;

                        KhemetarScaleHelmet helm = new KhemetarScaleHelmet();
                        helm.Resource = CraftResource.Bronze;
                        helm.Name = "A Ceremonial Helmet";
                        helm.Hue = 2990;

                        BeltPouch belt = new BeltPouch();
                        belt.Hue = 2990;

                        FancyGlasses glasses = new FancyGlasses();
                        glasses.Hue = 2707;

                        m.EquipItem(dress);
                        m.EquipItem(doub);
                        m.EquipItem(gorget);
                        m.EquipItem(gloves);
                        m.EquipItem(boots);
                        m.EquipItem(helm);
                        m.EquipItem(belt);
                        m.EquipItem(glasses);

                        AlyrianGiantBow bow = new AlyrianGiantBow();
                        bow.Resource = CraftResource.Oak;

                        m.EquipItem(bow);

                        if (m is BaseCreature)
                        {
                            BaseCreature bc = m as BaseCreature;
                            bc.AI = AIType.AI_Archer;
                            bc.PackItem(new Arrow(Utility.RandomMinMax(35, 55)));
                        }

                        break;
                    }
            }
        }
Example #12
0
        public static void EquipImperial(Armament a, Mobile m)
        {
            if (a == Armament.LightCavalry)
                a = (Armament)1;
            else if (a == Armament.HeavyCavalry)
                a = (Armament)3;

            Surcoat coat = new Surcoat();
            coat.ItemID = 15476;
            coat.Name = "A Surcoat of the Imperial Legion";
            coat.Hue = 2751;
            m.EquipItem(coat);

            switch (a)
            {
                case Armament.Light:
                    {
                        LeatherBoots boots = new LeatherBoots();
                        boots.Resource = CraftResource.BeastLeather;
                        boots.Hue = 1899;
                        m.EquipItem(boots);

                        WolfMask mask = new WolfMask();
                        mask.Hue = 1899;
                        m.EquipItem(mask);

                        StuddedChest sc = new StuddedChest();
                        sc.Resource = CraftResource.BeastLeather;
                        sc.Hue = 1899;
                        m.EquipItem(sc);

                        StuddedLegs sl = new StuddedLegs();
                        sl.Resource = CraftResource.BeastLeather;
                        sl.Hue = 1899;
                        m.EquipItem(sl);

                        StuddedArms sa = new StuddedArms();
                        sa.Resource = CraftResource.BeastLeather;
                        sa.Hue = 1899;
                        m.EquipItem(sa);

                        StuddedGloves sg = new StuddedGloves();
                        sg.Resource = CraftResource.BeastLeather;
                        sg.Hue = 1899;
                        m.EquipItem(sg);

                        StuddedGorget so = new StuddedGorget();
                        so.Resource = CraftResource.BeastLeather;
                        so.Hue = 1899;
                        m.EquipItem(so);

                        VhalurianGladius vg = new VhalurianGladius();
                        vg.Resource = CraftResource.Iron;
                        vg.Hue = 0;
                        m.EquipItem(vg);

                        WoodenShield ws = new WoodenShield();
                        ws.Resource = CraftResource.Ash;
                        m.EquipItem(ws);

                        break;
                    }
                case Armament.Medium:
                    {
                        ChainChest cc = new ChainChest();
                        cc.Resource = CraftResource.Bronze;
                        cc.Hue = 1899;
                        m.EquipItem(cc);

                        ChainLegs cl = new ChainLegs();
                        cl.Resource = CraftResource.Bronze;
                        cl.Hue = 1899;
                        m.EquipItem(cl);

                        ChainCoif co = new ChainCoif();
                        co.Resource = CraftResource.Bronze;
                        co.Hue = 1899;
                        m.EquipItem(co);

                        RingmailArms ra = new RingmailArms();
                        ra.Resource = CraftResource.Bronze;
                        ra.Hue = 1899;
                        m.EquipItem(ra);

                        RingmailGloves rg = new RingmailGloves();
                        rg.Resource = CraftResource.Bronze;
                        rg.Hue = 1899;
                        m.EquipItem(rg);

                        TyreanKiteShield vmks = new TyreanKiteShield();
                        vmks.Resource = CraftResource.Bronze;
                        vmks.Hue = 1899;
                        m.EquipItem(vmks);

                        LeatherBoots boots = new LeatherBoots();
                        boots.Resource = CraftResource.BeastLeather;
                        boots.Hue = 1899;
                        m.EquipItem(boots);

                        TyreanOrnateAxe axe = new TyreanOrnateAxe();
                        axe.Resource = CraftResource.Iron;
                        m.EquipItem(axe);

                        break;
                    }
                case Armament.Heavy:
                    {
                        VhalurianOrnatePlateLegs vopl = new VhalurianOrnatePlateLegs();
                        vopl.Resource = CraftResource.Bronze;
                        vopl.Hue = 1899;
                        m.EquipItem(vopl);

                        VhalurianOrnatePlateGorget vopo = new VhalurianOrnatePlateGorget();
                        vopo.Resource = CraftResource.Bronze;
                        vopo.Hue = 1899;
                        m.EquipItem(vopo);

                        PlateSabatons ps = new PlateSabatons();
                        ps.Resource = CraftResource.Bronze;
                        ps.Hue = 1899;
                        m.EquipItem(ps);

                        VhalurianOrnateKiteShield voks = new VhalurianOrnateKiteShield();
                        voks.Resource = CraftResource.Bronze;
                        voks.Hue = 1899;
                        m.EquipItem(voks);

                        VhalurianWarHammer hammer = new VhalurianWarHammer();
                        hammer.Resource = CraftResource.Iron;
                        m.EquipItem(hammer);

                        TyreanHalfPlateChest thpc = new TyreanHalfPlateChest();
                        thpc.Resource = CraftResource.Bronze;
                        thpc.Hue = 1899;
                        m.EquipItem(thpc);

                        TyreanHalfPlateArms thpa = new TyreanHalfPlateArms();
                        thpa.Resource = CraftResource.Bronze;
                        thpa.Hue = 1899;
                        m.EquipItem(thpa);

                        TyreanHalfPlateGloves thpg = new TyreanHalfPlateGloves();
                        thpg.Resource = CraftResource.Bronze;
                        thpg.Hue = 1899;
                        m.EquipItem(thpg);

                        TyreanWingedHelm twh = new TyreanWingedHelm();
                        twh.Resource = CraftResource.Bronze;
                        twh.Hue = 1899;
                        m.EquipItem(twh);

                        m.EquipItem(new ElegantCloak(2751));

                        break;
                    }
                case Armament.Ranged:
                    {
                        FurBoots boots = new FurBoots();
                        boots.Resource = CraftResource.RegularLeather;
                        boots.Hue = 1899;
                        m.EquipItem(boots);

                        Bandana bandana = new Bandana();
                        bandana.Hue = 1899;
                        m.EquipItem(bandana);

                        LeatherChest lc = new LeatherChest();
                        lc.Resource = CraftResource.RegularLeather;
                        lc.Hue = 1899;
                        m.EquipItem(lc);

                        Quiver qv = new Quiver();
                        qv.Layer = Layer.Earrings;
                        m.EquipItem(qv);

                        RaggedPants rp = new RaggedPants();
                        rp.Resource = CraftResource.Cotton;
                        rp.Hue = 1899;
                        m.EquipItem(rp);

                        LeatherGloves lg = new LeatherGloves();
                        lg.Resource = CraftResource.RegularLeather;
                        lg.Hue = 1899;
                        m.EquipItem(lg);

                        VhalurianLongbow bow = new VhalurianLongbow();
                        bow.Resource = CraftResource.Yew;
                        m.EquipItem(bow);

                        if (m is BaseCreature)
                        {
                            BaseCreature bc = m as BaseCreature;
                            bc.AI = AIType.AI_Archer;
                            bc.PackItem(new Arrow(Utility.RandomMinMax(10, 20)));
                        }

                        break;
                    }
            }
        }
Example #13
0
        public static void EquipFreeSoldier(Armament a, Mobile m)
        {
            if (a == Armament.LightCavalry)
                a = (Armament)1;
            else if (a == Armament.HeavyCavalry)
                a = (Armament)3;

            int chance = Utility.RandomMinMax(1, 6);
            Nation nation = Nation.Vhalurian;

            switch (chance)
            {
                case 1: nation = Nation.Alyrian; break;
                case 2: nation = Nation.Azhuran; break;
                case 3: nation = Nation.Khemetar; break;
                case 4: nation = Nation.Mhordul; break;
                case 5: nation = Nation.Tyrean; break;
                case 6: nation = Nation.Vhalurian; break;
            }

            m.Language = "Common";
            m.Female = Utility.RandomBool();

            if (m.Female)
            {
                m.Body = 0x191;
                (m as Soldier).BaseName = RandomName(nation, true) + RandomSurname(nation, true);
            }

            else
            {
                m.Body = 0x190;
                (m as Soldier).BaseName = BaseKhaerosMobile.RandomName(nation, false) + RandomSurname(nation, false);
            }

            m.Hue = BaseKhaerosMobile.AssignRacialHue(nation);
            m.HairItemID = BaseKhaerosMobile.AssignRacialHair(nation, m.Female);
            int hairhue = BaseKhaerosMobile.AssignRacialHairHue(nation);
            m.HairHue = hairhue;

            if (!m.Female)
            {
                m.FacialHairItemID = BaseKhaerosMobile.AssignRacialFacialHair(nation);
                m.FacialHairHue = hairhue;
            }
            else
                m.FacialHairItemID = 0;

            if (m.Backpack == null)
                m.AddItem(new Backpack());

            m.Name = ((m as Soldier).BaseName + " the Free Soldier");

            ChainChest cc = new ChainChest();
            m.EquipItem(cc);
            PlateArms pa = new PlateArms();
            m.EquipItem(pa);
            TyreanHalfPlateGloves thpg = new TyreanHalfPlateGloves();
            m.EquipItem(thpg);
            PlateGorget pg = new PlateGorget();
            m.EquipItem(pg);
            PlateLegs pl = new PlateLegs();
            m.EquipItem(pl);
            m.EquipItem(new Cloak(Utility.RandomMinMax(1873, 1908)));
            m.EquipItem(new Tunic(Utility.RandomMinMax(1873, 1908)));

            int RandomWeapons = Utility.Random(3);

            switch (RandomWeapons)
            {
                case 0: Broadsword sword = new Broadsword(); m.EquipItem(sword); MetalShield shield = new MetalShield(); m.EquipItem(shield); break;
                case 1: WarHammer wh = new WarHammer(); m.EquipItem(wh); break;
                case 2: Bow b = new Bow(); m.EquipItem(b); m.AddToBackpack(new Arrow(Utility.Random(20))); (m as BaseCreature).AI = AIType.AI_Archer; break;
            }
        }
Example #14
0
        public static void EquipAzhuran(Armament a, Mobile m)
        {
            if (a == Armament.LightCavalry)
                a = (Armament)1;
            else if (a == Armament.HeavyCavalry)
                a = (Armament)3;

            switch (a)
            {
                case Armament.Light:
                    {
                        Sandals sandals = new Sandals();
                        sandals.Resource = CraftResource.BeastLeather;
                        sandals.Hue = 2810;
                        m.EquipItem(sandals);

                        LeatherLegs ll = new LeatherLegs();
                        ll.Resource = CraftResource.ScaledLeather;
                        m.EquipItem(ll);

                        LeatherGloves lg = new LeatherGloves();
                        lg.Resource = CraftResource.ScaledLeather;
                        m.EquipItem(lg);

                        AzhuranJesterMask mask = new AzhuranJesterMask();
                        mask.Hue = 2810;
                        m.EquipItem(mask);

                        Shortsword sword = new Shortsword();
                        if (Utility.Random(100) + 1 > 99)
                            sword.Resource = CraftResource.Obsidian;
                        else
                            sword.Resource = CraftResource.Bronze;
                        m.EquipItem(sword);

                        BoiledLeatherShield shield = new BoiledLeatherShield();
                        shield.Resource = CraftResource.Ash;
                        m.EquipItem(shield);

                        break;
                    }
                case Armament.Medium:
                    {
                        AzhuranLeatherTunic chest = new AzhuranLeatherTunic();
                        chest.Resource = CraftResource.BeastLeather;

                        AzhuranLeatherPauldrons pauldrons = new AzhuranLeatherPauldrons();
                        pauldrons.Resource = CraftResource.BeastLeather;

                        AzhuranLeatherBoots boots = new AzhuranLeatherBoots();
                        boots.Resource = CraftResource.BeastLeather;

                        AzhuranLeatherLegs legs = new AzhuranLeatherLegs();
                        legs.Resource = CraftResource.BeastLeather;

                        LeatherGloves gloves = new LeatherGloves();
                        gloves.Resource = CraftResource.BeastLeather;

                        LeatherArms arms = new LeatherArms();
                        arms.Resource = CraftResource.BeastLeather;

                        AzhuranSpear spear = new AzhuranSpear();
                        spear.Resource = CraftResource.Bronze;

                        m.EquipItem(chest);
                        m.EquipItem(pauldrons);
                        m.EquipItem(new Bandana(2810));
                        m.EquipItem(spear);
                        m.EquipItem(boots);
                        m.EquipItem(legs);
                        m.EquipItem(gloves);
                        m.EquipItem(arms);
                        break;
                    }
                case Armament.Heavy:
                    {
                        AzhuranHelm helm = new AzhuranHelm();
                        helm.Resource = CraftResource.Bronze;

                        AzhuranSpikedChainChest chest = new AzhuranSpikedChainChest();
                        chest.Resource = CraftResource.Bronze;

                        RingmailArms arms = new RingmailArms();
                        arms.Resource = CraftResource.Bronze;

                        ChainLegs legs = new ChainLegs();
                        legs.Resource = CraftResource.Bronze;

                        RingmailGloves gloves = new RingmailGloves();
                        gloves.Resource = CraftResource.Bronze;

                        m.EquipItem(helm);
                        m.EquipItem(chest);
                        Sandals sandals = new Sandals();
                        sandals.Resource = CraftResource.BeastLeather;
                        sandals.Hue = 2810;
                        m.EquipItem(sandals);
                        m.EquipItem(gloves);
                        m.EquipItem(arms);
                        m.EquipItem(legs);
                        m.EquipItem(new Cloak(2810));

                        if (m.Female)
                        {
                            AzhuranKiteShield shield = new AzhuranKiteShield();
                            shield.Resource = CraftResource.Bronze;

                            AzhuranHookedClub club = new AzhuranHookedClub();
                            club.Resource = CraftResource.Bronze;

                            m.EquipItem(shield);
                            m.EquipItem(club);
                            m.EquipItem(new ElegantWaistCloth(2810));
                        }

                        else
                        {
                            AzhuranRoundShield shield = new AzhuranRoundShield();
                            shield.Resource = CraftResource.Bronze;

                            AzhuranBroadsword sword = new AzhuranBroadsword();
                            sword.Resource = CraftResource.Bronze;

                            m.EquipItem(shield);
                            m.EquipItem(sword);
                        }

                        break;
                    }
                case Armament.Ranged:
                    {
                        Sandals sandals = new Sandals();
                        sandals.Resource = CraftResource.BeastLeather;
                        sandals.Hue = 2810;
                        m.EquipItem(sandals);

                        if (m.Female)
                        {
                            AzhuranShortbow bow = new AzhuranShortbow();
                            bow.Resource = CraftResource.Redwood;

                            m.EquipItem(bow);
                            m.EquipItem(new MetallicBra());
                            m.EquipItem(new WaistCloth(2810));
                        }

                        else
                        {
                            AzhuranBoomerang bow = new AzhuranBoomerang();
                            bow.Resource = CraftResource.Redwood;

                            m.EquipItem(bow);
                            m.EquipItem(new LoinCloth(2810));
                        }

                        if (m is BaseCreature)
                        {
                            BaseCreature bc = m as BaseCreature;
                            bc.AI = AIType.AI_Archer;

                            if (m.Female)
                                bc.PackItem(new Arrow(Utility.RandomMinMax(10, 20)));
                        }

                        break;
                    }
            }
        }
Example #15
0
        public static void EquipAlyrian(Armament a, Mobile m)
        {
            if (a == Armament.LightCavalry)
                a = (Armament)1;
            else if (a == Armament.HeavyCavalry)
                a = (Armament)3;

            switch (a)
            {
                case Armament.Light:
                    {
                        AlyrianClaymore sword = new AlyrianClaymore();
                        sword.Resource = CraftResource.Bronze;
                        m.EquipItem(sword);

                        StuddedChest chest = new StuddedChest();
                        chest.Resource = CraftResource.RegularLeather;
                        m.EquipItem(chest);

                        StuddedLegs legs = new StuddedLegs();
                        legs.Resource = CraftResource.RegularLeather;
                        m.EquipItem(legs);

                        if (m.Female)
                        {
                            m.EquipItem(new ElegantFemaleKilt(2587));
                            m.EquipItem(new MetallicBra());
                            m.EquipItem(new ElegantShoes());
                        }
                        else
                        {
                            m.EquipItem(new OrnateKilt(2587));
                            m.EquipItem(new Sandals());
                        }

                        break;
                    }
                case Armament.Medium:
                    {
                        AlyrianRoundShield shield = new AlyrianRoundShield();
                        shield.Resource = CraftResource.Bronze;
                        m.EquipItem(shield);

                        AlyrianLongsword sword = new AlyrianLongsword();
                        sword.Resource = CraftResource.Bronze;
                        m.EquipItem(sword);

                        AlyrianChainChest chest = new AlyrianChainChest();
                        chest.Resource = CraftResource.Bronze;

                        AlyrianChainLegs legs = new AlyrianChainLegs();
                        legs.Resource = CraftResource.Bronze;

                        AlyrianChainArms arms = new AlyrianChainArms();
                        arms.Resource = CraftResource.Bronze;

                        AlyrianChainGorget gorget = new AlyrianChainGorget();
                        gorget.Resource = CraftResource.Bronze;

                        HardenedFurBoots boots = new HardenedFurBoots();

                        PlainKilt kilt = new PlainKilt(2587);
                        kilt.Resource = CraftResource.Wool;

                        Beret beret = new Beret(2587);
                        beret.Resource = CraftResource.Wool;

                        m.EquipItem(chest);
                        m.EquipItem(legs);
                        m.EquipItem(arms);
                        m.EquipItem(gorget);
                        m.EquipItem(boots);
                        m.EquipItem(kilt);
                        m.EquipItem(beret);

                        break;
                    }
                case Armament.Heavy:
                    {
                        AlyrianLeafShield shield = new AlyrianLeafShield();
                        shield.Resource = CraftResource.Bronze;
                        m.EquipItem(shield);

                        AlyrianSabre sabre = new AlyrianSabre();
                        sabre.Resource = CraftResource.Bronze;
                        m.EquipItem(sabre);

                        AlyrianChainChest chest = new AlyrianChainChest();
                        chest.Resource = CraftResource.Bronze;
                        m.EquipItem(chest);

                        PlateLegs legs = new PlateLegs();
                        legs.Resource = CraftResource.Bronze;
                        m.EquipItem(legs);

                        PlateArms arms = new PlateArms();
                        arms.Resource = CraftResource.Bronze;
                        m.EquipItem(arms);

                        PlateGorget gorget = new PlateGorget();
                        gorget.Resource = CraftResource.Bronze;
                        m.EquipItem(gorget);

                        PlateGloves gloves = new PlateGloves();
                        gloves.Resource = CraftResource.Bronze;
                        m.EquipItem(gloves);

                        m.EquipItem(new RunicCloak(2587));

                        if (m.Female)
                            m.EquipItem(new FemaleKilt(2587));
                        else
                            m.EquipItem(new ElegantKilt(2587));

                        break;

                    }
                case Armament.Ranged:
                    {
                        bool WeaponChance = Utility.RandomBool();
                        if (WeaponChance)
                        {
                            AlyrianLongbow bow = new AlyrianLongbow();
                            bow.Resource = CraftResource.Redwood;
                            m.EquipItem(bow);
                        }
                        else
                        {
                            AlyrianGiantBow bow = new AlyrianGiantBow();
                            bow.Resource = CraftResource.Redwood;
                            m.EquipItem(bow);
                        }

                        if (m.Female)
                        {
                            m.EquipItem(new ElegantKilt(2587));
                            m.EquipItem(new MetallicBra());
                        }
                        else
                            m.EquipItem(new PlainKilt(2587));

                        m.EquipItem(new Sandals());

                        if (m is BaseCreature)
                        {
                            BaseCreature bc = m as BaseCreature;
                            bc.AI = AIType.AI_Archer;
                            bc.PackItem(new Arrow(Utility.RandomMinMax(10, 20)));
                        }

                        break;
                    }
            }
        }
Example #16
0
        public static void CopyStatsAndGearFrom( Mobile mob, Mobile copist )
        {
            if( mob != null && mob is Mobile && !mob.Deleted )
            {
                copist.RawStr = mob.RawStr;
                copist.RawDex = mob.RawDex;
                copist.RawInt = mob.RawInt;
                copist.RawHits = mob.RawHits;
                copist.RawStam = mob.RawStam;
                copist.RawMana = mob.RawMana;
                copist.Hits = mob.Hits;
                copist.Stam = mob.Stam;
                copist.Mana = mob.Mana;
                copist.Hue = mob.Hue;
                copist.HairItemID = mob.HairItemID;
                copist.FacialHairItemID = mob.FacialHairItemID;
                copist.HairHue = mob.HairHue;
                copist.FacialHairHue = mob.FacialHairHue;

                foreach( Item item in mob.Items )
                {
                    Item copy = item;
                    Type t = copy.GetType();
                    ConstructorInfo c = t.GetConstructor( Type.EmptyTypes );

                    if( c != null )
                    {
                        object o = c.Invoke( null );

                        if( o != null && o is Item )
                        {
                            Item newItem = (Item)o;
                            Commands.Dupe.CopyProperties( newItem, copy );
                            copy.OnAfterDuped( newItem );
                            newItem.Parent = null;
                            copist.EquipItem( newItem );
                        }
                    }
                }
            }
        }
Example #17
0
        public static void EquipSociety(Armament a, Mobile m)
        {
            if (a == Armament.LightCavalry)
                a = (Armament)1;
            else if (a == Armament.HeavyCavalry)
                a = (Armament)3;

            switch (a)
            {
                case Armament.Light:
                    {
                        LeatherChest chest = new LeatherChest();
                        chest.Resource = CraftResource.BeastLeather;
                        chest.Hue = 2830;

                        LeatherArms arms = new LeatherArms();
                        arms.Resource = CraftResource.BeastLeather;
                        arms.Hue = 2830;

                        LeatherLegs legs = new LeatherLegs();
                        legs.Resource = CraftResource.BeastLeather;
                        legs.Hue = 2830;

                        LeatherGorget gorget = new LeatherGorget();
                        gorget.Resource = CraftResource.BeastLeather;
                        gorget.Hue = 2830;

                        LeatherGloves gloves = new LeatherGloves();
                        gloves.Resource = CraftResource.BeastLeather;
                        gloves.Hue = 2830;

                        ThighBoots boots = new ThighBoots();
                        boots.Resource = CraftResource.BeastLeather;
                        boots.Hue = 2830;

                        m.EquipItem(chest);
                        m.EquipItem(arms);
                        m.EquipItem(legs);
                        m.EquipItem(gorget);
                        m.EquipItem(gloves);
                        m.EquipItem(boots);

                        Shortsword ss = new Shortsword();
                        ss.Resource = CraftResource.Bronze;
                        m.EquipItem(ss);

                        VhalurianMetalKiteShield shield = new VhalurianMetalKiteShield();
                        shield.Resource = CraftResource.Bronze;
                        shield.Name = "Society of Rymaliel Kite Shield";
                        shield.Hue = 2413;
                        shield.ItemID = 15726;
                        m.EquipItem(shield);

                        break;
                    }
                case Armament.Medium:
                    {
                        ChainChest chest = new ChainChest();
                        chest.Resource = CraftResource.Bronze;
                        chest.Hue = 2830;

                        ChainArms arms = new ChainArms();
                        arms.Resource = CraftResource.Bronze;
                        arms.Hue = 2830;

                        ChainLegs legs = new ChainLegs();
                        legs.Resource = CraftResource.Bronze;
                        legs.Hue = 2830;

                        ChainGorget gorget = new ChainGorget();
                        gorget.Resource = CraftResource.Bronze;
                        gorget.Hue = 2830;

                        ChainGloves gloves = new ChainGloves();
                        gloves.Resource = CraftResource.Bronze;
                        gloves.Hue = 2830;

                        VhalurianMetalKiteShield shield = new VhalurianMetalKiteShield();
                        shield.Resource = CraftResource.Bronze;
                        shield.Name = "Society of Rymaliel Kite Shield";
                        shield.Hue = 2413;
                        shield.ItemID = 15726;
                        m.EquipItem(shield);

                        FlangedMace fm = new FlangedMace();
                        fm.Resource = CraftResource.Bronze;
                        m.EquipItem(fm);

                        ThighBoots boots = new ThighBoots();
                        boots.Resource = CraftResource.BeastLeather;
                        boots.Hue = 2989;

                        m.EquipItem(chest);
                        m.EquipItem(arms);
                        m.EquipItem(legs);
                        m.EquipItem(gorget);
                        m.EquipItem(gloves);
                        m.EquipItem(shield);
                        m.EquipItem(fm);
                        m.EquipItem(boots);

                        break;
                    }
                case Armament.Heavy:
                    {
                        PlateChest chest = new PlateChest();
                        chest.Resource = CraftResource.Bronze;
                        chest.Hue = 2830;

                        PlateArms arms = new PlateArms();
                        arms.Resource = CraftResource.Bronze;
                        arms.Hue = 2830;

                        PlateLegs legs = new PlateLegs();
                        legs.Resource = CraftResource.Bronze;
                        legs.Hue = 2830;

                        PlateGorget gorget = new PlateGorget();
                        gorget.Resource = CraftResource.Bronze;
                        gorget.Hue = 2830;

                        PlateGloves gloves = new PlateGloves();
                        gloves.Resource = CraftResource.Bronze;
                        gloves.Hue = 2830;

                        CloseHelm helm = new CloseHelm();
                        helm.Resource = CraftResource.Bronze;
                        helm.Hue = 2830;

                        VhalurianMetalKiteShield shield = new VhalurianMetalKiteShield();
                        shield.Resource = CraftResource.Bronze;
                        shield.Name = "Society of Rymaliel Kite Shield";
                        shield.Hue = 2413;
                        shield.ItemID = 15726;
                        m.EquipItem(shield);

                        Longsword sword = new Longsword();
                        sword.Resource = CraftResource.Iron;

                        m.EquipItem(chest);
                        m.EquipItem(arms);
                        m.EquipItem(legs);
                        m.EquipItem(gorget);
                        m.EquipItem(gloves);
                        m.EquipItem(shield);
                        m.EquipItem(helm);
                        m.EquipItem(sword);

                        m.EquipItem(new ElegantCloak(2751));

                        break;
                    }
                case Armament.Ranged:
                    {
                        LeatherChest chest = new LeatherChest();
                        chest.Resource = CraftResource.BeastLeather;
                        chest.Hue = 2830;

                        LongPants legs = new LongPants();
                        legs.Resource = CraftResource.Wool;
                        legs.Hue = 2830;

                        LeatherGorget gorget = new LeatherGorget();
                        gorget.Resource = CraftResource.BeastLeather;
                        gorget.Hue = 2830;

                        LeatherGloves gloves = new LeatherGloves();
                        gloves.Resource = CraftResource.BeastLeather;
                        gloves.Hue = 2830;

                        ThighBoots boots = new ThighBoots();
                        boots.Resource = CraftResource.BeastLeather;
                        boots.Hue = 2830;

                        WingedHelm helm = new WingedHelm();
                        helm.Resource = CraftResource.Copper;

                        CompositeBow bow = new CompositeBow();
                        bow.Resource = CraftResource.Ash;

                        m.EquipItem(chest);
                        m.EquipItem(legs);
                        m.EquipItem(gorget);
                        m.EquipItem(gloves);
                        m.EquipItem(boots);
                        m.EquipItem(helm);
                        m.EquipItem(bow);

                        if (m is BaseCreature)
                        {
                            BaseCreature bc = m as BaseCreature;
                            bc.AI = AIType.AI_Archer;
                            bc.PackItem(new Arrow(Utility.RandomMinMax(10, 20)));
                        }

                        break;
                    }
            }

            Surcoat coat = new Surcoat();
            coat.ItemID = 15483;
            coat.Name = "A Surcoat of the Society of Rymaliel";
            m.EquipItem(coat);
        }
Example #18
0
        public virtual void Open( Mobile from, bool checkSelfLoot )
        {
            if ( from.AccessLevel > AccessLevel.Player || from.InRange( this.GetWorldLocation(), 2 ) )
            {

                #region Self Looting
                bool selfLoot = ( checkSelfLoot && ( from == m_Owner ) );

                if ( selfLoot )
                {
                    List<Item> items = new List<Item>( this.Items );

                    bool gathered = false;
                    bool didntFit = false;

                    Container pack = from.Backpack;

                    bool checkRobe = true;

                    for ( int i = 0; !didntFit && i < items.Count; ++i )
                    {
                        Item item = items[i];
                        Point3D loc = item.Location;

                        if ( (item.Layer == Layer.Hair || item.Layer == Layer.FacialHair) || !item.Movable || !GetRestoreInfo( item, ref loc ) )
                            continue;

                        if ( checkRobe )
                        {
                            DeathRobe robe = from.FindItemOnLayer( Layer.OuterTorso ) as DeathRobe;

                            if ( robe != null )
                            {
                                if ( Core.SE )
                                {
                                    robe.Delete();
                                }
                                else
                                {
                                    Map map = from.Map;

                                    if ( map != null && map != Map.Internal )
                                        robe.MoveToWorld( from.Location, map );
                                }
                            }
                        }

                        if ( m_EquipItems.Contains( item ) && from.EquipItem( item ) )
                        {
                            gathered = true;
                        }
                        else if ( pack != null && pack.CheckHold( from, item, false, true ) )
                        {
                            item.Location = loc;
                            pack.AddItem( item );
                            gathered = true;
                        }
                        else
                        {
                            didntFit = true;
                        }
                    }

                    if ( gathered && !didntFit )
                    {
                        SetFlag( CorpseFlag.Carved, true );

                        if ( ItemID == 0x2006 )
                        {
                            ProcessDelta();
                            SendRemovePacket();
                            ItemID = Utility.Random( 0xECA, 9 ); // bone graphic
                            Hue = 0;
                            ProcessDelta();
                        }

                        from.PlaySound( 0x3E3 );
                        from.SendLocalizedMessage( 1062471 ); // You quickly gather all of your belongings.
                        return;
                    }

                    if ( gathered && didntFit )
                        from.SendLocalizedMessage( 1062472 ); // You gather some of your belongings. The rest remain on the corpse.
                }

                #endregion

                if ( !CheckLoot( from, null ) )
                    return;

                #region Quests
                PlayerMobile player = from as PlayerMobile;

                if ( player != null )
                {
                    QuestSystem qs = player.Quest;

                    if ( qs is UzeraanTurmoilQuest )
                    {
                        GetDaemonBoneObjective obj = qs.FindObjective( typeof( GetDaemonBoneObjective ) ) as GetDaemonBoneObjective;

                        if ( obj != null && obj.CorpseWithBone == this && ( !obj.Completed || UzeraanTurmoilQuest.HasLostDaemonBone( player ) ) )
                        {
                            Item bone = new QuestDaemonBone();

                            if ( player.PlaceInBackpack( bone ) )
                            {
                                obj.CorpseWithBone = null;
                                player.SendLocalizedMessage( 1049341, "", 0x22 ); // You rummage through the bones and find a Daemon Bone!  You quickly place the item in your pack.

                                if ( !obj.Completed )
                                    obj.Complete();
                            }
                            else
                            {
                                bone.Delete();
                                player.SendLocalizedMessage( 1049342, "", 0x22 ); // Rummaging through the bones you find a Daemon Bone, but can't pick it up because your pack is too full.  Come back when you have more room in your pack.
                            }

                            return;
                        }
                    }
                    else if ( qs is TheSummoningQuest )
                    {
                        VanquishDaemonObjective obj = qs.FindObjective( typeof( VanquishDaemonObjective ) ) as VanquishDaemonObjective;

                        if ( obj != null && obj.Completed && obj.CorpseWithSkull == this )
                        {
                            GoldenSkull sk = new GoldenSkull();

                            if ( player.PlaceInBackpack( sk ) )
                            {
                                obj.CorpseWithSkull = null;
                                player.SendLocalizedMessage( 1050022 ); // For your valor in combating the devourer, you have been awarded a golden skull.
                                qs.Complete();
                            }
                            else
                            {
                                sk.Delete();
                                player.SendLocalizedMessage( 1050023 ); // You find a golden skull, but your backpack is too full to carry it.
                            }
                        }
                    }
                }

                #endregion

                base.OnDoubleClick( from );
            }
            else
            {
                from.SendLocalizedMessage( 500446 ); // That is too far away.
                return;
            }
        }
Example #19
0
        public static void EquipVhalurian(Armament a, Mobile m)
        {
            if (a == Armament.LightCavalry)
                a = (Armament)1;
            else if (a == Armament.HeavyCavalry)
                a = (Armament)3;

            Surcoat coat = new Surcoat();
            coat.Name = "A Surcoat of the Rivergate Militia";
            coat.Hue = 2932;
            coat.ItemID = 15479;
            m.EquipItem(coat);

            switch (a)
            {
                case Armament.Light:
                    {
                        LeatherBoots boots = new LeatherBoots();
                        boots.Resource = CraftResource.BeastLeather;
                        boots.Hue = 2101;

                        m.EquipItem(boots);

                        Beret beret = new Beret();
                        beret.Hue = 2932;
                        m.EquipItem(beret);

                        StuddedChest sc = new StuddedChest();
                        sc.Resource = CraftResource.BeastLeather;
                        sc.Hue = 2101;
                        m.EquipItem(sc);

                        StuddedLegs sl = new StuddedLegs();
                        sl.Resource = CraftResource.BeastLeather;
                        sl.Hue = 2101;
                        m.EquipItem(sl);

                        StuddedArms sa = new StuddedArms();
                        sa.Resource = CraftResource.BeastLeather;
                        sa.Hue = 2101;
                        m.EquipItem(sa);

                        StuddedGloves sg = new StuddedGloves();
                        sg.Resource = CraftResource.BeastLeather;
                        sg.Hue = 2101;
                        m.EquipItem(sg);

                        StuddedGorget so = new StuddedGorget();
                        so.Resource = CraftResource.BeastLeather;
                        so.Hue = 2101;
                        m.EquipItem(so);

                        VhalurianMace vm = new VhalurianMace();
                        vm.Resource = CraftResource.Iron;
                        vm.Hue = 0;
                        m.EquipItem(vm);

                        WoodenShield ws = new WoodenShield();
                        ws.Resource = CraftResource.Oak;
                        ws.Hue = 0;
                        m.EquipItem(ws);

                        break;
                    }
                case Armament.Medium:
                    {
                        ChainChest cc = new ChainChest();
                        cc.Resource = CraftResource.Bronze;
                        cc.Hue = 2101;
                        m.EquipItem(cc);

                        ChainLegs cl = new ChainLegs();
                        cl.Resource = CraftResource.Bronze;
                        cl.Hue = 2101;
                        m.EquipItem(cl);

                        ChainCoif co = new ChainCoif();
                        co.Resource = CraftResource.Bronze;
                        co.Hue = 2101;
                        m.EquipItem(co);

                        RingmailArms ra = new RingmailArms();
                        ra.Resource = CraftResource.Bronze;
                        ra.Hue = 2101;
                        m.EquipItem(ra);

                        RingmailGloves rg = new RingmailGloves();
                        rg.Resource = CraftResource.Bronze;
                        rg.Hue = 2101;
                        m.EquipItem(rg);

                        VhalurianMetalKiteShield vmks = new VhalurianMetalKiteShield();
                        vmks.Resource = CraftResource.Bronze;
                        vmks.Hue = 2101;
                        m.EquipItem(vmks);

                        LeatherBoots boots = new LeatherBoots();
                        boots.Resource = CraftResource.BeastLeather;
                        boots.Hue = 2101;

                        m.EquipItem(boots);

                        if (m.Female)
                        {
                            VhalurianGladius sword = new VhalurianGladius();
                            sword.Resource = CraftResource.Bronze;

                            m.EquipItem(sword);
                        }

                        else
                        {
                            VhalurianBroadsword sword = new VhalurianBroadsword();
                            sword.Resource = CraftResource.Bronze;

                            m.EquipItem(sword);
                        }

                        break;
                    }
                case Armament.Heavy:
                    {
                        VhalurianOrnatePlateChest vopc = new VhalurianOrnatePlateChest();
                        vopc.Resource = CraftResource.Bronze;
                        vopc.Hue = 2101;
                        m.EquipItem(vopc);

                        VhalurianOrnatePlateLegs vopl = new VhalurianOrnatePlateLegs();
                        vopl.Resource = CraftResource.Bronze;
                        vopl.Hue = 2101;
                        m.EquipItem(vopl);

                        VhalurianOrnatePlateGorget vopo = new VhalurianOrnatePlateGorget();
                        vopo.Resource = CraftResource.Bronze;
                        vopo.Hue = 2101;
                        m.EquipItem(vopo);

                        PlateSabatons ps = new PlateSabatons();
                        ps.Resource = CraftResource.Bronze;
                        ps.Hue = 2105;
                        m.EquipItem(ps);

                        VhalurianOrnatePlateArms vopa = new VhalurianOrnatePlateArms();
                        vopa.Resource = CraftResource.Bronze;
                        vopa.Hue = 2101;
                        m.EquipItem(vopa);

                        VhalurianOrnatePlateGloves vopg = new VhalurianOrnatePlateGloves();
                        vopg.Resource = CraftResource.Bronze;
                        vopg.Hue = 2101;
                        m.EquipItem(vopg);

                        VhalurianOrnateKiteShield voks = new VhalurianOrnateKiteShield();
                        voks.Resource = CraftResource.Bronze;
                        voks.Hue = 2102;
                        m.EquipItem(voks);

                        m.EquipItem(new Cloak(1133));

                        if (m.Female)
                        {
                            VhalurianWarHammer hammer = new VhalurianWarHammer();
                            hammer.Resource = CraftResource.Bronze;
                            m.EquipItem(hammer);

                            VhalurianOrnateHelm voh = new VhalurianOrnateHelm();
                            voh.Resource = CraftResource.Bronze;
                            voh.Hue = 2102;
                            m.EquipItem(voh);
                        }

                        else
                        {
                            VhalurianBastardSword sword = new VhalurianBastardSword();
                            sword.Resource = CraftResource.Bronze;
                            m.EquipItem(sword);

                            VhalurianOrnatePlateHelm voph = new VhalurianOrnatePlateHelm();
                            voph.Resource = CraftResource.Bronze;
                            voph.Hue = 2102;
                            m.EquipItem(voph);
                        }

                        break;
                    }
                case Armament.Ranged:
                    {
                        LeatherBoots boots = new LeatherBoots();
                        boots.Resource = CraftResource.BeastLeather;
                        boots.Hue = 2101;
                        m.EquipItem(boots);

                        LeatherCap cap = new LeatherCap();
                        cap.Resource = CraftResource.RegularLeather;
                        cap.Hue = 2101;
                        m.EquipItem(cap);

                        LeatherChest lc = new LeatherChest();
                        lc.Resource = CraftResource.RegularLeather;
                        lc.Hue = 2101;
                        m.EquipItem(lc);

                        Quiver qv = new Quiver();
                        qv.Layer = Layer.Earrings;
                        m.EquipItem(qv);

                        LongPants lp = new LongPants();
                        lp.Resource = CraftResource.Cotton;
                        lp.Hue = 2101;
                        m.EquipItem(lp);

                        LeatherArms la = new LeatherArms();
                        la.Resource = CraftResource.RegularLeather;
                        la.Hue = 2101;
                        m.EquipItem(la);

                        LeatherGloves lg = new LeatherGloves();
                        lg.Resource = CraftResource.RegularLeather;
                        lg.Hue = 2101;
                        m.EquipItem(lg);

                        VhalurianLongbow bow = new VhalurianLongbow();
                        bow.Resource = CraftResource.Yew;
                        m.EquipItem(bow);

                        if (m is BaseCreature)
                        {
                            BaseCreature bc = m as BaseCreature;
                            bc.AI = AIType.AI_Archer;
                            bc.PackItem(new Arrow(Utility.RandomMinMax(10, 20)));
                        }

                        break;
                    }
            }
        }
Example #20
0
        public virtual void Open( Mobile from, bool checkSelfLoot )
        {
            if ( !from.Mounted )
            {
            if ( from.AccessLevel > AccessLevel.Player || from.InRange( this.GetWorldLocation(), 2 ) )
            {
                bool selfLoot = ( checkSelfLoot && ( from == m_Owner ) );

                if ( selfLoot )
                {
                    List<Item> items = new List<Item>( this.Items );

                    bool gathered = false;
                    bool didntFit = false;

                    Container pack = from.Backpack;

                    bool checkRobe = true;

                    if( from is BaseCreature )
                        checkRobe = false;

                    for ( int i = 0; !didntFit && i < items.Count; ++i )
                    {
                        Item item = items[i];
                        Point3D loc = item.Location;

                        if( !( from is BaseCreature ) )
                            if ( (item.Layer == Layer.Hair || item.Layer == Layer.FacialHair) || !item.Movable || !GetRestoreInfo( item, ref loc ) )
                                continue;

                        if ( checkRobe )
                        {
                            DeathRobe robe = from.FindItemOnLayer( Layer.OuterTorso ) as DeathRobe;

                            if ( robe != null )
                            {
                                if ( Core.SE )
                                {
                                    robe.Delete();
                                }
                                else
                                {
                                    Map map = from.Map;

                                    if ( map != null && map != Map.Internal )
                                        robe.MoveToWorld( from.Location, map );
                                }
                            }
                        }

                        if ( m_EquipItems.Contains( item ) && from.EquipItem( item ) )
                        {
                            gathered = true;
                        }
                        else if ( pack != null && pack.CheckHold( from, item, false, true ) )
                        {
                            item.Location = loc;
                            pack.AddItem( item );
                            gathered = true;
                        }
                        else
                        {
                            didntFit = true;
                        }
                    }

                    if ( gathered && !didntFit )
                    {
                        m_Carved = true;

                        if ( ItemID == 0x2006 )
                        {
                            ProcessDelta();
                            SendRemovePacket();
                            ItemID = Utility.Random( 0xECA, 9 ); // bone graphic
                            Hue = 0;
                            ProcessDelta();
                        }

                        from.PlaySound( 0x3E3 );
                        from.SendLocalizedMessage( 1062471 ); // You quickly gather all of your belongings.
                        return;
                    }

                    if ( gathered && didntFit )
                    {
                        from.SendLocalizedMessage( 1062472 ); // You gather some of your belongings. The rest remain on the corpse.
                    }
                }

                if ( !CheckLoot( from ) )
                    return;

                base.OnDoubleClick( from );

                if ( from != m_Owner )
                    from.RevealingAction();

                    if ( !from.Mounted )
                    {
                        from.Animate( 32, 5, 1, true, false, 0 );
                        from.PlaySound( 79 );
                    }

            }

            else

            {
                from.SendLocalizedMessage( 500446 ); // That is too far away.
                return;
            }

            }
            else
            {
            from.SendMessage("You cannot loot a corpse from atop a mount.");
            return;
            }
        }
Example #21
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!this.Movable || this.Layer == Layer.Invalid || this.Parent is Corpse)
                return;

            if (!from.InRange(this.GetWorldLocation(), 2)) // Do not equip items further than 2 tiles
            {
                from.SendLocalizedMessage(500446); // That is too far away.
                return;
            }

            m_Mobile = from;
            m_Cont = this.Parent as Container;
            bool backpack = from.Backpack != null;

            if (from.FindItemOnLayer(this.Layer) == this)
            {
                if (!backpack)
                {
                    from.SendMessage(35, "You have no inventory. Equip inventory bag first.");
                }
                else if (from.Backpack.TryDropItem(from, this, true))
                {
                    from.PlaySound(EquipSound);
                    //from.SendMessage(MessageColorization ? this.Hue : 55, "You put {0} into your backpack.", this.Name != null ? this.Name : this.ItemData.Name);
                }
                return;
            }

            if (this.Layer == Layer.TwoHanded && !(this is BaseShield)) // If item is Two-handed weapon
            {
                if (from.FindItemOnLayer(Layer.OneHanded) != null || from.FindItemOnLayer(this.Layer) != null)
                {
                    if (!backpack)
                    {
                        from.SendMessage(35, "You have no inventory. Equip inventory bag first.");
                        return;
                    }
                }
                if (from.FindItemOnLayer(Layer.OneHanded) != null && from.FindItemOnLayer(this.Layer) == null)
                {
                    Item item = from.FindItemOnLayer(Layer.OneHanded);
                    DoSwap(item);
                    from.PlaySound(EquipSound);
                    return;
                }
                else if (from.FindItemOnLayer(Layer.OneHanded) != null && from.FindItemOnLayer(this.Layer) != null)
                {
                    Item firstHand = from.FindItemOnLayer(Layer.OneHanded);
                    Item secondHand = from.FindItemOnLayer(this.Layer);
                    DoSwap(firstHand, secondHand);
                    from.PlaySound(EquipSound);
                    return;
                }
            }

            if (from.FindItemOnLayer(this.Layer) != null)
            {
                if (!backpack)
                {
                    from.SendMessage(35, "You have no inventory. Equip inventory bag first.");
                    return;
                }
                Item item = from.FindItemOnLayer(this.Layer);
                DoSwap(item);
                from.PlaySound(EquipSound);
            }
            else if (this.Layer == Layer.OneHanded && from.FindItemOnLayer(Layer.TwoHanded) != null && !(from.FindItemOnLayer(Layer.TwoHanded) is BaseShield))
            {
                Item item = from.FindItemOnLayer(Layer.TwoHanded);
                DoSwap(item);
                from.PlaySound(EquipSound);
            }
            else
            {
                from.EquipItem(this);
                if (from.FindItemOnLayer(this.Layer) == this)
                {
                    from.PlaySound(EquipSound);
                    //from.SendMessage(MessageColorization ? this.Hue : 75, "You equipped {0}.", this.Name != null ? this.Name : this.ItemData.Name);
                }
            }
        }
Example #22
0
		public void SwitchTeams( Mobile from, CTFTeam team )
		{
			CTFTeam old = GetTeam( from );
			if ( old == team )
				return;
			else if ( old != null )
				old.RemoveMember( from );

			team.AddMember( from );
			from.Delta( MobileDelta.Noto );
                        from.Blessed = true;

			Item robe = from.FindItemOnLayer( Layer.OuterTorso );
			if ( robe is CTFRobe )
			{
				robe.Name = "Game Robe";
				robe.Hue = 0;
			}
			else
			{
				if ( robe != null )
				{
					if ( robe.Movable )
						from.AddToBackpack( robe );
					else
						robe.Delete();
				}
				
				robe = new CTFRobe( team );
				from.EquipItem( robe );
			}
		}
      public override void OnDoubleClick( Mobile m )
      {
         if( Parent != m )
         {
            m.SendMessage( "You must be wearing the bracelet to use it!" );
         }
         else
         {
            if ( m.Body == 400 )
            {
               m.SendMessage( "You feel yourself changing." );
               m.PlaySound( 232 );
               m.BodyMod = 83;
               m.Hue =2212;
               Attributes.BonusStr = 75;
               Attributes.BonusInt = -50;
               Attributes.BonusDex = 65;
               m.NameMod = "the Incredible Hulk";
               m.RemoveItem(this);
               m.EquipItem(this);
               if( m.Kills >= 5)
               {
               m.Criminal = true;
                }
                if( m.GuildTitle != null)
               {
                  m.DisplayGuildTitle = true;
                }
            }
            else if ( m.Body == 83 )
            {
               m.SendMessage( "You feel yourself changing." );
               m.PlaySound( 900 );
               m.Body = 400;
               m.BodyMod = 0x0;
               m.Hue = 33780;
               Attributes.BonusStr = 0;
               Attributes.BonusInt = 0;
               Attributes.BonusDex = 0;
               m.NameMod = null;
               m.DisplayGuildTitle = false;
               m.Criminal = false;
               m.RemoveItem(this);
               m.EquipItem(this);
            }
            else if ( m.Body == 401 )
            {
               m.SendMessage( "You feel yourself changing." );
               m.PlaySound( 232 );
               m.BodyMod = 1;
               m.Hue = 2212;
               Attributes.BonusStr = 75;
               Attributes.BonusInt = -50;
               Attributes.BonusDex = 60;
               m.NameMod = "the Incredible Hulk";
               m.DisplayGuildTitle = false;
               m.Criminal = false;
               m.RemoveItem(this);
               m.EquipItem(this);
            }
            else if ( m.Body == 1 )
            {
               m.SendMessage( "You feel yourself changing." );
               m.PlaySound( 900 );
               m.Body = 401;
               m.BodyMod = 0x0;
               m.Hue = 33780;
               m.Hits = m.HitsMax ;
               m.Mana = m.ManaMax ;
               m.Stam = m.StamMax ;
               m.NameMod = null;
               m.DisplayGuildTitle = false;
               m.Criminal = false;
               m.RemoveItem(this);
               m.EquipItem(this);
            }

         }
      }
Example #24
0
        public static void EquipKhemetar(Armament a, Mobile m)
        {
            if (a == Armament.LightCavalry)
                a = (Armament)1;
            else if (a == Armament.HeavyCavalry)
                a = (Armament)3;

            switch (a)
            {
                case Armament.Light:
                    {
                        Sandals sand = new Sandals();
                        sand.Resource = CraftResource.BeastLeather;
                        sand.Hue = 2947;
                        m.EquipItem(sand);

                        KhemetarScaleChest chest = new KhemetarScaleChest();
                        chest.Resource = CraftResource.Bronze;
                        chest.Hue = 2947;
                        m.EquipItem(chest);

                        KhemetarScaleLegs legs = new KhemetarScaleLegs();
                        legs.Resource = CraftResource.Bronze;
                        legs.Hue = 2947;
                        m.EquipItem(legs);

                        KhemetarScaleHelmet helmet = new KhemetarScaleHelmet();
                        helmet.Resource = CraftResource.Bronze;
                        helmet.Hue = 2947;
                        m.EquipItem(helmet);

                        KhemetarKukri k = new KhemetarKukri();
                        k.Resource = CraftResource.Iron;
                        m.EquipItem(k);

                        WoodenShield shield = new WoodenShield();
                        shield.Resource = CraftResource.Redwood;
                        m.EquipItem(shield);

                        if (m.Female)
                        {
                            ElegantWaistCloth waist = new ElegantWaistCloth();
                            waist.Hue = 2795;
                            m.EquipItem(waist);
                        }

                        else
                        {
                            WaistSash sash = new WaistSash();
                            sash.Hue = 2795;
                            m.EquipItem(sash);
                        }

                        break;
                    }
                case Armament.Medium:
                    {
                        ThighBoots boots = new ThighBoots();
                        boots.Resource = CraftResource.BeastLeather;
                        boots.Hue = 2947;
                        m.EquipItem(boots);

                        KhemetarScaleChest chest = new KhemetarScaleChest();
                        chest.Resource = CraftResource.Bronze;
                        chest.Hue = 2947;
                        m.EquipItem(chest);

                        KhemetarScaleLegs legs = new KhemetarScaleLegs();
                        legs.Resource = CraftResource.Bronze;
                        legs.Hue = 2947;
                        m.EquipItem(legs);

                        KhemetarScaleArms arms = new KhemetarScaleArms();
                        arms.Resource = CraftResource.Bronze;
                        arms.Hue = 2947;
                        m.EquipItem(arms);

                        RingmailGloves gloves = new RingmailGloves();
                        gloves.Resource = CraftResource.Bronze;
                        gloves.Hue = 2947;
                        m.EquipItem(gloves);

                        KhemetarScaleHelmet helmet = new KhemetarScaleHelmet();
                        helmet.Resource = CraftResource.Bronze;
                        helmet.Hue = 2947;
                        m.EquipItem(helmet);

                        KhemetarKhopesh sword = new KhemetarKhopesh();
                        sword.Resource = CraftResource.Bronze;
                        m.EquipItem(sword);

                        MetalShield shield = new MetalShield();
                        shield.Resource = CraftResource.Bronze;
                        shield.Hue = 2947;
                        m.EquipItem(shield);

                        if (m.Female)
                        {
                            ElegantWaistCloth waist = new ElegantWaistCloth();
                            waist.Hue = 2795;
                            m.EquipItem(waist);
                        }

                        else
                        {
                            WaistSash sash = new WaistSash();
                            sash.Hue = 2795;
                            m.EquipItem(sash);
                        }

                        break;
                    }
                case Armament.Heavy:
                    {
                        KhemetarScaleChest chest = new KhemetarScaleChest();
                        chest.Resource = CraftResource.Bronze;
                        chest.Hue = 2947;
                        m.EquipItem(chest);

                        PlateLegs legs = new PlateLegs();
                        legs.Resource = CraftResource.Bronze;
                        legs.Hue = 2947;
                        m.EquipItem(legs);

                        PlateArms arms = new PlateArms();
                        arms.Resource = CraftResource.Bronze;
                        arms.Hue = 2947;
                        m.EquipItem(arms);

                        PlateGorget gorget = new PlateGorget();
                        gorget.Resource = CraftResource.Bronze;
                        gorget.Hue = 2947;
                        m.EquipItem(gorget);

                        PlateGloves gloves = new PlateGloves();
                        gloves.Resource = CraftResource.Bronze;
                        gloves.Hue = 2947;
                        m.EquipItem(gloves);

                        KhemetarScaleHelmet helmet = new KhemetarScaleHelmet();
                        helmet.Resource = CraftResource.Bronze;
                        helmet.Hue = 2947;
                        m.EquipItem(helmet);

                        RunicCloak cloak = new RunicCloak();
                        cloak.Hue = 2795;
                        m.EquipItem(cloak);

                        KhemetarAxe axe = new KhemetarAxe();
                        axe.Resource = CraftResource.Bronze;
                        m.EquipItem(axe);

                        if (m.Female)
                        {
                            ElegantWaistCloth waist = new ElegantWaistCloth();
                            waist.Hue = 2795;
                            m.EquipItem(waist);
                        }

                        else
                        {
                            WaistSash sash = new WaistSash();
                            sash.Hue = 2795;
                            m.EquipItem(sash);
                        }

                        break;
                    }
                case Armament.Ranged:
                    {
                        KhemetarRogueTurban turban = new KhemetarRogueTurban();
                        turban.Resource = CraftResource.Cotton;
                        turban.Hue = 2795;
                        m.EquipItem(turban);

                        BaggyPants pants = new BaggyPants();
                        pants.Resource = CraftResource.Cotton;
                        pants.Hue = 2795;
                        m.EquipItem(pants);

                        ElegantCloak cloak = new ElegantCloak();
                        cloak.Resource = CraftResource.Cotton;
                        cloak.Hue = 2795;
                        m.EquipItem(cloak);

                        m.EquipItem(new Sandals());

                        KhemetarScaleChest chest = new KhemetarScaleChest();
                        chest.Resource = CraftResource.Bronze;
                        chest.Hue = 2947;
                        m.EquipItem(chest);

                        KhemetarScaleArms arms = new KhemetarScaleArms();
                        arms.Resource = CraftResource.Bronze;
                        arms.Hue = 2947;
                        m.EquipItem(arms);

                        KhemetarLongbow bow = new KhemetarLongbow();
                        bow.Resource = CraftResource.Redwood;
                        m.EquipItem(bow);

                        if (m.Female)
                        {
                            ElegantWaistCloth waist = new ElegantWaistCloth();
                            waist.Hue = 2795;
                            m.EquipItem(waist);
                        }

                        else
                        {
                            WaistSash sash = new WaistSash();
                            sash.Hue = 2795;
                            m.EquipItem(sash);
                        }

                        if (m is BaseCreature)
                        {
                            BaseCreature bc = m as BaseCreature;
                            bc.AI = AIType.AI_Archer;
                            bc.PackItem(new Arrow(Utility.RandomMinMax(10, 20)));
                        }

                        break;
                    }
            }
        }
Example #25
0
        public static void EquipMhordul(Armament a, Mobile m)
        {
            if (a == Armament.LightCavalry)
                a = (Armament)1;
            else if (a == Armament.HeavyCavalry)
                a = (Armament)3;

            Sandals sandals = new Sandals();
            sandals.Resource = CraftResource.BeastLeather;
            sandals.Hue = 1194;
            m.EquipItem(sandals);

            MhordulBoneArms mba = new MhordulBoneArms();
            mba.Hue = 2101;
            m.EquipItem(mba);

            switch (a)
            {
                case Armament.Light:
                    {
                        MhordulBoneHelm mbh = new MhordulBoneHelm();
                        mbh.Hue = 2101;
                        m.EquipItem(mbh);

                        StuddedLegs sl = new StuddedLegs();
                        sl.Resource = CraftResource.BeastLeather;
                        m.EquipItem(sl);

                        if (m.Female)
                        {
                            m.EquipItem(new SmallRaggedSkirt(1194));
                            m.EquipItem(new RaggedBra(1194));
                        }
                        else
                        {
                            MhordulMedicineManBoneChest bc = new MhordulMedicineManBoneChest();
                            bc.Hue = 2101;
                            m.EquipItem(bc);
                        }

                        MhordulBoneSword mbs = new MhordulBoneSword();
                        m.EquipItem(mbs);

                        MhordulBoneShield shield = new MhordulBoneShield();
                        m.EquipItem(shield);

                        break;
                    }
                case Armament.Medium:
                    {
                        MhordulBoneHelm mbh = new MhordulBoneHelm();
                        mbh.Hue = 2101;
                        m.EquipItem(mbh);

                        MhordulBoneLegs mbl = new MhordulBoneLegs();
                        mbl.Hue = 2101;
                        m.EquipItem(mbl);

                        MhordulBoneGloves mbg = new MhordulBoneGloves();
                        mbg.Hue = 2101;
                        m.EquipItem(mbg);

                        StuddedChest chest = new StuddedChest();
                        chest.Hue = 2101;
                        m.EquipItem(chest);

                        if (m.Female)
                        {
                            m.EquipItem(new RaggedSkirt(1194));
                        }
                        else
                            m.EquipItem(new WaistCloth(1194));

                        if (Utility.RandomBool())
                            m.EquipItem(new MhordulBoneSpear());
                        else
                            m.EquipItem(new MhordulBoneScythe());

                        break;
                    }
                case Armament.Heavy:
                    {
                        MhordulHornedSkullHelm mhsh = new MhordulHornedSkullHelm();
                        mhsh.Hue = 2101;
                        m.EquipItem(mhsh);

                        MhordulBoneChest mbc = new MhordulBoneChest();
                        mbc.Hue = 2101;
                        m.EquipItem(mbc);

                        MhordulBoneLegs mbl = new MhordulBoneLegs();
                        mbl.Hue = 2101;
                        m.EquipItem(mbl);

                        MhordulBoneGloves mbg = new MhordulBoneGloves();
                        mbg.Hue = 2101;
                        m.EquipItem(mbg);

                        MhordulBoneShield mbs = new MhordulBoneShield();
                        mbs.Hue = 2101;
                        m.EquipItem(mbs);

                        if(m.Female)
                            m.EquipItem(new SmallRaggedSkirt(1194));

                        if (Utility.RandomBool())
                        {
                            MhordulWarFork mwf = new MhordulWarFork();
                            mwf.Resource = CraftResource.Iron;
                            m.EquipItem(mwf);
                        }

                        else
                            m.EquipItem(new MhordulBoneAxe());

                        break;
                    }
                case Armament.Ranged:
                    {
                        MhordulBoneHelm mbh = new MhordulBoneHelm();
                        mbh.Hue = 2101;
                        m.EquipItem(mbh);

                        m.EquipItem(new MhordulBoneBow());

                        if (m.Female)
                        {
                            m.EquipItem(new SmallRaggedSkirt(1194));
                            m.EquipItem(new RaggedBra(1194));
                        }

                        else
                            m.EquipItem(new RaggedPants(1194));

                        if (m is BaseCreature)
                        {
                            BaseCreature bc = m as BaseCreature;
                            bc.AI = AIType.AI_Archer;
                            bc.PackItem(new Arrow(Utility.RandomMinMax(10, 20)));
                        }

                        break;
                    }
            }
        }
		public static void GiveItem( Mobile to, int hue, Item item )
		{
			if ( to == null && item == null )
				return;

			if ( hue != 0 )
				item.Hue = hue;

			item.Movable = false;
			to.EquipItem( item );
			return;
		}
Example #27
0
        public static void EquipTyrean(Armament a, Mobile m)
        {
            if (a == Armament.LightCavalry)
                a = (Armament)1;
            else if (a == Armament.HeavyCavalry)
                a = (Armament)3;

            Surcoat coat = new Surcoat();
            coat.ItemID = 15477;
            coat.Name = "A Surcoat of the Jarlsgaard";
            coat.Hue = 2741;
            m.EquipItem(coat);

            switch (a)
            {
                case Armament.Light:
                    {
                        StuddedChest lc = new StuddedChest();
                        lc.Resource = CraftResource.BeastLeather;
                        lc.Hue = 1899;
                        m.EquipItem(lc);

                        StuddedLegs ll = new StuddedLegs();
                        ll.Resource = CraftResource.BeastLeather;
                        ll.Hue = 1899;
                        m.EquipItem(ll);

                        StuddedArms la = new StuddedArms();
                        la.Resource = CraftResource.BeastLeather;
                        la.Hue = 1899;
                        m.EquipItem(ll);

                        StuddedGloves lg = new StuddedGloves();
                        lg.Resource = CraftResource.BeastLeather;
                        lg.Hue = 1899;
                        m.EquipItem(lg);

                        StuddedGorget lo = new StuddedGorget();
                        lo.Resource = CraftResource.BeastLeather;
                        lo.Hue = 1899;
                        m.EquipItem(lo);

                        BearMask mask = new BearMask();
                        mask.Hue = 1899;
                        m.EquipItem(mask);

                        FurBoots boots = new FurBoots();
                        boots.Resource = CraftResource.BeastLeather;
                        boots.Hue = 2741;
                        m.EquipItem(boots);

                        TyreanThrowingAxe tta = new TyreanThrowingAxe();
                        tta.Resource = CraftResource.Bronze;
                        m.EquipItem(tta);

                        LeatherShield ls = new LeatherShield();
                        ls.Resource = CraftResource.Yew;
                        m.EquipItem(ls);

                        break;
                    }
                case Armament.Medium:
                    {
                        ChainChest cc = new ChainChest();
                        cc.Resource = CraftResource.Bronze;
                        cc.Hue = 1899;
                        m.EquipItem(cc);

                        ChainLegs cl = new ChainLegs();
                        cl.Resource = CraftResource.Bronze;
                        cl.Hue = 1899;
                        m.EquipItem(cl);

                        RingmailArms ra = new RingmailArms();
                        ra.Resource = CraftResource.Bronze;
                        ra.Hue = 1899;
                        m.EquipItem(ra);

                        RingmailGloves rg = new RingmailGloves();
                        rg.Resource = CraftResource.Bronze;
                        rg.Hue = 1899;
                        m.EquipItem(rg);

                        TyreanHornedHelm thh = new TyreanHornedHelm();
                        thh.Resource = CraftResource.Bronze;
                        thh.Hue = 1899;
                        m.EquipItem(thh);

                        FurBoots boots = new FurBoots();
                        boots.Resource = CraftResource.BeastLeather;
                        boots.Hue = 2741;
                        m.EquipItem(boots);

                        bool WeaponChance = Utility.RandomBool();

                        if (WeaponChance)
                        {
                            TyreanHarpoon weapon = new TyreanHarpoon();
                            weapon.Resource = CraftResource.Bronze;

                            m.EquipItem(weapon);
                        }

                        else
                        {
                            TyreanBattleAxe weapon = new TyreanBattleAxe();
                            weapon.Resource = CraftResource.Bronze;

                            m.EquipItem(weapon);
                        }

                        break;
                    }
                case Armament.Heavy:
                    {
                        TyreanHalfPlateChest thpc = new TyreanHalfPlateChest();
                        thpc.Resource = CraftResource.Bronze;
                        thpc.Hue = 1899;
                        m.EquipItem(thpc);

                        TyreanHalfPlateLegs thpl = new TyreanHalfPlateLegs();
                        thpl.Resource = CraftResource.Bronze;
                        thpl.Hue = 1899;
                        m.EquipItem(thpl);

                        TyreanHalfPlateSabatons thps = new TyreanHalfPlateSabatons();
                        thps.Resource = CraftResource.Bronze;
                        thps.Hue = 1899;
                        m.EquipItem(thps);

                        TyreanHalfPlateArms thpa = new TyreanHalfPlateArms();
                        thpa.Resource = CraftResource.Bronze;
                        thpa.Hue = 1899;
                        m.EquipItem(thpa);

                        TyreanHalfPlateGloves thpg = new TyreanHalfPlateGloves();
                        thpg.Resource = CraftResource.Bronze;
                        thpg.Hue = 1899;
                        m.EquipItem(thpg);

                        TyreanHalfPlateGorget thpo = new TyreanHalfPlateGorget();
                        thpo.Resource = CraftResource.Bronze;
                        thpo.Hue = 1899;
                        m.EquipItem(thpo);

                        TyreanKiteShield tks = new TyreanKiteShield();
                        tks.Resource = CraftResource.Bronze;
                        tks.Hue = 1899;
                        m.EquipItem(tks);

                        m.EquipItem(new Cloak(1445));

                        TyreanWingedHelm twh = new TyreanWingedHelm();
                        twh.Resource = CraftResource.Bronze;
                        twh.Hue = 1899;
                        m.EquipItem(twh);

                        bool WeaponChance = Utility.RandomBool();
                        if (WeaponChance)
                        {
                            TyreanWarAxe axe = new TyreanWarAxe();
                            axe.Resource = CraftResource.Bronze;

                            m.EquipItem(axe);
                        }

                        else
                        {
                            TyreanOrnateAxe axe = new TyreanOrnateAxe();
                            axe.Resource = CraftResource.Bronze;

                            m.EquipItem(axe);
                        }

                        break;
                    }
                case Armament.Ranged:
                    {
                        FancyShirt shirt = new FancyShirt();
                        shirt.Resource = CraftResource.Wool;
                        shirt.Hue = 1899;
                        m.EquipItem(shirt);

                        LeatherChest lc = new LeatherChest();
                        lc.Resource = CraftResource.BeastLeather;
                        lc.Hue = 1899;
                        m.EquipItem(lc);

                        LeatherLegs ll = new LeatherLegs();
                        ll.Resource = CraftResource.BeastLeather;
                        ll.Hue = 1899;
                        m.EquipItem(ll);

                        LeatherGloves lg = new LeatherGloves();
                        lg.Resource = CraftResource.BeastLeather;
                        lg.Hue = 1899;
                        m.EquipItem(lg);

                        FurBoots boots = new FurBoots();
                        boots.Resource = CraftResource.BeastLeather;
                        boots.Hue = 2741;
                        m.EquipItem(boots);

                        m.EquipItem(new Cloak(1445));

                        TyreanCompositeBow bow = new TyreanCompositeBow();
                        bow.Resource = CraftResource.Redwood;
                        m.EquipItem(bow);

                        if (m is BaseCreature)
                        {
                            BaseCreature bc = m as BaseCreature;
                            bc.AI = AIType.AI_Archer;
                            bc.PackItem(new Arrow(Utility.RandomMinMax(10, 20)));
                        }

                        break;
                    }
            }
        }
Example #28
0
        public static bool GiveItem(Mobile to, int hue, Item item, bool mustequip)
        {
            if (to == null && item == null)
                return false;

            if (hue != 0)
                item.Hue = hue;

            item.Movable = false;

            if (to.EquipItem(item))
                return true;

            var pack = to.Backpack;

            if (pack != null && !mustequip)
            {
                pack.DropItem(item);
                return true;
            }
            item.Delete();

            return false;
        }
Example #29
0
public override void OnDoubleClick( Mobile from )
{
 // if not a player
 Mobile m_Mob = (Mobile)from;
 AccessLevel al_MobLevel = m_Mob.AccessLevel;
 Account a_Account = (Account)m_Mob.Account;
 AccessLevel al_AccLevel = a_Account.AccessLevel;
 if ( al_AccLevel > AccessLevel.Player)
 {
  // if not already possessing a mobile
  if( !m_Possessing )
  {
   from.SendMessage( "Who or What do you want to possess?" );
   from.Target = new InternalTarget(this);
  }
  // restore your self and unhide the previously possessed mobile
  else
  {
    // restore basics
    m_Possessing=false;
	from.Karma = m_Karma;
	from.Fame = m_Fame;
    from.Name=m_Name;
    from.Title=m_Title;
    from.Hue=m_Hue;
    from.BodyValue=m_BodyValue;
    from.Female=m_Female;
    from.Hidden=true;
    // Delete eveything you have equipped which is just a copy of what the NPC had
    ArrayList equipitems = new ArrayList(from.Items);
    foreach (Item item in equipitems)
    {
     if ((item.Layer != Layer.Bank) && (item.Layer != Layer.Backpack) )
      item.Delete();
    }
    // get dressed and delete that white backpack
    for ( int i = m_Stuff.Items.Count - 1; i >= 0; --i )
    {
     if ( i >= m_Stuff.Items.Count )
      continue;
     from.EquipItem((Item)m_Stuff.Items[i]);
    }
// do we really want to delete the backpack?
    m_Stuff.Delete();

    // get your location, orient, enabale and show the mobile
    Point3D from_Location = new Point3D(from.Location.X, from.Location.Y, from.Location.Z);
	if(m_Possessed != null)
	  {
	    m_Possessed.Direction = from.Direction;
	    m_Possessed.MoveToWorld( from_Location, from.Map );
	    m_Possessed.Hidden=false;
	    m_Possessed.CantWalk=false;
	  }

  }
 }
 else // somehow a player got one of these which should never happen, just delete it and put a scare into them
 {
  from.SendMessage("You are trying to access a restricted item. The item has been removed and your account has been scheduled for deletion.");
  this.Delete();
 }

}
Example #30
0
		public void Refresh( Mobile mob, Container cont )
		{
			if ( !mob.Alive )
			{
				mob.Resurrect();

				DeathRobe robe = mob.FindItemOnLayer( Layer.OuterTorso ) as DeathRobe;

				if ( robe != null )
					robe.Delete();

				if ( cont is Corpse )
				{
					Corpse corpse = (Corpse) cont;

					for ( int i = 0; i < corpse.EquipItems.Count; ++i )
					{
						Item item = corpse.EquipItems[i];

						if ( item.Movable && item.Layer != Layer.Hair && item.Layer != Layer.FacialHair && item.IsChildOf( mob.Backpack ) )
							mob.EquipItem( item );
					}
				}
			}

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

			mob.Poison = null;
		}