Esempio n. 1
0
        private static void EquipPirateItems(Mobile player)
        {
            //Equip the cursed pirate garb.
            //Cutlass
            Cutlass cutlass = new Cutlass();

            cutlass.Movable = false;
            cutlass.Skill   = SkillName.Swords;
            cutlass.Layer   = Layer.OneHanded;
            player.AddItem(cutlass);

            //Fancy Shirt
            FancyShirt shirt = new FancyShirt(Utility.RandomNeutralHue());

            shirt.Movable = false;
            player.AddItem(shirt);

            //Long Pants
            LongPants pants = new LongPants(Utility.RandomNeutralHue());

            pants.Movable = false;
            player.AddItem(pants);

            //Tricorne Hat
            TricorneHat hat = new TricorneHat(Utility.RandomNeutralHue());

            hat.Movable = false;
            player.AddItem(hat);

            //Thigh Boots
            ThighBoots boots = new ThighBoots();

            boots.Movable = false;
            player.AddItem(boots);
        }
Esempio n. 2
0
        public static Item GetRandomHat()
        {
            Item hat = null;

            switch ( Utility.Random( 6 ) )
            {
                case 0:
                    hat = new SkullCap( GetRandomHue() );
                    break;
                case 1:
                    hat = new Bandana( GetRandomHue() );
                    break;
                case 2:
                    hat = new WideBrimHat();
                    break;
                case 3:
                    hat = new TallStrawHat( Utility.RandomNeutralHue() );
                    break;
                case 4:
                    hat = new StrawHat( Utility.RandomNeutralHue() );
                    break;
                case 5:
                    hat = new TricorneHat( Utility.RandomNeutralHue() );
                    break;
            }

            return hat;
        }
Esempio n. 3
0
        public MerchantCaptain(BaseGalleon galleon)
            : base(galleon, AIType.AI_Melee, FightMode.Aggressor, 1, 10, .2, .4)
        {
            Title = "the merchant captain";
            Hue = Race.RandomSkinHue();

            Item hat;

            if (Utility.RandomBool())
                hat = new WideBrimHat();
            else
                hat = new TricorneHat();

            hat.Hue = Utility.RandomNeutralHue();

            AddItem(new Sandals());
            AddItem(new FancyShirt(Utility.RandomNeutralHue()));
            AddItem(hat);
            AddItem(new Cloak(Utility.RandomNeutralHue()));
            AddItem(new Dagger());

            Utility.AssignRandomHair(this);

            Fame = 22000;
            Karma = -22000;
        }
        public FamousPiratesMace()
            : base(AIType.AI_Melee, FightMode.Closest, 15, 1, 0.9, 0.9)
        {

            int Hue = 2075;

            // Skills and Stats
            this.InitStats(350, 350, 310);
            this.Skills[SkillName.Macing].Base = 150;
            this.Skills[SkillName.Anatomy].Base = 150;
            this.Skills[SkillName.Healing].Base = 150;
            this.Skills[SkillName.Tactics].Base = 150;

            // Name
            this.Name = "Captain Hector Barbossa";

            // Equip
            WarHammer war = new WarHammer();
            war.Movable = true;
            war.Crafter = this;
            war.Quality = WeaponQuality.Exceptional;
            AddItem(war);

            Boots bts = new Boots();
			bts.Movable = false;
            bts.Hue = Hue;
            AddItem(bts);

            ChainChest cht = new ChainChest();
            cht.Movable = false;
            cht.LootType = LootType.Regular;
            cht.Crafter = this;
            cht.Quality = ArmorQuality.Exceptional;
            AddItem(cht);

            ChainLegs chl = new ChainLegs();
            chl.Movable = false;
            chl.LootType = LootType.Regular;
            chl.Crafter = this;
            chl.Quality = ArmorQuality.Exceptional;
            AddItem(chl);

            PlateArms pla = new PlateArms();
            pla.Movable = false;
            pla.LootType = LootType.Regular;
            pla.Crafter = this;
            pla.Quality = ArmorQuality.Exceptional;
            AddItem(pla);

            TricorneHat tch = new TricorneHat();
            tch.Movable = false;
            tch.Hue = Hue;
            AddItem(tch);

            Bandage band = new Bandage(20);
            AddToBackpack(band);
        }
Esempio n. 5
0
		public Finlor()
		{
			Name = "Finlor";
                        Title = "the Sea Captain";
			Body = 0x190;
			Hue = Utility.RandomSkinHue();
			Blessed = true;
			CantWalk = true;
			Direction = Direction.South;

			ThighBoots tb = new ThighBoots();
                        tb.Hue = 0;
                        AddItem( tb );

                        LongPants lp = new LongPants();
                        lp.Hue = 6;
                        AddItem( lp );

		        FancyShirt fs = new FancyShirt();
                        fs.Hue = 0;
                        AddItem( fs );

			TricorneHat th = new TricorneHat();
                        th.Hue = 52;
                        AddItem( th );

			BodySash bs = new BodySash();
			bs.Hue = 6;
			AddItem( bs );

			Cloak cl = new Cloak();
			cl.Hue = 38;
			AddItem( cl );

	                Scimitar sc = new Scimitar();
                        AddItem( sc );

			GoldBeadNecklace gn = new GoldBeadNecklace();
			AddItem( gn );

			GoldBracelet gb = new GoldBracelet();
			AddItem( gb );

			GoldEarrings ge = new GoldEarrings();
			AddItem( ge );

			GoldRing gr = new GoldRing();
			AddItem( gr );			
                        
                        AddItem( new PonyTail(1149));
                     
			AddItem( new Vandyke(1149));
			
		}
Esempio n. 6
0
		public Barthus()
		{
			Name = "Barthus";
                        Title = "the Shipmate";
			Body = 0x190;
			Hue = Utility.RandomSkinHue();
			Blessed = true;
			CantWalk = true;
			Direction = Direction.South;

			Boots bt = new Boots();
                        bt.Hue = 0;
                        AddItem( bt );

                        LongPants lp = new LongPants();
                        lp.Hue = 0;
                        AddItem( lp );

		        FancyShirt fs = new FancyShirt();
                        fs.Hue = 0;
                        AddItem( fs );

			TricorneHat th = new TricorneHat();
                        th.Hue = 0;
                        AddItem( th );			

	                Scimitar sc = new Scimitar();
                        AddItem( sc );

			GoldBeadNecklace gn = new GoldBeadNecklace();
			AddItem( gn );

			GoldBracelet gb = new GoldBracelet();
			AddItem( gb );

			GoldEarrings ge = new GoldEarrings();
			AddItem( ge );

			GoldRing gr = new GoldRing();
			AddItem( gr );			
                        
                        AddItem( new PonyTail(1149));
                     
			AddItem( new Vandyke(1149));
			
		}
