コード例 #1
0
ファイル: PvPStone.cs プロジェクト: MythikGN/Mythik
        public override void OnDoubleClick(Mobile from)
        {
            PlayerMobile pm    = (PlayerMobile)from;
            var          reags = new BagOfReagents(50);

            reags.DropItem(new TotalManaPotion()
            {
                Amount = 25
            });
            reags.DropItem(new GreaterHealPotion()
            {
                Amount = 25
            });
            reags.DropItem(new InvisibilityPotion()
            {
                Amount = 25
            });
            reags.DropItem(new GreaterCurePotion()
            {
                Amount = 10
            });
            reags.DropItem(new GreaterRestorePotion()
            {
                Amount = 25
            });
            pm.AddToBackpack(reags);
            pm.SendMessage("A bag of PvP supplies has been added to your backpack.");
        }
コード例 #2
0
        public override void OnDoubleClick(Mobile from)
        {
            BagOfReagents regBag = new BagOfReagents(50);

            Item[] items = new Item[] { new FlamestrikeScroll(25), new LightningScroll(25), new GreaterHealScroll(10), new MagicReflectScroll(10), new Bandage(80) };

            foreach (Item i in items)
            {
                i.Weight = 0.01;
                regBag.DropItem(i);
            }

            Point3D itemLocation = Point3D.Zero;

            for (int i = 0; i < 40; ++i)
            {
                GreaterHealPotion hp   = new GreaterHealPotion();
                ManaPotion        mana = new ManaPotion();

                regBag.DropItem(hp);
                regBag.DropItem(mana);

                if (i == 0)
                {
                    itemLocation  = hp.Location;
                    mana.Location = itemLocation;
                }
                else
                {
                    hp.Location   = itemLocation;
                    mana.Location = itemLocation;
                }
            }

            if (!from.AddToBackpack(regBag))
            {
                regBag.Delete();
            }
        }
コード例 #3
0
ファイル: ResStone.cs プロジェクト: FreeReign/imaginenation
		public override void OnDoubleClick( Mobile from )
		{
			BagOfReagents regBag = new BagOfReagents( 50 );

			Item[] items = new Item[] { new FlamestrikeScroll( 25 ), new LightningScroll( 25 ), new GreaterHealScroll( 10 ), new MagicReflectScroll( 10 ), new Bandage( 80 ) };

			foreach( Item i in items )
			{
				i.Weight = 0.01;
				regBag.DropItem( i );
			}

			Point3D itemLocation = Point3D.Zero;
			for( int i = 0; i < 40; ++i )
			{
				GreaterHealPotion hp = new GreaterHealPotion();
				ManaPotion mana = new ManaPotion();

				regBag.DropItem( hp );
				regBag.DropItem( mana );

				if( i == 0 )
				{
					itemLocation = hp.Location;
					mana.Location = itemLocation;
				}
				else
				{
					hp.Location = itemLocation;
					mana.Location = itemLocation;
				}
			}

			if( !from.AddToBackpack( regBag ) )
				regBag.Delete();
		}