Esempio n. 1
0
            public InternalGump(Mobile from, NewPlayerTicket ticket) : base(50, 50)
            {
                m_From   = from;
                m_Ticket = ticket;

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

                AddHtmlLocalized(30, 45, 340, 70, 1013011, true, true); // Choose the gift you prefer. WARNING: if you cancel, and your partner does not, you will need to find another matching ticket!

                AddButton(46, 128, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0);
                AddHtmlLocalized(80, 130, 320, 35, 1013012, false, false); // A sextant

                AddButton(46, 163, 0xFA5, 0xFA7, 2, GumpButtonType.Reply, 0);
                AddHtmlLocalized(80, 165, 320, 35, 1013013, false, false); // A coupon for a single hair restyling

                AddButton(46, 198, 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0);
                AddHtmlLocalized(80, 200, 320, 35, 1013014, false, false); // A spellbook with all 1st - 4th spells.

                AddButton(46, 233, 0xFA5, 0xFA7, 4, GumpButtonType.Reply, 0);
                AddHtmlLocalized(80, 235, 320, 35, 1013015, false, false); // A wand of fireworks

                AddButton(46, 268, 0xFA5, 0xFA7, 5, GumpButtonType.Reply, 0);
                AddHtmlLocalized(80, 270, 320, 35, 1013016, false, false); // A spyglass

                AddButton(46, 303, 0xFA5, 0xFA7, 6, GumpButtonType.Reply, 0);
                AddHtmlLocalized(80, 305, 320, 35, 1013017, false, false); // Dyes and a dye tub

                AddButton(120, 340, 0xFA5, 0xFA7, 0, GumpButtonType.Reply, 0);
                AddHtmlLocalized(154, 342, 100, 35, 1011012, false, false); // CANCEL
            }
Esempio n. 2
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted == m_Ticket)
                {
                    from.SendLocalizedMessage(501928); // You can't target the same ticket!
                }
                else if (targeted is NewPlayerTicket)
                {
                    NewPlayerTicket theirTicket = targeted as NewPlayerTicket;
                    Mobile          them        = theirTicket.m_Owner;

                    if (them == null || them.Deleted)
                    {
                        from.SendLocalizedMessage(501930); // That is not a valid ticket.
                    }
                    else
                    {
                        from.SendGump(new InternalGump(from, m_Ticket));
                        them.SendGump(new InternalGump(them, theirTicket));
                    }
                }
                else if (targeted is Item && ((Item)targeted).ItemID == 0x14F0)
                {
                    from.SendLocalizedMessage(501931); // You need to find another ticket marked NEW PLAYER.
                }
                else
                {
                    from.SendLocalizedMessage(501929); // You will need to select a ticket.
                }
            }
Esempio n. 3
0
 public InternalTarget(NewPlayerTicket ticket) : base(2, false, TargetFlags.None)
 {
     m_Ticket = ticket;
 }