Esempio n. 7
0
		public Pirate2() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.15, 0.4 )
		{
			Name = "Pirate";

			if ( Female = Utility.RandomBool() )
				Body = 186;
			else
				Body = 185;

			SetStr( 578, 620 );
			SetDex( 450, 500 );
			SetInt( 200, 300 );

			SetHits( 100, 150);
			SetDamage( 30, 45 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetSkill( SkillName.Fencing, 72.5, 100.0 );
			SetSkill( SkillName.Healing, 60.3, 100.0 );
			SetSkill( SkillName.Macing, 72.5, 100.0 );
			SetSkill( SkillName.Poisoning, 60.0, 100.5 );
			SetSkill( SkillName.MagicResist, 72.5, 100.0 );
			SetSkill( SkillName.Swords, 72.5, 100.0 );
			SetSkill( SkillName.Tactics, 72.5, 100.0 );

			Fame = 1000;
			Karma = -1000;
			
			CanSwim = true;

			Tamable = false;
			ControlSlots = 1;
			MinTameSkill = 99.1;
	
			PackItem( new Gold( 650, 1500 ) );
			//PackItem( new Musket2() );
			
			new Horse().Rider = this;
			
			switch ( Utility.Random( 5 )) 
			{ 
				case 0: PackItem( new SOS() ); 
				break;
				case 1: PackItem( new SpecialFishingNet() ); 
				break;
				}	
			
			Item LongPants = new LongPants();
			LongPants.Movable = false;
			AddItem( LongPants );
  			LongPants.Hue = 1; 

			Item LeatherGloves = new LeatherGloves();
			LeatherGloves.Hue = 1;
			LeatherGloves.Movable = false;
			AddItem( LeatherGloves ); 

			Item FancyShirt = new FancyShirt();
			FancyShirt.Hue = 43;
			FancyShirt.Movable = false;
			AddItem( FancyShirt ); 

			Item BodySash = new BodySash();
			BodySash.Hue = 1;
			BodySash.Movable = false;
			AddItem( BodySash ); 

			Item TricorneHat = new TricorneHat();
			TricorneHat.Hue = 1;
			TricorneHat.Movable = false;
			AddItem( TricorneHat ); 
			
			Item ThighBoots = new ThighBoots();
			ThighBoots.Hue = 1;
			ThighBoots.Movable = false;
			AddItem( ThighBoots ); 
			
			/*Item Musket2 = new Musket2();
			Musket2.LootType = LootType.Blessed;
			Musket2.Movable = false;
			AddItem( Musket2 );
			
			switch ( Utility.Random( 1 )) 
			{ 
				case 0: PackItem( new ClothingBlessDeed() ); 
				break;
				}*/	
		}
        public FamousPiratesHealer()
            : base(AIType.AI_Healer, FightMode.Closest, 15, 1, 0.2, 0.6)
        {
            // A FamousPirates Healer Mage
            int Hue = 2075;

            // Skills and Stats
            this.InitStats(250, 250, 250);
            this.Skills[SkillName.Magery].Base = 150;
            this.Skills[SkillName.EvalInt].Base = 150;
            this.Skills[SkillName.Anatomy].Base = 150;
            this.Skills[SkillName.Wrestling].Base = 150;
            this.Skills[SkillName.Meditation].Base = 150;
            this.Skills[SkillName.Healing].Base = 100;

            // Name
            this.Name = "Governor Swann";

            // Equip
            Spellbook book = FullSpellbook();
            AddItem(book);

            LeatherArms lea = new LeatherArms();
            lea.Movable = false;
            lea.LootType = LootType.Regular;
            lea.Crafter = this;
            lea.Quality = ArmorQuality.Exceptional;
            AddItem(lea);

            LeatherChest lec = new LeatherChest();
            lec.Movable = false;
            lec.LootType = LootType.Regular;
            lec.Crafter = this;
            lec.Quality = ArmorQuality.Exceptional;
            AddItem(lec);

            LeatherGorget leg = new LeatherGorget();
            leg.Movable = false;
            leg.LootType = LootType.Regular;
            leg.Crafter = this;
            leg.Quality = ArmorQuality.Exceptional;
            AddItem(leg);

            LeatherLegs lel = new LeatherLegs();
            lel.Movable = false;
            lel.LootType = LootType.Regular;
            lel.Crafter = this;
            lel.Quality = ArmorQuality.Exceptional;
            AddItem(lel);

            Boots snd = new Boots();
			snd.Movable = false;
            snd.Hue = Hue;
            snd.LootType = LootType.Regular;
            AddItem(snd);

            TricorneHat tch = new TricorneHat();
            tch.Movable = false;
            tch.Hue = Hue;
            AddItem(tch);

            Robe robe = new Robe();
			robe.Movable = false;
            robe.Hue = Hue;
            AddItem(robe);

        }
		public CaptainJackSparrow(): base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Body = 0x190;
			Name = "Captain Jack Sparrow";
			Title = "Dread Pirate";
			Hue = 0;

			SetStr( 351, 400 );
			SetDex( 151, 165 );
			SetInt( 76, 100 );

			SetHits( 1500, 1700 );

			SetDamage( 25, 35 );

			SetDamageType( ResistanceType.Physical, 100 );
			SetDamageType( ResistanceType.Cold, 25 );

			SetResistance( ResistanceType.Physical, 65 );
			SetResistance( ResistanceType.Fire, 30 );
			SetResistance( ResistanceType.Cold, 60 );
			SetResistance( ResistanceType.Poison, 35 );
			SetResistance( ResistanceType.Energy, 25, 35 );

			SetSkill( SkillName.Wrestling, 100.0 );
			SetSkill( SkillName.Swords, 120.1, 130.0 );
			SetSkill( SkillName.Anatomy, 120.1, 130.0 );
			SetSkill( SkillName.MagicResist, 90.1, 100.0 );
			SetSkill( SkillName.Tactics, 90.1, 100.0 );

			Fame = 10000;
			Karma = -10000;         

			VirtualArmor = 65;          
         
			Cutlass weapon = new Cutlass();
			weapon.Hue = 0x835;
			weapon.Movable = false;
			AddItem( weapon );

			MetalShield shield = new MetalShield();
			shield.Hue = 0x835;
			shield.Movable = false;
			AddItem( shield );

			TricorneHat hat = new TricorneHat();
			hat.Hue = 0x835;
			AddItem( hat );

			BoneArms arms = new BoneArms();
			arms.Hue = 0x835;
			AddItem( arms );

			BoneGloves gloves = new BoneGloves();
			gloves.Hue = 0x835;
			AddItem( gloves );

			BoneChest tunic = new BoneChest();
			tunic.Hue = 0x835;
			AddItem( tunic );

			BoneLegs legs = new BoneLegs();
			legs.Hue = 0x835;
			AddItem( legs );

			AddItem( new Boots() );
            PackGold(1500, 2000);

            /*switch (Utility.Random(6))
            {
                case 0: PackItem(new DreadPirateHat()); break;
                case 1: PackItem(new ShipModelOfTheHMSCape()); break;
                case 2: PackItem(new CaptainJackSparrowsCutlass()); break;

            }*/
        }
		public PirateLeader() : base( AIType.AI_Melee/*, FightMode.Closest, 10, 1, 0.15, 0.4*/ )
		{
			Name = "Pirate Lord";

			if ( Female = Utility.RandomBool() )
				Body = 186;
			else
				Body = 185;

			SetStr( 578, 620 );
			SetDex( 450, 500 );
			SetInt( 200, 300 );

			SetHits( 4000, 6000);
			SetDamage( 40, 55 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetSkill( SkillName.Fencing, 100.5, 120.0 );
			SetSkill( SkillName.Healing, 60.3, 100.0 );
			SetSkill( SkillName.Macing, 100.5, 140.0 );
			SetSkill( SkillName.Poisoning, 60.0, 100.5 );
			SetSkill( SkillName.MagicResist, 72.5, 100.0 );
			SetSkill( SkillName.Swords, 100.5, 150.0 );
			SetSkill( SkillName.Tactics, 72.5, 170.0 );

			Fame = 50000;
			Karma = -50000;
			
			CanSwim = true;

			Tamable = false;
			ControlSlots = 1;
			MinTameSkill = 99.1;
            MF_Displacer = true;
            MF_Bomber = true;
            MF_HumanRevealer = true;
			PackItem( new Gold( 6500, 15000 ) );
			//PackItem( new Musket2() );
			
			//new ThoroughbredHorse().Rider = this;
			
			switch ( Utility.Random( 5 )) 
			{ 
				case 0: PackItem( new SOS() ); 
				break;
				case 1: PackItem( new SpecialFishingNet() ); 
				break;
				}	
			
			Item LongPants = new LongPants();
			LongPants.Movable = false;
			AddItem( LongPants );
  			LongPants.Hue = 1; 

			Item LeatherGloves = new LeatherGloves();
			LeatherGloves.Hue = 1;
			LeatherGloves.Movable = false;
			AddItem( LeatherGloves ); 

			Item FancyShirt = new FancyShirt();
			FancyShirt.Hue = 143;
			FancyShirt.Movable = false;
			AddItem( FancyShirt ); 

			Item BodySash = new BodySash();
			BodySash.Hue = 1;
			BodySash.Movable = false;
			AddItem( BodySash ); 

			Item TricorneHat = new TricorneHat();
			TricorneHat.Hue = 1;
			TricorneHat.Movable = false;
			AddItem( TricorneHat ); 
			
			Item ThighBoots = new ThighBoots();
			ThighBoots.Hue = 143;
			ThighBoots.Movable = false;
			AddItem( ThighBoots );

            switch (Utility.Random(5))
            {
                case 0: AddItem(new Bow()); break;
                case 1: AddItem(new CompositeBow()); break;
                case 2: AddItem(new Crossbow()); break;
                case 3: AddItem(new RepeatingCrossbow()); break;
                case 4: AddItem(new HeavyCrossbow()); break;
            }
			/*Item Musket2 = new Musket2();
			Musket2.LootType = LootType.Blessed;
			Musket2.Movable = false;
			AddItem( Musket2 );
			
			switch ( Utility.Random( 1 )) 
			{ 
				case 0: PackItem( new ClothingBlessDeed() ); 
				break;
				}*/	
		}
        public FamousPiratesThief()
            : base(AIType.AI_Thief, FightMode.Closest, 15, 1, 0.2, 0.6)
        {
            // A FamousPirates Hybrid Thief
            int Hue = 2075;

            // Skills and Stats
            this.InitStats(205, 205, 205);
            this.Skills[SkillName.Healing].Base = 150;
            this.Skills[SkillName.Anatomy].Base = 150;
            this.Skills[SkillName.Stealing].Base = 150;
            this.Skills[SkillName.ArmsLore].Base = 100;
            this.Skills[SkillName.Meditation].Base = 150;
            this.Skills[SkillName.Wrestling].Base = 150;

            // Name
            this.Name = "Cutler Beckettt";

            // Equip
            Spellbook book = FullSpellbook();
            AddItem(book);

            LeatherArms lea = new LeatherArms();
            lea.Movable = false;
            lea.LootType = LootType.Regular;
            lea.Crafter = this;
            lea.Quality = ArmorQuality.Exceptional;
            AddItem(lea);

            LeatherChest lec = new LeatherChest();
            lec.Movable = false;
            lec.LootType = LootType.Regular;
            lec.Crafter = this;
            lec.Quality = ArmorQuality.Exceptional;
            AddItem(lec);

            LeatherGorget leg = new LeatherGorget();
            leg.Movable = false;
            leg.LootType = LootType.Regular;
            leg.Crafter = this;
            leg.Quality = ArmorQuality.Exceptional;
            AddItem(leg);

            LeatherLegs lel = new LeatherLegs();
            lel.Movable = false;
            lel.LootType = LootType.Regular;
            lel.Crafter = this;
            lel.Quality = ArmorQuality.Exceptional;
            AddItem(lel);

            Boots snd = new Boots();
			snd.Movable = false;
            snd.Hue = Hue;
            snd.LootType = LootType.Regular;
            AddItem(snd);

            TricorneHat tch = new TricorneHat();
            tch.Movable = false;
            tch.Hue = Hue;
            AddItem(tch);

             Kilt Klt = new Kilt();
			 Klt.Movable = false;
             Klt.Hue = Hue;
            AddItem(Klt);

            Bandage band = new Bandage(50);
            AddToBackpack(band);

        }
Esempio n. 12
0
 private TricorneHat CaptainsHat()
 {
     // black captain's hat
     TricorneHat hat = new TricorneHat();
     hat.Name = "a pirate hat";
     hat.Hue = 0x01;
     hat.Dyable = false;
     return hat;
 }
Esempio n. 13
0
        public PirateCaptain(BaseGalleon galleon)
            : base(galleon, AIType.AI_Melee, FightMode.Weakest, 25, 1, .2, .4)
        {
            PickRandomName();

            if(m_PirateName > 0 && (m_PirateName == 1116679 || m_PirateName == 1116680 || m_PirateName == 1116683))
                Female = true;

            SpeechHue = Utility.RandomDyedHue();
            Title = "the dread pirate";
            Hue = Race.RandomSkinHue();

            Body = Female ? 0x191 : 0x190;

            AddItem(new ShortPants(Utility.RandomNeutralHue()));

            SetStr(500, 750);
            SetDex(125, 175);
            SetInt(61, 75);

            SetHits(4500, 5000);

            SetDamage(23, 35);

            SetSkill(SkillName.Fencing, 115.0, 120.0);
            SetSkill(SkillName.Macing, 115.0, 120.0);
            SetSkill(SkillName.MagicResist, 115.0, 120.0);
            SetSkill(SkillName.Swords, 115.0, 120.0);
            SetSkill(SkillName.Tactics, 115.0, 120.0);
            SetSkill(SkillName.Wrestling, 115.0, 120.0);
            SetSkill(SkillName.Anatomy, 115.0, 120.0);

            Item hat;
            Item fancyShirt = new FancyShirt();
            Item shirt = new Shirt(GetRandomShirtHue());
            shirt.Layer = Layer.OuterTorso;

            if (Utility.RandomBool())
                hat = new Bandana();
            else
                hat = new TricorneHat();

            hat.Hue = Utility.RandomNeutralHue();

            AddItem(new Boots());
            AddItem(shirt);
            AddItem(fancyShirt);
            AddItem(hat);
            AddItem(new Cloak(Utility.RandomNeutralHue()));

            switch (Utility.Random(7))
            {
                case 0: AddItem(new Longsword()); break;
                case 1: AddItem(new Cutlass()); break;
                case 2: AddItem(new Broadsword()); break;
                case 5: AddItem(new Dagger()); break;
            }

            Utility.AssignRandomHair(this);

            Fame = 22000;
            Karma = -22000;
        }
        public FamousPiratesFence()
            : base(AIType.AI_Melee, FightMode.Closest, 15, 1, 0.2, 0.6)
        {
            // A FamousPirates Fencer
            int Hue = 2075;

            // Skills and Stats
            this.InitStats(450, 250, 410);
            this.Skills[SkillName.Fencing].Base = 150;
            this.Skills[SkillName.Anatomy].Base = 150;
            this.Skills[SkillName.Stealing].Base = 150;
            this.Skills[SkillName.Tactics].Base = 150;

            // Name
            this.Name = "Joshamee Gibbs";

            // Equip
            Spear ssp = new Spear();
            ssp.Movable = true;
            ssp.Crafter = this;
            ssp.Quality = WeaponQuality.Exceptional;
            AddItem(ssp);

            Sandals snd = new Sandals();
			snd.Movable = false;
            snd.Hue = Hue;
            snd.LootType = LootType.Regular;
            AddItem(snd);

            ChainChest cht = new ChainChest();
            cht.Movable = false;
            cht.LootType = LootType.Regular;
            cht.Crafter = this;
            cht.Quality = ArmorQuality.Exceptional;
            AddItem(cht);

            ChainLegs chl = new ChainLegs();
            chl.Movable = false;
            chl.LootType = LootType.Regular;
            chl.Crafter = this;
            chl.Quality = ArmorQuality.Exceptional;
            AddItem(chl);

            PlateArms pla = new PlateArms();
            pla.Movable = false;
            pla.LootType = LootType.Regular;
            pla.Crafter = this;
            pla.Quality = ArmorQuality.Exceptional;
            AddItem(pla);


            TricorneHat tch = new TricorneHat();
            tch.Movable = false;
            tch.Hue = Hue;
            AddItem(tch);

            Bandage band = new Bandage(20);
            AddToBackpack(band);
        }
        /// <summary>
        /// This is the function gives weaponry to players.
        /// </summary>
        private static void ArmPlayer(CTFPlayerGameData pgd)
        {
            Mobile m = pgd.Mob;

            if (!m.Alive)
                m.Resurrect();

            for (int i = m.Items.Count - 1; i >= 0; --i)
            {
                Item item = (Item)m.Items[i];
                if (item.Layer == Layer.OuterTorso)
                {
                    item.Delete();
                    break;
                }
            }

            List<Item> armthis = new List<Item>();

            if(GiveRobe)
                armthis.Add(new CTFRobe(pgd.Team));

            Item rankedCloth = null;
            CTFTeam team = pgd.Team;

            // 21 Ranks
            switch (CTFData.GetRank(m))
            {
                default:
                case 0: rankedCloth = new JesterHat(team.Hue); break;
                case 1: rankedCloth = new TallStrawHat(team.Hue); break;
                case 2: rankedCloth = new FloppyHat(team.Hue); break;
                case 3: rankedCloth = new WideBrimHat(team.Hue); break;
                case 4: rankedCloth = new Cap(team.Hue); break;
                case 5: rankedCloth = new SkullCap(team.Hue); break;
                case 6: rankedCloth = new FlowerGarland(team.Hue); break;
                case 7: rankedCloth = new StrawHat(team.Hue); break;
                case 8: rankedCloth = new FeatheredHat(team.Hue); break;
                case 9: rankedCloth = new TricorneHat(team.Hue); break;
                case 10: rankedCloth = new TribalMask(team.Hue); break;
                case 11: rankedCloth = new HornedTribalMask(team.Hue); break;
                case 12: rankedCloth = new BearMask(team.Hue); break;
                case 13: rankedCloth = new DeerMask(team.Hue); break;
                case 14: rankedCloth = new OrcishKinMask(team.Hue); break;
                case 15: rankedCloth = new SavageMask(team.Hue); break;
                case 16: rankedCloth = new WizardsHat(team.Hue); break;
                case 17: rankedCloth = new Bandana(team.Hue); break;
                case 18: rankedCloth = new ClothNinjaHood(team.Hue); break;
                case 19: rankedCloth = new Kasa(team.Hue); break;
                case 20:
                    rankedCloth = new BoneHelm();
                    rankedCloth.Hue = team.Hue;
                    ((BaseArmor)rankedCloth).ArmorAttributes.MageArmor = 1;
                    break;
            }
            if (rankedCloth != null)
            {
                rankedCloth.Movable = false;
                armthis.Add(rankedCloth);
            }

            //Alchemy removed by Blady
            /* 			if (m.Skills[SkillName.Alchemy].Value >= (m_MinSupplySkill + 15)) //80 Alchemy req - by Blady
            {
                for (int i = 0; i < 6; i++) //Amount reduced to 6 by Blady - used to be 10
                {
                    armthis.Add(new ExplosionPotion());
                    armthis.Add(new GreaterHealPotion());
                    armthis.Add(new GreaterCurePotion());
                    armthis.Add(new GreaterAgilityPotion());
                    armthis.Add(new RefreshPotion());
                    armthis.Add(new GreaterStrengthPotion());
                }
            } */

            if (m.Skills[SkillName.Chivalry].Value >= m_MinSupplySkill)
            {
                BookOfChivalry book = new BookOfChivalry();
                book.Content = 1023;//all spells
                armthis.Add(book);
            }

            if (m.Skills[SkillName.Necromancy].Value >= m_MinSupplySkill)
            {
                NecromancerSpellbook book = new NecromancerSpellbook();
                book.Content = 0x1FFFF;
                armthis.Add(book);
            }

            if (m.Skills[SkillName.Magery].Value >= m_MinSupplySkill)
            {
                GnarledStaff gs = new GnarledStaff();
                gs.Attributes.SpellChanneling = 1;
                gs.WeaponAttributes.MageWeapon = 20;
                armthis.Add(gs);

                Spellbook book = new Spellbook();
                book.Content = ulong.MaxValue;
                armthis.Add(book);
            }

            if (m.Skills[SkillName.Healing].Value >= m_MinSupplySkill)
                armthis.Add(new Bandage(1000));

            if (m.Skills[SkillName.Fencing].Value >= m_MinSupplySkill)
            {
                Spear sp = new Spear();
                sp.Attributes.SpellChanneling = 1;
                armthis.Add(sp);

                ShortSpear ssp = new ShortSpear();
                ssp.Attributes.SpellChanneling = 1;
                armthis.Add(ssp);

                WarFork wf = new WarFork();
                wf.Attributes.SpellChanneling = 1;
                armthis.Add(wf);

                Kryss k = new Kryss();
                k.Attributes.SpellChanneling = 1;
                armthis.Add(k);
            }

            if (m.Skills[SkillName.Swords].Value >= m_MinSupplySkill)
            {
                if (m.Skills[SkillName.Lumberjacking].Value >= m_MinSupplySkill)
                {
                    ExecutionersAxe ea = new ExecutionersAxe();
                    ea.Attributes.SpellChanneling = 1;
                    armthis.Add(ea);
                }

                Katana k = new Katana();
                k.Attributes.SpellChanneling = 1;
                armthis.Add(k);

                Longsword ls = new Longsword();
                ls.Attributes.SpellChanneling = 1;
                armthis.Add(ls);

                Cleaver c = new Cleaver();
                c.Attributes.SpellChanneling = 1;
                armthis.Add(c);

                BoneHarvester bh = new BoneHarvester();
                bh.Attributes.SpellChanneling = 1;
                armthis.Add(bh);
            }

            if (m.Skills[SkillName.Macing].Value >= m_MinSupplySkill)
            {
                WarAxe wa = new WarAxe();
                wa.Attributes.SpellChanneling = 1;
                armthis.Add(wa);

                HammerPick hp = new HammerPick();
                hp.Attributes.SpellChanneling = 1;
                armthis.Add(hp);

                QuarterStaff qs = new QuarterStaff();
                qs.Attributes.SpellChanneling = 1;
                armthis.Add(qs);
            }

            if (m.Skills[SkillName.Archery].Value >= m_MinSupplySkill)
            {
                Bow b = new Bow();
                b.Attributes.SpellChanneling = 1;
                armthis.Add(b);

                Crossbow xb = new Crossbow();
                xb.Attributes.SpellChanneling = 1;
                armthis.Add(xb);

                CompositeBow cb = new CompositeBow();
                cb.Attributes.SpellChanneling = 1;
                armthis.Add(cb);

                armthis.Add(new Arrow(150));
                armthis.Add(new Bolt(150));
            }

            if (m.Skills[SkillName.Poisoning].Value >= m_MinSupplySkill)
            {
                for (int i = 0; i < 2; i++)
                    armthis.Add(new GreaterPoisonPotion());
            }

            if (m.Skills[SkillName.Parry].Value >= m_MinSupplySkill)
            {
                MetalKiteShield ks = new MetalKiteShield();
                ks.Attributes.SpellChanneling = 1;
                armthis.Add(ks);
            }

            SunnySystem.ArmPlayer(m, armthis);
        }
        public FamousPiratesStun()
            : base(AIType.AI_Mage, FightMode.Closest, 15, 1, 0.2, 0.6)
        {

            // A FamousPirates Stun Mage
            int Hue = 2075;

            // Skills and Stats
            this.InitStats(210, 210, 250);
            this.Skills[SkillName.Magery].Base = 100;
            this.Skills[SkillName.EvalInt].Base = 150;
            this.Skills[SkillName.Anatomy].Base = 80;
            this.Skills[SkillName.Wrestling].Base = 80;
            this.Skills[SkillName.Meditation].Base = 100;
            this.Skills[SkillName.Poisoning].Base = 100;


            // Name
            this.Name = "William Turner";

            // Equip
            Spellbook book = FullSpellbook();
            AddItem(book);

            LeatherArms lea = new LeatherArms();
            lea.Movable = false;
            lea.LootType = LootType.Regular;
            lea.Crafter = this;
            lea.Quality = ArmorQuality.Exceptional;
            AddItem(lea);

            LeatherChest lec = new LeatherChest();
            lec.Movable = false;
            lec.LootType = LootType.Regular;
            lec.Crafter = this;
            lec.Quality = ArmorQuality.Exceptional;
            AddItem(lec);

            LeatherGorget leg = new LeatherGorget();
            leg.Movable = false;
            leg.LootType = LootType.Regular;
            leg.Crafter = this;
            leg.Quality = ArmorQuality.Exceptional;
            AddItem(leg);

            LeatherLegs lel = new LeatherLegs();
            lel.Movable = false;
            lel.LootType = LootType.Regular;
            lel.Crafter = this;
            lel.Quality = ArmorQuality.Exceptional;
            AddItem(lel);

            Boots bts = new Boots();
			bts.Movable = false;
            bts.Hue = Hue;
            AddItem(bts);

            TricorneHat tch = new TricorneHat();
            tch.Movable = false;
            tch.Hue = Hue;
            AddItem(tch);

            // Spells
            AddSpellAttack(typeof(Spells.First.MagicArrowSpell));
            AddSpellAttack(typeof(Spells.First.WeakenSpell));
            AddSpellAttack(typeof(Spells.Sixth.ExplosionSpell));
            AddSpellDefense(typeof(Spells.Third.WallOfStoneSpell));
            AddSpellDefense(typeof(Spells.Fourth.GreaterHealSpell));
        }
        public FamousPiratesSword()
            : base(AIType.AI_Melee, FightMode.Closest, 15, 1, 0.2, 0.6)
        {
            // A FamousPirates Swordsman
            int Hue = 1107;

            // Skills and Stats
            this.InitStats(350, 350, 310);
            this.Skills[SkillName.Swords].Base = 150;
            this.Skills[SkillName.Anatomy].Base = 150;
            this.Skills[SkillName.Healing].Base = 150;
            this.Skills[SkillName.Tactics].Base = 150;
            this.Skills[SkillName.Parry].Base = 150;

            // Name
            this.Name = "Elizabeth Swann";

            // Equip
            Katana kat = new Katana();
            kat.Crafter = this;
            kat.Movable = true;
            kat.Quality = WeaponQuality.Exceptional;
            AddItem(kat);

            Boots bts = new Boots();
			bts.Movable = false;
            bts.Hue = Hue;
            AddItem(bts);

            ChainChest cht = new ChainChest();
            cht.Movable = false;
            cht.LootType = LootType.Regular;
            cht.Crafter = this;
            cht.Quality = ArmorQuality.Exceptional;
            AddItem(cht);

            ChainLegs chl = new ChainLegs();
            chl.Movable = false;
            chl.LootType = LootType.Regular;
            chl.Crafter = this;
            chl.Quality = ArmorQuality.Exceptional;
            AddItem(chl);

            PlateArms pla = new PlateArms();
            pla.Movable = false;
            pla.LootType = LootType.Regular;
            pla.Crafter = this;
            pla.Quality = ArmorQuality.Exceptional;
            AddItem(pla);


            TricorneHat tch = new TricorneHat();
            tch.Movable = false;
            tch.Hue = Hue;
            AddItem(tch);

            FancyShirt fst = new FancyShirt();
            fst.Movable = false;
            fst.Hue = Hue;
            AddItem(fst);

            Skirt srt = new Skirt();
            srt.Movable = false;
            srt.Hue = Hue;
            AddItem(srt);

            Bandage band = new Bandage(50);
            AddToBackpack(band);
        }
Esempio n. 18
0
        public Gambler() : base( AIType.AI_Melee, FightMode.None, 10, 1, 0.8, 3.0 ) 
        {
            SetStr( 10, 30 );
            SetDex( 10, 30 );
            SetInt( 10, 30 );
            Fame = 50;
            Karma = 50;
            SpeechHue = Utility.RandomDyedHue();
            Title = "the gambler";
            Hue = Utility.RandomSkinHue();
            Blessed = true;
            NameHue = 0x35;

            if ( this.Female = Utility.RandomBool() )
            {
                this.Body = 0x191;
                this.Name = NameList.RandomName( "female" );
                Item hair = new Item( Utility.RandomList( 0x203B, 0x203C, 0x203D, 0x2045, 0x204A, 0x2046 , 0x2049 ) );
                hair.Hue = Utility.RandomHairHue();
                hair.Layer = Layer.Hair;
                hair.Movable = false;
                AddItem( hair );
                Item hat = null;
                switch ( Utility.Random( 5 ) )
                {
                    case 0: hat = new FloppyHat( Utility.RandomNeutralHue() );		break;
                    case 1: hat = new FeatheredHat( Utility.RandomNeutralHue() );	break;
                    case 2: hat = new Bonnet();						break;
                    case 3: hat = new Cap( Utility.RandomNeutralHue() );		break;
                }
	    	AddItem( hat );
            }
            else
            {
                this.Body = 0x190;
                this.Name = NameList.RandomName( "male" );
                Item hair = new Item( Utility.RandomList( 0x203B, 0x203C, 0x203D, 0x2044, 0x2045, 0x2047, 0x2048 ) );
                hair.Hue = Utility.RandomHairHue();
                hair.Layer = Layer.Hair;
                hair.Movable = false;
                AddItem( hair );
                Item beard = new Item( Utility.RandomList( 0x0000, 0x203E, 0x203F, 0x2040, 0x2041, 0x2067, 0x2068, 0x2069 ) );
                beard.Hue = hair.Hue;
                beard.Layer = Layer.FacialHair;
                beard.Movable = false;
                AddItem( beard );
                Item hat = null;
                switch ( Utility.Random( 7 ) )
                {
                    case 0: hat = new SkullCap( GetRandomHue() );			break;
                    case 1: hat = new Bandana( GetRandomHue() );			break;
                    case 2: hat = new WideBrimHat();					break;
                    case 3: hat = new TallStrawHat( Utility.RandomNeutralHue() );	break;
                    case 4: hat = new StrawHat( Utility.RandomNeutralHue() );		break;
                    case 5: hat = new TricorneHat( Utility.RandomNeutralHue() );	break;
                }
	    	AddItem( hat );
	    }
            AddItem( new LongPants( GetRandomHue() ) );
            AddItem( new FancyShirt( GetRandomHue() ) );
            AddItem( new Boots( Utility.RandomNeutralHue() ) );
            AddItem( new Cloak( GetRandomHue() ) );
            AddItem( new BodySash( GetRandomHue() ) );

            Container pack = new Backpack();

            pack.DropItem( new Gold( 5, 500 ) );

            pack.Movable = false;
	    pack.Visible = false;

            AddItem( pack );

	    //reset stats
	    for ( int i = 0; i <= 5; ++i )
		gamestats[i]=0;
        }
        public FamousPiratesAssassin()
            : base(AIType.AI_Melee, FightMode.Closest, 15, 1, 0.2, 0.6)
        {
            // A FamousPirates Hybrid Assassin
            int Hue = 2075;

            // Skills and Stats
            this.InitStats(305, 305, 305);
            this.Skills[SkillName.Magery].Base = 150;
            this.Skills[SkillName.EvalInt].Base = 150;
            this.Skills[SkillName.Swords].Base = 150;
            this.Skills[SkillName.Tactics].Base = 150;
            this.Skills[SkillName.Meditation].Base = 150;
            this.Skills[SkillName.Poisoning].Base = 100;

            // Name
            this.Name = "BootStrap Bill Turner";

            // Equip
            Spellbook book = FullSpellbook();
            AddToBackpack(book);

            Katana kat = new Katana();
            kat.Movable = false;
            kat.LootType = LootType.Regular;
            kat.Crafter = this;
            kat.Poison = Poison.Deadly;
            kat.PoisonCharges = 30;
            kat.Quality = WeaponQuality.Exceptional;
            AddToBackpack(kat);

            LeatherArms lea = new LeatherArms();
            lea.Movable = false;
            lea.LootType = LootType.Regular;
            lea.Crafter = this;
            lea.Quality = ArmorQuality.Exceptional;
            AddItem(lea);

            LeatherChest lec = new LeatherChest();
            lec.Movable = false;
            lec.LootType = LootType.Regular;
            lec.Crafter = this;
            lec.Quality = ArmorQuality.Exceptional;
            AddItem(lec);

            LeatherGorget leg = new LeatherGorget();
            leg.Movable = false;
            leg.LootType = LootType.Regular;
            leg.Crafter = this;
            leg.Quality = ArmorQuality.Exceptional;
            AddItem(leg);

            LeatherLegs lel = new LeatherLegs();
            lel.Movable = false;
            lel.LootType = LootType.Regular;
            lel.Crafter = this;
            lel.Quality = ArmorQuality.Exceptional;
            AddItem(lel);

            Boots snd = new Boots();
			snd.Movable = false;
            snd.Hue = Hue;
            snd.LootType = LootType.Regular;
            AddItem(snd);

            TricorneHat tch = new TricorneHat();
            tch.Movable = false;
            tch.Hue = Hue;
            AddItem(tch);

            DeadlyPoisonPotion pota = new DeadlyPoisonPotion();
            pota.LootType = LootType.Regular;
            AddToBackpack(pota);

            DeadlyPoisonPotion potb = new DeadlyPoisonPotion();
            potb.LootType = LootType.Regular;
            AddToBackpack(potb);

            DeadlyPoisonPotion potc = new DeadlyPoisonPotion();
            potc.LootType = LootType.Regular;
            AddToBackpack(potc);

            DeadlyPoisonPotion potd = new DeadlyPoisonPotion();
            potd.LootType = LootType.Regular;
            AddToBackpack(potd);

            Bandage band = new Bandage(50);
            AddToBackpack(band);

        }
Esempio n. 20
0
        public override Item Construct(Type type, Mobile from, Item tool)
        {
            // Searing Weapon Support
            if (type == typeof(BaseWeapon))
                return null;

            if (type == typeof(TreasureMap))
            {
                int level;
                if (from is PlayerMobile && ((PlayerMobile)from).Young && from.Map == Map.Trammel && TreasureMap.IsInHavenIsland(from))
                    level = 0;
                else
                    level = 1;

                return new TreasureMap(level, from.Map == Map.Felucca ? Map.Felucca : Map.Trammel);
            }
            else if (type == typeof(MessageInABottle))
            {
                return new MessageInABottle(from.Map == Map.Felucca ? Map.Felucca : Map.Trammel);
            }
            else if (type == typeof(WhitePearl))
            {
                return new WhitePearl();
            }

            Container pack = from.Backpack;

            if (pack != null)
            {
                List<SOS> messages = pack.FindItemsByType<SOS>();

                for (int i = 0; i < messages.Count; ++i)
                {
                    SOS sos = messages[i];

                    if ((from.Map == Map.Felucca || from.Map == Map.Trammel) && from.InRange(sos.TargetLocation, 60))
                    {
                        Item preLoot = null;
                        bool dredge = HasTypeHook(tool, HookType.Dredging);

                        switch (Utility.Random(Core.HS ? 17 : 16))
                        {
                            case 0: // Body parts
                            case 1:
                                {
                                    int[] list = new int[]
                                    {
                                        0x1CDD, 0x1CE5, // arm
                                        0x1CE0, 0x1CE8, // torso
                                        0x1CE1, 0x1CE9, // head
                                        0x1CE2, 0x1CEC // leg
                                    };

                                    preLoot = new ShipwreckedItem(Utility.RandomList(list), dredge);
                                    break;
                                }
                            case 2: // Bone parts
                            case 3:
                                {
                                    int[] list = new int[]
                                    {
                                        0x1AE0, 0x1AE1, 0x1AE2, 0x1AE3, 0x1AE4, // skulls
                                        0x1B09, 0x1B0A, 0x1B0B, 0x1B0C, 0x1B0D, 0x1B0E, 0x1B0F, 0x1B10, // bone piles
                                        0x1B15, 0x1B16 // pelvis bones
                                    };

                                    preLoot = new ShipwreckedItem(Utility.RandomList(list), dredge);
                                    break;
                                }
                            case 4: // Paintings and portraits
                            case 5:
                                {
                                    preLoot = new ShipwreckedItem(Utility.Random(0xE9F, 10), dredge);
                                    break;
                                }
                            case 6: // Pillows
                            case 7:
                                {
                                    preLoot = new ShipwreckedItem(Utility.Random(0x13A4, 11), dredge);
                                    break;
                                }
                            case 8: // Shells
                            case 9:
                                {
                                    preLoot = new ShipwreckedItem(Utility.Random(0xFC4, 9), dredge);
                                    break;
                                }
                            case 10: //Hats
                            case 11:
                                {
                                    if (Utility.RandomBool())
                                        preLoot = new SkullCap();
                                    else
                                        preLoot = new TricorneHat();

                                    break;
                                }
                            case 12: // Misc
                            case 13:
                                {
                                    int[] list = new int[]
                                    {
                                        0x1EB5, // unfinished barrel
                                        0xA2A, // stool
                                        0xC1F, // broken clock
                                        0x1047, 0x1048, // globe
                                        0x1EB1, 0x1EB2, 0x1EB3, 0x1EB4 // barrel staves
                                    };

                                    if (Utility.Random(list.Length + 1) == 0)
                                        preLoot = new Candelabra();
                                    else
                                        preLoot = new ShipwreckedItem(Utility.RandomList(list), dredge);

                                    break;
                                }
                            #region High Seas
                            case 14:
                                {
                                    int[] list = new int[]
                                    {
                                        0x1E19, 0x1E1A, 0x1E1B, //Fish heads
                                        0x1E2A, 0x1E2B,         //Ores
                                        0x1E71, 0x1E7A,         //Unfinished drawers
                                        0x1E75,                 //Unfinished legs
                                    };

                                    double ran = Utility.RandomDouble();

                                    if (ran < 0.05)
                                        preLoot = new YellowPolkaDotBikini();
                                    else if (ran < 0.25)
                                        preLoot = new ShipwreckedItem(list[Utility.RandomMinMax(3, 7)], dredge);
                                    else
                                        preLoot = new Item(list[Utility.Random(3)]);
                                    break;
                                }
                            #endregion
                        }

                        if (preLoot != null)
                        {
                            if (preLoot is IShipwreckedItem)
                                ((IShipwreckedItem)preLoot).IsShipwreckedItem = true;

                            return preLoot;
                        }

                        LockableContainer chest;
						
                        if (Utility.RandomBool())
                            chest = new MetalGoldenChest();
                        else
                            chest = new WoodenChest();

                        if (sos.IsAncient)
                            chest.Hue = 0x481;

                        TreasureMapChest.Fill(chest, from.Luck, Math.Max(1, Math.Min(4, sos.Level)), true, from.Map);

                        if (sos.IsAncient)
                            chest.DropItem(new FabledFishingNet());
                        else
                            chest.DropItem(new SpecialFishingNet());

                        chest.Movable = true;
                        chest.Locked = false;
                        chest.TrapType = TrapType.None;
                        chest.TrapPower = 0;
                        chest.TrapLevel = 0;

                        sos.Delete();

                        return chest;
                    }
                }
            }

            return base.Construct(type, from, tool);
        }
Esempio n. 21
0
		public override Item Construct(Type type, Mobile from)
		{
			if (type == typeof(TreasureMap))
			{
				int level;
				//if ( from is PlayerMobile && ((PlayerMobile)from).Young && from.Map == Map.Trammel && TreasureMap.IsInHavenIsland( from ) )
				//	level = 0;
				//else
				level = 1;

				return new TreasureMap(level, Map.Felucca);
			}
			else if (type == typeof(MessageInABottle))
			{
				return new MessageInABottle( /*from.Map == Map.Felucca ?*/ Map.Felucca /* : Map.Trammel*/);
			}

			Container pack = from.Backpack;

			if (pack != null)
			{
				List<SOS> messages = pack.FindItemsByType<SOS>();

				for (int i = 0; i < messages.Count; ++i)
				{
					SOS sos = messages[i];

					if (from.Map == sos.TargetMap &&
						from.InRange(sos.TargetLocation, (int)(from.Skills[SkillName.Fishing].Value - 75.0)))
					{
						Item preLoot = null;

						switch (Utility.Random(8))
						{
							case 0: // Body parts
								{
									var list = new[]
									{
										0x1CDD, 0x1CE5, // arm
										0x1CE0, 0x1CE8, // torso
										0x1CE1, 0x1CE9, // head
										0x1CE2, 0x1CEC // leg
									};

									preLoot = new ShipwreckedItem(Utility.RandomList(list));
									break;
								}
							case 1: // Bone parts
								{
									var list = new[]
									{
										0x1AE0, 0x1AE1, 0x1AE2, 0x1AE3, 0x1AE4, // skulls
										0x1B09, 0x1B0A, 0x1B0B, 0x1B0C, 0x1B0D, 0x1B0E, 0x1B0F, 0x1B10, // bone piles
										0x1B15, 0x1B16 // pelvis bones
									};

									preLoot = new ShipwreckedItem(Utility.RandomList(list));
									break;
								}
							case 2: // Paintings and portraits
								{
									preLoot = new ShipwreckedItem(Utility.Random(0xE9F, 10));
									break;
								}
							case 3: // Pillows
								{
									preLoot = new ShipwreckedItem(Utility.Random(0x13A4, 11));
									break;
								}
							case 4: // Shells
								{
									preLoot = new ShipwreckedItem(Utility.Random(0xFC4, 9));
									break;
								}
							case 5: //Hats
								{
									if (Utility.RandomBool())
									{
										preLoot = new SkullCap();
									}
									else
									{
										preLoot = new TricorneHat();
									}

									break;
								}
							case 6: // Misc
								{
									var list = new[]
									{
										0x1EB5, // unfinished barrel
										0xA2A, // stool
										0xC1F, // broken clock
										0x1047, 0x1048, // globe
										0x1EB1, 0x1EB2, 0x1EB3, 0x1EB4 // barrel staves
									};

									if (Utility.Random(list.Length + 1) == 0)
									{
										preLoot = new Candelabra();
									}
									else
									{
										preLoot = new ShipwreckedItem(Utility.RandomList(list));
									}

									break;
								}
						}

						if (preLoot != null)
						{
							if (preLoot is IShipwreckedItem)
							{
								((IShipwreckedItem)preLoot).IsShipwreckedItem = true;
							}

							return preLoot;
						}

						LockableContainer chest = null;

						switch (Utility.Random(3))
						{
							case 0:
								chest = new MetalGoldenChest();
								break;
							case 1:
								chest = new MetalChest();
								break;
							default:
							case 2:
								chest = new WoodenChest();
								break;
						}
						chest.Breakable = false;
						chest.Locked = false;

						if (sos.IsAncient)
						{
							int hue = 1150;

							if (0.20 > Utility.RandomDouble())
							{
								switch (Utility.Random((chest is WoodenChest) ? 6 : 14))
								{
									case 0:
										hue = 1193;
										break;
									case 1:
										hue = 1281;
										break;
									case 2:
										hue = 1190;
										break;
									case 3:
										hue = 1165;
										break;
									case 4:
										hue = 1160;
										break;
									case 5:
										hue = 1126;
										break;
									case 6:
										hue = CraftResources.GetInfo(CraftResource.Valorite).Hue;
										break;
									case 7:
										hue = CraftResources.GetInfo(CraftResource.Verite).Hue;
										break;
									case 8:
										hue = CraftResources.GetInfo(CraftResource.Agapite).Hue;
										break;
									case 9:
										hue = CraftResources.GetInfo(CraftResource.Gold).Hue;
										break;
									case 10:
										hue = CraftResources.GetInfo(CraftResource.Bronze).Hue;
										break;
									case 11:
										hue = CraftResources.GetInfo(CraftResource.Copper).Hue;
										break;
									case 12:
										hue = CraftResources.GetInfo(CraftResource.ShadowIron).Hue;
										break;
									case 13:
										hue = CraftResources.GetInfo(CraftResource.DullCopper).Hue;
										break;
								}
							}

							chest.Hue = hue;
						}
						else if ((chest is MetalChest || chest is MetalGoldenChest) && (0.5 * sos.Level) >= Utility.RandomDouble())
						{
							int randhue = Utility.Random(120);
							var resource = CraftResource.None;

							if (randhue >= 118)
							{
								resource = CraftResource.Valorite;
							}
							else if (randhue >= 115)
							{
								resource = CraftResource.Verite;
							}
							else if (randhue >= 110)
							{
								resource = CraftResource.Agapite;
							}
							else if (randhue >= 100)
							{
								resource = CraftResource.Gold;
							}
							else if (randhue >= 90)
							{
								resource = CraftResource.Bronze;
							}
							else if (randhue >= 70)
							{
								resource = CraftResource.Copper;
							}
							else if (randhue >= 40)
							{
								resource = CraftResource.ShadowIron;
							}
							else
							{
								resource = CraftResource.DullCopper;
							}

							chest.Hue = CraftResources.GetInfo(resource).Hue;
						}

						int soslevel = sos.Level;

						TreasureMapChest.Fill(chest, soslevel, from.Expansion);

						if (!sos.IsAncient)
						{
							chest.Locked = false;
						}

						double chance = Utility.RandomDouble();
						BaseCreature mibmonster1;
						BaseCreature mibmonster2;
						mibmonster1 = new DeepWaterElemental();
						if (chance <= 0.02 && from.Skills[SkillName.Fishing].Base >= 115)
						{
							mibmonster2 = new Osiredon();
							int choice = Utility.Random(5);
							switch (choice)
							{
								case 4:
									mibmonster2.PackItem(new SmallFishingNetDeed());
									break;
								case 3:
									mibmonster2.PackItem(new LargeFishingNetDeed());
									break;
								case 2:
									mibmonster2.PackItem(new Shell());
									break;
								case 1:
									mibmonster2.PackItem(new Anchor());
									break;
								case 0:
									mibmonster2.PackItem(new Hook());
									break;
							}
						}
						else if (soslevel < 5)
						{
							mibmonster2 = new WaterElemental();
						}
						else
						{
							mibmonster2 = new DeepWaterElemental();
						}
						int x = from.X, y = from.Y;

						Map map = from.Map;

						mibmonster1.MoveToWorld(new Point3D(x, y, -5), map);
						mibmonster2.MoveToWorld(new Point3D(x, y, -5), map);

						mibmonster1.Home = mibmonster1.Location;
						mibmonster1.HomeMap = mibmonster1.Map;
						mibmonster1.RangeHome = 10;

						mibmonster2.Home = mibmonster2.Location;
						mibmonster2.HomeMap = mibmonster2.Map;
						mibmonster2.RangeHome = 10;

						if (sos.IsAncient)
						{
							chest.DropItem(new FabledFishingNet());
						}
						else
						{
							chest.DropItem(new SpecialFishingNet());
						}

						chest.Movable = true;
						chest.Name = "treasure chest";
						chest.IsShipwreckedItem = true;

						if (sos.Level > 0)
						{
							chest.TrapType = TrapType.ExplosionTrap;
							chest.TrapPower = soslevel * Utility.RandomMinMax(9, 19);
							chest.TrapLevel = 0;
						}
						else
						{
							chest.TrapType = TrapType.None;
							chest.TrapPower = 1;
							chest.TrapLevel = 1;
						}

						sos.Delete();

						return chest;
					}
				}
			}

			return base.Construct(type, from);
		}
        public TownChestClothier() : base(0xE43)
        {
            Name    = "a metal chest -5-";
            Movable = true;
            Weight  = 1000.0;

            Hue = 83;

            TrapPower = 0;
            Locked    = true;

            RequiredSkill = 5;
            LockLevel     = 5;
            MaxLockLevel  = 10;

            // Gold
            if (Utility.RandomDouble() < 0.25)
            {
                DropItem(new Gold(Utility.Random(1, 25)));
            }

            // Supplies

            if (Utility.RandomDouble() < 0.20)
            {
                DropItem(new Cotton(Utility.Random(25, 50)));
            }

            if (Utility.RandomDouble() < 0.20)
            {
                DropItem(new Wool(Utility.Random(25, 50)));
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new DarkYarn(Utility.Random(25, 50)));
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new LightYarn(Utility.Random(25, 50)));
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new LightYarnUnraveled(Utility.Random(25, 50)));
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new SpoolOfThread(Utility.Random(25, 50)));
            }

            if (Utility.RandomDouble() < 0.20)
            {
                DropItem(new BoltOfCloth(Utility.Random(20, 45)));
            }

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Dyes());
            }

            if (Utility.RandomDouble() < 0.25)
            {
                DropItem(new Leather(Utility.Random(15, 35)));
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseHat hat = Loot.RandomHat(true);
                switch (Utility.Random(5))
                {
                case 0: hat = new Bandana(); break;

                case 1: hat = new Bonnet(); break;

                case 2: hat = new FeatheredHat(); break;

                case 3: hat = new FloppyHat(); break;

                default: hat = new TricorneHat(); break;
                }

                BaseRunicTool.ApplyAttributesTo(hat, 3, 15, 20);

                DropItem(hat);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseClothing clothing = Loot.RandomClothing(true);
                BaseRunicTool.ApplyAttributesTo(clothing, 3, 15, 20);

                DropItem(clothing);
            }
        }
