private static void EventSink_Logout(LogoutEventArgs args) { Mobile m = args.Mobile; if (PageQueue.Contains(m)) { PageQueue.Cancel(m); } }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile from = sender.Mobile; int button = info.ButtonID; switch (button) { default: Subject s = (Subject)(button - 10); from.SendGump(new HelpMenu(s, from)); break; case 0: break; case 1: from.SendGump(new HelpMenu()); break; case 2: from.SendGump(this); if (!PageQueue.CheckAllowedToPage(from)) { break; } if (PageQueue.Contains(from)) { from.SendMenu(new ContainedMenu(from)); } else { from.SendLocalizedMessage(501234, "", 0x35); //Next available counselor will respond... if (p_Subject != null) { PageQueue.Enqueue(new PageEntry(from, String.Format("This is an automated message: {0} needs assistance with Help Menu subject \"{1}\".", from.Name, Variables.SubjectTitle(p_Subject.Subject)), PageType.Other)); } else { PageQueue.Enqueue(new PageEntry(from, String.Format("This is an automated message: {0} needs assistance.", from.Name), PageType.Other)); } } break; case 3: from.SendGump(this); from.SendMessage("Launching website, please wait..."); from.LaunchBrowser(Variables.Website); break; } }
private static void EventSink_HelpRequest(HelpRequestEventArgs args) { Mobile m = args.Mobile; if (m.HasGump(typeof(HelpGump)) || !PageQueue.AllowedToPage(m)) { return; } if (PageQueue.Contains(m)) { m.SendMenu(new ContainedMenu(m)); } else { m.SendGump(new HelpGump(m)); } }