Example #1
0
        public RaresVendor() : base("the custom provisioner")
        {
            Item temp;

            temp         = new Shoes();
            temp.Hue     = 1953;
            temp.Movable = false;
            AddItem(temp);
            temp         = new LongPants();
            temp.Hue     = 01;
            temp.Movable = false;
            AddItem(temp);
            temp         = new Doublet();
            temp.Hue     = 1953;
            temp.Movable = false;
            AddItem(temp);
            temp         = new FancyShirt();
            temp.Hue     = 01;
            temp.Movable = false;
            AddItem(temp);
            temp         = new FloppyHat();
            temp.Hue     = 1953;
            temp.Movable = false;
            AddItem(temp);
            temp         = new Cloak();
            temp.Hue     = 1953;
            temp.Movable = false;
            AddItem(temp);
        }
Example #2
0
        public static Item GetRandomShirt()
        {
            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;
            }

            return(shirt);
        }
Example #3
0
        public RalphSantasElf()
        {
            Name    = "Ralph";
            Title   = "Santa's Helper";
            Body    = 400;
            Hue     = 1002;
            Blessed = true;



            this.HairItemID = 0x203D;
            this.HairHue    = 0x3EA;



            Item Doublet = new Doublet();

            Doublet.Hue  = 1367;
            Doublet.Name = "Elf Vest";
            AddItem(Doublet);

            Item FancyShirt = new FancyShirt();

            FancyShirt.Hue  = 1368;
            FancyShirt.Name = "Elf Shirt";
            AddItem(FancyShirt);

            Item LongPants = new LongPants();

            LongPants.Hue  = 1368;
            LongPants.Name = "Elf Pants";
            AddItem(LongPants);

            Item JesterShoes = new JesterShoes(0x7819);

            JesterShoes.Hue  = 32;
            JesterShoes.Name = "Elf Shoes";
            AddItem(JesterShoes);

            Item HalfApron = new HalfApron();

            HalfApron.Hue  = 33;
            HalfApron.Name = "Elf Apron";
            AddItem(HalfApron);

            Item JesterHat = new JesterHat();

            JesterHat.Hue  = 2996;
            JesterHat.Name = "Elf Hat";
            AddItem(JesterHat);


            ShepherdsCrook weapon = new  ShepherdsCrook();

            weapon.Hue     = 32;
            weapon.Movable = false;
            AddItem(weapon);
        }
Example #4
0
        private void CreateClassic()
        {
            m_MoveSound    = 588;
            m_CaptureSound = 168;
            m_DeathSound   = 170;

            m_Piece.Female    = false;
            m_Piece.BodyValue = 0x190;

            if (m_BChessboard.OverrideMinorHue)
            {
                m_Piece.Hue = Hue;
            }
            else
            {
                m_Piece.Hue = m_BChessboard.SkinHue;
            }

            m_Piece.HairItemID = 0x203D;             //Pony Tail
            m_Piece.HairHue    = m_BChessboard.OverrideMinorHue ? Hue : m_BChessboard.HairHue;

            Item item = null;

            item     = new PlateLegs();
            item.Hue = Hue;
            m_Piece.AddItem(item);

            item     = new PlateChest();
            item.Hue = Hue;
            m_Piece.AddItem(item);

            item     = new PlateArms();
            item.Hue = Hue;
            m_Piece.AddItem(item);

            item     = new PlateGorget();
            item.Hue = Hue;
            m_Piece.AddItem(item);

            item     = new PlateGloves();
            item.Hue = Hue;
            m_Piece.AddItem(item);

            item = new Doublet(MinorHue);
            m_Piece.AddItem(item);

            item     = new Lance();
            item.Hue = MinorHue;
            m_Piece.AddItem(item);

            Server.Mobiles.Horse horse = new Server.Mobiles.Horse();
            horse.BodyValue = 200;
            horse.Hue       = MinorHue;

            horse.Rider = m_Piece;

            m_Piece.Direction = Facing;
        }
