コード例 #1
0
ファイル: HairRestylingDeed.cs プロジェクト: nathanvy/runuo
			public InternalGump( Mobile from, HairRestylingDeed deed ) : base( 50, 50 )
			{
				m_From = from;
				m_Deed = deed;

				from.CloseGump( typeof( InternalGump ) );

				AddBackground( 100, 10, 400, 385, 0xA28 );

				AddHtmlLocalized( 100, 25, 400, 35, 1013008, false, false );
				AddButton( 175, 340, 0xFA5, 0xFA7, 0x0, GumpButtonType.Reply, 0 ); // CANCEL

				AddHtmlLocalized( 210, 342, 90, 35, 1011012, false, false );// <CENTER>HAIRSTYLE SELECTION MENU</center>

				int[][] RacialData = (from.Race == Race.Human) ? HumanArray : ElvenArray;

				for(int i=1; i<RacialData.Length; i++)
				{
					AddHtmlLocalized( LayoutArray[i][2], LayoutArray[i][3], (i==1) ? 125 : 80, (i==1) ? 70 : 35, (m_From.Female) ? RacialData[i][0] : RacialData[i][1], false, false );
					if ( LayoutArray[i][4] != 0 )
					{
						AddBackground( LayoutArray[i][0], LayoutArray[i][1], 50, 50, 0xA3C );
						AddImage( LayoutArray[i][4], LayoutArray[i][5], (m_From.Female) ? RacialData[i][4] : RacialData[i][5] );
					}
					AddButton( LayoutArray[i][6], LayoutArray[i][7], 0xFA5, 0xFA7, i, GumpButtonType.Reply, 0 );
				}
			}
コード例 #2
0
ファイル: NewPlayerTicket.cs プロジェクト: pallop/Servuo
            public override void OnResponse(NetState sender, RelayInfo info)
            {
                if (this.m_Ticket.Deleted)
                {
                    return;
                }

                int number = 0;

                Item item  = null;
                Item item2 = null;

                switch (info.ButtonID)
                {
                case 1:
                    item   = new Sextant();
                    number = 1010494;
                    break;     // A sextant has been placed in your backpack.

                case 2:
                    item   = new HairRestylingDeed();
                    number = 501933;
                    break;     // A coupon for a free hair restyling has been placed in your backpack.

                case 3:
                    item   = new Spellbook(0xFFFFFFFF);
                    number = 1010495;
                    break;     // A spellbook with all 1st to 4th circle spells has been placed in your backpack.

                case 4:
                    item   = new FireworksWand();
                    number = 501935;
                    break;     // A wand of fireworks has been placed in your backpack.

                case 5:
                    item   = new Spyglass();
                    number = 501936;
                    break;     // A spyglass has been placed in your backpack.

                case 6:
                    item   = new DyeTub();
                    item2  = new Dyes();
                    number = 501937;
                    break;     // The dyes and dye tub have been placed in your backpack.
                }

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

                    this.m_From.SendLocalizedMessage(number);
                    this.m_From.AddToBackpack(item);

                    if (item2 != null)
                    {
                        this.m_From.AddToBackpack(item2);
                    }
                }
            }
