コード例 #1
0
        public static void Fill(LockableContainer cont, int level)
        {
            cont.Movable     = false;
            cont.TrapEnabled = false;
            cont.Locked      = false;

            int bandies = CoreAI.SpiritDepotBandies;
            int ghpots  = CoreAI.SpiritDepotGHPots;
            int regs    = CoreAI.SpiritDepotReagents;
            int trpots  = CoreAI.SpiritDepotTRPots;

            Item item = null;

            // add a couple lesser explosion potions
            //	these are for batteling hiders in the cave and not for damage
            for (int ix = 0; ix < 2; ix++)
            {
                item = new LesserExplosionPotion();
                cont.DropItem(item);
            }

            // add bandages
            item = new Bandage(bandies);
            cont.DropItem(item);

            // add greater heal potions
            for (int ix = 0; ix < ghpots; ix++)
            {
                item = new GreaterHealPotion();
                cont.DropItem(item);
            }

            // add total refresh potions
            for (int ix = 0; ix < trpots; ix++)
            {
                item = new TotalRefreshPotion();
                cont.DropItem(item);
            }
            // drop reagents
            cont.DropItem(new BagOfReagents(regs));

            // drop res scroll
            cont.DropItem(new ResurrectionScroll());

            return;
        }
コード例 #2
0
		public static void Fill( LockableContainer cont, int level )
		{
			cont.Movable = false;
			cont.TrapEnabled = false;
			cont.Locked = false;

			int bandies = CoreAI.SpiritDepotBandies;
			int ghpots = CoreAI.SpiritDepotGHPots;
			int regs = CoreAI.SpiritDepotReagents;
			int trpots = CoreAI.SpiritDepotTRPots;

			Item item = null;

			// add a couple lesser explosion potions
			//	these are for batteling hiders in the cave and not for damage
			for( int ix=0; ix < 2; ix++ )
			{
				item = new LesserExplosionPotion();
				cont.DropItem(item);
			}

			// add bandages
			item = new Bandage(bandies);
			cont.DropItem(item);

			// add greater heal potions
			for( int ix=0; ix < ghpots; ix++ )
			{
				item = new GreaterHealPotion();
				cont.DropItem(item);
			}

			// add total refresh potions
			for( int ix=0; ix < trpots; ix++ )
			{
				item = new TotalRefreshPotion();
				cont.DropItem(item);
			}
			// drop reagents
			cont.DropItem( new BagOfReagents( regs ) );

			// drop res scroll
			cont.DropItem( new ResurrectionScroll() ); 

			return;
		}