Example #5
0
            public InternalBuyInfo()
            {
                Add(new GenericBuyInfo("Bolt of Cloth", typeof(BoltOfCloth), BoltOfCloth.GetSBPurchaseValue(), 50, 0xf95, 0));

                Add(new GenericBuyInfo("Scissors", typeof(Scissors), Scissors.GetSBPurchaseValue(), 25, 0xF9F, 0));
                Add(new GenericBuyInfo("Sewing Kit", typeof(SewingKit), SewingKit.GetSBPurchaseValue(), 50, 0xF9D, 0));
                Add(new GenericBuyInfo("Dyes", typeof(Dyes), Dyes.GetSBPurchaseValue(), 25, 0xFA9, 0));
                Add(new GenericBuyInfo("Dye Tub", typeof(DyeTub), DyeTub.GetSBPurchaseValue(), 25, 0xFAB, 0));

                //Hats
                Add(new GenericBuyInfo("Skull Cap", typeof(SkullCap), SkullCap.GetSBPurchaseValue(), 25, 0x1544, 0));
                Add(new GenericBuyInfo("Bandana", typeof(Bandana), Bandana.GetSBPurchaseValue(), 25, 0x1540, 0));
                Add(new GenericBuyInfo("Floppy Hat", typeof(FloppyHat), FloppyHat.GetSBPurchaseValue(), 25, 0x1713, 0));
                Add(new GenericBuyInfo("Cap", typeof(Cap), Cap.GetSBPurchaseValue(), 25, 0x1715, 0));
                Add(new GenericBuyInfo("Wide Brim Hat", typeof(WideBrimHat), WideBrimHat.GetSBPurchaseValue(), 25, 0x1714, 0));
                Add(new GenericBuyInfo("Tall Straw Hat", typeof(TallStrawHat), TallStrawHat.GetSBPurchaseValue(), 25, 0x1716, 0));
                Add(new GenericBuyInfo("Bonnet", typeof(Bonnet), Bonnet.GetSBPurchaseValue(), 25, 0x1719, 0));
                Add(new GenericBuyInfo("Feathered Hat", typeof(FeatheredHat), FeatheredHat.GetSBPurchaseValue(), 25, 0x171A, 0));
                Add(new GenericBuyInfo("Tricorne Hat", typeof(TricorneHat), TricorneHat.GetSBPurchaseValue(), 25, 0x171B, 0));
                Add(new GenericBuyInfo("Jester Hat", typeof(JesterHat), JesterHat.GetSBPurchaseValue(), 25, 0x171C, 0));
                Add(new GenericBuyInfo("Wizards Hat", typeof(WizardsHat), WizardsHat.GetSBPurchaseValue(), 25, 0x1718, 0));

                //Shirts
                Add(new GenericBuyInfo("Doublet", typeof(Doublet), Doublet.GetSBPurchaseValue(), 25, 0x1F7B, 0));
                Add(new GenericBuyInfo("Shirt", typeof(Shirt), Shirt.GetSBPurchaseValue(), 25, 0x1517, 0));
                Add(new GenericBuyInfo("Fancy Shirt", typeof(FancyShirt), FancyShirt.GetSBPurchaseValue(), 25, 0x1EFD, 0));
                Add(new GenericBuyInfo("Tunic", typeof(Tunic), Tunic.GetSBPurchaseValue(), 25, 0x1FA1, 0));
                Add(new GenericBuyInfo("Surcoat", typeof(Surcoat), Surcoat.GetSBPurchaseValue(), 25, 0x1FFD, 0));
                Add(new GenericBuyInfo("Jester Suit", typeof(JesterSuit), JesterSuit.GetSBPurchaseValue(), 25, 0x1F9F, 0));
                Add(new GenericBuyInfo("Plain Dress", typeof(PlainDress), PlainDress.GetSBPurchaseValue(), 25, 0x1F01, 0));
                Add(new GenericBuyInfo("Fancy Dress", typeof(FancyDress), FancyDress.GetSBPurchaseValue(), 25, 0x1EFF, 0));
                Add(new GenericBuyInfo("Robe", typeof(Robe), Robe.GetSBPurchaseValue(), 25, 0x1F03, 0));

                //Pants
                Add(new GenericBuyInfo("Short Pants", typeof(ShortPants), ShortPants.GetSBPurchaseValue(), 25, 0x152E, 0));
                Add(new GenericBuyInfo("Long Pants", typeof(LongPants), LongPants.GetSBPurchaseValue(), 25, 0x1539, 0));
                Add(new GenericBuyInfo("Kilt", typeof(Kilt), Kilt.GetSBPurchaseValue(), 25, 0x1537, 0));
                Add(new GenericBuyInfo("Skirt", typeof(Skirt), Skirt.GetSBPurchaseValue(), 25, 0x1516, 0));

                Add(new GenericBuyInfo("Cloak", typeof(Cloak), Cloak.GetSBPurchaseValue(), 25, 0x1515, 0));
                Add(new GenericBuyInfo("Body Sash", typeof(BodySash), BodySash.GetSBPurchaseValue(), 25, 0x1541, 0));
                Add(new GenericBuyInfo("Half Apron", typeof(HalfApron), HalfApron.GetSBPurchaseValue(), 25, 0x153b, 0));
                Add(new GenericBuyInfo("Full Apron", typeof(FullApron), FullApron.GetSBPurchaseValue(), 25, 0x153d, 0));

                //Shoes
                Add(new GenericBuyInfo("Sandals", typeof(Sandals), Sandals.GetSBPurchaseValue(), 25, 0x170D, 0));
                Add(new GenericBuyInfo("Shoes", typeof(Shoes), Shoes.GetSBPurchaseValue(), 25, 0x170F, 0));
                Add(new GenericBuyInfo("Boots", typeof(Boots), Boots.GetSBPurchaseValue(), 25, 0x170B, 0));
                Add(new GenericBuyInfo("Thigh Boots", typeof(ThighBoots), ThighBoots.GetSBPurchaseValue(), 25, 0x1711, 0));

                //TEST: FIX
                //Add( new GenericBuyInfo( typeof( SpoolOfThread ), 18, 20, 0xFA0, 0 ) );
                //Add( new GenericBuyInfo( typeof( Flax ), 156, 20, 0x1A9C, 0 ) );
                //Add( new GenericBuyInfo( typeof( Cotton ), 156, 20, 0xDF9, 0 ) );
                //Add( new GenericBuyInfo( typeof( Wool ), 78, 20, 0xDF8, 0 ) );
            }
Example #6
0
        public LordSanta()
        {
            Name     = "Lord Santa";
            Title    = "the Ruler of the green dudes";
            Body     = 0x190;
            CantWalk = true;
            Hue      = Utility.RandomSkinHue();

            Item Boots = new Boots();

            Boots.Hue     = 33;
            Boots.Name    = "Santa Boots";
            Boots.Movable = false;
            AddItem(Boots);

            Item Doublet = new Doublet();

            Doublet.Hue     = 33;
            Doublet.Name    = "Santa's Doublet";
            Doublet.Movable = false;
            AddItem(Doublet);

            Item FancyShirt = new FancyShirt();

            FancyShirt.Hue     = 33;
            FancyShirt.Name    = "Santa's Shirt";
            FancyShirt.Movable = false;
            AddItem(FancyShirt);

            Item LongPants = new LongPants();

            LongPants.Hue     = 33;
            LongPants.Name    = "Santa's Pants";
            LongPants.Movable = false;
            AddItem(LongPants);

            Item WizardsHat = new WizardsHat();

            WizardsHat.Hue     = 33;
            WizardsHat.Name    = "Santa's Hat";
            WizardsHat.Movable = false;
            AddItem(WizardsHat);



            int hairHue = 1153;

            switch (Utility.Random(1))
            {
            case 0: AddItem(new LongHair(hairHue)); break;

            case 1: AddItem(new LongBeard(hairHue)); break;
            }

            Blessed = true;
        }
Example #7
0
        private void UpdateMaxDoublet(HalfDoublet[] copy, int length)
        {
            Doublet <TLink> doublet = default;

            for (var i = 1; i < length; i++)
            {
                doublet = new Doublet <TLink>(copy[i - 1].Element, copy[i].Element);
                UpdateMaxDoublet(ref doublet, copy[i - 1].DoubletData);
            }
        }
    public void RemoveDoublet(GameObject acc)
    {
        Doublet[] ds = acc.GetComponents <Doublet>();
        if (ds.Length > 0)
        {
            Doublet d = ds[ds.Length - 1];
            doublets.Remove(d.doublet);
            d.Remove();
        }

        UpdateArrow(acc);
    }
