#W# Added a command [es to export all spawners on a map. [is alias for [importspawners.
This commit is contained in:
parent
bf0111057c
commit
b0abe9c95b
2 changed files with 33 additions and 1 deletions
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,7 +24,7 @@ public static class ImportSpawnersCommand
|
||||||
}
|
}
|
||||||
|
|
||||||
[Usage("ImportSpawners <relative search pattern to distribution>")]
|
[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.")]
|
[Description("Imports JSON, Nerun Premium, and RunUO spawner files. Supports basic globbing.")]
|
||||||
private static void GenerateSpawners_OnCommand(CommandEventArgs e)
|
private static void GenerateSpawners_OnCommand(CommandEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue