#W# Added: [ESA command exports all spawners on the map. [IS </path/*.json> imports spawners from specified file.

This commit is contained in:
WarrentyExpired 2026-08-28 20:21:34 -04:00
parent ee5559134c
commit 289e7f19c2
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("EAS", AccessLevel.Administrator, new CommandEventHandler(OnCommand));
}
[Usage("EAS [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)
{