Example #9
0
        private void UpdateMaxDoublet(ref Doublet <TLink> doublet, LinkFrequency <TLink> data)
        {
            var frequency    = data.Frequency;
            var maxFrequency = _maxDoubletData.Frequency;

            //if (frequency > _minFrequencyToCompress && (maxFrequency < frequency || (maxFrequency == frequency && doublet.Source + doublet.Target < /* gives better compression string data (and gives collisions quickly) */ _maxDoublet.Source + _maxDoublet.Target)))
            if (_comparer.Compare(frequency, _minFrequencyToCompress) > 0 &&
                (_comparer.Compare(maxFrequency, frequency) < 0 || (_equalityComparer.Equals(maxFrequency, frequency) && _comparer.Compare(Arithmetic.Add(doublet.Source, doublet.Target), Arithmetic.Add(_maxDoublet.Source, _maxDoublet.Target)) > 0))) /* gives better stability and better compression on sequent data and even on rundom numbers data (but gives collisions anyway) */
            {
                _maxDoublet     = doublet;
                _maxDoubletData = data;
            }
        }
Example #10
0
        public Peraniese()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name     = "Peraniese";
            Title    = "a Scholar extrodinair";
            Body     = 400;
            CantWalk = true;
            Hue      = 33770;
            CantWalk = true;

            int hairHue = 0;

            Blessed = true;

            switch (Utility.Random(1))
            {
            case 0: AddItem(new LongHair(hairHue)); break;
            }
            switch (Utility.Random(1))
            {
            case 0: AddItem(new Vandyke(hairHue)); break;
            }

            AddItem(new Server.Items.FurCape(1150));
            AddItem(new Server.Items.Sandals(1530));
            AddItem(new Server.Items.FurSarong(1530));

            Doublet doublet = new Doublet();

            doublet.Hue     = 1530;
            doublet.Movable = false;
            AddItem(doublet);

            GoldNecklace goldnecklace = new GoldNecklace();

            goldnecklace.Hue     = 0;
            goldnecklace.Movable = false;
            AddItem(goldnecklace);

            GoldRing goldring = new GoldRing();

            goldring.Hue     = 0;
            goldring.Movable = false;
            AddItem(goldring);

            Backpack backpack = new Backpack();

            backpack.Hue     = 1530;
            backpack.Movable = false;
            AddItem(backpack);
        }
Example #11
0
        private IList <TLink> Compress(IList <TLink> sequence)
        {
            if (sequence.IsNullOrEmpty())
            {
                return(null);
            }
            if (sequence.Count == 1)
            {
                return(sequence);
            }
            if (sequence.Count == 2)
            {
                return(new[] { _links.GetOrCreate(sequence[0], sequence[1]) });
            }
            // TODO: arraypool with min size (to improve cache locality) or stackallow with Sigil
            var             copy    = new HalfDoublet[sequence.Count];
            Doublet <TLink> doublet = default;

            for (var i = 1; i < sequence.Count; i++)
            {
                doublet = new Doublet <TLink>(sequence[i - 1], sequence[i]);
                LinkFrequency <TLink> data;
                if (_doInitialFrequenciesIncrement)
                {
                    data = _doubletFrequenciesCache.IncrementFrequency(ref doublet);
                }
                else
                {
                    data = _doubletFrequenciesCache.GetFrequency(ref doublet);
                    if (data == null)
                    {
                        throw new NotSupportedException("If you ask not to increment frequencies, it is expected that all frequencies for the sequence are prepared.");
                    }
                }
                copy[i - 1].Element     = sequence[i - 1];
                copy[i - 1].DoubletData = data;
                UpdateMaxDoublet(ref doublet, data);
            }
            copy[sequence.Count - 1].Element     = sequence[sequence.Count - 1];
            copy[sequence.Count - 1].DoubletData = new LinkFrequency <TLink>();
            if (_comparer.Compare(_maxDoubletData.Frequency, default) > 0)
            {
                var newLength = ReplaceDoublets(copy);
                sequence = new TLink[newLength];
                for (int i = 0; i < newLength; i++)
                {
                    sequence[i] = copy[i].Element;
                }
            }
            return(sequence);
        }
Example #12
0
        public FawnGuard() : base(AIType.AI_Melee, FightMode.Closest, 15, 1, 0.1, 0.2)
        {
            Title = "the Fawn Guard";

            SetStr(1750, 1750);
            SetDex(150, 150);
            SetInt(61, 75);

            SetSkill(SkillName.MagicResist, 120.0, 120.0);
            SetSkill(SkillName.Swords, 120.0, 120.0);
            SetSkill(SkillName.Tactics, 120.0, 120.0);
            SetSkill(SkillName.Anatomy, 120.0, 120.0);

            SkullCap sc = new SkullCap();

            sc.Hue = 902;
            AddItem(sc);

            ChainChest cc = new ChainChest();

            cc.Hue = 902;
            AddItem(cc);

            Doublet doublet = new Doublet();

            doublet.Hue = 243;
            AddItem(doublet);

            AddItem(new ChainLegs());

            Shoes shoes = new Shoes();

            shoes.Hue = 902;
            AddItem(shoes);

            AddItem(new Broadsword());

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

            Utility.AssignRandomHair(this);
        }
    public void AddDoublet(GameObject acc)
    {
        if (acc.GetComponents <Doublet>().Length >= MaxDoublets)
        {
            return;                                                     // Already to many doublets, Stop adding
        }
        Doublet d = acc.AddComponent <Doublet>();

        d.Atome = acc;
        d.DrawDoublet();
        doublets.Add(d.doublet);

        UpdateArrow(acc);
    }