Esempio n. 23
0
        public UndeadBlackBart()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.175, 0.2)
        {
            Body = 400;
            Team = 1;
            Kills = 10;
            Hue = Utility.RandomSkinHue();
            SpeechHue = 1153;
            this.Body = 0x190;
            Name = NameList.RandomName( "Male" );
                    SetStr( 100 );
            SetDex( 100 );
            SetInt( 20 );

            SetSkill( SkillName.Archery, 100.0 );
            SetSkill( SkillName.MagicResist, 100.0 );
            SetSkill( SkillName.Tactics, 100.0 );
            SetSkill( SkillName.Healing, 100.0 );
            SetSkill( SkillName.Anatomy, 100.0 );
            SetSkill(SkillName.Swords, 100.0);
            SetSkill(SkillName.Hiding, 120.0, 180.0);
            SetSkill(SkillName.Stealth, 120.0, 180.0);

            Fame = 4500;
            Karma = -4500;

            VirtualArmor = 0;

            Item hair = new LongHair();
            hair.Hue = 1175;
            hair.Layer = Layer.Hair;
            hair.Movable = false;
            AddItem( hair );
            Item beard = new MediumLongBeard();
            beard.Hue = 1175;
            beard.Layer = Layer.FacialHair;
            beard.Movable = false;
            AddItem( beard );
            PackGold( 120, 160 );
            PackItem( new Bandage( 100 ) );

            Item fancyshirt = new FancyShirt();
            EquipItem( fancyshirt );
            Item necklace = new Necklace();
            EquipItem( necklace );
            Item goldring = new GoldRing();
            EquipItem( goldring );
            Item longpants = new LongPants();
            longpants.Hue = Utility.RandomNeutralHue();
            EquipItem( longpants );
            Item boots = new Boots();
            EquipItem( boots );
            Item gloves = new LeatherGloves();
            EquipItem( gloves);
            Item hat = new TricorneHat();
            hat.Hue = 1;
            EquipItem( hat );

            switch ( Utility.Random( 2 ) )
            {
                case 0:
                {
                Item scimitar = new Scimitar();
                EquipItem( scimitar );
                break;
                }
                case 1:
                {
                Item cutlass = new Cutlass();
                EquipItem( cutlass );
                break;
                }
            }
        }