コード例 #3
0
            public InternalGump(Mobile from, HairRestylingDeed deed)
                : base(50, 50)
            {
                m_From = from;
                m_Deed = deed;

                from.CloseGump(typeof(InternalGump));

                AddBackground(100, 10, 400, 385, 0xA28);

                AddHtmlLocalized(100, 25, 400, 35, 1013008, false, false);
                AddButton(175, 340, 0xFA5, 0xFA7, 0x0, GumpButtonType.Reply, 0);          // CANCEL

                AddHtmlLocalized(210, 342, 90, 35, 1011012, false, false);                // <CENTER>HAIRSTYLE SELECTION MENU</center>

                AddBackground(220, 60, 50, 50, 0xA3C);
                AddBackground(220, 115, 50, 50, 0xA3C);
                AddBackground(220, 170, 50, 50, 0xA3C);
                AddBackground(220, 225, 50, 50, 0xA3C);
                AddBackground(425, 60, 50, 50, 0xA3C);
                AddBackground(425, 115, 50, 50, 0xA3C);
                AddBackground(425, 170, 50, 50, 0xA3C);
                AddBackground(425, 225, 50, 50, 0xA3C);
                AddBackground(425, 280, 50, 50, 0xA3C);

                AddHtmlLocalized(150, 75, 80, 35, 1011052, false, false);                 // Short
                AddHtmlLocalized(150, 130, 80, 35, 1011053, false, false);                // Long
                AddHtmlLocalized(150, 185, 80, 35, 1011054, false, false);                // Ponytail
                AddHtmlLocalized(150, 240, 80, 35, 1011055, false, false);                // Mohawk
                AddHtmlLocalized(355, 75, 80, 35, 1011047, false, false);                 // Pageboy
                AddHtmlLocalized(355, 130, 80, 35, 1011048, false, false);                // Receding
                AddHtmlLocalized(355, 185, 80, 35, 1011049, false, false);                // 2-tails
                AddHtmlLocalized(355, 240, 80, 35, 1011050, false, false);                // Topknot
                AddHtmlLocalized(355, 295, 80, 35, 1011064, false, false);                // Bald

                AddImage(153, 20, 0xC60C);
                AddImage(153, 65, 0xED24);
                AddImage(153, 120, 0xED1E);
                AddImage(153, 185, 0xC60F);
                AddImage(358, 18, 0xED26);
                AddImage(358, 75, 0xEDE5);
                AddImage(358, 120, 0xED23);
                AddImage(362, 190, 0xED29);

                AddButton(118, 73, 0xFA5, 0xFA7, 2, GumpButtonType.Reply, 0);
                AddButton(118, 128, 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0);
                AddButton(118, 183, 0xFA5, 0xFA7, 4, GumpButtonType.Reply, 0);
                AddButton(118, 238, 0xFA5, 0xFA7, 5, GumpButtonType.Reply, 0);
                AddButton(323, 73, 0xFA5, 0xFA7, 6, GumpButtonType.Reply, 0);
                AddButton(323, 128, 0xFA5, 0xFA7, 7, GumpButtonType.Reply, 0);
                AddButton(323, 183, 0xFA5, 0xFA7, 8, GumpButtonType.Reply, 0);
                AddButton(323, 238, 0xFA5, 0xFA7, 9, GumpButtonType.Reply, 0);
                AddButton(323, 292, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0);
            }