Example #14
0
        public TLink Convert(Doublet <TLink> doublet)
        {
            var links = _links;
            var link  = links.SearchOrDefault(doublet.Source, doublet.Target);

            if (_equalityComparer.Equals(link, default))
            {
                throw new ArgumentException($"Link ({doublet}) not found.", nameof(doublet));
            }
            var frequency = _frequencyPropertyOperator.Get(link);

            if (_equalityComparer.Equals(frequency, default))
            {
                return(default);
Example #15
0
            public InternalSellInfo()
            {
                Add(typeof(BoltOfCloth), BoltOfCloth.GetSBSellValue());

                Add(typeof(Scissors), Scissors.GetSBSellValue());
                Add(typeof(SewingKit), SewingKit.GetSBSellValue());
                Add(typeof(Dyes), Dyes.GetSBSellValue());
                Add(typeof(DyeTub), DyeTub.GetSBSellValue());

                Add(typeof(SkullCap), SkullCap.GetSBSellValue());
                Add(typeof(Bandana), Bandana.GetSBSellValue());
                Add(typeof(FloppyHat), FloppyHat.GetSBSellValue());
                Add(typeof(Cap), Cap.GetSBSellValue());
                Add(typeof(WideBrimHat), WideBrimHat.GetSBSellValue());
                Add(typeof(TallStrawHat), TallStrawHat.GetSBSellValue());
                Add(typeof(Bonnet), Bonnet.GetSBSellValue());
                Add(typeof(FeatheredHat), FeatheredHat.GetSBSellValue());
                Add(typeof(TricorneHat), TricorneHat.GetSBSellValue());
                Add(typeof(JesterHat), JesterHat.GetSBSellValue());
                Add(typeof(WizardsHat), WizardsHat.GetSBSellValue());

                Add(typeof(Doublet), Doublet.GetSBSellValue());
                Add(typeof(Shirt), Shirt.GetSBSellValue());
                Add(typeof(FancyShirt), FancyShirt.GetSBSellValue());
                Add(typeof(Tunic), Tunic.GetSBSellValue());
                Add(typeof(Surcoat), Surcoat.GetSBSellValue());
                Add(typeof(JesterSuit), JesterSuit.GetSBSellValue());
                Add(typeof(PlainDress), PlainDress.GetSBSellValue());
                Add(typeof(FancyDress), FancyDress.GetSBSellValue());
                Add(typeof(Robe), Robe.GetSBSellValue());

                Add(typeof(ShortPants), ShortPants.GetSBSellValue());
                Add(typeof(LongPants), LongPants.GetSBSellValue());
                Add(typeof(Kilt), Kilt.GetSBSellValue());
                Add(typeof(Skirt), Skirt.GetSBSellValue());

                Add(typeof(Cloak), Cloak.GetSBSellValue());
                Add(typeof(BodySash), BodySash.GetSBSellValue());
                Add(typeof(HalfApron), HalfApron.GetSBSellValue());
                Add(typeof(FullApron), FullApron.GetSBSellValue());

                Add(typeof(Sandals), Sandals.GetSBSellValue());
                Add(typeof(Shoes), Shoes.GetSBSellValue());
                Add(typeof(Boots), Boots.GetSBSellValue());
                Add(typeof(ThighBoots), ThighBoots.GetSBSellValue());
            }
Example #16
0
        public void InitOutfit()
        {
            Item hair = new Item(8251)
            {
                Hue     = 1148,
                Layer   = Layer.Hair,
                Movable = false
            };

            AddItem(hair);

            Item doublet = new Doublet()
            {
                Hue     = 238,
                Movable = false
            };

            AddItem(doublet);

            Item shirt = new FancyShirt()
            {
                Hue     = 0,
                Movable = false
            };

            AddItem(shirt);

            Item pants = new LongPants()
            {
                Hue     = 1150,
                Movable = false
            };

            AddItem(pants);

            Shoes shoes = new Shoes()
            {
                Hue     = 1754,
                Movable = false
            };

            AddItem(shoes);

            PackGold(50, 200);
        }
Example #17
0
        private void CreateClassic()
        {
            m_MoveSound      = 1055;
            m_CaptureSound   = 1068;
            m_DeathSound     = 0;
            m_CheckSound     = 1086;
            m_CheckMateSound = 1088;

            m_Piece.Female    = false;
            m_Piece.BodyValue = 0x190;

            if (m_BChessboard.OverrideMinorHue)
            {
                m_Piece.Hue = Hue;
            }
            else
            {
                m_Piece.Hue = m_BChessboard.SkinHue;
            }
            m_Piece.AddItem(new ShortHair(m_BChessboard.OverrideMinorHue ? Hue : m_BChessboard.HairHue));

            Item item = null;

            item = new Boots(MinorHue);
            m_Piece.AddItem(item);

            item = new LongPants(Hue);
            m_Piece.AddItem(item);

            item = new FancyShirt(Hue);
            m_Piece.AddItem(item);

            item = new Doublet(MinorHue);
            m_Piece.AddItem(item);

            item = new Cloak(MinorHue);
            m_Piece.AddItem(item);

            item = new JesterHat(MinorHue);
            m_Piece.AddItem(item);

            item     = new Scepter();
            item.Hue = MinorHue;
            m_Piece.AddItem(item);
        }
Example #18
0
 public LinkFrequency <TLink> IncrementFrequency(ref Doublet <TLink> doublet)
 {
     if (_doubletsCache.TryGetValue(doublet, out LinkFrequency <TLink> data))
     {
         data.IncrementFrequency();
     }
     else
     {
         var link = _links.SearchOrDefault(doublet.Source, doublet.Target);
         data = new LinkFrequency <TLink>(_one, link);
         if (!_equalityComparer.Equals(link, default))
         {
             data.Frequency = Arithmetic.Add(data.Frequency, _frequencyCounter.Count(link));
         }
         _doubletsCache.Add(doublet, data);
     }
     return(data);
 }
Example #19
0
        public override void InitOutfit()
        {
            base.InitOutfit();

            Item doublet = new Doublet();

            doublet.Hue = 24;
            AddItem(doublet);

            Item leatherskirt = new LeatherSkirt();

            leatherskirt.Hue = 24;
            AddItem(leatherskirt);

            Item booty = new FurBoots();

            booty.Hue = 24;
            AddItem(booty);

            AddItem(Utility.RandomBool() ? (Item) new Lantern() : (Item) new Candle());
        }
Example #20
0
        public void InitOutfit()
        {
            Shirt shirt = new Shirt();

            shirt.Hue          = 218;
            shirt.IsLockedDown = true;
            shirt.BlessedFor   = this;
            shirt.Movable      = false;


            Doublet doublet = new Doublet();

            doublet.Hue          = 707;
            doublet.IsLockedDown = true;
            doublet.BlessedFor   = this;
            doublet.Movable      = false;

            FancyShirt fancyShirt = new FancyShirt();

            fancyShirt.Hue          = 333;
            fancyShirt.IsLockedDown = true;
            fancyShirt.BlessedFor   = this;
            fancyShirt.Movable      = false;

            Skirt skirt = new Skirt();

            skirt.Hue = 518;

            Boots boots = new Boots();

            boots.Hue          = 707;
            boots.IsLockedDown = true;
            boots.BlessedFor   = this;
            boots.Movable      = false;

            AddItem(skirt);
            AddItem(fancyShirt);
            AddItem(doublet);
            AddItem(boots);
        }
Example #21
0
        public DummySuper() : base(AIType.AI_Mage, FightMode.Closest, 15, 1, 0.2, 0.6)
        {
            // A Dummy Super Mage
            int iHue = 20 + Team * 40;

//			int jHue = 25 + Team * 40;

            // Skills and Stats
            this.InitStats(125, 125, 125);
            this.Skills[SkillName.Magery].Base     = 120;
            this.Skills[SkillName.EvalInt].Base    = 120;
            this.Skills[SkillName.Anatomy].Base    = 120;
            this.Skills[SkillName.Wrestling].Base  = 120;
            this.Skills[SkillName.Meditation].Base = 120;
            this.Skills[SkillName.Poisoning].Base  = 100;
            this.Skills[SkillName.Inscribe].Base   = 100;

            // Name
            this.Name = "Super Mage";

            // Equip
            Spellbook book = new Spellbook();

            book.Movable  = false;
            book.LootType = LootType.Newbied;
            book.Content  = 0xFFFFFFFFFFFFFFFF;
            AddItem(book);

            LeatherArms lea = new LeatherArms();

            lea.Movable  = false;
            lea.LootType = LootType.Newbied;
            lea.Crafter  = this;
            lea.Quality  = ArmorQuality.Regular;
            AddItem(lea);

            LeatherChest lec = new LeatherChest();

            lec.Movable  = false;
            lec.LootType = LootType.Newbied;
            lec.Crafter  = this;
            lec.Quality  = ArmorQuality.Regular;
            AddItem(lec);

            LeatherGorget leg = new LeatherGorget();

            leg.Movable  = false;
            leg.LootType = LootType.Newbied;
            leg.Crafter  = this;
            leg.Quality  = ArmorQuality.Regular;
            AddItem(leg);

            LeatherLegs lel = new LeatherLegs();

            lel.Movable  = false;
            lel.LootType = LootType.Newbied;
            lel.Crafter  = this;
            lel.Quality  = ArmorQuality.Regular;
            AddItem(lel);

            Sandals snd = new Sandals();

            snd.Hue      = iHue;
            snd.LootType = LootType.Newbied;
            AddItem(snd);

            JesterHat jhat = new JesterHat();

            jhat.Hue = iHue;
            AddItem(jhat);

            Doublet dblt = new Doublet();

            dblt.Hue = iHue;
            AddItem(dblt);

            // Spells
            AddSpellAttack(typeof(Spells.First.MagicArrowSpell));
            AddSpellAttack(typeof(Spells.First.WeakenSpell));
            AddSpellAttack(typeof(Spells.Third.FireballSpell));
            AddSpellDefense(typeof(Spells.Third.WallOfStoneSpell));
            AddSpellDefense(typeof(Spells.First.HealSpell));
        }
Example #22
0
        public DummySuper()
            : base(AIType.AI_Mage, FightMode.Closest, 15, 1, 0.2, 0.6)
        {
            // A Dummy Super Mage
            int iHue = 20 + Team * 40;
            int jHue = 25 + Team * 40;

            // Skills and Stats
            InitStats(125, 125, 125);
            Skills[SkillName.Magery].Base     = 120;
            Skills[SkillName.EvalInt].Base    = 120;
            Skills[SkillName.Anatomy].Base    = 120;
            Skills[SkillName.Wrestling].Base  = 120;
            Skills[SkillName.Meditation].Base = 120;
            Skills[SkillName.Poisoning].Base  = 100;
            Skills[SkillName.Inscribe].Base   = 100;

            // Name
            Name = "Super Mage";

            // Equip
            Spellbook book = new Spellbook
            {
                Movable  = false,
                LootType = LootType.Newbied,
                Content  = 0xFFFFFFFFFFFFFFFF
            };

            AddItem(book);

            LeatherArms lea = new LeatherArms
            {
                Movable  = false,
                LootType = LootType.Newbied,
                Crafter  = this,
                Quality  = ItemQuality.Normal
            };

            AddItem(lea);

            LeatherChest lec = new LeatherChest
            {
                Movable  = false,
                LootType = LootType.Newbied,
                Crafter  = this,
                Quality  = ItemQuality.Normal
            };

            AddItem(lec);

            LeatherGorget leg = new LeatherGorget
            {
                Movable  = false,
                LootType = LootType.Newbied,
                Crafter  = this,
                Quality  = ItemQuality.Normal
            };

            AddItem(leg);

            LeatherLegs lel = new LeatherLegs
            {
                Movable  = false,
                LootType = LootType.Newbied,
                Crafter  = this,
                Quality  = ItemQuality.Normal
            };

            AddItem(lel);

            Sandals snd = new Sandals
            {
                Hue      = iHue,
                LootType = LootType.Newbied
            };

            AddItem(snd);

            JesterHat jhat = new JesterHat
            {
                Hue = iHue
            };

            AddItem(jhat);

            Doublet dblt = new Doublet
            {
                Hue = iHue
            };

            AddItem(dblt);

            // Spells
            AddSpellAttack(typeof(Spells.First.MagicArrowSpell));
            AddSpellAttack(typeof(Spells.First.WeakenSpell));
            AddSpellAttack(typeof(Spells.Third.FireballSpell));
            AddSpellDefense(typeof(Spells.Third.WallOfStoneSpell));
            AddSpellDefense(typeof(Spells.First.HealSpell));
        }
        private static void WritePlayer(Packet pPacket, DatabaseQuery pQuery)
        {
            pPacket.WriteInt((int)pQuery["identifier"]);
            pPacket.WritePaddedString((string)pQuery["name"], 13);

            pPacket.WriteByte((byte)pQuery["gender"]);
            pPacket.WriteByte((byte)pQuery["skin"]);
            pPacket.WriteInt((int)pQuery["eyes_identifier"]);
            pPacket.WriteInt((int)pQuery["hair_identifier"]);
            pPacket.WriteSkip(24);
            pPacket.WriteByte((byte)pQuery["level"]);
            pPacket.WriteUShort((ushort)pQuery["job"]);
            pPacket.WriteUShort((ushort)pQuery["strength"]);
            pPacket.WriteUShort((ushort)pQuery["dexterity"]);
            pPacket.WriteUShort((ushort)pQuery["intellect"]);
            pPacket.WriteUShort((ushort)pQuery["luck"]);
            pPacket.WriteUShort((ushort)pQuery["health"]);
            pPacket.WriteUShort((ushort)pQuery["max_health"]);
            pPacket.WriteUShort((ushort)pQuery["mana"]);
            pPacket.WriteUShort((ushort)pQuery["max_mana"]);
            pPacket.WriteUShort((ushort)pQuery["ability_points"]);
            pPacket.WriteUShort((ushort)pQuery["skill_points"]);
            pPacket.WriteInt((int)pQuery["experience"]);
            pPacket.WriteUShort((ushort)pQuery["fame"]);
            pPacket.WriteSkip(4);
            pPacket.WriteInt((int)pQuery["map_identifier"]);
            pPacket.WriteByte((byte)pQuery["map_spawn"]);
            pPacket.WriteSkip(4);

            pPacket.WriteByte((byte)pQuery["gender"]);
            pPacket.WriteByte((byte)pQuery["skin"]);
            pPacket.WriteInt((int)pQuery["eyes_identifier"]);
            pPacket.WriteBool(true);
            pPacket.WriteInt((int)pQuery["hair_identifier"]);

            SortedDictionary<byte, Doublet<int, int>> equipment = new SortedDictionary<byte, Doublet<int, int>>();
            using (DatabaseQuery queryEquipment = Database.Query("SELECT inventory_slot,item_identifier FROM player_item WHERE player_identifier=@player_identifier AND inventory_type=0 AND inventory_slot<0", new MySqlParameter("@player_identifier", (int)pQuery["identifier"])))
            {
                while (queryEquipment.NextRow())
                {
                    short slot = (short)(-((short)queryEquipment["inventory_slot"]));
                    if (slot > 100) slot -= 100;
                    Doublet<int, int> pair = equipment.GetOrDefault((byte)slot, null);
                    if (pair == null)
                    {
                        pair = new Doublet<int, int>((int)queryEquipment["item_identifier"], 0);
                        equipment.Add((byte)slot, pair);
                    }
                    else if ((short)queryEquipment["inventory_slot"] < -100)
                    {
                        pair.Second = pair.First;
                        pair.First = (int)queryEquipment["item_identifier"];
                    }
                    else pair.Second = (int)queryEquipment["item_identifier"];
                }
            }
            foreach (KeyValuePair<byte, Doublet<int, int>> pair in equipment)
            {
                pPacket.WriteByte(pair.Key);
                if (pair.Key == 11 && pair.Value.Second > 0) pPacket.WriteInt(pair.Value.Second);
                else pPacket.WriteInt(pair.Value.First);
            }
            pPacket.WriteByte(0xFF);
            foreach (KeyValuePair<byte, Doublet<int, int>> pair in equipment)
            {
                if (pair.Key != 11 && pair.Value.Second > 0)
                {
                    pPacket.WriteByte(pair.Key);
                    pPacket.WriteInt(pair.Value.Second);
                }
            }
            pPacket.WriteByte(0xFF);
            Doublet<int, int> cashWeapon = equipment.GetOrDefault((byte)11, null);
            pPacket.WriteInt(cashWeapon == null ? 0 : cashWeapon.First);
            pPacket.WriteSkip(12);

            pPacket.WriteBool(false);
        }
Example #24
0
        private static void AddCharacterEntry(OutPacket oPacket, DatabaseQuery query)
        {
            oPacket
            .WriteInt(query.GetInt("character_id"))
            .WritePaddedString(query.GetString("name"), 13)
            .WriteByte(query.GetByte("gender"))
            .WriteByte(query.GetByte("skin"))
            .WriteInt(query.GetInt("face"))
            .WriteInt(query.GetInt("hair"))
            .WriteLong()
            .WriteLong()
            .WriteLong()
            .WriteByte(query.GetByte("level"))
            .WriteShort(query.GetShort("job"))
            .WriteShort(query.GetShort("strength"))
            .WriteShort(query.GetShort("dexterity"))
            .WriteShort(query.GetShort("intelligence"))
            .WriteShort(query.GetShort("luck"))
            .WriteShort(query.GetShort("health"))
            .WriteShort(query.GetShort("max_health"))
            .WriteShort(query.GetShort("mana"))
            .WriteShort(query.GetShort("max_mana"))
            .WriteShort(query.GetShort("ability_points"))
            .WriteShort(query.GetShort("skill_points"))
            .WriteInt(query.GetInt("experience"))
            .WriteShort(query.GetShort("fame"))
            .WriteInt()
            .WriteInt(query.GetInt("map"))
            .WriteByte(query.GetByte("spawn_point"))
            .WriteInt();

            oPacket
            .WriteByte(query.GetByte("gender"))
            .WriteByte(query.GetByte("skin"))
            .WriteInt(query.GetInt("face"))
            .WriteBool(true)
            .WriteInt(query.GetInt("hair"));

            SortedDictionary <byte, Doublet <int, int> > equipment = new SortedDictionary <byte, Doublet <int, int> >();

            using (DatabaseQuery equipmentQuery = Database.Query("SELECT `slot`, `maple_id` FROM `items` WHERE `character_id` = @character_id AND `inventory` = 1 AND `slot` < 0", new MySqlParameter("@character_id", query.GetInt("character_id"))))
            {
                while (equipmentQuery.NextRow())
                {
                    short slot = (short)(-(equipmentQuery.GetShort("slot")));

                    if (slot > 100)
                    {
                        slot -= 100;
                    }

                    Doublet <int, int> pair = equipment.GetOrDefault((byte)slot, null);

                    if (pair == null)
                    {
                        pair = new Doublet <int, int>(equipmentQuery.GetInt("maple_id"), 0);
                        equipment.Add((byte)slot, pair);
                    }
                    else if (equipmentQuery.GetShort("slot") < -100)
                    {
                        pair.Second = pair.First;
                        pair.First  = equipmentQuery.GetInt("maple_id");
                    }
                    else
                    {
                        pair.Second = (int)equipmentQuery["maple_id"];
                    }
                }
            }

            foreach (KeyValuePair <byte, Doublet <int, int> > pair in equipment)
            {
                oPacket.WriteByte(pair.Key);

                if (pair.Key == 11 && pair.Value.Second > 0)
                {
                    oPacket.WriteInt(pair.Value.Second);
                }
                else
                {
                    oPacket.WriteInt(pair.Value.First);
                }
            }
            oPacket.WriteByte(byte.MaxValue);

            foreach (KeyValuePair <byte, Doublet <int, int> > pair in equipment)
            {
                if (pair.Key != 11 && pair.Value.Second > 0)
                {
                    oPacket
                    .WriteByte(pair.Key)
                    .WriteInt(pair.Value.Second);
                }
            }
            oPacket.WriteByte(byte.MaxValue);

            Doublet <int, int> cashWeapon = equipment.GetOrDefault((byte)11, null);

            oPacket
            .WriteInt(cashWeapon == null ? 0 : cashWeapon.First)
            .WriteZero(12)
            .WriteByte()
            .WriteBool();
        }
Example #25
0
        public EvilVampire() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name  = NameList.RandomName("male");
            Body  = 400;
            Title = "the Vampire Lord";

            BaseSoundID = 0x482;;
            Hue         = 0;

            SetStr(350, 500);
            SetDex(100, 105);
            SetInt(3000, 4000);
            SetHits(2500, 3750);

            SetDamage(40, 50);
            SetDamageType(ResistanceType.Physical, 20);
            SetDamageType(ResistanceType.Cold, 60);
            SetDamageType(ResistanceType.Energy, 40);

            SetResistance(ResistanceType.Physical, 40, 50);
            SetResistance(ResistanceType.Fire, 30, 40);
            SetResistance(ResistanceType.Cold, 50, 60);
            SetResistance(ResistanceType.Poison, 50, 60);
            SetResistance(ResistanceType.Energy, 40, 50);

            SetSkill(SkillName.EvalInt, 150.1, 200.0);
            SetSkill(SkillName.Magery, 150.1, 200.0);
            SetSkill(SkillName.MagicResist, 200, 250.0);
            SetSkill(SkillName.Tactics, 150.0, 200.0);
            SetSkill(SkillName.Wrestling, 150.0, 200.0);

            Fame  = 20000;
            Karma = -10000;

            VirtualArmor = 90;

            PackGem();
            PackGem();
            PackGold(5000, 10000);
            PackScroll(3, 8);
            PackScroll(3, 8);
            PackMagicItems(1, 5, 0.80, 0.75);
            PackMagicItems(3, 5, 0.60, 0.45);
            PackSlayer(1);

            AddItem(new BlackStaff());
            Item m_ShortPants = new ShortPants(Utility.RandomRedHue());

            m_ShortPants.LootType = LootType.Blessed;
            AddItem(m_ShortPants);
            Item m_Doublet = new Doublet(Utility.RandomRedHue());

            m_Doublet.LootType = LootType.Blessed;
            AddItem(m_Doublet);
            Item m_sandals = new Sandals(Utility.RandomRedHue());

            m_sandals.LootType = LootType.Blessed;
            AddItem(m_sandals);

            AddItem(new PonyTail(Utility.RandomRedHue()));
        }
Example #26
0
        /// <summary>
        /// Returns the Uri and local file names of the files in the specified uri that match the search pattern.
        /// </summary>
        /// <param name="uri"></param>
        /// <param name="searchPattern"></param>
        /// <returns></returns>
        public static Doublet<Uri, FileInfo>[] GetFiles(this Uri uri, string searchPattern, bool recursiveSearch)
        {
            if (!uri.IsFileScheme())
            {
                throw new ArgumentException(String.Format("Expecting Uri scheme to be \'{0}\'.  Actual scheme is \'{1}\'."
                    , Uri.UriSchemeFile, uri.Scheme));
            }

            string searchFilePath = uri.GetFilePath();
            if (!Directory.Exists(searchFilePath))
            {
                return new Doublet<Uri, FileInfo>[0];
            }

            string pattern = !String.IsNullOrEmpty(searchPattern) ? searchPattern : "*";

            SearchOption searchOption = (recursiveSearch) ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly;
            string[] filePaths = Directory.GetFiles(searchFilePath, pattern, searchOption);
            if (filePaths.Length == 0)
            {
                return new Doublet<Uri, FileInfo>[0];
            }
            else
            {
                List<Doublet<Uri, FileInfo>> physicalFiles = new List<Doublet<Uri, FileInfo>>();
                foreach (string filePath in filePaths)
                {
                    Doublet<Uri, FileInfo> uriFileInfoPair = new Doublet<Uri, FileInfo>()
                    {
                        First = new Uri(String.Format("{0}:{1}", Uri.UriSchemeFile, filePath)),
                        Second = new FileInfo(filePath)
                    };

                    physicalFiles.Add(uriFileInfoPair);
                }

                return physicalFiles.ToArray();
            }
        }
Example #27
0
        public VampireCount() : base(AIType.AI_SphereMelee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name = "Vampire Count";
            Body = 0x0190;
            Hue  = 0x497;

            SetStr(50);
            SetDex(50);
            SetInt(50);

            SetHits(50);
            SetStam(50);

            SetDamage(10, 20);

            SetSkill(SkillName.Poisoning, 90.0, 100.0);
            SetSkill(SkillName.Tactics, 100.0);
            SetSkill(SkillName.MagicResist, 65.0, 88.0);
            SetSkill(SkillName.Parry, 75.0, 98.0);
            SetSkill(SkillName.Wrestling, 67.0, 90.0);
            SetSkill(SkillName.DetectHidden, 90.0, 100.0);
            SetSkill(SkillName.Swords, 150.0);
            SetSkill(SkillName.EvalInt, 95.0, 100.0);

            Fame = 0;

            VirtualArmor = 10;

            //Here we add his loot.
            //PackGold(1000, 1500);
            //PackItem(new VampireHeart());
            //PackItem(new VampireBone(10));

            HairItemID = 8252;
            HairHue    = Utility.RandomHairHue();

            PlateGloves glo = new PlateGloves();

            glo.Hue = 0x1;
            PackItem(glo);
            Item temp = new Doublet(0x1);

            temp.Movable = false;
            AddItem(temp);
            temp         = new ThighBoots(0x1);
            temp.Movable = false;
            AddItem(temp);
            temp         = new FancyShirt(0x0496);
            temp.Movable = false;
            AddItem(temp);
            temp         = new ShortPants(0x1);
            temp.Movable = false;
            AddItem(temp);
            temp = null;

            Spellbook book = new Spellbook();

            book.Content  = ulong.MaxValue;
            book.LootType = LootType.Regular;
            AddItem(book);
        }
Example #28
0
		public XmlQuestNPC( int gender )
			: 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;

			CanHearGhosts = true;

			SpeechHue = Utility.RandomDyedHue();
			Title = string.Empty;
			Hue = Utility.RandomSkinHue();

			switch( gender )
			{
				case -1: this.Female = Utility.RandomBool(); break;
				case 0: this.Female = false; break;
				case 1: this.Female = true; break;
			}

			if( this.Female )
			{
				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.Movable = false;

			AddItem( pack );
		}
        public FamousPiratesSuper()
            : base(AIType.AI_Mage, FightMode.Closest, 15, 1, 0.2, 0.6)
        {
            // A FamousPirates Super 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.Poisoning].Base  = 100;
            this.Skills[SkillName.Inscribe].Base   = 100;

            // Name
            this.Name = "Captain Jack Sparrow";

            // 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);

            JesterHat jhat = new JesterHat();

            jhat.Movable = false;
            jhat.Hue     = Hue;
            AddItem(jhat);

            Doublet dblt = new Doublet();

            dblt.Movable = false;
            dblt.Hue     = Hue;
            AddItem(dblt);

            // 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));
        }
Example #30
0
        public SwordPirate() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.175, 0.2)
        {
            Title     = "the pirate";
            Body      = 400;
            Team      = 1;
            Kills     = 10;
            Hue       = Utility.RandomSkinHue();
            SpeechHue = 1153;
            this.Body = 0x190;
            this.Name = NameList.RandomName("male");
            SetStr(90, 100);
            SetDex(85, 100);
            SetInt(10, 20);

            SetSkill(SkillName.Archery, 95.0, 100.0);
            SetSkill(SkillName.MagicResist, 75.0, 100.0);
            SetSkill(SkillName.Tactics, 90.0, 100.0);
            SetSkill(SkillName.Healing, 75.0, 100.0);
            SetSkill(SkillName.Anatomy, 90.0, 100.0);
            SetSkill(SkillName.Swords, 95.0, 100.0);

            Fame  = 4500;
            Karma = -4500;

            VirtualArmor = 0;

            Item hair = new Item(Utility.RandomList(0x203B, 0x2049, 0x2048, 0x204A));

            hair.Hue     = Utility.RandomHairHue();
            hair.Layer   = Layer.Hair;
            hair.Movable = false;

            Item beard = new Item(Utility.RandomList(0x2040, 0x203E, 0x204C, 0x204B, 0x203F));

            beard.Hue     = hair.Hue;
            beard.Layer   = Layer.FacialHair;
            beard.Movable = false;
            AddItem(beard);

            AddItem(hair);
            PackGold(70, 95);
            PackItem(new Bandage(20));

            switch (Utility.Random(2))
            {
            case 0:
            {
                Item scimitar = new Scimitar();
                EquipItem(scimitar);
                break;
            }

            case 1:
            {
                Item cutlass = new Cutlass();
                EquipItem(cutlass);
                break;
            }
            }

            switch (Utility.Random(3))
            {
            case 0:
            {
                Item fancyshirt = new FancyShirt();
                fancyshirt.Hue = Utility.RandomNeutralHue();
                EquipItem(fancyshirt);
                break;
            }

            case 1:
            {
                Item doublet = new Doublet();
                doublet.Hue = Utility.RandomNeutralHue();
                EquipItem(doublet);
                break;
            }

            case 2:
            {
                break;
            }
            }

            switch (Utility.Random(2))
            {
            case 0:
            {
                Item longpants = new LongPants();
                longpants.Hue = Utility.RandomNeutralHue();
                EquipItem(longpants);
                break;
            }

            case 1:
            {
                Item shortpants = new ShortPants();
                shortpants.Hue = Utility.RandomNeutralHue();
                EquipItem(shortpants);
                break;
            }
            }

            switch (Utility.Random(4))
            {
            case 0:
            {
                Item boots = new Boots();
                boots.Hue = 0;
                EquipItem(boots);
                break;
            }

            case 1:
            {
                Item shoes = new Shoes();
                shoes.Hue = 1713;
                EquipItem(shoes);
                break;
            }

            case 3:
            {
                Item thighboots = new ThighBoots();
                thighboots.Hue = 0;
                EquipItem(thighboots);
                break;
            }

            case 4:
            {
                break;
            }
            }

            switch (Utility.Random(3))
            {
            case 0:
            {
                Item Bandana = new Bandana();
                Bandana.Hue = Utility.RandomBirdHue();
                EquipItem(Bandana);
                break;
            }

            case 1:
            {
                Item skullcap = new SkullCap();
                skullcap.Hue = Utility.RandomBirdHue();
                EquipItem(skullcap);
                break;
            }

            case 3:
            {
                break;
            }
            }
        }
