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;
        }
Exemple #2
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;
        }
Exemple #3
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 );
        }
        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;
        }
        /// <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);
        }