コード例 #4
0
            public InternalGump( Mobile from, HairRestylingDeed deed )
                : base(50, 50)
            {
                m_From = from;
                m_Deed = deed;

                from.CloseGump( typeof( InternalGump ) );

                AddBackground( 100, 10, 400, 385, 0xA28 );

                AddHtmlLocalized( 100, 25, 400, 35, 1013008, false, false );
                AddButton( 175, 340, 0xFA5, 0xFA7, 0x0, GumpButtonType.Reply, 0 ); // CANCEL

                AddHtmlLocalized( 210, 342, 90, 35, 1011012, false, false );// <CENTER>HAIRSTYLE SELECTION MENU</center>

                AddBackground( 220, 60, 50, 50, 0xA3C );
                AddBackground( 220, 115, 50, 50, 0xA3C );
                AddBackground( 220, 170, 50, 50, 0xA3C );
                AddBackground( 220, 225, 50, 50, 0xA3C );
                AddBackground( 425, 60, 50, 50, 0xA3C );
                AddBackground( 425, 115, 50, 50, 0xA3C );
                AddBackground( 425, 170, 50, 50, 0xA3C );
                AddBackground( 425, 225, 50, 50, 0xA3C );
                AddBackground( 425, 280, 50, 50, 0xA3C );

                AddHtmlLocalized( 150, 75, 80, 35, 1011052, false, false ); // Short
                AddHtmlLocalized( 150, 130, 80, 35, 1011053, false, false ); // Long
                AddHtmlLocalized( 150, 185, 80, 35, 1011054, false, false ); // Ponytail
                AddHtmlLocalized( 150, 240, 80, 35, 1011055, false, false ); // Mohawk
                AddHtmlLocalized( 355, 75, 80, 35, 1011047, false, false ); // Pageboy
                AddHtmlLocalized( 355, 130, 80, 35, 1011048, false, false ); // Receding
                AddHtmlLocalized( 355, 185, 80, 35, 1011049, false, false ); // 2-tails
                AddHtmlLocalized( 355, 240, 80, 35, 1011050, false, false ); // Topknot
                AddHtmlLocalized( 355, 295, 80, 35, 1011064, false, false ); // Bald

                AddImage( 153, 20, 0xC60C );
                AddImage( 153, 65, 0xED24 );
                AddImage( 153, 120, 0xED1E );
                AddImage( 153, 185, 0xC60F );
                AddImage( 358, 18, 0xED26 );
                AddImage( 358, 75, 0xEDE5 );
                AddImage( 358, 120, 0xED23 );
                AddImage( 362, 190, 0xED29 );

                AddButton( 118, 73, 0xFA5, 0xFA7, 2, GumpButtonType.Reply, 0 );
                AddButton( 118, 128, 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0 );
                AddButton( 118, 183, 0xFA5, 0xFA7, 4, GumpButtonType.Reply, 0 );
                AddButton( 118, 238, 0xFA5, 0xFA7, 5, GumpButtonType.Reply, 0 );
                AddButton( 323, 73, 0xFA5, 0xFA7, 6, GumpButtonType.Reply, 0 );
                AddButton( 323, 128, 0xFA5, 0xFA7, 7, GumpButtonType.Reply, 0 );
                AddButton( 323, 183, 0xFA5, 0xFA7, 8, GumpButtonType.Reply, 0 );
                AddButton( 323, 238, 0xFA5, 0xFA7, 9, GumpButtonType.Reply, 0 );
                AddButton( 323, 292, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
            }
コード例 #5
0
			public override void OnResponse( NetState sender, RelayInfo info )
			{
				if ( m_Ticket.Deleted )
					return;

				int number = 0;

				Item item = null;
				Item item2 = null;

				switch ( info.ButtonID )
				{
					case 1: item = new Sextant(); number = 1010494; break; // A sextant has been placed in your backpack.
					case 2: item = new HairRestylingDeed(); number = 501933; break; // A coupon for a free hair restyling has been placed in your backpack.
					//case 3: item = new Spellbook( 0xFFFFFFFF ); number = 1010495; break; // A spellbook with all 1st to 4th circle spells has been placed in your backpack.
					case 3: item = new FireworksWand(); number = 501935; break; // A wand of fireworks has been placed in your backpack.
					case 4: item = new Spyglass(); number = 501936; break; // A spyglass has been placed in your backpack.
					case 5: item = new DyeTub(); item2 = new Dyes(); number = 501937; break; // The dyes and dye tub have been placed in your backpack.
				}

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

					m_From.SendLocalizedMessage( number );
					m_From.AddToBackpack( item );

					if ( item2 != null )
						m_From.AddToBackpack( item2 );
				}
			}