コード例 #3
0
        /// <summary>
        /// Overrides the Double-Click option on the item. Supplies the
        /// player that double-clicks on the stone with appropriate gear
        /// based upon their skill levels.
        /// </summary>
        /// <param name="m">PlayerMobile to be supplied</param>
        public override void OnDoubleClick(Mobile m)
        {
            if (m.Backpack != null)
            {
                if (((m.X) == this.X || (m.X - 1) == this.X || (m.X + 1) == this.X) && ((m.Y) == this.Y || (m.Y - 1) == this.Y || (m.Y + 1) == this.Y))
                {
                    if (!Tourney)
                    {
                        Supply(new BagOfPots(8, 8, 4, 4, 5), m, typeof(BagOfPots));
                        for (int i = 1; i <= 5; i++)
                        {
                            TrapableContainer con = new Pouch();
                            con.TrapType  = TrapType.MagicTrap;
                            con.TrapLevel = 1;
                            con.TrapPower = 1;

                            if (!m.AddToBackpack(con))
                            {
                                con.Delete();
                            }
                        }
                    }
                    else
                    {
                        for (int i = 1; i <= 10; i++)
                        {
                            Item item = new TotalRefreshPotion();

                            if (!m.AddToBackpack(item))
                            {
                                item.Delete();
                            }
                        }
                    }

                    if (m.Skills[SkillName.Magery].Value >= 50.0 || m.Str <= 50)
                    {
                        EquipArmor(new LeatherLegs(), true, m, typeof(LeatherLegs), m_EquipHue);
                        EquipArmor(new LeatherGorget(), true, m, typeof(LeatherGorget), m_EquipHue);
                        EquipArmor(new LeatherGloves(), true, m, typeof(LeatherGloves), m_EquipHue);
                        EquipArmor(new LeatherChest(), true, m, typeof(LeatherChest), m_EquipHue);
                        EquipArmor(new LeatherArms(), true, m, typeof(LeatherArms), m_EquipHue);
                        EquipArmor(new LeatherCap(), true, m, typeof(LeatherCap), m_EquipHue);
                    }
                    else
                    {
                        EquipArmor(new ChainLegs(), true, m, typeof(ChainLegs), m_EquipHue);
                        EquipArmor(new LeatherGorget(), true, m, typeof(LeatherGorget), m_EquipHue);
                        EquipArmor(new RingmailGloves(), true, m, typeof(RingmailGloves), m_EquipHue);
                        EquipArmor(new ChainChest(), true, m, typeof(ChainChest), m_EquipHue);
                        EquipArmor(new RingmailArms(), true, m, typeof(RingmailArms), m_EquipHue);
                        EquipArmor(new CloseHelm(), true, m, typeof(CloseHelm), m_EquipHue);
                    }

                    if (m.Skills[SkillName.Magery].Value >= 50.0)
                    {
                        Container pack = m.Backpack;
                        if (pack.FindItemByType(typeof(Spellbook)) == null)
                        {
                            Spellbook book = new Spellbook();
                            book.Content  = ulong.MaxValue;
                            book.LootType = LootType.Regular;

                            if (!m.AddToBackpack(book))
                            {
                                book.Delete();
                            }
                        }

                        Supply(new BagOfReagents(50), m, typeof(BagOfReagents));
                    }

                    if (m.Skills[SkillName.Healing].Value >= 50.0 || m.Skills[SkillName.Veterinary].Value >= 50)
                    {
                        Supply(new Bandage(50), m, typeof(Bandage));
                    }

                    if (m.Skills[SkillName.Swords].Value >= 50.0)
                    {
                        EquipItem(new Katana(), true, m, typeof(Katana));
                        EquipItem(new Halberd(), false, m, typeof(Halberd));
                        EquipItem(new BattleAxe(), false, m, typeof(BattleAxe));
                    }

                    if (m.Skills[SkillName.Fencing].Value >= 50.0)
                    {
                        EquipItem(new Kryss(), true, m, typeof(Kryss));
                        EquipItem(new ShortSpear(), false, m, typeof(ShortSpear));
                        EquipItem(new Spear(), false, m, typeof(Spear));
                    }

                    if (m.Skills[SkillName.Macing].Value >= 50.0)
                    {
                        EquipItem(new Mace(), true, m, typeof(Mace));
                        EquipItem(new QuarterStaff(), false, m, typeof(QuarterStaff));
                        EquipItem(new WarHammer(), false, m, typeof(WarHammer));
                    }

                    if (m.Skills[SkillName.Archery].Value >= 50.0)
                    {
                        EquipItem(new Bow(), false, m, typeof(Bow));
                        EquipItem(new Crossbow(), false, m, typeof(Crossbow));
                        EquipItem(new HeavyCrossbow(), false, m, typeof(HeavyCrossbow));

                        Supply(new Arrow(50), m, typeof(Arrow));
                        Supply(new Bolt(50), m, typeof(Bolt));
                    }
                }
                else
                {
                    m.SendMessage("You reach out but cannot seem to touch the stone...");
                }
            }
            else
            {
                m.SendMessage("For some reason you don't seem to have a backpack...");
            }
        }
コード例 #4
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendMessage("This must be in your backpack to use.");
                return;
            }
            else
            {
                Item item = new Bandage(); item.Amount = Utility.RandomMinMax(5, 30); from.AddToBackpack(item);

                if (Utility.RandomMinMax(1, 2) == 1)
                {
                    item = new LesserHealPotion(); Server.Items.BasePotion.MakePillBottle(item); item.Amount = Utility.RandomMinMax(1, 10); from.AddToBackpack(item);
                }
                if (Utility.RandomMinMax(1, 2) == 1)
                {
                    item = new LesserCurePotion(); Server.Items.BasePotion.MakePillBottle(item); item.Amount = Utility.RandomMinMax(1, 10); from.AddToBackpack(item);
                }
                if (Utility.RandomMinMax(1, 2) == 1)
                {
                    item = new LesserRejuvenatePotion(); Server.Items.BasePotion.MakePillBottle(item); item.Amount = Utility.RandomMinMax(1, 10); from.AddToBackpack(item);
                }

                if (Utility.RandomMinMax(1, 4) == 1)
                {
                    item = new HealPotion(); Server.Items.BasePotion.MakePillBottle(item); item.Amount = Utility.RandomMinMax(1, 5); from.AddToBackpack(item);
                }
                if (Utility.RandomMinMax(1, 4) == 1)
                {
                    item = new CurePotion(); Server.Items.BasePotion.MakePillBottle(item); item.Amount = Utility.RandomMinMax(1, 5); from.AddToBackpack(item);
                }
                if (Utility.RandomMinMax(1, 4) == 1)
                {
                    item = new RefreshPotion(); Server.Items.BasePotion.MakePillBottle(item); item.Amount = Utility.RandomMinMax(1, 5); from.AddToBackpack(item);
                }
                if (Utility.RandomMinMax(1, 4) == 1)
                {
                    item = new RejuvenatePotion(); Server.Items.BasePotion.MakePillBottle(item); item.Amount = Utility.RandomMinMax(1, 5); from.AddToBackpack(item);
                }

                if (Utility.RandomMinMax(1, 10) == 1)
                {
                    item = new TotalRefreshPotion(); Server.Items.BasePotion.MakePillBottle(item); item.Amount = Utility.RandomMinMax(1, 3); from.AddToBackpack(item);
                }
                if (Utility.RandomMinMax(1, 10) == 1)
                {
                    item = new GreaterCurePotion(); Server.Items.BasePotion.MakePillBottle(item); item.Amount = Utility.RandomMinMax(1, 3); from.AddToBackpack(item);
                }
                if (Utility.RandomMinMax(1, 10) == 1)
                {
                    item = new GreaterHealPotion(); Server.Items.BasePotion.MakePillBottle(item); item.Amount = Utility.RandomMinMax(1, 3); from.AddToBackpack(item);
                }
                if (Utility.RandomMinMax(1, 10) == 1)
                {
                    item = new GreaterRejuvenatePotion(); Server.Items.BasePotion.MakePillBottle(item); item.Amount = Utility.RandomMinMax(1, 3); from.AddToBackpack(item);
                }

                from.PrivateOverheadMessage(MessageType.Regular, 0x14C, false, "You dump the contents out into your pack.", from.NetState);
                this.Delete();
            }
        }
