#W# Added a command [es to export all spawners on a map. [is alias for [importspawners.

This commit is contained in:
WarrentyExpired 2026-08-28 18:47:32 -04:00
parent bf0111057c
commit b0abe9c95b
2 changed files with 33 additions and 1 deletions

View file

@ -0,0 +1,32 @@
// Exports all spawners on the map.
using System;
using Server;
using Server.Commands;
namespace Server.Custom
{
public class ExportSpawnersAlias
{
public static void Initialize()
{
CommandSystem.Register("ES", AccessLevel.Administrator, new CommandEventHandler(OnCommand));
}
[Usage("ES [filename]")]
[Description("A quick shortcut for [global ExportSpawners")]
public static void OnCommand(CommandEventArgs e)
{
Mobile m = e.Mobile;
string commandToRun = $"{CommandSystem.Prefix}global exportspawners";
string args = e.ArgString.Trim();
if (!string.IsNullOrEmpty(args))
{
commandToRun += " " + args;
}
m.SendMessage(68, $"Running shortcut: {commandToRun}");
CommandSystem.Handle(m, commandToRun);
}
}
}

View file

@ -24,7 +24,7 @@ public static class ImportSpawnersCommand
}
[Usage("ImportSpawners <relative search pattern to distribution>")]
[Aliases("ImportSpawner", "GenerateSpawners", "GenSpawners")]
[Aliases("ImportSpawner", "GenerateSpawners", "GenSpawners", "IS")]
[Description("Imports JSON, Nerun Premium, and RunUO spawner files. Supports basic globbing.")]
private static void GenerateSpawners_OnCommand(CommandEventArgs e)
{