コード例 #6
0
ファイル: HairRestylingDeed.cs プロジェクト: nogu3ira/xrunuo
            public InternalGump(Mobile from, HairRestylingDeed deed)
                : base(50, 50)
            {
                m_From = from;
                m_Deed = deed;

                from.CloseGump(typeof(InternalGump));

                AddPage(0);

                AddBackground(50, 10, 450, 300, 0xA28);

                AddButton(95, 250, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0);
                AddButton(320, 250, 0xFA5, 0xFA7, 0, GumpButtonType.Reply, 0);

                AddHtmlLocalized(127, 250, 90, 35, 1006044, false, false);                   // OK
                AddHtmlLocalized(352, 250, 90, 35, 1006045, false, false);                   // Cancel

                AddHtmlLocalized(235, 250, 85, 35, 1011064, false, false);                   // Bald (If you choose to go bald, you will lose your hair color.)

                AddHtmlLocalized(100, 25, 350, 20, 1018353, false, false);                   // <center>New Hairstyle</center>

                AddBackground(137, 60, 50, 50, 0xA3C);
                AddBackground(137, 125, 50, 50, 0xA3C);
                AddBackground(137, 190, 50, 50, 0xA3C);
                AddBackground(260, 60, 50, 50, 0xA3C);
                AddBackground(260, 125, 50, 50, 0xA3C);
                AddBackground(260, 190, 50, 50, 0xA3C);
                AddBackground(383, 60, 50, 50, 0xA3C);
                AddBackground(383, 125, 50, 50, 0xA3C);
                AddBackground(383, 190, 50, 50, 0xA3C);

                if (from.Race == Race.Elf)
                {
                    AddImage(50, 10, 0x6F9);
                    AddImage(50, 75, 0x6FA);
                    AddImage(50, 140, 0x6FB);
                    AddImage(173, 75, 0x6FE);
                    AddImage(173, 130, 0x6FF);
                    AddImage(300, 80, 0x701);

                    AddRadio(90, 80, 0xD0, 0xD1, false, 12224);
                    AddRadio(90, 145, 0xD0, 0xD1, false, 12225);
                    AddRadio(90, 210, 0xD0, 0xD1, false, 12226);
                    AddRadio(215, 145, 0xD0, 0xD1, false, 12238);
                    AddRadio(215, 210, 0xD0, 0xD1, false, 12239);
                    AddRadio(340, 145, 0xD0, 0xD1, false, 12241);

                    if (from.Female)
                    {
                        AddImage(296, 10, 0x6F6);
                        AddRadio(340, 80, 0xD0, 0xD1, false, 12240);
                        AddImage(300, 135, 0x6FC);
                        AddRadio(340, 210, 0xD0, 0xD1, false, 12236);
                    }
                    else
                    {
                        AddImage(173, 10, 0x6FD);
                        AddRadio(215, 80, 0xD0, 0xD1, false, 12237);
                        AddImage(300, 135, 0x6F8);
                        AddRadio(340, 210, 0xD0, 0xD1, false, 12223);
                    }
                }
                else
                {
                    AddImage(70, 20, 0xC60C);
                    AddImage(70, 75, 0xED24);
                    AddImage(70, 140, 0xED1E);
                    AddImage(193, 18, 0xED26);
                    AddImage(193, 85, 0xEDE4);
                    AddImage(193, 140, 0xED23);
                    AddImage(316, 25, 0xC60F);
                    AddImage(320, 85, 0xED29);

                    AddRadio(90, 80, 0xD0, 0xD1, false, 8251);
                    AddRadio(90, 145, 0xD0, 0xD1, false, 8252);
                    AddRadio(90, 210, 0xD0, 0xD1, false, 8253);
                    AddRadio(215, 80, 0xD0, 0xD1, false, 8261);
                    AddRadio(215, 145, 0xD0, 0xD1, false, 8263);
                    AddRadio(215, 210, 0xD0, 0xD1, false, 8265);
                    AddRadio(340, 80, 0xD0, 0xD1, false, 8260);
                    AddRadio(340, 145, 0xD0, 0xD1, false, 8266);

                    if (from.Female)
                    {
                        AddImage(317, 145, 0xED28);
                        AddRadio(340, 210, 0xD0, 0xD1, false, 8262);
                    }
                    else
                    {
                        AddImage(315, 150, 0xEDE5);
                        AddRadio(340, 210, 0xD0, 0xD1, false, 8264);
                    }
                }

                AddRadio(215, 250, 0xD0, 0xD1, false, 0);
            }
