Exemplo n.º 1
0
        public override void OnDoubleClick(Mobile m)
        {
            PlayerMobile pm = m as PlayerMobile;

            if (null == pm)
            {
                return;
            }

            // add check for getting silver sapling seed only once per day...
            if (pm.SSNextSeed > DateTime.Now)
            {
                pm.SendLocalizedMessage(1113042);    // You must wait a full day before receiving another Seed of the Silver Sapling
            }
            else
            {
                pm.SendLocalizedMessage(1113043);    // The Silver Sapling pulses with light, and a shining seed appears in your hands.
                pm.SSNextSeed = DateTime.Now + TimeSpan.FromDays(1.0);

                Item      item = new SilverSaplingSeed();
                Container pack = pm.Backpack;
                if (pack == null)
                {
                    pm.AddToBackpack(item);
                }
                else
                {
                    pack.DropItem(item);
                }
            }
        }
Exemplo n.º 2
0
		public override void OnDoubleClick( Mobile m )
		{
            PlayerMobile pm = m as PlayerMobile;
            if ( null == pm )
                return;

            // add check for getting silver sapling seed only once per day...
            if ( pm.SSNextSeed > DateTime.Now )
                pm.SendLocalizedMessage(1113042);    // You must wait a full day before receiving another Seed of the Silver Sapling
            else
            {
                pm.SendLocalizedMessage(1113043);    // The Silver Sapling pulses with light, and a shining seed appears in your hands.
                pm.SSNextSeed = DateTime.Now + TimeSpan.FromDays(1.0);

                Item item = new SilverSaplingSeed();
				Container pack = pm.Backpack;
				if( pack == null )
					pm.AddToBackpack( item );
				else
					pack.DropItem( item );
            }
		}