コード例 #5
0
ファイル: SupplyStone.cs プロジェクト: greeduomacro/RunUO-1
        /// <summary>
        /// Overrides the Double-Click option on the item. Supplies the
        /// player that double-clicks on the stone with appropriate gear
        /// based upon their skill levels.
        /// </summary>
        /// <param name="m">PlayerMobile to be supplied</param>
        public override void OnDoubleClick(Mobile m)
        {
            if (m.Backpack != null)
            {
                if (((m.X) == this.X || (m.X - 1) == this.X || (m.X + 1) == this.X) && ((m.Y) == this.Y || (m.Y - 1) == this.Y || (m.Y + 1) == this.Y))
                {
                    if (!Tourney)
                    {
                        Supply(new BagOfPots(8, 8, 4, 4, 5), m, typeof(BagOfPots));
                        for (int i = 1; i <= 5; i++)
                        {
                            TrapableContainer con = new Pouch();
                            con.TrapType = TrapType.MagicTrap;
                            con.TrapLevel = 1;
                            con.TrapPower = 1;

                            if (!m.AddToBackpack(con))
                                con.Delete();
                        }
                    }
                    else
                    {
                        for (int i = 1; i <= 10; i++)
                        {
                            Item item = new TotalRefreshPotion();

                            if (!m.AddToBackpack(item))
                                item.Delete();
                        }
                    }

                    if (m.Skills[SkillName.Magery].Value >= 50.0 || m.Str <= 50)
                    {
                        EquipArmor(new LeatherLegs(), true, m, typeof(LeatherLegs), m_EquipHue);
                        EquipArmor(new LeatherGorget(), true, m, typeof(LeatherGorget), m_EquipHue);
                        EquipArmor(new LeatherGloves(), true, m, typeof(LeatherGloves), m_EquipHue);
                        EquipArmor(new LeatherChest(), true, m, typeof(LeatherChest), m_EquipHue);
                        EquipArmor(new LeatherArms(), true, m, typeof(LeatherArms), m_EquipHue);
                        EquipArmor(new LeatherCap(), true, m, typeof(LeatherCap), m_EquipHue);
                    }
                    else
                    {
                        EquipArmor(new ChainLegs(), true, m, typeof(ChainLegs), m_EquipHue);
                        EquipArmor(new LeatherGorget(), true, m, typeof(LeatherGorget), m_EquipHue);
                        EquipArmor(new RingmailGloves(), true, m, typeof(RingmailGloves), m_EquipHue);
                        EquipArmor(new ChainChest(), true, m, typeof(ChainChest), m_EquipHue);
                        EquipArmor(new RingmailArms(), true, m, typeof(RingmailArms), m_EquipHue);
                        EquipArmor(new CloseHelm(), true, m, typeof(CloseHelm), m_EquipHue);
                    }

                    if (m.Skills[SkillName.Magery].Value >= 50.0)
                    {
                        Container pack = m.Backpack;
                        if (pack.FindItemByType(typeof(Spellbook)) == null)
                        {
                            Spellbook book = new Spellbook();
                            book.Content = ulong.MaxValue;
                            book.LootType = LootType.Regular;

                            if (!m.AddToBackpack(book))
                                book.Delete();
                        }

                        Supply(new BagOfReagents(50), m, typeof(BagOfReagents));
                    }

                    if (m.Skills[SkillName.Healing].Value >= 50.0 || m.Skills[SkillName.Veterinary].Value >= 50)
                    {
                        Supply(new Bandage(50), m, typeof(Bandage));
                    }

                    if (m.Skills[SkillName.Swords].Value >= 50.0)
                    {

                        EquipItem(new Katana(), true, m, typeof(Katana));
                        EquipItem(new Halberd(), false, m, typeof(Halberd));
                        EquipItem(new BattleAxe(), false, m, typeof(BattleAxe));
                    }

                    if (m.Skills[SkillName.Fencing].Value >= 50.0)
                    {

                        EquipItem(new Kryss(), true, m, typeof(Kryss));
                        EquipItem(new ShortSpear(), false, m, typeof(ShortSpear));
                        EquipItem(new Spear(), false, m, typeof(Spear));
                    }

                    if (m.Skills[SkillName.Macing].Value >= 50.0)
                    {
                        EquipItem(new Mace(), true, m, typeof(Mace));
                        EquipItem(new QuarterStaff(), false, m, typeof(QuarterStaff));
                        EquipItem(new WarHammer(), false, m, typeof(WarHammer));
                    }

                    if (m.Skills[SkillName.Archery].Value >= 50.0)
                    {

                        EquipItem(new Bow(), false, m, typeof(Bow));
                        EquipItem(new Crossbow(), false, m, typeof(Crossbow));
                        EquipItem(new HeavyCrossbow(), false, m, typeof(HeavyCrossbow));

                        Supply(new Arrow(50), m, typeof(Arrow));
                        Supply(new Bolt(50), m, typeof(Bolt));
                    }
                }
                else
                {
                    m.SendMessage("You reach out but cannot seem to touch the stone...");
                }
            }
            else
            {
                m.SendMessage("For some reason you don't seem to have a backpack...");
            }
        }