Esempio n. 24
0
        public Commoner5()
            : base(AIType.AI_Melee, FightMode.None, 10, 1, 0.8, 3.0)
        {
            SetStr( 10, 30 );
            SetDex( 10, 30 );
            SetInt( 10, 30 );

            Fame = 50;
            Karma = 50;

            SetSkill( SkillName.Fishing, 60.0, 70.0 );
            SetSkill( SkillName.Cooking, 60.0, 70.0 );

            SpeechHue = Utility.RandomDyedHue();
            Title = string.Empty;//Commoner5.Titles[Utility.Random( 0, Titles.Length )];
            Hue = Utility.RandomSkinHue();
            if ( this.Female = Utility.RandomBool() )
            {
                this.Body = 0x191;
                this.Name = NameList.RandomName( "female" );
                Item hair = new Item( Utility.RandomList( 0x203B, 0x203C, 0x203D, 0x2045, 0x204A, 0x2046 , 0x2049 ) );
                hair.Hue = Utility.RandomHairHue();
                hair.Layer = Layer.Hair;
                hair.Movable = false;
                AddItem( hair );
                Item hat = null;
                switch ( Utility.Random( 5 ) )//4 hats, one empty, for no hat
                {
                    case 0: hat = new FloppyHat( Utility.RandomNeutralHue() );		break;
                    case 1: hat = new FeatheredHat( Utility.RandomNeutralHue() );	break;
                    case 2: hat = new Bonnet();			break;
                    case 3: hat = new Cap( Utility.RandomNeutralHue() );			break;
                }
                AddItem( hat );
                Item pants = null;
                switch ( Utility.Random( 3 ) )
                {
                    case 0: pants = new ShortPants( GetRandomHue() );	break;
                    case 1: pants = new LongPants( GetRandomHue() );	break;
                    case 2: pants = new Skirt( GetRandomHue() );		break;
                }
                AddItem( pants );
                Item shirt = null;
                switch ( Utility.Random( 7 ) )
                {
                    case 0: shirt = new Doublet( GetRandomHue() );		break;
                    case 1: shirt = new Surcoat( GetRandomHue() );		break;
                    case 2: shirt = new Tunic( GetRandomHue() );		break;
                    case 3: shirt = new FancyDress( GetRandomHue() );	break;
                    case 4: shirt = new PlainDress( GetRandomHue() );	break;
                    case 5: shirt = new FancyShirt( GetRandomHue() );	break;
                    case 6: shirt = new Shirt( GetRandomHue() );		break;
                }
                AddItem( shirt );
            }
            else
            {
                this.Body = 0x190;
                this.Name = NameList.RandomName( "male" );
                Item hair = new Item( Utility.RandomList( 0x203B, 0x203C, 0x203D, 0x2044, 0x2045, 0x2047, 0x2048 ) );
                hair.Hue = Utility.RandomHairHue();
                hair.Layer = Layer.Hair;
                hair.Movable = false;
                AddItem( hair );
                Item beard = new Item( Utility.RandomList( 0x0000, 0x203E, 0x203F, 0x2040, 0x2041, 0x2067, 0x2068, 0x2069 ) );
                beard.Hue = hair.Hue;
                beard.Layer = Layer.FacialHair;
                beard.Movable = false;
                AddItem( beard );
                Item hat = null;
                switch ( Utility.Random( 7 ) ) //6 hats, one empty, for no hat
                {
                    case 0: hat = new SkullCap( GetRandomHue() );					break;
                    case 1: hat = new Bandana( GetRandomHue() );					break;
                    case 2: hat = new WideBrimHat();								break;
                    case 3: hat = new TallStrawHat( Utility.RandomNeutralHue() );	break;
                    case 4: hat = new StrawHat( Utility.RandomNeutralHue() );		break;
                    case 5: hat = new TricorneHat( Utility.RandomNeutralHue() );	break;
                }
                AddItem( hat );
                Item pants = null;
                switch ( Utility.Random( 2 ) )
                {
                    case 0: pants = new ShortPants( GetRandomHue() );	break;
                    case 1: pants = new LongPants( GetRandomHue() );	break;
                }
                AddItem( pants );
                Item shirt = null;
                switch ( Utility.Random( 5 ) )
                {
                    case 0: shirt = new Doublet( GetRandomHue() );		break;
                    case 1: shirt = new Surcoat( GetRandomHue() );		break;
                    case 2: shirt = new Tunic( GetRandomHue() );		break;
                    case 3: shirt = new FancyShirt( GetRandomHue() );	break;
                    case 4: shirt = new Shirt( GetRandomHue() );		break;
                }
                AddItem( shirt );
            }

            Item feet = null;
            switch ( Utility.Random( 3 ) )
            {
                case 0: feet = new Boots( Utility.RandomNeutralHue() );	break;
                case 1: feet = new Shoes( Utility.RandomNeutralHue() );	break;
                case 2: feet = new Sandals( Utility.RandomNeutralHue() );		break;
            }
            AddItem( feet );
            Container pack = new Backpack();

            pack.DropItem( new Gold( 0, 50 ) );

            pack.Movable = false;

            AddItem( pack );
        }
