コード例 #1
0
            public static void VendorBeg(Mobile m, object targeted, double chance)
            {
                //Console.WriteLine("Chance: {0}", chance);
                Mobile t          = (Mobile)targeted;
                Item   reward     = null;
                string rewardName = "";


                if (chance > .99 && m.Skills.Begging.Base >= 100)     //Vendor Only (1 hour cooldown)
                {
                    int rand = Utility.Random(9);                     //0-9 (10 Total) (40% chance for a item)
                    if (rand == 0)
                    {
                        reward     = new RockArtifact();                     //Rock Artifact
                        rewardName = "A rock";
                    }
                    else if (rand == 2)
                    {
                        reward     = new BeggerCoins(24);                     //Special Coins
                        rewardName = "24 dull slver coins.";
                    }
                    else if (rand == 4)                     //Fur Boots
                    {
                        reward     = new FurBoots();
                        rewardName = "a pair of Fur Boots";
                    }
                    else if (rand == 6)
                    {
                        reward     = new FlowerGarland();
                        rewardName = "a flower Garland";
                    }
                }
                Console.WriteLine("RewardName (1) {0}", reward);
                if (chance > .95 && m.Skills.Begging.Base >= 90 && reward == null)
                {
                    int rand = Utility.Random(9);
                    Console.WriteLine("Random 2 is {0}", rand);
                    if (rand == 0)
                    {
                        reward     = new BegBedRoll();
                        rewardName = "Bedroll";
                    }
                    else if (rand == 1)
                    {
                        reward     = new Cookies();
                        rewardName = "Cookies";
                    }
                    else if (rand == 3)
                    {
                        reward     = new FishSteak();
                        rewardName = "Fish Steaks";
                    }
                    else if (rand == 4)
                    {
                        reward     = new FishingPole();
                        rewardName = "Fishing Pole";
                    }
                    else if (rand == 6)
                    {
                        reward     = new BeggerCoins(12);
                        rewardName = "12 Dull Silver Coins.";
                    }
                    else if (rand == 7)
                    {
                        reward     = new Turnip();
                        rewardName = "Turnip";
                    }
                    else if (rand == 9)
                    {
                        reward     = new CeramicMug();
                        rewardName = "Ceramic Mug";
                    }
                }
                Console.WriteLine("RewardName (2) {0}", reward);
                if (reward == null)
                {
                    JunkBeg(m, t, chance);
                }
                else
                {
                    Reward(m, t, reward, rewardName);
                }
            }
コード例 #2
0
        public DryadFamiliar() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name        = "a dryad";
            Body        = 401;
            Hue         = 33770;
            BaseSoundID = 0x4B0;

            SetStr(200);
            SetDex(200);
            SetInt(100);

            SetHits(175);
            SetStam(50);

            SetDamage(6, 9);

            SetDamageType(ResistanceType.Physical, 50);
            SetDamageType(ResistanceType.Energy, 50);

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

            SetSkill(SkillName.Meditation, 110.0);
            SetSkill(SkillName.EvalInt, 110.0);
            SetSkill(SkillName.Magery, 110.0);
            SetSkill(SkillName.MagicResist, 110.0);
            SetSkill(SkillName.Tactics, 110.0);
            SetSkill(SkillName.Wrestling, 110.0);

            VirtualArmor = 45;
            ControlSlots = 2;

            Item hair = new Item(Utility.RandomList(0x203B, 0x203C, 0x203D, 0x2044, 0x2045, 0x2047, 0x2049, 0x204A));

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

            Item sash = new BodySash();

            sash.Hue     = Utility.RandomList(1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172);
            sash.Movable = false;
            AddItem(sash);

            Item shoes = new Sandals();

            shoes.Hue     = Utility.RandomList(1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172);
            shoes.Movable = false;
            AddItem(shoes);

            Item skirt = new LeatherSkirt();

            skirt.Hue     = Utility.RandomList(1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172);
            skirt.Movable = false;
            AddItem(skirt);

            Item garland = new FlowerGarland();

            garland.Hue     = Utility.RandomList(1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172);
            garland.Movable = false;
            AddItem(garland);
        }