Example #1
0
            public override void OnResponse(NetState sender, RelayInfo info)
            {
                if (m_Deed == null || m_Deed.Deleted)
                {
                    return;
                }

                Mobile from = sender.Mobile;

                if (!m_Deed.IsChildOf(from.Backpack))
                {
                    from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it
                    return;
                }

                Item statue = null;

                switch (info.ButtonID)
                {
                case 1:
                    statue = new SnowStatuePegasus();
                    break;

                case 2:
                    statue = new SnowStatueSeahorse();
                    break;

                case 3:
                    statue = new SnowStatueMermaid();
                    break;

                case 4:
                    statue = new SnowStatueGriffon();
                    break;
                }

                if (statue == null)
                {
                    return;
                }

                if (!from.PlaceInBackpack(statue))
                {
                    statue.Delete();
                    from.SendLocalizedMessage(1078837); // Your backpack is full! Please make room and try again.
                }
                else
                {
                    m_Deed.Delete();
                }
            }
Example #2
0
			public override void OnResponse( NetState sender, RelayInfo info )
			{
				if ( m_Deed == null || m_Deed.Deleted )
					return;

				Mobile from = sender.Mobile;

				if ( !m_Deed.IsChildOf( from.Backpack ) )
				{
					from.SendLocalizedMessage( 1042038 ); // You must have the object in your backpack to use it
					return;
				}

				Item statue = null;

				switch ( info.ButtonID )
				{
					case 1: statue = new SnowStatuePegasus(); break;
					case 2: statue = new SnowStatueSeahorse(); break;
					case 3: statue = new SnowStatueMermaid(); break;
					case 4: statue = new SnowStatueGriffon(); break;
				}

				if ( statue == null )
					return;

				if ( !from.PlaceInBackpack( statue ) )
				{
					statue.Delete();
					from.SendLocalizedMessage( 1078837 ); // Your backpack is full! Please make room and try again.
				}
				else
				{
					m_Deed.Delete();
				}
			}