Esempio n. 25
0
public FriendlyPlayer() : base( AIType.AI_Melee, FightMode.Closest, 25, 1, 0.4, 0.3 ) 
		{ 
	
			SpeechHue = Utility.RandomDyedHue();

                 switch (Utility.Random(6))
                 {
                         case 0: Title = "[BEC]"; break;
                         case 1: Title = "[COOL]"; break;
                         case 2: Title = "[FUN]"; break;
                         case 3: Title = "[PYR]"; break;
                         case 4: Title = "[FRN]"; break;
                         case 5: Title = "[CRA]"; break;

                 } 
 
       	    SetStr(100, 200);
            SetDex(100, 200);
            SetInt(125, 200);
			ActiveSpeed = 0.2;
			PassiveSpeed = 0;

            SetHits(100, 400);

            SetDamage(10, 19);

            SetDamageType(ResistanceType.Physical, 120);

            SetResistance(ResistanceType.Physical, 40, 80);
            SetResistance(ResistanceType.Fire, 40, 80);
            SetResistance(ResistanceType.Cold, 40, 80);
            SetResistance(ResistanceType.Poison, 40, 80);
            SetResistance(ResistanceType.Energy, 40, 80);

            SetSkill(SkillName.Swords, 79.0, 110.0);
            SetSkill(SkillName.Tactics, 79.0, 110.0);
            SetSkill(SkillName.MagicResist, 79.0, 110.0);
            SetSkill(SkillName.Tactics, 79.0, 110.0);
            SetSkill(SkillName.Parry, 79.0, 110.0);
            SetSkill(SkillName.Anatomy, 70.0, 110.0);
            SetSkill(SkillName.Healing, 70.0, 110.0);

            Fame = 1000;
            Karma = 10000;

            VirtualArmor = 50;

                           	 switch (Utility.Random(4))
                           	 {
                           	 	case 0: AddItem( new Longsword() ); break;
                           	 	case 1: AddItem( new Axe() ); break;
                           	 	case 2: AddItem( new Bardiche() ); break;
                           	 	case 3: AddItem( new Hatchet() ); break;
                            	} 


                           	 switch (Utility.Random(5))
                           	 {
                           	 	case 0: Item cloak = new Cloak();
						cloak.Movable = false;
						cloak.Hue = GetRandomHue();
						AddItem( cloak );
						break;
                           	 	case 1: Item shroud = new HoodedShroudOfShadows();
						shroud.Movable = false;
						shroud.Hue = GetRandomHue();
						AddItem( shroud );
						break;
                           	 	case 2: break;
                           	 	case 3: Item monkrobe = new MonkRobe();
						monkrobe.Movable = false;
						monkrobe.Hue = GetRandomHue();
						AddItem( monkrobe );
						break;
                           	 	case 4: break;
                            	} 


                           	 switch (Utility.Random(4))
                           	 {
                           	 	case 0: AddItem( new LongPants() ); break;
                           	 	case 1: Item LegsOfBane = new LeggingsOfBane();
						LegsOfBane.Hue = GetRandomHue();
                      				LegsOfBane.LootType = LootType.Newbied;
                      				LegsOfBane.Movable = false;
						AddItem( LegsOfBane );
						break;
					case 2: Item ShortPantss = new ShortPants();
						ShortPantss.Hue = GetRandomHue();
                      				ShortPantss.LootType = LootType.Newbied;
                      				ShortPantss.Movable = false;
						AddItem( ShortPantss );
						break;
					case 3: Item PlateLegsv = new PlateLegs();
						PlateLegsv.Hue = GetRandomHue();
                      				PlateLegsv.LootType = LootType.Newbied;
                      				PlateLegsv.Movable = false;
						AddItem( PlateLegsv );
						break;
                            	} 

                           	 switch (Utility.Random(5))
                           	 {
                           	 	case 0:	AddItem( new Boots() ); break;
                           	 	case 1: Item Sandals = new Sandals();
						Sandals.Hue = GetRandomHue();
                        			Sandals.LootType = LootType.Blessed;
                        			Sandals.Movable = false;
						AddItem( Sandals );
						break;
					case 2: Item Bootsv = new Boots();
						Bootsv.Hue = GetRandomHue();
                        			Bootsv.LootType = LootType.Blessed;
                        			Bootsv.Movable = false;
						AddItem( Bootsv );
						break;
					case 3: Item Shoesv = new Shoes();
						Shoesv.Hue = GetRandomHue();
                        			Shoesv.LootType = LootType.Blessed;
                        			Shoesv.Movable = false;
						AddItem( Shoesv );
						break;
					case 4: break;
                            	} 

                           	 switch (Utility.Random(6))
                           	 {
                           	 	case 0:	AddItem( new ClothNinjaHood(  ) ); break;
                           	 	case 1: Item SpiritOfTheTotem = new SpiritOfTheTotem();
						SpiritOfTheTotem.Hue = GetRandomHue();
						SpiritOfTheTotem.Movable = false;
                        			SpiritOfTheTotem.LootType = LootType.Blessed;
						AddItem( SpiritOfTheTotem );
						break;
                           	 	case 2:	Item BoneHelmv = new BoneHelm();
						BoneHelmv.Hue = GetRandomHue();
						BoneHelmv.Movable = false;
                        			BoneHelmv.LootType = LootType.Blessed;
						AddItem( BoneHelmv );
						break;
                           	 	case 3:	Item CloseHelmv = new CloseHelm();
						CloseHelmv.Hue = GetRandomHue();
						CloseHelmv.Movable = false;
                        			CloseHelmv.LootType = LootType.Blessed;
						AddItem( CloseHelmv );
						break;
					case 4: AddItem( new SkullCap( ) );break;
					case 5: Item TricorneHatv = new TricorneHat();
						TricorneHatv.Hue = GetRandomHue();
						TricorneHatv.Movable = false;
                        			TricorneHatv.LootType = LootType.Blessed;
						AddItem( TricorneHatv );
						break;
                            	} 

                           	 switch (Utility.Random(3))
                           	 {
                           	 	case 0:	Item LeatherGlovesv = new LeatherGloves();
						LeatherGlovesv.Hue = GetRandomHue();
						LeatherGlovesv.Movable = false;
                        			LeatherGlovesv.LootType = LootType.Blessed;
						AddItem( LeatherGlovesv );
						break;
                           	 	case 1: Item PlateGlovesv = new PlateGloves();
						PlateGlovesv.Hue = GetRandomHue();
						PlateGlovesv.Movable = false;
                        			PlateGlovesv.LootType = LootType.Blessed;
						AddItem( PlateGlovesv );
						break;
                           	 	case 2: AddItem( new RingmailGloves() ); break;
                            	} 


			
			if ( Female = Utility.RandomBool() ) 
			{ 
				Body = 401; 
				Name = NameList.RandomName( "female" );
			
				
			}
			else 
			{ 
				Body = 400; 			
				Name = NameList.RandomName( "male" ); 


			}
			
			Utility.AssignRandomHair( this );

			for (int i = 0; i < 10; i++)
			{
				PackItem( new GreaterCurePotion() );
				PackItem( new GreaterHealPotion() );
				PackItem( new TotalRefreshPotion() );
			}

          		  PackItem(new Bandage(Utility.RandomMinMax(10, 100)));

			Horse ns = new Horse();
			ns.Controlled = true;
			ns.ControlMaster = this;
			ns.ControlOrder = OrderType.Stay;
			ns.Rider = this; 
}
Esempio n. 26
0
        public override Item Construct(Type type, Mobile from)
        {
            if (type == typeof(TreasureMap))
            {
                int level;
                if (from is PlayerMobile && ((PlayerMobile)from).Young && from.Map == Map.Trammel && TreasureMap.IsInHavenIsland(from))
                    level = 0;
                else
                    level = 1;

                return new TreasureMap(level, from.Map == Map.Felucca ? Map.Felucca : Map.Trammel);
            }
            else if (type == typeof(MessageInABottle))
            {
                return new MessageInABottle(from.Map == Map.Felucca ? Map.Felucca : Map.Trammel);
            }

            Container pack = from.Backpack;

            if (pack != null)
            {
                List<SOS> messages = pack.FindItemsByType<SOS>();

                for (int i = 0; i < messages.Count; ++i)
                {
                    SOS sos = messages[i];

                    if ((from.Map == Map.Felucca || from.Map == Map.Trammel) && from.InRange(sos.TargetLocation, 60))
                    {
                        Item preLoot = null;

                        switch ( Utility.Random(8) )
                        {
                            case 0: // Body parts
                                {
                                    int[] list = new int[]
                                    {
                                        0x1CDD, 0x1CE5, // arm
                                        0x1CE0, 0x1CE8, // torso
                                        0x1CE1, 0x1CE9, // head
                                        0x1CE2, 0x1CEC // leg
                                    };

                                    preLoot = new ShipwreckedItem(Utility.RandomList(list));
                                    break;
                                }
                            case 1: // Bone parts
                                {
                                    int[] list = new int[]
                                    {
                                        0x1AE0, 0x1AE1, 0x1AE2, 0x1AE3, 0x1AE4, // skulls
                                        0x1B09, 0x1B0A, 0x1B0B, 0x1B0C, 0x1B0D, 0x1B0E, 0x1B0F, 0x1B10, // bone piles
                                        0x1B15, 0x1B16 // pelvis bones
                                    };

                                    preLoot = new ShipwreckedItem(Utility.RandomList(list));
                                    break;
                                }
                            case 2: // Paintings and portraits
                                {
                                    preLoot = new ShipwreckedItem(Utility.Random(0xE9F, 10));
                                    break;
                                }
                            case 3: // Pillows
                                {
                                    preLoot = new ShipwreckedItem(Utility.Random(0x13A4, 11));
                                    break;
                                }
                            case 4: // Shells
                                {
                                    preLoot = new ShipwreckedItem(Utility.Random(0xFC4, 9));
                                    break;
                                }
                            case 5:	//Hats
                                {
                                    if (Utility.RandomBool())
                                        preLoot = new SkullCap();
                                    else
                                        preLoot = new TricorneHat();

                                    break;
                                }
                            case 6: // Misc
                                {
                                    int[] list = new int[]
                                    {
                                        0x1EB5, // unfinished barrel
                                        0xA2A, // stool
                                        0xC1F, // broken clock
                                        0x1047, 0x1048, // globe
                                        0x1EB1, 0x1EB2, 0x1EB3, 0x1EB4 // barrel staves
                                    };

                                    if (Utility.Random(list.Length + 1) == 0)
                                        preLoot = new Candelabra();
                                    else
                                        preLoot = new ShipwreckedItem(Utility.RandomList(list));

                                    break;
                                }
                        }

                        if (preLoot != null)
                        {
                            if (preLoot is IShipwreckedItem)
                                ((IShipwreckedItem)preLoot).IsShipwreckedItem = true;

                            return preLoot;
                        }

                        LockableContainer chest;
						
                        if (Utility.RandomBool())
                            chest = new MetalGoldenChest();
                        else
                            chest = new WoodenChest();

                        if (sos.IsAncient)
                            chest.Hue = 0x481;

                        TreasureMapChest.Fill(chest, Math.Max(1, Math.Min(4, sos.Level)));

                        if (sos.IsAncient)
                            chest.DropItem(new FabledFishingNet());
                        else
                            chest.DropItem(new SpecialFishingNet());

                        chest.Movable = true;
                        chest.Locked = false;
                        chest.TrapType = TrapType.None;
                        chest.TrapPower = 0;
                        chest.TrapLevel = 0;

                        sos.Delete();

                        return chest;
                    }
                }
            }

            return base.Construct(type, from);
        }
