public InternalGump(Mobile from, NewPlayerTicketOSI 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 }
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 NewPlayerTicketOSI) { NewPlayerTicketOSI theirTicket = targeted as NewPlayerTicketOSI; 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. } }
public InternalTarget(NewPlayerTicketOSI ticket) : base(2, false, TargetFlags.None) { m_Ticket = ticket; }