public PlayerHouseTeleporter2ConfirmGump(Mobile from, PlayerHouseTeleporter2 pad) : base(Core.AOS ? 110 : 20, Core.AOS ? 100 : 30) { m_From = from; m_Pad = pad; Closable = false; AddPage(0); AddBackground(0, 0, 420, 280, 5054); AddImageTiled(10, 10, 400, 20, 2624); AddAlphaRegion(10, 10, 400, 20); AddHtmlLocalized(10, 10, 400, 20, 1019005, 30720, false, false); // WARNING AddImageTiled(10, 40, 400, 200, 2624); AddAlphaRegion(10, 40, 400, 200); AddHtmlLocalized(10, 40, 400, 200, 1115595, 32512, false, true); // You are about to teleport to a non-consensual PvP area. Are you certain you wish to do this? AddImageTiled(10, 250, 400, 20, 2624); AddAlphaRegion(10, 250, 400, 20); AddButton(10, 250, 4005, 4007, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(40, 250, 170, 20, 1011036, 32767, false, false); // OKAY AddButton(210, 250, 4005, 4007, 0, GumpButtonType.Reply, 0); AddHtmlLocalized(240, 250, 170, 20, 1011012, 32767, false, false); // CANCEL }
protected override void OnTarget(Mobile from, object target) { if (target is PlayerHouseTeleporter2) { PlayerHouseTeleporter2 mt = (PlayerHouseTeleporter2)target; m_Pad.Link = mt; mt.Link = m_Pad; if (m_Pad.Link.Charges > mt.Charges || mt.Charges > m_Pad.Link.Charges) { int c1 = mt.Charges; int c2 = mt.Link.Charges; int total = c1 + c2 / 2; mt.Link.Charges = total; mt.Charges = total; from.SendLocalizedMessage(1115119); //The two House Teleporters are now linked and the charges remaining have been rebalanced. } else { from.SendLocalizedMessage(1114919); //The two House Teleporters are now linked. } } else { from.SendMessage("That is not a valid target."); } }
public PlayerHouseTeleporter2ConfirmGump( Mobile from, PlayerHouseTeleporter2 pad ) : base( Core.AOS ? 110 : 20, Core.AOS ? 100 : 30 ) { m_From = from; m_Pad = pad; Closable = false; AddPage( 0 ); AddBackground( 0, 0, 420, 280, 5054 ); AddImageTiled( 10, 10, 400, 20, 2624 ); AddAlphaRegion( 10, 10, 400, 20 ); AddHtmlLocalized( 10, 10, 400, 20, 1019005, 30720, false, false ); // WARNING AddImageTiled( 10, 40, 400, 200, 2624 ); AddAlphaRegion( 10, 40, 400, 200 ); AddHtmlLocalized( 10, 40, 400, 200, 1115595, 32512, false, true ); // You are about to teleport to a non-consensual PvP area. Are you certain you wish to do this? AddImageTiled( 10, 250, 400, 20, 2624 ); AddAlphaRegion( 10, 250, 400, 20 ); AddButton( 10, 250, 4005, 4007, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 40, 250, 170, 20, 1011036, 32767, false, false ); // OKAY AddButton( 210, 250, 4005, 4007, 0, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 240, 250, 170, 20, 1011012, 32767, false, false ); // CANCEL }
public LinkTarget(PlayerHouseTeleporter2 pad) : base(1, false, TargetFlags.None) { m_Pad = pad; }
public LinkTarget( PlayerHouseTeleporter2 pad ) : base( 1, false, TargetFlags.None ) { m_Pad = pad; }