Esempio n. 27
0
		public override Item Construct( Type type, Mobile from )
		{
			if ( type == typeof( TreasureMap ) )
			{
				int level;
				if ( from is PlayerMobile && ((PlayerMobile)from).Young && from.Map == Map.Felucca && TreasureMap.IsInHavenIsland( from ) )
					level = 0;
				else
					level = 1;

				return new TreasureMap( level, from.Map == Map.Felucca ? Map.Felucca : Map.Felucca );
			}
			else if ( type == typeof( MessageInABottle ) )
			{
				return new MessageInABottle( from.Map == Map.Felucca ? Map.Felucca : Map.Felucca );
			}

			Container pack = from.Backpack;

			if ( pack != null )
			{
				List<SOS> messages = pack.FindItemsByType<SOS>();

				for ( int i = 0; i < messages.Count; ++i )
				{
					SOS sos = messages[i];

					if ( from.Map == sos.TargetMap && from.InRange( sos.TargetLocation, 60 ) )
					{
						Item preLoot = null;

						switch ( Utility.Random( 7 ) )
						{
							case 0: // Bone parts
							{
								int[] list = new int[]
									{
										0x1AE0, 0x1AE1, 0x1AE2, 0x1AE3, 0x1AE4, // skulls
										0x1B09, 0x1B0A, 0x1B0B, 0x1B0C, 0x1B0D, 0x1B0E, 0x1B0F, 0x1B10, // bone piles
										0x1B15, 0x1B16, // pelvis bones
										0xECA, 0xECB, 0xECC, 0xECD, 0xECE, 0xECF, 0xED0, 0xED1, 0xED2 // skeletons
									};

								preLoot = new ShipwreckedItem( Utility.RandomList( list ) );
								break;
							}
							case 1: // Shells
							{
								preLoot = new ShipwreckedItem( Utility.Random( 0xFC4, 9 ) );
								break;
							}
							case 2: // Misc
							{
								int[] list = new int[]
									{
										0xE9F, 0xEA0, 0xEA1, 0xEA2, 0xEA3, 0xEA4, 0xEA5, 0xEA6, 0xEA7, 0xEA8, // paintings
										0x13A4, 0x13A5, 0x13A6, 0x13A7, 0x13A8, 0x13A9, 0x13AA, 0x13AB, 0x13AC, 0x13AD, 0x13AE, // pillows
										0x1EB5, // unfinished barrel
										0xA2A, // stool
										0xC1F, // broken clock
										0x1047, 0x1048, // globe
										0x1EB1, 0x1EB2, 0x1EB3, 0x1EB4, // barrel staves
										0xE25, 0xE26, 0xE27, 0xE28, 0xE29, 0xE2A, 0xE2B, 0xE2C, // bottles
										0xC19, 0xC1A, 0xC1B, 0xC1C, 0xC1D, 0xC1E, // broken chairs
										0xC2C, 0xC2D, 0xC2E, 0xC2F, 0xC30, // ruined painting, debris
										0x13E5, 0x13E6, 0x13E7, 0x13E8, 0x13E9, 0x13EA // hanging armor
									};

								preLoot = new ShipwreckedItem( Utility.RandomList( list ) );
								break;
							}
							case 3: // Ship Items
							{
								int[] list = new int[]
									{
										0x14F8, 0x14FA, // ropes
										0x14F7, 0x14F9, // anchors
										0x14EB, 0x14EC, // maps
										0x1057, 0x1058, // sextants
										0x171A // feathered hat
									};

								preLoot = new ShipwreckedItem( Utility.RandomList( list ) );
								break;
							}
							case 4: // Shells
							{
								preLoot = new ShipwreckedItem( Utility.Random( 0xFC4, 9 ) );
								break;
							}
							case 5:	//Hats
							{
								if ( Utility.RandomBool() )
									preLoot = new SkullCap();
								else
									preLoot = new TricorneHat();

								break;
							}
							case 6: // Misc
							{
								int[] list = new int[]
									{
										0x1EB5, // unfinished barrel
										0xA2A, // stool
										0xC1F, // broken clock
										0x1047, 0x1048, // globe
										0x1EB1, 0x1EB2, 0x1EB3, 0x1EB4 // barrel staves
									};

								if ( Utility.Random( list.Length + 1 ) == 0 )
									preLoot = new Candelabra();
								else
									preLoot = new ShipwreckedItem( Utility.RandomList( list ) );

								break;
							}
						}

						if ( preLoot != null )
						{
							if ( preLoot is IShipwreckedItem )
								( (IShipwreckedItem)preLoot ).IsShipwreckedItem = true;

							return preLoot;
						}

						LockableContainer chest;
						
						if ( Utility.RandomBool() )
							chest = new MetalGoldenChest();
						else
							chest = new WoodenChest();

						if ( sos.IsAncient )
							chest.Hue = 0x481;

						TreasureMapChest.Fill( chest, Math.Max( 1, Math.Max( 4, sos.Level ) ) );

						if ( sos.IsAncient )
							chest.DropItem( new FabledFishingNet() );
						else
							chest.DropItem( new SpecialFishingNet() );

						chest.Movable = true;
						chest.Locked = false;
						chest.TrapType = TrapType.None;
						chest.TrapPower = 0;
						chest.TrapLevel = 0;
// label chest with fisherman's name
						chest.Name = "Treasure chest fished up by " + from.Name;

						sos.Delete();

						return chest;
					}
				}
			}

			return base.Construct( type, from );
		}