コード例 #6
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!from.InLOS(this.GetWorldLocation()))
            {
                from.SendLocalizedMessage(502800);                   // You can't see that.
                return;
            }

            if (from.GetDistanceToSqrt(this.GetWorldLocation()) > 4)
            {
                from.SendLocalizedMessage(500446);                   // That is too far away.
                return;
            }

            from.SendMessage("You have been given some supplies based on your skills.");

            //4 pouches
            for (int i = 0; i < 4; ++i)
            {
                Pouch p = new Pouch();
                p.TrapType  = TrapType.MagicTrap;
                p.TrapPower = 1;
                p.Hue       = 0x25;
                PackItem(from, p);
            }

            if (from.Skills[SkillName.Magery].Value >= 50.0)
            {
                GiveLeatherArmor(from);
            }
            else
            {
                GiveBoneArmor(from);
            }

            if (from.Skills[SkillName.Magery].Value >= 50.0)
            {
                PackItem(from, new BagOfReagents());
            }

            if (from.Skills[SkillName.Healing].Value >= 50.0)
            {
                PackItem(from, new Bandage(100));
            }

            if (from.Skills[SkillName.Fencing].Value >= 50.0)
            {
                PackItem(from, new ShortSpear());
                if (from.Skills[SkillName.Parry].Value >= 50.0)
                {
                    GiveItem(from, new Kryss());
                    GiveItem(from, new MetalKiteShield());
                }
                else
                {
                    GiveItem(from, new Spear());
                }
            }

            if (from.Skills[SkillName.Swords].Value >= 50.0)
            {
                if (from.Skills[SkillName.Parry].Value >= 50.0)
                {
                    GiveItem(from, new MetalKiteShield());
                }

                GiveItem(from, new Katana());
                GiveItem(from, new Halberd());
            }

            if (from.Skills[SkillName.Macing].Value >= 50.0)
            {
                if (from.Skills[SkillName.Parry].Value >= 50.0)
                {
                    GiveItem(from, new MetalKiteShield());
                }
                GiveItem(from, new WarAxe());
                GiveItem(from, new WarHammer());
            }

            if (from.Skills[SkillName.Archery].Value >= 50.0)
            {
                GiveItem(from, new HeavyCrossbow());
                GiveItem(from, new Crossbow());
                GiveItem(from, new Bow());

                PackItem(from, new Bolt(100));
                PackItem(from, new Arrow(100));
            }

            if (from.Skills[SkillName.Poisoning].Value >= 50.0)
            {
                for (int i = 0; i < 5; i++)
                {
                    PackItem(from, new GreaterPoisonPotion());
                }
            }

            PlayerMobile pm = (PlayerMobile)(from);

            Container bag      = new Bag();
            Container backpack = pm.Backpack;

            for (int i = 0; i < 20; i++)
            {
                GreaterCurePotion cure = new GreaterCurePotion();
                bag.DropItem(cure);
            }

            for (int i = 0; i < 20; i++)
            {
                GreaterHealPotion heal = new GreaterHealPotion();
                bag.DropItem(heal);
            }

            for (int i = 0; i < 20; i++)
            {
                TotalRefreshPotion refresh = new TotalRefreshPotion();
                bag.DropItem(refresh);
            }

            backpack.DropItem(bag);
        }
コード例 #7
0
        public BasePotion FillBottle()
        {
            BasePotion pot;

            switch (m_Type)
            {
            default:
            case PotionEffect.Nightsight:           pot = new NightSightPotion(); break;

            case PotionEffect.CureLesser:           pot = new LesserCurePotion(); break;

            case PotionEffect.Cure:                         pot = new CurePotion(); break;

            case PotionEffect.CureGreater:          pot = new GreaterCurePotion(); break;

            case PotionEffect.Agility:                      pot = new AgilityPotion(); break;

            case PotionEffect.AgilityGreater:       pot = new GreaterAgilityPotion(); break;

            case PotionEffect.Strength:                     pot = new StrengthPotion(); break;

            case PotionEffect.StrengthGreater:      pot = new GreaterStrengthPotion(); break;

            case PotionEffect.PoisonLesser:         pot = new LesserPoisonPotion(); break;

            case PotionEffect.Poison:                       pot = new PoisonPotion(); break;

            case PotionEffect.PoisonGreater:        pot = new GreaterPoisonPotion(); break;

            case PotionEffect.PoisonDeadly:         pot = new DeadlyPoisonPotion(); break;

            case PotionEffect.Refresh:                      pot = new RefreshPotion(); break;

            case PotionEffect.RefreshTotal:         pot = new TotalRefreshPotion(); break;

            case PotionEffect.HealLesser:           pot = new LesserHealPotion(); break;

            case PotionEffect.Heal:                         pot = new HealPotion(); break;

            case PotionEffect.HealGreater:          pot = new GreaterHealPotion(); break;

            case PotionEffect.ExplosionLesser:      pot = new LesserExplosionPotion(); break;

            case PotionEffect.Explosion:            pot = new ExplosionPotion(); break;

            case PotionEffect.ExplosionGreater:     pot = new GreaterExplosionPotion(); break;

            case PotionEffect.Conflagration:        pot = new ConflagrationPotion(); break;

            case PotionEffect.ConflagrationGreater: pot = new GreaterConflagrationPotion(); break;

            case PotionEffect.MaskOfDeath:          pot = new MaskOfDeathPotion(); break;

            case PotionEffect.MaskOfDeathGreater:   pot = new GreaterMaskOfDeathPotion(); break;

            case PotionEffect.ConfusionBlast:               pot = new ConfusionBlastPotion(); break;

            case PotionEffect.ConfusionBlastGreater:        pot = new GreaterConfusionBlastPotion(); break;
            }
            if (this.Cheater_Name != null)
            {
                pot.Cheater_Name = this.Cheater_Name;
            }
            return(pot);
        }