public override void OnResponse(NetState state, RelayInfo info) { Mobile from = state.Mobile; if (from == null) { return; } int button = info.ButtonID; switch (button) { case 0: break; case 1: m_Mobile.SendGump(new FriendListGump(m_Mobile, m_Page - 1)); break; case 2: m_Mobile.SendGump(new FriendListGump(m_Mobile, m_Page + 1)); break; case 5: { m_Mobile.Target = new AddFriendTarget(); m_Mobile.SendMessage(133, "Target somebody to make them your friend."); break; } case 9: { m_Mobile.SendMessage(133, "To send a message to a friend named Lolipop, type \"[FTell Lolipop Hello friend!\""); m_Mobile.SendMessage(133, "To write a player whom has spaces in his name, use _ instead of spaces as example: \"[FTell John_Adams I think you're cute!\"."); m_Mobile.SendMessage(133, "You don't have to type your friend's whole name to send him a message. The first two letters of the name is enough."); m_Mobile.SendMessage(133, "You cannot send tells to a player unless he/she is on your list."); m_Mobile.SendGump(new FriendListGump(m_Mobile)); break; } default: { ArrayList friends = FriendSystem.GetFriendList(m_Mobile).MutualFriends; int f = button - 10; if (f >= 100) { f -= 100; if (f < 0 || f >= friends.Count) { return; } Mobile friend = (Mobile)friends[f]; m_Mobile.SendMessage(133, "Enter a message to send {0}.", friend.Name); m_Mobile.Prompt = new FriendTellPrompt(m_Mobile, friend); } else { if (f < 0 || f >= friends.Count) { return; } FriendSystem.RemoveFriend(m_Mobile, (Mobile)friends[f]); m_Mobile.SendGump(new FriendListGump(m_Mobile)); } break; } } }