public override void OnResponse(NetState state, int index) { if (GuildMenu.BadMember(m_Mobile, m_Guild)) { return; } if (index == m_StringList.IndexOf("Next page")) // next { m_Mobile.SendMenu(new DeclareFealtyMenu(m_Mobile, m_Guild, m_Begin + ListSize)); } else if (index == m_StringList.IndexOf("Previous page")) // back { m_Mobile.SendMenu(new DeclareFealtyMenu(m_Mobile, m_Guild, m_Begin - ListSize)); } else { if (index >= 0 && index < m_List.Count) { Mobile m = (Mobile)m_List[index]; if (m != null && !m.Deleted) { state.Mobile.GuildFealty = m; } } m_Mobile.SendMenu(new GuildMenu(m_Mobile, m_Guild)); } }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } if (index == m_StringList.IndexOf("Next page")) // next { m_Mobile.SendMenu(new GrantProtectionMenu(m_Mobile, m_Guild, m_List, m_Begin + 11)); } else if (index == m_StringList.IndexOf("Previous page")) // back { m_Mobile.SendMenu(new GrantProtectionMenu(m_Mobile, m_Guild, m_List, m_Begin - 11)); } else { if (index >= 0 && index < m_List.Count) { Mobile m = (Mobile)m_List[index]; if (m != null && !m.Deleted) { if (!m_Guild.AddProtection(m)) { m_Mobile.SendAsciiMessage("They already have guild protection on another character."); } } } m_Mobile.SendMenu(new GuildProtectionMenu(m_Mobile, m_Guild)); } }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadMember(m_Mobile, m_Guild)) { return; } switch (index) { case 0: { string website; if ((website = m_Guild.Website) == null || (website = website.Trim()).Length <= 0) { website = DefaultWebsite; } m_Mobile.LaunchBrowser(website); break; } case 1: { m_Mobile.SendMenu(new GuildMenu(m_Mobile, m_Guild)); break; } } }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } if (index == m_StringList.IndexOf("Next page")) // next { m_Mobile.SendMenu(new GrantGuildTitleMenu(m_Mobile, m_Guild, m_Begin + ListSize)); } else if (index == m_StringList.IndexOf("Previous page")) // back { m_Mobile.SendMenu(new GrantGuildTitleMenu(m_Mobile, m_Guild, m_Begin - ListSize)); } else { if (index >= 0 && index < m_List.Count) { Mobile m = (Mobile)m_List[index]; if (m != null && !m.Deleted) { m_Mobile.SendAsciiMessage("New title (20 characters max):"); // New title (20 characters max): m_Mobile.Prompt = new GuildTitlePrompt(m_Mobile, m, m_Guild); } } } }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } if (index == 0) //accept { m_Guild.Candidates.Remove(m_Candidate); m_Guild.Accepted.Add(m_Candidate); if (m_Guild.Candidates.Count > 0) { m_Mobile.SendMenu(new GuildAdminCandidatesMenu(m_Mobile, m_Guild, 0)); } else { m_Mobile.SendMenu(new GuildmasterMenu(m_Mobile, m_Guild)); } } else // reject { m_Guild.Candidates.Remove(m_Candidate); if (m_Guild.Candidates.Count > 0) { m_Mobile.SendMenu(new GuildAdminCandidatesMenu(m_Mobile, m_Guild, 0)); } else { m_Mobile.SendMenu(new GuildmasterMenu(m_Mobile, m_Guild)); } } }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } if (index == m_StringList.IndexOf("Next page")) // next { m_Mobile.SendMenu(new GuildAdminCandidatesMenu(m_Mobile, m_Guild, m_Begin + ListSize)); } else if (index == m_StringList.IndexOf("Previous page")) // back { m_Mobile.SendMenu(new GuildAdminCandidatesMenu(m_Mobile, m_Guild, m_Begin - ListSize)); } else { if (index >= 0 && index < m_List.Count) { Mobile m = (Mobile)m_List[index]; if (m != null && !m.Deleted) { m_Mobile.SendMenu(new GuildCandidateMenu(m_Mobile, m_Guild, m)); } } } }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } if (index == m_StringList.IndexOf("Next page")) // next { m_Mobile.SendMenu(new RevokeProtectionMenu(m_Mobile, m_Guild, m_List, m_Begin + 11)); } else if (index == m_StringList.IndexOf("Previous page")) // back { m_Mobile.SendMenu(new RevokeProtectionMenu(m_Mobile, m_Guild, m_List, m_Begin - 11)); } else { if (index >= 0 && index < m_List.Count) { Mobile m = (Mobile)m_List[index]; if (m != null && !m.Deleted) { m_Guild.RemoveProtection(m); } } m_Mobile.SendMenu(new GuildProtectionMenu(m_Mobile, m_Guild)); } }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } if (index == m_StringList.IndexOf("Next page")) // next { m_Mobile.SendMenu(new GuildDismissMenu(m_Mobile, m_Guild, m_Begin + ListSize)); } else if (index == m_StringList.IndexOf("Previous page")) // back { m_Mobile.SendMenu(new GuildDismissMenu(m_Mobile, m_Guild, m_Begin - ListSize)); } else { if (index >= 0 && index < m_List.Count) { Mobile m = (Mobile)m_List[index]; if (m != null && !m.Deleted) { m_Guild.RemoveMember(m); if (m_Mobile.AccessLevel >= AccessLevel.GameMaster || m_Mobile == m_Guild.Leader) { m_Mobile.SendMenu(new GuildmasterMenu(m_Mobile, m_Guild)); } } } } }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadMember(m_Mobile, m_Guild)) { return; } switch (index) { case 0: m_Mobile.SendMenu(new InternalWarMenu(m_Mobile, m_Guild, 0)); break; case 1: m_Mobile.SendMenu(new InternalDeclarationsMenu(m_Mobile, m_Guild, 0)); break; case 2: m_Mobile.SendMenu(new InternalDeclaredMenu(m_Mobile, m_Guild, 0)); break; case 3: default: m_Mobile.SendMenu(new GuildMenu(m_Mobile, m_Guild)); break; } }
public override void OnCancel(NetState state) { if (GuildMenu.BadMember(m_Mobile, m_Guild)) { return; } m_Mobile.SendMenu(new GuildWarMenu(m_Mobile, m_Guild)); }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadMember(m_Mobile, m_Guild)) { return; } m_Mobile.SendMenu(new GuildMenu(m_Mobile, m_Guild)); }
public override void OnCancel(NetState state) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } m_Mobile.SendMenu(new GuildProtectionMenu(m_Mobile, m_Guild)); }
public override void OnCancel(NetState state) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } m_Mobile.SendMenu(new GuildAdminCandidatesMenu(m_Mobile, m_Guild, 0)); }
public override void OnCancel(Network.NetState state) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } m_Mobile.SendMenu(new GuildmasterMenu(m_Mobile, m_Guild)); }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } if (index == m_StringList.IndexOf("Next page")) // next { m_Mobile.SendMenu(new GuildDeclareWarMenu(m_Mobile, m_Guild, m_Begin + ListSize, m_List)); } else if (index == m_StringList.IndexOf("Previous page")) // back { m_Mobile.SendMenu(new GuildDeclareWarMenu(m_Mobile, m_Guild, m_Begin - ListSize, m_List)); } else { if (index >= 0 && index < m_List.Count) { Guild g = m_List[index]; if (g != null) { if (g == m_Guild) { m_Mobile.SendAsciiMessage("You cannot declare war against yourself!"); // You cannot declare war against yourself! } else if ((g.WarInvitations.Contains(m_Guild) && m_Guild.WarDeclarations.Contains(g)) || m_Guild.IsWar(g)) { m_Mobile.SendAsciiMessage("You are already at war with that guild."); // You are already at war with that guild. } else if (Faction.Find(m_Guild.Leader) != null) { m_Mobile.SendLocalizedMessage(1005288); // You cannot declare war while you are in a faction } else { if (!m_Guild.WarDeclarations.Contains(g)) { m_Guild.WarDeclarations.Add(g); m_Guild.GuildTextMessage(String.Format("Guild Message: Your guild has sent an invitation for war: {0} ({1})", g.Name, g.Abbreviation)); // Guild Message: Your guild has sent an invitation for war: } if (!g.WarInvitations.Contains(m_Guild)) { g.WarInvitations.Add(m_Guild); g.GuildTextMessage(String.Format("Guild Message: Your guild has received an invitation to war: {0} ({1})", m_Guild.Name, m_Guild.Abbreviation)); // Guild Message: Your guild has received an invitation to war: } } m_Mobile.SendMenu(new GuildWarAdminMenu(m_Mobile, m_Guild)); } } } }
public override void OnResponse(Network.NetState state, int index) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } switch (index) { case 0: //toggle protection { m_Mobile.SendMenu(new ConfirmToggle(m_Mobile, m_Guild, !m_Guild.IsProtected(m_Guild.Leader))); break; } case 1: //set house sign m_Mobile.SendMenu(new HouseSignMenu(m_Mobile, m_Guild)); break; case 2: //grant protection if (m_Guild.IsProtected(m_Guild.Leader)) { List <Mobile> list = new List <Mobile>(m_Guild.Members); list.Remove(m_Guild.Leader); m_Mobile.SendMenu(new GrantProtectionMenu(m_Mobile, m_Guild, list, 0)); } else { m_Mobile.SendAsciiMessage("You must enable guild protection first."); m_Mobile.SendMenu(new GuildProtectionMenu(m_Mobile, m_Guild)); } break; case 3: //revoke protection if (m_Guild.IsProtected(m_Guild.Leader)) { List <Mobile> list = new List <Mobile>(m_Guild.Protected); list.Remove(m_Guild.Leader); m_Mobile.SendMenu(new RevokeProtectionMenu(m_Mobile, m_Guild, list, 0)); } else { m_Mobile.SendAsciiMessage("You must enable guild protection first."); m_Mobile.SendMenu(new GuildProtectionMenu(m_Mobile, m_Guild)); } break; case 4: //return to main menu default: m_Mobile.SendMenu(new GuildmasterMenu(m_Mobile, m_Guild)); break; } }
public override void OnResponse(Network.NetState state, int index) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } if (index == 0) //yes { if (TurnOn) { Container bank = m_Mobile.FindBankNoCreate(); // Add guild leader as protected if (!m_Guild.AddProtection(m_Mobile)) { m_Mobile.SendAsciiMessage("You already have guild protection on another character."); return; } if (bank != null && bank.ConsumeTotal(typeof(Gold), 10000)) { m_Guild.LastProtectionPayment = DateTime.Now; } else { m_Guild.RemoveProtection(m_Mobile); m_Mobile.SendAsciiMessage("You lack the required funds in your bank account to enable protection."); } } else { m_Guild.ClearAllProtection(); } m_Mobile.SendMenu(new GuildProtectionMenu(m_Mobile, m_Guild)); } else //no { m_Mobile.SendMenu(new GuildProtectionMenu(m_Mobile, m_Guild)); } }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadMember(m_Mobile, m_Guild)) { return; } if (index == m_StringList.IndexOf("Next page")) // next { m_Mobile.SendMenu(new DeclareFealtyMenu(m_Mobile, m_Guild, m_Begin + ListSize)); } else if (index == m_StringList.IndexOf("Previous page")) // back { m_Mobile.SendMenu(new DeclareFealtyMenu(m_Mobile, m_Guild, m_Begin - ListSize)); } else { m_Mobile.SendMenu(new GuildMenu(m_Mobile, m_Guild)); } }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } m_Guild.GuildHouseSignItemID = InitialSignId + (index * 2); PlayerMobile pm; foreach (Mobile m in m_Guild.Protected) { pm = m as PlayerMobile; if (pm.ProtectedHouse != null) { pm.ProtectedHouse.ChangeSignType(m_Guild.GuildHouseSignItemID); } } }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } if (index == m_StringList.IndexOf("Next page")) // next { m_Mobile.SendMenu(new GuildAcceptWarMenu(m_Mobile, m_Guild, m_Begin + ListSize)); } else if (index == m_StringList.IndexOf("Previous page")) // back { m_Mobile.SendMenu(new GuildAcceptWarMenu(m_Mobile, m_Guild, m_Begin - ListSize)); } else { if (index >= 0 && index < m_List.Count) { Guild g = (Guild)m_List[index]; if (g != null) { m_Guild.WarInvitations.Remove(g); g.WarDeclarations.Remove(m_Guild); m_Guild.AddEnemy(g); m_Guild.GuildTextMessage(String.Format("Guild Message: Your guild is now at war: {0} ({1})", g.Name, g.Abbreviation)); if (m_Guild.WarInvitations.Count > 0) { m_Mobile.SendMenu(new GuildAcceptWarMenu(m_Mobile, m_Guild, m_Begin)); } else { m_Mobile.SendMenu(new GuildmasterMenu(m_Mobile, m_Guild)); } } } } }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadMember(m_Mobile, m_Guild)) { return; } Mobile from = state.Mobile; if (index == m_StringList.IndexOf("Next page")) // next { m_Mobile.SendMenu(new GuildRosterMenu(m_Mobile, m_Guild, m_Begin + 11)); } else if (index == m_StringList.IndexOf("Previous page")) // back { m_Mobile.SendMenu(new GuildRosterMenu(m_Mobile, m_Guild, m_Begin - 11)); } else { m_Mobile.SendMenu(new GuildMenu(m_Mobile, m_Guild)); } }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } if (index == m_StringList.IndexOf("Next page")) // next { m_Mobile.SendMenu(new GuildDeclarePeaceMenu(m_Mobile, m_Guild, m_Begin + ListSize)); } else if (index == m_StringList.IndexOf("Previous page")) // back { m_Mobile.SendMenu(new GuildDeclarePeaceMenu(m_Mobile, m_Guild, m_Begin - ListSize)); } else { if (index >= 0 && index < m_List.Count) { Guild g = (Guild)m_List[index]; if (g != null) { m_Guild.RemoveEnemy(g); m_Guild.GuildTextMessage(String.Format("Guild Message: You are now at peace with this guild: {0} ({1})", g.Name, g.Abbreviation)); // Guild Message: You are now at peace with this guild: if (m_Guild.Enemies.Count > 0) { m_Mobile.SendMenu(new GuildDeclarePeaceMenu(m_Mobile, m_Guild, m_Begin)); } else { m_Mobile.SendMenu(new GuildmasterMenu(m_Mobile, m_Guild)); } } } } }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } if (index == m_StringList.IndexOf("Next page")) // next { m_Mobile.SendMenu(new GuildRescindDeclarationMenu(m_Mobile, m_Guild, m_Begin + ListSize)); } else if (index == m_StringList.IndexOf("Previous page")) // back { m_Mobile.SendMenu(new GuildRescindDeclarationMenu(m_Mobile, m_Guild, m_Begin - ListSize)); } else { if (index >= 0 && index < m_List.Count) { Guild g = (Guild)m_List[index]; if (g != null) { m_Guild.WarDeclarations.Remove(g); g.WarInvitations.Remove(m_Guild); if (m_Guild.WarDeclarations.Count > 0) { m_Mobile.SendMenu(new GuildRescindDeclarationMenu(m_Mobile, m_Guild, m_Begin)); } else { m_Mobile.SendMenu(new GuildmasterMenu(m_Mobile, m_Guild)); } } } } }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } switch (index) { case 9: //guild protection { m_Mobile.SendMenu(new GuildProtectionMenu(m_Mobile, m_Guild)); break; } case 10: // Main menu { m_Mobile.SendMenu(new GuildMenu(m_Mobile, m_Guild)); break; } case 0: // Set guild name { m_Mobile.SendAsciiMessage("Enter new guild name (40 characters max):"); // Enter new guild name (40 characters max): m_Mobile.Prompt = new GuildNamePrompt(m_Mobile, m_Guild); break; } case 1: // Set guild abbreviation { m_Mobile.SendAsciiMessage("Enter new guild abbreviation (3 characters max):"); // Enter new guild abbreviation (3 characters max): m_Mobile.Prompt = new GuildAbbrvPrompt(m_Mobile, m_Guild); break; } case 2: // Set charter { m_Mobile.SendAsciiMessage("Enter the new guild charter (50 characters max):"); // Enter the new guild charter (50 characters max): m_Mobile.Prompt = new GuildCharterPrompt(m_Mobile, m_Guild); break; } case 3: // Dismiss member { m_Mobile.SendMenu(new GuildDismissMenu(m_Mobile, m_Guild, 0)); break; } case 4: // War menu { m_Mobile.SendMenu(new GuildWarAdminMenu(m_Mobile, m_Guild)); break; } case 5: // Administer candidates { m_Mobile.SendMenu(new GuildAdminCandidatesMenu(m_Mobile, m_Guild, 0)); break; } case 6: // Set guildmaster's title { m_Mobile.SendAsciiMessage("Enter new guildmaster title (20 characters max):"); // Enter new guildmaster title (20 characters max): m_Mobile.Prompt = new GuildTitlePrompt(m_Mobile, m_Mobile, m_Guild); break; } case 7: // Grant title { m_Mobile.SendMenu(new GrantGuildTitleMenu(m_Mobile, m_Guild, 0)); break; } case 8: // Move guildstone { if (m_Guild.Guildstone != null) { GuildTeleporter item = new GuildTeleporter(m_Guild.Guildstone); if (m_Guild.Teleporter != null) { m_Guild.Teleporter.Delete(); } m_Mobile.SendAsciiMessage("Use the teleporting object placed in your backpack to move this guildstone."); // Use the teleporting object placed in your backpack to move this guildstone. m_Mobile.AddToBackpack(item); m_Guild.Teleporter = item; } m_Mobile.SendMenu(new GuildmasterMenu(m_Mobile, m_Guild)); break; } } }
public override void OnResponse(NetState state, int index) { if (GuildMenu.BadLeader(m_Mobile, m_Guild)) { return; } switch (index + 1) { case 1: // Declare war { m_Mobile.SendAsciiMessage("Declare war through search - Enter Guild Name:"); // Declare war through search - Enter Guild Name: m_Mobile.Prompt = new GuildDeclareWarPrompt(m_Mobile, m_Guild); break; } case 2: // Declare peace { if (m_Guild.Enemies.Count > 0) { m_Mobile.SendMenu(new GuildDeclarePeaceMenu(m_Mobile, m_Guild, 0)); } else { m_Mobile.SendMenu(new GuildWarAdminMenu(m_Mobile, m_Guild)); m_Mobile.SendAsciiMessage("No current wars"); } break; } case 3: // Accept war { if (m_Guild.WarInvitations.Count > 0) { m_Mobile.SendMenu(new GuildAcceptWarMenu(m_Mobile, m_Guild, 0)); } else { m_Mobile.SendMenu(new GuildWarAdminMenu(m_Mobile, m_Guild)); m_Mobile.SendAsciiMessage("No current invitations received for war."); } break; } case 4: // Reject war { if (m_Guild.WarInvitations.Count > 0) { m_Mobile.SendMenu(new GuildRejectWarMenu(m_Mobile, m_Guild, 0)); } else { m_Mobile.SendMenu(new GuildWarAdminMenu(m_Mobile, m_Guild)); m_Mobile.SendAsciiMessage("No current invitations received for war."); } break; } case 5: // Rescind declarations { if (m_Guild.WarDeclarations.Count > 0) { m_Mobile.SendMenu(new GuildRescindDeclarationMenu(m_Mobile, m_Guild, 0)); } else { m_Mobile.SendMenu(new GuildWarAdminMenu(m_Mobile, m_Guild)); m_Mobile.SendAsciiMessage("No current war declarations"); } break; } case 6: // Return { m_Mobile.SendMenu(new GuildmasterMenu(m_Mobile, m_Guild)); break; } } }