Example #31
0
        private void CreateClassic()
        {
            m_MoveSound    = 588;
            m_CaptureSound = 168;
            m_DeathSound   = 170;

            m_Piece.Female    = false;
            m_Piece.BodyValue = 0x190;

            if (m_BChessboard.OverrideMinorHue)
            {
                m_Piece.Hue = Hue;
            }
            else
            {
                m_Piece.Hue = m_BChessboard.SkinHue;
            }
            m_Piece.AddItem(new PonyTail(m_BChessboard.OverrideMinorHue ? Hue : m_BChessboard.HairHue));

            Item item = null;

            if (m_Color == ChessColor.White)
            {
                item = new OrderShield();
                m_Piece.AddItem(item);
            }
            else
            {
                item = new ChaosShield();
                m_Piece.AddItem(item);
            }

            item = new Doublet(MinorHue);
            m_Piece.AddItem(item);

            item     = new PlateLegs();
            item.Hue = Hue;
            m_Piece.AddItem(item);

            item     = new PlateChest();
            item.Hue = Hue;
            m_Piece.AddItem(item);

            item     = new PlateArms();
            item.Hue = Hue;
            m_Piece.AddItem(item);

            item     = new PlateGorget();
            item.Hue = Hue;
            m_Piece.AddItem(item);

            item     = new PlateGloves();
            item.Hue = Hue;
            m_Piece.AddItem(item);

            item = new Lance();
            m_Piece.AddItem(item);

            Server.Mobiles.Horse horse = new Server.Mobiles.Horse();
            if (m_Color == ChessColor.White)
            {
                horse.BodyValue = 226;
                horse.Hue       = 1150;
            }
            else
            {
                horse.BodyValue = 179;
                horse.ItemID    = 16055;
                horse.Hue       = 1109;
            }

            horse.Rider = m_Piece;

            m_Piece.Direction = Facing;
        }
Example #32
0
        public XmlQuestNPC(int gender, bool clothes) : 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;

            CanHearGhosts = true;

            SpeechHue = Utility.RandomDyedHue();
            Title     = string.Empty;
            Hue       = Utility.RandomSkinHue();

            switch (gender)
            {
            case -1: this.Female = Utility.RandomBool(); break;

            case 0: this.Female = false; break;

            case 1: this.Female = true; break;
            }

            if (clothes)
            {
                if (this.Female)
                {
                    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);
        }
Example #33
0
        public LinkFrequency <TLink> IncrementFrequency(TLink source, TLink target)
        {
            var doublet = new Doublet <TLink>(source, target);

            return(IncrementFrequency(ref doublet));
        }