diff --git a/Projects/Server/Network/NetState/DumpNetStates.cs b/Projects/Server/Network/NetState/DumpNetStates.cs index 24b98b9eb..be3c2bdea 100644 --- a/Projects/Server/Network/NetState/DumpNetStates.cs +++ b/Projects/Server/Network/NetState/DumpNetStates.cs @@ -21,7 +21,7 @@ public static class DumpNetStates { public static void Configure() { - CommandSystem.Register("DumpNetStates", AccessLevel.Administrator, DumpNetStatesCommand); + CommandSystem.Register("DumpNetStates", AccessLevel.Developer, DumpNetStatesCommand); } public static void DumpNetStatesCommand(CommandEventArgs args) diff --git a/Projects/UOContent/Commands/ExportWSC.cs b/Projects/UOContent/Commands/ExportWSC.cs index 5b870cf92..3d08afc18 100644 --- a/Projects/UOContent/Commands/ExportWSC.cs +++ b/Projects/UOContent/Commands/ExportWSC.cs @@ -6,20 +6,30 @@ namespace Server.Commands { public static class ExportCommand { - private const string ExportFile = @"C:\Uo\WorldForge\items.wsc"; - public static void Configure() { - CommandSystem.Register("ExportWSC", AccessLevel.Administrator, Export_OnCommand); + CommandSystem.Register("ExportWSC", AccessLevel.Developer, Export_OnCommand); } + [Usage("ExportWSC ")] + [Description("Exports all static items to a WSC file. This will delete all static items in the world. Please make a backup.")] public static void Export_OnCommand(CommandEventArgs e) { - var w = new StreamWriter(ExportFile); + if (e.Arguments.Length < 1) + { + e.Mobile.SendMessage("Usage: [ExportWSC ]"); + return; + } + + var exportFilePath = e.GetString(0); + var fi = new FileInfo(exportFilePath); + fi.Directory.EnsureDirectory(); + + var w = new StreamWriter(exportFilePath); var remove = new List(); var count = 0; - e.Mobile.SendMessage($"Exporting all static items to \"{ExportFile}\"..."); + e.Mobile.SendMessage($"Exporting all static items to \"{exportFilePath}\"..."); e.Mobile.SendMessage("This will delete all static items in the world. Please make a backup."); foreach (var item in World.Items.Values) @@ -60,7 +70,7 @@ namespace Server.Commands item.Delete(); } - e.Mobile.SendMessage($"Export complete. Exported {count} statics."); + e.Mobile.SendMessage($"Export complete. Exported {count} statics."); } } } diff --git a/Projects/UOContent/Commands/GenCommands.cs b/Projects/UOContent/Commands/GenCommands.cs index 5268e6322..22fab6953 100644 --- a/Projects/UOContent/Commands/GenCommands.cs +++ b/Projects/UOContent/Commands/GenCommands.cs @@ -15,7 +15,7 @@ public static class GenCommands CommandSystem.Register("GenCommands", AccessLevel.Developer, GenCommandsWebpage_OnCommand); } - [Usage("GenCommands []")] + [Usage("GenCommands")] [Aliases("GenCmdWeb")] [Description("Generates a webpage to the web folder with a list of all commands.")] private static void GenCommandsWebpage_OnCommand(CommandEventArgs e) diff --git a/Projects/UOContent/Commands/HelpInfo.cs b/Projects/UOContent/Commands/HelpInfo.cs index 2f49d79eb..f3768e9df 100644 --- a/Projects/UOContent/Commands/HelpInfo.cs +++ b/Projects/UOContent/Commands/HelpInfo.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Reflection; using Server.Commands.Generic; using Server.Gumps; using Server.Network; @@ -87,36 +88,23 @@ public static class HelpInfo var mi = e.Handler.Method; - var attrs = mi.GetCustomAttributes(typeof(UsageAttribute), false); + var usageAttr = mi.GetCustomAttribute(typeof(UsageAttribute), false) as UsageAttribute; + var usage = usageAttr?.Usage; - if (attrs.Length == 0) - { - continue; - } - - var usage = attrs[0] as UsageAttribute; - - attrs = mi.GetCustomAttributes(typeof(DescriptionAttribute), false); - - if (attrs.Length == 0) - { - continue; - } - - if (usage == null || attrs[0] is not DescriptionAttribute desc) - { - continue; - } - - attrs = mi.GetCustomAttributes(typeof(AliasesAttribute), false); - - var aliases = attrs.Length == 0 ? null : attrs[0] as AliasesAttribute; - - var descString = desc.Description + var descAttr = mi.GetCustomAttribute(typeof(DescriptionAttribute), false) as DescriptionAttribute; + var desc = descAttr?.Description .ReplaceOrdinal("<", "(") .ReplaceOrdinal(">", ")"); - list.Add(new CommandInfo(e.AccessLevel, e.Command, aliases?.Aliases, usage.Usage, null, descString)); + if (e.Handler.Target == null && usage == null && desc == null) + { + continue; + } + + var aliasesAttr = mi.GetCustomAttribute(typeof(AliasesAttribute), false) as AliasesAttribute; + var aliases = aliasesAttr?.Aliases; + + list.Add(new CommandInfo(e.AccessLevel, e.Command, aliases, usage, null, desc)); } for (var i = 0; i < TargetCommands.AllCommands.Count; ++i) @@ -165,16 +153,11 @@ public static class HelpInfo { var command = commandImpls[i]; - var usage = command.Usage; - var desc = command.Description; - - if (usage == null || desc == null) - { - continue; - } - var cmds = command.Accessors; var cmd = cmds[0]; + + var desc = command.Description ?? "No description available."; + var usage = command.Usage ?? cmd; var aliases = new string[cmds.Length - 1]; for (var j = 0; j < aliases.Length; ++j) diff --git a/Projects/UOContent/Commands/Object Creation/DecorateMag.cs b/Projects/UOContent/Commands/Object Creation/DecorateMag.cs index 66c66ddc6..8a19d146a 100644 --- a/Projects/UOContent/Commands/Object Creation/DecorateMag.cs +++ b/Projects/UOContent/Commands/Object Creation/DecorateMag.cs @@ -24,7 +24,7 @@ namespace Server.Commands } [Usage("DecorateMag")] - [Description("Generates world decoration.")] + [Description("Generates world decoration for Magincia after it was ruined.")] private static void DecorateMag_OnCommand(CommandEventArgs e) { m_Mobile = e.Mobile; diff --git a/Projects/UOContent/Engines/ConPVP/DuelContext.cs b/Projects/UOContent/Engines/ConPVP/DuelContext.cs index 2b9402313..025178f2c 100644 --- a/Projects/UOContent/Engines/ConPVP/DuelContext.cs +++ b/Projects/UOContent/Engines/ConPVP/DuelContext.cs @@ -1239,6 +1239,9 @@ namespace Server.Engines.ConPVP CommandSystem.Register("vli", AccessLevel.GameMaster, vli_oc); } + [Usage("vli")] + [Aliases("ViewLadderInfo")] + [Description("View ladder information.")] private static void vli_oc(CommandEventArgs e) { e.Mobile.BeginTarget(-1, false, TargetFlags.None, vli_ot); diff --git a/Projects/UOContent/Engines/Doom/GenGauntlet.cs b/Projects/UOContent/Engines/Doom/GenGauntlet.cs index ea37ee5f8..c770afa85 100644 --- a/Projects/UOContent/Engines/Doom/GenGauntlet.cs +++ b/Projects/UOContent/Engines/Doom/GenGauntlet.cs @@ -12,6 +12,8 @@ namespace Server.Engines.Doom CommandSystem.Register("RemGauntlet", AccessLevel.Developer, RemoveGauntlet); } + [Usage("RemGauntlet")] + [Description("Removes the Gauntlet from Dungeon Doom.")] public static void RemoveGauntlet(CommandEventArgs e) { RemoveMobile(387, 400); @@ -45,6 +47,8 @@ namespace Server.Engines.Doom RemoveItem(433, 326, 4); } + [Usage("GenGauntlet")] + [Description("Generates the Gauntlet in Dungeon Doom.")] public static void GenGauntlet_OnCommand(CommandEventArgs e) { RemoveGauntlet(e); diff --git a/Projects/UOContent/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs b/Projects/UOContent/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs index 7e97095b3..8af67df58 100644 --- a/Projects/UOContent/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs +++ b/Projects/UOContent/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs @@ -192,10 +192,11 @@ public partial class LeverPuzzleController : Item public static void Configure() { - CommandSystem.Register("GenLeverPuzzle", AccessLevel.Administrator, GenLampPuzzle_OnCommand); + CommandSystem.Register("GenLeverPuzzle", AccessLevel.Developer, GenLampPuzzle_OnCommand); } - [Usage("GenLeverPuzzle"), Description("Generates lamp room and lever puzzle in doom.")] + [Usage("GenLeverPuzzle")] + [Description("Generates lamp room and lever puzzle in doom.")] public static void GenLampPuzzle_OnCommand(CommandEventArgs e) { foreach (var item in Map.Malas.GetItemsAt(lp_Center)) diff --git a/Projects/UOContent/Engines/Factions/Core/Faction.cs b/Projects/UOContent/Engines/Factions/Core/Faction.cs index 15f7a79f4..c0bb0b049 100644 --- a/Projects/UOContent/Engines/Factions/Core/Faction.cs +++ b/Projects/UOContent/Engines/Factions/Core/Faction.cs @@ -657,6 +657,8 @@ namespace Server.Factions Timer.DelayCall(TimeSpan.FromSeconds(30.0), TimeSpan.FromSeconds(30.0), ProcessTick); } + [Usage("FactionTownReset")] + [Description("Resets all faction town data in the world.")] public static void FactionTownReset_OnCommand(CommandEventArgs e) { var monoliths = BaseMonolith.Monoliths; @@ -715,6 +717,8 @@ namespace Server.Factions } } + [Usage("FactionReset")] + [Description("Resets all faction data in the world.")] public static void FactionReset_OnCommand(CommandEventArgs e) { var monoliths = BaseMonolith.Monoliths; @@ -787,6 +791,8 @@ namespace Server.Factions } } + [Usage("FactionItemReset")] + [Description("Resets all faction items in the world.")] public static void FactionItemReset_OnCommand(CommandEventArgs e) { var items = new List(); @@ -869,6 +875,8 @@ namespace Server.Factions } } + [Usage("FactionElection")] + [Description("Opens the election properties for the targeted faction stone.")] public static void FactionElection_OnCommand(CommandEventArgs e) { e.Mobile.SendMessage("Target a faction stone to open its election properties."); diff --git a/Projects/UOContent/Engines/Factions/Core/Generator.cs b/Projects/UOContent/Engines/Factions/Core/Generator.cs index 6cd6fbe0f..97f3a0e40 100644 --- a/Projects/UOContent/Engines/Factions/Core/Generator.cs +++ b/Projects/UOContent/Engines/Factions/Core/Generator.cs @@ -9,6 +9,9 @@ namespace Server.Factions CommandSystem.Register("GenerateFactions", AccessLevel.Developer, GenerateFactions_OnCommand); } + [Usage("GenerateFactions")] + [Aliases("FactionGen", "GenFactions")] + [Description("Enables and generates factions.")] public static void GenerateFactions_OnCommand(CommandEventArgs e) { var from = e.Mobile; diff --git a/Projects/UOContent/Engines/Factions/Core/Town.cs b/Projects/UOContent/Engines/Factions/Core/Town.cs index 2a13fa11f..480b60f16 100644 --- a/Projects/UOContent/Engines/Factions/Core/Town.cs +++ b/Projects/UOContent/Engines/Factions/Core/Town.cs @@ -544,6 +544,8 @@ namespace Server.Factions return null; } + [Usage("GrantTownSilver ")] + [Description("Grants silver to the town of the current region.")] public static void GrantTownSilver_OnCommand(CommandEventArgs e) { var town = FromRegion(e.Mobile.Region); diff --git a/Projects/UOContent/Engines/Khaldun/KhaldunGen.cs b/Projects/UOContent/Engines/Khaldun/KhaldunGen.cs index 3057a9c43..5ee4316a7 100644 --- a/Projects/UOContent/Engines/Khaldun/KhaldunGen.cs +++ b/Projects/UOContent/Engines/Khaldun/KhaldunGen.cs @@ -113,6 +113,8 @@ namespace Server.Commands m_Count++; } + [Usage("GenKhaldun")] + [Description("Generates Khaldun Puzzles")] public static void GenKhaldun_OnCommand(CommandEventArgs e) { m_Count = 0; diff --git a/Projects/UOContent/Engines/Party/Party.cs b/Projects/UOContent/Engines/Party/Party.cs index 03c28b130..4b86149c8 100644 --- a/Projects/UOContent/Engines/Party/Party.cs +++ b/Projects/UOContent/Engines/Party/Party.cs @@ -105,6 +105,8 @@ namespace Server.Engines.PartySystem CommandSystem.Register("ListenToParty", AccessLevel.GameMaster, ListenToParty_OnCommand); } + [Usage("ListenToParty")] + [Description("Listen to the targeted player's party chat.")] public static void ListenToParty_OnCommand(CommandEventArgs e) { e.Mobile.BeginTarget(-1, false, TargetFlags.None, ListenToParty_OnTarget); diff --git a/Projects/UOContent/Engines/Pathing/MovementPath.cs b/Projects/UOContent/Engines/Pathing/MovementPath.cs index 1652dd053..2ae2e714b 100644 --- a/Projects/UOContent/Engines/Pathing/MovementPath.cs +++ b/Projects/UOContent/Engines/Pathing/MovementPath.cs @@ -61,6 +61,8 @@ namespace Server CommandSystem.Register("Path", AccessLevel.GameMaster, Path_OnCommand); } + [Usage("Path")] + [Description("Draws a path from your current location to a targeted location.")] public static void Path_OnCommand(CommandEventArgs e) { e.Mobile.BeginTarget(-1, true, TargetFlags.None, Path_OnTarget); diff --git a/Projects/UOContent/Engines/Spawners/Commands/ConvertPremiumSpawners.cs b/Projects/UOContent/Engines/Spawners/Commands/ConvertPremiumSpawners.cs index 57238a1b3..9afa835a3 100644 --- a/Projects/UOContent/Engines/Spawners/Commands/ConvertPremiumSpawners.cs +++ b/Projects/UOContent/Engines/Spawners/Commands/ConvertPremiumSpawners.cs @@ -34,6 +34,8 @@ namespace Server.Engines.Spawners CommandSystem.Register("ConvertPremiumSpawners", AccessLevel.Developer, ConvertPremiumSpawners_OnCommand); } + [Usage("ConvertPremiumSpawners ")] + [Description("Converts Nerun's Premium Spawners to JSON.")] private static void ConvertPremiumSpawners_OnCommand(CommandEventArgs args) { var from = args.Mobile; diff --git a/Projects/UOContent/Engines/Spawners/Commands/GenerateSpawnersCommand.cs b/Projects/UOContent/Engines/Spawners/Commands/GenerateSpawnersCommand.cs index f0743e7de..2b43e2fa0 100644 --- a/Projects/UOContent/Engines/Spawners/Commands/GenerateSpawnersCommand.cs +++ b/Projects/UOContent/Engines/Spawners/Commands/GenerateSpawnersCommand.cs @@ -1,18 +1,3 @@ -/************************************************************************* - * ModernUO * - * Copyright 2019-2023 - ModernUO Development Team * - * Email: hi@modernuo.com * - * File: GenerateSpawnersCommand.cs * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program. If not, see . * - *************************************************************************/ - using System; using System.Collections.Generic; using System.Diagnostics; @@ -37,6 +22,9 @@ namespace Server.Engines.Spawners CommandSystem.Register("GenerateSpawners", AccessLevel.Developer, GenerateSpawners_OnCommand); } + [Usage("GenerateSpawners ")] + [Aliases("ImportSpawners", "GenSpawners", "GenSpawns")] + [Description("Generates spawners from JSON files. Supports basic globbing.")] private static void GenerateSpawners_OnCommand(CommandEventArgs e) { var from = e.Mobile; diff --git a/Projects/UOContent/Engines/Spawners/SpawnerControllerGump.cs b/Projects/UOContent/Engines/Spawners/SpawnerControllerGump.cs index 387acc492..a1ecb8156 100644 --- a/Projects/UOContent/Engines/Spawners/SpawnerControllerGump.cs +++ b/Projects/UOContent/Engines/Spawners/SpawnerControllerGump.cs @@ -34,9 +34,12 @@ public class SpawnerControllerGump : GumpGrid public static void Configure() { - CommandSystem.Register("Spawn", AccessLevel.GameMaster, OpenSpawnGump_OnCommand); + CommandSystem.Register("SpawnAdmin", AccessLevel.GameMaster, OpenSpawnGump_OnCommand); } + [Usage("Spawn")] + [Aliases("Spawn")] + [Description("Opens the spawn administration gump.")] public static void OpenSpawnGump_OnCommand(CommandEventArgs e) { e.Mobile.SendGump(new SpawnerControllerGump(e.Mobile)); diff --git a/Projects/UOContent/Gumps/AdminGump.cs b/Projects/UOContent/Gumps/AdminGump.cs index 607c65281..66846478f 100644 --- a/Projects/UOContent/Gumps/AdminGump.cs +++ b/Projects/UOContent/Gumps/AdminGump.cs @@ -264,12 +264,23 @@ namespace Server.Gumps AddButtonLabeled(20, 175, GetButtonID(3, 101), "Teleporters"); AddButtonLabeled(220, 175, GetButtonID(3, 102), "Moongates"); - AddButtonLabeled(20, 200, GetButtonID(3, 103), "Generate Spawns"); - AddButtonLabeled(220, 200, GetButtonID(3, 106), "Decoration"); + AddButtonLabeled(20, 200, GetButtonID(3, 103), "Spawners"); + AddButtonLabeled(220, 200, GetButtonID(3, 106), "Decorations"); AddButtonLabeled(20, 225, GetButtonID(3, 104), "Doors"); AddButtonLabeled(220, 225, GetButtonID(3, 105), "Signs"); + AddButtonLabeled(20, 250, GetButtonID(3, 107), "Champions"); + AddButtonLabeled(220, 250, GetButtonID(3, 108), "Magincia (AOS+)"); + + AddButtonLabeled(20, 275, GetButtonID(3, 109), "Stealable Artifacts"); + AddButtonLabeled(220, 275, GetButtonID(3, 110), "SH Teleporters"); + + AddButtonLabeled(20, 300, GetButtonID(3, 111), "Secret Locations"); + AddButtonLabeled(220, 300, GetButtonID(3, 112), "Doom"); + + AddButtonLabeled(20, 325, GetButtonID(3, 113), "Khaldun Puzzles"); + goto case AdminGumpPage.Administer; } case AdminGumpPage.Administer_Server: @@ -400,9 +411,6 @@ namespace Server.Gumps AddButtonLabeled(20, 250, GetButtonID(3, 408), "Squelch"); AddButtonLabeled(220, 250, GetButtonID(3, 409), "Unsquelch"); - AddButtonLabeled(20, 270, GetButtonID(3, 410), "Freeze"); - AddButtonLabeled(220, 270, GetButtonID(3, 411), "Unfreeze"); - AddButtonLabeled(20, 290, GetButtonID(3, 412), "Hide"); AddButtonLabeled(220, 290, GetButtonID(3, 413), "Unhide"); @@ -2135,20 +2143,50 @@ namespace Server.Gumps case 106: { InvokeCommand("Decorate"); - notice = "Decoration has been generated."; + notice = "Decorations have been generated."; + break; + } + case 107: + { + InvokeCommand("GenChamps"); + notice = "Champions have been generated."; + break; + } + case 108: + { + InvokeCommand("DecorateMag"); + notice = "Magincia Ruins decorations have been generated."; + break; + } + case 109: + { + InvokeCommand("GenStealArties"); + notice = "Stealable Artifacts have been generated."; break; } - case 110: { - InvokeCommand("Freeze"); - notice = "Target bounding points."; + InvokeCommand("SHTelGen"); + notice = "Solen Hive teleporters have been generated."; break; } - case 120: + case 111: { - InvokeCommand("Unfreeze"); - notice = "Target bounding points."; + InvokeCommand("SecretLocGen"); + notice = "Secret Locations have been generated."; + break; + } + case 112: + { + InvokeCommand("GenLeverPuzzle"); + InvokeCommand("GenGauntlet"); + notice = "Doom has been generated."; + break; + } + case 113: + { + InvokeCommand("GenKhaldun"); + notice = "Khaldun puzzles have been generated."; break; } @@ -2489,26 +2527,6 @@ namespace Server.Gumps InvokeCommand("Add"); break; } - case 111: - { - InvokeCommand("FreezeWorld"); - break; - } - case 112: - { - InvokeCommand("FreezeMap"); - break; - } - case 121: - { - InvokeCommand("UnfreezeWorld"); - break; - } - case 122: - { - InvokeCommand("UnfreezeMap"); - break; - } } break; diff --git a/Projects/UOContent/Items/Addons/SHTeleporter.cs b/Projects/UOContent/Items/Addons/SHTeleporter.cs index 38102dd4c..f34f9cb85 100644 --- a/Projects/UOContent/Items/Addons/SHTeleporter.cs +++ b/Projects/UOContent/Items/Addons/SHTeleporter.cs @@ -171,19 +171,8 @@ namespace Server.Items [Usage("SHTelGen"), Description("Generates solen hives teleporters.")] public static void SHTelGen_OnCommand(CommandEventArgs e) { - World.Broadcast(0x35, true, "Solen hives teleporters are being generated, please wait."); - - var startTime = Core.Now; - - var count = new SHTeleporterCreator().CreateSHTeleporters(); - - var endTime = Core.Now; - - World.Broadcast( - 0x35, - true, - $"{count} solen hives teleporters have been created. The entire process took {(endTime - startTime).TotalSeconds:0.#} seconds." - ); + CreateSHTeleporters(); + e.Mobile.SendMessage("Solen Hive teleporters have been created."); } public void ChangeActive(bool active) @@ -259,128 +248,115 @@ namespace Server.Items m_Changing = false; } - public class SHTeleporterCreator + public static SHTeleporter FindSHTeleporter(Map map, Point3D p) { - private int m_Count; - - public SHTeleporterCreator() => m_Count = 0; - - public static SHTeleporter FindSHTeleporter(Map map, Point3D p) + foreach (var teleporter in map.GetItemsAt(p)) { - foreach (var teleporter in map.GetItemsAt(p)) + if (teleporter.Z == p.Z) { - if (teleporter.Z == p.Z) - { - return teleporter; - } + return teleporter; } - - return null; } - public SHTeleporter AddSHT(Map map, bool ext, int x, int y, int z) + return null; + } + + public static SHTeleporter AddSHT(Map map, bool ext, int x, int y, int z) + { + var p = new Point3D(x, y, z); + var tele = FindSHTeleporter(map, p); + + if (tele == null) { - var p = new Point3D(x, y, z); - var tele = FindSHTeleporter(map, p); - - if (tele == null) - { - tele = new SHTeleporter(ext); - tele.MoveToWorld(p, map); - - m_Count++; - } - - return tele; + tele = new SHTeleporter(ext); + tele.MoveToWorld(p, map); } - public static void Link(SHTeleporter tele1, SHTeleporter tele2) - { - tele1.ChangeDest(tele2); - tele2.ChangeDest(tele1); - } + return tele; + } - public void AddSHTCouple(Map map, bool ext1, int x1, int y1, int z1, bool ext2, int x2, int y2, int z2) - { - var tele1 = AddSHT(map, ext1, x1, y1, z1); - var tele2 = AddSHT(map, ext2, x2, y2, z2); + public static void Link(SHTeleporter tele1, SHTeleporter tele2) + { + tele1.ChangeDest(tele2); + tele2.ChangeDest(tele1); + } - Link(tele1, tele2); - } + public static void AddSHTCouple(Map map, bool ext1, int x1, int y1, int z1, bool ext2, int x2, int y2, int z2) + { + var tele1 = AddSHT(map, ext1, x1, y1, z1); + var tele2 = AddSHT(map, ext2, x2, y2, z2); - public void AddSHTCouple(bool ext1, int x1, int y1, int z1, bool ext2, int x2, int y2, int z2) - { - AddSHTCouple(Map.Trammel, ext1, x1, y1, z1, ext2, x2, y2, z2); - AddSHTCouple(Map.Felucca, ext1, x1, y1, z1, ext2, x2, y2, z2); - } + Link(tele1, tele2); + } - public int CreateSHTeleporters() - { - SHTeleporter tele1, tele2; + public static void AddSHTCouple(bool ext1, int x1, int y1, int z1, bool ext2, int x2, int y2, int z2) + { + AddSHTCouple(Map.Trammel, ext1, x1, y1, z1, ext2, x2, y2, z2); + AddSHTCouple(Map.Felucca, ext1, x1, y1, z1, ext2, x2, y2, z2); + } - AddSHTCouple(true, 2608, 763, 0, false, 5918, 1794, 0); - AddSHTCouple(false, 5897, 1877, 0, false, 5871, 1867, 0); - AddSHTCouple(false, 5852, 1848, 0, false, 5771, 1867, 0); + public static void CreateSHTeleporters() + { + AddSHTCouple(true, 2608, 763, 0, false, 5918, 1794, 0); + AddSHTCouple(false, 5897, 1877, 0, false, 5871, 1867, 0); + AddSHTCouple(false, 5852, 1848, 0, false, 5771, 1867, 0); - tele1 = AddSHT(Map.Trammel, false, 5747, 1895, 0); - tele1.LeftTele.TeleOffset = new Point3D(-1, 3, 0); - tele2 = AddSHT(Map.Trammel, false, 5658, 1898, 0); - Link(tele1, tele2); + var tele1 = AddSHT(Map.Trammel, false, 5747, 1895, 0); + tele1.LeftTele.TeleOffset = new Point3D(-1, 3, 0); + var tele2 = AddSHT(Map.Trammel, false, 5658, 1898, 0); + Link(tele1, tele2); - tele1 = AddSHT(Map.Felucca, false, 5747, 1895, 0); - tele1.LeftTele.TeleOffset = new Point3D(-1, 3, 0); - tele2 = AddSHT(Map.Felucca, false, 5658, 1898, 0); - Link(tele1, tele2); + tele1 = AddSHT(Map.Felucca, false, 5747, 1895, 0); + tele1.LeftTele.TeleOffset = new Point3D(-1, 3, 0); + tele2 = AddSHT(Map.Felucca, false, 5658, 1898, 0); + Link(tele1, tele2); - AddSHTCouple(false, 5727, 1894, 0, false, 5756, 1794, 0); - AddSHTCouple(false, 5784, 1929, 0, false, 5700, 1929, 0); + AddSHTCouple(false, 5727, 1894, 0, false, 5756, 1794, 0); + AddSHTCouple(false, 5784, 1929, 0, false, 5700, 1929, 0); - tele1 = AddSHT(Map.Trammel, false, 5711, 1952, 0); - tele1.LeftTele.TeleOffset = new Point3D(-1, 3, 0); - tele2 = AddSHT(Map.Trammel, false, 5657, 1954, 0); - Link(tele1, tele2); + tele1 = AddSHT(Map.Trammel, false, 5711, 1952, 0); + tele1.LeftTele.TeleOffset = new Point3D(-1, 3, 0); + tele2 = AddSHT(Map.Trammel, false, 5657, 1954, 0); + Link(tele1, tele2); - tele1 = AddSHT(Map.Felucca, false, 5711, 1952, 0); - tele1.LeftTele.TeleOffset = new Point3D(-1, 3, 0); - tele2 = AddSHT(Map.Felucca, false, 5657, 1954, 0); - Link(tele1, tele2); + tele1 = AddSHT(Map.Felucca, false, 5711, 1952, 0); + tele1.LeftTele.TeleOffset = new Point3D(-1, 3, 0); + tele2 = AddSHT(Map.Felucca, false, 5657, 1954, 0); + Link(tele1, tele2); - tele1 = AddSHT(Map.Trammel, false, 5655, 2018, 0); - tele1.LeftTele.TeleOffset = new Point3D(-1, 3, 0); - tele2 = AddSHT(Map.Trammel, true, 1690, 2789, 0); - Link(tele1, tele2); + tele1 = AddSHT(Map.Trammel, false, 5655, 2018, 0); + tele1.LeftTele.TeleOffset = new Point3D(-1, 3, 0); + tele2 = AddSHT(Map.Trammel, true, 1690, 2789, 0); + Link(tele1, tele2); - tele1 = AddSHT(Map.Felucca, false, 5655, 2018, 0); - tele1.LeftTele.TeleOffset = new Point3D(-1, 3, 0); - tele2 = AddSHT(Map.Felucca, true, 1690, 2789, 0); - Link(tele1, tele2); + tele1 = AddSHT(Map.Felucca, false, 5655, 2018, 0); + tele1.LeftTele.TeleOffset = new Point3D(-1, 3, 0); + tele2 = AddSHT(Map.Felucca, true, 1690, 2789, 0); + Link(tele1, tele2); - AddSHTCouple(false, 5809, 1905, 0, false, 5876, 1891, 0); + AddSHTCouple(false, 5809, 1905, 0, false, 5876, 1891, 0); - tele1 = AddSHT(Map.Trammel, false, 5814, 2015, 0); - tele1.LeftTele.TeleOffset = new Point3D(-1, 3, 0); - tele2 = AddSHT(Map.Trammel, false, 5913, 1893, 0); - Link(tele1, tele2); + tele1 = AddSHT(Map.Trammel, false, 5814, 2015, 0); + tele1.LeftTele.TeleOffset = new Point3D(-1, 3, 0); + tele2 = AddSHT(Map.Trammel, false, 5913, 1893, 0); + Link(tele1, tele2); - tele1 = AddSHT(Map.Felucca, false, 5814, 2015, 0); - tele1.LeftTele.TeleOffset = new Point3D(-1, 3, 0); - tele2 = AddSHT(Map.Felucca, false, 5913, 1893, 0); - Link(tele1, tele2); + tele1 = AddSHT(Map.Felucca, false, 5814, 2015, 0); + tele1.LeftTele.TeleOffset = new Point3D(-1, 3, 0); + tele2 = AddSHT(Map.Felucca, false, 5913, 1893, 0); + Link(tele1, tele2); - AddSHTCouple(false, 5919, 2021, 0, true, 1724, 814, 0); + AddSHTCouple(false, 5919, 2021, 0, true, 1724, 814, 0); - tele1 = AddSHT(Map.Trammel, false, 5654, 1791, 0); - tele2 = AddSHT(Map.Trammel, true, 730, 1451, 0); - Link(tele1, tele2); - AddSHT(Map.Trammel, false, 5734, 1859, 0).ChangeDest(tele2); + tele1 = AddSHT(Map.Trammel, false, 5654, 1791, 0); + tele2 = AddSHT(Map.Trammel, true, 730, 1451, 0); + Link(tele1, tele2); + AddSHT(Map.Trammel, false, 5734, 1859, 0).ChangeDest(tele2); - tele1 = AddSHT(Map.Felucca, false, 5654, 1791, 0); - tele2 = AddSHT(Map.Felucca, true, 730, 1451, 0); - Link(tele1, tele2); - AddSHT(Map.Felucca, false, 5734, 1859, 0).ChangeDest(tele2); - - return m_Count; - } + tele1 = AddSHT(Map.Felucca, false, 5654, 1791, 0); + tele2 = AddSHT(Map.Felucca, true, 730, 1451, 0); + Link(tele1, tele2); + AddSHT(Map.Felucca, false, 5734, 1859, 0).ChangeDest(tele2); } } } diff --git a/Projects/UOContent/Items/Misc/WayPoint.cs b/Projects/UOContent/Items/Misc/WayPoint.cs index f193b59c8..547d33ada 100644 --- a/Projects/UOContent/Items/Misc/WayPoint.cs +++ b/Projects/UOContent/Items/Misc/WayPoint.cs @@ -31,6 +31,8 @@ public partial class WayPoint : Item CommandSystem.Register("WayPointSeq", AccessLevel.GameMaster, WayPointSeq_OnCommand); } + [Usage("WayPointSeq")] + [Description("Creates a sequence of way points.")] public static void WayPointSeq_OnCommand(CommandEventArgs arg) { arg.Mobile.SendMessage("Target the position of the first way point."); diff --git a/Projects/UOContent/Misc/AutoRestart.cs b/Projects/UOContent/Misc/AutoRestart.cs index c91605068..881504baf 100644 --- a/Projects/UOContent/Misc/AutoRestart.cs +++ b/Projects/UOContent/Misc/AutoRestart.cs @@ -57,6 +57,8 @@ namespace Server.Misc CommandSystem.Register("Restart", AccessLevel.Administrator, Restart_OnCommand); } + [Usage("Restart")] + [Description("Initiates a server restart. The world is not saved before the restart.")] public static void Restart_OnCommand(CommandEventArgs e) { if (Restarting) diff --git a/docs/commands/commands.7z b/docs/commands/commands.7z index 79a0f3020..fea488840 100644 Binary files a/docs/commands/commands.7z and b/docs/commands/commands.7z differ