コード例 #7
0
            public override void OnResponse( NetState sender, RelayInfo info )
            {
                if ( m_Ticket.Deleted )
                    return;

                string number = "";

                Item item = null;
                Item item2 = null;

                switch ( info.ButtonID )
                {
                    case 1: item = new Sextant(); number = "A sextant has been placed in your backpack."; break;
                    case 2: item = new HairRestylingDeed(); number = "A coupon for a free hair restyling has been placed in your backpack."; break;
                    case 3: item = new Spellbook( 0xFFFFFFFF ); number = "A spellbook with all 1st to 4th circle spells has been placed in your backpack."; break;
                    case 4: item = new FireworksWand(); number = "A wand of fireworks has been placed in your backpack."; break;
                    case 5:
                    {
                        switch ( Utility.Random( 5 ) )
                        {
                            case 1:
                            {
                                item = new RangerGloves();
                                number = "A piece of ranger armor has been placed in your backpack.";
                                break;
                            }
                            case 2:
                            {
                                item = new RangerArms();
                                number = "A piece of ranger armor has been placed in your backpack.";
                                break;
                            }
                            case 3:
                            {
                                item = new RangerLegs();
                                number = "A piece of ranger armor has been placed in your backpack.";
                                break;
                            }
                            case 4:
                            {
                                item = new RangerChest();
                                number = "A piece of ranger armor has been placed in your backpack.";
                                break;
                            }
                            case 5:
                            {
                                item = new RangerGorget();
                                number = "A piece of ranger armor has been placed in your backpack.";
                                break;
                            }
                        }
                        break;
                    }
                    case 6: item = new DyeTub(); item2 = new Dyes(); number = "The dyes and dye tub have been placed in your backpack."; break;
                }

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

                    m_From.SendAsciiMessage( number );
                    m_From.AddToBackpack( item );

                    if ( item2 != null )
                        m_From.AddToBackpack( item2 );
                }
            }
コード例 #8
0
        public override void OnResponse(NetState state, RelayInfo info) //Function for GumpButtonType.Reply Buttons 
        {
            Mobile from = state.Mobile;

            switch (info.ButtonID)
            {
                case 0: //Case uses the ActionIDs defenied above. Case 0 defenies the actions for the button with the action id 0
                    {
                        //Cancel 
                        from.SendMessage(33, "You decide you dont need anything.");
                        break;
                    }
                case 1: //Magery Reagents
                    {
                        Item[] Silver = from.Backpack.FindItemsByType(typeof(Factions.Silver));
                        if (from.Backpack.ConsumeTotal(typeof(Factions.Silver), 500))
                        {
                            BagOfReagents BagOfReagents = new BagOfReagents();
                            from.AddToBackpack(BagOfReagents);
                            from.SendMessage(33, "You bought Bag of Reagents and that costs 500 coins");
                        }
                        else
                        {
                            from.SendMessage(33, "You are short the coinage needed.");
                        }
                        break;
                    }
                case 2: //Necro Reagents
                    {
                        Item[] Silver = from.Backpack.FindItemsByType(typeof(Factions.Silver));
                        if (from.Backpack.ConsumeTotal(typeof(Factions.Silver), 500))
                        {
                            BagOfNecroReagents BagOfNecroReagents = new BagOfNecroReagents();
                            from.AddToBackpack(BagOfNecroReagents);
                            from.SendMessage(33, "You bought Bag of Necromancer Reagents and that costs 500 coins");
                        }
                        else
                        {
                            from.SendMessage(33, "You are short the coinage needed.");
                        }
                        break;
                    }
                case 3: //Bandages
                    {
                        Item[] Silver = from.Backpack.FindItemsByType(typeof(Factions.Silver));
                        if (from.Backpack.ConsumeTotal(typeof(Factions.Silver), 150))
                        {
                            BagOfBandages BagOfBandages = new BagOfBandages();
                            from.AddToBackpack(BagOfBandages);
                            from.SendMessage(33, "You bought Bag of Bandages and that costs 150 coins");
                        }
                        else
                        {
                            from.SendMessage(33, "You are short the silver coinage needed.");
                        }
                        break;
                    }
                case 4: //Weapons
                    {
                        Item[] Silver = from.Backpack.FindItemsByType(typeof(Factions.Silver));
                        if (from.Backpack.ConsumeTotal(typeof(Factions.Silver), 200))
                        {
                            BagOfWeapons BagOfWeapons = new BagOfWeapons();
                            from.AddToBackpack(BagOfWeapons);
                            from.SendMessage(33, "You bought Bag of Weapons and that costs 200 coins");
                        }
                        else
                        {
                            from.SendMessage(33, "You are short the coinage needed.");
                        }
                        break;
                    }
                case 5: //Armors
                    {
                        Item[] Silver = from.Backpack.FindItemsByType(typeof(Factions.Silver));
                        if (from.Backpack.ConsumeTotal(typeof(Factions.Silver), 200))
                        {
                            BagOfArmors BagOfArmors = new BagOfArmors();
                            from.AddToBackpack(BagOfArmors);
                            from.SendMessage(33, "You bought Bag of Armors and that costs 200 coins");
                        }
                        else
                        {
                            from.SendMessage(33, "You are short the coinage needed.");
                        }
                        break;
                    }
                case 6: //Necro Reagents
                    {
                        Item[] Silver = from.Backpack.FindItemsByType(typeof(Factions.Silver));
                        if (from.Backpack.ConsumeTotal(typeof(Factions.Silver), 100))
                        {
                            BagOfClothing BagOfClothing = new BagOfClothing();
                            from.AddToBackpack(BagOfClothing);
                            from.SendMessage(33, "You bought Bag of Clothing and that costs 100 coins");
                        }
                        else
                        {
                            from.SendMessage(33, "You are short the coinage needed.");
                        }
                        break;
                    }
                case 7: //Necro Reagents
                    {
                        Item[] Silver = from.Backpack.FindItemsByType(typeof(Factions.Silver));
                        if (from.Backpack.ConsumeTotal(typeof(Factions.Silver), 500))
                        {
                            BagOfTools BagOfTools = new BagOfTools();
                            from.AddToBackpack(BagOfTools);
                            from.SendMessage(33, "You bought Bag of Tools and that costs 50 coins");
                        }
                        else
                        {
                            from.SendMessage(33, "You are short the coinage needed.");
                        }
                        break;
                    }
                case 8: //Hair Restyling
                    {
                        Item[] Silver = from.Backpack.FindItemsByType(typeof(Factions.Silver));
                        if (from.Backpack.ConsumeTotal(typeof(Factions.Silver), 150))
                        {
                            HairRestylingDeed HairRestylingDeed = new HairRestylingDeed();
                            from.AddToBackpack(HairRestylingDeed);
                            from.SendMessage(33, "You bought Hair Restyling Deed and that costs 150 coins");
                        }
                        else
                        {
                            from.SendMessage(33, "You are short the coinage needed.");
                        }
                        break;
                    }
            }
        }
