protected override void OnTarget(Mobile from, object o) { if (o is PlayerMobile) { PlayerMobile target = (PlayerMobile)o; if (target == from) { from.SendMessage("You can't add yourself to your team."); } else if (m_Gump.SignedUp(target)) { from.SendMessage("They are already signed up for this tournament."); } else { from.SendMessage("Sending confirmation gump..."); target.SendMessage("You have 20 seconds to accept or decline this offer."); target.SendGump(new TAcceptGump(m_Stone, target, from, m_Gump)); Timer.DelayCall(TimeSpan.FromSeconds(20.0), new TimerStateCallback(Timesup), new object[] { target }); } } else { from.SendMessage("You can only add players to your team."); } }
public override void OnResponse(NetState state, RelayInfo info) { Mobile from = state.Mobile; switch (info.ButtonID) { case 1: //OK { from.CloseGump(typeof(TAcceptGump)); if (m_Gump.SignedUp(from)) { from.SendMessage("Sorry, you are already signed up for the tournament."); break; } m_Stone.VerifyTeamJoin(from, m_Sender); break; } case 2: //Cancel { from.CloseGump(typeof(TAcceptGump)); m_Sender.SendMessage(String.Format("{0} does not wish to join the team.", from.Name)); from.SendMessage("You decide not to join the team."); break; } } }