Пример #1
0
			public override void OnResponse( NetState sender, RelayInfo info )
			{
				if ( m_Ticket.Deleted )
					return;

				int number = 0;
			    string message = null;

				Item item = null;

                switch ( info.ButtonID )
				{
					case 1:
				        BaseCreature parrot = new TalkingParrot {Controlled = true, ControlMaster = m_From};
				        parrot.Delta(MobileDelta.Noto);
				        item = new ShrinkItem(parrot);
                        message = "A shrunk parrot has been placed in your backpack";
                        break;
					case 2:
				        item = new ActionFigure
				                   {
				                       Name = "Lord Blackthorne action figure",
				                       Phrase1 = "That tickles!",
				                       Sound1 = 1066,
				                       Phrase2 = "Uhhh I think I had too much to drink yesterday",
				                       Sound2 = 1087,
                                       Phrase3 = "Hey, put me down!",
                                       Sound3 = 1069,
                                       Phrase4 = "Shh, I'm trying to sleep here",
                                       Sound4 = 1089,
                                       Phrase5 = "Wasn't me",
                                       Sound5 = 1064
				                   };
                        message = "A Lord Blackthorne action figure has been placed in your backpack";
                        break; 
					case 3:
				        item = new MagicCrystalBall {Hue = 1952};
                        message = "A magic crystal ball has been placed in your backpack";
                        break;
					case 4:
                        item = new FireworksWand();
                        number = 501935; // A wand of fireworks has been placed in your backpack.
                        break; 
					case 5:
                        item = new tarotpoker();
				        message = "A deck of tarot poker cards has been placed in your backpack";
                        break;
				}

				if ( item != null )
				{
					m_Ticket.Delete();

                    if (number > 0)
					    m_From.SendLocalizedMessage( number );
                    else if (!string.IsNullOrEmpty(message))
                        m_From.SendAsciiMessage(message);

					m_From.AddToBackpack( item );
				}
			}