コード例 #9
0
            public override void OnResponse(NetState sender, RelayInfo info)
            {
                if (m_Ticket.Deleted)
                {
                    return;
                }

                string number = "";

                Item item  = null;
                Item item2 = null;

                switch (info.ButtonID)
                {
                case 1: item = new Sextant(); number = "A sextant has been placed in your backpack."; break;

                case 2: item = new HairRestylingDeed(); number = "A coupon for a free hair restyling has been placed in your backpack."; break;

                case 3: item = new Spellbook(0xFFFFFFFF); number = "A spellbook with all 1st to 4th circle spells has been placed in your backpack."; break;

                case 4: item = new FireworksWand(); number = "A wand of fireworks has been placed in your backpack."; break;

                case 5:
                {
                    switch (Utility.Random(5))
                    {
                    case 1:
                    {
                        item   = new RangerGloves();
                        number = "A piece of ranger armor has been placed in your backpack.";
                        break;
                    }

                    case 2:
                    {
                        item   = new RangerArms();
                        number = "A piece of ranger armor has been placed in your backpack.";
                        break;
                    }

                    case 3:
                    {
                        item   = new RangerLegs();
                        number = "A piece of ranger armor has been placed in your backpack.";
                        break;
                    }

                    case 4:
                    {
                        item   = new RangerChest();
                        number = "A piece of ranger armor has been placed in your backpack.";
                        break;
                    }

                    case 5:
                    {
                        item   = new RangerGorget();
                        number = "A piece of ranger armor has been placed in your backpack.";
                        break;
                    }
                    }
                    break;
                }

                case 6: item = new DyeTub(); item2 = new Dyes(); number = "The dyes and dye tub have been placed in your backpack."; break;
                }

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

                    m_From.SendAsciiMessage(number);
                    m_From.AddToBackpack(item);

                    if (item2 != null)
                    {
                        m_From.AddToBackpack(item2);
                    }
                }
            }